@rindo/core 1.17.4 → 2.5.2

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 (164) hide show
  1. package/LICENSE.md +27 -27
  2. package/bin/cli.ts +20 -0
  3. package/bin/rindo +51 -56
  4. package/cli/index.cjs +1263 -0
  5. package/cli/index.d.ts +1 -1
  6. package/cli/index.js +1232 -495
  7. package/cli/package.json +9 -4
  8. package/compiler/lib.d.ts +24 -0
  9. package/compiler/lib.dom.d.ts +20230 -0
  10. package/compiler/lib.dom.iterable.d.ts +351 -0
  11. package/compiler/lib.es2015.collection.d.ts +89 -0
  12. package/compiler/lib.es2015.core.d.ts +517 -0
  13. package/compiler/lib.es2015.d.ts +30 -0
  14. package/compiler/lib.es2015.generator.d.ts +79 -0
  15. package/compiler/lib.es2015.iterable.d.ts +505 -0
  16. package/compiler/lib.es2015.promise.d.ts +150 -0
  17. package/compiler/lib.es2015.proxy.d.ts +41 -0
  18. package/compiler/lib.es2015.reflect.d.ts +123 -0
  19. package/compiler/lib.es2015.symbol.d.ts +48 -0
  20. package/compiler/lib.es2015.symbol.wellknown.d.ts +324 -0
  21. package/compiler/lib.es2016.array.include.d.ts +118 -0
  22. package/compiler/lib.es2016.d.ts +22 -0
  23. package/compiler/lib.es2016.full.d.ts +25 -0
  24. package/compiler/lib.es2017.d.ts +26 -0
  25. package/compiler/lib.es2017.full.d.ts +25 -0
  26. package/compiler/lib.es2017.intl.d.ts +32 -0
  27. package/compiler/lib.es2017.object.d.ts +51 -0
  28. package/compiler/lib.es2017.sharedmemory.d.ts +137 -0
  29. package/compiler/lib.es2017.string.d.ts +47 -0
  30. package/compiler/lib.es2017.typedarrays.d.ts +55 -0
  31. package/compiler/lib.es2018.asyncgenerator.d.ts +79 -0
  32. package/compiler/lib.es2018.asynciterable.d.ts +45 -0
  33. package/compiler/lib.es2018.d.ts +26 -0
  34. package/compiler/lib.es2018.full.d.ts +25 -0
  35. package/compiler/lib.es2018.intl.d.ts +61 -0
  36. package/compiler/lib.es2018.promise.d.ts +32 -0
  37. package/compiler/lib.es2018.regexp.d.ts +39 -0
  38. package/compiler/lib.es2019.array.d.ts +85 -0
  39. package/compiler/lib.es2019.d.ts +25 -0
  40. package/compiler/lib.es2019.full.d.ts +25 -0
  41. package/compiler/lib.es2019.object.d.ts +35 -0
  42. package/compiler/lib.es2019.string.d.ts +33 -0
  43. package/compiler/lib.es2019.symbol.d.ts +26 -0
  44. package/compiler/lib.es2020.bigint.d.ts +728 -0
  45. package/compiler/lib.es2020.d.ts +27 -0
  46. package/compiler/lib.es2020.full.d.ts +25 -0
  47. package/compiler/lib.es2020.intl.d.ts +310 -0
  48. package/compiler/lib.es2020.promise.d.ts +50 -0
  49. package/compiler/lib.es2020.sharedmemory.d.ts +99 -0
  50. package/compiler/lib.es2020.string.d.ts +30 -0
  51. package/compiler/lib.es2020.symbol.wellknown.d.ts +39 -0
  52. package/compiler/lib.es5.d.ts +4435 -0
  53. package/compiler/lib.es6.d.ts +25 -0
  54. package/compiler/lib.esnext.d.ts +25 -0
  55. package/compiler/lib.esnext.full.d.ts +25 -0
  56. package/compiler/lib.esnext.intl.d.ts +32 -0
  57. package/compiler/lib.esnext.promise.d.ts +43 -0
  58. package/compiler/lib.esnext.string.d.ts +35 -0
  59. package/compiler/lib.esnext.weakref.d.ts +75 -0
  60. package/compiler/lib.scripthost.d.ts +327 -0
  61. package/compiler/lib.webworker.d.ts +6042 -0
  62. package/compiler/lib.webworker.importscripts.d.ts +26 -0
  63. package/compiler/lib.webworker.iterable.d.ts +166 -0
  64. package/compiler/package.json +3 -3
  65. package/compiler/rindo.d.ts +0 -16
  66. package/compiler/rindo.js +42738 -40541
  67. package/compiler/rindo.min.js +2 -15
  68. package/dependencies.json +73 -50
  69. package/dev-server/client/index.js +33 -10
  70. package/dev-server/client/package.json +3 -3
  71. package/dev-server/connector.html +3 -3
  72. package/dev-server/index.d.ts +3 -6
  73. package/dev-server/index.js +256 -252
  74. package/dev-server/package.json +3 -3
  75. package/dev-server/server-process.js +1738 -0
  76. package/dev-server/server-worker-thread.js +39 -0
  77. package/dev-server/templates/initial-load.html +160 -160
  78. package/dev-server/ws.js +1 -1
  79. package/internal/app-data/{index.cjs.js → index.cjs} +7 -5
  80. package/internal/app-data/index.d.ts +1 -0
  81. package/internal/app-data/index.js +7 -6
  82. package/internal/app-data/package.json +11 -5
  83. package/internal/client/css-shim.js +2 -2
  84. package/internal/client/dom.js +1 -1
  85. package/internal/client/index.js +193 -119
  86. package/internal/client/package.json +4 -3
  87. package/internal/client/{patch.js → patch-browser.js} +8 -24
  88. package/internal/client/patch-esm.js +23 -0
  89. package/internal/client/polyfills/css-shim.js +1 -1
  90. package/internal/client/polyfills/index.js +34 -34
  91. package/internal/client/shadow-css.js +9 -3
  92. package/internal/hydrate/index.js +305 -281
  93. package/internal/hydrate/package.json +2 -2
  94. package/internal/hydrate/runner.d.ts +24 -12
  95. package/internal/hydrate/runner.js +153 -124
  96. package/internal/hydrate/shadow-css.js +24 -24
  97. package/internal/package.json +5 -4
  98. package/internal/rindo-core/index.cjs +1 -0
  99. package/internal/rindo-core/index.d.ts +51 -2
  100. package/internal/rindo-core/index.js +15 -1
  101. package/internal/rindo-ext-modules.d.ts +41 -39
  102. package/internal/rindo-private.d.ts +93 -148
  103. package/internal/rindo-public-compiler.d.ts +231 -155
  104. package/internal/rindo-public-runtime.d.ts +42 -39
  105. package/internal/testing/index.js +144 -121
  106. package/internal/testing/package.json +2 -2
  107. package/internal/testing/shadow-css.js +24 -24
  108. package/mock-doc/index.cjs +4610 -0
  109. package/mock-doc/index.d.ts +12 -1
  110. package/mock-doc/index.js +177 -67
  111. package/mock-doc/package.json +11 -5
  112. package/package.json +132 -133
  113. package/readme.md +21 -95
  114. package/screenshot/compare/build/app.js +33 -33
  115. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -1
  116. package/screenshot/connector-base.d.ts +1 -1
  117. package/screenshot/connector-local.d.ts +1 -1
  118. package/screenshot/index.js +63 -46
  119. package/screenshot/package.json +10 -3
  120. package/screenshot/pixel-match.js +54 -57
  121. package/screenshot/screenshot-compare.d.ts +1 -1
  122. package/screenshot/screenshot-fs.d.ts +1 -1
  123. package/sys/deno/index.js +1785 -0
  124. package/sys/deno/node-compat.js +2654 -0
  125. package/sys/deno/worker.js +44 -0
  126. package/sys/node/autoprefixer.js +8 -1
  127. package/sys/node/glob.js +1 -1
  128. package/sys/node/graceful-fs.js +1 -1
  129. package/sys/node/index.d.ts +1 -1
  130. package/sys/node/index.js +689 -705
  131. package/sys/node/node-fetch.js +1 -1
  132. package/sys/node/package.json +3 -3
  133. package/sys/node/prompts.js +1 -1
  134. package/sys/node/worker.js +38 -19
  135. package/testing/index.d.ts +3 -3
  136. package/testing/index.js +863 -749
  137. package/testing/jest/jest-config.d.ts +2 -89
  138. package/testing/jest/jest-environment.d.ts +1 -1
  139. package/testing/jest/jest-runner.d.ts +1 -1
  140. package/testing/jest/jest-screenshot.d.ts +1 -1
  141. package/testing/jest-preset.js +32 -32
  142. package/testing/matchers/events.d.ts +1 -1
  143. package/testing/matchers/screenshot.d.ts +1 -1
  144. package/testing/mock-fetch.d.ts +1 -1
  145. package/testing/mocks.d.ts +1 -1
  146. package/testing/package.json +3 -3
  147. package/testing/puppeteer/index.d.ts +1 -1
  148. package/testing/puppeteer/puppeteer-browser.d.ts +2 -2
  149. package/testing/puppeteer/puppeteer-declarations.d.ts +11 -11
  150. package/testing/puppeteer/puppeteer-element.d.ts +3 -3
  151. package/testing/puppeteer/puppeteer-emulate.d.ts +1 -1
  152. package/testing/puppeteer/puppeteer-events.d.ts +3 -3
  153. package/testing/puppeteer/puppeteer-page.d.ts +1 -1
  154. package/testing/puppeteer/puppeteer-screenshot.d.ts +2 -2
  155. package/testing/reset-build-conditionals.d.ts +1 -1
  156. package/testing/spec-page.d.ts +1 -1
  157. package/testing/test-transpile.d.ts +1 -1
  158. package/testing/testing-logger.d.ts +1 -1
  159. package/testing/testing-utils.d.ts +1 -1
  160. package/testing/testing.d.ts +1 -1
  161. package/cli/index.cjs.js +0 -524
  162. package/dev-server/content-type-db.json +0 -1
  163. package/dev-server/server-worker.js +0 -1570
  164. package/mock-doc/index.cjs.js +0 -4500
@@ -7,7 +7,7 @@ function readTask(e) {
7
7
  }
8
8
 
9
9
  function flushQueue() {
10
- return new Promise((e, t) => {
10
+ return new Promise(((e, t) => {
11
11
  process.nextTick((async function a() {
12
12
  try {
13
13
  if (queuedReadTasks.length > 0) {
@@ -28,14 +28,14 @@ function flushQueue() {
28
28
  }
29
29
  queuedReadTasks.length + queuedWriteTasks.length > 0 ? process.nextTick(a) : e();
30
30
  } catch (e) {
31
- t("flushQueue: " + e);
31
+ t(`flushQueue: ${e}`);
32
32
  }
33
33
  }));
34
- });
34
+ }));
35
35
  }
36
36
 
37
37
  async function flushAll() {
38
- for (;queuedTicks.length + queuedLoadModules.length + queuedWriteTasks.length + queuedReadTasks.length > 0; ) await new Promise((e, t) => {
38
+ for (;queuedTicks.length + queuedLoadModules.length + queuedWriteTasks.length + queuedReadTasks.length > 0; ) await new Promise(((e, t) => {
39
39
  process.nextTick((function a() {
40
40
  try {
41
41
  if (queuedTicks.length > 0) {
@@ -45,53 +45,60 @@ async function flushAll() {
45
45
  }
46
46
  queuedTicks.length > 0 ? process.nextTick(a) : e();
47
47
  } catch (e) {
48
- t("flushTicks: " + e);
48
+ t(`flushTicks: ${e}`);
49
49
  }
50
50
  }));
51
- }), await flushLoadModule(), await flushQueue();
51
+ })), await flushLoadModule(), await flushQueue();
52
52
  if (caughtErrors.length > 0) {
53
53
  const e = caughtErrors[0];
54
54
  if (null == e) throw new Error("Error!");
55
55
  if ("string" == typeof e) throw new Error(e);
56
56
  throw e;
57
57
  }
58
- return new Promise(e => process.nextTick(e));
58
+ return new Promise((e => process.nextTick(e)));
59
59
  }
60
60
 
61
61
  function loadModule(e, t, a) {
62
- return new Promise(t => {
62
+ return new Promise((t => {
63
63
  queuedLoadModules.push({
64
64
  bundleId: e.$lazyBundleId$,
65
65
  resolve: () => t(moduleLoaded.get(e.$lazyBundleId$))
66
66
  });
67
- });
67
+ }));
68
68
  }
69
69
 
70
70
  function flushLoadModule(e) {
71
- return new Promise((t, a) => {
71
+ return new Promise(((t, a) => {
72
72
  try {
73
- process.nextTick(() => {
73
+ process.nextTick((() => {
74
74
  if (null != e) for (let t = 0; t < queuedLoadModules.length; t++) queuedLoadModules[t].bundleId === e && (queuedLoadModules[t].resolve(),
75
75
  queuedLoadModules.splice(t, 1), t--); else {
76
76
  let e;
77
77
  for (;e = queuedLoadModules.shift(); ) e.resolve();
78
78
  }
79
79
  t();
80
- });
80
+ }));
81
81
  } catch (e) {
82
- a("flushLoadModule: " + e);
82
+ a(`flushLoadModule: ${e}`);
83
83
  }
84
- });
84
+ }));
85
85
  }
86
86
 
87
87
  function stopAutoApplyChanges() {
88
88
  isAutoApplyingChanges = !1, autoApplyTimer && (clearTimeout(autoApplyTimer), autoApplyTimer = void 0);
89
89
  }
90
90
 
91
- const mockDoc = require("@rindo/core/mock-doc"), appData = require("@rindo/core/internal/app-data"), styles = new Map, modeResolutionChain = [], cstrs = new Map, queuedTicks = [], queuedWriteTasks = [], queuedReadTasks = [], moduleLoaded = new Map, queuedLoadModules = [], caughtErrors = [], hostRefs = new Map, consoleError = e => {
91
+ const appData = require("@rindo/core/internal/app-data"), mockDoc = require("@rindo/core/mock-doc"), styles = new Map, modeResolutionChain = [], cstrs = new Map, queuedTicks = [], queuedWriteTasks = [], queuedReadTasks = [], moduleLoaded = new Map, queuedLoadModules = [], caughtErrors = [], hostRefs = new Map;
92
+
93
+ let customError;
94
+
95
+ const defaultConsoleError = e => {
92
96
  caughtErrors.push(e);
93
- }, consoleDevError = (...e) => {
97
+ }, consoleError = (e, t) => (customError || defaultConsoleError)(e, t), consoleDevError = (...e) => {
94
98
  caughtErrors.push(new Error(e.join(", ")));
99
+ }, consoleDevWarn = (...e) => {
100
+ const t = e.filter((e => "string" == typeof e || "number" == typeof e || "boolean" == typeof e));
101
+ console.warn.apply(console, t);
95
102
  }, nextTick = e => {
96
103
  queuedTicks.push(e);
97
104
  }, win = mockDoc.setupGlobal(global), doc = win.document;
@@ -108,7 +115,7 @@ const plt = {
108
115
  ce: (e, t) => new win.CustomEvent(e, t)
109
116
  }, Context = {};
110
117
 
111
- let isAutoApplyingChanges = !1, autoApplyTimer = void 0;
118
+ let autoApplyTimer, isAutoApplyingChanges = !1;
112
119
 
113
120
  const isMemberInElement = (e, t) => {
114
121
  if (null != e) {
@@ -116,19 +123,23 @@ const isMemberInElement = (e, t) => {
116
123
  const a = e.nodeName;
117
124
  if (a) {
118
125
  const e = cstrs.get(a.toLowerCase());
119
- if (null != e && null != e.COMPILER_META && null != e.COMPILER_META.properties) return e.COMPILER_META.properties.some(e => e.name === t);
126
+ if (null != e && null != e.COMPILER_META && null != e.COMPILER_META.properties) return e.COMPILER_META.properties.some((e => e.name === t));
120
127
  }
121
128
  }
122
129
  return !1;
123
130
  }, addHostEventListeners = (e, t, a, o) => {
124
- appData.BUILD.hostListener && a && (appData.BUILD.hostListenerTargetParent && (a = o ? a.filter(([e]) => 16 & e) : a.filter(([e]) => !(16 & e))),
125
- a.map(([a, o, s]) => {
131
+ appData.BUILD.hostListener && a && (appData.BUILD.hostListenerTargetParent && (a = o ? a.filter((([e]) => 32 & e)) : a.filter((([e]) => !(32 & e)))),
132
+ a.map((([a, o, s]) => {
126
133
  const n = appData.BUILD.hostListenerTarget ? getHostListenerTarget(e, a) : e, l = hostListenerProxy(t, s), r = hostListenerOpts(a);
127
- plt.ael(n, o, l, r), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => plt.rel(n, o, l, r));
128
- }));
134
+ plt.ael(n, o, l, r), (t.$rmListeners$ = t.$rmListeners$ || []).push((() => plt.rel(n, o, l, r)));
135
+ })));
129
136
  }, hostListenerProxy = (e, t) => a => {
130
- appData.BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](a) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, a ]) : e.$hostElement$[t](a);
131
- }, getHostListenerTarget = (e, t) => appData.BUILD.hostListenerTargetDocument && 4 & t ? doc : appData.BUILD.hostListenerTargetWindow && 8 & t ? win : appData.BUILD.hostListenerTargetBody && 32 & t ? doc.body : appData.BUILD.hostListenerTargetParent && 16 & t ? e.parentElement : e, hostListenerOpts = e => ({
137
+ try {
138
+ appData.BUILD.lazyLoad ? 256 & e.$flags$ ? e.$lazyInstance$[t](a) : (e.$queuedListeners$ = e.$queuedListeners$ || []).push([ t, a ]) : e.$hostElement$[t](a);
139
+ } catch (e) {
140
+ consoleError(e);
141
+ }
142
+ }, getHostListenerTarget = (e, t) => appData.BUILD.hostListenerTargetDocument && 4 & t ? doc : appData.BUILD.hostListenerTargetWindow && 8 & t ? win : appData.BUILD.hostListenerTargetBody && 16 & t ? doc.body : appData.BUILD.hostListenerTargetParent && 32 & t ? e.parentElement : e, hostListenerOpts = e => ({
132
143
  passive: 0 != (1 & e),
133
144
  capture: 0 != (2 & e)
134
145
  }), XLINK_NS = "http://www.w3.org/1999/xlink";
@@ -169,8 +180,7 @@ const createTime = (e, t = "") => {
169
180
  (appData.BUILD.shadowDom || appData.BUILD.scoped) && appData.BUILD.cssAnnotations && 10 & o && (a["s-sc"] = n,
170
181
  a.classList.add(n + "-h"), appData.BUILD.scoped && 2 & o && a.classList.add(n + "-s")),
171
182
  s();
172
- }, getScopeId = (e, t) => "sc-" + (appData.BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), computeMode = e => modeResolutionChain.map(t => t(e)).find(e => !!e), EMPTY_OBJ = {}, IS_NODE_ENV = !("undefined" == typeof global || "function" != typeof require || !global.process || "string" != typeof __filename || global.origin && "string" == typeof global.origin), isComplexType = (global.process.platform,
173
- IS_NODE_ENV && global.process.platform, process.cwd, process.exit, e => "object" == (e = typeof e) || "function" === e), h = (e, t, ...a) => {
183
+ }, getScopeId = (e, t) => "sc-" + (appData.BUILD.mode && t && 32 & e.$flags$ ? e.$tagName$ + "-" + t : e.$tagName$), computeMode = e => modeResolutionChain.map((t => t(e))).find((e => !!e)), EMPTY_OBJ = {}, isComplexType = e => "object" == (e = typeof e) || "function" === e, h = (e, t, ...a) => {
174
184
  let o = null, s = null, n = null, l = !1, r = !1, p = [];
175
185
  const i = t => {
176
186
  for (let a = 0; a < t.length; a++) o = t[a], Array.isArray(o) ? i(o) : null != o && "boolean" != typeof o && ((l = "function" != typeof e && !isComplexType(o)) ? o = String(o) : appData.BUILD.isDev && "function" != typeof e && void 0 === o.$flags$ && consoleDevError("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects."),
@@ -180,7 +190,7 @@ IS_NODE_ENV && global.process.platform, process.cwd, process.exit, e => "object"
180
190
  appData.BUILD.vdomKey && t.key && (s = t.key), appData.BUILD.slotRelocation && t.name && (n = t.name),
181
191
  appData.BUILD.vdomClass)) {
182
192
  const e = t.className || t.class;
183
- e && (t.class = "object" != typeof e ? e : Object.keys(e).filter(t => e[t]).join(" "));
193
+ e && (t.class = "object" != typeof e ? e : Object.keys(e).filter((t => e[t])).join(" "));
184
194
  }
185
195
  if (appData.BUILD.isDev && p.some(isHost) && consoleDevError("The <Host> must be the single root component. Make sure:\n- You are NOT using hostData() and <Host> in the same component.\n- <Host> is used once, and it's the single root component of the render() function."),
186
196
  appData.BUILD.vdomFunctional && "function" == typeof e) return e(null === t ? {} : t, p, vdomFnUtils);
@@ -209,21 +219,23 @@ IS_NODE_ENV && global.process.platform, process.cwd, process.exit, e => "object"
209
219
  vtext: e.$text$
210
220
  }), convertToPrivate = e => {
211
221
  if ("function" == typeof e.vtag) {
212
- const t = Object.assign({}, e.vattrs);
222
+ const t = {
223
+ ...e.vattrs
224
+ };
213
225
  return e.vkey && (t.key = e.vkey), e.vname && (t.name = e.vname), h(e.vtag, t, ...e.vchildren || []);
214
226
  }
215
227
  const t = newVNode(e.vtag, e.vtext);
216
228
  return t.$attrs$ = e.vattrs, t.$children$ = e.vchildren, t.$key$ = e.vkey, t.$name$ = e.vname,
217
229
  t;
218
230
  }, validateInputProperties = e => {
219
- const t = Object.keys(e);
220
- t.indexOf("type"), t.indexOf("min"), t.indexOf("max"), t.indexOf("min"), t.indexOf("value");
231
+ const t = Object.keys(e), a = t.indexOf("type"), o = t.indexOf("min"), s = t.indexOf("max"), n = t.indexOf("min"), l = t.indexOf("value");
232
+ -1 !== l && (l < a || l < o || l < s || l < n) && consoleDevWarn('The "value" prop of <input> should be set after "min", "max", "type" and "step"');
221
233
  }, setAccessor = (e, t, a, o, s, n) => {
222
234
  if (a !== o) {
223
235
  let l = isMemberInElement(e, t), r = t.toLowerCase();
224
236
  if (appData.BUILD.vdomClass && "class" === t) {
225
237
  const t = e.classList, s = parseClassList(a), n = parseClassList(o);
226
- t.remove(...s.filter(e => e && !n.includes(e))), t.add(...n.filter(e => e && !s.includes(e)));
238
+ t.remove(...s.filter((e => e && !n.includes(e)))), t.add(...n.filter((e => e && !s.includes(e))));
227
239
  } else if (appData.BUILD.vdomStyle && "style" === t) {
228
240
  if (appData.BUILD.updatable) for (const t in a) o && null != o[t] || (!appData.BUILD.hydrateServerSide && t.includes("-") ? e.style.removeProperty(t) : e.style[t] = "");
229
241
  for (const t in o) a && o[t] === a[t] || (!appData.BUILD.hydrateServerSide && t.includes("-") ? e.style.setProperty(t, o[t]) : e.style[t] = o[t]);
@@ -256,7 +268,7 @@ const createElm = (e, t, a, o) => {
256
268
  let s, n, l, r = t.$children$[a], p = 0;
257
269
  if (appData.BUILD.slotRelocation && !useNativeShadowDom && (checkSlotRelocate = !0,
258
270
  "slot" === r.$tag$ && (scopeId && o.classList.add(scopeId + "-s"), r.$flags$ |= r.$children$ ? 2 : 1)),
259
- appData.BUILD.isDev && r.$elm$ && consoleError(`The JSX ${null !== r.$text$ ? `"${r.$text$}" text` : `"${r.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://rindojs.web.app/docs/templating-jsx#avoid-shared-jsx-nodes`),
271
+ appData.BUILD.isDev && r.$elm$ && consoleDevError(`The JSX ${null !== r.$text$ ? `"${r.$text$}" text` : `"${r.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://rindojs.web.app/docs/templating-jsx#avoid-shared-jsx-nodes`),
260
272
  appData.BUILD.vdomText && null !== r.$text$) s = r.$elm$ = doc.createTextNode(r.$text$); else if (appData.BUILD.slotRelocation && 1 & r.$flags$) s = r.$elm$ = appData.BUILD.isDebug || appData.BUILD.hydrateServerSide ? slotReferenceDebugNode(r) : doc.createTextNode(""); else {
261
273
  if (appData.BUILD.svg && !isSvgMode && (isSvgMode = "svg" === r.$tag$), s = r.$elm$ = appData.BUILD.svg ? doc.createElementNS(isSvgMode ? "http://www.w3.org/2000/svg" : "http://www.w3.org/1999/xhtml", appData.BUILD.slotRelocation && 2 & r.$flags$ ? "slot-fb" : r.$tag$) : doc.createElement(appData.BUILD.slotRelocation && 2 & r.$flags$ ? "slot-fb" : r.$tag$),
262
274
  appData.BUILD.svg && isSvgMode && "foreignObject" === r.$tag$ && (isSvgMode = !1),
@@ -311,8 +323,8 @@ const createElm = (e, t, a, o) => {
311
323
  }, updateFallbackSlotVisibility = e => {
312
324
  let t, a, o, s, n, l, r = e.childNodes;
313
325
  for (a = 0, o = r.length; a < o; a++) if (t = r[a], 1 === t.nodeType) {
314
- if (t["s-sr"]) for (n = t["s-sn"], t.hidden = !1, s = 0; s < o; s++) if (r[s]["s-hn"] !== t["s-hn"]) if (l = r[s].nodeType,
315
- "" !== n) {
326
+ if (t["s-sr"]) for (n = t["s-sn"], t.hidden = !1, s = 0; s < o; s++) if (l = r[s].nodeType,
327
+ r[s]["s-hn"] !== t["s-hn"] || "" !== n) {
316
328
  if (1 === l && n === r[s].getAttribute("slot")) {
317
329
  t.hidden = !0;
318
330
  break;
@@ -326,15 +338,15 @@ const createElm = (e, t, a, o) => {
326
338
  }, relocateNodes = [], relocateSlotContent = e => {
327
339
  let t, a, o, s, n, l, r = 0, p = e.childNodes, i = p.length;
328
340
  for (;r < i; r++) {
329
- if (t = p[r], t["s-sr"] && (a = t["s-cr"])) for (o = a.parentNode.childNodes, s = t["s-sn"],
330
- l = o.length - 1; l >= 0; l--) a = o[l], a["s-cn"] || a["s-nr"] || a["s-hn"] === t["s-hn"] || (isNodeLocatedInSlot(a, s) ? (n = relocateNodes.find(e => e.$nodeToRelocate$ === a),
341
+ if (t = p[r], t["s-sr"] && (a = t["s-cr"]) && a.parentNode) for (o = a.parentNode.childNodes,
342
+ s = t["s-sn"], l = o.length - 1; l >= 0; l--) a = o[l], a["s-cn"] || a["s-nr"] || a["s-hn"] === t["s-hn"] || (isNodeLocatedInSlot(a, s) ? (n = relocateNodes.find((e => e.$nodeToRelocate$ === a)),
331
343
  checkSlotFallbackVisibility = !0, a["s-sn"] = a["s-sn"] || s, n ? n.$slotRefNode$ = t : relocateNodes.push({
332
344
  $slotRefNode$: t,
333
345
  $nodeToRelocate$: a
334
- }), a["s-sr"] && relocateNodes.map(e => {
335
- isNodeLocatedInSlot(e.$nodeToRelocate$, a["s-sn"]) && (n = relocateNodes.find(e => e.$nodeToRelocate$ === a),
346
+ }), a["s-sr"] && relocateNodes.map((e => {
347
+ isNodeLocatedInSlot(e.$nodeToRelocate$, a["s-sn"]) && (n = relocateNodes.find((e => e.$nodeToRelocate$ === a)),
336
348
  n && !e.$slotRefNode$ && (e.$slotRefNode$ = n.$slotRefNode$));
337
- })) : relocateNodes.some(e => e.$nodeToRelocate$ === a) || relocateNodes.push({
349
+ }))) : relocateNodes.some((e => e.$nodeToRelocate$ === a)) || relocateNodes.push({
338
350
  $nodeToRelocate$: a
339
351
  }));
340
352
  1 === t.nodeType && relocateSlotContent(t);
@@ -345,7 +357,7 @@ const createElm = (e, t, a, o) => {
345
357
  const a = e.$hostElement$, o = e.$cmpMeta$, s = e.$vnode$ || newVNode(null, null), n = isHost(t) ? t : h(null, null, t);
346
358
  if (hostTagName = a.tagName, appData.BUILD.isDev && Array.isArray(t) && t.some(isHost)) throw new Error(`The <Host> must be the single root component.\nLooks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n `);
347
359
  if (appData.BUILD.reflect && o.$attrsToReflect$ && (n.$attrs$ = n.$attrs$ || {},
348
- o.$attrsToReflect$.map(([e, t]) => n.$attrs$[t] = a[e])), n.$tag$ = null, n.$flags$ |= 4,
360
+ o.$attrsToReflect$.map((([e, t]) => n.$attrs$[t] = a[e]))), n.$tag$ = null, n.$flags$ |= 4,
349
361
  e.$vnode$ = n, n.$elm$ = s.$elm$ = appData.BUILD.shadowDom && a.shadowRoot || a,
350
362
  (appData.BUILD.scoped || appData.BUILD.shadowDom) && (scopeId = a["s-sc"]), appData.BUILD.slotRelocation && (contentRef = a["s-cr"],
351
363
  useNativeShadowDom = exports.supportsShadow && 0 != (1 & o.$flags$), checkSlotFallbackVisibility = !1),
@@ -375,34 +387,34 @@ const createElm = (e, t, a, o) => {
375
387
  const o = plt.ce(t, a);
376
388
  return e.dispatchEvent(o), o;
377
389
  }, attachToAncestor = (e, t) => {
378
- appData.BUILD.asyncLoading && t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise(t => e.$onRenderResolve$ = t));
390
+ appData.BUILD.asyncLoading && t && !e.$onRenderResolve$ && t["s-p"] && t["s-p"].push(new Promise((t => e.$onRenderResolve$ = t)));
379
391
  }, scheduleUpdate = (e, t) => {
380
392
  if (appData.BUILD.taskQueue && appData.BUILD.updatable && (e.$flags$ |= 16), appData.BUILD.asyncLoading && 4 & e.$flags$) return void (e.$flags$ |= 512);
381
393
  attachToAncestor(e, e.$ancestorComponent$);
382
394
  const a = () => dispatchHooks(e, t);
383
- return appData.BUILD.taskQueue ? writeTask(a) : a;
395
+ return appData.BUILD.taskQueue ? writeTask(a) : a();
384
396
  }, dispatchHooks = (e, t) => {
385
397
  const a = e.$hostElement$, o = createTime("scheduleUpdate", e.$cmpMeta$.$tagName$), s = appData.BUILD.lazyLoad ? e.$lazyInstance$ : a;
386
398
  let n;
387
399
  return t ? (appData.BUILD.lazyLoad && appData.BUILD.hostListener && (e.$flags$ |= 256,
388
- e.$queuedListeners$ && (e.$queuedListeners$.map(([e, t]) => safeCall(s, e, t)),
400
+ e.$queuedListeners$ && (e.$queuedListeners$.map((([e, t]) => safeCall(s, e, t))),
389
401
  e.$queuedListeners$ = null)), emitLifecycleEvent(a, "componentWillLoad"), appData.BUILD.cmpWillLoad && (n = safeCall(s, "componentWillLoad"))) : (emitLifecycleEvent(a, "componentWillUpdate"),
390
402
  appData.BUILD.cmpWillUpdate && (n = safeCall(s, "componentWillUpdate"))), emitLifecycleEvent(a, "componentWillRender"),
391
- appData.BUILD.cmpWillRender && (n = then(n, () => safeCall(s, "componentWillRender"))),
392
- o(), then(n, () => updateComponent(e, s, t));
393
- }, updateComponent = (e, t, a) => {
403
+ appData.BUILD.cmpWillRender && (n = then(n, (() => safeCall(s, "componentWillRender")))),
404
+ o(), then(n, (() => updateComponent(e, s, t)));
405
+ }, updateComponent = async (e, t, a) => {
394
406
  const o = e.$hostElement$, s = createTime("update", e.$cmpMeta$.$tagName$), n = o["s-rc"];
395
407
  appData.BUILD.style && a && attachStyles(e);
396
408
  const l = createTime("render", e.$cmpMeta$.$tagName$);
397
- if (appData.BUILD.isDev && (e.$flags$ |= 1024), (appData.BUILD.hasRenderFn || appData.BUILD.reflect) && (appData.BUILD.vdomRender || appData.BUILD.reflect ? renderVdom(e, callRender(e, t)) : o.textContent = callRender(e, t)),
409
+ if (appData.BUILD.isDev && (e.$flags$ |= 1024), appData.BUILD.hydrateServerSide ? await callRender(e, t, o) : callRender(e, t, o),
398
410
  appData.BUILD.cssVarShim && plt.$cssShim$ && plt.$cssShim$.updateHost(o), appData.BUILD.isDev && (e.$renderCount$++,
399
411
  e.$flags$ &= -1025), appData.BUILD.hydrateServerSide) try {
400
412
  serverSideConnected(o), a && (1 & e.$cmpMeta$.$flags$ ? o["s-en"] = "" : 2 & e.$cmpMeta$.$flags$ && (o["s-en"] = "c"));
401
413
  } catch (e) {
402
- consoleError(e);
414
+ consoleError(e, o);
403
415
  }
404
- if (appData.BUILD.asyncLoading && n && (n.map(e => e()), o["s-rc"] = void 0), l(),
405
- s(), appData.BUILD.asyncLoading) {
416
+ if (appData.BUILD.asyncLoading && n && (n.map((e => e())), o["s-rc"] = void 0),
417
+ l(), s(), appData.BUILD.asyncLoading) {
406
418
  const t = o["s-p"], a = () => postUpdateComponent(e);
407
419
  0 === t.length ? a() : (Promise.all(t).then(a), e.$flags$ |= 4, t.length = 0);
408
420
  } else postUpdateComponent(e);
@@ -410,15 +422,18 @@ const createElm = (e, t, a, o) => {
410
422
 
411
423
  let renderingRef = null;
412
424
 
413
- const callRender = (e, t) => {
414
- const a = !!appData.BUILD.allRenderFn, o = !!appData.BUILD.lazyLoad, s = !!appData.BUILD.taskQueue, n = !!appData.BUILD.updatable;
425
+ const callRender = (e, t, a) => {
426
+ const o = !!appData.BUILD.allRenderFn, s = !!appData.BUILD.lazyLoad, n = !!appData.BUILD.taskQueue, l = !!appData.BUILD.updatable;
415
427
  try {
416
- renderingRef = t, t = (a || t.render) && t.render(), n && s && (e.$flags$ &= -17),
417
- (n || o) && (e.$flags$ |= 2);
418
- } catch (e) {
419
- consoleError(e);
428
+ if (renderingRef = t, t = (o || t.render) && t.render(), l && n && (e.$flags$ &= -17),
429
+ (l || s) && (e.$flags$ |= 2), appData.BUILD.hasRenderFn || appData.BUILD.reflect) if (appData.BUILD.vdomRender || appData.BUILD.reflect) {
430
+ if (appData.BUILD.hydrateServerSide) return Promise.resolve(t).then((t => renderVdom(e, t)));
431
+ renderVdom(e, t);
432
+ } else a.textContent = t;
433
+ } catch (t) {
434
+ consoleError(t, e.$hostElement$);
420
435
  }
421
- return renderingRef = null, t;
436
+ return renderingRef = null, null;
422
437
  }, postUpdateComponent = e => {
423
438
  const t = e.$cmpMeta$.$tagName$, a = e.$hostElement$, o = createTime("postUpdate", t), s = appData.BUILD.lazyLoad ? e.$lazyInstance$ : a, n = e.$ancestorComponent$;
424
439
  appData.BUILD.cmpDidRender && (appData.BUILD.isDev && (e.$flags$ |= 1024), safeCall(s, "componentDidRender"),
@@ -431,7 +446,7 @@ const callRender = (e, t) => {
431
446
  o(), appData.BUILD.asyncLoading && (e.$onReadyResolve$(a), n || appDidLoad(t))),
432
447
  appData.BUILD.hotModuleReplacement && a["s-hmr-load"] && a["s-hmr-load"](), appData.BUILD.method && appData.BUILD.lazyLoad && e.$onInstanceResolve$(a),
433
448
  appData.BUILD.asyncLoading && (e.$onRenderResolve$ && (e.$onRenderResolve$(), e.$onRenderResolve$ = void 0),
434
- 512 & e.$flags$ && nextTick(() => scheduleUpdate(e, !1)), e.$flags$ &= -517);
449
+ 512 & e.$flags$ && nextTick((() => scheduleUpdate(e, !1))), e.$flags$ &= -517);
435
450
  }, forceUpdate = e => {
436
451
  if (appData.BUILD.updatable) {
437
452
  const t = getHostRef(e), a = t.$hostElement$.isConnected;
@@ -440,11 +455,11 @@ const callRender = (e, t) => {
440
455
  return !1;
441
456
  }, appDidLoad = e => {
442
457
  appData.BUILD.cssAnnotations && addHydratedFlag(doc.documentElement), appData.BUILD.asyncQueue && (plt.$flags$ |= 2),
443
- nextTick(() => emitEvent(win, "appload", {
458
+ nextTick((() => emitEvent(win, "appload", {
444
459
  detail: {
445
460
  namespace: appData.NAMESPACE
446
461
  }
447
- })), appData.BUILD.profile && performance.measure && performance.measure(`[Rindo] ${appData.NAMESPACE} initial load (by ${e})`, "st:app:start");
462
+ }))), appData.BUILD.profile && performance.measure && performance.measure(`[Rindo] ${appData.NAMESPACE} initial load (by ${e})`, "st:app:start");
448
463
  }, safeCall = (e, t, a) => {
449
464
  if (e && e[t]) try {
450
465
  return e[t](a);
@@ -521,16 +536,17 @@ const callRender = (e, t) => {
521
536
  }, parsePropertyValue = (e, t) => null == e || isComplexType(e) ? e : appData.BUILD.propBoolean && 4 & t ? "false" !== e && ("" === e || !!e) : appData.BUILD.propNumber && 2 & t ? parseFloat(e) : appData.BUILD.propString && 1 & t ? String(e) : e, getValue = (e, t) => getHostRef(e).$instanceValues$.get(t), setValue = (e, t, a, o) => {
522
537
  const s = getHostRef(e), n = appData.BUILD.lazyLoad ? s.$hostElement$ : e, l = s.$instanceValues$.get(t), r = s.$flags$, p = appData.BUILD.lazyLoad ? s.$lazyInstance$ : n;
523
538
  if (a = parsePropertyValue(a, o.$members$[t][0]), !(appData.BUILD.lazyLoad && 8 & r && void 0 !== l || a === l) && (s.$instanceValues$.set(t, a),
524
- appData.BUILD.isDev && (1024 & s.$flags$ || s.$flags$), !appData.BUILD.lazyLoad || p)) {
539
+ appData.BUILD.isDev && (1024 & s.$flags$ ? consoleDevWarn(`The state/prop "${t}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`, "\nElement", n, "\nNew value", a, "\nOld value", l) : 2048 & s.$flags$ && consoleDevWarn(`The state/prop "${t}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`, "\nElement", n, "\nNew value", a, "\nOld value", l)),
540
+ !appData.BUILD.lazyLoad || p)) {
525
541
  if (appData.BUILD.watchCallback && o.$watchers$ && 128 & r) {
526
542
  const e = o.$watchers$[t];
527
- e && e.map(e => {
543
+ e && e.map((e => {
528
544
  try {
529
545
  p[e](a, l, t);
530
546
  } catch (e) {
531
- consoleError(e);
547
+ consoleError(e, n);
532
548
  }
533
- });
549
+ }));
534
550
  }
535
551
  if (appData.BUILD.updatable && 2 == (18 & r)) {
536
552
  if (appData.BUILD.cmpShouldUpdate && p.componentShouldUpdate && !1 === p.componentShouldUpdate(a, l, t)) return;
@@ -541,34 +557,38 @@ const callRender = (e, t) => {
541
557
  if (appData.BUILD.member && t.$members$) {
542
558
  appData.BUILD.watchCallback && e.watchers && (t.$watchers$ = e.watchers);
543
559
  const o = Object.entries(t.$members$), s = e.prototype;
544
- if (o.map(([e, [o]]) => {
560
+ if (o.map((([e, [o]]) => {
545
561
  (appData.BUILD.prop || appData.BUILD.state) && (31 & o || (!appData.BUILD.lazyLoad || 2 & a) && 32 & o) ? Object.defineProperty(s, e, {
546
562
  get() {
547
563
  return getValue(this, e);
548
564
  },
549
565
  set(s) {
550
- appData.BUILD.isDev && 0 == (1 & a) && 31 == (1055 & o) && t.$tagName$, setValue(this, e, s, t);
566
+ if (appData.BUILD.isDev) {
567
+ const s = getHostRef(this);
568
+ 0 == (1 & a) && 0 == (8 & s.$flags$) && 0 != (31 & o) && 0 == (1024 & o) && consoleDevWarn(`@Prop() "${e}" on <${t.$tagName$}> is immutable but was modified from within the component.\nMore information: https://rindojs.web.app/docs/properties#prop-mutability`);
569
+ }
570
+ setValue(this, e, s, t);
551
571
  },
552
572
  configurable: !0,
553
573
  enumerable: !0
554
574
  }) : appData.BUILD.lazyLoad && appData.BUILD.method && 1 & a && 64 & o && Object.defineProperty(s, e, {
555
575
  value(...t) {
556
576
  const a = getHostRef(this);
557
- return a.$onInstancePromise$.then(() => a.$lazyInstance$[e](...t));
577
+ return a.$onInstancePromise$.then((() => a.$lazyInstance$[e](...t)));
558
578
  }
559
579
  });
560
- }), appData.BUILD.observeAttribute && (!appData.BUILD.lazyLoad || 1 & a)) {
580
+ })), appData.BUILD.observeAttribute && (!appData.BUILD.lazyLoad || 1 & a)) {
561
581
  const a = new Map;
562
582
  s.attributeChangedCallback = function(e, t, o) {
563
- plt.jmp(() => {
583
+ plt.jmp((() => {
564
584
  const t = a.get(e);
565
585
  this[t] = (null !== o || "boolean" != typeof this[t]) && o;
566
- });
567
- }, e.observedAttributes = o.filter(([e, t]) => 15 & t[0]).map(([e, o]) => {
586
+ }));
587
+ }, e.observedAttributes = o.filter((([e, t]) => 15 & t[0])).map((([e, o]) => {
568
588
  const s = o[1] || e;
569
589
  return a.set(s, e), appData.BUILD.reflect && 512 & o[0] && t.$attrsToReflect$.push([ e, s ]),
570
590
  s;
571
- });
591
+ }));
572
592
  }
573
593
  }
574
594
  return e;
@@ -605,7 +625,7 @@ const callRender = (e, t) => {
605
625
  const e = createTime("registerStyles", a.$tagName$);
606
626
  !appData.BUILD.hydrateServerSide && appData.BUILD.shadowDom && appData.BUILD.shadowDomShim && 8 & a.$flags$ && (o = await Promise.resolve().then((function() {
607
627
  return require("./shadow-css.js");
608
- })).then(e => e.scopeCss(o, n, !1))), registerStyle(n, o, a.$flags$), e();
628
+ })).then((e => e.scopeCss(o, n, !1)))), registerStyle(n, o, a.$flags$), e();
609
629
  }
610
630
  }
611
631
  }
@@ -629,13 +649,13 @@ const callRender = (e, t) => {
629
649
  ((e, t, a, o) => {
630
650
  const s = createTime("hydrateClient", t), n = e.shadowRoot, l = [], r = appData.BUILD.shadowDom && n ? [] : null, p = o.$vnode$ = newVNode(t, null);
631
651
  plt.$orgLocNodes$ || initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = new Map),
632
- e["s-id"] = a, e.removeAttribute("s-id"), clientHydrate(p, l, [], r, e, e, a), l.map(e => {
652
+ e["s-id"] = a, e.removeAttribute("s-id"), clientHydrate(p, l, [], r, e, e, a), l.map((e => {
633
653
  const a = e.$hostId$ + "." + e.$nodeId$, o = plt.$orgLocNodes$.get(a), s = e.$elm$;
634
654
  o && exports.supportsShadow && "" === o["s-en"] && o.parentNode.insertBefore(s, o.nextSibling),
635
655
  n || (s["s-hn"] = t, o && (s["s-ol"] = o, s["s-ol"]["s-nr"] = s)), plt.$orgLocNodes$.delete(a);
636
- }), appData.BUILD.shadowDom && n && r.map(e => {
656
+ })), appData.BUILD.shadowDom && n && r.map((e => {
637
657
  e && n.appendChild(e);
638
- }), s();
658
+ })), s();
639
659
  })(e, a.$tagName$, o, t);
640
660
  }
641
661
  if (appData.BUILD.slotRelocation && !o && (appData.BUILD.hydrateServerSide || (appData.BUILD.slot || appData.BUILD.shadowDom) && 12 & a.$flags$) && setContentReference(e),
@@ -646,12 +666,12 @@ const callRender = (e, t) => {
646
666
  break;
647
667
  }
648
668
  }
649
- appData.BUILD.prop && appData.BUILD.lazyLoad && !appData.BUILD.hydrateServerSide && a.$members$ && Object.entries(a.$members$).map(([t, [a]]) => {
669
+ appData.BUILD.prop && appData.BUILD.lazyLoad && !appData.BUILD.hydrateServerSide && a.$members$ && Object.entries(a.$members$).map((([t, [a]]) => {
650
670
  if (31 & a && e.hasOwnProperty(t)) {
651
671
  const a = e[t];
652
672
  delete e[t], e[t] = a;
653
673
  }
654
- }), appData.BUILD.initializeNextTick ? nextTick(() => initializeComponent(e, t, a)) : initializeComponent(e, t, a);
674
+ })), appData.BUILD.initializeNextTick ? nextTick((() => initializeComponent(e, t, a))) : initializeComponent(e, t, a);
655
675
  }
656
676
  o();
657
677
  }
@@ -661,7 +681,7 @@ const callRender = (e, t) => {
661
681
  }, disconnectedCallback = e => {
662
682
  if (0 == (1 & plt.$flags$)) {
663
683
  const t = getHostRef(e), a = appData.BUILD.lazyLoad ? t.$lazyInstance$ : e;
664
- appData.BUILD.hostListener && t.$rmListeners$ && (t.$rmListeners$.map(e => e()),
684
+ appData.BUILD.hostListener && t.$rmListeners$ && (t.$rmListeners$.map((e => e())),
665
685
  t.$rmListeners$ = void 0), appData.BUILD.cssVarShim && plt.$cssShim$ && plt.$cssShim$.removeHost(e),
666
686
  appData.BUILD.lazyLoad && appData.BUILD.disconnectedCallback && safeCall(a, "disconnectedCallback"),
667
687
  appData.BUILD.cmpDidUnload && safeCall(a, "componentDidUnload");
@@ -692,7 +712,7 @@ const callRender = (e, t) => {
692
712
  const a = this, o = !!appData.BUILD.shadowDom && a.shadowRoot && exports.supportsShadow, s = t.call(a, !!o && e);
693
713
  if (appData.BUILD.slot && !o && e) {
694
714
  let e, t, o = 0, n = [ "s-id", "s-cr", "s-lr", "s-rc", "s-sc", "s-p", "s-cn", "s-sr", "s-sn", "s-hn", "s-ol", "s-nr", "s-si" ];
695
- for (;o < a.childNodes.length; o++) e = a.childNodes[o]["s-nr"], t = n.every(e => !a.childNodes[o][e]),
715
+ for (;o < a.childNodes.length; o++) e = a.childNodes[o]["s-nr"], t = n.every((e => !a.childNodes[o][e])),
696
716
  e && (appData.BUILD.appendChildSlotFix && s.__appendChild ? s.__appendChild(e.cloneNode(!0)) : s.appendChild(e.cloneNode(!0))),
697
717
  t && s.appendChild(a.childNodes[o].cloneNode(!0));
698
718
  }
@@ -717,7 +737,7 @@ const callRender = (e, t) => {
717
737
  const t = e.__lookupGetter__("childNodes");
718
738
  Object.defineProperty(e, "children", {
719
739
  get() {
720
- return this.childNodes.map(e => 1 === e.nodeType);
740
+ return this.childNodes.map((e => 1 === e.nodeType));
721
741
  }
722
742
  }), Object.defineProperty(e, "childElementCount", {
723
743
  get: () => e.children.length
@@ -751,7 +771,7 @@ const callRender = (e, t) => {
751
771
  const t = new URL(e, plt.$resourcesUrl$);
752
772
  return t.origin !== win.location.origin ? t.href : t.pathname;
753
773
  }, parseVNodeAnnotations = (e, t, a, o) => {
754
- null != t && (null != t["s-nr"] && o.push(t), 1 === t.nodeType && t.childNodes.forEach(t => {
774
+ null != t && (null != t["s-nr"] && o.push(t), 1 === t.nodeType && t.childNodes.forEach((t => {
755
775
  const s = getHostRef(t);
756
776
  if (null != s && !a.staticComponents.has(t.nodeName.toLowerCase())) {
757
777
  const o = {
@@ -760,21 +780,21 @@ const callRender = (e, t) => {
760
780
  insertVNodeAnnotations(e, t, s.$vnode$, a, o);
761
781
  }
762
782
  parseVNodeAnnotations(e, t, a, o);
763
- }));
783
+ })));
764
784
  }, insertVNodeAnnotations = (e, t, a, o, s) => {
765
785
  if (null != a) {
766
786
  const n = ++o.hostIds;
767
- if (t.setAttribute("s-id", n), null != t["s-cr"] && (t["s-cr"].nodeValue = "r." + n),
787
+ if (t.setAttribute("s-id", n), null != t["s-cr"] && (t["s-cr"].nodeValue = `r.${n}`),
768
788
  null != a.$children$) {
769
789
  const t = 0;
770
- a.$children$.forEach((a, o) => {
790
+ a.$children$.forEach(((a, o) => {
771
791
  insertChildVNodeAnnotations(e, a, s, n, t, o);
772
- });
792
+ }));
773
793
  }
774
794
  if (t && a && a.$elm$ && !t.hasAttribute("c-id")) {
775
795
  const e = t.parentElement;
776
796
  if (e && e.childNodes) {
777
- const o = Array.from(e.childNodes), s = o.find(e => 8 === e.nodeType && e["s-sr"]);
797
+ const o = Array.from(e.childNodes), s = o.find((e => 8 === e.nodeType && e["s-sr"]));
778
798
  if (s) {
779
799
  const e = o.indexOf(t) - 1;
780
800
  a.$elm$.setAttribute("c-id", `${s["s-host-id"]}.${s["s-node-id"]}.0.${e}`);
@@ -787,9 +807,9 @@ const callRender = (e, t) => {
787
807
  if (null == l) return;
788
808
  const r = a.nodeIds++, p = `${o}.${r}.${s}.${n}`;
789
809
  if (l["s-host-id"] = o, l["s-node-id"] = r, 1 === l.nodeType) l.setAttribute("c-id", p); else if (3 === l.nodeType) {
790
- const t = l.parentNode;
791
- if ("STYLE" !== t.nodeName) {
792
- const a = "t." + p, o = e.createComment(a);
810
+ const t = l.parentNode, a = t.nodeName;
811
+ if ("STYLE" !== a && "SCRIPT" !== a) {
812
+ const a = `t.${p}`, o = e.createComment(a);
793
813
  t.insertBefore(o, l);
794
814
  }
795
815
  } else if (8 === l.nodeType && l["s-sr"]) {
@@ -798,9 +818,9 @@ const callRender = (e, t) => {
798
818
  }
799
819
  if (null != t.$children$) {
800
820
  const n = s + 1;
801
- t.$children$.forEach((t, s) => {
821
+ t.$children$.forEach(((t, s) => {
802
822
  insertChildVNodeAnnotations(e, t, a, o, n, s);
803
- });
823
+ }));
804
824
  }
805
825
  }, getHostRef = e => hostRefs.get(e), registerHost = (e, t) => {
806
826
  const a = {
@@ -810,17 +830,22 @@ const callRender = (e, t) => {
810
830
  $instanceValues$: new Map,
811
831
  $renderCount$: 0
812
832
  };
813
- a.$onInstancePromise$ = new Promise(e => a.$onInstanceResolve$ = e), a.$onReadyPromise$ = new Promise(e => a.$onReadyResolve$ = e),
833
+ a.$onInstancePromise$ = new Promise((e => a.$onInstanceResolve$ = e)), a.$onReadyPromise$ = new Promise((e => a.$onReadyResolve$ = e)),
814
834
  e["s-p"] = [], e["s-rc"] = [], addHostEventListeners(e, a, t.$listeners$, !1), hostRefs.set(e, a);
815
835
  };
816
836
 
817
- exports.Build = {
837
+ Object.defineProperty(exports, "Env", {
838
+ enumerable: !0,
839
+ get: function() {
840
+ return appData.Env;
841
+ }
842
+ }), exports.Build = {
818
843
  isDev: !0,
819
844
  isBrowser: !1,
820
845
  isServer: !0,
821
846
  isTesting: !0
822
- }, exports.Context = Context, exports.Host = Host, exports.addHostEventListeners = addHostEventListeners,
823
- exports.attachShadow = e => {
847
+ }, exports.Context = Context, exports.Fragment = (e, t) => t, exports.Host = Host,
848
+ exports.addHostEventListeners = addHostEventListeners, exports.attachShadow = e => {
824
849
  exports.supportsShadow ? e.attachShadow({
825
850
  mode: "open"
826
851
  }) : e.shadowRoot = e;
@@ -877,7 +902,7 @@ exports.attachShadow = e => {
877
902
  if (Object.assign(plt, t), plt.$resourcesUrl$ = new URL(t.resourcesUrl || "./", doc.baseURI).href,
878
903
  appData.BUILD.asyncQueue && t.syncQueue && (plt.$flags$ |= 4), appData.BUILD.hydrateClientSide && (plt.$flags$ |= 2),
879
904
  appData.BUILD.hydrateClientSide && appData.BUILD.shadowDom) for (;m < d.length; m++) registerStyle(d[m].getAttribute("sty-id"), d[m].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{"));
880
- e.map(e => e[1].map(a => {
905
+ e.map((e => e[1].map((a => {
881
906
  const l = {
882
907
  $flags$: a[0],
883
908
  $tagName$: a[1],
@@ -898,13 +923,10 @@ exports.attachShadow = e => {
898
923
  appData.BUILD.slotChildNodesFix && patchChildSlotNodes(e, l);
899
924
  }
900
925
  connectedCallback() {
901
- c && (clearTimeout(c), c = null), $ ? i.push(this) : plt.jmp(() => connectedCallback(this));
926
+ c && (clearTimeout(c), c = null), $ ? i.push(this) : plt.jmp((() => connectedCallback(this)));
902
927
  }
903
928
  disconnectedCallback() {
904
- plt.jmp(() => disconnectedCallback(this));
905
- }
906
- forceUpdate() {
907
- appData.BUILD.isDev, forceUpdate(this);
929
+ plt.jmp((() => disconnectedCallback(this)));
908
930
  }
909
931
  componentOnReady() {
910
932
  return getHostRef(this).$onReadyPromise$;
@@ -919,16 +941,17 @@ exports.attachShadow = e => {
919
941
  }, initializeComponent(e, o, t);
920
942
  })(this, l);
921
943
  }), l.$lazyBundleId$ = e[0], s.includes(r) || n.get(r) || (o.push(r), n.define(r, proxyComponent(p, l, 1)));
922
- })), (appData.BUILD.hydratedClass || appData.BUILD.hydratedAttribute) && (p.innerHTML = o + "{visibility:hidden}.hydrated{visibility:inherit}",
944
+ })))), (appData.BUILD.hydratedClass || appData.BUILD.hydratedAttribute) && (p.innerHTML = o + "{visibility:hidden}.hydrated{visibility:inherit}",
923
945
  p.setAttribute("data-styles", ""), l.insertBefore(p, r ? r.nextSibling : l.firstChild)),
924
- $ = !1, i.length ? i.map(e => e.connectedCallback()) : appData.BUILD.profile ? plt.jmp(() => c = setTimeout(appDidLoad, 30, "timeout")) : plt.jmp(() => c = setTimeout(appDidLoad, 30)),
946
+ $ = !1, i.length ? i.map((e => e.connectedCallback())) : appData.BUILD.profile ? plt.jmp((() => c = setTimeout(appDidLoad, 30, "timeout"))) : plt.jmp((() => c = setTimeout(appDidLoad, 30))),
925
947
  a();
926
948
  }, exports.connectedCallback = connectedCallback, exports.consoleDevError = consoleDevError,
927
- exports.consoleDevInfo = (...e) => {}, exports.consoleDevWarn = (...e) => {}, exports.consoleError = consoleError,
928
- exports.createEvent = (e, t, a) => {
949
+ exports.consoleDevInfo = (...e) => {}, exports.consoleDevWarn = consoleDevWarn,
950
+ exports.consoleError = consoleError, exports.createEvent = (e, t, a) => {
929
951
  const o = getElement(e);
930
952
  return {
931
- emit: e => (appData.BUILD.isDev && o.isConnected, emitEvent(o, t, {
953
+ emit: e => (appData.BUILD.isDev && !o.isConnected && consoleDevWarn(`The "${t}" event was emitted, but the dispatcher node is no longer connected to the dom.`),
954
+ emitEvent(o, t, {
932
955
  bubbles: !!(4 & a),
933
956
  composed: !!(2 & a),
934
957
  cancelable: !!(1 & a),
@@ -953,7 +976,7 @@ exports.flushLoadModule = flushLoadModule, exports.flushQueue = flushQueue, expo
953
976
  return e || (e = doc.createElement(t), doc.body.appendChild(e)), "function" == typeof e.componentOnReady ? e.componentOnReady() : Promise.resolve(e);
954
977
  };
955
978
  return {
956
- create: (...e) => a().then(t => t.create(...e)),
979
+ create: (...e) => a().then((t => t.create(...e))),
957
980
  componentOnReady: a
958
981
  };
959
982
  }, exports.getContext = (e, t) => t in Context ? Context[t] : "window" === t ? win : "document" === t ? doc : "isServer" === t || "isPrerender" === t ? !!appData.BUILD.hydrateServerSide : "isClient" === t ? !appData.BUILD.hydrateServerSide : "resourcesUrl" === t || "publicPath" === t ? getAssetPath(".") : "queue" === t ? {
@@ -971,7 +994,7 @@ exports.insertVdomAnnotations = (e, t) => {
971
994
  rootLevelIds: 0,
972
995
  staticComponents: new Set(t)
973
996
  }, o = [];
974
- parseVNodeAnnotations(e, e.body, a, o), o.forEach(t => {
997
+ parseVNodeAnnotations(e, e.body, a, o), o.forEach((t => {
975
998
  if (null != t) {
976
999
  const o = t["s-nr"];
977
1000
  let s = o["s-host-id"], n = o["s-node-id"], l = `${s}.${n}`;
@@ -979,28 +1002,27 @@ exports.insertVdomAnnotations = (e, t) => {
979
1002
  1 === o.nodeType) o.setAttribute("c-id", l); else if (3 === o.nodeType) {
980
1003
  if (0 === s && "" === o.nodeValue.trim()) return void t.remove();
981
1004
  const a = e.createComment(l);
982
- a.nodeValue = "t." + l, o.parentNode.insertBefore(a, o);
1005
+ a.nodeValue = `t.${l}`, o.parentNode.insertBefore(a, o);
983
1006
  }
984
- let r = "o." + l;
1007
+ let r = `o.${l}`;
985
1008
  const p = t.parentElement;
986
1009
  p && ("" === p["s-en"] ? r += "." : "c" === p["s-en"] && (r += ".c")), t.nodeValue = r;
987
1010
  }
988
- });
1011
+ }));
989
1012
  }
990
1013
  }, exports.isMemberInElement = isMemberInElement, exports.loadModule = loadModule,
991
1014
  exports.modeResolutionChain = modeResolutionChain, exports.nextTick = nextTick,
992
1015
  exports.parsePropertyValue = parsePropertyValue, exports.plt = plt, exports.postUpdateComponent = postUpdateComponent,
993
1016
  exports.proxyComponent = proxyComponent, exports.proxyCustomElement = proxyCustomElement,
994
1017
  exports.readTask = readTask, exports.registerComponents = e => {
995
- e.forEach(e => {
1018
+ e.forEach((e => {
996
1019
  cstrs.set(e.COMPILER_META.tagName, e);
997
- });
1020
+ }));
998
1021
  }, exports.registerContext = function registerContext(e) {
999
1022
  e && Object.assign(Context, e);
1000
1023
  }, exports.registerHost = registerHost, exports.registerInstance = (e, t) => {
1001
1024
  if (null == e || null == e.constructor) throw new Error("Invalid component constructor");
1002
1025
  if (null == t) {
1003
- console.warn('Use "newSpecPage()" to instanciate component instances instead of "new MyComp()".\nFor further information: https://rindojs.web.app/docs/unit-testing#newspecpage-');
1004
1026
  const a = e.constructor, o = a.COMPILER_META && a.COMPILER_META.tagName ? a.COMPILER_META.tagName : "div", s = document.createElement(o);
1005
1027
  registerHost(s, {
1006
1028
  $flags$: 0,
@@ -1012,21 +1034,22 @@ exports.readTask = readTask, exports.registerComponents = e => {
1012
1034
  moduleLoaded.set(e, t);
1013
1035
  }, exports.renderVdom = renderVdom, exports.resetPlatform = function resetPlatform() {
1014
1036
  win && "function" == typeof win.close && win.close(), hostRefs.clear(), styles.clear(),
1015
- plt.$flags$ = 0, Object.keys(Context).forEach(e => delete Context[e]), null != plt.$orgLocNodes$ && (plt.$orgLocNodes$.clear(),
1037
+ plt.$flags$ = 0, Object.keys(Context).forEach((e => delete Context[e])), null != plt.$orgLocNodes$ && (plt.$orgLocNodes$.clear(),
1016
1038
  plt.$orgLocNodes$ = void 0), win.location.href = plt.$resourcesUrl$ = "http://testing-rindojs.web.app/",
1017
1039
  function e() {
1018
1040
  queuedTicks.length = 0, queuedWriteTasks.length = 0, queuedReadTasks.length = 0,
1019
1041
  moduleLoaded.clear(), queuedLoadModules.length = 0, caughtErrors.length = 0;
1020
1042
  }(), stopAutoApplyChanges(), cstrs.clear();
1021
- }, exports.setAssetPath = e => plt.$resourcesUrl$ = e, exports.setMode = e => modeResolutionChain.push(e),
1043
+ }, exports.setAssetPath = e => plt.$resourcesUrl$ = e, exports.setErrorHandler = e => customError = e,
1044
+ exports.setMode = e => modeResolutionChain.push(e), exports.setPlatformOptions = e => Object.assign(plt, e),
1022
1045
  exports.setSupportsShadowDom = e => {
1023
1046
  exports.supportsShadow = e;
1024
1047
  }, exports.setValue = setValue, exports.startAutoApplyChanges = async function e() {
1025
- isAutoApplyingChanges = !0, flushAll().then(() => {
1026
- isAutoApplyingChanges && (autoApplyTimer = setTimeout(() => {
1048
+ isAutoApplyingChanges = !0, flushAll().then((() => {
1049
+ isAutoApplyingChanges && (autoApplyTimer = setTimeout((() => {
1027
1050
  e();
1028
- }, 100));
1029
- });
1051
+ }), 100));
1052
+ }));
1030
1053
  }, exports.stopAutoApplyChanges = stopAutoApplyChanges, exports.styles = styles,
1031
1054
  exports.supportsConstructibleStylesheets = !1, exports.supportsListenerOptions = !0,
1032
1055
  exports.win = win, exports.writeTask = writeTask;