marko 6.4.9 → 6.4.10

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 (60) hide show
  1. package/cheatsheet.md +1 -1
  2. package/dist/debug/dom/catch.feat.js +2 -3
  3. package/dist/debug/dom/catch.feat.mjs +2 -3
  4. package/dist/debug/dom/controllable-input.feat.js +2 -3
  5. package/dist/debug/dom/controllable-input.feat.mjs +2 -3
  6. package/dist/debug/dom/controllable-open.feat.js +2 -3
  7. package/dist/debug/dom/controllable-open.feat.mjs +2 -3
  8. package/dist/debug/dom/controllable-select.feat.js +2 -3
  9. package/dist/debug/dom/controllable-select.feat.mjs +2 -3
  10. package/dist/debug/dom/controllable-textarea.feat.js +2 -3
  11. package/dist/debug/dom/controllable-textarea.feat.mjs +2 -3
  12. package/dist/debug/dom/controllable.feat.js +2 -3
  13. package/dist/debug/dom/controllable.feat.mjs +2 -3
  14. package/dist/debug/dom/dynamic-tag-script.feat.js +2 -3
  15. package/dist/debug/dom/dynamic-tag-script.feat.mjs +2 -3
  16. package/dist/debug/dom/dynamic-tag-var.feat.js +2 -3
  17. package/dist/debug/dom/dynamic-tag-var.feat.mjs +2 -3
  18. package/dist/debug/dom/lazy.feat.js +2 -3
  19. package/dist/debug/dom/lazy.feat.mjs +2 -3
  20. package/dist/debug/dom/placeholder.feat.js +2 -3
  21. package/dist/debug/dom/placeholder.feat.mjs +2 -3
  22. package/dist/debug/{dom-VKjkbuuo.mjs → dom-C1V5vpFs.mjs} +24 -48
  23. package/dist/debug/{dom-QkYva5Qx.js → dom-DNB5yq3U.js} +24 -48
  24. package/dist/debug/dom.js +6 -11
  25. package/dist/debug/dom.mjs +6 -11
  26. package/dist/debug/html.js +19 -38
  27. package/dist/debug/html.mjs +19 -38
  28. package/dist/dom/catch.feat.js +2 -3
  29. package/dist/dom/catch.feat.mjs +2 -3
  30. package/dist/dom/controllable-input.feat.js +1 -2
  31. package/dist/dom/controllable-input.feat.mjs +1 -2
  32. package/dist/dom/controllable-open.feat.js +2 -3
  33. package/dist/dom/controllable-open.feat.mjs +2 -3
  34. package/dist/dom/controllable-select.feat.js +2 -3
  35. package/dist/dom/controllable-select.feat.mjs +2 -3
  36. package/dist/dom/controllable-textarea.feat.js +2 -3
  37. package/dist/dom/controllable-textarea.feat.mjs +2 -3
  38. package/dist/dom/controllable.feat.js +1 -2
  39. package/dist/dom/controllable.feat.mjs +1 -2
  40. package/dist/dom/dynamic-tag-script.feat.js +2 -3
  41. package/dist/dom/dynamic-tag-script.feat.mjs +2 -3
  42. package/dist/dom/dynamic-tag-var.feat.js +1 -2
  43. package/dist/dom/dynamic-tag-var.feat.mjs +1 -2
  44. package/dist/dom/lazy.feat.js +2 -3
  45. package/dist/dom/lazy.feat.mjs +2 -3
  46. package/dist/dom/placeholder.feat.js +2 -3
  47. package/dist/dom/placeholder.feat.mjs +2 -3
  48. package/dist/{dom-IujlfJ6b.js → dom-C2-Flitp.js} +40 -60
  49. package/dist/{dom-DtKQb840.mjs → dom-DsHYWMCR.mjs} +40 -61
  50. package/dist/dom.js +6 -10
  51. package/dist/dom.mjs +6 -11
  52. package/dist/html.js +39 -59
  53. package/dist/html.mjs +39 -60
  54. package/dist/translator/index.js +222 -355
  55. package/dist/translator/util/assert.d.ts +9 -2
  56. package/dist/translator/util/known-tag.d.ts +3 -0
  57. package/dist/translator/util/sources.d.ts +1 -1
  58. package/dist/translator/util/tag-name-type.d.ts +3 -0
  59. package/package.json +6 -6
  60. package/tags/lifecycle.d.marko +2 -0
@@ -1,4 +1,4 @@
1
- //#region src/common/attr-tag.ts
1
+ // src/common/attr-tag.ts
2
2
  const empty = [];
3
3
  const rest = Symbol("Attribute Tag");
4
4
  function attrTag(attrs) {
@@ -18,8 +18,7 @@ function* attrTagIterator() {
18
18
  yield this;
19
19
  yield* this[rest];
20
20
  }
21
- //#endregion
22
- //#region src/common/constants/accessor-prefix.debug.ts
21
+ // src/common/constants/accessor-prefix.debug.ts
23
22
  const BranchScopes = "BranchScopes:";
24
23
  const ConditionalRenderer = "ConditionalRenderer:";
25
24
  const ControlledHandler = "ControlledHandler:";
@@ -36,8 +35,7 @@ const TagVariable = "#TagVariable";
36
35
  const Owner = "owner";
37
36
  const Embed = "embed";
38
37
  const Lazy = "lazy";
39
- //#endregion
40
- //#region src/common/helpers.ts
38
+ // src/common/helpers.ts
41
39
  const invalidNativeAttrNameReg = /^[^a-z_]|[^a-z0-9._:-]/i;
42
40
  const knownWrongAttrs = {
43
41
  className: "class",
@@ -154,8 +152,7 @@ function normalizeDynamicRenderer(value) {
154
152
  if ("id" in normalized) return normalized;
155
153
  }
156
154
  }
157
- //#endregion
158
- //#region src/common/errors.ts
155
+ // src/common/errors.ts
159
156
  const lowercaseOnAttrReg = /^on[a-z]/;
160
157
  function assertValidAttrValue(name, value) {
161
158
  if (value && typeof value !== "string" && lowercaseOnAttrReg.test(name)) throw new Error(`The \`${name}\` attribute must be a string or a falsey value (\`null\`, \`undefined\`, \`false\`, \`0\`, …), but received type "${typeof value}". To attach an event listener, use the \`on${name[2].toUpperCase()}${name.slice(3)}\` event handler instead.`);
@@ -273,13 +270,11 @@ function joinWithAnd(a) {
273
270
  default: return `${a.slice(0, -1).join(", ")}, and ${a[a.length - 1]}`;
274
271
  }
275
272
  }
276
- //#endregion
277
- //#region src/common/meta.ts
273
+ // src/common/meta.ts
278
274
  const DYNAMIC_TAG_SCRIPT_REGISTER_ID = "_dynamicTagScript";
279
275
  const DYNAMIC_TAG_VAR_REGISTER_ID = "_dynamicTagVar";
280
276
  const PLACEHOLDER_DISMISS_REGISTER_ID = "_placeholderDismiss";
281
- //#endregion
282
- //#region src/common/opt.ts
277
+ // src/common/opt.ts
283
278
  function reduce(opt, cb, acc) {
284
279
  if (opt) {
285
280
  if (Array.isArray(opt)) for (const item of opt) acc = cb(acc, item);
@@ -300,8 +295,7 @@ function concat(opt, other) {
300
295
  }
301
296
  return Array.isArray(other) ? [opt, ...other] : [opt, other];
302
297
  }
303
- //#endregion
304
- //#region src/html/serializer.ts
298
+ // src/html/serializer.ts
305
299
  const K_SCOPE_ID = Symbol("Scope ID");
306
300
  const kTouchedIterator = /* @__PURE__ */ Symbol.for("marko.touchedIterator");
307
301
  const { hasOwnProperty } = {};
@@ -1840,8 +1834,7 @@ function patchIteratorNext(proto) {
1840
1834
  };
1841
1835
  proto.next[kTouchedIterator] = true;
1842
1836
  }
1843
- //#endregion
1844
- //#region src/html/attrs.ts
1837
+ // src/html/attrs.ts
1845
1838
  function _attr_class(value) {
1846
1839
  return stringAttr("class", toDelimitedString(value, " ", stringifyClassEntry));
1847
1840
  }
@@ -2073,8 +2066,7 @@ function normalizedValueMatches(a, b) {
2073
2066
  function normalizeStrAttrValue(value) {
2074
2067
  return isNotNullishOrFalse(value) && value !== true ? value + "" : "";
2075
2068
  }
2076
- //#endregion
2077
- //#region src/html/inlined-runtimes.debug.ts
2069
+ // src/html/inlined-runtimes.debug.ts
2078
2070
  const WALKER_RUNTIME_CODE = `((runtimeId) => (self[runtimeId] ||= (
2079
2071
  renderId,
2080
2072
  prefix = runtimeId + renderId,
@@ -2170,8 +2162,7 @@ const REORDER_RUNTIME_CODE = `((runtime) => {
2170
2162
  }
2171
2163
  };
2172
2164
  })`;
2173
- //#endregion
2174
- //#region src/html/writer.ts
2165
+ // src/html/writer.ts
2175
2166
  let $chunk;
2176
2167
  function getChunk() {
2177
2168
  return $chunk;
@@ -3117,8 +3108,7 @@ function flushTickQueue() {
3117
3108
  });
3118
3109
  }
3119
3110
  }
3120
- //#endregion
3121
- //#region src/html/content.ts
3111
+ // src/html/content.ts
3122
3112
  function _to_text(val) {
3123
3113
  assertValidTextValue(val);
3124
3114
  return val || val === 0 ? val + "" : "";
@@ -3162,8 +3152,7 @@ function _escape_comment(val) {
3162
3152
  assertValidTextValue(val);
3163
3153
  return val ? escapeCommentStr(val + "") : val === 0 ? "0" : "";
3164
3154
  }
3165
- //#endregion
3166
- //#region src/html/dynamic-tag.ts
3155
+ // src/html/dynamic-tag.ts
3167
3156
  const voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/;
3168
3157
  let _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, markerGuard, tagVar) => {
3169
3158
  const shouldResume = markerGuard !== 0;
@@ -3245,8 +3234,7 @@ const patchDynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (patch) => {
3245
3234
  return originalDynamicTag(scopeId, accessor, patched, input, content, inputIsArgs, markerGuard, tagVar);
3246
3235
  };
3247
3236
  })(_dynamic_tag);
3248
- //#endregion
3249
- //#region src/html/template.ts
3237
+ // src/html/template.ts
3250
3238
  const CONSUMED_RESULT_MESSAGE = "Cannot read from a consumed render result";
3251
3239
  const _template = (templateId, renderer, page) => {
3252
3240
  renderer.render = render;
@@ -3510,8 +3498,7 @@ function settle(boundary) {
3510
3498
  boundary.state.$global.signal?.removeEventListener("abort", boundary);
3511
3499
  }
3512
3500
  function NOOP$1() {}
3513
- //#endregion
3514
- //#region src/html/assets.ts
3501
+ // src/html/assets.ts
3515
3502
  const kAssets = Symbol();
3516
3503
  const kHead = Symbol();
3517
3504
  function withLoadAssets(template, id, flush, assetId, triggers) {
@@ -3631,12 +3618,10 @@ function toObjectExpression(options) {
3631
3618
  }
3632
3619
  return result + "}";
3633
3620
  }
3634
- //#endregion
3635
- //#region src/common/compat-meta.ts
3621
+ // src/common/compat-meta.ts
3636
3622
  const SET_SCOPE_REGISTER_ID = "$compat_setScope";
3637
3623
  const RENDER_BODY_ID = "$compat_renderBody";
3638
- //#endregion
3639
- //#region src/common/for.ts
3624
+ // src/common/for.ts
3640
3625
  function forIn(obj, cb) {
3641
3626
  for (const key in obj) cb(key, obj[key]);
3642
3627
  }
@@ -3663,8 +3648,7 @@ function forUntil(until, from, step, cb) {
3663
3648
  const delta = step || 1;
3664
3649
  for (let steps = (until - start) / delta, i = 0; i < steps; i++) cb(start + i * delta);
3665
3650
  }
3666
- //#endregion
3667
- //#region src/html/for.ts
3651
+ // src/html/for.ts
3668
3652
  function forOfBy(by, item, index) {
3669
3653
  return by ? typeof by === "string" ? item[by] : by(item, index) : index;
3670
3654
  }
@@ -3674,8 +3658,7 @@ function forInBy(by, name, value) {
3674
3658
  function forStepBy(by, index) {
3675
3659
  return by ? by(index) : index;
3676
3660
  }
3677
- //#endregion
3678
- //#region src/html/control-flow.ts
3661
+ // src/html/control-flow.ts
3679
3662
  function _show_start(display, markerGuard, branchExprGuard, parentEndTag) {
3680
3663
  if (display) {
3681
3664
  if (resumesMarker(markerGuard, branchExprGuard, parentEndTag)) $chunk.writeHTML($chunk.boundary.state.mark("[", ""));
@@ -3955,8 +3938,7 @@ function writeTryRenderers(branchId, catchContent, placeholderContent) {
3955
3938
  [PlaceholderContent]: placeholderContent
3956
3939
  });
3957
3940
  }
3958
- //#endregion
3959
- //#region src/html/compat.ts
3941
+ // src/html/compat.ts
3960
3942
  const K_TAGS_API_STATE = Symbol();
3961
3943
  const COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap();
3962
3944
  const compat = {
@@ -4167,5 +4149,4 @@ function swapReorders(state, reorders) {
4167
4149
  return writeReorders;
4168
4150
  }
4169
4151
  function NOOP() {}
4170
- //#endregion
4171
4152
  export { $global, _assert_class_toggles, _assert_hoist, _attr, _attr_and, _attr_class, _attr_content, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_nonce, _attr_nullish, _attr_option_value, _attr_or, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, _attrs_select_value, _attrs_textarea_value, _await, _content, _content_resume, _dynamic_tag, _el, _el_mark, _el_read_error, _escape, _escape_comment, _escape_script, _escape_style, _escape_style_value, _existing_scope, _flush_head, _for_in, _for_of, _for_to, _for_until, _hoist, _hoist_read_error, _html, _html_mark, _id, _if, _peek_scope_id, _resume, _resume_branch, _resume_locals, writeScope as _scope, _scope_id, _scope_reason, _scope_with_id, _script, _set_scope_reason, _show_end, _show_start, _signal_read_error, _style_html, _subscribe, _template, _text_mark, _textarea_value, _to_text, _trailers, _try, _unescaped, _var, _write_guard, _write_if, attrTag, attrTags, compat, forIn, forOf, forTo, forUntil, withLoadAssets, withPageAssets };
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-IujlfJ6b.js"), deferToPendingTry = (fn, scope, branch) => {
2
+ let require_control_flow = require("../dom-C2-Flitp.js"), deferToPendingTry = (fn, scope, branch) => {
3
3
  for (; branch;) {
4
4
  if (branch.O?.i) return (scope.J ||= ((branch.JS ||= (branch.O.m && ((complete) => branch.O.c = (_) => complete() || require_control_flow.on(branch, require_control_flow.sn, require_control_flow.y))(branch.O.c), [])).push(scope), /* @__PURE__ */ new Set())).add(fn);
5
5
  branch = branch.N;
6
6
  }
7
7
  };
8
- //#region src/dom/catch.feat.ts
8
+ // src/dom/catch.feat.ts
9
9
  require_control_flow.in((effects) => {
10
10
  let i = 0, fn, scope, branch;
11
11
  for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !deferToPendingTry(fn, scope, branch) && fn(scope);
@@ -21,4 +21,3 @@ require_control_flow.in((effects) => {
21
21
  require_control_flow.v(render.b, error);
22
22
  }
23
23
  });
24
- //#endregion
@@ -4,8 +4,8 @@ let deferToPendingTry = (fn, scope, branch) => {
4
4
  branch = branch.N;
5
5
  }
6
6
  };
7
- import { in as installCatch, on as queueAsyncRender, sn as queueEffect, v as renderCatch, y as runPendingEffects } from "../dom-DtKQb840.mjs";
8
- //#region src/dom/catch.feat.ts
7
+ import { in as installCatch, on as queueAsyncRender, sn as queueEffect, v as renderCatch, y as runPendingEffects } from "../dom-DsHYWMCR.mjs";
8
+ // src/dom/catch.feat.ts
9
9
  installCatch((effects) => {
10
10
  let i = 0, fn, scope, branch;
11
11
  for (; i < effects.length;) fn = effects[i++], scope = effects[i++], (branch = scope.F)?.H !== 0 && !deferToPendingTry(fn, scope, branch) && fn(scope);
@@ -21,4 +21,3 @@ installCatch((effects) => {
21
21
  renderCatch(render.b, error);
22
22
  }
23
23
  });
24
- //#endregion
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-IujlfJ6b.js");
2
+ let require_control_flow = require("../dom-C2-Flitp.js");
3
3
  require_control_flow.H[0] = require_control_flow.k, require_control_flow.H[1] = require_control_flow.D, require_control_flow.H[2] = require_control_flow.P;
4
- //#endregion
@@ -1,3 +1,2 @@
1
- import { D as _attr_input_checkedValue_script, H as controllableScripts, P as _attr_input_value_script, k as _attr_input_checked_script } from "../dom-DtKQb840.mjs";
1
+ import { D as _attr_input_checkedValue_script, H as controllableScripts, P as _attr_input_value_script, k as _attr_input_checked_script } from "../dom-DsHYWMCR.mjs";
2
2
  controllableScripts[0] = _attr_input_checked_script, controllableScripts[1] = _attr_input_checkedValue_script, controllableScripts[2] = _attr_input_value_script;
3
- //#endregion
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-IujlfJ6b.js");
3
- //#region src/dom/controllable-open.feat.ts
2
+ let require_control_flow = require("../dom-C2-Flitp.js");
3
+ // src/dom/controllable-open.feat.ts
4
4
  require_control_flow.H[4] = require_control_flow.C;
5
- //#endregion
@@ -1,4 +1,3 @@
1
- import { C as _attr_details_or_dialog_open_script, H as controllableScripts } from "../dom-DtKQb840.mjs";
2
- //#region src/dom/controllable-open.feat.ts
1
+ import { C as _attr_details_or_dialog_open_script, H as controllableScripts } from "../dom-DsHYWMCR.mjs";
2
+ // src/dom/controllable-open.feat.ts
3
3
  controllableScripts[4] = _attr_details_or_dialog_open_script;
4
- //#endregion
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-IujlfJ6b.js");
3
- //#region src/dom/controllable-select.feat.ts
2
+ let require_control_flow = require("../dom-C2-Flitp.js");
3
+ // src/dom/controllable-select.feat.ts
4
4
  require_control_flow.H[3] = require_control_flow.L;
5
- //#endregion
@@ -1,4 +1,3 @@
1
- import { H as controllableScripts, L as _attr_select_value_script } from "../dom-DtKQb840.mjs";
2
- //#region src/dom/controllable-select.feat.ts
1
+ import { H as controllableScripts, L as _attr_select_value_script } from "../dom-DsHYWMCR.mjs";
2
+ // src/dom/controllable-select.feat.ts
3
3
  controllableScripts[3] = _attr_select_value_script;
4
- //#endregion
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-IujlfJ6b.js");
3
- //#region src/dom/controllable-textarea.feat.ts
2
+ let require_control_flow = require("../dom-C2-Flitp.js");
3
+ // src/dom/controllable-textarea.feat.ts
4
4
  require_control_flow.H[2] = require_control_flow.P;
5
- //#endregion
@@ -1,4 +1,3 @@
1
- import { H as controllableScripts, P as _attr_input_value_script } from "../dom-DtKQb840.mjs";
2
- //#region src/dom/controllable-textarea.feat.ts
1
+ import { H as controllableScripts, P as _attr_input_value_script } from "../dom-DsHYWMCR.mjs";
2
+ // src/dom/controllable-textarea.feat.ts
3
3
  controllableScripts[2] = _attr_input_value_script;
4
- //#endregion
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-IujlfJ6b.js");
2
+ let require_control_flow = require("../dom-C2-Flitp.js");
3
3
  require("./controllable-input.feat.js"), require("./controllable-open.feat.js"), require("./controllable-select.feat.js"), require_control_flow.U.INPUT = require_control_flow.R, require_control_flow.U.TEXTAREA = require_control_flow.V, require_control_flow.U.SELECT = require_control_flow.B, require_control_flow.U.DETAILS = require_control_flow.U.DIALOG = require_control_flow.z;
4
- //#endregion
@@ -1,6 +1,5 @@
1
- import { B as _controllable_select, R as _controllable_input, U as controllableSpreadHelpers, V as _controllable_textarea, z as _controllable_open } from "../dom-DtKQb840.mjs";
1
+ import { B as _controllable_select, R as _controllable_input, U as controllableSpreadHelpers, V as _controllable_textarea, z as _controllable_open } from "../dom-DsHYWMCR.mjs";
2
2
  import "./controllable-input.feat.mjs";
3
3
  import "./controllable-open.feat.mjs";
4
4
  import "./controllable-select.feat.mjs";
5
5
  controllableSpreadHelpers.INPUT = _controllable_input, controllableSpreadHelpers.TEXTAREA = _controllable_textarea, controllableSpreadHelpers.SELECT = _controllable_select, controllableSpreadHelpers.DETAILS = controllableSpreadHelpers.DIALOG = _controllable_open;
6
- //#endregion
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-IujlfJ6b.js");
3
- //#region src/dom/dynamic-tag-script.feat.ts
2
+ let require_control_flow = require("../dom-C2-Flitp.js");
3
+ // src/dom/dynamic-tag-script.feat.ts
4
4
  require_control_flow.xt._d = require_control_flow.xn(require_control_flow.h);
5
- //#endregion
@@ -1,4 +1,3 @@
1
- import { h as dynamicTagScript, xn as withBranches, xt as _resumed } from "../dom-DtKQb840.mjs";
2
- //#region src/dom/dynamic-tag-script.feat.ts
1
+ import { h as dynamicTagScript, xn as withBranches, xt as _resumed } from "../dom-DsHYWMCR.mjs";
2
+ // src/dom/dynamic-tag-script.feat.ts
3
3
  _resumed._d = withBranches(dynamicTagScript);
4
- //#endregion
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-IujlfJ6b.js");
2
+ let require_control_flow = require("../dom-C2-Flitp.js");
3
3
  require_control_flow.rn(), require_control_flow.g((scope, branch, scopeKey, renderer) => {
4
4
  branch.BR = require_control_flow.nn(scope, scopeKey), typeof renderer == "string" && branch.T((_) => branch.S);
5
5
  });
6
- //#endregion
@@ -1,5 +1,4 @@
1
- import { g as installDynamicTagVar, nn as createBranchRenders, rn as installBranchRenders } from "../dom-DtKQb840.mjs";
1
+ import { g as installDynamicTagVar, nn as createBranchRenders, rn as installBranchRenders } from "../dom-DsHYWMCR.mjs";
2
2
  installBranchRenders(), installDynamicTagVar((scope, branch, scopeKey, renderer) => {
3
3
  branch.BR = createBranchRenders(scope, scopeKey), typeof renderer == "string" && branch.T((_) => branch.S);
4
4
  });
5
- //#endregion
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
- //#region src/dom/lazy.feat.ts
3
- require("../dom-IujlfJ6b.js").Ot();
4
- //#endregion
2
+ // src/dom/lazy.feat.ts
3
+ require("../dom-C2-Flitp.js").Ot();
@@ -1,4 +1,3 @@
1
- import { Ot as withLazy } from "../dom-DtKQb840.mjs";
2
- //#region src/dom/lazy.feat.ts
1
+ import { Ot as withLazy } from "../dom-DsHYWMCR.mjs";
2
+ // src/dom/lazy.feat.ts
3
3
  withLazy();
4
- //#endregion
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
- let require_control_flow = require("../dom-IujlfJ6b.js");
3
- //#region src/dom/placeholder.feat.ts
2
+ let require_control_flow = require("../dom-C2-Flitp.js");
3
+ // src/dom/placeholder.feat.ts
4
4
  require_control_flow.xt._f = (tryBranch) => {
5
5
  tryBranch.P &&= (require_control_flow.Yt(tryBranch.P), 0);
6
6
  };
7
- //#endregion
@@ -1,6 +1,5 @@
1
- import { Yt as destroyBranch, xt as _resumed } from "../dom-DtKQb840.mjs";
2
- //#region src/dom/placeholder.feat.ts
1
+ import { Yt as destroyBranch, xt as _resumed } from "../dom-DsHYWMCR.mjs";
2
+ // src/dom/placeholder.feat.ts
3
3
  _resumed._f = (tryBranch) => {
4
4
  tryBranch.P &&= (destroyBranch(tryBranch.P), 0);
5
5
  };
6
- //#endregion
@@ -18,7 +18,7 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
18
18
  }, runEffects = ((effects) => {
19
19
  for (let i = 0; i < effects.length;) effects[i++](effects[i++]);
20
20
  }), runRender = (render) => {
21
- (!branchesEnabled || render.b.F?.H !== 0) && render.c(render.b, render.d);
21
+ branchesEnabled && render.b.F?.H === 0 || render.c(render.b, render.d);
22
22
  }, catchEnabled, abortsEnabled, subscriptionsEnabled, delegate = (type, handler) => handler[1 + type] ||= (document.addEventListener(type, handler, !0), 1), parsers = {}, nextScopeId = 1e6, collectingScopes, destroyNestedScopes = function destroyNestedScopes(scope) {
23
23
  scope.H = 0, scope.D?.forEach(destroyNestedScopes), scope.B?.forEach(cleanupScope);
24
24
  }, isScheduled, channel, _return = (scope, value) => scope.T ? scope.T(value) : scope.RV = value, _var_change = (scope, value) => scope.U?.(value), tagIdsByGlobal = /* @__PURE__ */ new WeakMap(), currentNode, walkInternal = function walkInternal(currentWalkIndex, walkCodes, scope) {
@@ -119,16 +119,13 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
119
119
  if (hasSiblings && (oldLen ? (afterReference = oldScopes[oldEnd].K.nextSibling, newLen || parentNode.insertBefore(referenceNode, afterReference)) : newLen && (afterReference = referenceNode.nextSibling, referenceNode.remove())), !hasPotentialMoves) {
120
120
  oldLen && (oldScopes.forEach(hasSiblings ? removeAndDestroyBranch : destroyBranch), hasSiblings || (parentNode.textContent = ""));
121
121
  for (let newScope of newScopes) insertBranchBefore(newScope, parentNode, afterReference);
122
- return;
123
- }
124
- if (oldScopesByKey) oldScopesByKey.forEach(removeAndDestroyBranch);
125
- else for (let i = newLen; i < oldLen; i++) removeAndDestroyBranch(oldScopes[i]);
126
- for (; oldEnd >= start && newEnd >= start && oldScopes[oldEnd] === newScopes[newEnd];) oldEnd--, newEnd--;
127
- if (oldEnd + 1 < oldLen && (afterReference = oldScopes[oldEnd + 1].S), start > oldEnd || start > newEnd) {
128
- for (let i = start; i <= newEnd; i++) insertBranchBefore(newScopes[i], parentNode, afterReference);
129
- return;
122
+ } else {
123
+ if (oldScopesByKey) oldScopesByKey.forEach(removeAndDestroyBranch);
124
+ else for (let i = newLen; i < oldLen; i++) removeAndDestroyBranch(oldScopes[i]);
125
+ for (; oldEnd >= start && newEnd >= start && oldScopes[oldEnd] === newScopes[newEnd];) oldEnd--, newEnd--;
126
+ if (oldEnd + 1 < oldLen && (afterReference = oldScopes[oldEnd + 1].S), start > oldEnd || start > newEnd) for (let i = start; i <= newEnd; i++) insertBranchBefore(newScopes[i], parentNode, afterReference);
127
+ else reorder(newScopes, start, newEnd, parentNode, afterReference);
130
128
  }
131
- reorder(newScopes, start, newEnd, parentNode, afterReference);
132
129
  };
133
130
  }), _for_of = /*@__PURE__*/ loop(([all, by], cb) => {
134
131
  by ||= bySecondArg, typeof by == "string" ? forOf(all, (item, i) => cb(item[by], [item, i])) : forOf(all, (item, i) => cb(by(item, i), [item, i]));
@@ -139,7 +136,7 @@ let unsafeStyleAttrReg = /[\\;]/g, replaceUnsafeStyleAttr = (c) => c === ";" ? "
139
136
  }, reorderKeyed), _for_until = /*@__PURE__*/ loop(([until, from, step, by], cb) => {
140
137
  by ||= byFirstArg, forUntil(until, from, step, (v) => cb(by(v), [v]));
141
138
  }, reorderKeyed), _for_of_unkeyed = /*@__PURE__*/ loop(([all], cb) => forOf(all, (item, i) => cb(i, [item, i]))), _for_to_unkeyed = /*@__PURE__*/ loop(([to, from, step], cb) => forTo(to, from, step, (v) => cb(v, [v]))), _for_until_unkeyed = /*@__PURE__*/ loop(([until, from, step], cb) => forUntil(until, from, step, (v) => cb(v, [v])));
142
- //#region src/common/helpers.ts
139
+ // src/common/helpers.ts
143
140
  function _call(fn, v) {
144
141
  return fn(v), v;
145
142
  }
@@ -182,13 +179,11 @@ function withBranches(runtime) {
182
179
  function withDynamicHtml(runtime) {
183
180
  return dynamicHtmlEnabled = 1, runtime;
184
181
  }
185
- //#endregion
186
- //#region src/common/errors.ts
182
+ // src/common/errors.ts
187
183
  function _assert_class_toggles(classes, toggles) {}
188
184
  function _hoist_read_error() {}
189
185
  function _assert_hoist(value) {}
190
- //#endregion
191
- //#region src/common/for.ts
186
+ // src/common/for.ts
192
187
  function forIn(obj, cb) {
193
188
  for (let key in obj) cb(key, obj[key]);
194
189
  }
@@ -206,8 +201,7 @@ function forUntil(until, from, step, cb) {
206
201
  let start = from || 0, delta = step || 1;
207
202
  for (let steps = (until - start) / delta, i = 0; i < steps; i++) cb(start + i * delta);
208
203
  }
209
- //#endregion
210
- //#region src/dom/queue.ts
204
+ // src/dom/queue.ts
211
205
  function queueRender(scope, signal, signalKey, value, scopeKey = scope.L) {
212
206
  let render;
213
207
  if (signalKey >= 0 && (render = scope[signalKey])) {
@@ -290,8 +284,7 @@ function runRenders(renders = pendingRenders) {
290
284
  runRender(render);
291
285
  }
292
286
  }
293
- //#endregion
294
- //#region src/dom/abort-signal.ts
287
+ // src/dom/abort-signal.ts
295
288
  function $signalReset(scope, id) {
296
289
  let ctrl = scope.A?.[id];
297
290
  ctrl && (scope.A[id] = void 0, rendering ? queueEffect(ctrl, abort) : abort(ctrl));
@@ -311,8 +304,7 @@ function trackCleanup(scope, subscribers) {
311
304
  function abort(ctrl) {
312
305
  ctrl.abort();
313
306
  }
314
- //#endregion
315
- //#region src/common/opt.ts
307
+ // src/common/opt.ts
316
308
  function toArray(opt) {
317
309
  return opt ? Array.isArray(opt) ? opt : [opt] : [];
318
310
  }
@@ -325,8 +317,7 @@ function forEach(opt, cb) {
325
317
  function push(opt, item) {
326
318
  return opt ? Array.isArray(opt) ? (opt.push(item), opt) : [opt, item] : item;
327
319
  }
328
- //#endregion
329
- //#region src/dom/event.ts
320
+ // src/dom/event.ts
330
321
  function _on(element, type, handler) {
331
322
  delegate(type, handleDelegated), element[1 + type] = handler || null;
332
323
  }
@@ -334,14 +325,12 @@ function handleDelegated(ev) {
334
325
  let target = !rendering && ev.target;
335
326
  for (; target;) target[1 + ev.type]?.(ev, target), target = ev.bubbles && !ev.cancelBubble && target.parentNode;
336
327
  }
337
- //#endregion
338
- //#region src/dom/parse-html.ts
328
+ // src/dom/parse-html.ts
339
329
  function parseHTML(html, ns) {
340
330
  let parser = parsers[ns] ||= document.createElementNS(ns, "template");
341
331
  return parser.innerHTML = html, parser.content || parser;
342
332
  }
343
- //#endregion
344
- //#region src/dom/scope.ts
333
+ // src/dom/scope.ts
345
334
  function createScope($global, closestBranch) {
346
335
  let scope = {
347
336
  L: nextScopeId++,
@@ -391,8 +380,7 @@ function detachBranch(branch) {
391
380
  let fragment = new DocumentFragment();
392
381
  fragment.namespaceURI = branch.S.parentNode.namespaceURI, insertChildNodes(fragment, null, branch.S, branch.K);
393
382
  }
394
- //#endregion
395
- //#region src/dom/schedule.ts
383
+ // src/dom/schedule.ts
396
384
  function schedule() {
397
385
  isScheduled || (isScheduled = 1, queueMicrotask(flushAndWaitFrame));
398
386
  }
@@ -404,8 +392,7 @@ function triggerMacroTask() {
404
392
  isScheduled = 0, run();
405
393
  }), channel.port2.postMessage(0);
406
394
  }
407
- //#endregion
408
- //#region src/dom/signals.ts
395
+ // src/dom/signals.ts
409
396
  function _let(id, fn) {
410
397
  let valueAccessor = decodeAccessor(id);
411
398
  return (scope, value) => (rendering ? scope.H === runId && (scope[valueAccessor] = value, fn?.(scope)) : (scope[valueAccessor] !== value || !(valueAccessor in scope)) && (scope[valueAccessor] = value, fn) && (schedule(), queueRender(scope, fn, id)), value);
@@ -416,7 +403,7 @@ function _let_change(id, fn) {
416
403
  }
417
404
  function _const(valueAccessor, fn) {
418
405
  return valueAccessor = decodeAccessor(valueAccessor), ((scope, value) => {
419
- (scope[valueAccessor] !== value || !(valueAccessor in scope)) && (scope[valueAccessor] = value, fn?.(scope));
406
+ scope[valueAccessor] === value && valueAccessor in scope || (scope[valueAccessor] = value, fn?.(scope));
420
407
  });
421
408
  }
422
409
  function _or(id, fn, defaultPending = 1, scopeIdAccessor = "L") {
@@ -537,14 +524,12 @@ function _hoist(...path) {
537
524
  function _hoist_resume(id, ...path) {
538
525
  return _resumed[id] = _hoist(...path);
539
526
  }
540
- //#endregion
541
- //#region src/dom/walker.ts
527
+ // src/dom/walker.ts
542
528
  /** Cloned templates are small, where a TreeWalker's per-step cost dominates. */
543
529
  function walk(startNode, walkCodes, branch) {
544
530
  currentNode = startNode, walkInternal(0, walkCodes, branch);
545
531
  }
546
- //#endregion
547
- //#region src/dom/resume.ts
532
+ // src/dom/resume.ts
548
533
  function ready(readyId) {
549
534
  (readyIds ||= /* @__PURE__ */ new Set()).add(readyId);
550
535
  for (let renderId in curRenders) runResumeEffects(curRenders[renderId]);
@@ -581,21 +566,21 @@ function init(runtimeId = "M") {
581
566
  if (visitType === "*") {
582
567
  for (; reorderBranch && pending.length >= reorderDepth;) adopt(pending.pop(), reorderBranch);
583
568
  (reorderBranch = +lastToken && visitScope) && (reorderDepth = pending.push(reorderBranch));
584
- return;
585
- }
586
- for (visitType !== "[" && (visitScope[nextToken()] = visitType === ")" || visitType === "}" ? parent : visit, accessor = "A" + (nodeAccessor = lastToken), singleNode = visitType !== "]" && visitType !== ")", nextToken()); branchId = +lastToken;) {
587
- if ((endedBranches ||= []).push(branch = getScope(branchId)), setParentBranch(branch, branch.F), (branch.O = render.p?.[branchId]) && (branch.O.m = render.m), singleNode) {
588
- for (; startVisit.previousSibling && (startVisit = startVisit.previousSibling).nodeType > 1;);
589
- branch._ ??= visitScope, branch.K = branch.S = startVisit, visitType === "(" && (branch.a = startVisit);
590
- } else branch.C = nodeAccessor, curBranchScopes = push(curBranchScopes, branch), accessor && (visitScope[accessor] = curBranchScopes, forEach(curBranchScopes, (scope) => scope._ ??= visitScope), curBranchScopes = branchScopesStack.pop()), startVisit = branchStarts.pop(), parent !== startVisit.parentNode && parent.prepend(startVisit), branch.S = startVisit, branch.K = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
591
- for (; pending.at(-1)?.L >= branchId;) adopt(pending.pop(), branch);
592
- nextToken();
593
- }
594
- if (endedBranches) {
595
- for (let ended of endedBranches) pending.push(ended);
596
- singleNode && (visitScope[accessor] = endedBranches.length > 1 ? endedBranches.reverse() : endedBranches[0]);
569
+ } else {
570
+ for (visitType !== "[" && (visitScope[nextToken()] = visitType === ")" || visitType === "}" ? parent : visit, accessor = "A" + (nodeAccessor = lastToken), singleNode = visitType !== "]" && visitType !== ")", nextToken()); branchId = +lastToken;) {
571
+ if ((endedBranches ||= []).push(branch = getScope(branchId)), setParentBranch(branch, branch.F), (branch.O = render.p?.[branchId]) && (branch.O.m = render.m), singleNode) {
572
+ for (; startVisit.previousSibling && (startVisit = startVisit.previousSibling).nodeType > 1;);
573
+ branch._ ??= visitScope, branch.K = branch.S = startVisit, visitType === "(" && (branch.a = startVisit);
574
+ } else branch.C = nodeAccessor, curBranchScopes = push(curBranchScopes, branch), accessor && (visitScope[accessor] = curBranchScopes, forEach(curBranchScopes, (scope) => scope._ ??= visitScope), curBranchScopes = branchScopesStack.pop()), startVisit = branchStarts.pop(), parent !== startVisit.parentNode && parent.prepend(startVisit), branch.S = startVisit, branch.K = visit.previousSibling === startVisit ? startVisit : parent.insertBefore(new Text(), visit);
575
+ for (; pending.at(-1)?.L >= branchId;) adopt(pending.pop(), branch);
576
+ nextToken();
577
+ }
578
+ if (endedBranches) {
579
+ for (let ended of endedBranches) pending.push(ended);
580
+ singleNode && (visitScope[accessor] = endedBranches.length > 1 ? endedBranches.reverse() : endedBranches[0]);
581
+ }
582
+ visitType === "[" ? (endedBranches || (branchScopesStack.push(curBranchScopes), curBranchScopes = void 0), branchStarts.push(visit)) : pending.push(visitScope);
597
583
  }
598
- visitType === "[" ? (endedBranches || (branchScopesStack.push(curBranchScopes), curBranchScopes = void 0), branchStarts.push(visit)) : pending.push(visitScope);
599
584
  }, nextToken = (_) => lastToken = visitText.slice(lastTokenIndex, (lastTokenIndex = visitText.indexOf(" ", lastTokenIndex) + 1 || visitText.length + 1) - 1), processResumes = (resumes = [], effects) => {
600
585
  let i = 0;
601
586
  for (; i < resumes.length; i++) {
@@ -657,8 +642,7 @@ function _dynamic_tag_var_resume(accessor) {
657
642
  return node.nodeType === 8 ? node.previousSibling : node;
658
643
  };
659
644
  }
660
- //#endregion
661
- //#region src/dom/renderer.ts
645
+ // src/dom/renderer.ts
662
646
  function createBranch($global, renderer, parentScope, parentNode) {
663
647
  let branch = createScope($global);
664
648
  return branch._ = renderer.e || parentScope, setParentBranch(branch, parentScope?.F), renderer.b?.(branch, parentNode.namespaceURI), branch;
@@ -722,8 +706,7 @@ function createCloneableHTML(html, ns) {
722
706
  clone.namespaceURI = ns, walk(clone.firstChild, walks, branch), branch.S = clone.firstChild, branch.K = clone.lastChild;
723
707
  };
724
708
  }
725
- //#endregion
726
- //#region src/dom/dom.ts
709
+ // src/dom/dom.ts
727
710
  function _to_text(value) {
728
711
  return value || value === 0 ? value + "" : "";
729
712
  }
@@ -854,8 +837,7 @@ function insertChildNodes(parentNode, referenceNode, startNode, endNode) {
854
837
  parentNode.insertBefore(startNode, referenceNode), startNode = next;
855
838
  }
856
839
  }
857
- //#endregion
858
- //#region src/dom/resolve-cursor-position.ts
840
+ // src/dom/resolve-cursor-position.ts
859
841
  function resolveCursorPosition(inputType, initialPosition, initialValue, updatedValue) {
860
842
  if ((initialPosition || initialPosition === 0) && (initialPosition !== initialValue.length || /kw/.test(inputType))) {
861
843
  let before = initialValue.slice(0, initialPosition), after = initialValue.slice(initialPosition);
@@ -867,8 +849,7 @@ function resolveCursorPosition(inputType, initialPosition, initialValue, updated
867
849
  }
868
850
  return -1;
869
851
  }
870
- //#endregion
871
- //#region src/dom/controllable.ts
852
+ // src/dom/controllable.ts
872
853
  function _attr_input_checked_default(scope, nodeAccessor, checked) {
873
854
  let el = scope[nodeAccessor], normalizedChecked = isNotNullishOrFalse(checked);
874
855
  if (el.defaultChecked !== normalizedChecked) {
@@ -1059,8 +1040,7 @@ function _controllable_select(scope, nodeAccessor, nextAttrs) {
1059
1040
  function _controllable_open(scope, nodeAccessor, nextAttrs) {
1060
1041
  if ("open" in nextAttrs || "openChange" in nextAttrs) return _attr_details_or_dialog_open(scope, nodeAccessor, nextAttrs.open, nextAttrs.openChange), /^open(?:Change)?$/;
1061
1042
  }
1062
- //#endregion
1063
- //#region src/dom/control-flow.ts
1043
+ // src/dom/control-flow.ts
1064
1044
  function _await_promise(nodeAccessor, params) {
1065
1045
  nodeAccessor = decodeAccessor(nodeAccessor);
1066
1046
  let promiseAccessor = "L" + nodeAccessor, branchAccessor = "A" + nodeAccessor, tryAccessor = "Q" + nodeAccessor, resolveAwait = (scope, referenceNode, value) => {