lwc 2.6.2 → 2.6.3

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 +578 -384
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +578 -384
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +552 -360
  5. package/dist/engine-dom/iife/es5/engine-dom.js +630 -335
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +598 -311
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +578 -384
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +552 -360
  11. package/dist/engine-dom/umd/es5/engine-dom.js +630 -335
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +598 -311
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +647 -454
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
  16. package/dist/engine-server/esm/es2017/engine-server.js +647 -454
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +115 -13
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +115 -13
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +115 -13
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +119 -13
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +119 -13
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +115 -13
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +115 -13
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +119 -13
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +119 -13
  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 +3 -3
  34. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  35. package/dist/wire-service/iife/es5/wire-service_debug.js +3 -3
  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 +3 -3
  39. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  40. package/dist/wire-service/umd/es5/wire-service_debug.js +3 -3
  41. package/package.json +8 -8
@@ -299,7 +299,7 @@ function htmlPropertyToAttribute(propName) {
299
299
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
300
300
  return attributeName;
301
301
  }
302
- /** version: 2.6.2 */
302
+ /** version: 2.6.3 */
303
303
 
304
304
  /*
305
305
  * Copyright (c) 2018, salesforce.com, inc.
@@ -413,7 +413,6 @@ const features = {
413
413
  ENABLE_NODE_LIST_PATCH: null,
414
414
  ENABLE_HTML_COLLECTIONS_PATCH: null,
415
415
  ENABLE_NODE_PATCH: null,
416
- ENABLE_MIXED_SHADOW_MODE: null,
417
416
  ENABLE_WIRE_SYNC_EMIT: null
418
417
  };
419
418
 
@@ -478,7 +477,7 @@ function setFeatureFlagForTest(name, value) {
478
477
  setFeatureFlag(name, value);
479
478
  }
480
479
  }
481
- /** version: 2.6.2 */
480
+ /** version: 2.6.3 */
482
481
 
483
482
  /* proxy-compat-disable */
484
483
 
@@ -552,6 +551,249 @@ function parseStyleText(cssText) {
552
551
  }
553
552
 
554
553
  return styleMap;
554
+ } //
555
+ // Primitives
556
+ //
557
+
558
+
559
+ let ssr$1;
560
+
561
+ function setSsr(ssrImpl) {
562
+ ssr$1 = ssrImpl;
563
+ }
564
+
565
+ let isNativeShadowDefined$1;
566
+
567
+ function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
568
+ isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
569
+ }
570
+
571
+ let isSyntheticShadowDefined$1;
572
+
573
+ function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
574
+ isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
575
+ }
576
+
577
+ let HTMLElementExported$1;
578
+
579
+ function setHTMLElement(HTMLElementImpl) {
580
+ HTMLElementExported$1 = HTMLElementImpl;
581
+ }
582
+
583
+ let isHydrating$1;
584
+
585
+ function setIsHydrating$1(isHydratingImpl) {
586
+ isHydrating$1 = isHydratingImpl;
587
+ }
588
+
589
+ let insert$1;
590
+
591
+ function setInsert(insertImpl) {
592
+ insert$1 = insertImpl;
593
+ }
594
+
595
+ let remove$1;
596
+
597
+ function setRemove(removeImpl) {
598
+ remove$1 = removeImpl;
599
+ }
600
+
601
+ let createElement$2;
602
+
603
+ function setCreateElement(createElementImpl) {
604
+ createElement$2 = createElementImpl;
605
+ }
606
+
607
+ let createText$1;
608
+
609
+ function setCreateText(createTextImpl) {
610
+ createText$1 = createTextImpl;
611
+ }
612
+
613
+ let createComment$1;
614
+
615
+ function setCreateComment(createCommentImpl) {
616
+ createComment$1 = createCommentImpl;
617
+ }
618
+
619
+ let nextSibling$1;
620
+
621
+ function setNextSibling(nextSiblingImpl) {
622
+ nextSibling$1 = nextSiblingImpl;
623
+ }
624
+
625
+ let attachShadow$1;
626
+
627
+ function setAttachShadow(attachShadowImpl) {
628
+ attachShadow$1 = attachShadowImpl;
629
+ }
630
+
631
+ let getProperty$1;
632
+
633
+ function setGetProperty(getPropertyImpl) {
634
+ getProperty$1 = getPropertyImpl;
635
+ }
636
+
637
+ let setProperty$1;
638
+
639
+ function setSetProperty(setPropertyImpl) {
640
+ setProperty$1 = setPropertyImpl;
641
+ }
642
+
643
+ let setText$1;
644
+
645
+ function setSetText(setTextImpl) {
646
+ setText$1 = setTextImpl;
647
+ }
648
+
649
+ let getAttribute$1;
650
+
651
+ function setGetAttribute(getAttributeImpl) {
652
+ getAttribute$1 = getAttributeImpl;
653
+ }
654
+
655
+ let setAttribute$1;
656
+
657
+ function setSetAttribute(setAttributeImpl) {
658
+ setAttribute$1 = setAttributeImpl;
659
+ }
660
+
661
+ let removeAttribute$1;
662
+
663
+ function setRemoveAttribute(removeAttributeImpl) {
664
+ removeAttribute$1 = removeAttributeImpl;
665
+ }
666
+
667
+ let addEventListener$1;
668
+
669
+ function setAddEventListener(addEventListenerImpl) {
670
+ addEventListener$1 = addEventListenerImpl;
671
+ }
672
+
673
+ let removeEventListener$1;
674
+
675
+ function setRemoveEventListener(removeEventListenerImpl) {
676
+ removeEventListener$1 = removeEventListenerImpl;
677
+ }
678
+
679
+ let dispatchEvent$1;
680
+
681
+ function setDispatchEvent(dispatchEventImpl) {
682
+ dispatchEvent$1 = dispatchEventImpl;
683
+ }
684
+
685
+ let getClassList$1;
686
+
687
+ function setGetClassList(getClassListImpl) {
688
+ getClassList$1 = getClassListImpl;
689
+ }
690
+
691
+ let setCSSStyleProperty$1;
692
+
693
+ function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
694
+ setCSSStyleProperty$1 = setCSSStylePropertyImpl;
695
+ }
696
+
697
+ let getBoundingClientRect$1;
698
+
699
+ function setGetBoundingClientRect(getBoundingClientRectImpl) {
700
+ getBoundingClientRect$1 = getBoundingClientRectImpl;
701
+ }
702
+
703
+ let querySelector$1;
704
+
705
+ function setQuerySelector(querySelectorImpl) {
706
+ querySelector$1 = querySelectorImpl;
707
+ }
708
+
709
+ let querySelectorAll$1;
710
+
711
+ function setQuerySelectorAll(querySelectorAllImpl) {
712
+ querySelectorAll$1 = querySelectorAllImpl;
713
+ }
714
+
715
+ let getElementsByTagName$1;
716
+
717
+ function setGetElementsByTagName(getElementsByTagNameImpl) {
718
+ getElementsByTagName$1 = getElementsByTagNameImpl;
719
+ }
720
+
721
+ let getElementsByClassName$1;
722
+
723
+ function setGetElementsByClassName(getElementsByClassNameImpl) {
724
+ getElementsByClassName$1 = getElementsByClassNameImpl;
725
+ }
726
+
727
+ let getChildren$1;
728
+
729
+ function setGetChildren(getChildrenImpl) {
730
+ getChildren$1 = getChildrenImpl;
731
+ }
732
+
733
+ let getChildNodes$1;
734
+
735
+ function setGetChildNodes(getChildNodesImpl) {
736
+ getChildNodes$1 = getChildNodesImpl;
737
+ }
738
+
739
+ let getFirstChild$1;
740
+
741
+ function setGetFirstChild(getFirstChildImpl) {
742
+ getFirstChild$1 = getFirstChildImpl;
743
+ }
744
+
745
+ let getFirstElementChild$1;
746
+
747
+ function setGetFirstElementChild(getFirstElementChildImpl) {
748
+ getFirstElementChild$1 = getFirstElementChildImpl;
749
+ }
750
+
751
+ let getLastChild$1;
752
+
753
+ function setGetLastChild(getLastChildImpl) {
754
+ getLastChild$1 = getLastChildImpl;
755
+ }
756
+
757
+ let getLastElementChild$1;
758
+
759
+ function setGetLastElementChild(getLastElementChildImpl) {
760
+ getLastElementChild$1 = getLastElementChildImpl;
761
+ }
762
+
763
+ let isConnected$1;
764
+
765
+ function setIsConnected(isConnectedImpl) {
766
+ isConnected$1 = isConnectedImpl;
767
+ }
768
+
769
+ let insertGlobalStylesheet$1;
770
+
771
+ function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
772
+ insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
773
+ }
774
+
775
+ let insertStylesheet$1;
776
+
777
+ function setInsertStylesheet(insertStylesheetImpl) {
778
+ insertStylesheet$1 = insertStylesheetImpl;
779
+ }
780
+
781
+ let assertInstanceOfHTMLElement$1;
782
+
783
+ function setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElementImpl) {
784
+ assertInstanceOfHTMLElement$1 = assertInstanceOfHTMLElementImpl;
785
+ }
786
+
787
+ let defineCustomElement$1;
788
+
789
+ function setDefineCustomElement(defineCustomElementImpl) {
790
+ defineCustomElement$1 = defineCustomElementImpl;
791
+ }
792
+
793
+ let getCustomElement$1;
794
+
795
+ function setGetCustomElement(getCustomElementImpl) {
796
+ getCustomElement$1 = getCustomElementImpl;
555
797
  }
556
798
  /*
557
799
  * Copyright (c) 2019, salesforce.com, inc.
@@ -805,9 +1047,6 @@ function createAllEventListeners(vnode) {
805
1047
  elm,
806
1048
  data: {
807
1049
  on
808
- },
809
- owner: {
810
- renderer
811
1050
  }
812
1051
  } = vnode;
813
1052
 
@@ -820,7 +1059,7 @@ function createAllEventListeners(vnode) {
820
1059
  let name;
821
1060
 
822
1061
  for (name in on) {
823
- renderer.addEventListener(elm, name, listener);
1062
+ addEventListener$1(elm, name, listener);
824
1063
  }
825
1064
  }
826
1065
 
@@ -962,9 +1201,6 @@ function updateAttrs(oldVnode, vnode) {
962
1201
  const {
963
1202
  data: {
964
1203
  attrs
965
- },
966
- owner: {
967
- renderer
968
1204
  }
969
1205
  } = vnode;
970
1206
 
@@ -987,10 +1223,6 @@ function updateAttrs(oldVnode, vnode) {
987
1223
  }
988
1224
 
989
1225
  const elm = vnode.elm;
990
- const {
991
- setAttribute,
992
- removeAttribute
993
- } = renderer;
994
1226
  let key;
995
1227
  oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
996
1228
  // this routine is only useful for data-* attributes in all kind of elements
@@ -1005,14 +1237,14 @@ function updateAttrs(oldVnode, vnode) {
1005
1237
 
1006
1238
  if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
1007
1239
  // Assume xml namespace
1008
- setAttribute(elm, key, cur, xmlNS);
1240
+ setAttribute$1(elm, key, cur, xmlNS);
1009
1241
  } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
1010
1242
  // Assume xlink namespace
1011
- setAttribute(elm, key, cur, xlinkNS);
1012
- } else if (isNull(cur)) {
1013
- removeAttribute(elm, key);
1243
+ setAttribute$1(elm, key, cur, xlinkNS);
1244
+ } else if (isNull(cur) || isUndefined$1(cur)) {
1245
+ removeAttribute$1(elm, key);
1014
1246
  } else {
1015
- setAttribute(elm, key, cur);
1247
+ setAttribute$1(elm, key, cur);
1016
1248
  }
1017
1249
 
1018
1250
  lockAttribute();
@@ -1060,17 +1292,14 @@ function update(oldVnode, vnode) {
1060
1292
  const isFirstPatch = isUndefined$1(oldProps);
1061
1293
  const {
1062
1294
  elm,
1063
- sel,
1064
- owner: {
1065
- renderer
1066
- }
1295
+ sel
1067
1296
  } = vnode;
1068
1297
 
1069
1298
  for (const key in props) {
1070
1299
  const cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
1071
1300
 
1072
- if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? renderer.getProperty(elm, key) : oldProps[key])) {
1073
- renderer.setProperty(elm, key, cur);
1301
+ if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
1302
+ setProperty$1(elm, key, cur);
1074
1303
  }
1075
1304
  }
1076
1305
  }
@@ -1139,9 +1368,6 @@ function updateClassAttribute(oldVnode, vnode) {
1139
1368
  elm,
1140
1369
  data: {
1141
1370
  className: newClass
1142
- },
1143
- owner: {
1144
- renderer
1145
1371
  }
1146
1372
  } = vnode;
1147
1373
  const {
@@ -1154,7 +1380,7 @@ function updateClassAttribute(oldVnode, vnode) {
1154
1380
  return;
1155
1381
  }
1156
1382
 
1157
- const classList = renderer.getClassList(elm);
1383
+ const classList = getClassList$1(elm);
1158
1384
  const newClassMap = getMapFromClassName(newClass);
1159
1385
  const oldClassMap = getMapFromClassName(oldClass);
1160
1386
  let name;
@@ -1192,24 +1418,17 @@ function updateStyleAttribute(oldVnode, vnode) {
1192
1418
  elm,
1193
1419
  data: {
1194
1420
  style: newStyle
1195
- },
1196
- owner: {
1197
- renderer
1198
1421
  }
1199
1422
  } = vnode;
1200
- const {
1201
- setAttribute,
1202
- removeAttribute
1203
- } = renderer;
1204
1423
 
1205
1424
  if (oldVnode.data.style === newStyle) {
1206
1425
  return;
1207
1426
  }
1208
1427
 
1209
1428
  if (!isString(newStyle) || newStyle === '') {
1210
- removeAttribute(elm, 'style');
1429
+ removeAttribute$1(elm, 'style');
1211
1430
  } else {
1212
- setAttribute(elm, 'style', newStyle);
1431
+ setAttribute$1(elm, 'style', newStyle);
1213
1432
  }
1214
1433
  }
1215
1434
 
@@ -1234,9 +1453,6 @@ function createClassAttribute(vnode) {
1234
1453
  elm,
1235
1454
  data: {
1236
1455
  classMap
1237
- },
1238
- owner: {
1239
- renderer
1240
1456
  }
1241
1457
  } = vnode;
1242
1458
 
@@ -1244,7 +1460,7 @@ function createClassAttribute(vnode) {
1244
1460
  return;
1245
1461
  }
1246
1462
 
1247
- const classList = renderer.getClassList(elm);
1463
+ const classList = getClassList$1(elm);
1248
1464
 
1249
1465
  for (const name in classMap) {
1250
1466
  classList.add(name);
@@ -1268,9 +1484,6 @@ function createStyleAttribute(vnode) {
1268
1484
  elm,
1269
1485
  data: {
1270
1486
  styleDecls
1271
- },
1272
- owner: {
1273
- renderer
1274
1487
  }
1275
1488
  } = vnode;
1276
1489
 
@@ -1280,7 +1493,7 @@ function createStyleAttribute(vnode) {
1280
1493
 
1281
1494
  for (let i = 0; i < styleDecls.length; i++) {
1282
1495
  const [prop, value, important] = styleDecls[i];
1283
- renderer.setCSSStyleProperty(elm, prop, value, important);
1496
+ setCSSStyleProperty$1(elm, prop, value, important);
1284
1497
  }
1285
1498
  }
1286
1499
 
@@ -1294,15 +1507,6 @@ var modStaticStyle = {
1294
1507
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1295
1508
  */
1296
1509
 
1297
- /**
1298
- @license
1299
- Copyright (c) 2015 Simon Friis Vindum.
1300
- This code may only be used under the MIT License found at
1301
- https://github.com/snabbdom/snabbdom/blob/master/LICENSE
1302
- Code distributed by Snabbdom as part of the Snabbdom project at
1303
- https://github.com/snabbdom/snabbdom/
1304
- */
1305
-
1306
1510
  function isUndef(s) {
1307
1511
  return s === undefined;
1308
1512
  }
@@ -1390,7 +1594,7 @@ function updateDynamicChildren(parentElm, oldCh, newCh) {
1390
1594
  } else if (sameVnode(oldStartVnode, newEndVnode)) {
1391
1595
  // Vnode moved right
1392
1596
  patchVnode(oldStartVnode, newEndVnode);
1393
- newEndVnode.hook.move(oldStartVnode, parentElm, oldEndVnode.owner.renderer.nextSibling(oldEndVnode.elm));
1597
+ newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
1394
1598
  oldStartVnode = oldCh[++oldStartIdx];
1395
1599
  newEndVnode = newCh[--newEndIdx];
1396
1600
  } else if (sameVnode(oldEndVnode, newStartVnode)) {
@@ -1872,7 +2076,7 @@ function patchLightningElementPrototypeWithRestrictions(proto) {
1872
2076
  defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
1873
2077
  }
1874
2078
  /*
1875
- * Copyright (c) 2020, salesforce.com, inc.
2079
+ * Copyright (c) 2018, salesforce.com, inc.
1876
2080
  * All rights reserved.
1877
2081
  * SPDX-License-Identifier: MIT
1878
2082
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -2792,9 +2996,7 @@ function createBridgeToElementDescriptor(propName, descriptor) {
2792
2996
 
2793
2997
 
2794
2998
  const LightningElement = function () {
2795
- var _a; // This should be as performant as possible, while any initialization should be done lazily
2796
-
2797
-
2999
+ // This should be as performant as possible, while any initialization should be done lazily
2798
3000
  if (isNull(vmBeingConstructed)) {
2799
3001
  throw new ReferenceError('Illegal constructor');
2800
3002
  }
@@ -2802,15 +3004,14 @@ const LightningElement = function () {
2802
3004
  const vm = vmBeingConstructed;
2803
3005
  const {
2804
3006
  def,
2805
- elm,
2806
- renderer
3007
+ elm
2807
3008
  } = vm;
2808
3009
  const {
2809
3010
  bridge
2810
3011
  } = def;
2811
3012
 
2812
3013
  if (process.env.NODE_ENV !== 'production') {
2813
- (_a = renderer.assertInstanceOfHTMLElement) === null || _a === void 0 ? void 0 : _a.call(renderer, vm.elm, `Component creation requires a DOM element to be associated to ${vm}.`);
3014
+ assertInstanceOfHTMLElement$1(vm.elm, `Component creation requires a DOM element to be associated to ${vm}.`);
2814
3015
  }
2815
3016
 
2816
3017
  const component = this;
@@ -2840,7 +3041,7 @@ const LightningElement = function () {
2840
3041
  if (vm.renderMode === 1
2841
3042
  /* Shadow */
2842
3043
  ) {
2843
- attachShadow(vm);
3044
+ doAttachShadow(vm);
2844
3045
  } // Adding extra guard rails in DEV mode.
2845
3046
 
2846
3047
 
@@ -2852,17 +3053,16 @@ const LightningElement = function () {
2852
3053
  return this;
2853
3054
  };
2854
3055
 
2855
- function attachShadow(vm) {
3056
+ function doAttachShadow(vm) {
2856
3057
  const {
2857
3058
  elm,
2858
3059
  mode,
2859
- renderer,
2860
3060
  shadowMode,
2861
3061
  def: {
2862
3062
  ctor
2863
3063
  }
2864
3064
  } = vm;
2865
- const cmpRoot = renderer.attachShadow(elm, {
3065
+ const cmpRoot = attachShadow$1(elm, {
2866
3066
  [KEY__SYNTHETIC_MODE]: shadowMode === 1
2867
3067
  /* Synthetic */
2868
3068
  ,
@@ -2889,21 +3089,15 @@ LightningElement.prototype = {
2889
3089
 
2890
3090
  dispatchEvent(event) {
2891
3091
  const {
2892
- elm,
2893
- renderer: {
2894
- dispatchEvent
2895
- }
3092
+ elm
2896
3093
  } = getAssociatedVM(this);
2897
- return dispatchEvent(elm, event);
3094
+ return dispatchEvent$1(elm, event);
2898
3095
  },
2899
3096
 
2900
3097
  addEventListener(type, listener, options) {
2901
3098
  const vm = getAssociatedVM(this);
2902
3099
  const {
2903
- elm,
2904
- renderer: {
2905
- addEventListener
2906
- }
3100
+ elm
2907
3101
  } = vm;
2908
3102
 
2909
3103
  if (process.env.NODE_ENV !== 'production') {
@@ -2914,92 +3108,68 @@ LightningElement.prototype = {
2914
3108
  }
2915
3109
 
2916
3110
  const wrappedListener = getWrappedComponentsListener(vm, listener);
2917
- addEventListener(elm, type, wrappedListener, options);
3111
+ addEventListener$1(elm, type, wrappedListener, options);
2918
3112
  },
2919
3113
 
2920
3114
  removeEventListener(type, listener, options) {
2921
3115
  const vm = getAssociatedVM(this);
2922
3116
  const {
2923
- elm,
2924
- renderer: {
2925
- removeEventListener
2926
- }
3117
+ elm
2927
3118
  } = vm;
2928
3119
  const wrappedListener = getWrappedComponentsListener(vm, listener);
2929
- removeEventListener(elm, type, wrappedListener, options);
3120
+ removeEventListener$1(elm, type, wrappedListener, options);
2930
3121
  },
2931
3122
 
2932
3123
  hasAttribute(name) {
2933
3124
  const {
2934
- elm,
2935
- renderer: {
2936
- getAttribute
2937
- }
3125
+ elm
2938
3126
  } = getAssociatedVM(this);
2939
- return !isNull(getAttribute(elm, name));
3127
+ return !isNull(getAttribute$1(elm, name));
2940
3128
  },
2941
3129
 
2942
3130
  hasAttributeNS(namespace, name) {
2943
3131
  const {
2944
- elm,
2945
- renderer: {
2946
- getAttribute
2947
- }
3132
+ elm
2948
3133
  } = getAssociatedVM(this);
2949
- return !isNull(getAttribute(elm, name, namespace));
3134
+ return !isNull(getAttribute$1(elm, name, namespace));
2950
3135
  },
2951
3136
 
2952
3137
  removeAttribute(name) {
2953
3138
  const {
2954
- elm,
2955
- renderer: {
2956
- removeAttribute
2957
- }
3139
+ elm
2958
3140
  } = getAssociatedVM(this);
2959
3141
  unlockAttribute(elm, name);
2960
- removeAttribute(elm, name);
3142
+ removeAttribute$1(elm, name);
2961
3143
  lockAttribute();
2962
3144
  },
2963
3145
 
2964
3146
  removeAttributeNS(namespace, name) {
2965
3147
  const {
2966
- elm,
2967
- renderer: {
2968
- removeAttribute
2969
- }
3148
+ elm
2970
3149
  } = getAssociatedVM(this);
2971
3150
  unlockAttribute(elm, name);
2972
- removeAttribute(elm, name, namespace);
3151
+ removeAttribute$1(elm, name, namespace);
2973
3152
  lockAttribute();
2974
3153
  },
2975
3154
 
2976
3155
  getAttribute(name) {
2977
3156
  const {
2978
- elm,
2979
- renderer: {
2980
- getAttribute
2981
- }
3157
+ elm
2982
3158
  } = getAssociatedVM(this);
2983
- return getAttribute(elm, name);
3159
+ return getAttribute$1(elm, name);
2984
3160
  },
2985
3161
 
2986
3162
  getAttributeNS(namespace, name) {
2987
3163
  const {
2988
- elm,
2989
- renderer: {
2990
- getAttribute
2991
- }
3164
+ elm
2992
3165
  } = getAssociatedVM(this);
2993
- return getAttribute(elm, name, namespace);
3166
+ return getAttribute$1(elm, name, namespace);
2994
3167
  },
2995
3168
 
2996
3169
  setAttribute(name, value) {
2997
3170
  const vm = getAssociatedVM(this);
2998
3171
  const {
2999
- elm,
3000
- renderer: {
3001
- setAttribute
3002
- }
3172
+ elm
3003
3173
  } = vm;
3004
3174
 
3005
3175
  if (process.env.NODE_ENV !== 'production') {
@@ -3007,17 +3177,14 @@ LightningElement.prototype = {
3007
3177
  }
3008
3178
 
3009
3179
  unlockAttribute(elm, name);
3010
- setAttribute(elm, name, value);
3180
+ setAttribute$1(elm, name, value);
3011
3181
  lockAttribute();
3012
3182
  },
3013
3183
 
3014
3184
  setAttributeNS(namespace, name, value) {
3015
3185
  const vm = getAssociatedVM(this);
3016
3186
  const {
3017
- elm,
3018
- renderer: {
3019
- setAttribute
3020
- }
3187
+ elm
3021
3188
  } = vm;
3022
3189
 
3023
3190
  if (process.env.NODE_ENV !== 'production') {
@@ -3025,43 +3192,34 @@ LightningElement.prototype = {
3025
3192
  }
3026
3193
 
3027
3194
  unlockAttribute(elm, name);
3028
- setAttribute(elm, name, value, namespace);
3195
+ setAttribute$1(elm, name, value, namespace);
3029
3196
  lockAttribute();
3030
3197
  },
3031
3198
 
3032
3199
  getBoundingClientRect() {
3033
3200
  const vm = getAssociatedVM(this);
3034
3201
  const {
3035
- elm,
3036
- renderer: {
3037
- getBoundingClientRect
3038
- }
3202
+ elm
3039
3203
  } = vm;
3040
3204
 
3041
3205
  if (process.env.NODE_ENV !== 'production') {
3042
3206
  warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
3043
3207
  }
3044
3208
 
3045
- return getBoundingClientRect(elm);
3209
+ return getBoundingClientRect$1(elm);
3046
3210
  },
3047
3211
 
3048
3212
  get isConnected() {
3049
3213
  const {
3050
- elm,
3051
- renderer: {
3052
- isConnected
3053
- }
3214
+ elm
3054
3215
  } = getAssociatedVM(this);
3055
- return isConnected(elm);
3216
+ return isConnected$1(elm);
3056
3217
  },
3057
3218
 
3058
3219
  get classList() {
3059
3220
  const vm = getAssociatedVM(this);
3060
3221
  const {
3061
- elm,
3062
- renderer: {
3063
- getClassList
3064
- }
3222
+ elm
3065
3223
  } = vm;
3066
3224
 
3067
3225
  if (process.env.NODE_ENV !== 'production') {
@@ -3070,7 +3228,7 @@ LightningElement.prototype = {
3070
3228
  assert.isFalse(isBeingConstructed(vm), `Failed to construct ${vm}: The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead.`);
3071
3229
  }
3072
3230
 
3073
- return getClassList(elm);
3231
+ return getClassList$1(elm);
3074
3232
  },
3075
3233
 
3076
3234
  get template() {
@@ -3104,23 +3262,48 @@ LightningElement.prototype = {
3104
3262
  }
3105
3263
 
3106
3264
  };
3107
- const queryAndChildGetterDescriptors = create(null);
3108
- const 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
3265
+ const queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
3266
+ // is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
3267
+ // object representing the renderer, with a lot of methods we don't actually need.
3268
+
3269
+ const childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
3270
+
3271
+ function getChildGetter(methodName) {
3272
+ switch (methodName) {
3273
+ case 'children':
3274
+ return getChildren$1;
3275
+
3276
+ case 'childNodes':
3277
+ return getChildNodes$1;
3278
+
3279
+ case 'firstChild':
3280
+ return getFirstChild$1;
3109
3281
 
3110
- for (const [elementProp, rendererMethod] of childGetters) {
3111
- queryAndChildGetterDescriptors[elementProp] = {
3282
+ case 'firstElementChild':
3283
+ return getFirstElementChild$1;
3284
+
3285
+ case 'lastChild':
3286
+ return getLastChild$1;
3287
+
3288
+ case 'lastElementChild':
3289
+ return getLastElementChild$1;
3290
+ }
3291
+ } // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
3292
+
3293
+
3294
+ for (const childGetter of childGetters) {
3295
+ queryAndChildGetterDescriptors[childGetter] = {
3112
3296
  get() {
3113
3297
  const vm = getAssociatedVM(this);
3114
3298
  const {
3115
- elm,
3116
- renderer
3299
+ elm
3117
3300
  } = vm;
3118
3301
 
3119
3302
  if (process.env.NODE_ENV !== 'production') {
3120
- warnIfInvokedDuringConstruction(vm, elementProp);
3303
+ warnIfInvokedDuringConstruction(vm, childGetter);
3121
3304
  }
3122
3305
 
3123
- return renderer[rendererMethod](elm);
3306
+ return getChildGetter(childGetter)(elm);
3124
3307
  },
3125
3308
 
3126
3309
  configurable: true,
@@ -3128,22 +3311,38 @@ for (const [elementProp, rendererMethod] of childGetters) {
3128
3311
  };
3129
3312
  }
3130
3313
 
3131
- const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
3314
+ const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
3315
+
3316
+ function getQueryMethod(methodName) {
3317
+ switch (methodName) {
3318
+ case 'getElementsByClassName':
3319
+ return getElementsByClassName$1;
3320
+
3321
+ case 'getElementsByTagName':
3322
+ return getElementsByTagName$1;
3323
+
3324
+ case 'querySelector':
3325
+ return querySelector$1;
3326
+
3327
+ case 'querySelectorAll':
3328
+ return querySelectorAll$1;
3329
+ }
3330
+ } // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
3331
+
3132
3332
 
3133
3333
  for (const queryMethod of queryMethods) {
3134
3334
  queryAndChildGetterDescriptors[queryMethod] = {
3135
3335
  value(arg) {
3136
3336
  const vm = getAssociatedVM(this);
3137
3337
  const {
3138
- elm,
3139
- renderer
3338
+ elm
3140
3339
  } = vm;
3141
3340
 
3142
3341
  if (process.env.NODE_ENV !== 'production') {
3143
3342
  warnIfInvokedDuringConstruction(vm, `${queryMethod}()`);
3144
3343
  }
3145
3344
 
3146
- return renderer[queryMethod](elm, arg);
3345
+ return getQueryMethod(queryMethod)(elm, arg);
3147
3346
  },
3148
3347
 
3149
3348
  configurable: true,
@@ -4299,10 +4498,6 @@ function createComponentDef(Ctor) {
4299
4498
 
4300
4499
  assert.isTrue(Ctor.constructor, `Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
4301
4500
 
4302
- if (!runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
4303
- assert.isFalse('shadowSupportMode' in Ctor, `${ctorName || 'Anonymous class'} is an invalid LWC component. The shadowSupportMode static property is not available in this environment.`);
4304
- }
4305
-
4306
4501
  if (!isUndefined$1(ctorShadowSupportMode)) {
4307
4502
  assert.invariant(ctorShadowSupportMode === "any"
4308
4503
  /* Any */
@@ -4546,17 +4741,14 @@ function setScopeTokenClassIfNecessary(elm, owner) {
4546
4741
  const token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
4547
4742
 
4548
4743
  if (!isUndefined$1(token) && context.hasScopedStyles) {
4549
- owner.renderer.getClassList(elm).add(token);
4744
+ getClassList$1(elm).add(token);
4550
4745
  }
4551
4746
  }
4552
4747
 
4553
4748
  function updateNodeHook(oldVnode, vnode) {
4554
4749
  const {
4555
4750
  elm,
4556
- text,
4557
- owner: {
4558
- renderer
4559
- }
4751
+ text
4560
4752
  } = vnode;
4561
4753
 
4562
4754
  if (oldVnode.text !== text) {
@@ -4564,7 +4756,7 @@ function updateNodeHook(oldVnode, vnode) {
4564
4756
  unlockDomMutation();
4565
4757
  }
4566
4758
 
4567
- renderer.setText(elm, text);
4759
+ setText$1(elm, text);
4568
4760
 
4569
4761
  if (process.env.NODE_ENV !== 'production') {
4570
4762
  lockDomMutation();
@@ -4573,15 +4765,11 @@ function updateNodeHook(oldVnode, vnode) {
4573
4765
  }
4574
4766
 
4575
4767
  function insertNodeHook(vnode, parentNode, referenceNode) {
4576
- const {
4577
- renderer
4578
- } = vnode.owner;
4579
-
4580
4768
  if (process.env.NODE_ENV !== 'production') {
4581
4769
  unlockDomMutation();
4582
4770
  }
4583
4771
 
4584
- renderer.insert(vnode.elm, parentNode, referenceNode);
4772
+ insert$1(vnode.elm, parentNode, referenceNode);
4585
4773
 
4586
4774
  if (process.env.NODE_ENV !== 'production') {
4587
4775
  lockDomMutation();
@@ -4589,15 +4777,11 @@ function insertNodeHook(vnode, parentNode, referenceNode) {
4589
4777
  }
4590
4778
 
4591
4779
  function removeNodeHook(vnode, parentNode) {
4592
- const {
4593
- renderer
4594
- } = vnode.owner;
4595
-
4596
4780
  if (process.env.NODE_ENV !== 'production') {
4597
4781
  unlockDomMutation();
4598
4782
  }
4599
4783
 
4600
- renderer.remove(vnode.elm, parentNode);
4784
+ remove$1(vnode.elm, parentNode);
4601
4785
 
4602
4786
  if (process.env.NODE_ENV !== 'production') {
4603
4787
  lockDomMutation();
@@ -4763,8 +4947,7 @@ function createViewModelHook(elm, vnode) {
4763
4947
  createVM(elm, def, {
4764
4948
  mode,
4765
4949
  owner,
4766
- tagName: sel,
4767
- renderer: owner.renderer
4950
+ tagName: sel
4768
4951
  });
4769
4952
 
4770
4953
  if (process.env.NODE_ENV !== 'production') {
@@ -4810,16 +4993,13 @@ function vnodesAndElementHaveCompatibleAttrs(vnode, elm) {
4810
4993
  const {
4811
4994
  data: {
4812
4995
  attrs = {}
4813
- },
4814
- owner: {
4815
- renderer
4816
4996
  }
4817
4997
  } = vnode;
4818
4998
  let nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
4819
4999
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
4820
5000
 
4821
5001
  for (const [attrName, attrValue] of Object.entries(attrs)) {
4822
- const elmAttrValue = renderer.getAttribute(elm, attrName);
5002
+ const elmAttrValue = getAttribute$1(elm, attrName);
4823
5003
 
4824
5004
  if (String(attrValue) !== elmAttrValue) {
4825
5005
  logError(`Mismatch hydrating element <${elm.tagName.toLowerCase()}>: attribute "${attrName}" has different values, expected "${attrValue}" but found "${elmAttrValue}"`, vnode.owner);
@@ -4835,9 +5015,6 @@ function vnodesAndElementHaveCompatibleClass(vnode, elm) {
4835
5015
  data: {
4836
5016
  className,
4837
5017
  classMap
4838
- },
4839
- owner: {
4840
- renderer
4841
5018
  }
4842
5019
  } = vnode;
4843
5020
  let nodesAreCompatible = true;
@@ -4849,7 +5026,7 @@ function vnodesAndElementHaveCompatibleClass(vnode, elm) {
4849
5026
  vnodeClassName = className;
4850
5027
  } else if (!isUndefined$1(classMap)) {
4851
5028
  // classMap is used when class is set to static value.
4852
- const classList = renderer.getClassList(elm);
5029
+ const classList = getClassList$1(elm);
4853
5030
  let computedClassName = ''; // all classes from the vnode should be in the element.classList
4854
5031
 
4855
5032
  for (const name in classMap) {
@@ -4879,12 +5056,9 @@ function vnodesAndElementHaveCompatibleStyle(vnode, elm) {
4879
5056
  data: {
4880
5057
  style,
4881
5058
  styleDecls
4882
- },
4883
- owner: {
4884
- renderer
4885
5059
  }
4886
5060
  } = vnode;
4887
- const elmStyle = renderer.getAttribute(elm, 'style') || '';
5061
+ const elmStyle = getAttribute$1(elm, 'style') || '';
4888
5062
  let vnodeStyle;
4889
5063
  let nodesAreCompatible = true;
4890
5064
 
@@ -5021,12 +5195,12 @@ function hasDynamicChildren(children) {
5021
5195
  */
5022
5196
 
5023
5197
 
5024
- function getUpgradableConstructor(tagName, renderer) {
5198
+ function getUpgradableConstructor(tagName) {
5025
5199
  // Should never get a tag with upper case letter at this point, the compiler should
5026
5200
  // produce only tags with lowercase letters
5027
5201
  // But, for backwards compatibility, we will lower case the tagName
5028
5202
  tagName = tagName.toLowerCase();
5029
- let CE = renderer.getCustomElement(tagName);
5203
+ let CE = getCustomElement$1(tagName);
5030
5204
 
5031
5205
  if (!isUndefined$1(CE)) {
5032
5206
  return CE;
@@ -5037,7 +5211,7 @@ function getUpgradableConstructor(tagName, renderer) {
5037
5211
  */
5038
5212
 
5039
5213
 
5040
- CE = class LWCUpgradableElement extends renderer.HTMLElement {
5214
+ CE = class LWCUpgradableElement extends HTMLElementExported$1 {
5041
5215
  constructor(upgradeCallback) {
5042
5216
  super();
5043
5217
 
@@ -5047,7 +5221,7 @@ function getUpgradableConstructor(tagName, renderer) {
5047
5221
  }
5048
5222
 
5049
5223
  };
5050
- renderer.defineCustomElement(tagName, CE);
5224
+ defineCustomElement$1(tagName, CE);
5051
5225
  return CE;
5052
5226
  }
5053
5227
  /*
@@ -5065,10 +5239,7 @@ const TextHook = {
5065
5239
  const {
5066
5240
  owner
5067
5241
  } = vnode;
5068
- const {
5069
- renderer
5070
- } = owner;
5071
- const elm = renderer.createText(vnode.text);
5242
+ const elm = createText$1(vnode.text);
5072
5243
  linkNodeToShadow(elm, owner);
5073
5244
  vnode.elm = elm;
5074
5245
  },
@@ -5102,10 +5273,7 @@ const CommentHook = {
5102
5273
  owner,
5103
5274
  text
5104
5275
  } = vnode;
5105
- const {
5106
- renderer
5107
- } = owner;
5108
- const elm = renderer.createComment(text);
5276
+ const elm = createComment$1(text);
5109
5277
  linkNodeToShadow(elm, owner);
5110
5278
  vnode.elm = elm;
5111
5279
  },
@@ -5147,11 +5315,8 @@ const ElementHook = {
5147
5315
  svg
5148
5316
  }
5149
5317
  } = vnode;
5150
- const {
5151
- renderer
5152
- } = owner;
5153
5318
  const namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
5154
- const elm = renderer.createElement(sel, namespace);
5319
+ const elm = createElement$2(sel, namespace);
5155
5320
  linkNodeToShadow(elm, owner);
5156
5321
  fallbackElmHook(elm, vnode);
5157
5322
  vnode.elm = elm;
@@ -5211,10 +5376,7 @@ const CustomElementHook = {
5211
5376
  sel,
5212
5377
  owner
5213
5378
  } = vnode;
5214
- const {
5215
- renderer
5216
- } = owner;
5217
- const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
5379
+ const UpgradableConstructor = getUpgradableConstructor(sel);
5218
5380
  /**
5219
5381
  * Note: if the upgradable constructor does not expect, or throw when we new it
5220
5382
  * with a callback as the first argument, we could implement a more advanced
@@ -5307,8 +5469,7 @@ const CustomElementHook = {
5307
5469
  createVM(elm, def, {
5308
5470
  mode,
5309
5471
  owner,
5310
- tagName: sel,
5311
- renderer: owner.renderer
5472
+ tagName: sel
5312
5473
  });
5313
5474
  vnode.elm = elm;
5314
5475
  const vm = getAssociatedVM(elm);
@@ -5337,12 +5498,11 @@ const CustomElementHook = {
5337
5498
 
5338
5499
  function linkNodeToShadow(elm, owner) {
5339
5500
  const {
5340
- renderer,
5341
5501
  renderMode,
5342
5502
  shadowMode
5343
5503
  } = owner; // TODO [#1164]: this should eventually be done by the polyfill directly
5344
5504
 
5345
- if (renderer.isSyntheticShadowDefined) {
5505
+ if (isSyntheticShadowDefined$1) {
5346
5506
  if (shadowMode === 1
5347
5507
  /* Synthetic */
5348
5508
  || renderMode === 0
@@ -5874,7 +6034,6 @@ function updateStylesheetToken(vm, template) {
5874
6034
  const {
5875
6035
  elm,
5876
6036
  context,
5877
- renderer,
5878
6037
  renderMode,
5879
6038
  shadowMode
5880
6039
  } = vm;
@@ -5901,11 +6060,11 @@ function updateStylesheetToken(vm, template) {
5901
6060
  } = context;
5902
6061
 
5903
6062
  if (oldHasTokenInClass) {
5904
- renderer.getClassList(elm).remove(makeHostToken(oldToken));
6063
+ getClassList$1(elm).remove(makeHostToken(oldToken));
5905
6064
  }
5906
6065
 
5907
6066
  if (oldHasTokenInAttribute) {
5908
- renderer.removeAttribute(elm, makeHostToken(oldToken));
6067
+ removeAttribute$1(elm, makeHostToken(oldToken));
5909
6068
  } // Apply the new template styling token to the host element, if the new template has any
5910
6069
  // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
5911
6070
 
@@ -5917,12 +6076,12 @@ function updateStylesheetToken(vm, template) {
5917
6076
 
5918
6077
  if (!isUndefined$1(newToken)) {
5919
6078
  if (hasScopedStyles) {
5920
- renderer.getClassList(elm).add(makeHostToken(newToken));
6079
+ getClassList$1(elm).add(makeHostToken(newToken));
5921
6080
  newHasTokenInClass = true;
5922
6081
  }
5923
6082
 
5924
6083
  if (isSyntheticShadow) {
5925
- renderer.setAttribute(elm, makeHostToken(newToken), '');
6084
+ setAttribute$1(elm, makeHostToken(newToken), '');
5926
6085
  newHasTokenInAttribute = true;
5927
6086
  }
5928
6087
  } // Update the styling tokens present on the context object.
@@ -6043,7 +6202,6 @@ function getNearestNativeShadowComponent(vm) {
6043
6202
 
6044
6203
  function createStylesheet(vm, stylesheets) {
6045
6204
  const {
6046
- renderer,
6047
6205
  renderMode,
6048
6206
  shadowMode
6049
6207
  } = vm;
@@ -6054,9 +6212,9 @@ function createStylesheet(vm, stylesheets) {
6054
6212
  /* Synthetic */
6055
6213
  ) {
6056
6214
  for (let i = 0; i < stylesheets.length; i++) {
6057
- renderer.insertGlobalStylesheet(stylesheets[i]);
6215
+ insertGlobalStylesheet$1(stylesheets[i]);
6058
6216
  }
6059
- } else if (renderer.ssr || renderer.isHydrating()) {
6217
+ } else if (ssr$1 || isHydrating$1()) {
6060
6218
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
6061
6219
  // This works in the client, because the stylesheets are created, and cached in the VM
6062
6220
  // the first time the VM renders.
@@ -6070,10 +6228,10 @@ function createStylesheet(vm, stylesheets) {
6070
6228
 
6071
6229
  for (let i = 0; i < stylesheets.length; i++) {
6072
6230
  if (isGlobal) {
6073
- renderer.insertGlobalStylesheet(stylesheets[i]);
6231
+ insertGlobalStylesheet$1(stylesheets[i]);
6074
6232
  } else {
6075
6233
  // local level
6076
- renderer.insertStylesheet(stylesheets[i], root.cmpRoot);
6234
+ insertStylesheet$1(stylesheets[i], root.cmpRoot);
6077
6235
  }
6078
6236
  }
6079
6237
  }
@@ -6765,7 +6923,6 @@ function createVM(elm, def, options) {
6765
6923
  const {
6766
6924
  mode,
6767
6925
  owner,
6768
- renderer,
6769
6926
  tagName
6770
6927
  } = options;
6771
6928
  const vm = {
@@ -6780,7 +6937,6 @@ function createVM(elm, def, options) {
6780
6937
  tagName,
6781
6938
  mode,
6782
6939
  owner,
6783
- renderer,
6784
6940
  children: EmptyArray,
6785
6941
  aChildren: EmptyArray,
6786
6942
  velements: EmptyArray,
@@ -6835,16 +6991,11 @@ function createVM(elm, def, options) {
6835
6991
 
6836
6992
  function computeShadowMode(vm) {
6837
6993
  const {
6838
- def,
6839
- renderer
6994
+ def
6840
6995
  } = vm;
6841
- const {
6842
- isNativeShadowDefined,
6843
- isSyntheticShadowDefined
6844
- } = renderer;
6845
6996
  let shadowMode;
6846
6997
 
6847
- if (isSyntheticShadowDefined) {
6998
+ if (isSyntheticShadowDefined$1) {
6848
6999
  if (def.renderMode === 0
6849
7000
  /* Light */
6850
7001
  ) {
@@ -6853,7 +7004,7 @@ function computeShadowMode(vm) {
6853
7004
  shadowMode = 0
6854
7005
  /* Native */
6855
7006
  ;
6856
- } else if (isNativeShadowDefined) {
7007
+ } else if (isNativeShadowDefined$1) {
6857
7008
  if (def.shadowSupportMode === "any"
6858
7009
  /* Any */
6859
7010
  ) {
@@ -6993,13 +7144,12 @@ function patchShadowRoot(vm, newCh) {
6993
7144
 
6994
7145
  function runRenderedCallback(vm) {
6995
7146
  const {
6996
- renderer,
6997
7147
  def: {
6998
7148
  renderedCallback
6999
7149
  }
7000
7150
  } = vm;
7001
7151
 
7002
- if (isTrue(renderer.ssr)) {
7152
+ if (isTrue(ssr$1)) {
7003
7153
  return;
7004
7154
  }
7005
7155
 
@@ -7225,8 +7375,7 @@ function recursivelyDisconnectChildren(vnodes) {
7225
7375
 
7226
7376
  function resetComponentRoot(vm) {
7227
7377
  const {
7228
- children,
7229
- renderer
7378
+ children
7230
7379
  } = vm;
7231
7380
  const rootNode = getRenderRoot(vm);
7232
7381
 
@@ -7234,7 +7383,7 @@ function resetComponentRoot(vm) {
7234
7383
  const child = children[i];
7235
7384
 
7236
7385
  if (!isNull(child) && !isUndefined$1(child.elm)) {
7237
- renderer.remove(child.elm, rootNode);
7386
+ remove$1(child.elm, rootNode);
7238
7387
  }
7239
7388
  }
7240
7389
 
@@ -7244,7 +7393,7 @@ function resetComponentRoot(vm) {
7244
7393
  }
7245
7394
 
7246
7395
  function scheduleRehydration(vm) {
7247
- if (isTrue(vm.renderer.ssr) || isTrue(vm.isScheduled)) {
7396
+ if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
7248
7397
  return;
7249
7398
  }
7250
7399
 
@@ -7489,7 +7638,6 @@ function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
7489
7638
 
7490
7639
  const {
7491
7640
  elm,
7492
- renderer,
7493
7641
  context: {
7494
7642
  wiredConnecting,
7495
7643
  wiredDisconnecting
@@ -7516,7 +7664,7 @@ function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
7516
7664
  }
7517
7665
 
7518
7666
  });
7519
- renderer.dispatchEvent(elm, contextRegistrationEvent);
7667
+ dispatchEvent$1(elm, contextRegistrationEvent);
7520
7668
  });
7521
7669
  }
7522
7670
 
@@ -7781,7 +7929,7 @@ function setHooks(hooks) {
7781
7929
  hooksAreSet = true;
7782
7930
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
7783
7931
  }
7784
- /* version: 2.6.2 */
7932
+ /* version: 2.6.3 */
7785
7933
 
7786
7934
  /*
7787
7935
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7810,7 +7958,9 @@ const supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.re
7810
7958
  const styleElements = create(null);
7811
7959
  const styleSheets = create(null);
7812
7960
  const nodesToStyleSheets = new WeakMap();
7813
- let getCustomElement, defineCustomElement, HTMLElementConstructor;
7961
+ let getCustomElement;
7962
+ let defineCustomElement;
7963
+ let HTMLElementConstructor;
7814
7964
 
7815
7965
  function isCustomElementRegistryAvailable() {
7816
7966
  if (typeof customElements === 'undefined') {
@@ -7925,188 +8075,231 @@ if (isCustomElementRegistryAvailable()) {
7925
8075
  HTMLElementConstructor.prototype = HTMLElement.prototype;
7926
8076
  }
7927
8077
 
7928
- let isHydrating = false;
8078
+ let hydrating = false;
7929
8079
 
7930
- function setIsHydrating(v) {
7931
- isHydrating = v;
8080
+ function setIsHydrating(value) {
8081
+ hydrating = value;
7932
8082
  }
7933
8083
 
7934
- const renderer = {
7935
- ssr: false,
8084
+ const ssr = false;
7936
8085
 
7937
- isHydrating() {
7938
- return isHydrating;
7939
- },
8086
+ function isHydrating() {
8087
+ return hydrating;
8088
+ }
7940
8089
 
7941
- isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
7942
- isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
8090
+ const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
8091
+ const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
7943
8092
 
7944
- createElement(tagName, namespace) {
7945
- return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
7946
- },
8093
+ function createElement$1(tagName, namespace) {
8094
+ return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
8095
+ }
7947
8096
 
7948
- createText(content) {
7949
- return document.createTextNode(content);
7950
- },
8097
+ function createText(content) {
8098
+ return document.createTextNode(content);
8099
+ }
7951
8100
 
7952
- createComment(content) {
7953
- return document.createComment(content);
7954
- },
8101
+ function createComment(content) {
8102
+ return document.createComment(content);
8103
+ }
7955
8104
 
7956
- insert(node, parent, anchor) {
7957
- parent.insertBefore(node, anchor);
7958
- },
8105
+ function insert(node, parent, anchor) {
8106
+ parent.insertBefore(node, anchor);
8107
+ }
7959
8108
 
7960
- remove(node, parent) {
7961
- parent.removeChild(node);
7962
- },
8109
+ function remove(node, parent) {
8110
+ parent.removeChild(node);
8111
+ }
7963
8112
 
7964
- nextSibling(node) {
7965
- return node.nextSibling;
7966
- },
8113
+ function nextSibling(node) {
8114
+ return node.nextSibling;
8115
+ }
7967
8116
 
7968
- attachShadow(element, options) {
7969
- if (isHydrating) {
7970
- return element.shadowRoot;
7971
- }
8117
+ function attachShadow(element, options) {
8118
+ if (hydrating) {
8119
+ return element.shadowRoot;
8120
+ }
7972
8121
 
7973
- return element.attachShadow(options);
7974
- },
8122
+ return element.attachShadow(options);
8123
+ }
7975
8124
 
7976
- setText(node, content) {
7977
- node.nodeValue = content;
7978
- },
8125
+ function setText(node, content) {
8126
+ node.nodeValue = content;
8127
+ }
7979
8128
 
7980
- getProperty(node, key) {
7981
- return node[key];
7982
- },
8129
+ function getProperty(node, key) {
8130
+ return node[key];
8131
+ }
7983
8132
 
7984
- setProperty(node, key, value) {
7985
- if (process.env.NODE_ENV !== 'production') {
7986
- if (node instanceof Element && !(key in node)) {
7987
- // TODO [#1297]: Move this validation to the compiler
7988
- assert.fail(`Unknown public property "${key}" of element <${node.tagName}>. This is likely a typo on the corresponding attribute "${htmlPropertyToAttribute(key)}".`);
7989
- }
8133
+ function setProperty(node, key, value) {
8134
+ if (process.env.NODE_ENV !== 'production') {
8135
+ if (node instanceof Element && !(key in node)) {
8136
+ // TODO [#1297]: Move this validation to the compiler
8137
+ assert.fail(`Unknown public property "${key}" of element <${node.tagName}>. This is likely a typo on the corresponding attribute "${htmlPropertyToAttribute(key)}".`);
7990
8138
  }
8139
+ }
7991
8140
 
7992
- node[key] = value;
7993
- },
8141
+ node[key] = value;
8142
+ }
7994
8143
 
7995
- getAttribute(element, name, namespace) {
7996
- return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
7997
- },
8144
+ function getAttribute(element, name, namespace) {
8145
+ return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
8146
+ }
7998
8147
 
7999
- setAttribute(element, name, value, namespace) {
8000
- return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
8001
- },
8148
+ function setAttribute(element, name, value, namespace) {
8149
+ return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
8150
+ }
8002
8151
 
8003
- removeAttribute(element, name, namespace) {
8004
- if (isUndefined$1(namespace)) {
8005
- element.removeAttribute(name);
8006
- } else {
8007
- element.removeAttributeNS(namespace, name);
8008
- }
8009
- },
8152
+ function removeAttribute(element, name, namespace) {
8153
+ if (isUndefined$1(namespace)) {
8154
+ element.removeAttribute(name);
8155
+ } else {
8156
+ element.removeAttributeNS(namespace, name);
8157
+ }
8158
+ }
8010
8159
 
8011
- addEventListener(target, type, callback, options) {
8012
- target.addEventListener(type, callback, options);
8013
- },
8160
+ function addEventListener(target, type, callback, options) {
8161
+ target.addEventListener(type, callback, options);
8162
+ }
8014
8163
 
8015
- removeEventListener(target, type, callback, options) {
8016
- target.removeEventListener(type, callback, options);
8017
- },
8164
+ function removeEventListener(target, type, callback, options) {
8165
+ target.removeEventListener(type, callback, options);
8166
+ }
8018
8167
 
8019
- dispatchEvent(target, event) {
8020
- return target.dispatchEvent(event);
8021
- },
8168
+ function dispatchEvent(target, event) {
8169
+ return target.dispatchEvent(event);
8170
+ }
8022
8171
 
8023
- getClassList(element) {
8024
- return element.classList;
8025
- },
8172
+ function getClassList(element) {
8173
+ return element.classList;
8174
+ }
8026
8175
 
8027
- setCSSStyleProperty(element, name, value, important) {
8028
- // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
8029
- // represent elements in the engine?
8030
- element.style.setProperty(name, value, important ? 'important' : '');
8031
- },
8176
+ function setCSSStyleProperty(element, name, value, important) {
8177
+ // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
8178
+ // represent elements in the engine?
8179
+ element.style.setProperty(name, value, important ? 'important' : '');
8180
+ }
8032
8181
 
8033
- getBoundingClientRect(element) {
8034
- return element.getBoundingClientRect();
8035
- },
8182
+ function getBoundingClientRect(element) {
8183
+ return element.getBoundingClientRect();
8184
+ }
8036
8185
 
8037
- querySelector(element, selectors) {
8038
- return element.querySelector(selectors);
8039
- },
8186
+ function querySelector(element, selectors) {
8187
+ return element.querySelector(selectors);
8188
+ }
8040
8189
 
8041
- querySelectorAll(element, selectors) {
8042
- return element.querySelectorAll(selectors);
8043
- },
8190
+ function querySelectorAll(element, selectors) {
8191
+ return element.querySelectorAll(selectors);
8192
+ }
8044
8193
 
8045
- getElementsByTagName(element, tagNameOrWildCard) {
8046
- return element.getElementsByTagName(tagNameOrWildCard);
8047
- },
8194
+ function getElementsByTagName(element, tagNameOrWildCard) {
8195
+ return element.getElementsByTagName(tagNameOrWildCard);
8196
+ }
8048
8197
 
8049
- getElementsByClassName(element, names) {
8050
- return element.getElementsByClassName(names);
8051
- },
8198
+ function getElementsByClassName(element, names) {
8199
+ return element.getElementsByClassName(names);
8200
+ }
8052
8201
 
8053
- getChildren(element) {
8054
- return element.children;
8055
- },
8202
+ function getChildren(element) {
8203
+ return element.children;
8204
+ }
8056
8205
 
8057
- getChildNodes(element) {
8058
- return element.childNodes;
8059
- },
8206
+ function getChildNodes(element) {
8207
+ return element.childNodes;
8208
+ }
8060
8209
 
8061
- getFirstChild(element) {
8062
- return element.firstChild;
8063
- },
8210
+ function getFirstChild(element) {
8211
+ return element.firstChild;
8212
+ }
8064
8213
 
8065
- getFirstElementChild(element) {
8066
- return element.firstElementChild;
8067
- },
8214
+ function getFirstElementChild(element) {
8215
+ return element.firstElementChild;
8216
+ }
8068
8217
 
8069
- getLastChild(element) {
8070
- return element.lastChild;
8071
- },
8218
+ function getLastChild(element) {
8219
+ return element.lastChild;
8220
+ }
8072
8221
 
8073
- getLastElementChild(element) {
8074
- return element.lastElementChild;
8075
- },
8222
+ function getLastElementChild(element) {
8223
+ return element.lastElementChild;
8224
+ }
8076
8225
 
8077
- isConnected(node) {
8078
- return node.isConnected;
8079
- },
8226
+ function isConnected(node) {
8227
+ return node.isConnected;
8228
+ }
8080
8229
 
8081
- insertGlobalStylesheet(content) {
8082
- if (!isUndefined$1(globalStylesheets[content])) {
8083
- return;
8084
- }
8230
+ function insertGlobalStylesheet(content) {
8231
+ if (!isUndefined$1(globalStylesheets[content])) {
8232
+ return;
8233
+ }
8085
8234
 
8086
- globalStylesheets[content] = true;
8087
- const elm = document.createElement('style');
8088
- elm.type = 'text/css';
8089
- elm.textContent = content;
8090
- globalStylesheetsParentElement.appendChild(elm);
8091
- },
8235
+ globalStylesheets[content] = true;
8236
+ const elm = document.createElement('style');
8237
+ elm.type = 'text/css';
8238
+ elm.textContent = content;
8239
+ globalStylesheetsParentElement.appendChild(elm);
8240
+ }
8092
8241
 
8093
- insertStylesheet(content, target) {
8094
- if (supportsConstructableStyleSheets) {
8095
- insertConstructableStyleSheet(content, target);
8096
- } else {
8097
- // Fall back to <style> element
8098
- insertStyleElement(content, target);
8099
- }
8100
- },
8242
+ function insertStylesheet(content, target) {
8243
+ if (supportsConstructableStyleSheets) {
8244
+ insertConstructableStyleSheet(content, target);
8245
+ } else {
8246
+ // Fall back to <style> element
8247
+ insertStyleElement(content, target);
8248
+ }
8249
+ }
8101
8250
 
8102
- assertInstanceOfHTMLElement(elm, msg) {
8103
- assert.invariant(elm instanceof HTMLElement, msg);
8104
- },
8251
+ function assertInstanceOfHTMLElement(elm, msg) {
8252
+ assert.invariant(elm instanceof HTMLElement, msg);
8253
+ }
8105
8254
 
8106
- defineCustomElement,
8107
- getCustomElement,
8108
- HTMLElement: HTMLElementConstructor
8109
- };
8255
+ const HTMLElementExported = HTMLElementConstructor;
8256
+ /*
8257
+ * Copyright (c) 2020, salesforce.com, inc.
8258
+ * All rights reserved.
8259
+ * SPDX-License-Identifier: MIT
8260
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
8261
+ */
8262
+
8263
+ setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElement);
8264
+ setAttachShadow(attachShadow);
8265
+ setCreateComment(createComment);
8266
+ setCreateElement(createElement$1);
8267
+ setCreateText(createText);
8268
+ setDefineCustomElement(defineCustomElement);
8269
+ setDispatchEvent(dispatchEvent);
8270
+ setGetAttribute(getAttribute);
8271
+ setGetBoundingClientRect(getBoundingClientRect);
8272
+ setGetChildNodes(getChildNodes);
8273
+ setGetChildren(getChildren);
8274
+ setGetClassList(getClassList);
8275
+ setGetCustomElement(getCustomElement);
8276
+ setGetElementsByClassName(getElementsByClassName);
8277
+ setGetElementsByTagName(getElementsByTagName);
8278
+ setGetFirstChild(getFirstChild);
8279
+ setGetFirstElementChild(getFirstElementChild);
8280
+ setGetLastChild(getLastChild);
8281
+ setGetLastElementChild(getLastElementChild);
8282
+ setGetProperty(getProperty);
8283
+ setHTMLElement(HTMLElementExported);
8284
+ setInsert(insert);
8285
+ setInsertGlobalStylesheet(insertGlobalStylesheet);
8286
+ setInsertStylesheet(insertStylesheet);
8287
+ setIsConnected(isConnected);
8288
+ setIsHydrating$1(isHydrating);
8289
+ setIsNativeShadowDefined(isNativeShadowDefined);
8290
+ setIsSyntheticShadowDefined(isSyntheticShadowDefined);
8291
+ setNextSibling(nextSibling);
8292
+ setQuerySelector(querySelector);
8293
+ setQuerySelectorAll(querySelectorAll);
8294
+ setRemove(remove);
8295
+ setRemoveAttribute(removeAttribute);
8296
+ setRemoveEventListener(removeEventListener);
8297
+ setSetAttribute(setAttribute);
8298
+ setSetCSSStyleProperty(setCSSStyleProperty);
8299
+ setSetProperty(setProperty);
8300
+ setSetText(setText);
8301
+ setSsr(ssr);
8302
+ setAddEventListener(addEventListener);
8110
8303
  /*
8111
8304
  * Copyright (c) 2018, salesforce.com, inc.
8112
8305
  * All rights reserved.
@@ -8189,7 +8382,7 @@ function createElement(sel, options) {
8189
8382
  throw new TypeError(`"createElement" function expects an "is" option with a valid component constructor.`);
8190
8383
  }
8191
8384
 
8192
- const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
8385
+ const UpgradableConstructor = getUpgradableConstructor(sel);
8193
8386
  let wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
8194
8387
 
8195
8388
  /**
@@ -8204,8 +8397,7 @@ function createElement(sel, options) {
8204
8397
  createVM(elm, def, {
8205
8398
  tagName: sel,
8206
8399
  mode: options.mode !== 'closed' ? 'open' : 'closed',
8207
- owner: null,
8208
- renderer
8400
+ owner: null
8209
8401
  });
8210
8402
  ConnectingSlot.set(elm, connectRootElement);
8211
8403
  DisconnectingSlot.set(elm, disconnectRootElement);
@@ -8228,6 +8420,10 @@ function createElement(sel, options) {
8228
8420
 
8229
8421
 
8230
8422
  function hydrateComponent(element, Ctor, props = {}) {
8423
+ if (!(element instanceof Element)) {
8424
+ throw new TypeError(`"hydrateComponent" expects a valid DOM element as the first parameter but instead received ${element}.`);
8425
+ }
8426
+
8231
8427
  if (!isFunction$1(Ctor)) {
8232
8428
  throw new TypeError(`"hydrateComponent" expects a valid component constructor as the second parameter but instead received ${Ctor}.`);
8233
8429
  }
@@ -8245,7 +8441,6 @@ function hydrateComponent(element, Ctor, props = {}) {
8245
8441
  createVM(element, def, {
8246
8442
  mode: 'open',
8247
8443
  owner: null,
8248
- renderer,
8249
8444
  tagName: element.tagName.toLowerCase()
8250
8445
  });
8251
8446
 
@@ -8316,8 +8511,7 @@ function buildCustomElementConstructor(Ctor) {
8316
8511
  createVM(this, def, {
8317
8512
  mode: 'open',
8318
8513
  owner: null,
8319
- tagName: this.tagName,
8320
- renderer
8514
+ tagName: this.tagName
8321
8515
  });
8322
8516
  }
8323
8517
 
@@ -8384,7 +8578,7 @@ function isNodeFromTemplate(node) {
8384
8578
  return false;
8385
8579
  }
8386
8580
 
8387
- if (renderer.isSyntheticShadowDefined) {
8581
+ if (isSyntheticShadowDefined) {
8388
8582
  // TODO [#1252]: old behavior that is still used by some pieces of the platform,
8389
8583
  // specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
8390
8584
  // used, will be considered global elements.
@@ -8437,6 +8631,6 @@ defineProperty(LightningElement, 'CustomElementConstructor', {
8437
8631
  });
8438
8632
  freeze(LightningElement);
8439
8633
  seal(LightningElement.prototype);
8440
- /* version: 2.6.2 */
8634
+ /* version: 2.6.3 */
8441
8635
 
8442
8636
  export { LightningElement, profilerControl as __unstable__ProfilerControl, api$1 as api, deprecatedBuildCustomElementConstructor as buildCustomElementConstructor, createContextProvider, createElement, getComponentConstructor, getComponentDef, hydrateComponent, isComponentConstructor, isNodeFromTemplate, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };