lwc 2.5.10 → 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 +674 -471
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +674 -471
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -9
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +647 -446
  5. package/dist/engine-dom/iife/es5/engine-dom.js +737 -433
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -9
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +704 -408
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +674 -471
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -9
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +647 -446
  11. package/dist/engine-dom/umd/es5/engine-dom.js +737 -433
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -9
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +704 -408
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +754 -549
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -9
  16. package/dist/engine-server/esm/es2017/engine-server.js +754 -549
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +135 -140
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +135 -140
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +135 -140
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +146 -137
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +146 -137
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +135 -140
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +135 -140
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +146 -137
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +146 -137
  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
@@ -302,7 +302,7 @@ var LWC = (function (exports) {
302
302
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
303
303
  return attributeName;
304
304
  }
305
- /** version: 2.5.10 */
305
+ /** version: 2.6.3 */
306
306
 
307
307
  /*
308
308
  * Copyright (c) 2018, salesforce.com, inc.
@@ -416,8 +416,6 @@ var LWC = (function (exports) {
416
416
  ENABLE_NODE_LIST_PATCH: null,
417
417
  ENABLE_HTML_COLLECTIONS_PATCH: null,
418
418
  ENABLE_NODE_PATCH: null,
419
- ENABLE_NON_COMPOSED_EVENTS_LEAKAGE: null,
420
- ENABLE_MIXED_SHADOW_MODE: null,
421
419
  ENABLE_WIRE_SYNC_EMIT: null
422
420
  };
423
421
 
@@ -482,7 +480,7 @@ var LWC = (function (exports) {
482
480
  setFeatureFlag(name, value);
483
481
  }
484
482
  }
485
- /** version: 2.5.10 */
483
+ /** version: 2.6.3 */
486
484
 
487
485
  /* proxy-compat-disable */
488
486
 
@@ -556,6 +554,249 @@ var LWC = (function (exports) {
556
554
  }
557
555
 
558
556
  return styleMap;
557
+ } //
558
+ // Primitives
559
+ //
560
+
561
+
562
+ let ssr$1;
563
+
564
+ function setSsr(ssrImpl) {
565
+ ssr$1 = ssrImpl;
566
+ }
567
+
568
+ let isNativeShadowDefined$1;
569
+
570
+ function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
571
+ isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
572
+ }
573
+
574
+ let isSyntheticShadowDefined$1;
575
+
576
+ function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
577
+ isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
578
+ }
579
+
580
+ let HTMLElementExported$1;
581
+
582
+ function setHTMLElement(HTMLElementImpl) {
583
+ HTMLElementExported$1 = HTMLElementImpl;
584
+ }
585
+
586
+ let isHydrating$1;
587
+
588
+ function setIsHydrating$1(isHydratingImpl) {
589
+ isHydrating$1 = isHydratingImpl;
590
+ }
591
+
592
+ let insert$1;
593
+
594
+ function setInsert(insertImpl) {
595
+ insert$1 = insertImpl;
596
+ }
597
+
598
+ let remove$1;
599
+
600
+ function setRemove(removeImpl) {
601
+ remove$1 = removeImpl;
602
+ }
603
+
604
+ let createElement$2;
605
+
606
+ function setCreateElement(createElementImpl) {
607
+ createElement$2 = createElementImpl;
608
+ }
609
+
610
+ let createText$1;
611
+
612
+ function setCreateText(createTextImpl) {
613
+ createText$1 = createTextImpl;
614
+ }
615
+
616
+ let createComment$1;
617
+
618
+ function setCreateComment(createCommentImpl) {
619
+ createComment$1 = createCommentImpl;
620
+ }
621
+
622
+ let nextSibling$1;
623
+
624
+ function setNextSibling(nextSiblingImpl) {
625
+ nextSibling$1 = nextSiblingImpl;
626
+ }
627
+
628
+ let attachShadow$1;
629
+
630
+ function setAttachShadow(attachShadowImpl) {
631
+ attachShadow$1 = attachShadowImpl;
632
+ }
633
+
634
+ let getProperty$1;
635
+
636
+ function setGetProperty(getPropertyImpl) {
637
+ getProperty$1 = getPropertyImpl;
638
+ }
639
+
640
+ let setProperty$1;
641
+
642
+ function setSetProperty(setPropertyImpl) {
643
+ setProperty$1 = setPropertyImpl;
644
+ }
645
+
646
+ let setText$1;
647
+
648
+ function setSetText(setTextImpl) {
649
+ setText$1 = setTextImpl;
650
+ }
651
+
652
+ let getAttribute$1;
653
+
654
+ function setGetAttribute(getAttributeImpl) {
655
+ getAttribute$1 = getAttributeImpl;
656
+ }
657
+
658
+ let setAttribute$1;
659
+
660
+ function setSetAttribute(setAttributeImpl) {
661
+ setAttribute$1 = setAttributeImpl;
662
+ }
663
+
664
+ let removeAttribute$1;
665
+
666
+ function setRemoveAttribute(removeAttributeImpl) {
667
+ removeAttribute$1 = removeAttributeImpl;
668
+ }
669
+
670
+ let addEventListener$1;
671
+
672
+ function setAddEventListener(addEventListenerImpl) {
673
+ addEventListener$1 = addEventListenerImpl;
674
+ }
675
+
676
+ let removeEventListener$1;
677
+
678
+ function setRemoveEventListener(removeEventListenerImpl) {
679
+ removeEventListener$1 = removeEventListenerImpl;
680
+ }
681
+
682
+ let dispatchEvent$1;
683
+
684
+ function setDispatchEvent(dispatchEventImpl) {
685
+ dispatchEvent$1 = dispatchEventImpl;
686
+ }
687
+
688
+ let getClassList$1;
689
+
690
+ function setGetClassList(getClassListImpl) {
691
+ getClassList$1 = getClassListImpl;
692
+ }
693
+
694
+ let setCSSStyleProperty$1;
695
+
696
+ function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
697
+ setCSSStyleProperty$1 = setCSSStylePropertyImpl;
698
+ }
699
+
700
+ let getBoundingClientRect$1;
701
+
702
+ function setGetBoundingClientRect(getBoundingClientRectImpl) {
703
+ getBoundingClientRect$1 = getBoundingClientRectImpl;
704
+ }
705
+
706
+ let querySelector$1;
707
+
708
+ function setQuerySelector(querySelectorImpl) {
709
+ querySelector$1 = querySelectorImpl;
710
+ }
711
+
712
+ let querySelectorAll$1;
713
+
714
+ function setQuerySelectorAll(querySelectorAllImpl) {
715
+ querySelectorAll$1 = querySelectorAllImpl;
716
+ }
717
+
718
+ let getElementsByTagName$1;
719
+
720
+ function setGetElementsByTagName(getElementsByTagNameImpl) {
721
+ getElementsByTagName$1 = getElementsByTagNameImpl;
722
+ }
723
+
724
+ let getElementsByClassName$1;
725
+
726
+ function setGetElementsByClassName(getElementsByClassNameImpl) {
727
+ getElementsByClassName$1 = getElementsByClassNameImpl;
728
+ }
729
+
730
+ let getChildren$1;
731
+
732
+ function setGetChildren(getChildrenImpl) {
733
+ getChildren$1 = getChildrenImpl;
734
+ }
735
+
736
+ let getChildNodes$1;
737
+
738
+ function setGetChildNodes(getChildNodesImpl) {
739
+ getChildNodes$1 = getChildNodesImpl;
740
+ }
741
+
742
+ let getFirstChild$1;
743
+
744
+ function setGetFirstChild(getFirstChildImpl) {
745
+ getFirstChild$1 = getFirstChildImpl;
746
+ }
747
+
748
+ let getFirstElementChild$1;
749
+
750
+ function setGetFirstElementChild(getFirstElementChildImpl) {
751
+ getFirstElementChild$1 = getFirstElementChildImpl;
752
+ }
753
+
754
+ let getLastChild$1;
755
+
756
+ function setGetLastChild(getLastChildImpl) {
757
+ getLastChild$1 = getLastChildImpl;
758
+ }
759
+
760
+ let getLastElementChild$1;
761
+
762
+ function setGetLastElementChild(getLastElementChildImpl) {
763
+ getLastElementChild$1 = getLastElementChildImpl;
764
+ }
765
+
766
+ let isConnected$1;
767
+
768
+ function setIsConnected(isConnectedImpl) {
769
+ isConnected$1 = isConnectedImpl;
770
+ }
771
+
772
+ let insertGlobalStylesheet$1;
773
+
774
+ function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
775
+ insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
776
+ }
777
+
778
+ let insertStylesheet$1;
779
+
780
+ function setInsertStylesheet(insertStylesheetImpl) {
781
+ insertStylesheet$1 = insertStylesheetImpl;
782
+ }
783
+
784
+ let assertInstanceOfHTMLElement$1;
785
+
786
+ function setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElementImpl) {
787
+ assertInstanceOfHTMLElement$1 = assertInstanceOfHTMLElementImpl;
788
+ }
789
+
790
+ let defineCustomElement$1;
791
+
792
+ function setDefineCustomElement(defineCustomElementImpl) {
793
+ defineCustomElement$1 = defineCustomElementImpl;
794
+ }
795
+
796
+ let getCustomElement$1;
797
+
798
+ function setGetCustomElement(getCustomElementImpl) {
799
+ getCustomElement$1 = getCustomElementImpl;
559
800
  }
560
801
  /*
561
802
  * Copyright (c) 2019, salesforce.com, inc.
@@ -809,9 +1050,6 @@ var LWC = (function (exports) {
809
1050
  elm,
810
1051
  data: {
811
1052
  on
812
- },
813
- owner: {
814
- renderer
815
1053
  }
816
1054
  } = vnode;
817
1055
 
@@ -824,7 +1062,7 @@ var LWC = (function (exports) {
824
1062
  let name;
825
1063
 
826
1064
  for (name in on) {
827
- renderer.addEventListener(elm, name, listener);
1065
+ addEventListener$1(elm, name, listener);
828
1066
  }
829
1067
  }
830
1068
 
@@ -966,9 +1204,6 @@ var LWC = (function (exports) {
966
1204
  const {
967
1205
  data: {
968
1206
  attrs
969
- },
970
- owner: {
971
- renderer
972
1207
  }
973
1208
  } = vnode;
974
1209
 
@@ -991,10 +1226,6 @@ var LWC = (function (exports) {
991
1226
  }
992
1227
 
993
1228
  const elm = vnode.elm;
994
- const {
995
- setAttribute,
996
- removeAttribute
997
- } = renderer;
998
1229
  let key;
999
1230
  oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
1000
1231
  // this routine is only useful for data-* attributes in all kind of elements
@@ -1009,14 +1240,14 @@ var LWC = (function (exports) {
1009
1240
 
1010
1241
  if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
1011
1242
  // Assume xml namespace
1012
- setAttribute(elm, key, cur, xmlNS);
1243
+ setAttribute$1(elm, key, cur, xmlNS);
1013
1244
  } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
1014
1245
  // Assume xlink namespace
1015
- setAttribute(elm, key, cur, xlinkNS);
1016
- } else if (isNull(cur)) {
1017
- removeAttribute(elm, key);
1246
+ setAttribute$1(elm, key, cur, xlinkNS);
1247
+ } else if (isNull(cur) || isUndefined$1(cur)) {
1248
+ removeAttribute$1(elm, key);
1018
1249
  } else {
1019
- setAttribute(elm, key, cur);
1250
+ setAttribute$1(elm, key, cur);
1020
1251
  }
1021
1252
 
1022
1253
  lockAttribute();
@@ -1064,17 +1295,14 @@ var LWC = (function (exports) {
1064
1295
  const isFirstPatch = isUndefined$1(oldProps);
1065
1296
  const {
1066
1297
  elm,
1067
- sel,
1068
- owner: {
1069
- renderer
1070
- }
1298
+ sel
1071
1299
  } = vnode;
1072
1300
 
1073
1301
  for (const key in props) {
1074
1302
  const cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
1075
1303
 
1076
- if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? renderer.getProperty(elm, key) : oldProps[key])) {
1077
- renderer.setProperty(elm, key, cur);
1304
+ if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
1305
+ setProperty$1(elm, key, cur);
1078
1306
  }
1079
1307
  }
1080
1308
  }
@@ -1143,9 +1371,6 @@ var LWC = (function (exports) {
1143
1371
  elm,
1144
1372
  data: {
1145
1373
  className: newClass
1146
- },
1147
- owner: {
1148
- renderer
1149
1374
  }
1150
1375
  } = vnode;
1151
1376
  const {
@@ -1158,7 +1383,7 @@ var LWC = (function (exports) {
1158
1383
  return;
1159
1384
  }
1160
1385
 
1161
- const classList = renderer.getClassList(elm);
1386
+ const classList = getClassList$1(elm);
1162
1387
  const newClassMap = getMapFromClassName(newClass);
1163
1388
  const oldClassMap = getMapFromClassName(oldClass);
1164
1389
  let name;
@@ -1196,24 +1421,17 @@ var LWC = (function (exports) {
1196
1421
  elm,
1197
1422
  data: {
1198
1423
  style: newStyle
1199
- },
1200
- owner: {
1201
- renderer
1202
1424
  }
1203
1425
  } = vnode;
1204
- const {
1205
- setAttribute,
1206
- removeAttribute
1207
- } = renderer;
1208
1426
 
1209
1427
  if (oldVnode.data.style === newStyle) {
1210
1428
  return;
1211
1429
  }
1212
1430
 
1213
1431
  if (!isString(newStyle) || newStyle === '') {
1214
- removeAttribute(elm, 'style');
1432
+ removeAttribute$1(elm, 'style');
1215
1433
  } else {
1216
- setAttribute(elm, 'style', newStyle);
1434
+ setAttribute$1(elm, 'style', newStyle);
1217
1435
  }
1218
1436
  }
1219
1437
 
@@ -1238,9 +1456,6 @@ var LWC = (function (exports) {
1238
1456
  elm,
1239
1457
  data: {
1240
1458
  classMap
1241
- },
1242
- owner: {
1243
- renderer
1244
1459
  }
1245
1460
  } = vnode;
1246
1461
 
@@ -1248,7 +1463,7 @@ var LWC = (function (exports) {
1248
1463
  return;
1249
1464
  }
1250
1465
 
1251
- const classList = renderer.getClassList(elm);
1466
+ const classList = getClassList$1(elm);
1252
1467
 
1253
1468
  for (const name in classMap) {
1254
1469
  classList.add(name);
@@ -1272,9 +1487,6 @@ var LWC = (function (exports) {
1272
1487
  elm,
1273
1488
  data: {
1274
1489
  styleDecls
1275
- },
1276
- owner: {
1277
- renderer
1278
1490
  }
1279
1491
  } = vnode;
1280
1492
 
@@ -1284,7 +1496,7 @@ var LWC = (function (exports) {
1284
1496
 
1285
1497
  for (let i = 0; i < styleDecls.length; i++) {
1286
1498
  const [prop, value, important] = styleDecls[i];
1287
- renderer.setCSSStyleProperty(elm, prop, value, important);
1499
+ setCSSStyleProperty$1(elm, prop, value, important);
1288
1500
  }
1289
1501
  }
1290
1502
 
@@ -1298,15 +1510,6 @@ var LWC = (function (exports) {
1298
1510
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1299
1511
  */
1300
1512
 
1301
- /**
1302
- @license
1303
- Copyright (c) 2015 Simon Friis Vindum.
1304
- This code may only be used under the MIT License found at
1305
- https://github.com/snabbdom/snabbdom/blob/master/LICENSE
1306
- Code distributed by Snabbdom as part of the Snabbdom project at
1307
- https://github.com/snabbdom/snabbdom/
1308
- */
1309
-
1310
1513
  function isUndef(s) {
1311
1514
  return s === undefined;
1312
1515
  }
@@ -1394,7 +1597,7 @@ var LWC = (function (exports) {
1394
1597
  } else if (sameVnode(oldStartVnode, newEndVnode)) {
1395
1598
  // Vnode moved right
1396
1599
  patchVnode(oldStartVnode, newEndVnode);
1397
- newEndVnode.hook.move(oldStartVnode, parentElm, oldEndVnode.owner.renderer.nextSibling(oldEndVnode.elm));
1600
+ newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
1398
1601
  oldStartVnode = oldCh[++oldStartIdx];
1399
1602
  newEndVnode = newCh[--newEndIdx];
1400
1603
  } else if (sameVnode(oldEndVnode, newStartVnode)) {
@@ -1876,7 +2079,7 @@ var LWC = (function (exports) {
1876
2079
  defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
1877
2080
  }
1878
2081
  /*
1879
- * Copyright (c) 2020, salesforce.com, inc.
2082
+ * Copyright (c) 2018, salesforce.com, inc.
1880
2083
  * All rights reserved.
1881
2084
  * SPDX-License-Identifier: MIT
1882
2085
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -1929,6 +2132,7 @@ var LWC = (function (exports) {
1929
2132
  isArray
1930
2133
  } = Array;
1931
2134
  const {
2135
+ prototype: ObjectDotPrototype,
1932
2136
  getPrototypeOf,
1933
2137
  create: ObjectCreate,
1934
2138
  defineProperty: ObjectDefineProperty,
@@ -2578,8 +2782,6 @@ var LWC = (function (exports) {
2578
2782
  init();
2579
2783
  }
2580
2784
 
2581
- const ObjectDotPrototype = Object.prototype;
2582
-
2583
2785
  function defaultValueIsObservable(value) {
2584
2786
  // intentionally checking for null
2585
2787
  if (value === null) {
@@ -2607,99 +2809,85 @@ var LWC = (function (exports) {
2607
2809
  /* do nothing */
2608
2810
  };
2609
2811
 
2610
- const defaultValueDistortion = value => value;
2611
-
2612
2812
  function createShadowTarget(value) {
2613
2813
  return isArray(value) ? [] : {};
2614
2814
  }
2615
2815
 
2616
- class ReactiveMembrane {
2617
- constructor(options) {
2618
- this.valueDistortion = defaultValueDistortion;
2619
- this.valueMutated = defaultValueMutated;
2620
- this.valueObserved = defaultValueObserved;
2621
- this.valueIsObservable = defaultValueIsObservable;
2816
+ class ObservableMembrane {
2817
+ constructor(options = {}) {
2622
2818
  this.readOnlyObjectGraph = new WeakMap();
2623
2819
  this.reactiveObjectGraph = new WeakMap();
2624
-
2625
- if (!isUndefined(options)) {
2626
- const {
2627
- valueDistortion,
2628
- valueMutated,
2629
- valueObserved,
2630
- valueIsObservable,
2631
- tagPropertyKey
2632
- } = options;
2633
- this.valueDistortion = isFunction(valueDistortion) ? valueDistortion : defaultValueDistortion;
2634
- this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
2635
- this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
2636
- this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2637
- this.tagPropertyKey = tagPropertyKey;
2638
- }
2820
+ const {
2821
+ valueMutated,
2822
+ valueObserved,
2823
+ valueIsObservable,
2824
+ tagPropertyKey
2825
+ } = options;
2826
+ this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
2827
+ this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
2828
+ this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2829
+ this.tagPropertyKey = tagPropertyKey;
2639
2830
  }
2640
2831
 
2641
2832
  getProxy(value) {
2642
2833
  const unwrappedValue = unwrap$1(value);
2643
- const distorted = this.valueDistortion(unwrappedValue);
2644
2834
 
2645
- if (this.valueIsObservable(distorted)) {
2646
- if (this.readOnlyObjectGraph.get(distorted) === value) {
2647
- // when trying to extract the writable version of a readonly
2648
- // we return the readonly.
2835
+ if (this.valueIsObservable(unwrappedValue)) {
2836
+ // When trying to extract the writable version of a readonly we return the readonly.
2837
+ if (this.readOnlyObjectGraph.get(unwrappedValue) === value) {
2649
2838
  return value;
2650
2839
  }
2651
2840
 
2652
- return this.getReactiveHandler(unwrappedValue, distorted);
2841
+ return this.getReactiveHandler(unwrappedValue);
2653
2842
  }
2654
2843
 
2655
- return distorted;
2844
+ return unwrappedValue;
2656
2845
  }
2657
2846
 
2658
2847
  getReadOnlyProxy(value) {
2659
2848
  value = unwrap$1(value);
2660
- const distorted = this.valueDistortion(value);
2661
2849
 
2662
- if (this.valueIsObservable(distorted)) {
2663
- return this.getReadOnlyHandler(value, distorted);
2850
+ if (this.valueIsObservable(value)) {
2851
+ return this.getReadOnlyHandler(value);
2664
2852
  }
2665
2853
 
2666
- return distorted;
2854
+ return value;
2667
2855
  }
2668
2856
 
2669
2857
  unwrapProxy(p) {
2670
2858
  return unwrap$1(p);
2671
2859
  }
2672
2860
 
2673
- getReactiveHandler(value, distortedValue) {
2674
- let proxy = this.reactiveObjectGraph.get(distortedValue);
2861
+ getReactiveHandler(value) {
2862
+ let proxy = this.reactiveObjectGraph.get(value);
2675
2863
 
2676
2864
  if (isUndefined(proxy)) {
2677
2865
  // caching the proxy after the first time it is accessed
2678
- const handler = new ReactiveProxyHandler(this, distortedValue);
2679
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2866
+ const handler = new ReactiveProxyHandler(this, value);
2867
+ proxy = new Proxy(createShadowTarget(value), handler);
2680
2868
  registerProxy(proxy, value);
2681
- this.reactiveObjectGraph.set(distortedValue, proxy);
2869
+ this.reactiveObjectGraph.set(value, proxy);
2682
2870
  }
2683
2871
 
2684
2872
  return proxy;
2685
2873
  }
2686
2874
 
2687
- getReadOnlyHandler(value, distortedValue) {
2688
- let proxy = this.readOnlyObjectGraph.get(distortedValue);
2875
+ getReadOnlyHandler(value) {
2876
+ let proxy = this.readOnlyObjectGraph.get(value);
2689
2877
 
2690
2878
  if (isUndefined(proxy)) {
2691
2879
  // caching the proxy after the first time it is accessed
2692
- const handler = new ReadOnlyHandler(this, distortedValue);
2693
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2880
+ const handler = new ReadOnlyHandler(this, value);
2881
+ proxy = new Proxy(createShadowTarget(value), handler);
2694
2882
  registerProxy(proxy, value);
2695
- this.readOnlyObjectGraph.set(distortedValue, proxy);
2883
+ this.readOnlyObjectGraph.set(value, proxy);
2696
2884
  }
2697
2885
 
2698
2886
  return proxy;
2699
2887
  }
2700
2888
 
2701
2889
  }
2702
- /** version: 1.1.5 */
2890
+ /** version: 2.0.0 */
2703
2891
 
2704
2892
  /*
2705
2893
  * Copyright (c) 2018, salesforce.com, inc.
@@ -2710,15 +2898,9 @@ var LWC = (function (exports) {
2710
2898
 
2711
2899
 
2712
2900
  const lockerLivePropertyKey = Symbol.for('@@lockerLiveValue');
2713
-
2714
- function valueDistortion(value) {
2715
- return value;
2716
- }
2717
-
2718
- const reactiveMembrane = new ReactiveMembrane({
2901
+ const reactiveMembrane = new ObservableMembrane({
2719
2902
  valueObserved,
2720
2903
  valueMutated,
2721
- valueDistortion,
2722
2904
  tagPropertyKey: lockerLivePropertyKey
2723
2905
  });
2724
2906
  /**
@@ -2727,16 +2909,9 @@ var LWC = (function (exports) {
2727
2909
  * change or being removed.
2728
2910
  */
2729
2911
 
2730
- const unwrap = function (value) {
2731
- const unwrapped = reactiveMembrane.unwrapProxy(value);
2732
-
2733
- if (unwrapped !== value) {
2734
- // if value is a proxy, unwrap to access original value and apply distortion
2735
- return valueDistortion(unwrapped);
2736
- }
2737
-
2738
- return value;
2739
- };
2912
+ function unwrap(value) {
2913
+ return reactiveMembrane.unwrapProxy(value);
2914
+ }
2740
2915
  /*
2741
2916
  * Copyright (c) 2018, salesforce.com, inc.
2742
2917
  * All rights reserved.
@@ -2824,9 +2999,7 @@ var LWC = (function (exports) {
2824
2999
 
2825
3000
 
2826
3001
  const LightningElement = function () {
2827
- var _a; // This should be as performant as possible, while any initialization should be done lazily
2828
-
2829
-
3002
+ // This should be as performant as possible, while any initialization should be done lazily
2830
3003
  if (isNull(vmBeingConstructed)) {
2831
3004
  throw new ReferenceError('Illegal constructor');
2832
3005
  }
@@ -2834,15 +3007,14 @@ var LWC = (function (exports) {
2834
3007
  const vm = vmBeingConstructed;
2835
3008
  const {
2836
3009
  def,
2837
- elm,
2838
- renderer
3010
+ elm
2839
3011
  } = vm;
2840
3012
  const {
2841
3013
  bridge
2842
3014
  } = def;
2843
3015
 
2844
3016
  if (process.env.NODE_ENV !== 'production') {
2845
- (_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}.`);
3017
+ assertInstanceOfHTMLElement$1(vm.elm, `Component creation requires a DOM element to be associated to ${vm}.`);
2846
3018
  }
2847
3019
 
2848
3020
  const component = this;
@@ -2872,7 +3044,7 @@ var LWC = (function (exports) {
2872
3044
  if (vm.renderMode === 1
2873
3045
  /* Shadow */
2874
3046
  ) {
2875
- attachShadow(vm);
3047
+ doAttachShadow(vm);
2876
3048
  } // Adding extra guard rails in DEV mode.
2877
3049
 
2878
3050
 
@@ -2884,17 +3056,16 @@ var LWC = (function (exports) {
2884
3056
  return this;
2885
3057
  };
2886
3058
 
2887
- function attachShadow(vm) {
3059
+ function doAttachShadow(vm) {
2888
3060
  const {
2889
3061
  elm,
2890
3062
  mode,
2891
- renderer,
2892
3063
  shadowMode,
2893
3064
  def: {
2894
3065
  ctor
2895
3066
  }
2896
3067
  } = vm;
2897
- const cmpRoot = renderer.attachShadow(elm, {
3068
+ const cmpRoot = attachShadow$1(elm, {
2898
3069
  [KEY__SYNTHETIC_MODE]: shadowMode === 1
2899
3070
  /* Synthetic */
2900
3071
  ,
@@ -2921,21 +3092,15 @@ var LWC = (function (exports) {
2921
3092
 
2922
3093
  dispatchEvent(event) {
2923
3094
  const {
2924
- elm,
2925
- renderer: {
2926
- dispatchEvent
2927
- }
3095
+ elm
2928
3096
  } = getAssociatedVM(this);
2929
- return dispatchEvent(elm, event);
3097
+ return dispatchEvent$1(elm, event);
2930
3098
  },
2931
3099
 
2932
3100
  addEventListener(type, listener, options) {
2933
3101
  const vm = getAssociatedVM(this);
2934
3102
  const {
2935
- elm,
2936
- renderer: {
2937
- addEventListener
2938
- }
3103
+ elm
2939
3104
  } = vm;
2940
3105
 
2941
3106
  if (process.env.NODE_ENV !== 'production') {
@@ -2946,92 +3111,68 @@ var LWC = (function (exports) {
2946
3111
  }
2947
3112
 
2948
3113
  const wrappedListener = getWrappedComponentsListener(vm, listener);
2949
- addEventListener(elm, type, wrappedListener, options);
3114
+ addEventListener$1(elm, type, wrappedListener, options);
2950
3115
  },
2951
3116
 
2952
3117
  removeEventListener(type, listener, options) {
2953
3118
  const vm = getAssociatedVM(this);
2954
3119
  const {
2955
- elm,
2956
- renderer: {
2957
- removeEventListener
2958
- }
3120
+ elm
2959
3121
  } = vm;
2960
3122
  const wrappedListener = getWrappedComponentsListener(vm, listener);
2961
- removeEventListener(elm, type, wrappedListener, options);
3123
+ removeEventListener$1(elm, type, wrappedListener, options);
2962
3124
  },
2963
3125
 
2964
3126
  hasAttribute(name) {
2965
3127
  const {
2966
- elm,
2967
- renderer: {
2968
- getAttribute
2969
- }
3128
+ elm
2970
3129
  } = getAssociatedVM(this);
2971
- return !isNull(getAttribute(elm, name));
3130
+ return !isNull(getAttribute$1(elm, name));
2972
3131
  },
2973
3132
 
2974
3133
  hasAttributeNS(namespace, name) {
2975
3134
  const {
2976
- elm,
2977
- renderer: {
2978
- getAttribute
2979
- }
3135
+ elm
2980
3136
  } = getAssociatedVM(this);
2981
- return !isNull(getAttribute(elm, name, namespace));
3137
+ return !isNull(getAttribute$1(elm, name, namespace));
2982
3138
  },
2983
3139
 
2984
3140
  removeAttribute(name) {
2985
3141
  const {
2986
- elm,
2987
- renderer: {
2988
- removeAttribute
2989
- }
3142
+ elm
2990
3143
  } = getAssociatedVM(this);
2991
3144
  unlockAttribute(elm, name);
2992
- removeAttribute(elm, name);
3145
+ removeAttribute$1(elm, name);
2993
3146
  lockAttribute();
2994
3147
  },
2995
3148
 
2996
3149
  removeAttributeNS(namespace, name) {
2997
3150
  const {
2998
- elm,
2999
- renderer: {
3000
- removeAttribute
3001
- }
3151
+ elm
3002
3152
  } = getAssociatedVM(this);
3003
3153
  unlockAttribute(elm, name);
3004
- removeAttribute(elm, name, namespace);
3154
+ removeAttribute$1(elm, name, namespace);
3005
3155
  lockAttribute();
3006
3156
  },
3007
3157
 
3008
3158
  getAttribute(name) {
3009
3159
  const {
3010
- elm,
3011
- renderer: {
3012
- getAttribute
3013
- }
3160
+ elm
3014
3161
  } = getAssociatedVM(this);
3015
- return getAttribute(elm, name);
3162
+ return getAttribute$1(elm, name);
3016
3163
  },
3017
3164
 
3018
3165
  getAttributeNS(namespace, name) {
3019
3166
  const {
3020
- elm,
3021
- renderer: {
3022
- getAttribute
3023
- }
3167
+ elm
3024
3168
  } = getAssociatedVM(this);
3025
- return getAttribute(elm, name, namespace);
3169
+ return getAttribute$1(elm, name, namespace);
3026
3170
  },
3027
3171
 
3028
3172
  setAttribute(name, value) {
3029
3173
  const vm = getAssociatedVM(this);
3030
3174
  const {
3031
- elm,
3032
- renderer: {
3033
- setAttribute
3034
- }
3175
+ elm
3035
3176
  } = vm;
3036
3177
 
3037
3178
  if (process.env.NODE_ENV !== 'production') {
@@ -3039,17 +3180,14 @@ var LWC = (function (exports) {
3039
3180
  }
3040
3181
 
3041
3182
  unlockAttribute(elm, name);
3042
- setAttribute(elm, name, value);
3183
+ setAttribute$1(elm, name, value);
3043
3184
  lockAttribute();
3044
3185
  },
3045
3186
 
3046
3187
  setAttributeNS(namespace, name, value) {
3047
3188
  const vm = getAssociatedVM(this);
3048
3189
  const {
3049
- elm,
3050
- renderer: {
3051
- setAttribute
3052
- }
3190
+ elm
3053
3191
  } = vm;
3054
3192
 
3055
3193
  if (process.env.NODE_ENV !== 'production') {
@@ -3057,43 +3195,34 @@ var LWC = (function (exports) {
3057
3195
  }
3058
3196
 
3059
3197
  unlockAttribute(elm, name);
3060
- setAttribute(elm, name, value, namespace);
3198
+ setAttribute$1(elm, name, value, namespace);
3061
3199
  lockAttribute();
3062
3200
  },
3063
3201
 
3064
3202
  getBoundingClientRect() {
3065
3203
  const vm = getAssociatedVM(this);
3066
3204
  const {
3067
- elm,
3068
- renderer: {
3069
- getBoundingClientRect
3070
- }
3205
+ elm
3071
3206
  } = vm;
3072
3207
 
3073
3208
  if (process.env.NODE_ENV !== 'production') {
3074
3209
  warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
3075
3210
  }
3076
3211
 
3077
- return getBoundingClientRect(elm);
3212
+ return getBoundingClientRect$1(elm);
3078
3213
  },
3079
3214
 
3080
3215
  get isConnected() {
3081
3216
  const {
3082
- elm,
3083
- renderer: {
3084
- isConnected
3085
- }
3217
+ elm
3086
3218
  } = getAssociatedVM(this);
3087
- return isConnected(elm);
3219
+ return isConnected$1(elm);
3088
3220
  },
3089
3221
 
3090
3222
  get classList() {
3091
3223
  const vm = getAssociatedVM(this);
3092
3224
  const {
3093
- elm,
3094
- renderer: {
3095
- getClassList
3096
- }
3225
+ elm
3097
3226
  } = vm;
3098
3227
 
3099
3228
  if (process.env.NODE_ENV !== 'production') {
@@ -3102,7 +3231,7 @@ var LWC = (function (exports) {
3102
3231
  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.`);
3103
3232
  }
3104
3233
 
3105
- return getClassList(elm);
3234
+ return getClassList$1(elm);
3106
3235
  },
3107
3236
 
3108
3237
  get template() {
@@ -3136,23 +3265,48 @@ var LWC = (function (exports) {
3136
3265
  }
3137
3266
 
3138
3267
  };
3139
- const queryAndChildGetterDescriptors = create(null);
3140
- 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
3268
+ const queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
3269
+ // is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
3270
+ // object representing the renderer, with a lot of methods we don't actually need.
3271
+
3272
+ const childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
3273
+
3274
+ function getChildGetter(methodName) {
3275
+ switch (methodName) {
3276
+ case 'children':
3277
+ return getChildren$1;
3278
+
3279
+ case 'childNodes':
3280
+ return getChildNodes$1;
3281
+
3282
+ case 'firstChild':
3283
+ return getFirstChild$1;
3284
+
3285
+ case 'firstElementChild':
3286
+ return getFirstElementChild$1;
3287
+
3288
+ case 'lastChild':
3289
+ return getLastChild$1;
3290
+
3291
+ case 'lastElementChild':
3292
+ return getLastElementChild$1;
3293
+ }
3294
+ } // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
3295
+
3141
3296
 
3142
- for (const [elementProp, rendererMethod] of childGetters) {
3143
- queryAndChildGetterDescriptors[elementProp] = {
3297
+ for (const childGetter of childGetters) {
3298
+ queryAndChildGetterDescriptors[childGetter] = {
3144
3299
  get() {
3145
3300
  const vm = getAssociatedVM(this);
3146
3301
  const {
3147
- elm,
3148
- renderer
3302
+ elm
3149
3303
  } = vm;
3150
3304
 
3151
3305
  if (process.env.NODE_ENV !== 'production') {
3152
- warnIfInvokedDuringConstruction(vm, elementProp);
3306
+ warnIfInvokedDuringConstruction(vm, childGetter);
3153
3307
  }
3154
3308
 
3155
- return renderer[rendererMethod](elm);
3309
+ return getChildGetter(childGetter)(elm);
3156
3310
  },
3157
3311
 
3158
3312
  configurable: true,
@@ -3160,22 +3314,38 @@ var LWC = (function (exports) {
3160
3314
  };
3161
3315
  }
3162
3316
 
3163
- const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
3317
+ const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
3318
+
3319
+ function getQueryMethod(methodName) {
3320
+ switch (methodName) {
3321
+ case 'getElementsByClassName':
3322
+ return getElementsByClassName$1;
3323
+
3324
+ case 'getElementsByTagName':
3325
+ return getElementsByTagName$1;
3326
+
3327
+ case 'querySelector':
3328
+ return querySelector$1;
3329
+
3330
+ case 'querySelectorAll':
3331
+ return querySelectorAll$1;
3332
+ }
3333
+ } // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
3334
+
3164
3335
 
3165
3336
  for (const queryMethod of queryMethods) {
3166
3337
  queryAndChildGetterDescriptors[queryMethod] = {
3167
3338
  value(arg) {
3168
3339
  const vm = getAssociatedVM(this);
3169
3340
  const {
3170
- elm,
3171
- renderer
3341
+ elm
3172
3342
  } = vm;
3173
3343
 
3174
3344
  if (process.env.NODE_ENV !== 'production') {
3175
3345
  warnIfInvokedDuringConstruction(vm, `${queryMethod}()`);
3176
3346
  }
3177
3347
 
3178
- return renderer[queryMethod](elm, arg);
3348
+ return getQueryMethod(queryMethod)(elm, arg);
3179
3349
  },
3180
3350
 
3181
3351
  configurable: true,
@@ -4331,10 +4501,6 @@ var LWC = (function (exports) {
4331
4501
 
4332
4502
  assert.isTrue(Ctor.constructor, `Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
4333
4503
 
4334
- if (!runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
4335
- assert.isFalse('shadowSupportMode' in Ctor, `${ctorName || 'Anonymous class'} is an invalid LWC component. The shadowSupportMode static property is not available in this environment.`);
4336
- }
4337
-
4338
4504
  if (!isUndefined$1(ctorShadowSupportMode)) {
4339
4505
  assert.invariant(ctorShadowSupportMode === "any"
4340
4506
  /* Any */
@@ -4578,17 +4744,14 @@ var LWC = (function (exports) {
4578
4744
  const token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
4579
4745
 
4580
4746
  if (!isUndefined$1(token) && context.hasScopedStyles) {
4581
- owner.renderer.getClassList(elm).add(token);
4747
+ getClassList$1(elm).add(token);
4582
4748
  }
4583
4749
  }
4584
4750
 
4585
4751
  function updateNodeHook(oldVnode, vnode) {
4586
4752
  const {
4587
4753
  elm,
4588
- text,
4589
- owner: {
4590
- renderer
4591
- }
4754
+ text
4592
4755
  } = vnode;
4593
4756
 
4594
4757
  if (oldVnode.text !== text) {
@@ -4596,7 +4759,7 @@ var LWC = (function (exports) {
4596
4759
  unlockDomMutation();
4597
4760
  }
4598
4761
 
4599
- renderer.setText(elm, text);
4762
+ setText$1(elm, text);
4600
4763
 
4601
4764
  if (process.env.NODE_ENV !== 'production') {
4602
4765
  lockDomMutation();
@@ -4605,15 +4768,11 @@ var LWC = (function (exports) {
4605
4768
  }
4606
4769
 
4607
4770
  function insertNodeHook(vnode, parentNode, referenceNode) {
4608
- const {
4609
- renderer
4610
- } = vnode.owner;
4611
-
4612
4771
  if (process.env.NODE_ENV !== 'production') {
4613
4772
  unlockDomMutation();
4614
4773
  }
4615
4774
 
4616
- renderer.insert(vnode.elm, parentNode, referenceNode);
4775
+ insert$1(vnode.elm, parentNode, referenceNode);
4617
4776
 
4618
4777
  if (process.env.NODE_ENV !== 'production') {
4619
4778
  lockDomMutation();
@@ -4621,15 +4780,11 @@ var LWC = (function (exports) {
4621
4780
  }
4622
4781
 
4623
4782
  function removeNodeHook(vnode, parentNode) {
4624
- const {
4625
- renderer
4626
- } = vnode.owner;
4627
-
4628
4783
  if (process.env.NODE_ENV !== 'production') {
4629
4784
  unlockDomMutation();
4630
4785
  }
4631
4786
 
4632
- renderer.remove(vnode.elm, parentNode);
4787
+ remove$1(vnode.elm, parentNode);
4633
4788
 
4634
4789
  if (process.env.NODE_ENV !== 'production') {
4635
4790
  lockDomMutation();
@@ -4721,13 +4876,15 @@ var LWC = (function (exports) {
4721
4876
 
4722
4877
  function updateChildrenHook(oldVnode, vnode) {
4723
4878
  const {
4724
- children,
4725
- owner
4879
+ elm,
4880
+ children
4726
4881
  } = vnode;
4727
- const fn = hasDynamicChildren(children) ? updateDynamicChildren : updateStaticChildren;
4728
- runWithBoundaryProtection(owner, owner.owner, noop, () => {
4729
- fn(vnode.elm, oldVnode.children, children);
4730
- }, noop);
4882
+
4883
+ if (hasDynamicChildren(children)) {
4884
+ updateDynamicChildren(elm, oldVnode.children, children);
4885
+ } else {
4886
+ updateStaticChildren(elm, oldVnode.children, children);
4887
+ }
4731
4888
  }
4732
4889
 
4733
4890
  function allocateChildrenHook(vnode, vm) {
@@ -4793,8 +4950,7 @@ var LWC = (function (exports) {
4793
4950
  createVM(elm, def, {
4794
4951
  mode,
4795
4952
  owner,
4796
- tagName: sel,
4797
- renderer: owner.renderer
4953
+ tagName: sel
4798
4954
  });
4799
4955
 
4800
4956
  if (process.env.NODE_ENV !== 'production') {
@@ -4840,16 +4996,13 @@ var LWC = (function (exports) {
4840
4996
  const {
4841
4997
  data: {
4842
4998
  attrs = {}
4843
- },
4844
- owner: {
4845
- renderer
4846
4999
  }
4847
5000
  } = vnode;
4848
5001
  let nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
4849
5002
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
4850
5003
 
4851
5004
  for (const [attrName, attrValue] of Object.entries(attrs)) {
4852
- const elmAttrValue = renderer.getAttribute(elm, attrName);
5005
+ const elmAttrValue = getAttribute$1(elm, attrName);
4853
5006
 
4854
5007
  if (String(attrValue) !== elmAttrValue) {
4855
5008
  logError(`Mismatch hydrating element <${elm.tagName.toLowerCase()}>: attribute "${attrName}" has different values, expected "${attrValue}" but found "${elmAttrValue}"`, vnode.owner);
@@ -4865,9 +5018,6 @@ var LWC = (function (exports) {
4865
5018
  data: {
4866
5019
  className,
4867
5020
  classMap
4868
- },
4869
- owner: {
4870
- renderer
4871
5021
  }
4872
5022
  } = vnode;
4873
5023
  let nodesAreCompatible = true;
@@ -4879,7 +5029,7 @@ var LWC = (function (exports) {
4879
5029
  vnodeClassName = className;
4880
5030
  } else if (!isUndefined$1(classMap)) {
4881
5031
  // classMap is used when class is set to static value.
4882
- const classList = renderer.getClassList(elm);
5032
+ const classList = getClassList$1(elm);
4883
5033
  let computedClassName = ''; // all classes from the vnode should be in the element.classList
4884
5034
 
4885
5035
  for (const name in classMap) {
@@ -4909,12 +5059,9 @@ var LWC = (function (exports) {
4909
5059
  data: {
4910
5060
  style,
4911
5061
  styleDecls
4912
- },
4913
- owner: {
4914
- renderer
4915
5062
  }
4916
5063
  } = vnode;
4917
- const elmStyle = renderer.getAttribute(elm, 'style') || '';
5064
+ const elmStyle = getAttribute$1(elm, 'style') || '';
4918
5065
  let vnodeStyle;
4919
5066
  let nodesAreCompatible = true;
4920
5067
 
@@ -5051,12 +5198,12 @@ var LWC = (function (exports) {
5051
5198
  */
5052
5199
 
5053
5200
 
5054
- function getUpgradableConstructor(tagName, renderer) {
5201
+ function getUpgradableConstructor(tagName) {
5055
5202
  // Should never get a tag with upper case letter at this point, the compiler should
5056
5203
  // produce only tags with lowercase letters
5057
5204
  // But, for backwards compatibility, we will lower case the tagName
5058
5205
  tagName = tagName.toLowerCase();
5059
- let CE = renderer.getCustomElement(tagName);
5206
+ let CE = getCustomElement$1(tagName);
5060
5207
 
5061
5208
  if (!isUndefined$1(CE)) {
5062
5209
  return CE;
@@ -5067,7 +5214,7 @@ var LWC = (function (exports) {
5067
5214
  */
5068
5215
 
5069
5216
 
5070
- CE = class LWCUpgradableElement extends renderer.HTMLElement {
5217
+ CE = class LWCUpgradableElement extends HTMLElementExported$1 {
5071
5218
  constructor(upgradeCallback) {
5072
5219
  super();
5073
5220
 
@@ -5077,7 +5224,7 @@ var LWC = (function (exports) {
5077
5224
  }
5078
5225
 
5079
5226
  };
5080
- renderer.defineCustomElement(tagName, CE);
5227
+ defineCustomElement$1(tagName, CE);
5081
5228
  return CE;
5082
5229
  }
5083
5230
  /*
@@ -5095,10 +5242,7 @@ var LWC = (function (exports) {
5095
5242
  const {
5096
5243
  owner
5097
5244
  } = vnode;
5098
- const {
5099
- renderer
5100
- } = owner;
5101
- const elm = renderer.createText(vnode.text);
5245
+ const elm = createText$1(vnode.text);
5102
5246
  linkNodeToShadow(elm, owner);
5103
5247
  vnode.elm = elm;
5104
5248
  },
@@ -5132,10 +5276,7 @@ var LWC = (function (exports) {
5132
5276
  owner,
5133
5277
  text
5134
5278
  } = vnode;
5135
- const {
5136
- renderer
5137
- } = owner;
5138
- const elm = renderer.createComment(text);
5279
+ const elm = createComment$1(text);
5139
5280
  linkNodeToShadow(elm, owner);
5140
5281
  vnode.elm = elm;
5141
5282
  },
@@ -5177,11 +5318,8 @@ var LWC = (function (exports) {
5177
5318
  svg
5178
5319
  }
5179
5320
  } = vnode;
5180
- const {
5181
- renderer
5182
- } = owner;
5183
5321
  const namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
5184
- const elm = renderer.createElement(sel, namespace);
5322
+ const elm = createElement$2(sel, namespace);
5185
5323
  linkNodeToShadow(elm, owner);
5186
5324
  fallbackElmHook(elm, vnode);
5187
5325
  vnode.elm = elm;
@@ -5241,10 +5379,7 @@ var LWC = (function (exports) {
5241
5379
  sel,
5242
5380
  owner
5243
5381
  } = vnode;
5244
- const {
5245
- renderer
5246
- } = owner;
5247
- const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
5382
+ const UpgradableConstructor = getUpgradableConstructor(sel);
5248
5383
  /**
5249
5384
  * Note: if the upgradable constructor does not expect, or throw when we new it
5250
5385
  * with a callback as the first argument, we could implement a more advanced
@@ -5337,8 +5472,7 @@ var LWC = (function (exports) {
5337
5472
  createVM(elm, def, {
5338
5473
  mode,
5339
5474
  owner,
5340
- tagName: sel,
5341
- renderer: owner.renderer
5475
+ tagName: sel
5342
5476
  });
5343
5477
  vnode.elm = elm;
5344
5478
  const vm = getAssociatedVM(elm);
@@ -5367,12 +5501,11 @@ var LWC = (function (exports) {
5367
5501
 
5368
5502
  function linkNodeToShadow(elm, owner) {
5369
5503
  const {
5370
- renderer,
5371
5504
  renderMode,
5372
5505
  shadowMode
5373
5506
  } = owner; // TODO [#1164]: this should eventually be done by the polyfill directly
5374
5507
 
5375
- if (renderer.isSyntheticShadowDefined) {
5508
+ if (isSyntheticShadowDefined$1) {
5376
5509
  if (shadowMode === 1
5377
5510
  /* Synthetic */
5378
5511
  || renderMode === 0
@@ -5904,7 +6037,6 @@ var LWC = (function (exports) {
5904
6037
  const {
5905
6038
  elm,
5906
6039
  context,
5907
- renderer,
5908
6040
  renderMode,
5909
6041
  shadowMode
5910
6042
  } = vm;
@@ -5931,11 +6063,11 @@ var LWC = (function (exports) {
5931
6063
  } = context;
5932
6064
 
5933
6065
  if (oldHasTokenInClass) {
5934
- renderer.getClassList(elm).remove(makeHostToken(oldToken));
6066
+ getClassList$1(elm).remove(makeHostToken(oldToken));
5935
6067
  }
5936
6068
 
5937
6069
  if (oldHasTokenInAttribute) {
5938
- renderer.removeAttribute(elm, makeHostToken(oldToken));
6070
+ removeAttribute$1(elm, makeHostToken(oldToken));
5939
6071
  } // Apply the new template styling token to the host element, if the new template has any
5940
6072
  // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
5941
6073
 
@@ -5947,12 +6079,12 @@ var LWC = (function (exports) {
5947
6079
 
5948
6080
  if (!isUndefined$1(newToken)) {
5949
6081
  if (hasScopedStyles) {
5950
- renderer.getClassList(elm).add(makeHostToken(newToken));
6082
+ getClassList$1(elm).add(makeHostToken(newToken));
5951
6083
  newHasTokenInClass = true;
5952
6084
  }
5953
6085
 
5954
6086
  if (isSyntheticShadow) {
5955
- renderer.setAttribute(elm, makeHostToken(newToken), '');
6087
+ setAttribute$1(elm, makeHostToken(newToken), '');
5956
6088
  newHasTokenInAttribute = true;
5957
6089
  }
5958
6090
  } // Update the styling tokens present on the context object.
@@ -5965,6 +6097,7 @@ var LWC = (function (exports) {
5965
6097
 
5966
6098
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
5967
6099
  const content = [];
6100
+ let root;
5968
6101
 
5969
6102
  for (let i = 0; i < stylesheets.length; i++) {
5970
6103
  let stylesheet = stylesheets[i];
@@ -5977,23 +6110,46 @@ var LWC = (function (exports) {
5977
6110
  // the component instance might be attempting to use an old version of
5978
6111
  // the stylesheet, while internally, we have a replacement for it.
5979
6112
  stylesheet = getStyleOrSwappedStyle(stylesheet);
5980
- } // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
5981
- // native shadow DOM. Synthetic shadow DOM never uses `:host`.
6113
+ }
5982
6114
 
6115
+ const isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
6116
+
6117
+ const scopeToken = isScopedCss || vm.shadowMode === 1
6118
+ /* Synthetic */
6119
+ && vm.renderMode === 1
6120
+ /* Shadow */
6121
+ ? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
6122
+ // native shadow DOM. Synthetic shadow DOM never uses `:host`.
5983
6123
 
5984
- const isScopedCss = stylesheet[KEY__SCOPED_CSS];
5985
6124
  const useActualHostSelector = vm.renderMode === 0
5986
6125
  /* Light */
5987
6126
  ? !isScopedCss : vm.shadowMode === 0
5988
6127
  /* Native */
5989
- ; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
6128
+ ; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
6129
+ // we use an attribute selector on the host to simulate :dir().
5990
6130
 
5991
- const scopeToken = isScopedCss || vm.shadowMode === 1
5992
- /* Synthetic */
5993
- && vm.renderMode === 1
6131
+ let useNativeDirPseudoclass;
6132
+
6133
+ if (vm.renderMode === 1
5994
6134
  /* Shadow */
5995
- ? stylesheetToken : undefined;
5996
- ArrayPush$1.call(content, stylesheet(useActualHostSelector, scopeToken));
6135
+ ) {
6136
+ useNativeDirPseudoclass = vm.shadowMode === 0
6137
+ /* Native */
6138
+ ;
6139
+ } else {
6140
+ // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
6141
+ // At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
6142
+ if (isUndefined$1(root)) {
6143
+ // Only calculate the root once as necessary
6144
+ root = getNearestShadowComponent(vm);
6145
+ }
6146
+
6147
+ useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
6148
+ /* Native */
6149
+ ;
6150
+ }
6151
+
6152
+ ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
5997
6153
  }
5998
6154
  }
5999
6155
 
@@ -6017,14 +6173,12 @@ var LWC = (function (exports) {
6017
6173
  // https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
6018
6174
 
6019
6175
 
6020
- function getNearestNativeShadowComponent(vm) {
6176
+ function getNearestShadowComponent(vm) {
6021
6177
  let owner = vm;
6022
6178
 
6023
6179
  while (!isNull(owner)) {
6024
6180
  if (owner.renderMode === 1
6025
6181
  /* Shadow */
6026
- && owner.shadowMode === 0
6027
- /* Native */
6028
6182
  ) {
6029
6183
  return owner;
6030
6184
  }
@@ -6035,9 +6189,22 @@ var LWC = (function (exports) {
6035
6189
  return owner;
6036
6190
  }
6037
6191
 
6192
+ function getNearestNativeShadowComponent(vm) {
6193
+ const owner = getNearestShadowComponent(vm);
6194
+
6195
+ if (!isNull(owner) && owner.shadowMode === 1
6196
+ /* Synthetic */
6197
+ ) {
6198
+ // Synthetic-within-native is impossible. So if the nearest shadow component is
6199
+ // synthetic, we know we won't find a native component if we go any further.
6200
+ return null;
6201
+ }
6202
+
6203
+ return owner;
6204
+ }
6205
+
6038
6206
  function createStylesheet(vm, stylesheets) {
6039
6207
  const {
6040
- renderer,
6041
6208
  renderMode,
6042
6209
  shadowMode
6043
6210
  } = vm;
@@ -6048,9 +6215,9 @@ var LWC = (function (exports) {
6048
6215
  /* Synthetic */
6049
6216
  ) {
6050
6217
  for (let i = 0; i < stylesheets.length; i++) {
6051
- renderer.insertGlobalStylesheet(stylesheets[i]);
6218
+ insertGlobalStylesheet$1(stylesheets[i]);
6052
6219
  }
6053
- } else if (renderer.ssr || renderer.isHydrating()) {
6220
+ } else if (ssr$1 || isHydrating$1()) {
6054
6221
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
6055
6222
  // This works in the client, because the stylesheets are created, and cached in the VM
6056
6223
  // the first time the VM renders.
@@ -6064,10 +6231,10 @@ var LWC = (function (exports) {
6064
6231
 
6065
6232
  for (let i = 0; i < stylesheets.length; i++) {
6066
6233
  if (isGlobal) {
6067
- renderer.insertGlobalStylesheet(stylesheets[i]);
6234
+ insertGlobalStylesheet$1(stylesheets[i]);
6068
6235
  } else {
6069
6236
  // local level
6070
- renderer.insertStylesheet(stylesheets[i], root.cmpRoot);
6237
+ insertStylesheet$1(stylesheets[i], root.cmpRoot);
6071
6238
  }
6072
6239
  }
6073
6240
  }
@@ -6152,7 +6319,7 @@ var LWC = (function (exports) {
6152
6319
  if (isProfilerEnabled) {
6153
6320
  currentDispatcher(opId, 0
6154
6321
  /* Start */
6155
- , vm.tagName, vm.idx);
6322
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6156
6323
  }
6157
6324
  }
6158
6325
 
@@ -6166,7 +6333,7 @@ var LWC = (function (exports) {
6166
6333
  if (isProfilerEnabled) {
6167
6334
  currentDispatcher(opId, 1
6168
6335
  /* Stop */
6169
- , vm.tagName, vm.idx);
6336
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6170
6337
  }
6171
6338
  }
6172
6339
 
@@ -6180,7 +6347,7 @@ var LWC = (function (exports) {
6180
6347
  if (isProfilerEnabled) {
6181
6348
  currentDispatcher(opId, 0
6182
6349
  /* Start */
6183
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6350
+ , 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);
6184
6351
  }
6185
6352
  }
6186
6353
 
@@ -6194,7 +6361,7 @@ var LWC = (function (exports) {
6194
6361
  if (isProfilerEnabled) {
6195
6362
  currentDispatcher(opId, 1
6196
6363
  /* Stop */
6197
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6364
+ , 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);
6198
6365
  }
6199
6366
  }
6200
6367
  /*
@@ -6759,7 +6926,6 @@ var LWC = (function (exports) {
6759
6926
  const {
6760
6927
  mode,
6761
6928
  owner,
6762
- renderer,
6763
6929
  tagName
6764
6930
  } = options;
6765
6931
  const vm = {
@@ -6774,7 +6940,6 @@ var LWC = (function (exports) {
6774
6940
  tagName,
6775
6941
  mode,
6776
6942
  owner,
6777
- renderer,
6778
6943
  children: EmptyArray,
6779
6944
  aChildren: EmptyArray,
6780
6945
  velements: EmptyArray,
@@ -6829,16 +6994,11 @@ var LWC = (function (exports) {
6829
6994
 
6830
6995
  function computeShadowMode(vm) {
6831
6996
  const {
6832
- def,
6833
- renderer
6997
+ def
6834
6998
  } = vm;
6835
- const {
6836
- isNativeShadowDefined,
6837
- isSyntheticShadowDefined
6838
- } = renderer;
6839
6999
  let shadowMode;
6840
7000
 
6841
- if (isSyntheticShadowDefined) {
7001
+ if (isSyntheticShadowDefined$1) {
6842
7002
  if (def.renderMode === 0
6843
7003
  /* Light */
6844
7004
  ) {
@@ -6847,7 +7007,7 @@ var LWC = (function (exports) {
6847
7007
  shadowMode = 0
6848
7008
  /* Native */
6849
7009
  ;
6850
- } else if (isNativeShadowDefined) {
7010
+ } else if (isNativeShadowDefined$1) {
6851
7011
  if (def.shadowSupportMode === "any"
6852
7012
  /* Any */
6853
7013
  ) {
@@ -6987,13 +7147,12 @@ var LWC = (function (exports) {
6987
7147
 
6988
7148
  function runRenderedCallback(vm) {
6989
7149
  const {
6990
- renderer,
6991
7150
  def: {
6992
7151
  renderedCallback
6993
7152
  }
6994
7153
  } = vm;
6995
7154
 
6996
- if (isTrue(renderer.ssr)) {
7155
+ if (isTrue(ssr$1)) {
6997
7156
  return;
6998
7157
  }
6999
7158
 
@@ -7219,8 +7378,7 @@ var LWC = (function (exports) {
7219
7378
 
7220
7379
  function resetComponentRoot(vm) {
7221
7380
  const {
7222
- children,
7223
- renderer
7381
+ children
7224
7382
  } = vm;
7225
7383
  const rootNode = getRenderRoot(vm);
7226
7384
 
@@ -7228,7 +7386,7 @@ var LWC = (function (exports) {
7228
7386
  const child = children[i];
7229
7387
 
7230
7388
  if (!isNull(child) && !isUndefined$1(child.elm)) {
7231
- renderer.remove(child.elm, rootNode);
7389
+ remove$1(child.elm, rootNode);
7232
7390
  }
7233
7391
  }
7234
7392
 
@@ -7238,7 +7396,7 @@ var LWC = (function (exports) {
7238
7396
  }
7239
7397
 
7240
7398
  function scheduleRehydration(vm) {
7241
- if (isTrue(vm.renderer.ssr) || isTrue(vm.isScheduled)) {
7399
+ if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
7242
7400
  return;
7243
7401
  }
7244
7402
 
@@ -7483,7 +7641,6 @@ var LWC = (function (exports) {
7483
7641
 
7484
7642
  const {
7485
7643
  elm,
7486
- renderer,
7487
7644
  context: {
7488
7645
  wiredConnecting,
7489
7646
  wiredDisconnecting
@@ -7510,7 +7667,7 @@ var LWC = (function (exports) {
7510
7667
  }
7511
7668
 
7512
7669
  });
7513
- renderer.dispatchEvent(elm, contextRegistrationEvent);
7670
+ dispatchEvent$1(elm, contextRegistrationEvent);
7514
7671
  });
7515
7672
  }
7516
7673
 
@@ -7775,7 +7932,7 @@ var LWC = (function (exports) {
7775
7932
  hooksAreSet = true;
7776
7933
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
7777
7934
  }
7778
- /* version: 2.5.10 */
7935
+ /* version: 2.6.3 */
7779
7936
 
7780
7937
  /*
7781
7938
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7804,7 +7961,9 @@ var LWC = (function (exports) {
7804
7961
  const styleElements = create(null);
7805
7962
  const styleSheets = create(null);
7806
7963
  const nodesToStyleSheets = new WeakMap();
7807
- let getCustomElement, defineCustomElement, HTMLElementConstructor;
7964
+ let getCustomElement;
7965
+ let defineCustomElement;
7966
+ let HTMLElementConstructor;
7808
7967
 
7809
7968
  function isCustomElementRegistryAvailable() {
7810
7969
  if (typeof customElements === 'undefined') {
@@ -7919,188 +8078,231 @@ var LWC = (function (exports) {
7919
8078
  HTMLElementConstructor.prototype = HTMLElement.prototype;
7920
8079
  }
7921
8080
 
7922
- let isHydrating = false;
8081
+ let hydrating = false;
7923
8082
 
7924
- function setIsHydrating(v) {
7925
- isHydrating = v;
8083
+ function setIsHydrating(value) {
8084
+ hydrating = value;
7926
8085
  }
7927
8086
 
7928
- const renderer = {
7929
- ssr: false,
8087
+ const ssr = false;
7930
8088
 
7931
- isHydrating() {
7932
- return isHydrating;
7933
- },
8089
+ function isHydrating() {
8090
+ return hydrating;
8091
+ }
7934
8092
 
7935
- isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
7936
- isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
8093
+ const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
8094
+ const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
7937
8095
 
7938
- createElement(tagName, namespace) {
7939
- return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
7940
- },
8096
+ function createElement$1(tagName, namespace) {
8097
+ return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
8098
+ }
7941
8099
 
7942
- createText(content) {
7943
- return document.createTextNode(content);
7944
- },
8100
+ function createText(content) {
8101
+ return document.createTextNode(content);
8102
+ }
7945
8103
 
7946
- createComment(content) {
7947
- return document.createComment(content);
7948
- },
8104
+ function createComment(content) {
8105
+ return document.createComment(content);
8106
+ }
7949
8107
 
7950
- insert(node, parent, anchor) {
7951
- parent.insertBefore(node, anchor);
7952
- },
8108
+ function insert(node, parent, anchor) {
8109
+ parent.insertBefore(node, anchor);
8110
+ }
7953
8111
 
7954
- remove(node, parent) {
7955
- parent.removeChild(node);
7956
- },
8112
+ function remove(node, parent) {
8113
+ parent.removeChild(node);
8114
+ }
7957
8115
 
7958
- nextSibling(node) {
7959
- return node.nextSibling;
7960
- },
8116
+ function nextSibling(node) {
8117
+ return node.nextSibling;
8118
+ }
7961
8119
 
7962
- attachShadow(element, options) {
7963
- if (isHydrating) {
7964
- return element.shadowRoot;
7965
- }
8120
+ function attachShadow(element, options) {
8121
+ if (hydrating) {
8122
+ return element.shadowRoot;
8123
+ }
7966
8124
 
7967
- return element.attachShadow(options);
7968
- },
8125
+ return element.attachShadow(options);
8126
+ }
7969
8127
 
7970
- setText(node, content) {
7971
- node.nodeValue = content;
7972
- },
8128
+ function setText(node, content) {
8129
+ node.nodeValue = content;
8130
+ }
7973
8131
 
7974
- getProperty(node, key) {
7975
- return node[key];
7976
- },
8132
+ function getProperty(node, key) {
8133
+ return node[key];
8134
+ }
7977
8135
 
7978
- setProperty(node, key, value) {
7979
- if (process.env.NODE_ENV !== 'production') {
7980
- if (node instanceof Element && !(key in node)) {
7981
- // TODO [#1297]: Move this validation to the compiler
7982
- assert.fail(`Unknown public property "${key}" of element <${node.tagName}>. This is likely a typo on the corresponding attribute "${htmlPropertyToAttribute(key)}".`);
7983
- }
8136
+ function setProperty(node, key, value) {
8137
+ if (process.env.NODE_ENV !== 'production') {
8138
+ if (node instanceof Element && !(key in node)) {
8139
+ // TODO [#1297]: Move this validation to the compiler
8140
+ assert.fail(`Unknown public property "${key}" of element <${node.tagName}>. This is likely a typo on the corresponding attribute "${htmlPropertyToAttribute(key)}".`);
7984
8141
  }
8142
+ }
7985
8143
 
7986
- node[key] = value;
7987
- },
8144
+ node[key] = value;
8145
+ }
7988
8146
 
7989
- getAttribute(element, name, namespace) {
7990
- return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
7991
- },
8147
+ function getAttribute(element, name, namespace) {
8148
+ return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
8149
+ }
7992
8150
 
7993
- setAttribute(element, name, value, namespace) {
7994
- return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
7995
- },
8151
+ function setAttribute(element, name, value, namespace) {
8152
+ return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
8153
+ }
7996
8154
 
7997
- removeAttribute(element, name, namespace) {
7998
- if (isUndefined$1(namespace)) {
7999
- element.removeAttribute(name);
8000
- } else {
8001
- element.removeAttributeNS(namespace, name);
8002
- }
8003
- },
8155
+ function removeAttribute(element, name, namespace) {
8156
+ if (isUndefined$1(namespace)) {
8157
+ element.removeAttribute(name);
8158
+ } else {
8159
+ element.removeAttributeNS(namespace, name);
8160
+ }
8161
+ }
8004
8162
 
8005
- addEventListener(target, type, callback, options) {
8006
- target.addEventListener(type, callback, options);
8007
- },
8163
+ function addEventListener(target, type, callback, options) {
8164
+ target.addEventListener(type, callback, options);
8165
+ }
8008
8166
 
8009
- removeEventListener(target, type, callback, options) {
8010
- target.removeEventListener(type, callback, options);
8011
- },
8167
+ function removeEventListener(target, type, callback, options) {
8168
+ target.removeEventListener(type, callback, options);
8169
+ }
8012
8170
 
8013
- dispatchEvent(target, event) {
8014
- return target.dispatchEvent(event);
8015
- },
8171
+ function dispatchEvent(target, event) {
8172
+ return target.dispatchEvent(event);
8173
+ }
8016
8174
 
8017
- getClassList(element) {
8018
- return element.classList;
8019
- },
8175
+ function getClassList(element) {
8176
+ return element.classList;
8177
+ }
8020
8178
 
8021
- setCSSStyleProperty(element, name, value, important) {
8022
- // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
8023
- // represent elements in the engine?
8024
- element.style.setProperty(name, value, important ? 'important' : '');
8025
- },
8179
+ function setCSSStyleProperty(element, name, value, important) {
8180
+ // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
8181
+ // represent elements in the engine?
8182
+ element.style.setProperty(name, value, important ? 'important' : '');
8183
+ }
8026
8184
 
8027
- getBoundingClientRect(element) {
8028
- return element.getBoundingClientRect();
8029
- },
8185
+ function getBoundingClientRect(element) {
8186
+ return element.getBoundingClientRect();
8187
+ }
8030
8188
 
8031
- querySelector(element, selectors) {
8032
- return element.querySelector(selectors);
8033
- },
8189
+ function querySelector(element, selectors) {
8190
+ return element.querySelector(selectors);
8191
+ }
8034
8192
 
8035
- querySelectorAll(element, selectors) {
8036
- return element.querySelectorAll(selectors);
8037
- },
8193
+ function querySelectorAll(element, selectors) {
8194
+ return element.querySelectorAll(selectors);
8195
+ }
8038
8196
 
8039
- getElementsByTagName(element, tagNameOrWildCard) {
8040
- return element.getElementsByTagName(tagNameOrWildCard);
8041
- },
8197
+ function getElementsByTagName(element, tagNameOrWildCard) {
8198
+ return element.getElementsByTagName(tagNameOrWildCard);
8199
+ }
8042
8200
 
8043
- getElementsByClassName(element, names) {
8044
- return element.getElementsByClassName(names);
8045
- },
8201
+ function getElementsByClassName(element, names) {
8202
+ return element.getElementsByClassName(names);
8203
+ }
8046
8204
 
8047
- getChildren(element) {
8048
- return element.children;
8049
- },
8205
+ function getChildren(element) {
8206
+ return element.children;
8207
+ }
8050
8208
 
8051
- getChildNodes(element) {
8052
- return element.childNodes;
8053
- },
8209
+ function getChildNodes(element) {
8210
+ return element.childNodes;
8211
+ }
8054
8212
 
8055
- getFirstChild(element) {
8056
- return element.firstChild;
8057
- },
8213
+ function getFirstChild(element) {
8214
+ return element.firstChild;
8215
+ }
8058
8216
 
8059
- getFirstElementChild(element) {
8060
- return element.firstElementChild;
8061
- },
8217
+ function getFirstElementChild(element) {
8218
+ return element.firstElementChild;
8219
+ }
8062
8220
 
8063
- getLastChild(element) {
8064
- return element.lastChild;
8065
- },
8221
+ function getLastChild(element) {
8222
+ return element.lastChild;
8223
+ }
8066
8224
 
8067
- getLastElementChild(element) {
8068
- return element.lastElementChild;
8069
- },
8225
+ function getLastElementChild(element) {
8226
+ return element.lastElementChild;
8227
+ }
8070
8228
 
8071
- isConnected(node) {
8072
- return node.isConnected;
8073
- },
8229
+ function isConnected(node) {
8230
+ return node.isConnected;
8231
+ }
8074
8232
 
8075
- insertGlobalStylesheet(content) {
8076
- if (!isUndefined$1(globalStylesheets[content])) {
8077
- return;
8078
- }
8233
+ function insertGlobalStylesheet(content) {
8234
+ if (!isUndefined$1(globalStylesheets[content])) {
8235
+ return;
8236
+ }
8079
8237
 
8080
- globalStylesheets[content] = true;
8081
- const elm = document.createElement('style');
8082
- elm.type = 'text/css';
8083
- elm.textContent = content;
8084
- globalStylesheetsParentElement.appendChild(elm);
8085
- },
8238
+ globalStylesheets[content] = true;
8239
+ const elm = document.createElement('style');
8240
+ elm.type = 'text/css';
8241
+ elm.textContent = content;
8242
+ globalStylesheetsParentElement.appendChild(elm);
8243
+ }
8086
8244
 
8087
- insertStylesheet(content, target) {
8088
- if (supportsConstructableStyleSheets) {
8089
- insertConstructableStyleSheet(content, target);
8090
- } else {
8091
- // Fall back to <style> element
8092
- insertStyleElement(content, target);
8093
- }
8094
- },
8245
+ function insertStylesheet(content, target) {
8246
+ if (supportsConstructableStyleSheets) {
8247
+ insertConstructableStyleSheet(content, target);
8248
+ } else {
8249
+ // Fall back to <style> element
8250
+ insertStyleElement(content, target);
8251
+ }
8252
+ }
8095
8253
 
8096
- assertInstanceOfHTMLElement(elm, msg) {
8097
- assert.invariant(elm instanceof HTMLElement, msg);
8098
- },
8254
+ function assertInstanceOfHTMLElement(elm, msg) {
8255
+ assert.invariant(elm instanceof HTMLElement, msg);
8256
+ }
8099
8257
 
8100
- defineCustomElement,
8101
- getCustomElement,
8102
- HTMLElement: HTMLElementConstructor
8103
- };
8258
+ const HTMLElementExported = HTMLElementConstructor;
8259
+ /*
8260
+ * Copyright (c) 2020, salesforce.com, inc.
8261
+ * All rights reserved.
8262
+ * SPDX-License-Identifier: MIT
8263
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
8264
+ */
8265
+
8266
+ setAssertInstanceOfHTMLElement(assertInstanceOfHTMLElement);
8267
+ setAttachShadow(attachShadow);
8268
+ setCreateComment(createComment);
8269
+ setCreateElement(createElement$1);
8270
+ setCreateText(createText);
8271
+ setDefineCustomElement(defineCustomElement);
8272
+ setDispatchEvent(dispatchEvent);
8273
+ setGetAttribute(getAttribute);
8274
+ setGetBoundingClientRect(getBoundingClientRect);
8275
+ setGetChildNodes(getChildNodes);
8276
+ setGetChildren(getChildren);
8277
+ setGetClassList(getClassList);
8278
+ setGetCustomElement(getCustomElement);
8279
+ setGetElementsByClassName(getElementsByClassName);
8280
+ setGetElementsByTagName(getElementsByTagName);
8281
+ setGetFirstChild(getFirstChild);
8282
+ setGetFirstElementChild(getFirstElementChild);
8283
+ setGetLastChild(getLastChild);
8284
+ setGetLastElementChild(getLastElementChild);
8285
+ setGetProperty(getProperty);
8286
+ setHTMLElement(HTMLElementExported);
8287
+ setInsert(insert);
8288
+ setInsertGlobalStylesheet(insertGlobalStylesheet);
8289
+ setInsertStylesheet(insertStylesheet);
8290
+ setIsConnected(isConnected);
8291
+ setIsHydrating$1(isHydrating);
8292
+ setIsNativeShadowDefined(isNativeShadowDefined);
8293
+ setIsSyntheticShadowDefined(isSyntheticShadowDefined);
8294
+ setNextSibling(nextSibling);
8295
+ setQuerySelector(querySelector);
8296
+ setQuerySelectorAll(querySelectorAll);
8297
+ setRemove(remove);
8298
+ setRemoveAttribute(removeAttribute);
8299
+ setRemoveEventListener(removeEventListener);
8300
+ setSetAttribute(setAttribute);
8301
+ setSetCSSStyleProperty(setCSSStyleProperty);
8302
+ setSetProperty(setProperty);
8303
+ setSetText(setText);
8304
+ setSsr(ssr);
8305
+ setAddEventListener(addEventListener);
8104
8306
  /*
8105
8307
  * Copyright (c) 2018, salesforce.com, inc.
8106
8308
  * All rights reserved.
@@ -8183,7 +8385,7 @@ var LWC = (function (exports) {
8183
8385
  throw new TypeError(`"createElement" function expects an "is" option with a valid component constructor.`);
8184
8386
  }
8185
8387
 
8186
- const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
8388
+ const UpgradableConstructor = getUpgradableConstructor(sel);
8187
8389
  let wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
8188
8390
 
8189
8391
  /**
@@ -8198,8 +8400,7 @@ var LWC = (function (exports) {
8198
8400
  createVM(elm, def, {
8199
8401
  tagName: sel,
8200
8402
  mode: options.mode !== 'closed' ? 'open' : 'closed',
8201
- owner: null,
8202
- renderer
8403
+ owner: null
8203
8404
  });
8204
8405
  ConnectingSlot.set(elm, connectRootElement);
8205
8406
  DisconnectingSlot.set(elm, disconnectRootElement);
@@ -8222,6 +8423,10 @@ var LWC = (function (exports) {
8222
8423
 
8223
8424
 
8224
8425
  function hydrateComponent(element, Ctor, props = {}) {
8426
+ if (!(element instanceof Element)) {
8427
+ throw new TypeError(`"hydrateComponent" expects a valid DOM element as the first parameter but instead received ${element}.`);
8428
+ }
8429
+
8225
8430
  if (!isFunction$1(Ctor)) {
8226
8431
  throw new TypeError(`"hydrateComponent" expects a valid component constructor as the second parameter but instead received ${Ctor}.`);
8227
8432
  }
@@ -8239,7 +8444,6 @@ var LWC = (function (exports) {
8239
8444
  createVM(element, def, {
8240
8445
  mode: 'open',
8241
8446
  owner: null,
8242
- renderer,
8243
8447
  tagName: element.tagName.toLowerCase()
8244
8448
  });
8245
8449
 
@@ -8310,8 +8514,7 @@ var LWC = (function (exports) {
8310
8514
  createVM(this, def, {
8311
8515
  mode: 'open',
8312
8516
  owner: null,
8313
- tagName: this.tagName,
8314
- renderer
8517
+ tagName: this.tagName
8315
8518
  });
8316
8519
  }
8317
8520
 
@@ -8378,7 +8581,7 @@ var LWC = (function (exports) {
8378
8581
  return false;
8379
8582
  }
8380
8583
 
8381
- if (renderer.isSyntheticShadowDefined) {
8584
+ if (isSyntheticShadowDefined) {
8382
8585
  // TODO [#1252]: old behavior that is still used by some pieces of the platform,
8383
8586
  // specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
8384
8587
  // used, will be considered global elements.
@@ -8431,7 +8634,7 @@ var LWC = (function (exports) {
8431
8634
  });
8432
8635
  freeze(LightningElement);
8433
8636
  seal(LightningElement.prototype);
8434
- /* version: 2.5.10 */
8637
+ /* version: 2.6.3 */
8435
8638
 
8436
8639
  exports.LightningElement = LightningElement;
8437
8640
  exports.__unstable__ProfilerControl = profilerControl;