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
@@ -298,7 +298,7 @@ var LWC = (function (exports) {
298
298
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
299
299
  return attributeName;
300
300
  }
301
- /** version: 2.5.10 */
301
+ /** version: 2.6.3 */
302
302
 
303
303
  /*
304
304
  * Copyright (c) 2018, salesforce.com, inc.
@@ -412,8 +412,6 @@ var LWC = (function (exports) {
412
412
  ENABLE_NODE_LIST_PATCH: null,
413
413
  ENABLE_HTML_COLLECTIONS_PATCH: null,
414
414
  ENABLE_NODE_PATCH: null,
415
- ENABLE_NON_COMPOSED_EVENTS_LEAKAGE: null,
416
- ENABLE_MIXED_SHADOW_MODE: null,
417
415
  ENABLE_WIRE_SYNC_EMIT: null
418
416
  };
419
417
 
@@ -470,7 +468,7 @@ var LWC = (function (exports) {
470
468
 
471
469
  function setFeatureFlagForTest(name, value) {
472
470
  }
473
- /** version: 2.5.10 */
471
+ /** version: 2.6.3 */
474
472
 
475
473
  /* proxy-compat-disable */
476
474
 
@@ -513,6 +511,243 @@ var LWC = (function (exports) {
513
511
 
514
512
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
515
513
  } // Borrowed from Vue template compiler.
514
+ // Primitives
515
+ //
516
+
517
+
518
+ let ssr$1;
519
+
520
+ function setSsr(ssrImpl) {
521
+ ssr$1 = ssrImpl;
522
+ }
523
+
524
+ let isNativeShadowDefined$1;
525
+
526
+ function setIsNativeShadowDefined(isNativeShadowDefinedImpl) {
527
+ isNativeShadowDefined$1 = isNativeShadowDefinedImpl;
528
+ }
529
+
530
+ let isSyntheticShadowDefined$1;
531
+
532
+ function setIsSyntheticShadowDefined(isSyntheticShadowDefinedImpl) {
533
+ isSyntheticShadowDefined$1 = isSyntheticShadowDefinedImpl;
534
+ }
535
+
536
+ let HTMLElementExported$1;
537
+
538
+ function setHTMLElement(HTMLElementImpl) {
539
+ HTMLElementExported$1 = HTMLElementImpl;
540
+ }
541
+
542
+ let isHydrating$1;
543
+
544
+ function setIsHydrating$1(isHydratingImpl) {
545
+ isHydrating$1 = isHydratingImpl;
546
+ }
547
+
548
+ let insert$1;
549
+
550
+ function setInsert(insertImpl) {
551
+ insert$1 = insertImpl;
552
+ }
553
+
554
+ let remove$1;
555
+
556
+ function setRemove(removeImpl) {
557
+ remove$1 = removeImpl;
558
+ }
559
+
560
+ let createElement$2;
561
+
562
+ function setCreateElement(createElementImpl) {
563
+ createElement$2 = createElementImpl;
564
+ }
565
+
566
+ let createText$1;
567
+
568
+ function setCreateText(createTextImpl) {
569
+ createText$1 = createTextImpl;
570
+ }
571
+
572
+ let createComment$1;
573
+
574
+ function setCreateComment(createCommentImpl) {
575
+ createComment$1 = createCommentImpl;
576
+ }
577
+
578
+ let nextSibling$1;
579
+
580
+ function setNextSibling(nextSiblingImpl) {
581
+ nextSibling$1 = nextSiblingImpl;
582
+ }
583
+
584
+ let attachShadow$1;
585
+
586
+ function setAttachShadow(attachShadowImpl) {
587
+ attachShadow$1 = attachShadowImpl;
588
+ }
589
+
590
+ let getProperty$1;
591
+
592
+ function setGetProperty(getPropertyImpl) {
593
+ getProperty$1 = getPropertyImpl;
594
+ }
595
+
596
+ let setProperty$1;
597
+
598
+ function setSetProperty(setPropertyImpl) {
599
+ setProperty$1 = setPropertyImpl;
600
+ }
601
+
602
+ let setText$1;
603
+
604
+ function setSetText(setTextImpl) {
605
+ setText$1 = setTextImpl;
606
+ }
607
+
608
+ let getAttribute$1;
609
+
610
+ function setGetAttribute(getAttributeImpl) {
611
+ getAttribute$1 = getAttributeImpl;
612
+ }
613
+
614
+ let setAttribute$1;
615
+
616
+ function setSetAttribute(setAttributeImpl) {
617
+ setAttribute$1 = setAttributeImpl;
618
+ }
619
+
620
+ let removeAttribute$1;
621
+
622
+ function setRemoveAttribute(removeAttributeImpl) {
623
+ removeAttribute$1 = removeAttributeImpl;
624
+ }
625
+
626
+ let addEventListener$1;
627
+
628
+ function setAddEventListener(addEventListenerImpl) {
629
+ addEventListener$1 = addEventListenerImpl;
630
+ }
631
+
632
+ let removeEventListener$1;
633
+
634
+ function setRemoveEventListener(removeEventListenerImpl) {
635
+ removeEventListener$1 = removeEventListenerImpl;
636
+ }
637
+
638
+ let dispatchEvent$1;
639
+
640
+ function setDispatchEvent(dispatchEventImpl) {
641
+ dispatchEvent$1 = dispatchEventImpl;
642
+ }
643
+
644
+ let getClassList$1;
645
+
646
+ function setGetClassList(getClassListImpl) {
647
+ getClassList$1 = getClassListImpl;
648
+ }
649
+
650
+ let setCSSStyleProperty$1;
651
+
652
+ function setSetCSSStyleProperty(setCSSStylePropertyImpl) {
653
+ setCSSStyleProperty$1 = setCSSStylePropertyImpl;
654
+ }
655
+
656
+ let getBoundingClientRect$1;
657
+
658
+ function setGetBoundingClientRect(getBoundingClientRectImpl) {
659
+ getBoundingClientRect$1 = getBoundingClientRectImpl;
660
+ }
661
+
662
+ let querySelector$1;
663
+
664
+ function setQuerySelector(querySelectorImpl) {
665
+ querySelector$1 = querySelectorImpl;
666
+ }
667
+
668
+ let querySelectorAll$1;
669
+
670
+ function setQuerySelectorAll(querySelectorAllImpl) {
671
+ querySelectorAll$1 = querySelectorAllImpl;
672
+ }
673
+
674
+ let getElementsByTagName$1;
675
+
676
+ function setGetElementsByTagName(getElementsByTagNameImpl) {
677
+ getElementsByTagName$1 = getElementsByTagNameImpl;
678
+ }
679
+
680
+ let getElementsByClassName$1;
681
+
682
+ function setGetElementsByClassName(getElementsByClassNameImpl) {
683
+ getElementsByClassName$1 = getElementsByClassNameImpl;
684
+ }
685
+
686
+ let getChildren$1;
687
+
688
+ function setGetChildren(getChildrenImpl) {
689
+ getChildren$1 = getChildrenImpl;
690
+ }
691
+
692
+ let getChildNodes$1;
693
+
694
+ function setGetChildNodes(getChildNodesImpl) {
695
+ getChildNodes$1 = getChildNodesImpl;
696
+ }
697
+
698
+ let getFirstChild$1;
699
+
700
+ function setGetFirstChild(getFirstChildImpl) {
701
+ getFirstChild$1 = getFirstChildImpl;
702
+ }
703
+
704
+ let getFirstElementChild$1;
705
+
706
+ function setGetFirstElementChild(getFirstElementChildImpl) {
707
+ getFirstElementChild$1 = getFirstElementChildImpl;
708
+ }
709
+
710
+ let getLastChild$1;
711
+
712
+ function setGetLastChild(getLastChildImpl) {
713
+ getLastChild$1 = getLastChildImpl;
714
+ }
715
+
716
+ let getLastElementChild$1;
717
+
718
+ function setGetLastElementChild(getLastElementChildImpl) {
719
+ getLastElementChild$1 = getLastElementChildImpl;
720
+ }
721
+
722
+ let isConnected$1;
723
+
724
+ function setIsConnected(isConnectedImpl) {
725
+ isConnected$1 = isConnectedImpl;
726
+ }
727
+
728
+ let insertGlobalStylesheet$1;
729
+
730
+ function setInsertGlobalStylesheet(insertGlobalStylesheetImpl) {
731
+ insertGlobalStylesheet$1 = insertGlobalStylesheetImpl;
732
+ }
733
+
734
+ let insertStylesheet$1;
735
+
736
+ function setInsertStylesheet(insertStylesheetImpl) {
737
+ insertStylesheet$1 = insertStylesheetImpl;
738
+ }
739
+
740
+ let defineCustomElement$1;
741
+
742
+ function setDefineCustomElement(defineCustomElementImpl) {
743
+ defineCustomElement$1 = defineCustomElementImpl;
744
+ }
745
+
746
+ let getCustomElement$1;
747
+
748
+ function setGetCustomElement(getCustomElementImpl) {
749
+ getCustomElement$1 = getCustomElementImpl;
750
+ }
516
751
  /*
517
752
  * Copyright (c) 2019, salesforce.com, inc.
518
753
  * All rights reserved.
@@ -755,9 +990,6 @@ var LWC = (function (exports) {
755
990
  elm,
756
991
  data: {
757
992
  on
758
- },
759
- owner: {
760
- renderer
761
993
  }
762
994
  } = vnode;
763
995
 
@@ -770,7 +1002,7 @@ var LWC = (function (exports) {
770
1002
  let name;
771
1003
 
772
1004
  for (name in on) {
773
- renderer.addEventListener(elm, name, listener);
1005
+ addEventListener$1(elm, name, listener);
774
1006
  }
775
1007
  }
776
1008
 
@@ -912,9 +1144,6 @@ var LWC = (function (exports) {
912
1144
  const {
913
1145
  data: {
914
1146
  attrs
915
- },
916
- owner: {
917
- renderer
918
1147
  }
919
1148
  } = vnode;
920
1149
 
@@ -933,10 +1162,6 @@ var LWC = (function (exports) {
933
1162
  }
934
1163
 
935
1164
  const elm = vnode.elm;
936
- const {
937
- setAttribute,
938
- removeAttribute
939
- } = renderer;
940
1165
  let key;
941
1166
  oldAttrs = isUndefined$1(oldAttrs) ? EmptyObject : oldAttrs; // update modified attributes, add new attributes
942
1167
  // this routine is only useful for data-* attributes in all kind of elements
@@ -951,14 +1176,14 @@ var LWC = (function (exports) {
951
1176
 
952
1177
  if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
953
1178
  // Assume xml namespace
954
- setAttribute(elm, key, cur, xmlNS);
1179
+ setAttribute$1(elm, key, cur, xmlNS);
955
1180
  } else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
956
1181
  // Assume xlink namespace
957
- setAttribute(elm, key, cur, xlinkNS);
958
- } else if (isNull(cur)) {
959
- removeAttribute(elm, key);
1182
+ setAttribute$1(elm, key, cur, xlinkNS);
1183
+ } else if (isNull(cur) || isUndefined$1(cur)) {
1184
+ removeAttribute$1(elm, key);
960
1185
  } else {
961
- setAttribute(elm, key, cur);
1186
+ setAttribute$1(elm, key, cur);
962
1187
  }
963
1188
 
964
1189
  lockAttribute();
@@ -1002,17 +1227,14 @@ var LWC = (function (exports) {
1002
1227
  const isFirstPatch = isUndefined$1(oldProps);
1003
1228
  const {
1004
1229
  elm,
1005
- sel,
1006
- owner: {
1007
- renderer
1008
- }
1230
+ sel
1009
1231
  } = vnode;
1010
1232
 
1011
1233
  for (const key in props) {
1012
1234
  const cur = props[key]; // if it is the first time this element is patched, or the current value is different to the previous value...
1013
1235
 
1014
- if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? renderer.getProperty(elm, key) : oldProps[key])) {
1015
- renderer.setProperty(elm, key, cur);
1236
+ if (isFirstPatch || cur !== (isLiveBindingProp(sel, key) ? getProperty$1(elm, key) : oldProps[key])) {
1237
+ setProperty$1(elm, key, cur);
1016
1238
  }
1017
1239
  }
1018
1240
  }
@@ -1076,9 +1298,6 @@ var LWC = (function (exports) {
1076
1298
  elm,
1077
1299
  data: {
1078
1300
  className: newClass
1079
- },
1080
- owner: {
1081
- renderer
1082
1301
  }
1083
1302
  } = vnode;
1084
1303
  const {
@@ -1091,7 +1310,7 @@ var LWC = (function (exports) {
1091
1310
  return;
1092
1311
  }
1093
1312
 
1094
- const classList = renderer.getClassList(elm);
1313
+ const classList = getClassList$1(elm);
1095
1314
  const newClassMap = getMapFromClassName(newClass);
1096
1315
  const oldClassMap = getMapFromClassName(oldClass);
1097
1316
  let name;
@@ -1129,24 +1348,17 @@ var LWC = (function (exports) {
1129
1348
  elm,
1130
1349
  data: {
1131
1350
  style: newStyle
1132
- },
1133
- owner: {
1134
- renderer
1135
1351
  }
1136
1352
  } = vnode;
1137
- const {
1138
- setAttribute,
1139
- removeAttribute
1140
- } = renderer;
1141
1353
 
1142
1354
  if (oldVnode.data.style === newStyle) {
1143
1355
  return;
1144
1356
  }
1145
1357
 
1146
1358
  if (!isString(newStyle) || newStyle === '') {
1147
- removeAttribute(elm, 'style');
1359
+ removeAttribute$1(elm, 'style');
1148
1360
  } else {
1149
- setAttribute(elm, 'style', newStyle);
1361
+ setAttribute$1(elm, 'style', newStyle);
1150
1362
  }
1151
1363
  }
1152
1364
 
@@ -1171,9 +1383,6 @@ var LWC = (function (exports) {
1171
1383
  elm,
1172
1384
  data: {
1173
1385
  classMap
1174
- },
1175
- owner: {
1176
- renderer
1177
1386
  }
1178
1387
  } = vnode;
1179
1388
 
@@ -1181,7 +1390,7 @@ var LWC = (function (exports) {
1181
1390
  return;
1182
1391
  }
1183
1392
 
1184
- const classList = renderer.getClassList(elm);
1393
+ const classList = getClassList$1(elm);
1185
1394
 
1186
1395
  for (const name in classMap) {
1187
1396
  classList.add(name);
@@ -1205,9 +1414,6 @@ var LWC = (function (exports) {
1205
1414
  elm,
1206
1415
  data: {
1207
1416
  styleDecls
1208
- },
1209
- owner: {
1210
- renderer
1211
1417
  }
1212
1418
  } = vnode;
1213
1419
 
@@ -1217,7 +1423,7 @@ var LWC = (function (exports) {
1217
1423
 
1218
1424
  for (let i = 0; i < styleDecls.length; i++) {
1219
1425
  const [prop, value, important] = styleDecls[i];
1220
- renderer.setCSSStyleProperty(elm, prop, value, important);
1426
+ setCSSStyleProperty$1(elm, prop, value, important);
1221
1427
  }
1222
1428
  }
1223
1429
 
@@ -1231,15 +1437,6 @@ var LWC = (function (exports) {
1231
1437
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1232
1438
  */
1233
1439
 
1234
- /**
1235
- @license
1236
- Copyright (c) 2015 Simon Friis Vindum.
1237
- This code may only be used under the MIT License found at
1238
- https://github.com/snabbdom/snabbdom/blob/master/LICENSE
1239
- Code distributed by Snabbdom as part of the Snabbdom project at
1240
- https://github.com/snabbdom/snabbdom/
1241
- */
1242
-
1243
1440
  function isUndef(s) {
1244
1441
  return s === undefined;
1245
1442
  }
@@ -1327,7 +1524,7 @@ var LWC = (function (exports) {
1327
1524
  } else if (sameVnode(oldStartVnode, newEndVnode)) {
1328
1525
  // Vnode moved right
1329
1526
  patchVnode(oldStartVnode, newEndVnode);
1330
- newEndVnode.hook.move(oldStartVnode, parentElm, oldEndVnode.owner.renderer.nextSibling(oldEndVnode.elm));
1527
+ newEndVnode.hook.move(oldStartVnode, parentElm, nextSibling$1(oldEndVnode.elm));
1331
1528
  oldStartVnode = oldCh[++oldStartIdx];
1332
1529
  newEndVnode = newCh[--newEndIdx];
1333
1530
  } else if (sameVnode(oldEndVnode, newStartVnode)) {
@@ -1440,7 +1637,7 @@ var LWC = (function (exports) {
1440
1637
  }
1441
1638
  }
1442
1639
  /*
1443
- * Copyright (c) 2020, salesforce.com, inc.
1640
+ * Copyright (c) 2018, salesforce.com, inc.
1444
1641
  * All rights reserved.
1445
1642
  * SPDX-License-Identifier: MIT
1446
1643
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -1493,6 +1690,7 @@ var LWC = (function (exports) {
1493
1690
  isArray
1494
1691
  } = Array;
1495
1692
  const {
1693
+ prototype: ObjectDotPrototype,
1496
1694
  getPrototypeOf,
1497
1695
  create: ObjectCreate,
1498
1696
  defineProperty: ObjectDefineProperty,
@@ -1983,8 +2181,6 @@ var LWC = (function (exports) {
1983
2181
 
1984
2182
  }
1985
2183
 
1986
- const ObjectDotPrototype = Object.prototype;
1987
-
1988
2184
  function defaultValueIsObservable(value) {
1989
2185
  // intentionally checking for null
1990
2186
  if (value === null) {
@@ -2012,99 +2208,85 @@ var LWC = (function (exports) {
2012
2208
  /* do nothing */
2013
2209
  };
2014
2210
 
2015
- const defaultValueDistortion = value => value;
2016
-
2017
2211
  function createShadowTarget(value) {
2018
2212
  return isArray(value) ? [] : {};
2019
2213
  }
2020
2214
 
2021
- class ReactiveMembrane {
2022
- constructor(options) {
2023
- this.valueDistortion = defaultValueDistortion;
2024
- this.valueMutated = defaultValueMutated;
2025
- this.valueObserved = defaultValueObserved;
2026
- this.valueIsObservable = defaultValueIsObservable;
2215
+ class ObservableMembrane {
2216
+ constructor(options = {}) {
2027
2217
  this.readOnlyObjectGraph = new WeakMap();
2028
2218
  this.reactiveObjectGraph = new WeakMap();
2029
-
2030
- if (!isUndefined(options)) {
2031
- const {
2032
- valueDistortion,
2033
- valueMutated,
2034
- valueObserved,
2035
- valueIsObservable,
2036
- tagPropertyKey
2037
- } = options;
2038
- this.valueDistortion = isFunction(valueDistortion) ? valueDistortion : defaultValueDistortion;
2039
- this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
2040
- this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
2041
- this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2042
- this.tagPropertyKey = tagPropertyKey;
2043
- }
2219
+ const {
2220
+ valueMutated,
2221
+ valueObserved,
2222
+ valueIsObservable,
2223
+ tagPropertyKey
2224
+ } = options;
2225
+ this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
2226
+ this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
2227
+ this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2228
+ this.tagPropertyKey = tagPropertyKey;
2044
2229
  }
2045
2230
 
2046
2231
  getProxy(value) {
2047
2232
  const unwrappedValue = unwrap$1(value);
2048
- const distorted = this.valueDistortion(unwrappedValue);
2049
2233
 
2050
- if (this.valueIsObservable(distorted)) {
2051
- if (this.readOnlyObjectGraph.get(distorted) === value) {
2052
- // when trying to extract the writable version of a readonly
2053
- // we return the readonly.
2234
+ if (this.valueIsObservable(unwrappedValue)) {
2235
+ // When trying to extract the writable version of a readonly we return the readonly.
2236
+ if (this.readOnlyObjectGraph.get(unwrappedValue) === value) {
2054
2237
  return value;
2055
2238
  }
2056
2239
 
2057
- return this.getReactiveHandler(unwrappedValue, distorted);
2240
+ return this.getReactiveHandler(unwrappedValue);
2058
2241
  }
2059
2242
 
2060
- return distorted;
2243
+ return unwrappedValue;
2061
2244
  }
2062
2245
 
2063
2246
  getReadOnlyProxy(value) {
2064
2247
  value = unwrap$1(value);
2065
- const distorted = this.valueDistortion(value);
2066
2248
 
2067
- if (this.valueIsObservable(distorted)) {
2068
- return this.getReadOnlyHandler(value, distorted);
2249
+ if (this.valueIsObservable(value)) {
2250
+ return this.getReadOnlyHandler(value);
2069
2251
  }
2070
2252
 
2071
- return distorted;
2253
+ return value;
2072
2254
  }
2073
2255
 
2074
2256
  unwrapProxy(p) {
2075
2257
  return unwrap$1(p);
2076
2258
  }
2077
2259
 
2078
- getReactiveHandler(value, distortedValue) {
2079
- let proxy = this.reactiveObjectGraph.get(distortedValue);
2260
+ getReactiveHandler(value) {
2261
+ let proxy = this.reactiveObjectGraph.get(value);
2080
2262
 
2081
2263
  if (isUndefined(proxy)) {
2082
2264
  // caching the proxy after the first time it is accessed
2083
- const handler = new ReactiveProxyHandler(this, distortedValue);
2084
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2265
+ const handler = new ReactiveProxyHandler(this, value);
2266
+ proxy = new Proxy(createShadowTarget(value), handler);
2085
2267
  registerProxy(proxy, value);
2086
- this.reactiveObjectGraph.set(distortedValue, proxy);
2268
+ this.reactiveObjectGraph.set(value, proxy);
2087
2269
  }
2088
2270
 
2089
2271
  return proxy;
2090
2272
  }
2091
2273
 
2092
- getReadOnlyHandler(value, distortedValue) {
2093
- let proxy = this.readOnlyObjectGraph.get(distortedValue);
2274
+ getReadOnlyHandler(value) {
2275
+ let proxy = this.readOnlyObjectGraph.get(value);
2094
2276
 
2095
2277
  if (isUndefined(proxy)) {
2096
2278
  // caching the proxy after the first time it is accessed
2097
- const handler = new ReadOnlyHandler(this, distortedValue);
2098
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2279
+ const handler = new ReadOnlyHandler(this, value);
2280
+ proxy = new Proxy(createShadowTarget(value), handler);
2099
2281
  registerProxy(proxy, value);
2100
- this.readOnlyObjectGraph.set(distortedValue, proxy);
2282
+ this.readOnlyObjectGraph.set(value, proxy);
2101
2283
  }
2102
2284
 
2103
2285
  return proxy;
2104
2286
  }
2105
2287
 
2106
2288
  }
2107
- /** version: 1.1.5 */
2289
+ /** version: 2.0.0 */
2108
2290
 
2109
2291
  /*
2110
2292
  * Copyright (c) 2018, salesforce.com, inc.
@@ -2115,15 +2297,9 @@ var LWC = (function (exports) {
2115
2297
 
2116
2298
 
2117
2299
  const lockerLivePropertyKey = Symbol.for('@@lockerLiveValue');
2118
-
2119
- function valueDistortion(value) {
2120
- return value;
2121
- }
2122
-
2123
- const reactiveMembrane = new ReactiveMembrane({
2300
+ const reactiveMembrane = new ObservableMembrane({
2124
2301
  valueObserved,
2125
2302
  valueMutated,
2126
- valueDistortion,
2127
2303
  tagPropertyKey: lockerLivePropertyKey
2128
2304
  });
2129
2305
  /**
@@ -2132,16 +2308,9 @@ var LWC = (function (exports) {
2132
2308
  * change or being removed.
2133
2309
  */
2134
2310
 
2135
- const unwrap = function (value) {
2136
- const unwrapped = reactiveMembrane.unwrapProxy(value);
2137
-
2138
- if (unwrapped !== value) {
2139
- // if value is a proxy, unwrap to access original value and apply distortion
2140
- return valueDistortion(unwrapped);
2141
- }
2142
-
2143
- return value;
2144
- };
2311
+ function unwrap(value) {
2312
+ return reactiveMembrane.unwrapProxy(value);
2313
+ }
2145
2314
  /*
2146
2315
  * Copyright (c) 2018, salesforce.com, inc.
2147
2316
  * All rights reserved.
@@ -2212,8 +2381,7 @@ var LWC = (function (exports) {
2212
2381
 
2213
2382
 
2214
2383
  const LightningElement = function () {
2215
-
2216
-
2384
+ // This should be as performant as possible, while any initialization should be done lazily
2217
2385
  if (isNull(vmBeingConstructed)) {
2218
2386
  throw new ReferenceError('Illegal constructor');
2219
2387
  }
@@ -2221,8 +2389,7 @@ var LWC = (function (exports) {
2221
2389
  const vm = vmBeingConstructed;
2222
2390
  const {
2223
2391
  def,
2224
- elm,
2225
- renderer
2392
+ elm
2226
2393
  } = vm;
2227
2394
  const {
2228
2395
  bridge
@@ -2255,23 +2422,22 @@ var LWC = (function (exports) {
2255
2422
  if (vm.renderMode === 1
2256
2423
  /* Shadow */
2257
2424
  ) {
2258
- attachShadow(vm);
2425
+ doAttachShadow(vm);
2259
2426
  } // Adding extra guard rails in DEV mode.
2260
2427
 
2261
2428
  return this;
2262
2429
  };
2263
2430
 
2264
- function attachShadow(vm) {
2431
+ function doAttachShadow(vm) {
2265
2432
  const {
2266
2433
  elm,
2267
2434
  mode,
2268
- renderer,
2269
2435
  shadowMode,
2270
2436
  def: {
2271
2437
  ctor
2272
2438
  }
2273
2439
  } = vm;
2274
- const cmpRoot = renderer.attachShadow(elm, {
2440
+ const cmpRoot = attachShadow$1(elm, {
2275
2441
  [KEY__SYNTHETIC_MODE]: shadowMode === 1
2276
2442
  /* Synthetic */
2277
2443
  ,
@@ -2288,163 +2454,121 @@ var LWC = (function (exports) {
2288
2454
 
2289
2455
  dispatchEvent(event) {
2290
2456
  const {
2291
- elm,
2292
- renderer: {
2293
- dispatchEvent
2294
- }
2457
+ elm
2295
2458
  } = getAssociatedVM(this);
2296
- return dispatchEvent(elm, event);
2459
+ return dispatchEvent$1(elm, event);
2297
2460
  },
2298
2461
 
2299
2462
  addEventListener(type, listener, options) {
2300
2463
  const vm = getAssociatedVM(this);
2301
2464
  const {
2302
- elm,
2303
- renderer: {
2304
- addEventListener
2305
- }
2465
+ elm
2306
2466
  } = vm;
2307
2467
 
2308
2468
  const wrappedListener = getWrappedComponentsListener(vm, listener);
2309
- addEventListener(elm, type, wrappedListener, options);
2469
+ addEventListener$1(elm, type, wrappedListener, options);
2310
2470
  },
2311
2471
 
2312
2472
  removeEventListener(type, listener, options) {
2313
2473
  const vm = getAssociatedVM(this);
2314
2474
  const {
2315
- elm,
2316
- renderer: {
2317
- removeEventListener
2318
- }
2475
+ elm
2319
2476
  } = vm;
2320
2477
  const wrappedListener = getWrappedComponentsListener(vm, listener);
2321
- removeEventListener(elm, type, wrappedListener, options);
2478
+ removeEventListener$1(elm, type, wrappedListener, options);
2322
2479
  },
2323
2480
 
2324
2481
  hasAttribute(name) {
2325
2482
  const {
2326
- elm,
2327
- renderer: {
2328
- getAttribute
2329
- }
2483
+ elm
2330
2484
  } = getAssociatedVM(this);
2331
- return !isNull(getAttribute(elm, name));
2485
+ return !isNull(getAttribute$1(elm, name));
2332
2486
  },
2333
2487
 
2334
2488
  hasAttributeNS(namespace, name) {
2335
2489
  const {
2336
- elm,
2337
- renderer: {
2338
- getAttribute
2339
- }
2490
+ elm
2340
2491
  } = getAssociatedVM(this);
2341
- return !isNull(getAttribute(elm, name, namespace));
2492
+ return !isNull(getAttribute$1(elm, name, namespace));
2342
2493
  },
2343
2494
 
2344
2495
  removeAttribute(name) {
2345
2496
  const {
2346
- elm,
2347
- renderer: {
2348
- removeAttribute
2349
- }
2497
+ elm
2350
2498
  } = getAssociatedVM(this);
2351
2499
  unlockAttribute(elm, name);
2352
- removeAttribute(elm, name);
2500
+ removeAttribute$1(elm, name);
2353
2501
  lockAttribute();
2354
2502
  },
2355
2503
 
2356
2504
  removeAttributeNS(namespace, name) {
2357
2505
  const {
2358
- elm,
2359
- renderer: {
2360
- removeAttribute
2361
- }
2506
+ elm
2362
2507
  } = getAssociatedVM(this);
2363
2508
  unlockAttribute(elm, name);
2364
- removeAttribute(elm, name, namespace);
2509
+ removeAttribute$1(elm, name, namespace);
2365
2510
  lockAttribute();
2366
2511
  },
2367
2512
 
2368
2513
  getAttribute(name) {
2369
2514
  const {
2370
- elm,
2371
- renderer: {
2372
- getAttribute
2373
- }
2515
+ elm
2374
2516
  } = getAssociatedVM(this);
2375
- return getAttribute(elm, name);
2517
+ return getAttribute$1(elm, name);
2376
2518
  },
2377
2519
 
2378
2520
  getAttributeNS(namespace, name) {
2379
2521
  const {
2380
- elm,
2381
- renderer: {
2382
- getAttribute
2383
- }
2522
+ elm
2384
2523
  } = getAssociatedVM(this);
2385
- return getAttribute(elm, name, namespace);
2524
+ return getAttribute$1(elm, name, namespace);
2386
2525
  },
2387
2526
 
2388
2527
  setAttribute(name, value) {
2389
2528
  const vm = getAssociatedVM(this);
2390
2529
  const {
2391
- elm,
2392
- renderer: {
2393
- setAttribute
2394
- }
2530
+ elm
2395
2531
  } = vm;
2396
2532
 
2397
2533
  unlockAttribute(elm, name);
2398
- setAttribute(elm, name, value);
2534
+ setAttribute$1(elm, name, value);
2399
2535
  lockAttribute();
2400
2536
  },
2401
2537
 
2402
2538
  setAttributeNS(namespace, name, value) {
2403
2539
  const vm = getAssociatedVM(this);
2404
2540
  const {
2405
- elm,
2406
- renderer: {
2407
- setAttribute
2408
- }
2541
+ elm
2409
2542
  } = vm;
2410
2543
 
2411
2544
  unlockAttribute(elm, name);
2412
- setAttribute(elm, name, value, namespace);
2545
+ setAttribute$1(elm, name, value, namespace);
2413
2546
  lockAttribute();
2414
2547
  },
2415
2548
 
2416
2549
  getBoundingClientRect() {
2417
2550
  const vm = getAssociatedVM(this);
2418
2551
  const {
2419
- elm,
2420
- renderer: {
2421
- getBoundingClientRect
2422
- }
2552
+ elm
2423
2553
  } = vm;
2424
2554
 
2425
- return getBoundingClientRect(elm);
2555
+ return getBoundingClientRect$1(elm);
2426
2556
  },
2427
2557
 
2428
2558
  get isConnected() {
2429
2559
  const {
2430
- elm,
2431
- renderer: {
2432
- isConnected
2433
- }
2560
+ elm
2434
2561
  } = getAssociatedVM(this);
2435
- return isConnected(elm);
2562
+ return isConnected$1(elm);
2436
2563
  },
2437
2564
 
2438
2565
  get classList() {
2439
2566
  const vm = getAssociatedVM(this);
2440
2567
  const {
2441
- elm,
2442
- renderer: {
2443
- getClassList
2444
- }
2568
+ elm
2445
2569
  } = vm;
2446
2570
 
2447
- return getClassList(elm);
2571
+ return getClassList$1(elm);
2448
2572
  },
2449
2573
 
2450
2574
  get template() {
@@ -2470,19 +2594,44 @@ var LWC = (function (exports) {
2470
2594
  }
2471
2595
 
2472
2596
  };
2473
- const queryAndChildGetterDescriptors = create(null);
2474
- 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
2597
+ const queryAndChildGetterDescriptors = create(null); // The reason we don't just call `import * as renderer from '../renderer'` here is that the bundle size
2598
+ // is smaller if we reference each function individually. Otherwise Rollup will create one big frozen
2599
+ // object representing the renderer, with a lot of methods we don't actually need.
2600
+
2601
+ const childGetters = ['children', 'childNodes', 'firstChild', 'firstElementChild', 'lastChild', 'lastElementChild'];
2602
+
2603
+ function getChildGetter(methodName) {
2604
+ switch (methodName) {
2605
+ case 'children':
2606
+ return getChildren$1;
2607
+
2608
+ case 'childNodes':
2609
+ return getChildNodes$1;
2610
+
2611
+ case 'firstChild':
2612
+ return getFirstChild$1;
2613
+
2614
+ case 'firstElementChild':
2615
+ return getFirstElementChild$1;
2475
2616
 
2476
- for (const [elementProp, rendererMethod] of childGetters) {
2477
- queryAndChildGetterDescriptors[elementProp] = {
2617
+ case 'lastChild':
2618
+ return getLastChild$1;
2619
+
2620
+ case 'lastElementChild':
2621
+ return getLastElementChild$1;
2622
+ }
2623
+ } // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
2624
+
2625
+
2626
+ for (const childGetter of childGetters) {
2627
+ queryAndChildGetterDescriptors[childGetter] = {
2478
2628
  get() {
2479
2629
  const vm = getAssociatedVM(this);
2480
2630
  const {
2481
- elm,
2482
- renderer
2631
+ elm
2483
2632
  } = vm;
2484
2633
 
2485
- return renderer[rendererMethod](elm);
2634
+ return getChildGetter(childGetter)(elm);
2486
2635
  },
2487
2636
 
2488
2637
  configurable: true,
@@ -2490,18 +2639,34 @@ var LWC = (function (exports) {
2490
2639
  };
2491
2640
  }
2492
2641
 
2493
- const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
2642
+ const queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll'];
2643
+
2644
+ function getQueryMethod(methodName) {
2645
+ switch (methodName) {
2646
+ case 'getElementsByClassName':
2647
+ return getElementsByClassName$1;
2648
+
2649
+ case 'getElementsByTagName':
2650
+ return getElementsByTagName$1;
2651
+
2652
+ case 'querySelector':
2653
+ return querySelector$1;
2654
+
2655
+ case 'querySelectorAll':
2656
+ return querySelectorAll$1;
2657
+ }
2658
+ } // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
2659
+
2494
2660
 
2495
2661
  for (const queryMethod of queryMethods) {
2496
2662
  queryAndChildGetterDescriptors[queryMethod] = {
2497
2663
  value(arg) {
2498
2664
  const vm = getAssociatedVM(this);
2499
2665
  const {
2500
- elm,
2501
- renderer
2666
+ elm
2502
2667
  } = vm;
2503
2668
 
2504
- return renderer[queryMethod](elm, arg);
2669
+ return getQueryMethod(queryMethod)(elm, arg);
2505
2670
  },
2506
2671
 
2507
2672
  configurable: true,
@@ -3435,39 +3600,30 @@ var LWC = (function (exports) {
3435
3600
  const token = cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken;
3436
3601
 
3437
3602
  if (!isUndefined$1(token) && context.hasScopedStyles) {
3438
- owner.renderer.getClassList(elm).add(token);
3603
+ getClassList$1(elm).add(token);
3439
3604
  }
3440
3605
  }
3441
3606
 
3442
3607
  function updateNodeHook(oldVnode, vnode) {
3443
3608
  const {
3444
3609
  elm,
3445
- text,
3446
- owner: {
3447
- renderer
3448
- }
3610
+ text
3449
3611
  } = vnode;
3450
3612
 
3451
3613
  if (oldVnode.text !== text) {
3452
3614
 
3453
- renderer.setText(elm, text);
3615
+ setText$1(elm, text);
3454
3616
  }
3455
3617
  }
3456
3618
 
3457
3619
  function insertNodeHook(vnode, parentNode, referenceNode) {
3458
- const {
3459
- renderer
3460
- } = vnode.owner;
3461
3620
 
3462
- renderer.insert(vnode.elm, parentNode, referenceNode);
3621
+ insert$1(vnode.elm, parentNode, referenceNode);
3463
3622
  }
3464
3623
 
3465
3624
  function removeNodeHook(vnode, parentNode) {
3466
- const {
3467
- renderer
3468
- } = vnode.owner;
3469
3625
 
3470
- renderer.remove(vnode.elm, parentNode);
3626
+ remove$1(vnode.elm, parentNode);
3471
3627
  }
3472
3628
 
3473
3629
  function createElmHook(vnode) {
@@ -3537,13 +3693,15 @@ var LWC = (function (exports) {
3537
3693
 
3538
3694
  function updateChildrenHook(oldVnode, vnode) {
3539
3695
  const {
3540
- children,
3541
- owner
3696
+ elm,
3697
+ children
3542
3698
  } = vnode;
3543
- const fn = hasDynamicChildren(children) ? updateDynamicChildren : updateStaticChildren;
3544
- runWithBoundaryProtection(owner, owner.owner, noop, () => {
3545
- fn(vnode.elm, oldVnode.children, children);
3546
- }, noop);
3699
+
3700
+ if (hasDynamicChildren(children)) {
3701
+ updateDynamicChildren(elm, oldVnode.children, children);
3702
+ } else {
3703
+ updateStaticChildren(elm, oldVnode.children, children);
3704
+ }
3547
3705
  }
3548
3706
 
3549
3707
  function allocateChildrenHook(vnode, vm) {
@@ -3609,8 +3767,7 @@ var LWC = (function (exports) {
3609
3767
  createVM(elm, def, {
3610
3768
  mode,
3611
3769
  owner,
3612
- tagName: sel,
3613
- renderer: owner.renderer
3770
+ tagName: sel
3614
3771
  });
3615
3772
  }
3616
3773
 
@@ -3706,12 +3863,12 @@ var LWC = (function (exports) {
3706
3863
  */
3707
3864
 
3708
3865
 
3709
- function getUpgradableConstructor(tagName, renderer) {
3866
+ function getUpgradableConstructor(tagName) {
3710
3867
  // Should never get a tag with upper case letter at this point, the compiler should
3711
3868
  // produce only tags with lowercase letters
3712
3869
  // But, for backwards compatibility, we will lower case the tagName
3713
3870
  tagName = tagName.toLowerCase();
3714
- let CE = renderer.getCustomElement(tagName);
3871
+ let CE = getCustomElement$1(tagName);
3715
3872
 
3716
3873
  if (!isUndefined$1(CE)) {
3717
3874
  return CE;
@@ -3722,7 +3879,7 @@ var LWC = (function (exports) {
3722
3879
  */
3723
3880
 
3724
3881
 
3725
- CE = class LWCUpgradableElement extends renderer.HTMLElement {
3882
+ CE = class LWCUpgradableElement extends HTMLElementExported$1 {
3726
3883
  constructor(upgradeCallback) {
3727
3884
  super();
3728
3885
 
@@ -3732,7 +3889,7 @@ var LWC = (function (exports) {
3732
3889
  }
3733
3890
 
3734
3891
  };
3735
- renderer.defineCustomElement(tagName, CE);
3892
+ defineCustomElement$1(tagName, CE);
3736
3893
  return CE;
3737
3894
  }
3738
3895
  /*
@@ -3750,10 +3907,7 @@ var LWC = (function (exports) {
3750
3907
  const {
3751
3908
  owner
3752
3909
  } = vnode;
3753
- const {
3754
- renderer
3755
- } = owner;
3756
- const elm = renderer.createText(vnode.text);
3910
+ const elm = createText$1(vnode.text);
3757
3911
  linkNodeToShadow(elm, owner);
3758
3912
  vnode.elm = elm;
3759
3913
  },
@@ -3775,10 +3929,7 @@ var LWC = (function (exports) {
3775
3929
  owner,
3776
3930
  text
3777
3931
  } = vnode;
3778
- const {
3779
- renderer
3780
- } = owner;
3781
- const elm = renderer.createComment(text);
3932
+ const elm = createComment$1(text);
3782
3933
  linkNodeToShadow(elm, owner);
3783
3934
  vnode.elm = elm;
3784
3935
  },
@@ -3808,11 +3959,8 @@ var LWC = (function (exports) {
3808
3959
  svg
3809
3960
  }
3810
3961
  } = vnode;
3811
- const {
3812
- renderer
3813
- } = owner;
3814
3962
  const namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
3815
- const elm = renderer.createElement(sel, namespace);
3963
+ const elm = createElement$2(sel, namespace);
3816
3964
  linkNodeToShadow(elm, owner);
3817
3965
  fallbackElmHook(elm, vnode);
3818
3966
  vnode.elm = elm;
@@ -3872,10 +4020,7 @@ var LWC = (function (exports) {
3872
4020
  sel,
3873
4021
  owner
3874
4022
  } = vnode;
3875
- const {
3876
- renderer
3877
- } = owner;
3878
- const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
4023
+ const UpgradableConstructor = getUpgradableConstructor(sel);
3879
4024
  /**
3880
4025
  * Note: if the upgradable constructor does not expect, or throw when we new it
3881
4026
  * with a callback as the first argument, we could implement a more advanced
@@ -3960,8 +4105,7 @@ var LWC = (function (exports) {
3960
4105
  createVM(elm, def, {
3961
4106
  mode,
3962
4107
  owner,
3963
- tagName: sel,
3964
- renderer: owner.renderer
4108
+ tagName: sel
3965
4109
  });
3966
4110
  vnode.elm = elm;
3967
4111
  const vm = getAssociatedVM(elm);
@@ -3984,12 +4128,11 @@ var LWC = (function (exports) {
3984
4128
 
3985
4129
  function linkNodeToShadow(elm, owner) {
3986
4130
  const {
3987
- renderer,
3988
4131
  renderMode,
3989
4132
  shadowMode
3990
4133
  } = owner; // TODO [#1164]: this should eventually be done by the polyfill directly
3991
4134
 
3992
- if (renderer.isSyntheticShadowDefined) {
4135
+ if (isSyntheticShadowDefined$1) {
3993
4136
  if (shadowMode === 1
3994
4137
  /* Synthetic */
3995
4138
  || renderMode === 0
@@ -4397,7 +4540,6 @@ var LWC = (function (exports) {
4397
4540
  const {
4398
4541
  elm,
4399
4542
  context,
4400
- renderer,
4401
4543
  renderMode,
4402
4544
  shadowMode
4403
4545
  } = vm;
@@ -4424,11 +4566,11 @@ var LWC = (function (exports) {
4424
4566
  } = context;
4425
4567
 
4426
4568
  if (oldHasTokenInClass) {
4427
- renderer.getClassList(elm).remove(makeHostToken(oldToken));
4569
+ getClassList$1(elm).remove(makeHostToken(oldToken));
4428
4570
  }
4429
4571
 
4430
4572
  if (oldHasTokenInAttribute) {
4431
- renderer.removeAttribute(elm, makeHostToken(oldToken));
4573
+ removeAttribute$1(elm, makeHostToken(oldToken));
4432
4574
  } // Apply the new template styling token to the host element, if the new template has any
4433
4575
  // associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
4434
4576
 
@@ -4440,12 +4582,12 @@ var LWC = (function (exports) {
4440
4582
 
4441
4583
  if (!isUndefined$1(newToken)) {
4442
4584
  if (hasScopedStyles) {
4443
- renderer.getClassList(elm).add(makeHostToken(newToken));
4585
+ getClassList$1(elm).add(makeHostToken(newToken));
4444
4586
  newHasTokenInClass = true;
4445
4587
  }
4446
4588
 
4447
4589
  if (isSyntheticShadow) {
4448
- renderer.setAttribute(elm, makeHostToken(newToken), '');
4590
+ setAttribute$1(elm, makeHostToken(newToken), '');
4449
4591
  newHasTokenInAttribute = true;
4450
4592
  }
4451
4593
  } // Update the styling tokens present on the context object.
@@ -4458,6 +4600,7 @@ var LWC = (function (exports) {
4458
4600
 
4459
4601
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
4460
4602
  const content = [];
4603
+ let root;
4461
4604
 
4462
4605
  for (let i = 0; i < stylesheets.length; i++) {
4463
4606
  let stylesheet = stylesheets[i];
@@ -4465,22 +4608,45 @@ var LWC = (function (exports) {
4465
4608
  if (isArray$1(stylesheet)) {
4466
4609
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
4467
4610
  } else {
4468
- // native shadow DOM. Synthetic shadow DOM never uses `:host`.
4469
4611
 
4612
+ const isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
4613
+
4614
+ const scopeToken = isScopedCss || vm.shadowMode === 1
4615
+ /* Synthetic */
4616
+ && vm.renderMode === 1
4617
+ /* Shadow */
4618
+ ? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
4619
+ // native shadow DOM. Synthetic shadow DOM never uses `:host`.
4470
4620
 
4471
- const isScopedCss = stylesheet[KEY__SCOPED_CSS];
4472
4621
  const useActualHostSelector = vm.renderMode === 0
4473
4622
  /* Light */
4474
4623
  ? !isScopedCss : vm.shadowMode === 0
4475
4624
  /* Native */
4476
- ; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
4625
+ ; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
4626
+ // we use an attribute selector on the host to simulate :dir().
4477
4627
 
4478
- const scopeToken = isScopedCss || vm.shadowMode === 1
4479
- /* Synthetic */
4480
- && vm.renderMode === 1
4628
+ let useNativeDirPseudoclass;
4629
+
4630
+ if (vm.renderMode === 1
4481
4631
  /* Shadow */
4482
- ? stylesheetToken : undefined;
4483
- ArrayPush$1.call(content, stylesheet(useActualHostSelector, scopeToken));
4632
+ ) {
4633
+ useNativeDirPseudoclass = vm.shadowMode === 0
4634
+ /* Native */
4635
+ ;
4636
+ } else {
4637
+ // Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
4638
+ // At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
4639
+ if (isUndefined$1(root)) {
4640
+ // Only calculate the root once as necessary
4641
+ root = getNearestShadowComponent(vm);
4642
+ }
4643
+
4644
+ useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
4645
+ /* Native */
4646
+ ;
4647
+ }
4648
+
4649
+ ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
4484
4650
  }
4485
4651
  }
4486
4652
 
@@ -4504,14 +4670,12 @@ var LWC = (function (exports) {
4504
4670
  // https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
4505
4671
 
4506
4672
 
4507
- function getNearestNativeShadowComponent(vm) {
4673
+ function getNearestShadowComponent(vm) {
4508
4674
  let owner = vm;
4509
4675
 
4510
4676
  while (!isNull(owner)) {
4511
4677
  if (owner.renderMode === 1
4512
4678
  /* Shadow */
4513
- && owner.shadowMode === 0
4514
- /* Native */
4515
4679
  ) {
4516
4680
  return owner;
4517
4681
  }
@@ -4522,9 +4686,22 @@ var LWC = (function (exports) {
4522
4686
  return owner;
4523
4687
  }
4524
4688
 
4689
+ function getNearestNativeShadowComponent(vm) {
4690
+ const owner = getNearestShadowComponent(vm);
4691
+
4692
+ if (!isNull(owner) && owner.shadowMode === 1
4693
+ /* Synthetic */
4694
+ ) {
4695
+ // Synthetic-within-native is impossible. So if the nearest shadow component is
4696
+ // synthetic, we know we won't find a native component if we go any further.
4697
+ return null;
4698
+ }
4699
+
4700
+ return owner;
4701
+ }
4702
+
4525
4703
  function createStylesheet(vm, stylesheets) {
4526
4704
  const {
4527
- renderer,
4528
4705
  renderMode,
4529
4706
  shadowMode
4530
4707
  } = vm;
@@ -4535,9 +4712,9 @@ var LWC = (function (exports) {
4535
4712
  /* Synthetic */
4536
4713
  ) {
4537
4714
  for (let i = 0; i < stylesheets.length; i++) {
4538
- renderer.insertGlobalStylesheet(stylesheets[i]);
4715
+ insertGlobalStylesheet$1(stylesheets[i]);
4539
4716
  }
4540
- } else if (renderer.ssr || renderer.isHydrating()) {
4717
+ } else if (ssr$1 || isHydrating$1()) {
4541
4718
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
4542
4719
  // This works in the client, because the stylesheets are created, and cached in the VM
4543
4720
  // the first time the VM renders.
@@ -4551,10 +4728,10 @@ var LWC = (function (exports) {
4551
4728
 
4552
4729
  for (let i = 0; i < stylesheets.length; i++) {
4553
4730
  if (isGlobal) {
4554
- renderer.insertGlobalStylesheet(stylesheets[i]);
4731
+ insertGlobalStylesheet$1(stylesheets[i]);
4555
4732
  } else {
4556
4733
  // local level
4557
- renderer.insertStylesheet(stylesheets[i], root.cmpRoot);
4734
+ insertStylesheet$1(stylesheets[i], root.cmpRoot);
4558
4735
  }
4559
4736
  }
4560
4737
  }
@@ -4595,7 +4772,7 @@ var LWC = (function (exports) {
4595
4772
  if (isProfilerEnabled) {
4596
4773
  currentDispatcher(opId, 0
4597
4774
  /* Start */
4598
- , vm.tagName, vm.idx);
4775
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
4599
4776
  }
4600
4777
  }
4601
4778
 
@@ -4604,7 +4781,7 @@ var LWC = (function (exports) {
4604
4781
  if (isProfilerEnabled) {
4605
4782
  currentDispatcher(opId, 1
4606
4783
  /* Stop */
4607
- , vm.tagName, vm.idx);
4784
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
4608
4785
  }
4609
4786
  }
4610
4787
 
@@ -4613,7 +4790,7 @@ var LWC = (function (exports) {
4613
4790
  if (isProfilerEnabled) {
4614
4791
  currentDispatcher(opId, 0
4615
4792
  /* Start */
4616
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
4793
+ , 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);
4617
4794
  }
4618
4795
  }
4619
4796
 
@@ -4622,7 +4799,7 @@ var LWC = (function (exports) {
4622
4799
  if (isProfilerEnabled) {
4623
4800
  currentDispatcher(opId, 1
4624
4801
  /* Stop */
4625
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
4802
+ , 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);
4626
4803
  }
4627
4804
  }
4628
4805
  /*
@@ -5109,7 +5286,6 @@ var LWC = (function (exports) {
5109
5286
  const {
5110
5287
  mode,
5111
5288
  owner,
5112
- renderer,
5113
5289
  tagName
5114
5290
  } = options;
5115
5291
  const vm = {
@@ -5124,7 +5300,6 @@ var LWC = (function (exports) {
5124
5300
  tagName,
5125
5301
  mode,
5126
5302
  owner,
5127
- renderer,
5128
5303
  children: EmptyArray,
5129
5304
  aChildren: EmptyArray,
5130
5305
  velements: EmptyArray,
@@ -5167,16 +5342,11 @@ var LWC = (function (exports) {
5167
5342
 
5168
5343
  function computeShadowMode(vm) {
5169
5344
  const {
5170
- def,
5171
- renderer
5345
+ def
5172
5346
  } = vm;
5173
- const {
5174
- isNativeShadowDefined,
5175
- isSyntheticShadowDefined
5176
- } = renderer;
5177
5347
  let shadowMode;
5178
5348
 
5179
- if (isSyntheticShadowDefined) {
5349
+ if (isSyntheticShadowDefined$1) {
5180
5350
  if (def.renderMode === 0
5181
5351
  /* Light */
5182
5352
  ) {
@@ -5185,7 +5355,7 @@ var LWC = (function (exports) {
5185
5355
  shadowMode = 0
5186
5356
  /* Native */
5187
5357
  ;
5188
- } else if (isNativeShadowDefined) {
5358
+ } else if (isNativeShadowDefined$1) {
5189
5359
  if (def.shadowSupportMode === "any"
5190
5360
  /* Any */
5191
5361
  ) {
@@ -5309,13 +5479,12 @@ var LWC = (function (exports) {
5309
5479
 
5310
5480
  function runRenderedCallback(vm) {
5311
5481
  const {
5312
- renderer,
5313
5482
  def: {
5314
5483
  renderedCallback
5315
5484
  }
5316
5485
  } = vm;
5317
5486
 
5318
- if (isTrue(renderer.ssr)) {
5487
+ if (isTrue(ssr$1)) {
5319
5488
  return;
5320
5489
  }
5321
5490
 
@@ -5532,8 +5701,7 @@ var LWC = (function (exports) {
5532
5701
 
5533
5702
  function resetComponentRoot(vm) {
5534
5703
  const {
5535
- children,
5536
- renderer
5704
+ children
5537
5705
  } = vm;
5538
5706
  const rootNode = getRenderRoot(vm);
5539
5707
 
@@ -5541,7 +5709,7 @@ var LWC = (function (exports) {
5541
5709
  const child = children[i];
5542
5710
 
5543
5711
  if (!isNull(child) && !isUndefined$1(child.elm)) {
5544
- renderer.remove(child.elm, rootNode);
5712
+ remove$1(child.elm, rootNode);
5545
5713
  }
5546
5714
  }
5547
5715
 
@@ -5551,7 +5719,7 @@ var LWC = (function (exports) {
5551
5719
  }
5552
5720
 
5553
5721
  function scheduleRehydration(vm) {
5554
- if (isTrue(vm.renderer.ssr) || isTrue(vm.isScheduled)) {
5722
+ if (isTrue(ssr$1) || isTrue(vm.isScheduled)) {
5555
5723
  return;
5556
5724
  }
5557
5725
 
@@ -5778,7 +5946,6 @@ var LWC = (function (exports) {
5778
5946
 
5779
5947
  const {
5780
5948
  elm,
5781
- renderer,
5782
5949
  context: {
5783
5950
  wiredConnecting,
5784
5951
  wiredDisconnecting
@@ -5805,7 +5972,7 @@ var LWC = (function (exports) {
5805
5972
  }
5806
5973
 
5807
5974
  });
5808
- renderer.dispatchEvent(elm, contextRegistrationEvent);
5975
+ dispatchEvent$1(elm, contextRegistrationEvent);
5809
5976
  });
5810
5977
  }
5811
5978
 
@@ -6060,7 +6227,7 @@ var LWC = (function (exports) {
6060
6227
  hooksAreSet = true;
6061
6228
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
6062
6229
  }
6063
- /* version: 2.5.10 */
6230
+ /* version: 2.6.3 */
6064
6231
 
6065
6232
  /*
6066
6233
  * Copyright (c) 2018, salesforce.com, inc.
@@ -6080,7 +6247,9 @@ var LWC = (function (exports) {
6080
6247
  const styleElements = create(null);
6081
6248
  const styleSheets = create(null);
6082
6249
  const nodesToStyleSheets = new WeakMap();
6083
- let getCustomElement, defineCustomElement, HTMLElementConstructor;
6250
+ let getCustomElement;
6251
+ let defineCustomElement;
6252
+ let HTMLElementConstructor;
6084
6253
 
6085
6254
  function isCustomElementRegistryAvailable() {
6086
6255
  if (typeof customElements === 'undefined') {
@@ -6195,182 +6364,213 @@ var LWC = (function (exports) {
6195
6364
  HTMLElementConstructor.prototype = HTMLElement.prototype;
6196
6365
  }
6197
6366
 
6198
- let isHydrating = false;
6367
+ let hydrating = false;
6199
6368
 
6200
- function setIsHydrating(v) {
6201
- isHydrating = v;
6369
+ function setIsHydrating(value) {
6370
+ hydrating = value;
6202
6371
  }
6203
6372
 
6204
- const renderer = {
6205
- ssr: false,
6206
-
6207
- isHydrating() {
6208
- return isHydrating;
6209
- },
6210
-
6211
- isNativeShadowDefined: _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED],
6212
- isSyntheticShadowDefined: hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN),
6373
+ const ssr = false;
6213
6374
 
6214
- createElement(tagName, namespace) {
6215
- return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
6216
- },
6375
+ function isHydrating() {
6376
+ return hydrating;
6377
+ }
6217
6378
 
6218
- createText(content) {
6219
- return document.createTextNode(content);
6220
- },
6379
+ const isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
6380
+ const isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
6221
6381
 
6222
- createComment(content) {
6223
- return document.createComment(content);
6224
- },
6382
+ function createElement$1(tagName, namespace) {
6383
+ return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
6384
+ }
6225
6385
 
6226
- insert(node, parent, anchor) {
6227
- parent.insertBefore(node, anchor);
6228
- },
6386
+ function createText(content) {
6387
+ return document.createTextNode(content);
6388
+ }
6229
6389
 
6230
- remove(node, parent) {
6231
- parent.removeChild(node);
6232
- },
6390
+ function createComment(content) {
6391
+ return document.createComment(content);
6392
+ }
6233
6393
 
6234
- nextSibling(node) {
6235
- return node.nextSibling;
6236
- },
6394
+ function insert(node, parent, anchor) {
6395
+ parent.insertBefore(node, anchor);
6396
+ }
6237
6397
 
6238
- attachShadow(element, options) {
6239
- if (isHydrating) {
6240
- return element.shadowRoot;
6241
- }
6398
+ function remove(node, parent) {
6399
+ parent.removeChild(node);
6400
+ }
6242
6401
 
6243
- return element.attachShadow(options);
6244
- },
6402
+ function nextSibling(node) {
6403
+ return node.nextSibling;
6404
+ }
6245
6405
 
6246
- setText(node, content) {
6247
- node.nodeValue = content;
6248
- },
6406
+ function attachShadow(element, options) {
6407
+ if (hydrating) {
6408
+ return element.shadowRoot;
6409
+ }
6249
6410
 
6250
- getProperty(node, key) {
6251
- return node[key];
6252
- },
6411
+ return element.attachShadow(options);
6412
+ }
6253
6413
 
6254
- setProperty(node, key, value) {
6414
+ function setText(node, content) {
6415
+ node.nodeValue = content;
6416
+ }
6255
6417
 
6256
- node[key] = value;
6257
- },
6418
+ function getProperty(node, key) {
6419
+ return node[key];
6420
+ }
6258
6421
 
6259
- getAttribute(element, name, namespace) {
6260
- return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
6261
- },
6422
+ function setProperty(node, key, value) {
6262
6423
 
6263
- setAttribute(element, name, value, namespace) {
6264
- return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
6265
- },
6424
+ node[key] = value;
6425
+ }
6266
6426
 
6267
- removeAttribute(element, name, namespace) {
6268
- if (isUndefined$1(namespace)) {
6269
- element.removeAttribute(name);
6270
- } else {
6271
- element.removeAttributeNS(namespace, name);
6272
- }
6273
- },
6427
+ function getAttribute(element, name, namespace) {
6428
+ return isUndefined$1(namespace) ? element.getAttribute(name) : element.getAttributeNS(namespace, name);
6429
+ }
6274
6430
 
6275
- addEventListener(target, type, callback, options) {
6276
- target.addEventListener(type, callback, options);
6277
- },
6431
+ function setAttribute(element, name, value, namespace) {
6432
+ return isUndefined$1(namespace) ? element.setAttribute(name, value) : element.setAttributeNS(namespace, name, value);
6433
+ }
6278
6434
 
6279
- removeEventListener(target, type, callback, options) {
6280
- target.removeEventListener(type, callback, options);
6281
- },
6435
+ function removeAttribute(element, name, namespace) {
6436
+ if (isUndefined$1(namespace)) {
6437
+ element.removeAttribute(name);
6438
+ } else {
6439
+ element.removeAttributeNS(namespace, name);
6440
+ }
6441
+ }
6282
6442
 
6283
- dispatchEvent(target, event) {
6284
- return target.dispatchEvent(event);
6285
- },
6443
+ function addEventListener(target, type, callback, options) {
6444
+ target.addEventListener(type, callback, options);
6445
+ }
6286
6446
 
6287
- getClassList(element) {
6288
- return element.classList;
6289
- },
6447
+ function removeEventListener(target, type, callback, options) {
6448
+ target.removeEventListener(type, callback, options);
6449
+ }
6290
6450
 
6291
- setCSSStyleProperty(element, name, value, important) {
6292
- // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
6293
- // represent elements in the engine?
6294
- element.style.setProperty(name, value, important ? 'important' : '');
6295
- },
6451
+ function dispatchEvent(target, event) {
6452
+ return target.dispatchEvent(event);
6453
+ }
6296
6454
 
6297
- getBoundingClientRect(element) {
6298
- return element.getBoundingClientRect();
6299
- },
6455
+ function getClassList(element) {
6456
+ return element.classList;
6457
+ }
6300
6458
 
6301
- querySelector(element, selectors) {
6302
- return element.querySelector(selectors);
6303
- },
6459
+ function setCSSStyleProperty(element, name, value, important) {
6460
+ // TODO [#0]: How to avoid this type casting? Shall we use a different type interface to
6461
+ // represent elements in the engine?
6462
+ element.style.setProperty(name, value, important ? 'important' : '');
6463
+ }
6304
6464
 
6305
- querySelectorAll(element, selectors) {
6306
- return element.querySelectorAll(selectors);
6307
- },
6465
+ function getBoundingClientRect(element) {
6466
+ return element.getBoundingClientRect();
6467
+ }
6308
6468
 
6309
- getElementsByTagName(element, tagNameOrWildCard) {
6310
- return element.getElementsByTagName(tagNameOrWildCard);
6311
- },
6469
+ function querySelector(element, selectors) {
6470
+ return element.querySelector(selectors);
6471
+ }
6312
6472
 
6313
- getElementsByClassName(element, names) {
6314
- return element.getElementsByClassName(names);
6315
- },
6473
+ function querySelectorAll(element, selectors) {
6474
+ return element.querySelectorAll(selectors);
6475
+ }
6316
6476
 
6317
- getChildren(element) {
6318
- return element.children;
6319
- },
6477
+ function getElementsByTagName(element, tagNameOrWildCard) {
6478
+ return element.getElementsByTagName(tagNameOrWildCard);
6479
+ }
6320
6480
 
6321
- getChildNodes(element) {
6322
- return element.childNodes;
6323
- },
6481
+ function getElementsByClassName(element, names) {
6482
+ return element.getElementsByClassName(names);
6483
+ }
6324
6484
 
6325
- getFirstChild(element) {
6326
- return element.firstChild;
6327
- },
6485
+ function getChildren(element) {
6486
+ return element.children;
6487
+ }
6328
6488
 
6329
- getFirstElementChild(element) {
6330
- return element.firstElementChild;
6331
- },
6489
+ function getChildNodes(element) {
6490
+ return element.childNodes;
6491
+ }
6332
6492
 
6333
- getLastChild(element) {
6334
- return element.lastChild;
6335
- },
6493
+ function getFirstChild(element) {
6494
+ return element.firstChild;
6495
+ }
6336
6496
 
6337
- getLastElementChild(element) {
6338
- return element.lastElementChild;
6339
- },
6497
+ function getFirstElementChild(element) {
6498
+ return element.firstElementChild;
6499
+ }
6340
6500
 
6341
- isConnected(node) {
6342
- return node.isConnected;
6343
- },
6501
+ function getLastChild(element) {
6502
+ return element.lastChild;
6503
+ }
6344
6504
 
6345
- insertGlobalStylesheet(content) {
6346
- if (!isUndefined$1(globalStylesheets[content])) {
6347
- return;
6348
- }
6505
+ function getLastElementChild(element) {
6506
+ return element.lastElementChild;
6507
+ }
6349
6508
 
6350
- globalStylesheets[content] = true;
6351
- const elm = document.createElement('style');
6352
- elm.type = 'text/css';
6353
- elm.textContent = content;
6354
- globalStylesheetsParentElement.appendChild(elm);
6355
- },
6509
+ function isConnected(node) {
6510
+ return node.isConnected;
6511
+ }
6356
6512
 
6357
- insertStylesheet(content, target) {
6358
- if (supportsConstructableStyleSheets) {
6359
- insertConstructableStyleSheet(content, target);
6360
- } else {
6361
- // Fall back to <style> element
6362
- insertStyleElement(content, target);
6363
- }
6364
- },
6513
+ function insertGlobalStylesheet(content) {
6514
+ if (!isUndefined$1(globalStylesheets[content])) {
6515
+ return;
6516
+ }
6365
6517
 
6366
- assertInstanceOfHTMLElement(elm, msg) {
6367
- assert.invariant(elm instanceof HTMLElement, msg);
6368
- },
6518
+ globalStylesheets[content] = true;
6519
+ const elm = document.createElement('style');
6520
+ elm.type = 'text/css';
6521
+ elm.textContent = content;
6522
+ globalStylesheetsParentElement.appendChild(elm);
6523
+ }
6369
6524
 
6370
- defineCustomElement,
6371
- getCustomElement,
6372
- HTMLElement: HTMLElementConstructor
6373
- };
6525
+ function insertStylesheet(content, target) {
6526
+ if (supportsConstructableStyleSheets) {
6527
+ insertConstructableStyleSheet(content, target);
6528
+ } else {
6529
+ // Fall back to <style> element
6530
+ insertStyleElement(content, target);
6531
+ }
6532
+ }
6533
+
6534
+ const HTMLElementExported = HTMLElementConstructor;
6535
+ setAttachShadow(attachShadow);
6536
+ setCreateComment(createComment);
6537
+ setCreateElement(createElement$1);
6538
+ setCreateText(createText);
6539
+ setDefineCustomElement(defineCustomElement);
6540
+ setDispatchEvent(dispatchEvent);
6541
+ setGetAttribute(getAttribute);
6542
+ setGetBoundingClientRect(getBoundingClientRect);
6543
+ setGetChildNodes(getChildNodes);
6544
+ setGetChildren(getChildren);
6545
+ setGetClassList(getClassList);
6546
+ setGetCustomElement(getCustomElement);
6547
+ setGetElementsByClassName(getElementsByClassName);
6548
+ setGetElementsByTagName(getElementsByTagName);
6549
+ setGetFirstChild(getFirstChild);
6550
+ setGetFirstElementChild(getFirstElementChild);
6551
+ setGetLastChild(getLastChild);
6552
+ setGetLastElementChild(getLastElementChild);
6553
+ setGetProperty(getProperty);
6554
+ setHTMLElement(HTMLElementExported);
6555
+ setInsert(insert);
6556
+ setInsertGlobalStylesheet(insertGlobalStylesheet);
6557
+ setInsertStylesheet(insertStylesheet);
6558
+ setIsConnected(isConnected);
6559
+ setIsHydrating$1(isHydrating);
6560
+ setIsNativeShadowDefined(isNativeShadowDefined);
6561
+ setIsSyntheticShadowDefined(isSyntheticShadowDefined);
6562
+ setNextSibling(nextSibling);
6563
+ setQuerySelector(querySelector);
6564
+ setQuerySelectorAll(querySelectorAll);
6565
+ setRemove(remove);
6566
+ setRemoveAttribute(removeAttribute);
6567
+ setRemoveEventListener(removeEventListener);
6568
+ setSetAttribute(setAttribute);
6569
+ setSetCSSStyleProperty(setCSSStyleProperty);
6570
+ setSetProperty(setProperty);
6571
+ setSetText(setText);
6572
+ setSsr(ssr);
6573
+ setAddEventListener(addEventListener);
6374
6574
  /*
6375
6575
  * Copyright (c) 2018, salesforce.com, inc.
6376
6576
  * All rights reserved.
@@ -6450,7 +6650,7 @@ var LWC = (function (exports) {
6450
6650
  throw new TypeError(`"createElement" function expects an "is" option with a valid component constructor.`);
6451
6651
  }
6452
6652
 
6453
- const UpgradableConstructor = getUpgradableConstructor(sel, renderer);
6653
+ const UpgradableConstructor = getUpgradableConstructor(sel);
6454
6654
  let wasComponentUpgraded = false; // the custom element from the registry is expecting an upgrade callback
6455
6655
 
6456
6656
  /**
@@ -6465,8 +6665,7 @@ var LWC = (function (exports) {
6465
6665
  createVM(elm, def, {
6466
6666
  tagName: sel,
6467
6667
  mode: options.mode !== 'closed' ? 'open' : 'closed',
6468
- owner: null,
6469
- renderer
6668
+ owner: null
6470
6669
  });
6471
6670
  ConnectingSlot.set(elm, connectRootElement);
6472
6671
  DisconnectingSlot.set(elm, disconnectRootElement);
@@ -6489,6 +6688,10 @@ var LWC = (function (exports) {
6489
6688
 
6490
6689
 
6491
6690
  function hydrateComponent(element, Ctor, props = {}) {
6691
+ if (!(element instanceof Element)) {
6692
+ throw new TypeError(`"hydrateComponent" expects a valid DOM element as the first parameter but instead received ${element}.`);
6693
+ }
6694
+
6492
6695
  if (!isFunction$1(Ctor)) {
6493
6696
  throw new TypeError(`"hydrateComponent" expects a valid component constructor as the second parameter but instead received ${Ctor}.`);
6494
6697
  }
@@ -6506,7 +6709,6 @@ var LWC = (function (exports) {
6506
6709
  createVM(element, def, {
6507
6710
  mode: 'open',
6508
6711
  owner: null,
6509
- renderer,
6510
6712
  tagName: element.tagName.toLowerCase()
6511
6713
  });
6512
6714
 
@@ -6573,8 +6775,7 @@ var LWC = (function (exports) {
6573
6775
  createVM(this, def, {
6574
6776
  mode: 'open',
6575
6777
  owner: null,
6576
- tagName: this.tagName,
6577
- renderer
6778
+ tagName: this.tagName
6578
6779
  });
6579
6780
  }
6580
6781
 
@@ -6641,7 +6842,7 @@ var LWC = (function (exports) {
6641
6842
  return false;
6642
6843
  }
6643
6844
 
6644
- if (renderer.isSyntheticShadowDefined) {
6845
+ if (isSyntheticShadowDefined) {
6645
6846
  // TODO [#1252]: old behavior that is still used by some pieces of the platform,
6646
6847
  // specifically, nodes inserted manually on places where `lwc:dom="manual"` directive is not
6647
6848
  // used, will be considered global elements.
@@ -6694,7 +6895,7 @@ var LWC = (function (exports) {
6694
6895
  });
6695
6896
  freeze(LightningElement);
6696
6897
  seal(LightningElement.prototype);
6697
- /* version: 2.5.10 */
6898
+ /* version: 2.6.3 */
6698
6899
 
6699
6900
  exports.LightningElement = LightningElement;
6700
6901
  exports.__unstable__ProfilerControl = profilerControl;