lwc 2.38.0 → 2.39.0

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 (64) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +223 -129
  2. package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
  3. package/dist/engine-dom/iife/es2017/engine-dom.js +223 -129
  4. package/dist/engine-dom/iife/es2017/engine-dom.js.map +1 -1
  5. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  6. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +174 -47
  7. package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
  8. package/dist/engine-dom/iife/es5/engine-dom.js +371 -214
  9. package/dist/engine-dom/iife/es5/engine-dom.js.map +1 -1
  10. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  11. package/dist/engine-dom/iife/es5/engine-dom_debug.js +323 -160
  12. package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
  13. package/dist/engine-dom/umd/es2017/engine-dom.js +223 -129
  14. package/dist/engine-dom/umd/es2017/engine-dom.js.map +1 -1
  15. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  16. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +174 -47
  17. package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
  18. package/dist/engine-dom/umd/es5/engine-dom.js +371 -214
  19. package/dist/engine-dom/umd/es5/engine-dom.js.map +1 -1
  20. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  21. package/dist/engine-dom/umd/es5/engine-dom_debug.js +323 -160
  22. package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
  23. package/dist/engine-server/commonjs/es2017/engine-server.js +188 -82
  24. package/dist/engine-server/commonjs/es2017/engine-server.js.map +1 -1
  25. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  26. package/dist/engine-server/esm/es2017/engine-server.js +188 -82
  27. package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
  28. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
  29. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
  30. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
  31. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
  32. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  33. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
  34. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
  35. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -1
  36. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
  37. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -1
  38. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  39. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
  40. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  41. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
  42. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
  43. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -1
  44. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
  45. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js.map +1 -1
  46. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  47. package/dist/wire-service/esm/es2017/wire-service.js.map +1 -1
  48. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  49. package/dist/wire-service/iife/es2017/wire-service.js.map +1 -1
  50. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  51. package/dist/wire-service/iife/es2017/wire-service_debug.js.map +1 -1
  52. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  53. package/dist/wire-service/iife/es5/wire-service.js.map +1 -1
  54. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  55. package/dist/wire-service/iife/es5/wire-service_debug.js.map +1 -1
  56. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  57. package/dist/wire-service/umd/es2017/wire-service.js.map +1 -1
  58. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  59. package/dist/wire-service/umd/es2017/wire-service_debug.js.map +1 -1
  60. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  61. package/dist/wire-service/umd/es5/wire-service.js.map +1 -1
  62. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  63. package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -1
  64. package/package.json +7 -7
@@ -318,7 +318,7 @@
318
318
  CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
319
319
  return propertyName;
320
320
  }
321
- /** version: 2.38.0 */
321
+ /** version: 2.39.0 */
322
322
 
323
323
  /**
324
324
  * Copyright (C) 2018 salesforce.com, inc.
@@ -390,7 +390,7 @@
390
390
  */
391
391
  function setFeatureFlagForTest(name, value) {
392
392
  }
393
- /** version: 2.38.0 */
393
+ /** version: 2.39.0 */
394
394
 
395
395
  /**
396
396
  * Copyright (C) 2018 salesforce.com, inc.
@@ -454,7 +454,7 @@
454
454
  }
455
455
  }
456
456
  }
457
- /** version: 2.38.0 */
457
+ /** version: 2.39.0 */
458
458
 
459
459
  /*
460
460
  * Copyright (c) 2018, salesforce.com, inc.
@@ -2567,10 +2567,131 @@
2567
2567
  }
2568
2568
  freeze(BaseBridgeElement);
2569
2569
  seal(BaseBridgeElement.prototype);
2570
+
2571
+ /*
2572
+ * Copyright (c) 2023, salesforce.com, inc.
2573
+ * All rights reserved.
2574
+ * SPDX-License-Identifier: MIT
2575
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2576
+ */
2577
+ var supportsWeakRefs = typeof WeakRef === 'function' && typeof FinalizationRegistry === 'function';
2578
+ // In browsers that doesn't support WeakRefs, the values will still leak, but at least the keys won't
2579
+ var LegacyWeakMultiMap = /*#__PURE__*/function () {
2580
+ function LegacyWeakMultiMap() {
2581
+ _classCallCheck(this, LegacyWeakMultiMap);
2582
+ this._map = new WeakMap();
2583
+ }
2584
+ _createClass(LegacyWeakMultiMap, [{
2585
+ key: "_getValues",
2586
+ value: function _getValues(key) {
2587
+ var values = this._map.get(key);
2588
+ if (isUndefined$1(values)) {
2589
+ values = new Set();
2590
+ this._map.set(key, values);
2591
+ }
2592
+ return values;
2593
+ }
2594
+ }, {
2595
+ key: "get",
2596
+ value: function get(key) {
2597
+ return this._getValues(key);
2598
+ }
2599
+ }, {
2600
+ key: "add",
2601
+ value: function add(key, vm) {
2602
+ var set = this._getValues(key);
2603
+ set.add(vm);
2604
+ }
2605
+ }, {
2606
+ key: "delete",
2607
+ value: function _delete(key) {
2608
+ this._map.delete(key);
2609
+ }
2610
+ }]);
2611
+ return LegacyWeakMultiMap;
2612
+ }(); // This implementation relies on the WeakRef/FinalizationRegistry proposal.
2613
+ // For some background, see: https://github.com/tc39/proposal-weakrefs
2614
+ var ModernWeakMultiMap = /*#__PURE__*/function () {
2615
+ function ModernWeakMultiMap() {
2616
+ _classCallCheck(this, ModernWeakMultiMap);
2617
+ this._map = new WeakMap();
2618
+ this._registry = new FinalizationRegistry(function (weakRefs) {
2619
+ // This should be considered an optional cleanup method to remove GC'ed values from their respective arrays.
2620
+ // JS VMs are not obligated to call FinalizationRegistry callbacks.
2621
+ // Work backwards, removing stale VMs
2622
+ for (var _i13 = weakRefs.length - 1; _i13 >= 0; _i13--) {
2623
+ var vm = weakRefs[_i13].deref();
2624
+ if (isUndefined$1(vm)) {
2625
+ ArraySplice.call(weakRefs, _i13, 1); // remove
2626
+ }
2627
+ }
2628
+ });
2629
+ }
2630
+ _createClass(ModernWeakMultiMap, [{
2631
+ key: "_getWeakRefs",
2632
+ value: function _getWeakRefs(key) {
2633
+ var weakRefs = this._map.get(key);
2634
+ if (isUndefined$1(weakRefs)) {
2635
+ weakRefs = [];
2636
+ this._map.set(key, weakRefs);
2637
+ }
2638
+ return weakRefs;
2639
+ }
2640
+ }, {
2641
+ key: "get",
2642
+ value: function get(key) {
2643
+ var weakRefs = this._getWeakRefs(key);
2644
+ var result = new Set();
2645
+ var _iterator5 = _createForOfIteratorHelper(weakRefs),
2646
+ _step5;
2647
+ try {
2648
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
2649
+ var weakRef = _step5.value;
2650
+ var vm = weakRef.deref();
2651
+ if (!isUndefined$1(vm)) {
2652
+ result.add(vm);
2653
+ }
2654
+ }
2655
+ } catch (err) {
2656
+ _iterator5.e(err);
2657
+ } finally {
2658
+ _iterator5.f();
2659
+ }
2660
+ return result;
2661
+ }
2662
+ }, {
2663
+ key: "add",
2664
+ value: function add(key, value) {
2665
+ var weakRefs = this._getWeakRefs(key);
2666
+ // We could check for duplicate values here, but it doesn't seem worth it.
2667
+ // We transform the output into a Set anyway
2668
+ ArrayPush$1.call(weakRefs, new WeakRef(value));
2669
+ // It's important here not to leak the second argument, which is the "held value." The FinalizationRegistry
2670
+ // effectively creates a strong reference between the first argument (the "target") and the held value. When
2671
+ // the target is GC'ed, the callback is called, and then the held value is GC'ed.
2672
+ // Putting the key here would mean the key is not GC'ed until the value is GC'ed, which defeats the purpose
2673
+ // of the WeakMap. Whereas putting the weakRefs array here is fine, because it doesn't have a strong reference
2674
+ // to anything. See also this example:
2675
+ // https://gist.github.com/nolanlawson/79a3d36e8e6cc25c5048bb17c1795aea
2676
+ this._registry.register(value, weakRefs);
2677
+ }
2678
+ }, {
2679
+ key: "delete",
2680
+ value: function _delete(key) {
2681
+ this._map.delete(key);
2682
+ }
2683
+ }]);
2684
+ return ModernWeakMultiMap;
2685
+ }();
2686
+ var WeakMultiMap = supportsWeakRefs ? ModernWeakMultiMap : LegacyWeakMultiMap;
2570
2687
  var swappedStyleMap = new WeakMap();
2571
- var activeTemplates = new WeakMap();
2572
- var activeComponents = new WeakMap();
2573
- var activeStyles = new WeakMap();
2688
+ // The important thing here is the weak values – VMs are transient (one per component instance) and should be GC'ed,
2689
+ // so we don't want to create strong references to them.
2690
+ // The weak keys are kind of useless, because Templates, LightningElementConstructors, and StylesheetFactories are
2691
+ // never GC'ed. But maybe they will be someday, so we may as well use weak keys too.
2692
+ var activeTemplates = new WeakMultiMap();
2693
+ var activeComponents = new WeakMultiMap();
2694
+ var activeStyles = new WeakMultiMap();
2574
2695
  function getStyleOrSwappedStyle(style) {
2575
2696
  assertNotProd(); // this method should never leak to prod
2576
2697
  var visited = new Set();
@@ -2584,42 +2705,36 @@
2584
2705
  assertNotProd(); // this method should never leak to prod
2585
2706
  // tracking active component
2586
2707
  var Ctor = vm.def.ctor;
2587
- var componentVMs = activeComponents.get(Ctor);
2588
- if (isUndefined$1(componentVMs)) {
2589
- componentVMs = new Set();
2590
- activeComponents.set(Ctor, componentVMs);
2591
- }
2592
2708
  // this will allow us to keep track of the hot components
2593
- componentVMs.add(vm);
2709
+ activeComponents.add(Ctor, vm);
2594
2710
  // tracking active template
2595
2711
  var tpl = vm.cmpTemplate;
2596
2712
  if (tpl) {
2597
- var templateVMs = activeTemplates.get(tpl);
2598
- if (isUndefined$1(templateVMs)) {
2599
- templateVMs = new Set();
2600
- activeTemplates.set(tpl, templateVMs);
2601
- }
2602
2713
  // this will allow us to keep track of the templates that are
2603
2714
  // being used by a hot component
2604
- templateVMs.add(vm);
2715
+ activeTemplates.add(tpl, vm);
2605
2716
  // tracking active styles associated to template
2606
2717
  var stylesheets = tpl.stylesheets;
2607
2718
  if (!isUndefined$1(stylesheets)) {
2608
- flattenStylesheets(stylesheets).forEach(function (stylesheet) {
2609
- // this is necessary because we don't hold the list of styles
2610
- // in the vm, we only hold the selected (already swapped template)
2611
- // but the styles attached to the template might not be the actual
2612
- // active ones, but the swapped versions of those.
2613
- stylesheet = getStyleOrSwappedStyle(stylesheet);
2614
- var stylesheetVMs = activeStyles.get(stylesheet);
2615
- if (isUndefined$1(stylesheetVMs)) {
2616
- stylesheetVMs = new Set();
2617
- activeStyles.set(stylesheet, stylesheetVMs);
2719
+ var _iterator9 = _createForOfIteratorHelper(flattenStylesheets(stylesheets)),
2720
+ _step9;
2721
+ try {
2722
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
2723
+ var stylesheet = _step9.value;
2724
+ // this is necessary because we don't hold the list of styles
2725
+ // in the vm, we only hold the selected (already swapped template)
2726
+ // but the styles attached to the template might not be the actual
2727
+ // active ones, but the swapped versions of those.
2728
+ var swappedStylesheet = getStyleOrSwappedStyle(stylesheet);
2729
+ // this will allow us to keep track of the stylesheet that are
2730
+ // being used by a hot component
2731
+ activeStyles.add(swappedStylesheet, vm);
2618
2732
  }
2619
- // this will allow us to keep track of the stylesheet that are
2620
- // being used by a hot component
2621
- stylesheetVMs.add(vm);
2622
- });
2733
+ } catch (err) {
2734
+ _iterator9.e(err);
2735
+ } finally {
2736
+ _iterator9.f();
2737
+ }
2623
2738
  }
2624
2739
  }
2625
2740
  }
@@ -2894,8 +3009,8 @@
2894
3009
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
2895
3010
  var content = [];
2896
3011
  var root;
2897
- for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
2898
- var stylesheet = stylesheets[_i13];
3012
+ for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
3013
+ var stylesheet = stylesheets[_i14];
2899
3014
  if (isArray$1(stylesheet)) {
2900
3015
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
2901
3016
  } else {
@@ -2993,8 +3108,8 @@
2993
3108
  shadowMode = vm.shadowMode,
2994
3109
  insertStylesheet = vm.renderer.insertStylesheet;
2995
3110
  if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
2996
- for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
2997
- insertStylesheet(stylesheets[_i14]);
3111
+ for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
3112
+ insertStylesheet(stylesheets[_i15]);
2998
3113
  }
2999
3114
  } else if (vm.hydrated) {
3000
3115
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
@@ -3007,8 +3122,8 @@
3007
3122
  var root = getNearestNativeShadowComponent(vm);
3008
3123
  // null root means a global style
3009
3124
  var target = isNull(root) ? undefined : root.shadowRoot;
3010
- for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
3011
- insertStylesheet(stylesheets[_i15], target);
3125
+ for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
3126
+ insertStylesheet(stylesheets[_i16], target);
3012
3127
  }
3013
3128
  }
3014
3129
  return null;
@@ -3310,8 +3425,8 @@
3310
3425
  return;
3311
3426
  }
3312
3427
  var setCSSStyleProperty = renderer.setCSSStyleProperty;
3313
- for (var _i16 = 0; _i16 < styleDecls.length; _i16++) {
3314
- var _styleDecls$_i = _slicedToArray(styleDecls[_i16], 3),
3428
+ for (var _i17 = 0; _i17 < styleDecls.length; _i17++) {
3429
+ var _styleDecls$_i = _slicedToArray(styleDecls[_i17], 3),
3315
3430
  prop = _styleDecls$_i[0],
3316
3431
  value = _styleDecls$_i[1],
3317
3432
  important = _styleDecls$_i[2];
@@ -3521,8 +3636,9 @@
3521
3636
  }
3522
3637
  }
3523
3638
  function patchCustomElement(n1, n2, parent, renderer) {
3639
+ // TODO [#3331]: This if branch should be removed in 246 with lwc:dynamic
3524
3640
  if (n1.ctor !== n2.ctor) {
3525
- // If the constructor, unmount the current component and mount a new one using the new
3641
+ // If the constructor differs, unmount the current component and mount a new one using the new
3526
3642
  // constructor.
3527
3643
  var anchor = renderer.nextSibling(n1.elm);
3528
3644
  unmount(n1, parent, renderer, true);
@@ -3734,8 +3850,8 @@
3734
3850
  // If no VFragment is found in children, we don't need to traverse anything or mark the children dynamic and can return early.
3735
3851
  var nodeStack = [];
3736
3852
  var fragmentFound = false;
3737
- for (var _i17 = children.length - 1; _i17 > -1; _i17 -= 1) {
3738
- var child = children[_i17];
3853
+ for (var _i18 = children.length - 1; _i18 > -1; _i18 -= 1) {
3854
+ var child = children[_i18];
3739
3855
  ArrayPush$1.call(nodeStack, child);
3740
3856
  fragmentFound = fragmentFound || !!(child && isVFragment(child));
3741
3857
  }
@@ -3747,8 +3863,8 @@
3747
3863
  if (!isNull(currentNode) && isVFragment(currentNode)) {
3748
3864
  var fChildren = currentNode.children;
3749
3865
  // Ignore the start and end text node delimiters
3750
- for (var _i18 = fChildren.length - 2; _i18 > 0; _i18 -= 1) {
3751
- ArrayPush$1.call(nodeStack, fChildren[_i18]);
3866
+ for (var _i19 = fChildren.length - 2; _i19 > 0; _i19 -= 1) {
3867
+ ArrayPush$1.call(nodeStack, fChildren[_i19]);
3752
3868
  }
3753
3869
  } else {
3754
3870
  ArrayPush$1.call(flattenedChildren, currentNode);
@@ -3784,8 +3900,8 @@
3784
3900
  var oldSlotsMapping = vm.cmpSlots.slotAssignments;
3785
3901
  var cmpSlotsMapping = create(null);
3786
3902
  // Collect all slots into cmpSlotsMapping
3787
- for (var _i19 = 0, len = children.length; _i19 < len; _i19 += 1) {
3788
- var vnode = children[_i19];
3903
+ for (var _i20 = 0, len = children.length; _i20 < len; _i20 += 1) {
3904
+ var vnode = children[_i20];
3789
3905
  if (isNull(vnode)) {
3790
3906
  continue;
3791
3907
  }
@@ -3815,8 +3931,8 @@
3815
3931
  markComponentAsDirty(vm);
3816
3932
  return;
3817
3933
  }
3818
- for (var _i20 = 0, _len2 = oldKeys.length; _i20 < _len2; _i20 += 1) {
3819
- var key = oldKeys[_i20];
3934
+ for (var _i21 = 0, _len2 = oldKeys.length; _i21 < _len2; _i21 += 1) {
3935
+ var key = oldKeys[_i21];
3820
3936
  if (isUndefined$1(cmpSlotsMapping[key]) || oldSlotsMapping[key].length !== cmpSlotsMapping[key].length) {
3821
3937
  markComponentAsDirty(vm);
3822
3938
  return;
@@ -3939,11 +4055,11 @@
3939
4055
  if (oldStartIdx > oldEndIdx) {
3940
4056
  // There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
3941
4057
  // already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
3942
- var _i21 = newEndIdx;
4058
+ var _i22 = newEndIdx;
3943
4059
  var n;
3944
4060
  do {
3945
- n = newCh[++_i21];
3946
- } while (!isVNode(n) && _i21 < newChEnd);
4061
+ n = newCh[++_i22];
4062
+ } while (!isVNode(n) && _i22 < newChEnd);
3947
4063
  before = isVNode(n) ? n.elm : null;
3948
4064
  mountVNodes(newCh, parent, renderer, before, newStartIdx, newEndIdx + 1);
3949
4065
  } else {
@@ -3968,15 +4084,22 @@
3968
4084
  // if the old list is not empty, the new list MUST have the same
3969
4085
  // amount of nodes, that's why we call this static children
3970
4086
  var anchor = null;
3971
- for (var _i22 = c2Length - 1; _i22 >= 0; _i22 -= 1) {
3972
- var n1 = c1[_i22];
3973
- var n2 = c2[_i22];
4087
+ for (var _i23 = c2Length - 1; _i23 >= 0; _i23 -= 1) {
4088
+ var n1 = c1[_i23];
4089
+ var n2 = c2[_i23];
3974
4090
  if (n2 !== n1) {
3975
4091
  if (isVNode(n1)) {
3976
4092
  if (isVNode(n2)) {
3977
- // both vnodes are equivalent, and we just need to patch them
3978
- patch(n1, n2, parent, renderer);
3979
- anchor = n2.elm;
4093
+ if (isSameVnode(n1, n2)) {
4094
+ // both vnodes are equivalent, and we just need to patch them
4095
+ patch(n1, n2, parent, renderer);
4096
+ anchor = n2.elm;
4097
+ } else {
4098
+ // removing the old vnode since the new one is different
4099
+ unmount(n1, parent, renderer, true);
4100
+ mount(n2, parent, renderer, anchor);
4101
+ anchor = n2.elm;
4102
+ }
3980
4103
  } else {
3981
4104
  // removing the old vnode since the new one is null
3982
4105
  unmount(n1, parent, renderer, true);
@@ -4067,8 +4190,8 @@
4067
4190
  if (!isUndefined$1(slotset) && !isUndefined$1(slotset.slotAssignments) && !isUndefined$1(slotset.slotAssignments[slotName]) && slotset.slotAssignments[slotName].length !== 0) {
4068
4191
  var newChildren = [];
4069
4192
  var slotAssignments = slotset.slotAssignments[slotName];
4070
- for (var _i23 = 0; _i23 < slotAssignments.length; _i23++) {
4071
- var vnode = slotAssignments[_i23];
4193
+ for (var _i24 = 0; _i24 < slotAssignments.length; _i24++) {
4194
+ var vnode = slotAssignments[_i24];
4072
4195
  if (!isNull(vnode)) {
4073
4196
  var assignedNodeIsScopedSlot = isVScopedSlotFragment(vnode);
4074
4197
  // The only sniff test for a scoped <slot> element is the presence of `slotData`
@@ -4272,12 +4395,14 @@
4272
4395
  return url;
4273
4396
  }
4274
4397
  /**
4275
- * create a dynamic component via `<x-foo lwc:dynamic={Ctor}>`
4398
+ * [ddc] - create a (deprecated) dynamic component via `<x-foo lwc:dynamic={Ctor}>`
4399
+ *
4400
+ * TODO [#3331]: remove usage of lwc:dynamic in 246
4276
4401
  */
4277
- function dc(sel, Ctor, data) {
4402
+ function ddc(sel, Ctor, data) {
4278
4403
  var children = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : EmptyArray;
4279
4404
  // null or undefined values should produce a null value in the VNodes
4280
- if (Ctor == null) {
4405
+ if (isNull(Ctor) || isUndefined$1(Ctor)) {
4281
4406
  return null;
4282
4407
  }
4283
4408
  if (!isComponentConstructor(Ctor)) {
@@ -4285,6 +4410,27 @@
4285
4410
  }
4286
4411
  return c(sel, Ctor, data, children);
4287
4412
  }
4413
+ /**
4414
+ * [dc] - create a dynamic component via `<lwc:component lwc:is={Ctor}>`
4415
+ */
4416
+ function dc(Ctor, data) {
4417
+ var children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EmptyArray;
4418
+ // Null or undefined values should produce a null value in the VNodes.
4419
+ // This is the only value at compile time as the constructor will not be known.
4420
+ if (isNull(Ctor) || isUndefined$1(Ctor)) {
4421
+ return null;
4422
+ }
4423
+ if (!isComponentConstructor(Ctor)) {
4424
+ throw new Error("Invalid constructor ".concat(toString$1(Ctor), " is not a LightningElement constructor."));
4425
+ }
4426
+ // Look up the dynamic component's name at runtime once the constructor is available.
4427
+ // This information is only known at runtime and is stored as part of registerComponent.
4428
+ var sel = getComponentRegisteredName(Ctor);
4429
+ if (isUndefined$1(sel) || sel === '') {
4430
+ throw new Error("Invalid LWC constructor ".concat(toString$1(Ctor), " does not have a registered name"));
4431
+ }
4432
+ return c(sel, Ctor, data, children);
4433
+ }
4288
4434
  /**
4289
4435
  * slow children collection marking mechanism. this API allows the compiler to signal
4290
4436
  * to the engine that a particular collection of children must be diffed using the slow
@@ -4343,7 +4489,8 @@
4343
4489
  gid: gid,
4344
4490
  fid: fid,
4345
4491
  shc: shc,
4346
- ssf: ssf
4492
+ ssf: ssf,
4493
+ ddc: ddc
4347
4494
  });
4348
4495
  /** Indicates if operations should be logged by the profiler. */
4349
4496
  var isProfilerEnabled = false;
@@ -4456,23 +4603,23 @@
4456
4603
  var classAttrToken = hasScopedStyles && hasStyleToken ? " class=\"".concat(stylesheetToken, "\"") : '';
4457
4604
  var attrToken = hasStyleToken && isSyntheticShadow ? ' ' + stylesheetToken : '';
4458
4605
  var htmlFragment = '';
4459
- for (var _i24 = 0, n = keys.length; _i24 < n; _i24++) {
4460
- switch (keys[_i24]) {
4606
+ for (var _i25 = 0, n = keys.length; _i25 < n; _i25++) {
4607
+ switch (keys[_i25]) {
4461
4608
  case 0:
4462
4609
  // styleToken in existing class attr
4463
- htmlFragment += strings[_i24] + classToken;
4610
+ htmlFragment += strings[_i25] + classToken;
4464
4611
  break;
4465
4612
  case 1:
4466
4613
  // styleToken for added class attr
4467
- htmlFragment += strings[_i24] + classAttrToken;
4614
+ htmlFragment += strings[_i25] + classAttrToken;
4468
4615
  break;
4469
4616
  case 2:
4470
4617
  // styleToken as attr
4471
- htmlFragment += strings[_i24] + attrToken;
4618
+ htmlFragment += strings[_i25] + attrToken;
4472
4619
  break;
4473
4620
  case 3:
4474
4621
  // ${1}${2}
4475
- htmlFragment += strings[_i24] + classAttrToken + attrToken;
4622
+ htmlFragment += strings[_i25] + classAttrToken + attrToken;
4476
4623
  break;
4477
4624
  }
4478
4625
  }
@@ -4560,8 +4707,8 @@
4560
4707
  }
4561
4708
  function computeHasScopedStylesInStylesheets(stylesheets) {
4562
4709
  if (hasStyles(stylesheets)) {
4563
- for (var _i25 = 0; _i25 < stylesheets.length; _i25++) {
4564
- if (isTrue(stylesheets[_i25][KEY__SCOPED_CSS])) {
4710
+ for (var _i26 = 0; _i26 < stylesheets.length; _i26++) {
4711
+ if (isTrue(stylesheets[_i26][KEY__SCOPED_CSS])) {
4565
4712
  return true;
4566
4713
  }
4567
4714
  }
@@ -4659,24 +4806,29 @@
4659
4806
  * SPDX-License-Identifier: MIT
4660
4807
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4661
4808
  */
4662
- var signedTemplateMap = new Map();
4809
+ var registeredComponentMap = new Map();
4663
4810
  /**
4664
4811
  * INTERNAL: This function can only be invoked by compiled code. The compiler
4665
4812
  * will prevent this function from being imported by userland code.
4666
4813
  */
4667
4814
  function registerComponent(
4668
4815
  // We typically expect a LightningElementConstructor, but technically you can call this with anything
4669
- Ctor, _ref3) {
4670
- var tmpl = _ref3.tmpl;
4816
+ Ctor, metadata) {
4671
4817
  if (isFunction$1(Ctor)) {
4672
- signedTemplateMap.set(Ctor, tmpl);
4818
+ // TODO [#3331]: add validation to check the value of metadata.sel is not an empty string.
4819
+ registeredComponentMap.set(Ctor, metadata);
4673
4820
  }
4674
4821
  // chaining this method as a way to wrap existing assignment of component constructor easily,
4675
4822
  // without too much transformation
4676
4823
  return Ctor;
4677
4824
  }
4678
4825
  function getComponentRegisteredTemplate(Ctor) {
4679
- return signedTemplateMap.get(Ctor);
4826
+ var _a;
4827
+ return (_a = registeredComponentMap.get(Ctor)) === null || _a === void 0 ? void 0 : _a.tmpl;
4828
+ }
4829
+ function getComponentRegisteredName(Ctor) {
4830
+ var _a;
4831
+ return (_a = registeredComponentMap.get(Ctor)) === null || _a === void 0 ? void 0 : _a.sel;
4680
4832
  }
4681
4833
  function getTemplateReactiveObserver(vm) {
4682
4834
  return createReactiveObserver(function () {
@@ -4727,8 +4879,8 @@
4727
4879
  * subject to change or being removed.
4728
4880
  */
4729
4881
  function register(service) {
4730
- for (var _i26 = 0; _i26 < hooks.length; ++_i26) {
4731
- var hookName = hooks[_i26];
4882
+ for (var _i27 = 0; _i27 < hooks.length; ++_i27) {
4883
+ var hookName = hooks[_i27];
4732
4884
  if (hookName in service) {
4733
4885
  var l = Services[hookName];
4734
4886
  if (isUndefined$1(l)) {
@@ -4742,8 +4894,8 @@
4742
4894
  var component = vm.component,
4743
4895
  def = vm.def,
4744
4896
  context = vm.context;
4745
- for (var _i27 = 0, len = cbs.length; _i27 < len; ++_i27) {
4746
- cbs[_i27].call(undefined, component, {}, def, context);
4897
+ for (var _i28 = 0, len = cbs.length; _i28 < len; ++_i28) {
4898
+ cbs[_i28].call(undefined, component, {}, def, context);
4747
4899
  }
4748
4900
  }
4749
4901
 
@@ -4880,8 +5032,8 @@
4880
5032
  var valid = true;
4881
5033
  var validate = function validate(arrayOrStylesheet) {
4882
5034
  if (isArray$1(arrayOrStylesheet)) {
4883
- for (var _i28 = 0; _i28 < arrayOrStylesheet.length; _i28++) {
4884
- validate(arrayOrStylesheet[_i28]);
5035
+ for (var _i29 = 0; _i29 < arrayOrStylesheet.length; _i29++) {
5036
+ validate(arrayOrStylesheet[_i29]);
4885
5037
  }
4886
5038
  } else if (!isFunction$1(arrayOrStylesheet)) {
4887
5039
  // function assumed to be a stylesheet factory
@@ -5014,17 +5166,17 @@
5014
5166
  return a.idx - b.idx;
5015
5167
  });
5016
5168
  rehydrateQueue = []; // reset to a new queue
5017
- for (var _i29 = 0, len = vms.length; _i29 < len; _i29 += 1) {
5018
- var vm = vms[_i29];
5169
+ for (var _i30 = 0, len = vms.length; _i30 < len; _i30 += 1) {
5170
+ var vm = vms[_i30];
5019
5171
  try {
5020
5172
  rehydrate(vm);
5021
5173
  } catch (error) {
5022
- if (_i29 + 1 < len) {
5174
+ if (_i30 + 1 < len) {
5023
5175
  // pieces of the queue are still pending to be rehydrated, those should have priority
5024
5176
  if (rehydrateQueue.length === 0) {
5025
5177
  addCallbackToNextTick(flushRehydrationQueue);
5026
5178
  }
5027
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i29 + 1));
5179
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i30 + 1));
5028
5180
  }
5029
5181
  // we need to end the measure before throwing.
5030
5182
  logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
@@ -5090,8 +5242,8 @@
5090
5242
  var vCustomElementCollection = vm.velements;
5091
5243
  // Reporting disconnection for every child in inverse order since they are
5092
5244
  // inserted in reserved order.
5093
- for (var _i30 = vCustomElementCollection.length - 1; _i30 >= 0; _i30 -= 1) {
5094
- var elm = vCustomElementCollection[_i30].elm;
5245
+ for (var _i31 = vCustomElementCollection.length - 1; _i31 >= 0; _i31 -= 1) {
5246
+ var elm = vCustomElementCollection[_i31].elm;
5095
5247
  // There are two cases where the element could be undefined:
5096
5248
  // * when there is an error during the construction phase, and an error
5097
5249
  // boundary picks it, there is a possibility that the VCustomElement
@@ -5122,8 +5274,8 @@
5122
5274
  * defined on its shadow.
5123
5275
  */
5124
5276
  function recursivelyDisconnectChildren(vnodes) {
5125
- for (var _i31 = 0, len = vnodes.length; _i31 < len; _i31 += 1) {
5126
- var vnode = vnodes[_i31];
5277
+ for (var _i32 = 0, len = vnodes.length; _i32 < len; _i32 += 1) {
5278
+ var vnode = vnodes[_i32];
5127
5279
  if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
5128
5280
  switch (vnode.type) {
5129
5281
  case 2 /* VNodeType.Element */:
@@ -5144,19 +5296,30 @@
5144
5296
  // into snabbdom. Especially useful when the reset is a consequence of an error, in which case the
5145
5297
  // children VNodes might not be representing the current state of the DOM.
5146
5298
  function resetComponentRoot(vm) {
5147
- var children = vm.children,
5148
- renderRoot = vm.renderRoot,
5149
- remove = vm.renderer.remove;
5150
- for (var _i32 = 0, len = children.length; _i32 < len; _i32++) {
5151
- var child = children[_i32];
5152
- if (!isNull(child) && !isUndefined$1(child.elm)) {
5153
- remove(child.elm, renderRoot);
5154
- }
5155
- }
5299
+ recursivelyRemoveChildren(vm.children, vm);
5156
5300
  vm.children = EmptyArray;
5157
5301
  runChildNodesDisconnectedCallback(vm);
5158
5302
  vm.velements = EmptyArray;
5159
5303
  }
5304
+ // Helper function to remove all children of the root node.
5305
+ // If the set of children includes VFragment nodes, we need to remove the children of those nodes too.
5306
+ // Since VFragments can contain other VFragments, we need to traverse the entire of tree of VFragments.
5307
+ // If the set contains no VFragment nodes, no traversal is needed.
5308
+ function recursivelyRemoveChildren(vnodes, vm) {
5309
+ var renderRoot = vm.renderRoot,
5310
+ remove = vm.renderer.remove;
5311
+ for (var _i33 = 0, len = vnodes.length; _i33 < len; _i33 += 1) {
5312
+ var vnode = vnodes[_i33];
5313
+ if (!isNull(vnode)) {
5314
+ // VFragments are special; their .elm property does not point to the root element since they have no single root.
5315
+ if (isVFragment(vnode)) {
5316
+ recursivelyRemoveChildren(vnode.children, vm);
5317
+ } else if (!isUndefined$1(vnode.elm)) {
5318
+ remove(vnode.elm, renderRoot);
5319
+ }
5320
+ }
5321
+ }
5322
+ }
5160
5323
  function scheduleRehydration(vm) {
5161
5324
  if (isTrue(vm.isScheduled)) {
5162
5325
  return;
@@ -5255,17 +5418,17 @@
5255
5418
  // if our id is null or empty, nobody can reference us
5256
5419
  return;
5257
5420
  }
5258
- var _iterator5 = _createForOfIteratorHelper(ID_REFERENCING_ATTRIBUTES_SET),
5259
- _step5;
5421
+ var _iterator10 = _createForOfIteratorHelper(ID_REFERENCING_ATTRIBUTES_SET),
5422
+ _step10;
5260
5423
  try {
5261
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
5262
- var idRefAttrName = _step5.value;
5424
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
5425
+ var idRefAttrName = _step10.value;
5263
5426
  // Query all global elements with this attribute. The attribute selector syntax `~=` is for values
5264
5427
  // that reference multiple IDs, separated by whitespace.
5265
5428
  var query = "[".concat(idRefAttrName, "~=\"").concat(CSS.escape(attrValue), "\"]");
5266
5429
  var sourceElements = querySelectorAll.call(document, query);
5267
- for (var _i33 = 0; _i33 < sourceElements.length; _i33++) {
5268
- var sourceElement = sourceElements[_i33];
5430
+ for (var _i34 = 0; _i34 < sourceElements.length; _i34++) {
5431
+ var sourceElement = sourceElements[_i34];
5269
5432
  var sourceRoot = sourceElement.getRootNode();
5270
5433
  if (sourceRoot !== root) {
5271
5434
  reportViolation$1(sourceElement, elm, idRefAttrName);
@@ -5274,18 +5437,18 @@
5274
5437
  }
5275
5438
  }
5276
5439
  } catch (err) {
5277
- _iterator5.e(err);
5440
+ _iterator10.e(err);
5278
5441
  } finally {
5279
- _iterator5.f();
5442
+ _iterator10.f();
5280
5443
  }
5281
5444
  } else {
5282
5445
  // elm is the source, find the target
5283
5446
  var ids = parseIdRefAttributeValue(attrValue);
5284
- var _iterator6 = _createForOfIteratorHelper(ids),
5285
- _step6;
5447
+ var _iterator11 = _createForOfIteratorHelper(ids),
5448
+ _step11;
5286
5449
  try {
5287
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
5288
- var id = _step6.value;
5450
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
5451
+ var id = _step11.value;
5289
5452
  var target = getElementById.call(document, id);
5290
5453
  if (!isNull(target)) {
5291
5454
  var targetRoot = target.getRootNode();
@@ -5296,9 +5459,9 @@
5296
5459
  }
5297
5460
  }
5298
5461
  } catch (err) {
5299
- _iterator6.e(err);
5462
+ _iterator11.e(err);
5300
5463
  } finally {
5301
- _iterator6.f();
5464
+ _iterator11.f();
5302
5465
  }
5303
5466
  }
5304
5467
  }
@@ -5423,11 +5586,11 @@
5423
5586
  function enableDetection() {
5424
5587
  var _Element = Element,
5425
5588
  prototype = _Element.prototype;
5426
- var _iterator7 = _createForOfIteratorHelper(NON_STANDARD_ARIA_PROPS),
5427
- _step7;
5589
+ var _iterator12 = _createForOfIteratorHelper(NON_STANDARD_ARIA_PROPS),
5590
+ _step12;
5428
5591
  try {
5429
5592
  var _loop3 = function _loop3() {
5430
- var prop = _step7.value;
5593
+ var prop = _step12.value;
5431
5594
  var descriptor = getOwnPropertyDescriptor$1(prototype, prop);
5432
5595
  // The descriptor should exist because the @lwc/aria-reflection polyfill has run by now.
5433
5596
  // This happens automatically because of the ordering of imports.
@@ -5448,13 +5611,13 @@
5448
5611
  enumerable: true
5449
5612
  });
5450
5613
  };
5451
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
5614
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
5452
5615
  _loop3();
5453
5616
  }
5454
5617
  } catch (err) {
5455
- _iterator7.e(err);
5618
+ _iterator12.e(err);
5456
5619
  } finally {
5457
- _iterator7.f();
5620
+ _iterator12.f();
5458
5621
  }
5459
5622
  }
5460
5623
  // No point in running this code if we're not in a browser, or if the global polyfill is not loaded
@@ -5616,8 +5779,8 @@
5616
5779
  var nextNode = node;
5617
5780
  var anchor = null;
5618
5781
  var renderer = owner.renderer;
5619
- for (var _i34 = 0; _i34 < children.length; _i34++) {
5620
- var childVnode = children[_i34];
5782
+ for (var _i35 = 0; _i35 < children.length; _i35++) {
5783
+ var childVnode = children[_i35];
5621
5784
  if (!isNull(childVnode)) {
5622
5785
  if (nextNode) {
5623
5786
  nextNode = hydrateNode(nextNode, childVnode, renderer);
@@ -5691,8 +5854,8 @@
5691
5854
  var nodesAreCompatible = true;
5692
5855
  // Validate attributes, though we could always recovery from those by running the update mods.
5693
5856
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
5694
- for (var _i35 = 0, _Object$entries = Object.entries(attrs); _i35 < _Object$entries.length; _i35++) {
5695
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i35], 2),
5857
+ for (var _i36 = 0, _Object$entries = Object.entries(attrs); _i36 < _Object$entries.length; _i36++) {
5858
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i36], 2),
5696
5859
  attrName = _Object$entries$_i[0],
5697
5860
  attrValue = _Object$entries$_i[1];
5698
5861
  vnode.owner;
@@ -5779,8 +5942,8 @@
5779
5942
  var parsedVnodeStyle = parseStyleText(elmStyle);
5780
5943
  var expectedStyle = [];
5781
5944
  // styleMap is used when style is set to static value.
5782
- for (var _i36 = 0, n = styleDecls.length; _i36 < n; _i36++) {
5783
- var _styleDecls$_i2 = _slicedToArray(styleDecls[_i36], 3),
5945
+ for (var _i37 = 0, n = styleDecls.length; _i37 < n; _i37++) {
5946
+ var _styleDecls$_i2 = _slicedToArray(styleDecls[_i37], 3),
5784
5947
  prop = _styleDecls$_i2[0],
5785
5948
  value = _styleDecls$_i2[1],
5786
5949
  important = _styleDecls$_i2[2];
@@ -5899,11 +6062,11 @@
5899
6062
  function warnOnArrayMutation(stylesheets) {
5900
6063
  // We can't handle users calling Array.prototype.slice.call(tmpl.stylesheets), but
5901
6064
  // we can at least warn when they use the most common mutation methods.
5902
- var _iterator8 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
5903
- _step8;
6065
+ var _iterator13 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
6066
+ _step13;
5904
6067
  try {
5905
6068
  var _loop4 = function _loop4() {
5906
- var prop = _step8.value;
6069
+ var prop = _step13.value;
5907
6070
  var originalArrayMethod = getOriginalArrayMethod(prop);
5908
6071
  stylesheets[prop] = function arrayMutationWarningWrapper() {
5909
6072
  reportTemplateViolation('stylesheets');
@@ -5911,23 +6074,23 @@
5911
6074
  return originalArrayMethod.apply(this, arguments);
5912
6075
  };
5913
6076
  };
5914
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
6077
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
5915
6078
  _loop4();
5916
6079
  }
5917
6080
  } catch (err) {
5918
- _iterator8.e(err);
6081
+ _iterator13.e(err);
5919
6082
  } finally {
5920
- _iterator8.f();
6083
+ _iterator13.f();
5921
6084
  }
5922
6085
  }
5923
6086
  // Warn if the user tries to mutate a stylesheet factory function, e.g.:
5924
6087
  // `stylesheet.$scoped$ = true`
5925
6088
  function warnOnStylesheetFunctionMutation(stylesheet) {
5926
- var _iterator9 = _createForOfIteratorHelper(STYLESHEET_PROPS),
5927
- _step9;
6089
+ var _iterator14 = _createForOfIteratorHelper(STYLESHEET_PROPS),
6090
+ _step14;
5928
6091
  try {
5929
6092
  var _loop5 = function _loop5() {
5930
- var prop = _step9.value;
6093
+ var prop = _step14.value;
5931
6094
  var value = stylesheet[prop];
5932
6095
  defineProperty(stylesheet, prop, {
5933
6096
  enumerable: true,
@@ -5941,13 +6104,13 @@
5941
6104
  }
5942
6105
  });
5943
6106
  };
5944
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
6107
+ for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
5945
6108
  _loop5();
5946
6109
  }
5947
6110
  } catch (err) {
5948
- _iterator9.e(err);
6111
+ _iterator14.e(err);
5949
6112
  } finally {
5950
- _iterator9.f();
6113
+ _iterator14.f();
5951
6114
  }
5952
6115
  }
5953
6116
  // Warn on either array or stylesheet (function) mutation, in a deeply-nested array
@@ -5969,8 +6132,8 @@
5969
6132
  // Deep-traverse an array (of arrays) of stylesheet factory functions, and call the callback for every array/function
5970
6133
  function traverseStylesheets(stylesheets, callback) {
5971
6134
  callback(stylesheets);
5972
- for (var _i37 = 0; _i37 < stylesheets.length; _i37++) {
5973
- var stylesheet = stylesheets[_i37];
6135
+ for (var _i38 = 0; _i38 < stylesheets.length; _i38++) {
6136
+ var stylesheet = stylesheets[_i38];
5974
6137
  if (isArray$1(stylesheet)) {
5975
6138
  traverseStylesheets(stylesheet, callback);
5976
6139
  } else {
@@ -5982,11 +6145,11 @@
5982
6145
  if (!isUndefined$1(tmpl.stylesheets)) {
5983
6146
  trackStylesheetsMutation(tmpl.stylesheets);
5984
6147
  }
5985
- var _iterator10 = _createForOfIteratorHelper(TEMPLATE_PROPS),
5986
- _step10;
6148
+ var _iterator15 = _createForOfIteratorHelper(TEMPLATE_PROPS),
6149
+ _step15;
5987
6150
  try {
5988
6151
  var _loop6 = function _loop6() {
5989
- var prop = _step10.value;
6152
+ var prop = _step15.value;
5990
6153
  var value = tmpl[prop];
5991
6154
  defineProperty(tmpl, prop, {
5992
6155
  enumerable: true,
@@ -6002,13 +6165,13 @@
6002
6165
  }
6003
6166
  });
6004
6167
  };
6005
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
6168
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
6006
6169
  _loop6();
6007
6170
  }
6008
6171
  } catch (err) {
6009
- _iterator10.e(err);
6172
+ _iterator15.e(err);
6010
6173
  } finally {
6011
- _iterator10.f();
6174
+ _iterator15.f();
6012
6175
  }
6013
6176
  var originalDescriptor = getOwnPropertyDescriptor$1(tmpl, 'stylesheetTokens');
6014
6177
  defineProperty(tmpl, 'stylesheetTokens', {
@@ -6447,7 +6610,7 @@
6447
6610
  function isNull(obj) {
6448
6611
  return obj === null;
6449
6612
  }
6450
- /** version: 2.38.0 */
6613
+ /** version: 2.39.0 */
6451
6614
 
6452
6615
  /*
6453
6616
  * Copyright (c) 2023, salesforce.com, inc.
@@ -6458,10 +6621,10 @@
6458
6621
  var WireContextSubscriptionEvent = /*#__PURE__*/function (_CustomEvent) {
6459
6622
  _inherits(WireContextSubscriptionEvent, _CustomEvent);
6460
6623
  var _super6 = _createSuper(WireContextSubscriptionEvent);
6461
- function WireContextSubscriptionEvent(adapterToken, _ref6) {
6624
+ function WireContextSubscriptionEvent(adapterToken, _ref5) {
6462
6625
  var _this3;
6463
- var setNewContext = _ref6.setNewContext,
6464
- setDisconnectedCallback = _ref6.setDisconnectedCallback;
6626
+ var setNewContext = _ref5.setNewContext,
6627
+ setDisconnectedCallback = _ref5.setDisconnectedCallback;
6465
6628
  _classCallCheck(this, WireContextSubscriptionEvent);
6466
6629
  _this3 = _super6.call(this, adapterToken, {
6467
6630
  bubbles: true,
@@ -6545,17 +6708,17 @@
6545
6708
  exports.createFragment = function (html) {
6546
6709
  var wrapperTags = topLevelWrappingMap[getTagName(html)];
6547
6710
  if (!isUndefined(wrapperTags)) {
6548
- var _iterator11 = _createForOfIteratorHelper(wrapperTags),
6549
- _step11;
6711
+ var _iterator16 = _createForOfIteratorHelper(wrapperTags),
6712
+ _step16;
6550
6713
  try {
6551
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
6552
- var wrapperTag = _step11.value;
6714
+ for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
6715
+ var wrapperTag = _step16.value;
6553
6716
  html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
6554
6717
  }
6555
6718
  } catch (err) {
6556
- _iterator11.e(err);
6719
+ _iterator16.e(err);
6557
6720
  } finally {
6558
- _iterator11.f();
6721
+ _iterator16.f();
6559
6722
  }
6560
6723
  }
6561
6724
  // For IE11, the document title must not be undefined, but it can be an empty string
@@ -6564,7 +6727,7 @@
6564
6727
  doc.body.innerHTML = html;
6565
6728
  var content = doc.body;
6566
6729
  if (!isUndefined(wrapperTags)) {
6567
- for (var _i38 = 0; _i38 < wrapperTags.length; _i38++) {
6730
+ for (var _i39 = 0; _i39 < wrapperTags.length; _i39++) {
6568
6731
  content = content.firstChild;
6569
6732
  }
6570
6733
  }
@@ -6763,8 +6926,8 @@
6763
6926
  tagName: element.tagName.toLowerCase(),
6764
6927
  hydrated: true
6765
6928
  });
6766
- for (var _i39 = 0, _Object$entries2 = Object.entries(props); _i39 < _Object$entries2.length; _i39++) {
6767
- var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i39], 2),
6929
+ for (var _i40 = 0, _Object$entries2 = Object.entries(props); _i40 < _Object$entries2.length; _i40++) {
6930
+ var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i40], 2),
6768
6931
  key = _Object$entries2$_i[0],
6769
6932
  value = _Object$entries2$_i[1];
6770
6933
  element[key] = value;
@@ -7082,7 +7245,7 @@
7082
7245
  });
7083
7246
  });
7084
7247
  }
7085
- /* version: 2.38.0 */
7248
+ /* version: 2.39.0 */
7086
7249
 
7087
7250
  exports.LightningElement = LightningElement;
7088
7251
  exports.__unstable__ProfilerControl = profilerControl;