lwc 2.6.1 → 2.7.2

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.
Files changed (41) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +590 -394
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +590 -394
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +564 -370
  5. package/dist/engine-dom/iife/es5/engine-dom.js +648 -351
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +616 -327
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +590 -394
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +564 -370
  11. package/dist/engine-dom/umd/es5/engine-dom.js +648 -351
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +616 -327
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +670 -472
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
  16. package/dist/engine-server/esm/es2017/engine-server.js +670 -472
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +74 -9
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +74 -9
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +74 -9
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +85 -12
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +85 -12
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +74 -9
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +74 -9
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +85 -12
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +85 -12
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/iife/es5/wire-service.js +11 -11
  34. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  35. package/dist/wire-service/iife/es5/wire-service_debug.js +11 -11
  36. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  37. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  38. package/dist/wire-service/umd/es5/wire-service.js +11 -11
  39. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  40. package/dist/wire-service/umd/es5/wire-service_debug.js +11 -11
  41. package/package.json +8 -8
@@ -21,7 +21,7 @@ var LWC = (function (exports) {
21
21
 
22
22
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -39,7 +39,7 @@ var LWC = (function (exports) {
39
39
 
40
40
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
41
41
 
42
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
42
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
43
43
 
44
44
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
45
45
 
@@ -55,7 +55,7 @@ var LWC = (function (exports) {
55
55
 
56
56
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
57
57
 
58
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
58
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
59
59
 
60
60
  /* proxy-compat-disable */
61
61
 
@@ -348,7 +348,7 @@ var LWC = (function (exports) {
348
348
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
349
349
  return attributeName;
350
350
  }
351
- /** version: 2.6.1 */
351
+ /** version: 2.7.2 */
352
352
 
353
353
  /*
354
354
  * Copyright (c) 2018, salesforce.com, inc.
@@ -460,7 +460,6 @@ var LWC = (function (exports) {
460
460
  ENABLE_NODE_LIST_PATCH: null,
461
461
  ENABLE_HTML_COLLECTIONS_PATCH: null,
462
462
  ENABLE_NODE_PATCH: null,
463
- ENABLE_MIXED_SHADOW_MODE: null,
464
463
  ENABLE_WIRE_SYNC_EMIT: null
465
464
  };
466
465
 
@@ -527,7 +526,7 @@ var LWC = (function (exports) {
527
526
  setFeatureFlag(name, value);
528
527
  }
529
528
  }
530
- /** version: 2.6.1 */
529
+ /** version: 2.7.2 */
531
530
 
532
531
  /* proxy-compat-disable */
533
532
 
@@ -615,6 +614,249 @@ var LWC = (function (exports) {
615
614
  }
616
615
 
617
616
  return styleMap;
617
+ } //
618
+ // Primitives
619
+ //
620
+
621
+
622
+ var ssr$1;
623
+
624
+ function setSsr(ssrImpl) {
625
+ ssr$1 = ssrImpl;
626
+ }
627
+
628
+ var isNativeShadowDefined$1;
629
+
630
+ function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
631
+ isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
632
+ }
633
+
634
+ var isSyntheticShadowDefined$1;
635
+
636
+ function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
637
+ isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
638
+ }
639
+
640
+ var HTMLElementExported$1;
641
+
642
+ function setHTMLElement(HTMLElementImpl) {
643
+ HTMLElementExported$1 = HTMLElementImpl;
644
+ }
645
+
646
+ var isHydrating$1;
647
+
648
+ function setIsHydrating$1(isHydratingImpl) {
649
+ isHydrating$1 = isHydratingImpl;
650
+ }
651
+
652
+ var insert$1;
653
+
654
+ function setInsert(insertImpl) {
655
+ insert$1 = insertImpl;
656
+ }
657
+
658
+ var remove$1;
659
+
660
+ function setRemove(removeImpl) {
661
+ remove$1 = removeImpl;
662
+ }
663
+
664
+ var createElement$2;
665
+
666
+ function setCreateElement(createElementImpl) {
667
+ createElement$2 = createElementImpl;
668
+ }
669
+
670
+ var createText$1;
671
+
672
+ function setCreateText(createTextImpl) {
673
+ createText$1 = createTextImpl;
674
+ }
675
+
676
+ var createComment$1;
677
+
678
+ function setCreateComment(createCommentImpl) {
679
+ createComment$1 = createCommentImpl;
680
+ }
681
+
682
+ var nextSibling$1;
683
+
684
+ function setNextSibling(nextSiblingImpl) {
685
+ nextSibling$1 = nextSiblingImpl;
686
+ }
687
+
688
+ var attachShadow$1;
689
+
690
+ function setAttachShadow(attachShadowImpl) {
691
+ attachShadow$1 = attachShadowImpl;
692
+ }
693
+
694
+ var getProperty$1;
695
+
696
+ function setGetProperty(getPropertyImpl) {
697
+ getProperty$1 = getPropertyImpl;
698
+ }
699
+
700
+ var setProperty$1;
701
+
702
+ function setSetProperty(setPropertyImpl) {
703
+ setProperty$1 = setPropertyImpl;
704
+ }
705
+
706
+ var setText$1;
707
+
708
+ function setSetText(setTextImpl) {
709
+ setText$1 = setTextImpl;
710
+ }
711
+
712
+ var getAttribute$1;
713
+
714
+ function setGetAttribute(getAttributeImpl) {
715
+ getAttribute$1 = getAttributeImpl;
716
+ }
717
+
718
+ var setAttribute$1;
719
+
720
+ function setSetAttribute(setAttributeImpl) {
721
+ setAttribute$1 = setAttributeImpl;
722
+ }
723
+
724
+ var removeAttribute$1;
725
+
726
+ function setRemoveAttribute(removeAttributeImpl) {
727
+ removeAttribute$1 = removeAttributeImpl;
728
+ }
729
+
730
+ var addEventListener$1;
731
+
732
+ function setAddEventListener(addEventListenerImpl) {
733
+ addEventListener$1 = addEventListenerImpl;
734
+ }
735
+
736
+ var removeEventListener$1;
737
+
738
+ function setRemoveEventListener(removeEventListenerImpl) {
739
+ removeEventListener$1 = removeEventListenerImpl;
740
+ }
741
+
742
+ var dispatchEvent$1;
743
+
744
+ function setDispatchEvent(dispatchEventImpl) {
745
+ dispatchEvent$1 = dispatchEventImpl;
746
+ }
747
+
748
+ var getClassList$1;
749
+
750
+ function setGetClassList(getClassListImpl) {
751
+ getClassList$1 = getClassListImpl;
752
+ }
753
+
754
+ var setCSSStyleProperty$1;
755
+
756
+ function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
757
+ setCSSStyleProperty$1 = setCSSStylePropertyImpl;
758
+ }
759
+
760
+ var getBoundingClientRect$1;
761
+
762
+ function setGetBoundingClientRect(getBoundingClientRectImpl) {
763
+ getBoundingClientRect$1 = getBoundingClientRectImpl;
764
+ }
765
+
766
+ var querySelector$1;
767
+
768
+ function setQuerySelector(querySelectorImpl) {
769
+ querySelector$1 = querySelectorImpl;
770
+ }
771
+
772
+ var querySelectorAll$1;
773
+
774
+ function setQuerySelectorAll(querySelectorAllImpl) {
775
+ querySelectorAll$1 = querySelectorAllImpl;
776
+ }
777
+
778
+ var getElementsByTagName$1;
779
+
780
+ function setGetElementsByTagName(getElementsByTagNameImpl) {
781
+ getElementsByTagName$1 = getElementsByTagNameImpl;
782
+ }
783
+
784
+ var getElementsByClassName$1;
785
+
786
+ function setGetElementsByClassName(getElementsByClassNameImpl) {
787
+ getElementsByClassName$1 = getElementsByClassNameImpl;
788
+ }
789
+
790
+ var getChildren$1;
791
+
792
+ function setGetChildren(getChildrenImpl) {
793
+ getChildren$1 = getChildrenImpl;
794
+ }
795
+
796
+ var getChildNodes$1;
797
+
798
+ function setGetChildNodes(getChildNodesImpl) {
799
+ getChildNodes$1 = getChildNodesImpl;
800
+ }
801
+
802
+ var getFirstChild$1;
803
+
804
+ function setGetFirstChild(getFirstChildImpl) {
805
+ getFirstChild$1 = getFirstChildImpl;
806
+ }
807
+
808
+ var getFirstElementChild$1;
809
+
810
+ function setGetFirstElementChild(getFirstElementChildImpl) {
811
+ getFirstElementChild$1 = getFirstElementChildImpl;
812
+ }
813
+
814
+ var getLastChild$1;
815
+
816
+ function setGetLastChild(getLastChildImpl) {
817
+ getLastChild$1 = getLastChildImpl;
818
+ }
819
+
820
+ var getLastElementChild$1;
821
+
822
+ function setGetLastElementChild(getLastElementChildImpl) {
823
+ getLastElementChild$1 = getLastElementChildImpl;
824
+ }
825
+
826
+ var isConnected$1;
827
+
828
+ function setIsConnected(isConnectedImpl) {
829
+ isConnected$1 = isConnectedImpl;
830
+ }
831
+
832
+ var insertGlobalStylesheet$1;
833
+
834
+ function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
835
+ insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
836
+ }
837
+
838
+ var insertStylesheet$1;
839
+
840
+ function setInsertStylesheet(insertStylesheetImpl) {
841
+ insertStylesheet$1 = insertStylesheetImpl;
842
+ }
843
+
844
+ var assertInstanceOfHTMLElement$1;
845
+
846
+ function setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElementImpl) {
847
+ assertInstanceOfHTMLElement$1 = assertInstanceOfHTMLElementImpl;
848
+ }
849
+
850
+ var defineCustomElement$1;
851
+
852
+ function setDefineCustomElement(defineCustomElementImpl) {
853
+ defineCustomElement$1 = defineCustomElementImpl;
854
+ }
855
+
856
+ var getCustomElement$1;
857
+
858
+ function setGetCustomElement(getCustomElementImpl) {
859
+ getCustomElement$1 = getCustomElementImpl;
618
860
  }
619
861
  /*
620
862
  * Copyright (c) 2019, salesforce.com, inc.
@@ -866,8 +1108,7 @@ var LWC = (function (exports) {
866
1108
 
867
1109
  function createAllEventListeners(vnode) {
868
1110
  var elm = vnode.elm,
869
- on = vnode.data.on,
870
- renderer = vnode.owner.renderer;
1111
+ on = vnode.data.on;
871
1112
 
872
1113
  if (isUndefined$1(on)) {
873
1114
  return;
@@ -878,7 +1119,7 @@ var LWC = (function (exports) {
878
1119
  var name;
879
1120
 
880
1121
  for (name in on) {
881
- renderer.addEventListener(elm, name, listener);
1122
+ addEventListener$1(elm, name, listener);
882
1123
  }
883
1124
  }
884
1125
 
@@ -1017,8 +1258,7 @@ var LWC = (function (exports) {
1017
1258
  var ColonCharCode = 58;
1018
1259
 
1019
1260
  function updateAttrs(oldVnode, vnode) {
1020
- var attrs = vnode.data.attrs,
1021
- renderer = vnode.owner.renderer;
1261
+ var attrs = vnode.data.attrs;
1022
1262
 
1023
1263
  if (isUndefined$1(attrs)) {
1024
1264
  return;
@@ -1035,8 +1275,6 @@ var LWC = (function (exports) {
1035
1275
  }
1036
1276
 
1037
1277
  var elm = vnode.elm;
1038
- var setAttribute = renderer.setAttribute,
1039
- removeAttribute = renderer.removeAttribute;
1040
1278
  var key;
1041
1279
  oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
1042
1280
  // this routine is only useful for data-* attributes in all kind of elements
@@ -1051,14 +1289,14 @@ var LWC = (function (exports) {
1051
1289
 
1052
1290
  if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
1053
1291
  // Assume xml namespace
1054
- setAttribute(elm, key, cur, xmlNS);
1292
+ setAttribute$1(elm, key, cur, xmlNS);
1055
1293
  } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
1056
1294
  // Assume xlink namespace
1057
- setAttribute(elm, key, cur, xlinkNS);
1058
- } else if (isNull(cur)) {
1059
- removeAttribute(elm, key);
1295
+ setAttribute$1(elm, key, cur, xlinkNS);
1296
+ } else if (isNull(cur) || isUndefined$1(cur)) {
1297
+ removeAttribute$1(elm, key);
1060
1298
  } else {
1061
- setAttribute(elm, key, cur);
1299
+ setAttribute$1(elm, key, cur);
1062
1300
  }
1063
1301
 
1064
1302
  lockAttribute();
@@ -1107,14 +1345,13 @@ var LWC = (function (exports) {
1107
1345
 
1108
1346
  var isFirstPatch = isUndefined$1(oldProps);
1109
1347
  var elm = vnode.elm,
1110
- sel = vnode.sel,
1111
- renderer = vnode.owner.renderer;
1348
+ sel = vnode.sel;
1112
1349
 
1113
1350
  for (var key in props) {
1114
1351
  var cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
1115
1352
 
1116
- if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? renderer.getProperty(elm, key) : oldProps[key])) {
1117
- renderer.setProperty(elm, key, cur);
1353
+ if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
1354
+ setProperty$1(elm, key, cur);
1118
1355
  }
1119
1356
  }
1120
1357
  }
@@ -1182,15 +1419,14 @@ var LWC = (function (exports) {
1182
1419
 
1183
1420
  function updateClassAttribute(oldVnode, vnode) {
1184
1421
  var elm = vnode.elm,
1185
- newClass = vnode.data.className,
1186
- renderer = vnode.owner.renderer;
1422
+ newClass = vnode.data.className;
1187
1423
  var oldClass = oldVnode.data.className;
1188
1424
 
1189
1425
  if (oldClass === newClass) {
1190
1426
  return;
1191
1427
  }
1192
1428
 
1193
- var classList = renderer.getClassList(elm);
1429
+ var classList = getClassList$1(elm);
1194
1430
  var newClassMap = getMapFromClassName(newClass);
1195
1431
  var oldClassMap = getMapFromClassName(oldClass);
1196
1432
  var name;
@@ -1227,19 +1463,16 @@ var LWC = (function (exports) {
1227
1463
 
1228
1464
  function updateStyleAttribute(oldVnode, vnode) {
1229
1465
  var elm = vnode.elm,
1230
- newStyle = vnode.data.style,
1231
- renderer = vnode.owner.renderer;
1232
- var setAttribute = renderer.setAttribute,
1233
- removeAttribute = renderer.removeAttribute;
1466
+ newStyle = vnode.data.style;
1234
1467
 
1235
1468
  if (oldVnode.data.style === newStyle) {
1236
1469
  return;
1237
1470
  }
1238
1471
 
1239
1472
  if (!isString(newStyle) || newStyle === '') {
1240
- removeAttribute(elm, 'style');
1473
+ removeAttribute$1(elm, 'style');
1241
1474
  } else {
1242
- setAttribute(elm, 'style', newStyle);
1475
+ setAttribute$1(elm, 'style', newStyle);
1243
1476
  }
1244
1477
  }
1245
1478
 
@@ -1263,14 +1496,13 @@ var LWC = (function (exports) {
1263
1496
 
1264
1497
  function createClassAttribute(vnode) {
1265
1498
  var elm = vnode.elm,
1266
- classMap = vnode.data.classMap,
1267
- renderer = vnode.owner.renderer;
1499
+ classMap = vnode.data.classMap;
1268
1500
 
1269
1501
  if (isUndefined$1(classMap)) {
1270
1502
  return;
1271
1503
  }
1272
1504
 
1273
- var classList = renderer.getClassList(elm);
1505
+ var classList = getClassList$1(elm);
1274
1506
 
1275
1507
  for (var name in classMap) {
1276
1508
  classList.add(name);
@@ -1291,8 +1523,7 @@ var LWC = (function (exports) {
1291
1523
 
1292
1524
  function createStyleAttribute(vnode) {
1293
1525
  var elm = vnode.elm,
1294
- styleDecls = vnode.data.styleDecls,
1295
- renderer = vnode.owner.renderer;
1526
+ styleDecls = vnode.data.styleDecls;
1296
1527
 
1297
1528
  if (isUndefined$1(styleDecls)) {
1298
1529
  return;
@@ -1304,7 +1535,7 @@ var LWC = (function (exports) {
1304
1535
  value = _styleDecls$_i[1],
1305
1536
  important = _styleDecls$_i[2];
1306
1537
 
1307
- renderer.setCSSStyleProperty(elm, prop, value, important);
1538
+ setCSSStyleProperty$1(elm, prop, value, important);
1308
1539
  }
1309
1540
  }
1310
1541
 
@@ -1318,15 +1549,6 @@ var LWC = (function (exports) {
1318
1549
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1319
1550
  */
1320
1551
 
1321
- /**
1322
- @license
1323
- Copyright (c) 2015 Simon Friis Vindum.
1324
- This code may only be used under the MIT License found at
1325
- https://github.com/snabbdom/snabbdom/blob/master/LICENSE
1326
- Code distributed by Snabbdom as part of the Snabbdom project at
1327
- https://github.com/snabbdom/snabbdom/
1328
- */
1329
-
1330
1552
  function isUndef(s) {
1331
1553
  return s === undefined;
1332
1554
  }
@@ -1414,7 +1636,7 @@ var LWC = (function (exports) {
1414
1636
  } else if (sameVnode(oldStartVnode, newEndVnode)) {
1415
1637
  // Vnode moved right
1416
1638
  patchVnode(oldStartVnode, newEndVnode);
1417
- newEndVnode.hook.move(oldStartVnode, parentElm, oldEndVnode.owner.renderer.nextSibling(oldEndVnode.elm));
1639
+ newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
1418
1640
  oldStartVnode = oldCh[++oldStartIdx];
1419
1641
  newEndVnode = newCh[--newEndIdx];
1420
1642
  } else if (sameVnode(oldEndVnode, newStartVnode)) {
@@ -1861,7 +2083,7 @@ var LWC = (function (exports) {
1861
2083
  defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
1862
2084
  }
1863
2085
  /*
1864
- * Copyright (c) 2020, salesforce.com, inc.
2086
+ * Copyright (c) 2018, salesforce.com, inc.
1865
2087
  * All rights reserved.
1866
2088
  * SPDX-License-Identifier: MIT
1867
2089
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -2797,21 +3019,18 @@ var LWC = (function (exports) {
2797
3019
 
2798
3020
 
2799
3021
  var LightningElement = function LightningElement() {
2800
- var _a; // This should be as performant as possible, while any initialization should be done lazily
2801
-
2802
-
3022
+ // This should be as performant as possible, while any initialization should be done lazily
2803
3023
  if (isNull(vmBeingConstructed)) {
2804
3024
  throw new ReferenceError('Illegal constructor');
2805
3025
  }
2806
3026
 
2807
3027
  var vm = vmBeingConstructed;
2808
3028
  var def = vm.def,
2809
- elm = vm.elm,
2810
- renderer = vm.renderer;
3029
+ elm = vm.elm;
2811
3030
  var bridge = def.bridge;
2812
3031
 
2813
3032
  if (process.env.NODE_ENV !== 'production') {
2814
- (_a = renderer.assertInstanceOfHTMLElement) === null || _a === void 0 ? void 0 : _a.call(renderer, vm.elm, "Component creation requires a DOM element to be associated to ".concat(vm, "."));
3033
+ assertInstanceOfHTMLElement$1(vm.elm, "Component creation requires a DOM element to be associated to ".concat(vm, "."));
2815
3034
  }
2816
3035
 
2817
3036
  var component = this;
@@ -2840,7 +3059,7 @@ var LWC = (function (exports) {
2840
3059
  if (vm.renderMode === 1
2841
3060
  /* Shadow */
2842
3061
  ) {
2843
- attachShadow(vm);
3062
+ doAttachShadow(vm);
2844
3063
  } // Adding extra guard rails in DEV mode.
2845
3064
 
2846
3065
 
@@ -2852,15 +3071,14 @@ var LWC = (function (exports) {
2852
3071
  return this;
2853
3072
  };
2854
3073
 
2855
- function attachShadow(vm) {
2856
- var _renderer$attachShado;
3074
+ function doAttachShadow(vm) {
3075
+ var _attachShadow$;
2857
3076
 
2858
3077
  var elm = vm.elm,
2859
3078
  mode = vm.mode,
2860
- renderer = vm.renderer,
2861
3079
  shadowMode = vm.shadowMode,
2862
3080
  ctor = vm.def.ctor;
2863
- var cmpRoot = renderer.attachShadow(elm, (_renderer$attachShado = {}, _defineProperty(_renderer$attachShado, KEY__SYNTHETIC_MODE, shadowMode === 1), _defineProperty(_renderer$attachShado, "delegatesFocus", Boolean(ctor.delegatesFocus)), _defineProperty(_renderer$attachShado, "mode", mode), _renderer$attachShado));
3081
+ var cmpRoot = attachShadow$1(elm, (_attachShadow$ = {}, _defineProperty(_attachShadow$, KEY__SYNTHETIC_MODE, shadowMode === 1), _defineProperty(_attachShadow$, "delegatesFocus", Boolean(ctor.delegatesFocus)), _defineProperty(_attachShadow$, "mode", mode), _attachShadow$));
2864
3082
  vm.cmpRoot = cmpRoot;
2865
3083
  associateVM(cmpRoot, vm);
2866
3084
 
@@ -2880,15 +3098,13 @@ var LWC = (function (exports) {
2880
3098
  constructor: LightningElement,
2881
3099
  dispatchEvent: function dispatchEvent(event) {
2882
3100
  var _getAssociatedVM = getAssociatedVM(this),
2883
- elm = _getAssociatedVM.elm,
2884
- dispatchEvent = _getAssociatedVM.renderer.dispatchEvent;
3101
+ elm = _getAssociatedVM.elm;
2885
3102
 
2886
- return dispatchEvent(elm, event);
3103
+ return dispatchEvent$1(elm, event);
2887
3104
  },
2888
3105
  addEventListener: function addEventListener(type, listener, options) {
2889
3106
  var vm = getAssociatedVM(this);
2890
- var elm = vm.elm,
2891
- addEventListener = vm.renderer.addEventListener;
3107
+ var elm = vm.elm;
2892
3108
 
2893
3109
  if (process.env.NODE_ENV !== 'production') {
2894
3110
  var _vmBeingRendered2 = getVMBeingRendered();
@@ -2899,111 +3115,99 @@ var LWC = (function (exports) {
2899
3115
  }
2900
3116
 
2901
3117
  var wrappedListener = getWrappedComponentsListener(vm, listener);
2902
- addEventListener(elm, type, wrappedListener, options);
3118
+ addEventListener$1(elm, type, wrappedListener, options);
2903
3119
  },
2904
3120
  removeEventListener: function removeEventListener(type, listener, options) {
2905
3121
  var vm = getAssociatedVM(this);
2906
- var elm = vm.elm,
2907
- removeEventListener = vm.renderer.removeEventListener;
3122
+ var elm = vm.elm;
2908
3123
  var wrappedListener = getWrappedComponentsListener(vm, listener);
2909
- removeEventListener(elm, type, wrappedListener, options);
3124
+ removeEventListener$1(elm, type, wrappedListener, options);
2910
3125
  },
2911
3126
  hasAttribute: function hasAttribute(name) {
2912
3127
  var _getAssociatedVM2 = getAssociatedVM(this),
2913
- elm = _getAssociatedVM2.elm,
2914
- getAttribute = _getAssociatedVM2.renderer.getAttribute;
3128
+ elm = _getAssociatedVM2.elm;
2915
3129
 
2916
- return !isNull(getAttribute(elm, name));
3130
+ return !isNull(getAttribute$1(elm, name));
2917
3131
  },
2918
3132
  hasAttributeNS: function hasAttributeNS(namespace, name) {
2919
3133
  var _getAssociatedVM3 = getAssociatedVM(this),
2920
- elm = _getAssociatedVM3.elm,
2921
- getAttribute = _getAssociatedVM3.renderer.getAttribute;
3134
+ elm = _getAssociatedVM3.elm;
2922
3135
 
2923
- return !isNull(getAttribute(elm, name, namespace));
3136
+ return !isNull(getAttribute$1(elm, name, namespace));
2924
3137
  },
2925
3138
  removeAttribute: function removeAttribute(name) {
2926
3139
  var _getAssociatedVM4 = getAssociatedVM(this),
2927
- elm = _getAssociatedVM4.elm,
2928
- removeAttribute = _getAssociatedVM4.renderer.removeAttribute;
3140
+ elm = _getAssociatedVM4.elm;
2929
3141
 
2930
3142
  unlockAttribute(elm, name);
2931
- removeAttribute(elm, name);
3143
+ removeAttribute$1(elm, name);
2932
3144
  lockAttribute();
2933
3145
  },
2934
3146
  removeAttributeNS: function removeAttributeNS(namespace, name) {
2935
3147
  var _getAssociatedVM5 = getAssociatedVM(this),
2936
- elm = _getAssociatedVM5.elm,
2937
- removeAttribute = _getAssociatedVM5.renderer.removeAttribute;
3148
+ elm = _getAssociatedVM5.elm;
2938
3149
 
2939
3150
  unlockAttribute(elm, name);
2940
- removeAttribute(elm, name, namespace);
3151
+ removeAttribute$1(elm, name, namespace);
2941
3152
  lockAttribute();
2942
3153
  },
2943
3154
  getAttribute: function getAttribute(name) {
2944
3155
  var _getAssociatedVM6 = getAssociatedVM(this),
2945
- elm = _getAssociatedVM6.elm,
2946
- getAttribute = _getAssociatedVM6.renderer.getAttribute;
3156
+ elm = _getAssociatedVM6.elm;
2947
3157
 
2948
- return getAttribute(elm, name);
3158
+ return getAttribute$1(elm, name);
2949
3159
  },
2950
3160
  getAttributeNS: function getAttributeNS(namespace, name) {
2951
3161
  var _getAssociatedVM7 = getAssociatedVM(this),
2952
- elm = _getAssociatedVM7.elm,
2953
- getAttribute = _getAssociatedVM7.renderer.getAttribute;
3162
+ elm = _getAssociatedVM7.elm;
2954
3163
 
2955
- return getAttribute(elm, name, namespace);
3164
+ return getAttribute$1(elm, name, namespace);
2956
3165
  },
2957
3166
  setAttribute: function setAttribute(name, value) {
2958
3167
  var vm = getAssociatedVM(this);
2959
- var elm = vm.elm,
2960
- setAttribute = vm.renderer.setAttribute;
3168
+ var elm = vm.elm;
2961
3169
 
2962
3170
  if (process.env.NODE_ENV !== 'production') {
2963
3171
  assert.isFalse(isBeingConstructed(vm), "Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
2964
3172
  }
2965
3173
 
2966
3174
  unlockAttribute(elm, name);
2967
- setAttribute(elm, name, value);
3175
+ setAttribute$1(elm, name, value);
2968
3176
  lockAttribute();
2969
3177
  },
2970
3178
  setAttributeNS: function setAttributeNS(namespace, name, value) {
2971
3179
  var vm = getAssociatedVM(this);
2972
- var elm = vm.elm,
2973
- setAttribute = vm.renderer.setAttribute;
3180
+ var elm = vm.elm;
2974
3181
 
2975
3182
  if (process.env.NODE_ENV !== 'production') {
2976
3183
  assert.isFalse(isBeingConstructed(vm), "Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
2977
3184
  }
2978
3185
 
2979
3186
  unlockAttribute(elm, name);
2980
- setAttribute(elm, name, value, namespace);
3187
+ setAttribute$1(elm, name, value, namespace);
2981
3188
  lockAttribute();
2982
3189
  },
2983
3190
  getBoundingClientRect: function getBoundingClientRect() {
2984
3191
  var vm = getAssociatedVM(this);
2985
- var elm = vm.elm,
2986
- getBoundingClientRect = vm.renderer.getBoundingClientRect;
3192
+ var elm = vm.elm;
2987
3193
 
2988
3194
  if (process.env.NODE_ENV !== 'production') {
2989
3195
  warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
2990
3196
  }
2991
3197
 
2992
- return getBoundingClientRect(elm);
3198
+ return getBoundingClientRect$1(elm);
2993
3199
  },
2994
3200
 
2995
3201
  get isConnected() {
2996
3202
  var _getAssociatedVM8 = getAssociatedVM(this),
2997
- elm = _getAssociatedVM8.elm,
2998
- isConnected = _getAssociatedVM8.renderer.isConnected;
3203
+ elm = _getAssociatedVM8.elm;
2999
3204
 
3000
- return isConnected(elm);
3205
+ return isConnected$1(elm);
3001
3206
  },
3002
3207
 
3003
3208
  get classList() {
3004
3209
  var vm = getAssociatedVM(this);
3005
- var elm = vm.elm,
3006
- getClassList = vm.renderer.getClassList;
3210
+ var elm = vm.elm;
3007
3211
 
3008
3212
  if (process.env.NODE_ENV !== 'production') {
3009
3213
  // TODO [#1290]: this still fails in dev but works in production, eventually, we should
@@ -3011,7 +3215,7 @@ var LWC = (function (exports) {
3011
3215
  assert.isFalse(isBeingConstructed(vm), "Failed to construct ".concat(vm, ": The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead."));
3012
3216
  }
3013
3217
 
3014
- return getClassList(elm);
3218
+ return getClassList$1(elm);
3015
3219
  },
3016
3220
 
3017
3221
  get template() {
@@ -3043,25 +3247,47 @@ var LWC = (function (exports) {
3043
3247
  return "[object ".concat(vm.def.name, "]");
3044
3248
  }
3045
3249
  };
3046
- var queryAndChildGetterDescriptors = create(null);
3047
- var childGetters = [['children', 'getChildren'], ['childNodes', 'getChildNodes'], ['firstChild', 'getFirstChild'], ['firstElementChild', 'getFirstElementChild'], ['lastChild', 'getLastChild'], ['lastElementChild', 'getLastElementChild']]; // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
3250
+ var queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
3251
+ // is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
3252
+ // object representing the renderer, with a lot of methods we don't actually need.
3048
3253
 
3049
- var _loop = function _loop() {
3050
- var _childGetters$_i = _slicedToArray(_childGetters[_i9], 2),
3051
- elementProp = _childGetters$_i[0],
3052
- rendererMethod = _childGetters$_i[1];
3254
+ var childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
3255
+
3256
+ function getChildGetter(methodName) {
3257
+ switch (methodName) {
3258
+ case 'children':
3259
+ return getChildren$1;
3260
+
3261
+ case 'childNodes':
3262
+ return getChildNodes$1;
3263
+
3264
+ case 'firstChild':
3265
+ return getFirstChild$1;
3053
3266
 
3054
- queryAndChildGetterDescriptors[elementProp] = {
3267
+ case 'firstElementChild':
3268
+ return getFirstElementChild$1;
3269
+
3270
+ case 'lastChild':
3271
+ return getLastChild$1;
3272
+
3273
+ case 'lastElementChild':
3274
+ return getLastElementChild$1;
3275
+ }
3276
+ } // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
3277
+
3278
+
3279
+ var _loop = function _loop() {
3280
+ var childGetter = _childGetters[_i9];
3281
+ queryAndChildGetterDescriptors[childGetter] = {
3055
3282
  get: function get() {
3056
3283
  var vm = getAssociatedVM(this);
3057
- var elm = vm.elm,
3058
- renderer = vm.renderer;
3284
+ var elm = vm.elm;
3059
3285
 
3060
3286
  if (process.env.NODE_ENV !== 'production') {
3061
- warnIfInvokedDuringConstruction(vm, elementProp);
3287
+ warnIfInvokedDuringConstruction(vm, childGetter);
3062
3288
  }
3063
3289
 
3064
- return renderer[rendererMethod](elm);
3290
+ return getChildGetter(childGetter)(elm);
3065
3291
  },
3066
3292
  configurable: true,
3067
3293
  enumerable: true
@@ -3072,21 +3298,37 @@ var LWC = (function (exports) {
3072
3298
  _loop();
3073
3299
  }
3074
3300
 
3075
- var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
3301
+ var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
3302
+
3303
+ function getQueryMethod(methodName) {
3304
+ switch (methodName) {
3305
+ case 'getElementsByClassName':
3306
+ return getElementsByClassName$1;
3307
+
3308
+ case 'getElementsByTagName':
3309
+ return getElementsByTagName$1;
3310
+
3311
+ case 'querySelector':
3312
+ return querySelector$1;
3313
+
3314
+ case 'querySelectorAll':
3315
+ return querySelectorAll$1;
3316
+ }
3317
+ } // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
3318
+
3076
3319
 
3077
3320
  var _loop2 = function _loop2() {
3078
3321
  var queryMethod = _queryMethods[_i10];
3079
3322
  queryAndChildGetterDescriptors[queryMethod] = {
3080
3323
  value: function value(arg) {
3081
3324
  var vm = getAssociatedVM(this);
3082
- var elm = vm.elm,
3083
- renderer = vm.renderer;
3325
+ var elm = vm.elm;
3084
3326
 
3085
3327
  if (process.env.NODE_ENV !== 'production') {
3086
3328
  warnIfInvokedDuringConstruction(vm, "".concat(queryMethod, "()"));
3087
3329
  }
3088
3330
 
3089
- return renderer[queryMethod](elm, arg);
3331
+ return getQueryMethod(queryMethod)(elm, arg);
3090
3332
  },
3091
3333
  configurable: true,
3092
3334
  enumerable: true,
@@ -3812,7 +4054,7 @@ var LWC = (function (exports) {
3812
4054
  return _super4.apply(this, arguments);
3813
4055
  }
3814
4056
 
3815
- return HTMLBridgeElement;
4057
+ return _createClass(HTMLBridgeElement);
3816
4058
  }(SuperClass);
3817
4059
  } else {
3818
4060
  HTMLBridgeElement = function HTMLBridgeElement() {
@@ -4256,10 +4498,6 @@ var LWC = (function (exports) {
4256
4498
 
4257
4499
  assert.isTrue(Ctor.constructor, "Missing ".concat(ctorName, ".constructor, ").concat(ctorName, " should have a \"constructor\" property."));
4258
4500
 
4259
- if (!runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
4260
- assert.isFalse('shadowSupportMode' in Ctor, "".concat(ctorName || 'Anonymous class', " is an invalid LWC component. The shadowSupportMode static property is not available in this environment."));
4261
- }
4262
-
4263
4501
  if (!isUndefined$1(ctorShadowSupportMode)) {
4264
4502
  assert.invariant(ctorShadowSupportMode === "any"
4265
4503
  /* Any */
@@ -4495,21 +4733,20 @@ var LWC = (function (exports) {
4495
4733
  var token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
4496
4734
 
4497
4735
  if (!isUndefined$1(token) && context.hasScopedStyles) {
4498
- owner.renderer.getClassList(elm).add(token);
4736
+ getClassList$1(elm).add(token);
4499
4737
  }
4500
4738
  }
4501
4739
 
4502
4740
  function updateNodeHook(oldVnode, vnode) {
4503
4741
  var elm = vnode.elm,
4504
- text = vnode.text,
4505
- renderer = vnode.owner.renderer;
4742
+ text = vnode.text;
4506
4743
 
4507
4744
  if (oldVnode.text !== text) {
4508
4745
  if (process.env.NODE_ENV !== 'production') {
4509
4746
  unlockDomMutation();
4510
4747
  }
4511
4748
 
4512
- renderer.setText(elm, text);
4749
+ setText$1(elm, text);
4513
4750
 
4514
4751
  if (process.env.NODE_ENV !== 'production') {
4515
4752
  lockDomMutation();
@@ -4518,13 +4755,11 @@ var LWC = (function (exports) {
4518
4755
  }
4519
4756
 
4520
4757
  function insertNodeHook(vnode, parentNode, referenceNode) {
4521
- var renderer = vnode.owner.renderer;
4522
-
4523
4758
  if (process.env.NODE_ENV !== 'production') {
4524
4759
  unlockDomMutation();
4525
4760
  }
4526
4761
 
4527
- renderer.insert(vnode.elm, parentNode, referenceNode);
4762
+ insert$1(vnode.elm, parentNode, referenceNode);
4528
4763
 
4529
4764
  if (process.env.NODE_ENV !== 'production') {
4530
4765
  lockDomMutation();
@@ -4532,13 +4767,11 @@ var LWC = (function (exports) {
4532
4767
  }
4533
4768
 
4534
4769
  function removeNodeHook(vnode, parentNode) {
4535
- var renderer = vnode.owner.renderer;
4536
-
4537
4770
  if (process.env.NODE_ENV !== 'production') {
4538
4771
  unlockDomMutation();
4539
4772
  }
4540
4773
 
4541
- renderer.remove(vnode.elm, parentNode);
4774
+ remove$1(vnode.elm, parentNode);
4542
4775
 
4543
4776
  if (process.env.NODE_ENV !== 'production') {
4544
4777
  lockDomMutation();
@@ -4617,12 +4850,14 @@ var LWC = (function (exports) {
4617
4850
  }
4618
4851
 
4619
4852
  function updateChildrenHook(oldVnode, vnode) {
4620
- var children = vnode.children,
4621
- owner = vnode.owner;
4622
- var fn = hasDynamicChildren(children) ? updateDynamicChildren : updateStaticChildren;
4623
- runWithBoundaryProtection(owner, owner.owner, noop, function () {
4624
- fn(vnode.elm, oldVnode.children, children);
4625
- }, noop);
4853
+ var elm = vnode.elm,
4854
+ children = vnode.children;
4855
+
4856
+ if (hasDynamicChildren(children)) {
4857
+ updateDynamicChildren(elm, oldVnode.children, children);
4858
+ } else {
4859
+ updateStaticChildren(elm, oldVnode.children, children);
4860
+ }
4626
4861
  }
4627
4862
 
4628
4863
  function allocateChildrenHook(vnode, vm) {
@@ -4682,8 +4917,7 @@ var LWC = (function (exports) {
4682
4917
  createVM(elm, def, {
4683
4918
  mode: mode,
4684
4919
  owner: owner,
4685
- tagName: sel,
4686
- renderer: owner.renderer
4920
+ tagName: sel
4687
4921
  });
4688
4922
 
4689
4923
  if (process.env.NODE_ENV !== 'production') {
@@ -4725,8 +4959,7 @@ var LWC = (function (exports) {
4725
4959
 
4726
4960
  function vnodesAndElementHaveCompatibleAttrs(vnode, elm) {
4727
4961
  var _vnode$data$attrs = vnode.data.attrs,
4728
- attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs,
4729
- renderer = vnode.owner.renderer;
4962
+ attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
4730
4963
  var nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
4731
4964
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
4732
4965
 
@@ -4735,7 +4968,7 @@ var LWC = (function (exports) {
4735
4968
  attrName = _Object$entries$_i[0],
4736
4969
  attrValue = _Object$entries$_i[1];
4737
4970
 
4738
- var elmAttrValue = renderer.getAttribute(elm, attrName);
4971
+ var elmAttrValue = getAttribute$1(elm, attrName);
4739
4972
 
4740
4973
  if (String(attrValue) !== elmAttrValue) {
4741
4974
  logError("Mismatch hydrating element <".concat(elm.tagName.toLowerCase(), ">: attribute \"").concat(attrName, "\" has different values, expected \"").concat(attrValue, "\" but found \"").concat(elmAttrValue, "\""), vnode.owner);
@@ -4749,8 +4982,7 @@ var LWC = (function (exports) {
4749
4982
  function vnodesAndElementHaveCompatibleClass(vnode, elm) {
4750
4983
  var _vnode$data = vnode.data,
4751
4984
  className = _vnode$data.className,
4752
- classMap = _vnode$data.classMap,
4753
- renderer = vnode.owner.renderer;
4985
+ classMap = _vnode$data.classMap;
4754
4986
  var nodesAreCompatible = true;
4755
4987
  var vnodeClassName;
4756
4988
 
@@ -4760,7 +4992,7 @@ var LWC = (function (exports) {
4760
4992
  vnodeClassName = className;
4761
4993
  } else if (!isUndefined$1(classMap)) {
4762
4994
  // classMap is used when class is set to static value.
4763
- var classList = renderer.getClassList(elm);
4995
+ var classList = getClassList$1(elm);
4764
4996
  var computedClassName = ''; // all classes from the vnode should be in the element.classList
4765
4997
 
4766
4998
  for (var name in classMap) {
@@ -4788,9 +5020,8 @@ var LWC = (function (exports) {
4788
5020
  function vnodesAndElementHaveCompatibleStyle(vnode, elm) {
4789
5021
  var _vnode$data2 = vnode.data,
4790
5022
  style = _vnode$data2.style,
4791
- styleDecls = _vnode$data2.styleDecls,
4792
- renderer = vnode.owner.renderer;
4793
- var elmStyle = renderer.getAttribute(elm, 'style') || '';
5023
+ styleDecls = _vnode$data2.styleDecls;
5024
+ var elmStyle = getAttribute$1(elm, 'style') || '';
4794
5025
  var vnodeStyle;
4795
5026
  var nodesAreCompatible = true;
4796
5027
 
@@ -4931,12 +5162,12 @@ var LWC = (function (exports) {
4931
5162
  */
4932
5163
 
4933
5164
 
4934
- function getUpgradableConstructor(tagName, renderer) {
5165
+ function getUpgradableConstructor(tagName) {
4935
5166
  // Should never get a tag with upper case letter at this point, the compiler should
4936
5167
  // produce only tags with lowercase letters
4937
5168
  // But, for backwards compatibility, we will lower case the tagName
4938
5169
  tagName = tagName.toLowerCase();
4939
- var CE = renderer.getCustomElement(tagName);
5170
+ var CE = getCustomElement$1(tagName);
4940
5171
 
4941
5172
  if (!isUndefined$1(CE)) {
4942
5173
  return CE;
@@ -4947,8 +5178,8 @@ var LWC = (function (exports) {
4947
5178
  */
4948
5179
 
4949
5180
 
4950
- CE = /*#__PURE__*/function (_renderer$HTMLElement) {
4951
- _inherits(LWCUpgradableElement, _renderer$HTMLElement);
5181
+ CE = /*#__PURE__*/function (_HTMLElementExported$) {
5182
+ _inherits(LWCUpgradableElement, _HTMLElementExported$);
4952
5183
 
4953
5184
  var _super5 = _createSuper(LWCUpgradableElement);
4954
5185
 
@@ -4966,10 +5197,10 @@ var LWC = (function (exports) {
4966
5197
  return _this4;
4967
5198
  }
4968
5199
 
4969
- return LWCUpgradableElement;
4970
- }(renderer.HTMLElement);
5200
+ return _createClass(LWCUpgradableElement);
5201
+ }(HTMLElementExported$1);
4971
5202
 
4972
- renderer.defineCustomElement(tagName, CE);
5203
+ defineCustomElement$1(tagName, CE);
4973
5204
  return CE;
4974
5205
  }
4975
5206
  /*
@@ -4985,8 +5216,7 @@ var LWC = (function (exports) {
4985
5216
  var TextHook = {
4986
5217
  create: function create(vnode) {
4987
5218
  var owner = vnode.owner;
4988
- var renderer = owner.renderer;
4989
- var elm = renderer.createText(vnode.text);
5219
+ var elm = createText$1(vnode.text);
4990
5220
  linkNodeToShadow(elm, owner);
4991
5221
  vnode.elm = elm;
4992
5222
  },
@@ -5018,8 +5248,7 @@ var LWC = (function (exports) {
5018
5248
  create: function create(vnode) {
5019
5249
  var owner = vnode.owner,
5020
5250
  text = vnode.text;
5021
- var renderer = owner.renderer;
5022
- var elm = renderer.createComment(text);
5251
+ var elm = createComment$1(text);
5023
5252
  linkNodeToShadow(elm, owner);
5024
5253
  vnode.elm = elm;
5025
5254
  },
@@ -5057,9 +5286,8 @@ var LWC = (function (exports) {
5057
5286
  var sel = vnode.sel,
5058
5287
  owner = vnode.owner,
5059
5288
  svg = vnode.data.svg;
5060
- var renderer = owner.renderer;
5061
5289
  var namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
5062
- var elm = renderer.createElement(sel, namespace);
5290
+ var elm = createElement$2(sel, namespace);
5063
5291
  linkNodeToShadow(elm, owner);
5064
5292
  fallbackElmHook(elm, vnode);
5065
5293
  vnode.elm = elm;
@@ -5113,8 +5341,7 @@ var LWC = (function (exports) {
5113
5341
  create: function create(vnode) {
5114
5342
  var sel = vnode.sel,
5115
5343
  owner = vnode.owner;
5116
- var renderer = owner.renderer;
5117
- var UpgradableConstructor = getUpgradableConstructor(sel, renderer);
5344
+ var UpgradableConstructor = getUpgradableConstructor(sel);
5118
5345
  /**
5119
5346
  * Note: if the upgradable constructor does not expect, or throw when we new it
5120
5347
  * with a callback as the first argument, we could implement a more advanced
@@ -5205,8 +5432,7 @@ var LWC = (function (exports) {
5205
5432
  createVM(elm, def, {
5206
5433
  mode: mode,
5207
5434
  owner: owner,
5208
- tagName: sel,
5209
- renderer: owner.renderer
5435
+ tagName: sel
5210
5436
  });
5211
5437
  vnode.elm = elm;
5212
5438
  var vm = getAssociatedVM(elm);
@@ -5234,11 +5460,10 @@ var LWC = (function (exports) {
5234
5460
  };
5235
5461
 
5236
5462
  function linkNodeToShadow(elm, owner) {
5237
- var renderer = owner.renderer,
5238
- renderMode = owner.renderMode,
5463
+ var renderMode = owner.renderMode,
5239
5464
  shadowMode = owner.shadowMode; // TODO [#1164]: this should eventually be done by the polyfill directly
5240
5465
 
5241
- if (renderer.isSyntheticShadowDefined) {
5466
+ if (isSyntheticShadowDefined$1) {
5242
5467
  if (shadowMode === 1
5243
5468
  /* Synthetic */
5244
5469
  || renderMode === 0
@@ -5759,7 +5984,6 @@ var LWC = (function (exports) {
5759
5984
  function updateStylesheetToken(vm, template) {
5760
5985
  var elm = vm.elm,
5761
5986
  context = vm.context,
5762
- renderer = vm.renderer,
5763
5987
  renderMode = vm.renderMode,
5764
5988
  shadowMode = vm.shadowMode;
5765
5989
  var newStylesheets = template.stylesheets,
@@ -5779,11 +6003,11 @@ var LWC = (function (exports) {
5779
6003
  oldHasTokenInAttribute = context.hasTokenInAttribute;
5780
6004
 
5781
6005
  if (oldHasTokenInClass) {
5782
- renderer.getClassList(elm).remove(makeHostToken(oldToken));
6006
+ getClassList$1(elm).remove(makeHostToken(oldToken));
5783
6007
  }
5784
6008
 
5785
6009
  if (oldHasTokenInAttribute) {
5786
- renderer.removeAttribute(elm, makeHostToken(oldToken));
6010
+ removeAttribute$1(elm, makeHostToken(oldToken));
5787
6011
  } // Apply the new template styling token to the host element, if the new template has any
5788
6012
  // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
5789
6013
 
@@ -5795,12 +6019,12 @@ var LWC = (function (exports) {
5795
6019
 
5796
6020
  if (!isUndefined$1(newToken)) {
5797
6021
  if (hasScopedStyles) {
5798
- renderer.getClassList(elm).add(makeHostToken(newToken));
6022
+ getClassList$1(elm).add(makeHostToken(newToken));
5799
6023
  newHasTokenInClass = true;
5800
6024
  }
5801
6025
 
5802
6026
  if (isSyntheticShadow) {
5803
- renderer.setAttribute(elm, makeHostToken(newToken), '');
6027
+ setAttribute$1(elm, makeHostToken(newToken), '');
5804
6028
  newHasTokenInAttribute = true;
5805
6029
  }
5806
6030
  } // Update the styling tokens present on the context object.
@@ -5918,8 +6142,7 @@ var LWC = (function (exports) {
5918
6142
  }
5919
6143
 
5920
6144
  function createStylesheet(vm, stylesheets) {
5921
- var renderer = vm.renderer,
5922
- renderMode = vm.renderMode,
6145
+ var renderMode = vm.renderMode,
5923
6146
  shadowMode = vm.shadowMode;
5924
6147
 
5925
6148
  if (renderMode === 1
@@ -5928,9 +6151,9 @@ var LWC = (function (exports) {
5928
6151
  /* Synthetic */
5929
6152
  ) {
5930
6153
  for (var _i17 = 0; _i17 < stylesheets.length; _i17++) {
5931
- renderer.insertGlobalStylesheet(stylesheets[_i17]);
6154
+ insertGlobalStylesheet$1(stylesheets[_i17]);
5932
6155
  }
5933
- } else if (renderer.ssr || renderer.isHydrating()) {
6156
+ } else if (ssr$1 || isHydrating$1()) {
5934
6157
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
5935
6158
  // This works in the client, because the stylesheets are created, and cached in the VM
5936
6159
  // the first time the VM renders.
@@ -5944,10 +6167,10 @@ var LWC = (function (exports) {
5944
6167
 
5945
6168
  for (var _i18 = 0; _i18 < stylesheets.length; _i18++) {
5946
6169
  if (isGlobal) {
5947
- renderer.insertGlobalStylesheet(stylesheets[_i18]);
6170
+ insertGlobalStylesheet$1(stylesheets[_i18]);
5948
6171
  } else {
5949
6172
  // local level
5950
- renderer.insertStylesheet(stylesheets[_i18], root.cmpRoot);
6173
+ insertStylesheet$1(stylesheets[_i18], root.cmpRoot);
5951
6174
  }
5952
6175
  }
5953
6176
  }
@@ -6028,7 +6251,7 @@ var LWC = (function (exports) {
6028
6251
  if (isProfilerEnabled) {
6029
6252
  currentDispatcher(opId, 0
6030
6253
  /* Start */
6031
- , vm.tagName, vm.idx);
6254
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6032
6255
  }
6033
6256
  }
6034
6257
 
@@ -6042,7 +6265,7 @@ var LWC = (function (exports) {
6042
6265
  if (isProfilerEnabled) {
6043
6266
  currentDispatcher(opId, 1
6044
6267
  /* Stop */
6045
- , vm.tagName, vm.idx);
6268
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6046
6269
  }
6047
6270
  }
6048
6271
 
@@ -6056,7 +6279,7 @@ var LWC = (function (exports) {
6056
6279
  if (isProfilerEnabled) {
6057
6280
  currentDispatcher(opId, 0
6058
6281
  /* Start */
6059
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6282
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
6060
6283
  }
6061
6284
  }
6062
6285
 
@@ -6070,7 +6293,7 @@ var LWC = (function (exports) {
6070
6293
  if (isProfilerEnabled) {
6071
6294
  currentDispatcher(opId, 1
6072
6295
  /* Stop */
6073
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6296
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
6074
6297
  }
6075
6298
  }
6076
6299
  /*
@@ -6609,7 +6832,6 @@ var LWC = (function (exports) {
6609
6832
  function createVM(elm, def, options) {
6610
6833
  var mode = options.mode,
6611
6834
  owner = options.owner,
6612
- renderer = options.renderer,
6613
6835
  tagName = options.tagName;
6614
6836
  var vm = {
6615
6837
  elm: elm,
@@ -6623,7 +6845,6 @@ var LWC = (function (exports) {
6623
6845
  tagName: tagName,
6624
6846
  mode: mode,
6625
6847
  owner: owner,
6626
- renderer: renderer,
6627
6848
  children: EmptyArray,
6628
6849
  aChildren: EmptyArray,
6629
6850
  velements: EmptyArray,
@@ -6677,13 +6898,10 @@ var LWC = (function (exports) {
6677
6898
  }
6678
6899
 
6679
6900
  function computeShadowMode(vm) {
6680
- var def = vm.def,
6681
- renderer = vm.renderer;
6682
- var isNativeShadowDefined = renderer.isNativeShadowDefined,
6683
- isSyntheticShadowDefined = renderer.isSyntheticShadowDefined;
6901
+ var def = vm.def;
6684
6902
  var shadowMode;
6685
6903
 
6686
- if (isSyntheticShadowDefined) {
6904
+ if (isSyntheticShadowDefined$1) {
6687
6905
  if (def.renderMode === 0
6688
6906
  /* Light */
6689
6907
  ) {
@@ -6692,7 +6910,7 @@ var LWC = (function (exports) {
6692
6910
  shadowMode = 0
6693
6911
  /* Native */
6694
6912
  ;
6695
- } else if (isNativeShadowDefined) {
6913
+ } else if (isNativeShadowDefined$1) {
6696
6914
  if (def.shadowSupportMode === "any"
6697
6915
  /* Any */
6698
6916
  ) {
@@ -6829,10 +7047,9 @@ var LWC = (function (exports) {
6829
7047
  }
6830
7048
 
6831
7049
  function runRenderedCallback(vm) {
6832
- var renderer = vm.renderer,
6833
- renderedCallback = vm.def.renderedCallback;
7050
+ var renderedCallback = vm.def.renderedCallback;
6834
7051
 
6835
- if (isTrue(renderer.ssr)) {
7052
+ if (isTrue(ssr$1)) {
6836
7053
  return;
6837
7054
  }
6838
7055
 
@@ -7041,15 +7258,14 @@ var LWC = (function (exports) {
7041
7258
 
7042
7259
 
7043
7260
  function resetComponentRoot(vm) {
7044
- var children = vm.children,
7045
- renderer = vm.renderer;
7261
+ var children = vm.children;
7046
7262
  var rootNode = getRenderRoot(vm);
7047
7263
 
7048
7264
  for (var _i25 = 0, _len9 = children.length; _i25 < _len9; _i25++) {
7049
7265
  var child = children[_i25];
7050
7266
 
7051
7267
  if (!isNull(child) && !isUndefined$1(child.elm)) {
7052
- renderer.remove(child.elm, rootNode);
7268
+ remove$1(child.elm, rootNode);
7053
7269
  }
7054
7270
  }
7055
7271
 
@@ -7059,7 +7275,7 @@ var LWC = (function (exports) {
7059
7275
  }
7060
7276
 
7061
7277
  function scheduleRehydration(vm) {
7062
- if (isTrue(vm.renderer.ssr) || isTrue(vm.isScheduled)) {
7278
+ if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
7063
7279
  return;
7064
7280
  }
7065
7281
 
@@ -7242,7 +7458,7 @@ var LWC = (function (exports) {
7242
7458
  return _this5;
7243
7459
  }
7244
7460
 
7245
- return WireContextRegistrationEvent;
7461
+ return _createClass(WireContextRegistrationEvent);
7246
7462
  }( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
7247
7463
 
7248
7464
  function createFieldDataCallback(vm, name) {
@@ -7309,7 +7525,6 @@ var LWC = (function (exports) {
7309
7525
  }
7310
7526
 
7311
7527
  var elm = vm.elm,
7312
- renderer = vm.renderer,
7313
7528
  _vm$context = vm.context,
7314
7529
  wiredConnecting = _vm$context.wiredConnecting,
7315
7530
  wiredDisconnecting = _vm$context.wiredDisconnecting; // waiting for the component to be connected to formally request the context via the token
@@ -7332,7 +7547,7 @@ var LWC = (function (exports) {
7332
7547
  ArrayPush$1.call(wiredDisconnecting, disconnectCallback);
7333
7548
  }
7334
7549
  });
7335
- renderer.dispatchEvent(elm, contextRegistrationEvent);
7550
+ dispatchEvent$1(elm, contextRegistrationEvent);
7336
7551
  });
7337
7552
  }
7338
7553
 
@@ -7586,7 +7801,7 @@ var LWC = (function (exports) {
7586
7801
  hooksAreSet = true;
7587
7802
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
7588
7803
  }
7589
- /* version: 2.6.1 */
7804
+ /* version: 2.7.2 */
7590
7805
 
7591
7806
  /*
7592
7807
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7616,7 +7831,9 @@ var LWC = (function (exports) {
7616
7831
  var styleElements = create(null);
7617
7832
  var styleSheets = create(null);
7618
7833
  var nodesToStyleSheets = new WeakMap();
7619
- var getCustomElement, defineCustomElement, HTMLElementConstructor;
7834
+ var getCustomElement;
7835
+ var defineCustomElement;
7836
+ var HTMLElementConstructor;
7620
7837
 
7621
7838
  function isCustomElementRegistryAvailable() {
7622
7839
  if (typeof customElements === 'undefined') {
@@ -7643,7 +7860,7 @@ var LWC = (function (exports) {
7643
7860
  return _super7.apply(this, arguments);
7644
7861
  }
7645
7862
 
7646
- return clazz;
7863
+ return _createClass(clazz);
7647
7864
  }(HTMLElementAlias);
7648
7865
 
7649
7866
  customElements.define('lwc-test-' + Math.floor(Math.random() * 1000000), clazz);
@@ -7741,152 +7958,231 @@ var LWC = (function (exports) {
7741
7958
  HTMLElementConstructor.prototype = HTMLElement.prototype;
7742
7959
  }
7743
7960
 
7744
- var _isHydrating = false;
7961
+ var hydrating = false;
7745
7962
 
7746
- function setIsHydrating(v) {
7747
- _isHydrating = v;
7963
+ function setIsHydrating(value) {
7964
+ hydrating = value;
7748
7965
  }
7749
7966
 
7750
- var renderer = {
7751
- ssr: false,
7752
- isHydrating: function isHydrating() {
7753
- return _isHydrating;
7754
- },
7755
- isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
7756
- isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
7757
- createElement: function createElement(tagName, namespace) {
7758
- return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
7759
- },
7760
- createText: function createText(content) {
7761
- return document.createTextNode(content);
7762
- },
7763
- createComment: function createComment(content) {
7764
- return document.createComment(content);
7765
- },
7766
- insert: function insert(node, parent, anchor) {
7767
- parent.insertBefore(node, anchor);
7768
- },
7769
- remove: function remove(node, parent) {
7770
- parent.removeChild(node);
7771
- },
7772
- nextSibling: function nextSibling(node) {
7773
- return node.nextSibling;
7774
- },
7775
- attachShadow: function attachShadow(element, options) {
7776
- if (_isHydrating) {
7777
- return element.shadowRoot;
7778
- }
7967
+ var ssr = false;
7779
7968
 
7780
- return element.attachShadow(options);
7781
- },
7782
- setText: function setText(node, content) {
7783
- node.nodeValue = content;
7784
- },
7785
- getProperty: function getProperty(node, key) {
7786
- return node[key];
7787
- },
7788
- setProperty: function setProperty(node, key, value) {
7789
- if (process.env.NODE_ENV !== 'production') {
7790
- if (node instanceof Element && !(key in node)) {
7791
- // TODO [#1297]: Move this validation to the compiler
7792
- assert.fail("Unknown public property \"".concat(key, "\" of element <").concat(node.tagName, ">. This is likely a typo on the corresponding attribute \"").concat(htmlPropertyToAttribute(key), "\"."));
7793
- }
7794
- }
7969
+ function isHydrating() {
7970
+ return hydrating;
7971
+ }
7795
7972
 
7796
- node[key] = value;
7797
- },
7798
- getAttribute: function getAttribute(element, name, namespace) {
7799
- return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
7800
- },
7801
- setAttribute: function setAttribute(element, name, value, namespace) {
7802
- return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
7803
- },
7804
- removeAttribute: function removeAttribute(element, name, namespace) {
7805
- if (isUndefined$1(namespace)) {
7806
- element.removeAttribute(name);
7807
- } else {
7808
- element.removeAttributeNS(namespace, name);
7809
- }
7810
- },
7811
- addEventListener: function addEventListener(target, type, callback, options) {
7812
- target.addEventListener(type, callback, options);
7813
- },
7814
- removeEventListener: function removeEventListener(target, type, callback, options) {
7815
- target.removeEventListener(type, callback, options);
7816
- },
7817
- dispatchEvent: function dispatchEvent(target, event) {
7818
- return target.dispatchEvent(event);
7819
- },
7820
- getClassList: function getClassList(element) {
7821
- return element.classList;
7822
- },
7823
- setCSSStyleProperty: function setCSSStyleProperty(element, name, value, important) {
7824
- // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
7825
- // represent elements in the engine?
7826
- element.style.setProperty(name, value, important ? 'important' : '');
7827
- },
7828
- getBoundingClientRect: function getBoundingClientRect(element) {
7829
- return element.getBoundingClientRect();
7830
- },
7831
- querySelector: function querySelector(element, selectors) {
7832
- return element.querySelector(selectors);
7833
- },
7834
- querySelectorAll: function querySelectorAll(element, selectors) {
7835
- return element.querySelectorAll(selectors);
7836
- },
7837
- getElementsByTagName: function getElementsByTagName(element, tagNameOrWildCard) {
7838
- return element.getElementsByTagName(tagNameOrWildCard);
7839
- },
7840
- getElementsByClassName: function getElementsByClassName(element, names) {
7841
- return element.getElementsByClassName(names);
7842
- },
7843
- getChildren: function getChildren(element) {
7844
- return element.children;
7845
- },
7846
- getChildNodes: function getChildNodes(element) {
7847
- return element.childNodes;
7848
- },
7849
- getFirstChild: function getFirstChild(element) {
7850
- return element.firstChild;
7851
- },
7852
- getFirstElementChild: function getFirstElementChild(element) {
7853
- return element.firstElementChild;
7854
- },
7855
- getLastChild: function getLastChild(element) {
7856
- return element.lastChild;
7857
- },
7858
- getLastElementChild: function getLastElementChild(element) {
7859
- return element.lastElementChild;
7860
- },
7861
- isConnected: function isConnected(node) {
7862
- return node.isConnected;
7863
- },
7864
- insertGlobalStylesheet: function insertGlobalStylesheet(content) {
7865
- if (!isUndefined$1(globalStylesheets[content])) {
7866
- return;
7867
- }
7973
+ var isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
7974
+ var isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
7868
7975
 
7869
- globalStylesheets[content] = true;
7870
- var elm = document.createElement('style');
7871
- elm.type = 'text/css';
7872
- elm.textContent = content;
7873
- globalStylesheetsParentElement.appendChild(elm);
7874
- },
7875
- insertStylesheet: function insertStylesheet(content, target) {
7876
- if (supportsConstructableStyleSheets) {
7877
- insertConstructableStyleSheet(content, target);
7878
- } else {
7879
- // Fall back to <style> element
7880
- insertStyleElement(content, target);
7976
+ function createElement$1(tagName, namespace) {
7977
+ return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
7978
+ }
7979
+
7980
+ function createText(content) {
7981
+ return document.createTextNode(content);
7982
+ }
7983
+
7984
+ function createComment(content) {
7985
+ return document.createComment(content);
7986
+ }
7987
+
7988
+ function insert(node, parent, anchor) {
7989
+ parent.insertBefore(node, anchor);
7990
+ }
7991
+
7992
+ function remove(node, parent) {
7993
+ parent.removeChild(node);
7994
+ }
7995
+
7996
+ function nextSibling(node) {
7997
+ return node.nextSibling;
7998
+ }
7999
+
8000
+ function attachShadow(element, options) {
8001
+ if (hydrating) {
8002
+ return element.shadowRoot;
8003
+ }
8004
+
8005
+ return element.attachShadow(options);
8006
+ }
8007
+
8008
+ function setText(node, content) {
8009
+ node.nodeValue = content;
8010
+ }
8011
+
8012
+ function getProperty(node, key) {
8013
+ return node[key];
8014
+ }
8015
+
8016
+ function setProperty(node, key, value) {
8017
+ if (process.env.NODE_ENV !== 'production') {
8018
+ if (node instanceof Element && !(key in node)) {
8019
+ // TODO [#1297]: Move this validation to the compiler
8020
+ assert.fail("Unknown public property \"".concat(key, "\" of element <").concat(node.tagName, ">. This is likely a typo on the corresponding attribute \"").concat(htmlPropertyToAttribute(key), "\"."));
7881
8021
  }
7882
- },
7883
- assertInstanceOfHTMLElement: function assertInstanceOfHTMLElement(elm, msg) {
7884
- assert.invariant(elm instanceof HTMLElement, msg);
7885
- },
7886
- defineCustomElement: defineCustomElement,
7887
- getCustomElement: getCustomElement,
7888
- HTMLElement: HTMLElementConstructor
7889
- };
8022
+ }
8023
+
8024
+ node[key] = value;
8025
+ }
8026
+
8027
+ function getAttribute(element, name, namespace) {
8028
+ return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
8029
+ }
8030
+
8031
+ function setAttribute(element, name, value, namespace) {
8032
+ return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
8033
+ }
8034
+
8035
+ function removeAttribute(element, name, namespace) {
8036
+ if (isUndefined$1(namespace)) {
8037
+ element.removeAttribute(name);
8038
+ } else {
8039
+ element.removeAttributeNS(namespace, name);
8040
+ }
8041
+ }
8042
+
8043
+ function addEventListener(target, type, callback, options) {
8044
+ target.addEventListener(type, callback, options);
8045
+ }
8046
+
8047
+ function removeEventListener(target, type, callback, options) {
8048
+ target.removeEventListener(type, callback, options);
8049
+ }
8050
+
8051
+ function dispatchEvent(target, event) {
8052
+ return target.dispatchEvent(event);
8053
+ }
8054
+
8055
+ function getClassList(element) {
8056
+ return element.classList;
8057
+ }
8058
+
8059
+ function setCSSStyleProperty(element, name, value, important) {
8060
+ // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
8061
+ // represent elements in the engine?
8062
+ element.style.setProperty(name, value, important ? 'important' : '');
8063
+ }
8064
+
8065
+ function getBoundingClientRect(element) {
8066
+ return element.getBoundingClientRect();
8067
+ }
8068
+
8069
+ function querySelector(element, selectors) {
8070
+ return element.querySelector(selectors);
8071
+ }
8072
+
8073
+ function querySelectorAll(element, selectors) {
8074
+ return element.querySelectorAll(selectors);
8075
+ }
8076
+
8077
+ function getElementsByTagName(element, tagNameOrWildCard) {
8078
+ return element.getElementsByTagName(tagNameOrWildCard);
8079
+ }
8080
+
8081
+ function getElementsByClassName(element, names) {
8082
+ return element.getElementsByClassName(names);
8083
+ }
8084
+
8085
+ function getChildren(element) {
8086
+ return element.children;
8087
+ }
8088
+
8089
+ function getChildNodes(element) {
8090
+ return element.childNodes;
8091
+ }
8092
+
8093
+ function getFirstChild(element) {
8094
+ return element.firstChild;
8095
+ }
8096
+
8097
+ function getFirstElementChild(element) {
8098
+ return element.firstElementChild;
8099
+ }
8100
+
8101
+ function getLastChild(element) {
8102
+ return element.lastChild;
8103
+ }
8104
+
8105
+ function getLastElementChild(element) {
8106
+ return element.lastElementChild;
8107
+ }
8108
+
8109
+ function isConnected(node) {
8110
+ return node.isConnected;
8111
+ }
8112
+
8113
+ function insertGlobalStylesheet(content) {
8114
+ if (!isUndefined$1(globalStylesheets[content])) {
8115
+ return;
8116
+ }
8117
+
8118
+ globalStylesheets[content] = true;
8119
+ var elm = document.createElement('style');
8120
+ elm.type = 'text/css';
8121
+ elm.textContent = content;
8122
+ globalStylesheetsParentElement.appendChild(elm);
8123
+ }
8124
+
8125
+ function insertStylesheet(content, target) {
8126
+ if (supportsConstructableStyleSheets) {
8127
+ insertConstructableStyleSheet(content, target);
8128
+ } else {
8129
+ // Fall back to <style> element
8130
+ insertStyleElement(content, target);
8131
+ }
8132
+ }
8133
+
8134
+ function assertInstanceOfHTMLElement(elm, msg) {
8135
+ assert.invariant(elm instanceof HTMLElement, msg);
8136
+ }
8137
+
8138
+ var HTMLElementExported = HTMLElementConstructor;
8139
+ /*
8140
+ * Copyright (c) 2020, salesforce.com, inc.
8141
+ * All rights reserved.
8142
+ * SPDX-License-Identifier: MIT
8143
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
8144
+ */
8145
+
8146
+ setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElement);
8147
+ setAttachShadow(attachShadow);
8148
+ setCreateComment(createComment);
8149
+ setCreateElement(createElement$1);
8150
+ setCreateText(createText);
8151
+ setDefineCustomElement(defineCustomElement);
8152
+ setDispatchEvent(dispatchEvent);
8153
+ setGetAttribute(getAttribute);
8154
+ setGetBoundingClientRect(getBoundingClientRect);
8155
+ setGetChildNodes(getChildNodes);
8156
+ setGetChildren(getChildren);
8157
+ setGetClassList(getClassList);
8158
+ setGetCustomElement(getCustomElement);
8159
+ setGetElementsByClassName(getElementsByClassName);
8160
+ setGetElementsByTagName(getElementsByTagName);
8161
+ setGetFirstChild(getFirstChild);
8162
+ setGetFirstElementChild(getFirstElementChild);
8163
+ setGetLastChild(getLastChild);
8164
+ setGetLastElementChild(getLastElementChild);
8165
+ setGetProperty(getProperty);
8166
+ setHTMLElement(HTMLElementExported);
8167
+ setInsert(insert);
8168
+ setInsertGlobalStylesheet(insertGlobalStylesheet);
8169
+ setInsertStylesheet(insertStylesheet);
8170
+ setIsConnected(isConnected);
8171
+ setIsHydrating$1(isHydrating);
8172
+ setIsNativeShadowDefined(isNativeShadowDefined);
8173
+ setIsSyntheticShadowDefined(isSyntheticShadowDefined);
8174
+ setNextSibling(nextSibling);
8175
+ setQuerySelector(querySelector);
8176
+ setQuerySelectorAll(querySelectorAll);
8177
+ setRemove(remove);
8178
+ setRemoveAttribute(removeAttribute);
8179
+ setRemoveEventListener(removeEventListener);
8180
+ setSetAttribute(setAttribute);
8181
+ setSetCSSStyleProperty(setCSSStyleProperty);
8182
+ setSetProperty(setProperty);
8183
+ setSetText(setText);
8184
+ setSsr(ssr);
8185
+ setAddEventListener(addEventListener);
7890
8186
  /*
7891
8187
  * Copyright (c) 2018, salesforce.com, inc.
7892
8188
  * All rights reserved.
@@ -7968,7 +8264,7 @@ var LWC = (function (exports) {
7968
8264
  throw new TypeError("\"createElement\" function expects an \"is\" option with a valid component constructor.");
7969
8265
  }
7970
8266
 
7971
- var UpgradableConstructor = getUpgradableConstructor(sel, renderer);
8267
+ var UpgradableConstructor = getUpgradableConstructor(sel);
7972
8268
  var wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
7973
8269
 
7974
8270
  /**
@@ -7983,8 +8279,7 @@ var LWC = (function (exports) {
7983
8279
  createVM(elm, def, {
7984
8280
  tagName: sel,
7985
8281
  mode: options.mode !== 'closed' ? 'open' : 'closed',
7986
- owner: null,
7987
- renderer: renderer
8282
+ owner: null
7988
8283
  });
7989
8284
  ConnectingSlot.set(elm, connectRootElement);
7990
8285
  DisconnectingSlot.set(elm, disconnectRootElement);
@@ -8009,6 +8304,10 @@ var LWC = (function (exports) {
8009
8304
  function hydrateComponent(element, Ctor) {
8010
8305
  var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8011
8306
 
8307
+ if (!(element instanceof Element)) {
8308
+ throw new TypeError("\"hydrateComponent\" expects a valid DOM element as the first parameter but instead received ".concat(element, "."));
8309
+ }
8310
+
8012
8311
  if (!isFunction$1(Ctor)) {
8013
8312
  throw new TypeError("\"hydrateComponent\" expects a valid component constructor as the second parameter but instead received ".concat(Ctor, "."));
8014
8313
  }
@@ -8026,7 +8325,6 @@ var LWC = (function (exports) {
8026
8325
  createVM(element, def, {
8027
8326
  mode: 'open',
8028
8327
  owner: null,
8029
- renderer: renderer,
8030
8328
  tagName: element.tagName.toLowerCase()
8031
8329
  });
8032
8330
 
@@ -8113,8 +8411,7 @@ var LWC = (function (exports) {
8113
8411
  createVM(_assertThisInitialized(_this6), def, {
8114
8412
  mode: 'open',
8115
8413
  owner: null,
8116
- tagName: _this6.tagName,
8117
- renderer: renderer
8414
+ tagName: _this6.tagName
8118
8415
  });
8119
8416
  return _this6;
8120
8417
  }
@@ -8187,7 +8484,7 @@ var LWC = (function (exports) {
8187
8484
  return false;
8188
8485
  }
8189
8486
 
8190
- if (renderer.isSyntheticShadowDefined) {
8487
+ if (isSyntheticShadowDefined) {
8191
8488
  // TODO [#1252]: old behavior that is still used by some pieces of the platform,
8192
8489
  // specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
8193
8490
  // used, will be considered global elements.
@@ -8239,7 +8536,7 @@ var LWC = (function (exports) {
8239
8536
  });
8240
8537
  freeze(LightningElement);
8241
8538
  seal(LightningElement.prototype);
8242
- /* version: 2.6.1 */
8539
+ /* version: 2.7.2 */
8243
8540
 
8244
8541
  exports.LightningElement = LightningElement;
8245
8542
  exports.__unstable__ProfilerControl = profilerControl;