marko 5.33.8 → 5.33.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/dist/core-tags/core/await/AsyncValue.js +21 -21
  2. package/dist/core-tags/core/await/renderer.js +11 -11
  3. package/dist/core-tags/core/await/reorderer-renderer.js +3 -3
  4. package/dist/node_modules/@internal/components-beginComponent/index-browser.js +4 -4
  5. package/dist/node_modules/@internal/components-beginComponent/index.js +11 -11
  6. package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +45 -45
  7. package/dist/node_modules/@internal/components-define-widget-legacy/index.js +3 -3
  8. package/dist/node_modules/@internal/components-endComponent/index.js +3 -3
  9. package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
  10. package/dist/node_modules/@internal/components-entry/index.js +16 -16
  11. package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
  12. package/dist/node_modules/@internal/components-registry/index-browser.js +46 -46
  13. package/dist/node_modules/@internal/components-registry/index.js +2 -2
  14. package/dist/node_modules/@internal/components-util/index-browser.js +20 -20
  15. package/dist/node_modules/@internal/components-util/index.js +10 -10
  16. package/dist/node_modules/@internal/create-readable/index-browser.js +1 -1
  17. package/dist/node_modules/@internal/create-readable/index.js +9 -9
  18. package/dist/node_modules/@internal/preserve-tag/index-browser.js +7 -7
  19. package/dist/node_modules/@internal/preserve-tag/index.js +5 -5
  20. package/dist/node_modules/@internal/set-immediate/index-browser.js +4 -2
  21. package/dist/node_modules/@internal/set-immediate/index-worker.js +31 -2
  22. package/dist/node_modules/@internal/set-immediate/index.js +3 -2
  23. package/dist/node_modules/@internal/set-immediate/queueMicrotask.js +8 -0
  24. package/dist/runtime/RenderResult.js +8 -8
  25. package/dist/runtime/components/Component.js +145 -145
  26. package/dist/runtime/components/ComponentDef.js +28 -28
  27. package/dist/runtime/components/ComponentsContext.js +15 -15
  28. package/dist/runtime/components/GlobalComponentsContext.js +4 -4
  29. package/dist/runtime/components/KeySequence.js +3 -3
  30. package/dist/runtime/components/ServerComponent.js +13 -13
  31. package/dist/runtime/components/State.js +26 -26
  32. package/dist/runtime/components/attach-detach.js +8 -8
  33. package/dist/runtime/components/defineComponent.js +5 -5
  34. package/dist/runtime/components/dom-data.js +5 -5
  35. package/dist/runtime/components/event-delegation.js +10 -10
  36. package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
  37. package/dist/runtime/components/legacy/defineRenderer-legacy.js +16 -16
  38. package/dist/runtime/components/legacy/dependencies/index.js +7 -7
  39. package/dist/runtime/components/legacy/renderer-legacy.js +43 -43
  40. package/dist/runtime/components/renderer.js +36 -36
  41. package/dist/runtime/components/update-manager.js +4 -4
  42. package/dist/runtime/createOut.js +1 -1
  43. package/dist/runtime/dom-insert.js +5 -5
  44. package/dist/runtime/helpers/_change-case.js +2 -2
  45. package/dist/runtime/helpers/class-value.js +2 -5
  46. package/dist/runtime/helpers/dynamic-tag.js +16 -16
  47. package/dist/runtime/helpers/render-tag.js +1 -1
  48. package/dist/runtime/helpers/style-value.js +3 -3
  49. package/dist/runtime/helpers/tags-compat/runtime-dom.js +21 -21
  50. package/dist/runtime/helpers/tags-compat/runtime-html.js +8 -8
  51. package/dist/runtime/html/AsyncStream.js +31 -28
  52. package/dist/runtime/html/BufferedWriter.js +2 -2
  53. package/dist/runtime/html/StringWriter.js +1 -1
  54. package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
  55. package/dist/runtime/html/helpers/attr.js +4 -4
  56. package/dist/runtime/html/helpers/data-marko.js +6 -6
  57. package/dist/runtime/html/helpers/escape-quotes.js +2 -2
  58. package/dist/runtime/html/helpers/escape-xml.js +1 -1
  59. package/dist/runtime/html/helpers/props-script.js +1 -1
  60. package/dist/runtime/html/index.js +2 -2
  61. package/dist/runtime/renderable.js +5 -5
  62. package/dist/runtime/vdom/AsyncVDOMBuilder.js +96 -96
  63. package/dist/runtime/vdom/VComponent.js +5 -5
  64. package/dist/runtime/vdom/VDocumentFragment.js +7 -7
  65. package/dist/runtime/vdom/VElement.js +55 -51
  66. package/dist/runtime/vdom/VFragment.js +9 -9
  67. package/dist/runtime/vdom/VNode.js +22 -22
  68. package/dist/runtime/vdom/VText.js +4 -4
  69. package/dist/runtime/vdom/helpers/const-element.js +3 -3
  70. package/dist/runtime/vdom/hot-reload.js +19 -19
  71. package/dist/runtime/vdom/index.js +2 -2
  72. package/dist/runtime/vdom/morphdom/fragment.js +2 -2
  73. package/dist/runtime/vdom/morphdom/helpers.js +4 -4
  74. package/dist/runtime/vdom/morphdom/index.js +68 -68
  75. package/dist/runtime/vdom/vdom.js +12 -12
  76. package/package.json +3 -3
  77. package/src/core-tags/core/await/AsyncValue.js +1 -1
  78. package/src/node_modules/@internal/components-registry/index-browser.js +2 -2
  79. package/src/node_modules/@internal/set-immediate/index-browser.js +2 -0
  80. package/src/node_modules/@internal/set-immediate/index-worker.js +31 -2
  81. package/src/node_modules/@internal/set-immediate/index.js +1 -0
  82. package/src/node_modules/@internal/set-immediate/queueMicrotask.js +8 -0
  83. package/src/runtime/helpers/class-value.js +2 -5
  84. package/src/runtime/helpers/style-value.js +2 -2
  85. package/src/runtime/html/AsyncStream.js +4 -1
  86. package/src/runtime/vdom/VElement.js +15 -11
  87. package/src/runtime/vdom/hot-reload.js +2 -2
  88. package/dist/runtime/queueMicrotask.js +0 -14
  89. package/src/runtime/queueMicrotask.js +0 -14
@@ -1,12 +1,12 @@
1
1
  "use strict";var Component = require("../../../runtime/components/Component");
2
2
  var req = require("@internal/require");
3
3
  var getComponentForEl =
4
- require("@internal/components-util").S_;
4
+ require("@internal/components-util").T_;
5
5
 
6
6
 
7
7
 
8
8
  // expose legacy
9
- require("@internal/components-registry")._e_ = exports;
9
+ require("@internal/components-registry")._f_ = exports;
10
10
  exports.load = function (typeName) {
11
11
  return exports.defineWidget(req(typeName));
12
12
  };
@@ -34,14 +34,14 @@ exports.getWidgetForEl = exports.get = function (elOrId) {
34
34
  return getComponentForEl(el);
35
35
  };
36
36
  exports.initWidgets =
37
- require("@internal/components-registry").T_;
37
+ require("@internal/components-registry").U_;
38
38
 
39
39
  // monkey patch Widget
40
40
  if (Widget) {
41
41
  var WidgetProto = Widget.prototype;
42
42
  WidgetProto.setProps = function (newInput) {
43
- this._f_ = true;
44
- this._g_(newInput);
43
+ this._g_ = true;
44
+ this._h_(newInput);
45
45
  };
46
46
  WidgetProto.rerender = function (newInput) {
47
47
  if (newInput) {
@@ -70,6 +70,6 @@ RenderResult.prototype.getWidgets = function () {
70
70
  return RenderResult.prototype.getComponents.
71
71
  apply(this, arguments).
72
72
  filter(function (component) {
73
- return component.x_;
73
+ return component.y_;
74
74
  });
75
75
  };
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
+ var setImmediate = require("@internal/set-immediate")._i_;
2
3
  var warp10Finalize = require("warp10/finalize");
3
- var queueMicrotask = require("../../../runtime/queueMicrotask");
4
4
  var defineComponent = require("../../../runtime/components/defineComponent");
5
5
  var eventDelegation = require("../../../runtime/components/event-delegation");
6
6
  var createFragmentNode =
7
- require("../../../runtime/vdom/morphdom/fragment")._h_;
7
+ require("../../../runtime/vdom/morphdom/fragment")._j_;
8
8
  var ComponentDef = require("../../../runtime/components/ComponentDef");
9
9
  var domData = require("../../../runtime/components/dom-data");
10
10
  var componentsUtil = require("@internal/components-util");
11
11
  var req = require("@internal/require");
12
- var componentLookup = componentsUtil._i_;
12
+ var componentLookup = componentsUtil._k_;
13
13
  var addComponentRootToKeyedElements =
14
- componentsUtil._j_;
15
- var keyedElementsByComponentId = domData._k_;
16
- var componentsByDOMNode = domData._l_;
14
+ componentsUtil._l_;
15
+ var keyedElementsByComponentId = domData._m_;
16
+ var componentsByDOMNode = domData._n_;
17
17
  var serverComponentRootNodes = {};
18
18
  var serverRenderedMeta = {};
19
19
  var win = window;
@@ -39,7 +39,7 @@ function register(type, def) {
39
39
 
40
40
  if (pendingForType) {
41
41
  delete pendingDefs[type];
42
- queueMicrotask(function () {
42
+ setImmediate(function () {
43
43
  pendingForType.forEach(function (args) {
44
44
  tryHydrateComponent(args[0], args[1], args[2], args[3])();
45
45
  });
@@ -81,7 +81,7 @@ function load(typeName, isLegacy) {
81
81
  if (target) {
82
82
  target = target();
83
83
  } else if (isLegacy) {
84
- target = exports._e_.load(typeName);
84
+ target = exports._f_.load(typeName);
85
85
  } else {
86
86
  target = req(typeName);
87
87
  // eslint-disable-next-line no-constant-condition
@@ -113,12 +113,12 @@ function getComponentClass(typeName, isLegacy) {
113
113
 
114
114
  ComponentClass = ComponentClass.Component || ComponentClass;
115
115
 
116
- if (!ComponentClass.w_) {
116
+ if (!ComponentClass.x_) {
117
117
  ComponentClass = defineComponent(ComponentClass, ComponentClass.renderer);
118
118
  }
119
119
 
120
120
  // Make the component "type" accessible on each component instance
121
- ComponentClass.prototype._m_ = typeName;
121
+ ComponentClass.prototype._o_ = typeName;
122
122
 
123
123
  // eslint-disable-next-line no-constant-condition
124
124
 
@@ -198,7 +198,7 @@ function indexServerComponentBoundaries(node, runtimeId, stack) {
198
198
  ownerId = parts[1];
199
199
  componentId = parts[0];
200
200
  if (ownerComponent = componentLookup[ownerId]) {
201
- keyedElements = ownerComponent.J_;
201
+ keyedElements = ownerComponent.K_;
202
202
  } else {
203
203
  keyedElements =
204
204
  keyedElementsByComponentId[ownerId] || (
@@ -221,13 +221,13 @@ function indexServerComponentBoundaries(node, runtimeId, stack) {
221
221
  } else if (node.nodeType === 1) {
222
222
  // HTML element node
223
223
  var markoKey = node.getAttribute("data-marko-key");
224
- var markoProps = componentsUtil._n_(node);
224
+ var markoProps = componentsUtil._p_(node);
225
225
  if (markoKey) {
226
226
  var separatorIndex = markoKey.indexOf(" ");
227
227
  ownerId = markoKey.substring(separatorIndex + 1);
228
228
  markoKey = markoKey.substring(0, separatorIndex);
229
229
  if (ownerComponent = componentLookup[ownerId]) {
230
- keyedElements = ownerComponent.J_;
230
+ keyedElements = ownerComponent.K_;
231
231
  } else {
232
232
  keyedElements =
233
233
  keyedElementsByComponentId[ownerId] || (
@@ -238,7 +238,7 @@ function indexServerComponentBoundaries(node, runtimeId, stack) {
238
238
  if (markoProps) {
239
239
  Object.keys(markoProps).forEach(function (key) {
240
240
  if (key.slice(0, 2) === "on") {
241
- eventDelegation._o_(key.slice(2));
241
+ eventDelegation._q_(key.slice(2));
242
242
  }
243
243
  });
244
244
  }
@@ -300,22 +300,22 @@ handles)
300
300
  }
301
301
 
302
302
  function initComponent(componentDef, host) {
303
- var component = componentDef.r_;
303
+ var component = componentDef.s_;
304
304
 
305
- if (!component || !component.w_) {
305
+ if (!component || !component.x_) {
306
306
  return; // legacy
307
307
  }
308
308
 
309
- component._p_();
310
- component.A_ = host;
309
+ component._r_();
310
+ component.B_ = host;
311
311
 
312
- var isExisting = componentDef._q_;
312
+ var isExisting = componentDef._s_;
313
313
 
314
314
  if (isExisting) {
315
- component._r_();
315
+ component._t_();
316
316
  }
317
317
 
318
- var domEvents = componentDef._a_;
318
+ var domEvents = componentDef._b_;
319
319
  if (domEvents) {
320
320
  var eventListenerHandles = [];
321
321
 
@@ -324,7 +324,7 @@ function initComponent(componentDef, host) {
324
324
 
325
325
  var eventType = domEventArgs[0];
326
326
  var targetMethodName = domEventArgs[1];
327
- var eventEl = component.J_[domEventArgs[2]];
327
+ var eventEl = component.K_[domEventArgs[2]];
328
328
  var isOnce = domEventArgs[3];
329
329
  var extraArgs = domEventArgs[4];
330
330
 
@@ -340,15 +340,15 @@ function initComponent(componentDef, host) {
340
340
  });
341
341
 
342
342
  if (eventListenerHandles.length) {
343
- component._s_ = eventListenerHandles;
343
+ component._u_ = eventListenerHandles;
344
344
  }
345
345
  }
346
346
 
347
- if (component._t_) {
348
- component._u_();
347
+ if (component._v_) {
348
+ component._w_();
349
349
  } else {
350
- component._t_ = true;
351
- component._v_();
350
+ component._v_ = true;
351
+ component._x_();
352
352
  }
353
353
  }
354
354
 
@@ -364,7 +364,7 @@ function initClientRendered(componentDefs, host) {
364
364
  if (!host) host = document;
365
365
  // Ensure that event handlers to handle delegating events are
366
366
  // always attached before initializing any components
367
- eventDelegation._w_(host);
367
+ eventDelegation._y_(host);
368
368
  var len = componentDefs.length;
369
369
  var componentDef;
370
370
  var i;
@@ -477,15 +477,15 @@ function initServerRendered(renderedComponents, host) {
477
477
  // Ensure that event handlers to handle delegating events are
478
478
  // always attached before initializing any components
479
479
  indexServerComponentBoundaries(host, runtimeId);
480
- eventDelegation._w_(host);
480
+ eventDelegation._y_(host);
481
481
 
482
482
  if (renderedComponents.g) {
483
- meta._x_ = renderedComponents.g;
483
+ meta._z_ = renderedComponents.g;
484
484
  }
485
485
 
486
486
  if (renderedComponents.t) {
487
- meta._y_ = meta._y_ ?
488
- meta._y_.concat(renderedComponents.t) :
487
+ meta._A_ = meta._A_ ?
488
+ meta._A_.concat(renderedComponents.t) :
489
489
  renderedComponents.t;
490
490
  }
491
491
 
@@ -493,7 +493,7 @@ function initServerRendered(renderedComponents, host) {
493
493
  // and return an array of functions to mount these components
494
494
  (renderedComponents.w || []).
495
495
  map(function (componentDef) {
496
- var typeName = meta._y_[componentDef[1]];
496
+ var typeName = meta._A_[componentDef[1]];
497
497
 
498
498
  return registered[typeName] ||
499
499
  document.readyState === "complete" ||
@@ -508,10 +508,10 @@ function initServerRendered(renderedComponents, host) {
508
508
  }
509
509
 
510
510
  function tryHydrateComponent(rawDef, meta, host, runtimeId) {
511
- var componentDef = ComponentDef._z_(
511
+ var componentDef = ComponentDef._B_(
512
512
  rawDef,
513
- meta._y_,
514
- meta._x_,
513
+ meta._A_,
514
+ meta._z_,
515
515
  exports
516
516
  );
517
517
  var mount = hydrateComponentAndGetMount(componentDef, host);
@@ -542,19 +542,19 @@ function tryHydrateComponent(rawDef, meta, host, runtimeId) {
542
542
 
543
543
  function hydrateComponentAndGetMount(componentDef, host) {
544
544
  var componentId = componentDef.id;
545
- var component = componentDef.r_;
545
+ var component = componentDef.s_;
546
546
  var rootNode = serverComponentRootNodes[componentId];
547
547
  var renderResult;
548
548
 
549
549
  if (rootNode) {
550
550
  delete serverComponentRootNodes[componentId];
551
551
 
552
- component._A_ = rootNode;
552
+ component._C_ = rootNode;
553
553
  componentsByDOMNode.set(rootNode, component);
554
554
 
555
- if (componentDef.t_ & FLAG_WILL_RERENDER_IN_BROWSER) {
556
- component.A_ = host;
557
- renderResult = component._B_(component.N_, true);
555
+ if (componentDef.u_ & FLAG_WILL_RERENDER_IN_BROWSER) {
556
+ component.B_ = host;
557
+ renderResult = component._D_(component.O_, true);
558
558
  trackComponent(componentDef);
559
559
  return function mount() {
560
560
  renderResult.afterInsert(host);
@@ -570,7 +570,7 @@ function hydrateComponentAndGetMount(componentDef, host) {
570
570
  }
571
571
 
572
572
  function trackComponent(componentDef) {
573
- var component = componentDef.r_;
573
+ var component = componentDef.s_;
574
574
  if (component) {
575
575
  componentLookup[component.id] = component;
576
576
  }
@@ -581,9 +581,9 @@ function tryInvoke(fn) {
581
581
  }
582
582
 
583
583
  exports.r = register;
584
- exports._C_ = createComponent;
585
- exports._D_ = getComponentClass;
586
- exports.T_ = win.$initComponents = initServerRendered;
584
+ exports._E_ = createComponent;
585
+ exports._F_ = getComponentClass;
586
+ exports.U_ = win.$initComponents = initServerRendered;
587
587
 
588
- require("../../../runtime/components/ComponentsContext")._E_ =
588
+ require("../../../runtime/components/ComponentsContext")._G_ =
589
589
  initClientRendered;
@@ -40,5 +40,5 @@ scope)
40
40
  return new ServerComponent(id, input, out, typeName, customEvents, scope);
41
41
  }
42
42
 
43
- exports._F_ = true;
44
- exports._C_ = createComponent;
43
+ exports._H_ = true;
44
+ exports._E_ = createComponent;
@@ -1,8 +1,8 @@
1
1
  "use strict";var domData = require("../../../runtime/components/dom-data");
2
- var componentsByDOMNode = domData._l_;
3
- var keysByDOMNode = domData._G_;
4
- var vElementsByDOMNode = domData._H_;
5
- var vPropsByDOMNode = domData._I_;
2
+ var componentsByDOMNode = domData._n_;
3
+ var keysByDOMNode = domData._I_;
4
+ var vElementsByDOMNode = domData._J_;
5
+ var vPropsByDOMNode = domData._K_;
6
6
  var markoUID = window.$MUID || (window.$MUID = { i: 0 });
7
7
  var runtimeId = markoUID.i++;
8
8
 
@@ -27,7 +27,7 @@ function getComponentForEl(el, host) {
27
27
  component = componentsByDOMNode.get(node);
28
28
  }
29
29
  } else if (vElement = vElementsByDOMNode.get(node)) {
30
- component = vElement._J_;
30
+ component = vElement._L_;
31
31
  }
32
32
 
33
33
  if (component) {
@@ -41,7 +41,7 @@ function getComponentForEl(el, host) {
41
41
  function destroyComponentForNode(node) {
42
42
  var componentToDestroy = componentsByDOMNode.get(node.fragment || node);
43
43
  if (componentToDestroy) {
44
- componentToDestroy._K_();
44
+ componentToDestroy._M_();
45
45
  delete componentLookup[componentToDestroy.id];
46
46
  }
47
47
  }
@@ -51,13 +51,13 @@ function destroyNodeRecursive(node, component) {
51
51
  var key;
52
52
 
53
53
  if (component && (key = keysByDOMNode.get(node))) {
54
- if (node === component.J_[key]) {
54
+ if (node === component.K_[key]) {
55
55
  if (componentsByDOMNode.get(node) && /\[\]$/.test(key)) {
56
- delete component.J_[key][
56
+ delete component.K_[key][
57
57
  componentsByDOMNode.get(node).id];
58
58
 
59
59
  } else {
60
- delete component.J_[key];
60
+ delete component.K_[key];
61
61
  }
62
62
  }
63
63
  }
@@ -103,7 +103,7 @@ function getMarkoPropsFromEl(el) {
103
103
  var virtualProps;
104
104
 
105
105
  if (vElement) {
106
- virtualProps = vElement._L_;
106
+ virtualProps = vElement._N_;
107
107
  } else {
108
108
  virtualProps = vPropsByDOMNode.get(el);
109
109
  if (!virtualProps) {
@@ -167,13 +167,13 @@ componentId)
167
167
 
168
168
 
169
169
 
170
- exports._M_ = runtimeId;
171
- exports._i_ = componentLookup;
172
- exports.S_ = getComponentForEl;
173
- exports._N_ = destroyComponentForNode;
174
- exports._O_ = destroyNodeRecursive;
175
- exports._P_ = nextComponentIdProvider;
176
- exports._Q_ = attachBubblingEvent;
177
- exports._n_ = getMarkoPropsFromEl;
178
- exports._j_ = addComponentRootToKeyedElements;
179
- exports._R_ = normalizeComponentKey;
170
+ exports._O_ = runtimeId;
171
+ exports._k_ = componentLookup;
172
+ exports.T_ = getComponentForEl;
173
+ exports._P_ = destroyComponentForNode;
174
+ exports._Q_ = destroyNodeRecursive;
175
+ exports._R_ = nextComponentIdProvider;
176
+ exports._S_ = attachBubblingEvent;
177
+ exports._p_ = getMarkoPropsFromEl;
178
+ exports._l_ = addComponentRootToKeyedElements;
179
+ exports._T_ = normalizeComponentKey;
@@ -28,8 +28,8 @@ extraArgs)
28
28
  {
29
29
  if (handlerMethodName) {
30
30
  if (extraArgs) {
31
- var component = componentDef.r_;
32
- var eventIndex = component.Y_++;
31
+ var component = componentDef.s_;
32
+ var eventIndex = component.Z_++;
33
33
 
34
34
  // If we are not going to be doing a rerender in the browser
35
35
  // then we need to actually store the extra args with the UI component
@@ -39,11 +39,11 @@ extraArgs)
39
39
  // where the extra args will be found when the UI component is
40
40
  // rerendered in the browser
41
41
 
42
- if (!(componentDef.t_ & FLAG_WILL_RERENDER_IN_BROWSER)) {
42
+ if (!(componentDef.u_ & FLAG_WILL_RERENDER_IN_BROWSER)) {
43
43
  if (eventIndex === 0) {
44
- component.W_ = [extraArgs];
44
+ component.X_ = [extraArgs];
45
45
  } else {
46
- component.W_.push(extraArgs);
46
+ component.X_.push(extraArgs);
47
47
  }
48
48
  }
49
49
 
@@ -62,10 +62,10 @@ extraArgs)
62
62
  }
63
63
  }
64
64
 
65
- exports._P_ = nextComponentIdProvider;
66
- exports._F_ = true;
67
- exports._Q_ = attachBubblingEvent;
68
- exports._N_ = function noop() {};
69
- exports._O_ = function noop() {};
65
+ exports._R_ = nextComponentIdProvider;
66
+ exports._H_ = true;
67
+ exports._S_ = attachBubblingEvent;
68
+ exports._P_ = function noop() {};
69
+ exports._Q_ = function noop() {};
70
70
 
71
71
  // eslint-disable-next-line no-constant-condition
@@ -17,7 +17,7 @@ module.exports = function (data) {
17
17
  data && data.$global,
18
18
  facade,
19
19
  undefined,
20
- this._S_
20
+ this._U_
21
21
  );
22
22
  out.once("error", (err) => {
23
23
  facade.write = facade.end = noop;
@@ -17,9 +17,9 @@ if (String(OutgoingMessageProto.flush).indexOf("deprecated") !== -1) {
17
17
  class Readable extends stream.Readable {
18
18
  constructor(template, data) {
19
19
  super();
20
- this._T_ = template;
21
- this._U_ = data;
22
- this._V_ = false;
20
+ this._V_ = template;
21
+ this._W_ = data;
22
+ this._X_ = false;
23
23
  }
24
24
 
25
25
  write(data) {
@@ -33,19 +33,19 @@ class Readable extends stream.Readable {
33
33
  }
34
34
 
35
35
  _read() {
36
- if (this._V_) {
36
+ if (this._X_) {
37
37
  return;
38
38
  }
39
39
 
40
- this._V_ = true;
41
- var template = this._T_;
42
- var data = this._U_;
40
+ this._X_ = true;
41
+ var template = this._V_;
42
+ var data = this._W_;
43
43
  var globalData = data && data.$global;
44
- var out = this._T_.createOut(
44
+ var out = this._V_.createOut(
45
45
  globalData,
46
46
  this,
47
47
  undefined,
48
- template._S_
48
+ template._U_
49
49
  );
50
50
  template.render(data, out);
51
51
  out.end();
@@ -3,14 +3,14 @@
3
3
  var shouldPreserve = !("i" in input) || input.i;
4
4
  var componentsContext = out.b_;
5
5
  var isHydrate =
6
- componentsContext && componentsContext.o_._W_;
7
- var ownerComponent = out._X_.r_;
6
+ componentsContext && componentsContext.p_._Y_;
7
+ var ownerComponent = out._Z_.s_;
8
8
  var referenceComponent = ownerComponent;
9
- var key = out._Y_;
9
+ var key = out.a__;
10
10
  var checkKey = key;
11
11
 
12
12
  if (key[0] !== "@") {
13
- var parentComponent = componentsContext.n_.r_;
13
+ var parentComponent = componentsContext.o_.s_;
14
14
  if (ownerComponent !== parentComponent) {
15
15
  referenceComponent = parentComponent;
16
16
  checkKey += ":" + ownerComponent.id;
@@ -19,7 +19,7 @@
19
19
 
20
20
  var isPreserved =
21
21
  shouldPreserve && (
22
- isHydrate || referenceComponent.J_[checkKey]);
22
+ isHydrate || referenceComponent.K_[checkKey]);
23
23
 
24
24
  if (isComponent) {
25
25
  out.bf(key, ownerComponent, shouldPreserve);
@@ -32,10 +32,10 @@
32
32
  } else {
33
33
  if (isPreserved) {
34
34
  if (input.b) {
35
- out._Z_.a__ = true;
35
+ out.aa_.ab_ = true;
36
36
  } else {
37
37
  out.beginElement("", null, key, ownerComponent);
38
- out._Z_.aa_ = true;
38
+ out.aa_.ac_ = true;
39
39
  out.endElement();
40
40
  }
41
41
  } else if (input.renderBody) {
@@ -1,5 +1,5 @@
1
1
  "use strict";var ComponentsContext = require("../../../runtime/components/ComponentsContext");
2
- var getComponentsContext = ComponentsContext.R_;
2
+ var getComponentsContext = ComponentsContext.S_;
3
3
 
4
4
  module.exports = function render(input, out) {
5
5
  var isComponent = !input.n;
@@ -7,7 +7,7 @@ module.exports = function render(input, out) {
7
7
  var componentsContext = out.b_;
8
8
 
9
9
  if (isComponent) {
10
- out.bf(out._Y_, out._X_.r_, true);
10
+ out.bf(out.a__, out._Z_.s_, true);
11
11
  }
12
12
 
13
13
  if (input.renderBody) {
@@ -15,14 +15,14 @@ module.exports = function render(input, out) {
15
15
  var parentPreserved = false;
16
16
 
17
17
  if (componentsContext) {
18
- parentPreserved = componentsContext.u_;
18
+ parentPreserved = componentsContext.v_;
19
19
  } else {
20
20
  componentsContext = getComponentsContext(out);
21
21
  }
22
22
 
23
- componentsContext.u_ = true;
23
+ componentsContext.v_ = true;
24
24
  input.renderBody(out);
25
- componentsContext.u_ = parentPreserved;
25
+ componentsContext.v_ = parentPreserved;
26
26
  } else {
27
27
  input.renderBody(out);
28
28
  }
@@ -10,8 +10,10 @@ window.addEventListener("message", function (ev) {
10
10
  }
11
11
  });
12
12
 
13
- exports.ab_ = function (callback) {
13
+ exports._i_ = function (callback) {
14
14
  if (queue.push(callback) === 1) {
15
15
  window.postMessage(msg, "*");
16
16
  }
17
- };
17
+ };
18
+
19
+ exports.e_ = require("./queueMicrotask");
@@ -1,2 +1,31 @@
1
- "use strict";exports.ab_ = setTimeout;
2
- exports.ac_ = clearTimeout;
1
+ "use strict";var queueMicrotask = require("./queueMicrotask");
2
+ var count = 0;
3
+ var queue = new Set();
4
+ function noop() {}
5
+
6
+ exports._i_ = function setImmediate(cb) {
7
+ queue.add(cb);
8
+ if (!count) {
9
+ queueMicrotaskInternal(noop);
10
+ }
11
+ return cb;
12
+ };
13
+
14
+ exports.ad_ = function clearImmediate(id) {
15
+ queue.delete(id);
16
+ };
17
+
18
+ exports.e_ = queueMicrotaskInternal;
19
+
20
+ function queueMicrotaskInternal(cb) {
21
+ count++;
22
+ queueMicrotask(function () {
23
+ if (--count === 0 && queue.size) {
24
+ for (const fn of queue) {
25
+ queueMicrotask(fn);
26
+ }
27
+ queue = new Set();
28
+ }
29
+ cb();
30
+ });
31
+ }
@@ -1,2 +1,3 @@
1
- "use strict";exports.ab_ = setImmediate;
2
- exports.ac_ = clearImmediate;
1
+ "use strict";exports._i_ = setImmediate;
2
+ exports.ad_ = clearImmediate;
3
+ exports.e_ = require("./queueMicrotask");
@@ -0,0 +1,8 @@
1
+ "use strict";var promise;
2
+ module.exports =
3
+ typeof queueMicrotask === "function" ?
4
+ queueMicrotask : (
5
+ promise = Promise.resolve(),
6
+ function (cb) {
7
+ promise.then(cb);
8
+ });
@@ -17,7 +17,7 @@ function getComponentDefs(result) {
17
17
  }
18
18
 
19
19
  function RenderResult(out) {
20
- this.out = this.q_ = out;
20
+ this.out = this.r_ = out;
21
21
  this.b_ = undefined;
22
22
  }
23
23
 
@@ -37,7 +37,7 @@ var proto = RenderResult.prototype = {
37
37
  var components = [];
38
38
 
39
39
  componentDefs.forEach(function (componentDef) {
40
- var component = componentDef.r_;
40
+ var component = componentDef.s_;
41
41
  if (!selector || selector(component)) {
42
42
  components.push(component);
43
43
  }
@@ -47,10 +47,10 @@ var proto = RenderResult.prototype = {
47
47
  },
48
48
 
49
49
  afterInsert: function (host) {
50
- var out = this.q_;
50
+ var out = this.r_;
51
51
  var componentsContext = out.b_;
52
52
  if (componentsContext) {
53
- this.b_ = componentsContext.ad_(host);
53
+ this.b_ = componentsContext.ae_(host);
54
54
  } else {
55
55
  this.b_ = null;
56
56
  }
@@ -58,13 +58,13 @@ var proto = RenderResult.prototype = {
58
58
  return this;
59
59
  },
60
60
  getNode: function (host) {
61
- return this.q_.ae_(host);
61
+ return this.r_.af_(host);
62
62
  },
63
63
  getOutput: function () {
64
- return this.q_.af_();
64
+ return this.r_.ag_();
65
65
  },
66
66
  toString: function () {
67
- return this.q_.toString();
67
+ return this.r_.toString();
68
68
  },
69
69
  document: typeof document === "object" && document
70
70
  };
@@ -89,7 +89,7 @@ Object.defineProperty(proto, "context", {
89
89
 
90
90
 
91
91
 
92
- return this.q_;
92
+ return this.r_;
93
93
  }
94
94
  });
95
95