lwc 2.38.1 → 2.39.1

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 +203 -122
  2. package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
  3. package/dist/engine-dom/iife/es2017/engine-dom.js +203 -122
  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 +154 -40
  7. package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
  8. package/dist/engine-dom/iife/es5/engine-dom.js +353 -207
  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 +305 -153
  12. package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
  13. package/dist/engine-dom/umd/es2017/engine-dom.js +203 -122
  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 +154 -40
  17. package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
  18. package/dist/engine-dom/umd/es5/engine-dom.js +353 -207
  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 +305 -153
  22. package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
  23. package/dist/engine-server/commonjs/es2017/engine-server.js +168 -75
  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 +168 -75
  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
@@ -315,7 +315,7 @@ var LWC = (function (exports) {
315
315
  CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
316
316
  return propertyName;
317
317
  }
318
- /** version: 2.38.1 */
318
+ /** version: 2.39.1 */
319
319
 
320
320
  /**
321
321
  * Copyright (C) 2018 salesforce.com, inc.
@@ -387,7 +387,7 @@ var LWC = (function (exports) {
387
387
  */
388
388
  function setFeatureFlagForTest(name, value) {
389
389
  }
390
- /** version: 2.38.1 */
390
+ /** version: 2.39.1 */
391
391
 
392
392
  /**
393
393
  * Copyright (C) 2018 salesforce.com, inc.
@@ -451,7 +451,7 @@ var LWC = (function (exports) {
451
451
  }
452
452
  }
453
453
  }
454
- /** version: 2.38.1 */
454
+ /** version: 2.39.1 */
455
455
 
456
456
  /*
457
457
  * Copyright (c) 2018, salesforce.com, inc.
@@ -2564,10 +2564,131 @@ var LWC = (function (exports) {
2564
2564
  }
2565
2565
  freeze(BaseBridgeElement);
2566
2566
  seal(BaseBridgeElement.prototype);
2567
+
2568
+ /*
2569
+ * Copyright (c) 2023, salesforce.com, inc.
2570
+ * All rights reserved.
2571
+ * SPDX-License-Identifier: MIT
2572
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2573
+ */
2574
+ var supportsWeakRefs = typeof WeakRef === 'function' && typeof FinalizationRegistry === 'function';
2575
+ // In browsers that doesn't support WeakRefs, the values will still leak, but at least the keys won't
2576
+ var LegacyWeakMultiMap = /*#__PURE__*/function () {
2577
+ function LegacyWeakMultiMap() {
2578
+ _classCallCheck(this, LegacyWeakMultiMap);
2579
+ this._map = new WeakMap();
2580
+ }
2581
+ _createClass(LegacyWeakMultiMap, [{
2582
+ key: "_getValues",
2583
+ value: function _getValues(key) {
2584
+ var values = this._map.get(key);
2585
+ if (isUndefined$1(values)) {
2586
+ values = new Set();
2587
+ this._map.set(key, values);
2588
+ }
2589
+ return values;
2590
+ }
2591
+ }, {
2592
+ key: "get",
2593
+ value: function get(key) {
2594
+ return this._getValues(key);
2595
+ }
2596
+ }, {
2597
+ key: "add",
2598
+ value: function add(key, vm) {
2599
+ var set = this._getValues(key);
2600
+ set.add(vm);
2601
+ }
2602
+ }, {
2603
+ key: "delete",
2604
+ value: function _delete(key) {
2605
+ this._map.delete(key);
2606
+ }
2607
+ }]);
2608
+ return LegacyWeakMultiMap;
2609
+ }(); // This implementation relies on the WeakRef/FinalizationRegistry proposal.
2610
+ // For some background, see: https://github.com/tc39/proposal-weakrefs
2611
+ var ModernWeakMultiMap = /*#__PURE__*/function () {
2612
+ function ModernWeakMultiMap() {
2613
+ _classCallCheck(this, ModernWeakMultiMap);
2614
+ this._map = new WeakMap();
2615
+ this._registry = new FinalizationRegistry(function (weakRefs) {
2616
+ // This should be considered an optional cleanup method to remove GC'ed values from their respective arrays.
2617
+ // JS VMs are not obligated to call FinalizationRegistry callbacks.
2618
+ // Work backwards, removing stale VMs
2619
+ for (var _i13 = weakRefs.length - 1; _i13 >= 0; _i13--) {
2620
+ var vm = weakRefs[_i13].deref();
2621
+ if (isUndefined$1(vm)) {
2622
+ ArraySplice.call(weakRefs, _i13, 1); // remove
2623
+ }
2624
+ }
2625
+ });
2626
+ }
2627
+ _createClass(ModernWeakMultiMap, [{
2628
+ key: "_getWeakRefs",
2629
+ value: function _getWeakRefs(key) {
2630
+ var weakRefs = this._map.get(key);
2631
+ if (isUndefined$1(weakRefs)) {
2632
+ weakRefs = [];
2633
+ this._map.set(key, weakRefs);
2634
+ }
2635
+ return weakRefs;
2636
+ }
2637
+ }, {
2638
+ key: "get",
2639
+ value: function get(key) {
2640
+ var weakRefs = this._getWeakRefs(key);
2641
+ var result = new Set();
2642
+ var _iterator5 = _createForOfIteratorHelper(weakRefs),
2643
+ _step5;
2644
+ try {
2645
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
2646
+ var weakRef = _step5.value;
2647
+ var vm = weakRef.deref();
2648
+ if (!isUndefined$1(vm)) {
2649
+ result.add(vm);
2650
+ }
2651
+ }
2652
+ } catch (err) {
2653
+ _iterator5.e(err);
2654
+ } finally {
2655
+ _iterator5.f();
2656
+ }
2657
+ return result;
2658
+ }
2659
+ }, {
2660
+ key: "add",
2661
+ value: function add(key, value) {
2662
+ var weakRefs = this._getWeakRefs(key);
2663
+ // We could check for duplicate values here, but it doesn't seem worth it.
2664
+ // We transform the output into a Set anyway
2665
+ ArrayPush$1.call(weakRefs, new WeakRef(value));
2666
+ // It's important here not to leak the second argument, which is the "held value." The FinalizationRegistry
2667
+ // effectively creates a strong reference between the first argument (the "target") and the held value. When
2668
+ // the target is GC'ed, the callback is called, and then the held value is GC'ed.
2669
+ // Putting the key here would mean the key is not GC'ed until the value is GC'ed, which defeats the purpose
2670
+ // of the WeakMap. Whereas putting the weakRefs array here is fine, because it doesn't have a strong reference
2671
+ // to anything. See also this example:
2672
+ // https://gist.github.com/nolanlawson/79a3d36e8e6cc25c5048bb17c1795aea
2673
+ this._registry.register(value, weakRefs);
2674
+ }
2675
+ }, {
2676
+ key: "delete",
2677
+ value: function _delete(key) {
2678
+ this._map.delete(key);
2679
+ }
2680
+ }]);
2681
+ return ModernWeakMultiMap;
2682
+ }();
2683
+ var WeakMultiMap = supportsWeakRefs ? ModernWeakMultiMap : LegacyWeakMultiMap;
2567
2684
  var swappedStyleMap = new WeakMap();
2568
- var activeTemplates = new WeakMap();
2569
- var activeComponents = new WeakMap();
2570
- var activeStyles = new WeakMap();
2685
+ // The important thing here is the weak values – VMs are transient (one per component instance) and should be GC'ed,
2686
+ // so we don't want to create strong references to them.
2687
+ // The weak keys are kind of useless, because Templates, LightningElementConstructors, and StylesheetFactories are
2688
+ // never GC'ed. But maybe they will be someday, so we may as well use weak keys too.
2689
+ var activeTemplates = new WeakMultiMap();
2690
+ var activeComponents = new WeakMultiMap();
2691
+ var activeStyles = new WeakMultiMap();
2571
2692
  function getStyleOrSwappedStyle(style) {
2572
2693
  assertNotProd(); // this method should never leak to prod
2573
2694
  var visited = new Set();
@@ -2581,42 +2702,36 @@ var LWC = (function (exports) {
2581
2702
  assertNotProd(); // this method should never leak to prod
2582
2703
  // tracking active component
2583
2704
  var Ctor = vm.def.ctor;
2584
- var componentVMs = activeComponents.get(Ctor);
2585
- if (isUndefined$1(componentVMs)) {
2586
- componentVMs = new Set();
2587
- activeComponents.set(Ctor, componentVMs);
2588
- }
2589
2705
  // this will allow us to keep track of the hot components
2590
- componentVMs.add(vm);
2706
+ activeComponents.add(Ctor, vm);
2591
2707
  // tracking active template
2592
2708
  var tpl = vm.cmpTemplate;
2593
2709
  if (tpl) {
2594
- var templateVMs = activeTemplates.get(tpl);
2595
- if (isUndefined$1(templateVMs)) {
2596
- templateVMs = new Set();
2597
- activeTemplates.set(tpl, templateVMs);
2598
- }
2599
2710
  // this will allow us to keep track of the templates that are
2600
2711
  // being used by a hot component
2601
- templateVMs.add(vm);
2712
+ activeTemplates.add(tpl, vm);
2602
2713
  // tracking active styles associated to template
2603
2714
  var stylesheets = tpl.stylesheets;
2604
2715
  if (!isUndefined$1(stylesheets)) {
2605
- flattenStylesheets(stylesheets).forEach(function (stylesheet) {
2606
- // this is necessary because we don't hold the list of styles
2607
- // in the vm, we only hold the selected (already swapped template)
2608
- // but the styles attached to the template might not be the actual
2609
- // active ones, but the swapped versions of those.
2610
- stylesheet = getStyleOrSwappedStyle(stylesheet);
2611
- var stylesheetVMs = activeStyles.get(stylesheet);
2612
- if (isUndefined$1(stylesheetVMs)) {
2613
- stylesheetVMs = new Set();
2614
- activeStyles.set(stylesheet, stylesheetVMs);
2716
+ var _iterator9 = _createForOfIteratorHelper(flattenStylesheets(stylesheets)),
2717
+ _step9;
2718
+ try {
2719
+ for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
2720
+ var stylesheet = _step9.value;
2721
+ // this is necessary because we don't hold the list of styles
2722
+ // in the vm, we only hold the selected (already swapped template)
2723
+ // but the styles attached to the template might not be the actual
2724
+ // active ones, but the swapped versions of those.
2725
+ var swappedStylesheet = getStyleOrSwappedStyle(stylesheet);
2726
+ // this will allow us to keep track of the stylesheet that are
2727
+ // being used by a hot component
2728
+ activeStyles.add(swappedStylesheet, vm);
2615
2729
  }
2616
- // this will allow us to keep track of the stylesheet that are
2617
- // being used by a hot component
2618
- stylesheetVMs.add(vm);
2619
- });
2730
+ } catch (err) {
2731
+ _iterator9.e(err);
2732
+ } finally {
2733
+ _iterator9.f();
2734
+ }
2620
2735
  }
2621
2736
  }
2622
2737
  }
@@ -2891,8 +3006,8 @@ var LWC = (function (exports) {
2891
3006
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
2892
3007
  var content = [];
2893
3008
  var root;
2894
- for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
2895
- var stylesheet = stylesheets[_i13];
3009
+ for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
3010
+ var stylesheet = stylesheets[_i14];
2896
3011
  if (isArray$1(stylesheet)) {
2897
3012
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
2898
3013
  } else {
@@ -2990,8 +3105,8 @@ var LWC = (function (exports) {
2990
3105
  shadowMode = vm.shadowMode,
2991
3106
  insertStylesheet = vm.renderer.insertStylesheet;
2992
3107
  if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
2993
- for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
2994
- insertStylesheet(stylesheets[_i14]);
3108
+ for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
3109
+ insertStylesheet(stylesheets[_i15]);
2995
3110
  }
2996
3111
  } else if (vm.hydrated) {
2997
3112
  // Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
@@ -3004,8 +3119,8 @@ var LWC = (function (exports) {
3004
3119
  var root = getNearestNativeShadowComponent(vm);
3005
3120
  // null root means a global style
3006
3121
  var target = isNull(root) ? undefined : root.shadowRoot;
3007
- for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
3008
- insertStylesheet(stylesheets[_i15], target);
3122
+ for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
3123
+ insertStylesheet(stylesheets[_i16], target);
3009
3124
  }
3010
3125
  }
3011
3126
  return null;
@@ -3307,8 +3422,8 @@ var LWC = (function (exports) {
3307
3422
  return;
3308
3423
  }
3309
3424
  var setCSSStyleProperty = renderer.setCSSStyleProperty;
3310
- for (var _i16 = 0; _i16 < styleDecls.length; _i16++) {
3311
- var _styleDecls$_i = _slicedToArray(styleDecls[_i16], 3),
3425
+ for (var _i17 = 0; _i17 < styleDecls.length; _i17++) {
3426
+ var _styleDecls$_i = _slicedToArray(styleDecls[_i17], 3),
3312
3427
  prop = _styleDecls$_i[0],
3313
3428
  value = _styleDecls$_i[1],
3314
3429
  important = _styleDecls$_i[2];
@@ -3518,8 +3633,9 @@ var LWC = (function (exports) {
3518
3633
  }
3519
3634
  }
3520
3635
  function patchCustomElement(n1, n2, parent, renderer) {
3636
+ // TODO [#3331]: This if branch should be removed in 246 with lwc:dynamic
3521
3637
  if (n1.ctor !== n2.ctor) {
3522
- // If the constructor, unmount the current component and mount a new one using the new
3638
+ // If the constructor differs, unmount the current component and mount a new one using the new
3523
3639
  // constructor.
3524
3640
  var anchor = renderer.nextSibling(n1.elm);
3525
3641
  unmount(n1, parent, renderer, true);
@@ -3731,8 +3847,8 @@ var LWC = (function (exports) {
3731
3847
  // If no VFragment is found in children, we don't need to traverse anything or mark the children dynamic and can return early.
3732
3848
  var nodeStack = [];
3733
3849
  var fragmentFound = false;
3734
- for (var _i17 = children.length - 1; _i17 > -1; _i17 -= 1) {
3735
- var child = children[_i17];
3850
+ for (var _i18 = children.length - 1; _i18 > -1; _i18 -= 1) {
3851
+ var child = children[_i18];
3736
3852
  ArrayPush$1.call(nodeStack, child);
3737
3853
  fragmentFound = fragmentFound || !!(child && isVFragment(child));
3738
3854
  }
@@ -3744,8 +3860,8 @@ var LWC = (function (exports) {
3744
3860
  if (!isNull(currentNode) && isVFragment(currentNode)) {
3745
3861
  var fChildren = currentNode.children;
3746
3862
  // Ignore the start and end text node delimiters
3747
- for (var _i18 = fChildren.length - 2; _i18 > 0; _i18 -= 1) {
3748
- ArrayPush$1.call(nodeStack, fChildren[_i18]);
3863
+ for (var _i19 = fChildren.length - 2; _i19 > 0; _i19 -= 1) {
3864
+ ArrayPush$1.call(nodeStack, fChildren[_i19]);
3749
3865
  }
3750
3866
  } else {
3751
3867
  ArrayPush$1.call(flattenedChildren, currentNode);
@@ -3781,8 +3897,8 @@ var LWC = (function (exports) {
3781
3897
  var oldSlotsMapping = vm.cmpSlots.slotAssignments;
3782
3898
  var cmpSlotsMapping = create(null);
3783
3899
  // Collect all slots into cmpSlotsMapping
3784
- for (var _i19 = 0, len = children.length; _i19 < len; _i19 += 1) {
3785
- var vnode = children[_i19];
3900
+ for (var _i20 = 0, len = children.length; _i20 < len; _i20 += 1) {
3901
+ var vnode = children[_i20];
3786
3902
  if (isNull(vnode)) {
3787
3903
  continue;
3788
3904
  }
@@ -3812,8 +3928,8 @@ var LWC = (function (exports) {
3812
3928
  markComponentAsDirty(vm);
3813
3929
  return;
3814
3930
  }
3815
- for (var _i20 = 0, _len2 = oldKeys.length; _i20 < _len2; _i20 += 1) {
3816
- var key = oldKeys[_i20];
3931
+ for (var _i21 = 0, _len2 = oldKeys.length; _i21 < _len2; _i21 += 1) {
3932
+ var key = oldKeys[_i21];
3817
3933
  if (isUndefined$1(cmpSlotsMapping[key]) || oldSlotsMapping[key].length !== cmpSlotsMapping[key].length) {
3818
3934
  markComponentAsDirty(vm);
3819
3935
  return;
@@ -3936,11 +4052,11 @@ var LWC = (function (exports) {
3936
4052
  if (oldStartIdx > oldEndIdx) {
3937
4053
  // There's some cases in which the sub array of vnodes to be inserted is followed by null(s) and an
3938
4054
  // already processed vnode, in such cases the vnodes to be inserted should be before that processed vnode.
3939
- var _i21 = newEndIdx;
4055
+ var _i22 = newEndIdx;
3940
4056
  var n;
3941
4057
  do {
3942
- n = newCh[++_i21];
3943
- } while (!isVNode(n) && _i21 < newChEnd);
4058
+ n = newCh[++_i22];
4059
+ } while (!isVNode(n) && _i22 < newChEnd);
3944
4060
  before = isVNode(n) ? n.elm : null;
3945
4061
  mountVNodes(newCh, parent, renderer, before, newStartIdx, newEndIdx + 1);
3946
4062
  } else {
@@ -3965,15 +4081,22 @@ var LWC = (function (exports) {
3965
4081
  // if the old list is not empty, the new list MUST have the same
3966
4082
  // amount of nodes, that's why we call this static children
3967
4083
  var anchor = null;
3968
- for (var _i22 = c2Length - 1; _i22 >= 0; _i22 -= 1) {
3969
- var n1 = c1[_i22];
3970
- var n2 = c2[_i22];
4084
+ for (var _i23 = c2Length - 1; _i23 >= 0; _i23 -= 1) {
4085
+ var n1 = c1[_i23];
4086
+ var n2 = c2[_i23];
3971
4087
  if (n2 !== n1) {
3972
4088
  if (isVNode(n1)) {
3973
4089
  if (isVNode(n2)) {
3974
- // both vnodes are equivalent, and we just need to patch them
3975
- patch(n1, n2, parent, renderer);
3976
- anchor = n2.elm;
4090
+ if (isSameVnode(n1, n2)) {
4091
+ // both vnodes are equivalent, and we just need to patch them
4092
+ patch(n1, n2, parent, renderer);
4093
+ anchor = n2.elm;
4094
+ } else {
4095
+ // removing the old vnode since the new one is different
4096
+ unmount(n1, parent, renderer, true);
4097
+ mount(n2, parent, renderer, anchor);
4098
+ anchor = n2.elm;
4099
+ }
3977
4100
  } else {
3978
4101
  // removing the old vnode since the new one is null
3979
4102
  unmount(n1, parent, renderer, true);
@@ -4064,8 +4187,8 @@ var LWC = (function (exports) {
4064
4187
  if (!isUndefined$1(slotset) && !isUndefined$1(slotset.slotAssignments) && !isUndefined$1(slotset.slotAssignments[slotName]) && slotset.slotAssignments[slotName].length !== 0) {
4065
4188
  var newChildren = [];
4066
4189
  var slotAssignments = slotset.slotAssignments[slotName];
4067
- for (var _i23 = 0; _i23 < slotAssignments.length; _i23++) {
4068
- var vnode = slotAssignments[_i23];
4190
+ for (var _i24 = 0; _i24 < slotAssignments.length; _i24++) {
4191
+ var vnode = slotAssignments[_i24];
4069
4192
  if (!isNull(vnode)) {
4070
4193
  var assignedNodeIsScopedSlot = isVScopedSlotFragment(vnode);
4071
4194
  // The only sniff test for a scoped <slot> element is the presence of `slotData`
@@ -4269,12 +4392,14 @@ var LWC = (function (exports) {
4269
4392
  return url;
4270
4393
  }
4271
4394
  /**
4272
- * create a dynamic component via `<x-foo lwc:dynamic={Ctor}>`
4395
+ * [ddc] - create a (deprecated) dynamic component via `<x-foo lwc:dynamic={Ctor}>`
4396
+ *
4397
+ * TODO [#3331]: remove usage of lwc:dynamic in 246
4273
4398
  */
4274
- function dc(sel, Ctor, data) {
4399
+ function ddc(sel, Ctor, data) {
4275
4400
  var children = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : EmptyArray;
4276
4401
  // null or undefined values should produce a null value in the VNodes
4277
- if (Ctor == null) {
4402
+ if (isNull(Ctor) || isUndefined$1(Ctor)) {
4278
4403
  return null;
4279
4404
  }
4280
4405
  if (!isComponentConstructor(Ctor)) {
@@ -4282,6 +4407,27 @@ var LWC = (function (exports) {
4282
4407
  }
4283
4408
  return c(sel, Ctor, data, children);
4284
4409
  }
4410
+ /**
4411
+ * [dc] - create a dynamic component via `<lwc:component lwc:is={Ctor}>`
4412
+ */
4413
+ function dc(Ctor, data) {
4414
+ var children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : EmptyArray;
4415
+ // Null or undefined values should produce a null value in the VNodes.
4416
+ // This is the only value at compile time as the constructor will not be known.
4417
+ if (isNull(Ctor) || isUndefined$1(Ctor)) {
4418
+ return null;
4419
+ }
4420
+ if (!isComponentConstructor(Ctor)) {
4421
+ throw new Error("Invalid constructor ".concat(toString$1(Ctor), " is not a LightningElement constructor."));
4422
+ }
4423
+ // Look up the dynamic component's name at runtime once the constructor is available.
4424
+ // This information is only known at runtime and is stored as part of registerComponent.
4425
+ var sel = getComponentRegisteredName(Ctor);
4426
+ if (isUndefined$1(sel) || sel === '') {
4427
+ throw new Error("Invalid LWC constructor ".concat(toString$1(Ctor), " does not have a registered name"));
4428
+ }
4429
+ return c(sel, Ctor, data, children);
4430
+ }
4285
4431
  /**
4286
4432
  * slow children collection marking mechanism. this API allows the compiler to signal
4287
4433
  * to the engine that a particular collection of children must be diffed using the slow
@@ -4340,7 +4486,8 @@ var LWC = (function (exports) {
4340
4486
  gid: gid,
4341
4487
  fid: fid,
4342
4488
  shc: shc,
4343
- ssf: ssf
4489
+ ssf: ssf,
4490
+ ddc: ddc
4344
4491
  });
4345
4492
  /** Indicates if operations should be logged by the profiler. */
4346
4493
  var isProfilerEnabled = false;
@@ -4453,23 +4600,23 @@ var LWC = (function (exports) {
4453
4600
  var classAttrToken = hasScopedStyles && hasStyleToken ? " class=\"".concat(stylesheetToken, "\"") : '';
4454
4601
  var attrToken = hasStyleToken && isSyntheticShadow ? ' ' + stylesheetToken : '';
4455
4602
  var htmlFragment = '';
4456
- for (var _i24 = 0, n = keys.length; _i24 < n; _i24++) {
4457
- switch (keys[_i24]) {
4603
+ for (var _i25 = 0, n = keys.length; _i25 < n; _i25++) {
4604
+ switch (keys[_i25]) {
4458
4605
  case 0:
4459
4606
  // styleToken in existing class attr
4460
- htmlFragment += strings[_i24] + classToken;
4607
+ htmlFragment += strings[_i25] + classToken;
4461
4608
  break;
4462
4609
  case 1:
4463
4610
  // styleToken for added class attr
4464
- htmlFragment += strings[_i24] + classAttrToken;
4611
+ htmlFragment += strings[_i25] + classAttrToken;
4465
4612
  break;
4466
4613
  case 2:
4467
4614
  // styleToken as attr
4468
- htmlFragment += strings[_i24] + attrToken;
4615
+ htmlFragment += strings[_i25] + attrToken;
4469
4616
  break;
4470
4617
  case 3:
4471
4618
  // ${1}${2}
4472
- htmlFragment += strings[_i24] + classAttrToken + attrToken;
4619
+ htmlFragment += strings[_i25] + classAttrToken + attrToken;
4473
4620
  break;
4474
4621
  }
4475
4622
  }
@@ -4557,8 +4704,8 @@ var LWC = (function (exports) {
4557
4704
  }
4558
4705
  function computeHasScopedStylesInStylesheets(stylesheets) {
4559
4706
  if (hasStyles(stylesheets)) {
4560
- for (var _i25 = 0; _i25 < stylesheets.length; _i25++) {
4561
- if (isTrue(stylesheets[_i25][KEY__SCOPED_CSS])) {
4707
+ for (var _i26 = 0; _i26 < stylesheets.length; _i26++) {
4708
+ if (isTrue(stylesheets[_i26][KEY__SCOPED_CSS])) {
4562
4709
  return true;
4563
4710
  }
4564
4711
  }
@@ -4656,24 +4803,29 @@ var LWC = (function (exports) {
4656
4803
  * SPDX-License-Identifier: MIT
4657
4804
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4658
4805
  */
4659
- var signedTemplateMap = new Map();
4806
+ var registeredComponentMap = new Map();
4660
4807
  /**
4661
4808
  * INTERNAL: This function can only be invoked by compiled code. The compiler
4662
4809
  * will prevent this function from being imported by userland code.
4663
4810
  */
4664
4811
  function registerComponent(
4665
4812
  // We typically expect a LightningElementConstructor, but technically you can call this with anything
4666
- Ctor, _ref3) {
4667
- var tmpl = _ref3.tmpl;
4813
+ Ctor, metadata) {
4668
4814
  if (isFunction$1(Ctor)) {
4669
- signedTemplateMap.set(Ctor, tmpl);
4815
+ // TODO [#3331]: add validation to check the value of metadata.sel is not an empty string.
4816
+ registeredComponentMap.set(Ctor, metadata);
4670
4817
  }
4671
4818
  // chaining this method as a way to wrap existing assignment of component constructor easily,
4672
4819
  // without too much transformation
4673
4820
  return Ctor;
4674
4821
  }
4675
4822
  function getComponentRegisteredTemplate(Ctor) {
4676
- return signedTemplateMap.get(Ctor);
4823
+ var _a;
4824
+ return (_a = registeredComponentMap.get(Ctor)) === null || _a === void 0 ? void 0 : _a.tmpl;
4825
+ }
4826
+ function getComponentRegisteredName(Ctor) {
4827
+ var _a;
4828
+ return (_a = registeredComponentMap.get(Ctor)) === null || _a === void 0 ? void 0 : _a.sel;
4677
4829
  }
4678
4830
  function getTemplateReactiveObserver(vm) {
4679
4831
  return createReactiveObserver(function () {
@@ -4724,8 +4876,8 @@ var LWC = (function (exports) {
4724
4876
  * subject to change or being removed.
4725
4877
  */
4726
4878
  function register(service) {
4727
- for (var _i26 = 0; _i26 < hooks.length; ++_i26) {
4728
- var hookName = hooks[_i26];
4879
+ for (var _i27 = 0; _i27 < hooks.length; ++_i27) {
4880
+ var hookName = hooks[_i27];
4729
4881
  if (hookName in service) {
4730
4882
  var l = Services[hookName];
4731
4883
  if (isUndefined$1(l)) {
@@ -4739,8 +4891,8 @@ var LWC = (function (exports) {
4739
4891
  var component = vm.component,
4740
4892
  def = vm.def,
4741
4893
  context = vm.context;
4742
- for (var _i27 = 0, len = cbs.length; _i27 < len; ++_i27) {
4743
- cbs[_i27].call(undefined, component, {}, def, context);
4894
+ for (var _i28 = 0, len = cbs.length; _i28 < len; ++_i28) {
4895
+ cbs[_i28].call(undefined, component, {}, def, context);
4744
4896
  }
4745
4897
  }
4746
4898
 
@@ -4877,8 +5029,8 @@ var LWC = (function (exports) {
4877
5029
  var valid = true;
4878
5030
  var validate = function validate(arrayOrStylesheet) {
4879
5031
  if (isArray$1(arrayOrStylesheet)) {
4880
- for (var _i28 = 0; _i28 < arrayOrStylesheet.length; _i28++) {
4881
- validate(arrayOrStylesheet[_i28]);
5032
+ for (var _i29 = 0; _i29 < arrayOrStylesheet.length; _i29++) {
5033
+ validate(arrayOrStylesheet[_i29]);
4882
5034
  }
4883
5035
  } else if (!isFunction$1(arrayOrStylesheet)) {
4884
5036
  // function assumed to be a stylesheet factory
@@ -5011,17 +5163,17 @@ var LWC = (function (exports) {
5011
5163
  return a.idx - b.idx;
5012
5164
  });
5013
5165
  rehydrateQueue = []; // reset to a new queue
5014
- for (var _i29 = 0, len = vms.length; _i29 < len; _i29 += 1) {
5015
- var vm = vms[_i29];
5166
+ for (var _i30 = 0, len = vms.length; _i30 < len; _i30 += 1) {
5167
+ var vm = vms[_i30];
5016
5168
  try {
5017
5169
  rehydrate(vm);
5018
5170
  } catch (error) {
5019
- if (_i29 + 1 < len) {
5171
+ if (_i30 + 1 < len) {
5020
5172
  // pieces of the queue are still pending to be rehydrated, those should have priority
5021
5173
  if (rehydrateQueue.length === 0) {
5022
5174
  addCallbackToNextTick(flushRehydrationQueue);
5023
5175
  }
5024
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i29 + 1));
5176
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i30 + 1));
5025
5177
  }
5026
5178
  // we need to end the measure before throwing.
5027
5179
  logGlobalOperationEnd(8 /* OperationId.GlobalRehydrate */);
@@ -5087,8 +5239,8 @@ var LWC = (function (exports) {
5087
5239
  var vCustomElementCollection = vm.velements;
5088
5240
  // Reporting disconnection for every child in inverse order since they are
5089
5241
  // inserted in reserved order.
5090
- for (var _i30 = vCustomElementCollection.length - 1; _i30 >= 0; _i30 -= 1) {
5091
- var elm = vCustomElementCollection[_i30].elm;
5242
+ for (var _i31 = vCustomElementCollection.length - 1; _i31 >= 0; _i31 -= 1) {
5243
+ var elm = vCustomElementCollection[_i31].elm;
5092
5244
  // There are two cases where the element could be undefined:
5093
5245
  // * when there is an error during the construction phase, and an error
5094
5246
  // boundary picks it, there is a possibility that the VCustomElement
@@ -5119,8 +5271,8 @@ var LWC = (function (exports) {
5119
5271
  * defined on its shadow.
5120
5272
  */
5121
5273
  function recursivelyDisconnectChildren(vnodes) {
5122
- for (var _i31 = 0, len = vnodes.length; _i31 < len; _i31 += 1) {
5123
- var vnode = vnodes[_i31];
5274
+ for (var _i32 = 0, len = vnodes.length; _i32 < len; _i32 += 1) {
5275
+ var vnode = vnodes[_i32];
5124
5276
  if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
5125
5277
  switch (vnode.type) {
5126
5278
  case 2 /* VNodeType.Element */:
@@ -5153,8 +5305,8 @@ var LWC = (function (exports) {
5153
5305
  function recursivelyRemoveChildren(vnodes, vm) {
5154
5306
  var renderRoot = vm.renderRoot,
5155
5307
  remove = vm.renderer.remove;
5156
- for (var _i32 = 0, len = vnodes.length; _i32 < len; _i32 += 1) {
5157
- var vnode = vnodes[_i32];
5308
+ for (var _i33 = 0, len = vnodes.length; _i33 < len; _i33 += 1) {
5309
+ var vnode = vnodes[_i33];
5158
5310
  if (!isNull(vnode)) {
5159
5311
  // VFragments are special; their .elm property does not point to the root element since they have no single root.
5160
5312
  if (isVFragment(vnode)) {
@@ -5263,17 +5415,17 @@ var LWC = (function (exports) {
5263
5415
  // if our id is null or empty, nobody can reference us
5264
5416
  return;
5265
5417
  }
5266
- var _iterator5 = _createForOfIteratorHelper(ID_REFERENCING_ATTRIBUTES_SET),
5267
- _step5;
5418
+ var _iterator10 = _createForOfIteratorHelper(ID_REFERENCING_ATTRIBUTES_SET),
5419
+ _step10;
5268
5420
  try {
5269
- for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
5270
- var idRefAttrName = _step5.value;
5421
+ for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
5422
+ var idRefAttrName = _step10.value;
5271
5423
  // Query all global elements with this attribute. The attribute selector syntax `~=` is for values
5272
5424
  // that reference multiple IDs, separated by whitespace.
5273
5425
  var query = "[".concat(idRefAttrName, "~=\"").concat(CSS.escape(attrValue), "\"]");
5274
5426
  var sourceElements = querySelectorAll.call(document, query);
5275
- for (var _i33 = 0; _i33 < sourceElements.length; _i33++) {
5276
- var sourceElement = sourceElements[_i33];
5427
+ for (var _i34 = 0; _i34 < sourceElements.length; _i34++) {
5428
+ var sourceElement = sourceElements[_i34];
5277
5429
  var sourceRoot = sourceElement.getRootNode();
5278
5430
  if (sourceRoot !== root) {
5279
5431
  reportViolation$1(sourceElement, elm, idRefAttrName);
@@ -5282,18 +5434,18 @@ var LWC = (function (exports) {
5282
5434
  }
5283
5435
  }
5284
5436
  } catch (err) {
5285
- _iterator5.e(err);
5437
+ _iterator10.e(err);
5286
5438
  } finally {
5287
- _iterator5.f();
5439
+ _iterator10.f();
5288
5440
  }
5289
5441
  } else {
5290
5442
  // elm is the source, find the target
5291
5443
  var ids = parseIdRefAttributeValue(attrValue);
5292
- var _iterator6 = _createForOfIteratorHelper(ids),
5293
- _step6;
5444
+ var _iterator11 = _createForOfIteratorHelper(ids),
5445
+ _step11;
5294
5446
  try {
5295
- for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
5296
- var id = _step6.value;
5447
+ for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
5448
+ var id = _step11.value;
5297
5449
  var target = getElementById.call(document, id);
5298
5450
  if (!isNull(target)) {
5299
5451
  var targetRoot = target.getRootNode();
@@ -5304,9 +5456,9 @@ var LWC = (function (exports) {
5304
5456
  }
5305
5457
  }
5306
5458
  } catch (err) {
5307
- _iterator6.e(err);
5459
+ _iterator11.e(err);
5308
5460
  } finally {
5309
- _iterator6.f();
5461
+ _iterator11.f();
5310
5462
  }
5311
5463
  }
5312
5464
  }
@@ -5431,11 +5583,11 @@ var LWC = (function (exports) {
5431
5583
  function enableDetection() {
5432
5584
  var _Element = Element,
5433
5585
  prototype = _Element.prototype;
5434
- var _iterator7 = _createForOfIteratorHelper(NON_STANDARD_ARIA_PROPS),
5435
- _step7;
5586
+ var _iterator12 = _createForOfIteratorHelper(NON_STANDARD_ARIA_PROPS),
5587
+ _step12;
5436
5588
  try {
5437
5589
  var _loop3 = function _loop3() {
5438
- var prop = _step7.value;
5590
+ var prop = _step12.value;
5439
5591
  var descriptor = getOwnPropertyDescriptor$1(prototype, prop);
5440
5592
  // The descriptor should exist because the @lwc/aria-reflection polyfill has run by now.
5441
5593
  // This happens automatically because of the ordering of imports.
@@ -5456,13 +5608,13 @@ var LWC = (function (exports) {
5456
5608
  enumerable: true
5457
5609
  });
5458
5610
  };
5459
- for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
5611
+ for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {
5460
5612
  _loop3();
5461
5613
  }
5462
5614
  } catch (err) {
5463
- _iterator7.e(err);
5615
+ _iterator12.e(err);
5464
5616
  } finally {
5465
- _iterator7.f();
5617
+ _iterator12.f();
5466
5618
  }
5467
5619
  }
5468
5620
  // No point in running this code if we're not in a browser, or if the global polyfill is not loaded
@@ -5624,8 +5776,8 @@ var LWC = (function (exports) {
5624
5776
  var nextNode = node;
5625
5777
  var anchor = null;
5626
5778
  var renderer = owner.renderer;
5627
- for (var _i34 = 0; _i34 < children.length; _i34++) {
5628
- var childVnode = children[_i34];
5779
+ for (var _i35 = 0; _i35 < children.length; _i35++) {
5780
+ var childVnode = children[_i35];
5629
5781
  if (!isNull(childVnode)) {
5630
5782
  if (nextNode) {
5631
5783
  nextNode = hydrateNode(nextNode, childVnode, renderer);
@@ -5699,8 +5851,8 @@ var LWC = (function (exports) {
5699
5851
  var nodesAreCompatible = true;
5700
5852
  // Validate attributes, though we could always recovery from those by running the update mods.
5701
5853
  // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
5702
- for (var _i35 = 0, _Object$entries = Object.entries(attrs); _i35 < _Object$entries.length; _i35++) {
5703
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i35], 2),
5854
+ for (var _i36 = 0, _Object$entries = Object.entries(attrs); _i36 < _Object$entries.length; _i36++) {
5855
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i36], 2),
5704
5856
  attrName = _Object$entries$_i[0],
5705
5857
  attrValue = _Object$entries$_i[1];
5706
5858
  vnode.owner;
@@ -5787,8 +5939,8 @@ var LWC = (function (exports) {
5787
5939
  var parsedVnodeStyle = parseStyleText(elmStyle);
5788
5940
  var expectedStyle = [];
5789
5941
  // styleMap is used when style is set to static value.
5790
- for (var _i36 = 0, n = styleDecls.length; _i36 < n; _i36++) {
5791
- var _styleDecls$_i2 = _slicedToArray(styleDecls[_i36], 3),
5942
+ for (var _i37 = 0, n = styleDecls.length; _i37 < n; _i37++) {
5943
+ var _styleDecls$_i2 = _slicedToArray(styleDecls[_i37], 3),
5792
5944
  prop = _styleDecls$_i2[0],
5793
5945
  value = _styleDecls$_i2[1],
5794
5946
  important = _styleDecls$_i2[2];
@@ -5907,11 +6059,11 @@ var LWC = (function (exports) {
5907
6059
  function warnOnArrayMutation(stylesheets) {
5908
6060
  // We can't handle users calling Array.prototype.slice.call(tmpl.stylesheets), but
5909
6061
  // we can at least warn when they use the most common mutation methods.
5910
- var _iterator8 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
5911
- _step8;
6062
+ var _iterator13 = _createForOfIteratorHelper(ARRAY_MUTATION_METHODS),
6063
+ _step13;
5912
6064
  try {
5913
6065
  var _loop4 = function _loop4() {
5914
- var prop = _step8.value;
6066
+ var prop = _step13.value;
5915
6067
  var originalArrayMethod = getOriginalArrayMethod(prop);
5916
6068
  stylesheets[prop] = function arrayMutationWarningWrapper() {
5917
6069
  reportTemplateViolation('stylesheets');
@@ -5919,23 +6071,23 @@ var LWC = (function (exports) {
5919
6071
  return originalArrayMethod.apply(this, arguments);
5920
6072
  };
5921
6073
  };
5922
- for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
6074
+ for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {
5923
6075
  _loop4();
5924
6076
  }
5925
6077
  } catch (err) {
5926
- _iterator8.e(err);
6078
+ _iterator13.e(err);
5927
6079
  } finally {
5928
- _iterator8.f();
6080
+ _iterator13.f();
5929
6081
  }
5930
6082
  }
5931
6083
  // Warn if the user tries to mutate a stylesheet factory function, e.g.:
5932
6084
  // `stylesheet.$scoped$ = true`
5933
6085
  function warnOnStylesheetFunctionMutation(stylesheet) {
5934
- var _iterator9 = _createForOfIteratorHelper(STYLESHEET_PROPS),
5935
- _step9;
6086
+ var _iterator14 = _createForOfIteratorHelper(STYLESHEET_PROPS),
6087
+ _step14;
5936
6088
  try {
5937
6089
  var _loop5 = function _loop5() {
5938
- var prop = _step9.value;
6090
+ var prop = _step14.value;
5939
6091
  var value = stylesheet[prop];
5940
6092
  defineProperty(stylesheet, prop, {
5941
6093
  enumerable: true,
@@ -5949,13 +6101,13 @@ var LWC = (function (exports) {
5949
6101
  }
5950
6102
  });
5951
6103
  };
5952
- for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
6104
+ for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) {
5953
6105
  _loop5();
5954
6106
  }
5955
6107
  } catch (err) {
5956
- _iterator9.e(err);
6108
+ _iterator14.e(err);
5957
6109
  } finally {
5958
- _iterator9.f();
6110
+ _iterator14.f();
5959
6111
  }
5960
6112
  }
5961
6113
  // Warn on either array or stylesheet (function) mutation, in a deeply-nested array
@@ -5977,8 +6129,8 @@ var LWC = (function (exports) {
5977
6129
  // Deep-traverse an array (of arrays) of stylesheet factory functions, and call the callback for every array/function
5978
6130
  function traverseStylesheets(stylesheets, callback) {
5979
6131
  callback(stylesheets);
5980
- for (var _i37 = 0; _i37 < stylesheets.length; _i37++) {
5981
- var stylesheet = stylesheets[_i37];
6132
+ for (var _i38 = 0; _i38 < stylesheets.length; _i38++) {
6133
+ var stylesheet = stylesheets[_i38];
5982
6134
  if (isArray$1(stylesheet)) {
5983
6135
  traverseStylesheets(stylesheet, callback);
5984
6136
  } else {
@@ -5990,11 +6142,11 @@ var LWC = (function (exports) {
5990
6142
  if (!isUndefined$1(tmpl.stylesheets)) {
5991
6143
  trackStylesheetsMutation(tmpl.stylesheets);
5992
6144
  }
5993
- var _iterator10 = _createForOfIteratorHelper(TEMPLATE_PROPS),
5994
- _step10;
6145
+ var _iterator15 = _createForOfIteratorHelper(TEMPLATE_PROPS),
6146
+ _step15;
5995
6147
  try {
5996
6148
  var _loop6 = function _loop6() {
5997
- var prop = _step10.value;
6149
+ var prop = _step15.value;
5998
6150
  var value = tmpl[prop];
5999
6151
  defineProperty(tmpl, prop, {
6000
6152
  enumerable: true,
@@ -6010,13 +6162,13 @@ var LWC = (function (exports) {
6010
6162
  }
6011
6163
  });
6012
6164
  };
6013
- for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
6165
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {
6014
6166
  _loop6();
6015
6167
  }
6016
6168
  } catch (err) {
6017
- _iterator10.e(err);
6169
+ _iterator15.e(err);
6018
6170
  } finally {
6019
- _iterator10.f();
6171
+ _iterator15.f();
6020
6172
  }
6021
6173
  var originalDescriptor = getOwnPropertyDescriptor$1(tmpl, 'stylesheetTokens');
6022
6174
  defineProperty(tmpl, 'stylesheetTokens', {
@@ -6455,7 +6607,7 @@ var LWC = (function (exports) {
6455
6607
  function isNull(obj) {
6456
6608
  return obj === null;
6457
6609
  }
6458
- /** version: 2.38.1 */
6610
+ /** version: 2.39.1 */
6459
6611
 
6460
6612
  /*
6461
6613
  * Copyright (c) 2023, salesforce.com, inc.
@@ -6466,10 +6618,10 @@ var LWC = (function (exports) {
6466
6618
  var WireContextSubscriptionEvent = /*#__PURE__*/function (_CustomEvent) {
6467
6619
  _inherits(WireContextSubscriptionEvent, _CustomEvent);
6468
6620
  var _super6 = _createSuper(WireContextSubscriptionEvent);
6469
- function WireContextSubscriptionEvent(adapterToken, _ref6) {
6621
+ function WireContextSubscriptionEvent(adapterToken, _ref5) {
6470
6622
  var _this3;
6471
- var setNewContext = _ref6.setNewContext,
6472
- setDisconnectedCallback = _ref6.setDisconnectedCallback;
6623
+ var setNewContext = _ref5.setNewContext,
6624
+ setDisconnectedCallback = _ref5.setDisconnectedCallback;
6473
6625
  _classCallCheck(this, WireContextSubscriptionEvent);
6474
6626
  _this3 = _super6.call(this, adapterToken, {
6475
6627
  bubbles: true,
@@ -6553,17 +6705,17 @@ var LWC = (function (exports) {
6553
6705
  exports.createFragment = function (html) {
6554
6706
  var wrapperTags = topLevelWrappingMap[getTagName(html)];
6555
6707
  if (!isUndefined(wrapperTags)) {
6556
- var _iterator11 = _createForOfIteratorHelper(wrapperTags),
6557
- _step11;
6708
+ var _iterator16 = _createForOfIteratorHelper(wrapperTags),
6709
+ _step16;
6558
6710
  try {
6559
- for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
6560
- var wrapperTag = _step11.value;
6711
+ for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {
6712
+ var wrapperTag = _step16.value;
6561
6713
  html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
6562
6714
  }
6563
6715
  } catch (err) {
6564
- _iterator11.e(err);
6716
+ _iterator16.e(err);
6565
6717
  } finally {
6566
- _iterator11.f();
6718
+ _iterator16.f();
6567
6719
  }
6568
6720
  }
6569
6721
  // For IE11, the document title must not be undefined, but it can be an empty string
@@ -6572,7 +6724,7 @@ var LWC = (function (exports) {
6572
6724
  doc.body.innerHTML = html;
6573
6725
  var content = doc.body;
6574
6726
  if (!isUndefined(wrapperTags)) {
6575
- for (var _i38 = 0; _i38 < wrapperTags.length; _i38++) {
6727
+ for (var _i39 = 0; _i39 < wrapperTags.length; _i39++) {
6576
6728
  content = content.firstChild;
6577
6729
  }
6578
6730
  }
@@ -6771,8 +6923,8 @@ var LWC = (function (exports) {
6771
6923
  tagName: element.tagName.toLowerCase(),
6772
6924
  hydrated: true
6773
6925
  });
6774
- for (var _i39 = 0, _Object$entries2 = Object.entries(props); _i39 < _Object$entries2.length; _i39++) {
6775
- var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i39], 2),
6926
+ for (var _i40 = 0, _Object$entries2 = Object.entries(props); _i40 < _Object$entries2.length; _i40++) {
6927
+ var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i40], 2),
6776
6928
  key = _Object$entries2$_i[0],
6777
6929
  value = _Object$entries2$_i[1];
6778
6930
  element[key] = value;
@@ -7090,7 +7242,7 @@ var LWC = (function (exports) {
7090
7242
  });
7091
7243
  });
7092
7244
  }
7093
- /* version: 2.38.1 */
7245
+ /* version: 2.39.1 */
7094
7246
 
7095
7247
  exports.LightningElement = LightningElement;
7096
7248
  exports.__unstable__ProfilerControl = profilerControl;