marko 6.0.60 → 6.0.62

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.
package/dist/html.js CHANGED
@@ -18,74 +18,74 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0
18
18
  var html_exports = {};
19
19
  __export(html_exports, {
20
20
  $global: () => $global,
21
- attr: () => attr,
21
+ _attr: () => _attr,
22
+ _attr_class: () => _attr_class,
23
+ _attr_content: () => _attr_content,
24
+ _attr_details_open: () => _attr_details_or_dialog_open,
25
+ _attr_dialog_open: () => _attr_details_or_dialog_open,
26
+ _attr_input_checked: () => _attr_input_checked,
27
+ _attr_input_checkedValue: () => _attr_input_checkedValue,
28
+ _attr_input_value: () => _attr_input_value,
29
+ _attr_option_value: () => _attr_option_value,
30
+ _attr_select_value: () => _attr_select_value,
31
+ _attr_style: () => _attr_style,
32
+ _attr_textarea_value: () => _attr_textarea_value,
33
+ _attrs: () => _attrs,
34
+ _attrs_content: () => _attrs_content,
35
+ _attrs_partial: () => _attrs_partial,
36
+ _attrs_partial_content: () => _attrs_partial_content,
37
+ _await: () => _await,
38
+ _content: () => _content,
39
+ _content_resume: () => _content_resume,
40
+ _dynamic_tag: () => _dynamic_tag,
41
+ _el: () => _el,
42
+ _el_resume: () => _el_resume,
43
+ _escape: () => _escape,
44
+ _escape_script: () => _escape_script,
45
+ _escape_style: () => _escape_style,
46
+ _existing_scope: () => _existing_scope,
47
+ _for_in: () => _for_in,
48
+ _for_of: () => _for_of,
49
+ _for_to: () => _for_to,
50
+ _hoist: () => _hoist,
51
+ _html: () => _html,
52
+ _id: () => _id,
53
+ _if: () => _if,
54
+ _peek_scope_id: () => _peek_scope_id,
55
+ _resume: () => _resume,
56
+ _resume_branch: () => _resume_branch,
57
+ _scope: () => writeScope,
58
+ _scope_id: () => _scope_id,
59
+ _scope_with_id: () => _scope_with_id,
60
+ _script: () => _script,
61
+ _sep: () => _sep,
62
+ _serialize_guard: () => _serialize_guard,
63
+ _serialize_if: () => _serialize_if,
64
+ _subscribe: () => _subscribe,
65
+ _template: () => _template,
66
+ _trailers: () => _trailers,
67
+ _try: () => _try,
68
+ _unescaped: () => _unescaped,
69
+ _var: () => _var,
22
70
  attrTag: () => attrTag,
23
71
  attrTags: () => attrTags,
24
- attrs: () => attrs,
25
- classAttr: () => classAttr,
26
- commentSeparator: () => commentSeparator,
27
72
  compat: () => compat,
28
- controllable_detailsOrDialog_open: () => controllable_detailsOrDialog_open,
29
- controllable_input_checked: () => controllable_input_checked,
30
- controllable_input_checkedValue: () => controllable_input_checkedValue,
31
- controllable_input_value: () => controllable_input_value,
32
- controllable_select_value: () => controllable_select_value,
33
- controllable_textarea_value: () => controllable_textarea_value,
34
- createContent: () => createContent,
35
- createTemplate: () => createTemplate,
36
- dynamicTag: () => dynamicTag,
37
- ensureScopeWithId: () => ensureScopeWithId,
38
- escapeScript: () => escapeScript,
39
- escapeStyle: () => escapeStyle,
40
- escapeXML: () => escapeXML,
41
73
  forIn: () => forIn,
42
74
  forInBy: () => forInBy,
43
75
  forOf: () => forOf,
44
76
  forOfBy: () => forOfBy,
45
77
  forTo: () => forTo,
46
- forToBy: () => forToBy,
47
- fork: () => fork,
48
- getScopeById: () => getScopeById,
49
- hoist: () => hoist,
50
- markResumeNode: () => markResumeNode,
51
- nextScopeId: () => nextScopeId,
52
- nextTagId: () => nextTagId,
53
- nodeRef: () => nodeRef,
54
- optionValueAttr: () => optionValueAttr,
55
- partialAttrs: () => partialAttrs,
56
- peekNextScopeId: () => peekNextScopeId,
57
- register: () => register2,
58
- registerContent: () => registerContent,
59
- resumeClosestBranch: () => resumeClosestBranch,
60
- resumeConditional: () => resumeConditional,
61
- resumeForIn: () => resumeForIn,
62
- resumeForOf: () => resumeForOf,
63
- resumeForTo: () => resumeForTo,
64
- serializeGuard: () => serializeGuard,
65
- serializeIf: () => serializeIf,
66
- setTagVar: () => setTagVar,
67
- styleAttr: () => styleAttr,
68
- toString: () => toString,
69
- tryContent: () => tryContent,
70
- write: () => write,
71
- writeAttrsAndContent: () => writeAttrsAndContent,
72
- writeContent: () => writeContent,
73
- writeEffect: () => writeEffect,
74
- writeExistingScope: () => writeExistingScope,
75
- writePartialAttrsAndContent: () => writePartialAttrsAndContent,
76
- writeScope: () => writeScope,
77
- writeSubscribe: () => writeSubscribe,
78
- writeTrailers: () => writeTrailers
78
+ forToBy: () => forToBy
79
79
  });
80
80
  module.exports = __toCommonJS(html_exports);
81
81
 
82
82
  // src/common/attr-tag.ts
83
83
  var empty = [], rest = Symbol();
84
- function attrTag(attrs2) {
85
- return attrs2[Symbol.iterator] = attrTagIterator, attrs2[rest] = empty, attrs2;
84
+ function attrTag(attrs) {
85
+ return attrs[Symbol.iterator] = attrTagIterator, attrs[rest] = empty, attrs;
86
86
  }
87
- function attrTags(first, attrs2) {
88
- return first ? (first[rest] === empty ? first[rest] = [attrs2] : first[rest].push(attrs2), first) : attrTag(attrs2);
87
+ function attrTags(first, attrs) {
88
+ return first ? (first[rest] === empty ? first[rest] = [attrs] : first[rest].push(attrs), first) : attrTag(attrs);
89
89
  }
90
90
  function* attrTagIterator() {
91
91
  yield this, yield* this[rest];
@@ -131,22 +131,22 @@ function normalizeDynamicRenderer(value) {
131
131
  }
132
132
 
133
133
  // src/html/content.ts
134
- function toString(val) {
134
+ function _unescaped(val) {
135
135
  return val ? val + "" : val === 0 ? "0" : "";
136
136
  }
137
137
  var unsafeXMLReg = /[<&]/g, replaceUnsafeXML = (c) => c === "&" ? "&amp;" : "&lt;", escapeXMLStr = (str) => unsafeXMLReg.test(str) ? str.replace(unsafeXMLReg, replaceUnsafeXML) : str;
138
- function escapeXML(val) {
138
+ function _escape(val) {
139
139
  return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "&zwj;";
140
140
  }
141
141
  function escapeTextAreaValue(val) {
142
142
  return val ? escapeXMLStr(val + "") : val === 0 ? "0" : "";
143
143
  }
144
144
  var unsafeScriptReg = /<\/script/g, escapeScriptStr = (str) => unsafeScriptReg.test(str) ? str.replace(unsafeScriptReg, "\\x3C/script") : str;
145
- function escapeScript(val) {
145
+ function _escape_script(val) {
146
146
  return val ? escapeScriptStr(val + "") : val === 0 ? "0" : "";
147
147
  }
148
148
  var unsafeStyleReg = /<\/style/g, escapeStyleStr = (str) => unsafeStyleReg.test(str) ? str.replace(unsafeStyleReg, "\\3C/style") : str;
149
- function escapeStyle(val) {
149
+ function _escape_style(val) {
150
150
  return val ? escapeStyleStr(val + "") : val === 0 ? "0" : "";
151
151
  }
152
152
 
@@ -565,7 +565,7 @@ function writeProp(state, val, parent, accessor) {
565
565
  return !1;
566
566
  }
567
567
  }
568
- function writeReferenceOr(state, write2, val, parent, accessor) {
568
+ function writeReferenceOr(state, write, val, parent, accessor) {
569
569
  let ref = state.refs.get(val);
570
570
  if (ref)
571
571
  return ref.init ? (addAssignment(ref, ensureId(state, parent) + toAccess(accessor)), !1) : isCircular(parent, ref) ? (ref.assigns || (ensureId(state, ref), state.assigned.add(ref)), addAssignment(ref, ensureId(state, parent) + toAccess(accessor)), !1) : (state.buf.push(ensureId(state, ref)), !0);
@@ -573,7 +573,7 @@ function writeReferenceOr(state, write2, val, parent, accessor) {
573
573
  return registered ? writeRegistered(state, val, parent, accessor, registered) : (state.refs.set(
574
574
  val,
575
575
  ref = new Reference(parent, accessor, state.flush, state.buf.length)
576
- ), write2(state, val, ref) ? !0 : (state.refs.delete(ref), !1));
576
+ ), write(state, val, ref) ? !0 : (state.refs.delete(ref), !1));
577
577
  }
578
578
  function writeRegistered(state, val, parent, accessor, { access, scope, getter }) {
579
579
  if (scope) {
@@ -1095,24 +1095,24 @@ function getState() {
1095
1095
  function getScopeId(scope) {
1096
1096
  return scope[K_SCOPE_ID];
1097
1097
  }
1098
- function write(html) {
1098
+ function _html(html) {
1099
1099
  $chunk.writeHTML(html);
1100
1100
  }
1101
1101
  function writeScript(script) {
1102
1102
  $chunk.writeScript(script);
1103
1103
  }
1104
- function writeEffect(scopeId, registryId) {
1104
+ function _script(scopeId, registryId) {
1105
1105
  $chunk.boundary.state.needsMainRuntime = !0, $chunk.writeEffect(scopeId, registryId);
1106
1106
  }
1107
- function writeContent(nodeAccessor, scopeId, content, serializeReason) {
1108
- let shouldResume = serializeReason !== 0, render2 = normalizeServerRender(content), branchId = peekNextScopeId();
1109
- render2 && (shouldResume ? withBranchId(branchId, render2) : render2()), peekNextScopeId() !== branchId ? shouldResume && writeScope(scopeId, {
1107
+ function _attr_content(nodeAccessor, scopeId, content, serializeReason) {
1108
+ let shouldResume = serializeReason !== 0, render2 = normalizeServerRender(content), branchId = _peek_scope_id();
1109
+ render2 && (shouldResume ? withBranchId(branchId, render2) : render2()), _peek_scope_id() !== branchId ? shouldResume && writeScope(scopeId, {
1110
1110
  ["d" /* ConditionalScope */ + nodeAccessor]: writeScope(
1111
1111
  branchId,
1112
1112
  {}
1113
1113
  ),
1114
1114
  ["c" /* ConditionalRenderer */ + nodeAccessor]: render2?.h
1115
- }) : nextScopeId();
1115
+ }) : _scope_id();
1116
1116
  }
1117
1117
  function normalizeServerRender(value) {
1118
1118
  let renderer = normalizeDynamicRenderer(value);
@@ -1129,55 +1129,55 @@ function withContext(key, value, cb) {
1129
1129
  ctx[kPendingContexts]--, ctx[key] = prev;
1130
1130
  }
1131
1131
  }
1132
- function setTagVar(parentScopeId, scopeOffsetAccessor, childScopeId, registryId) {
1133
- ensureScopeWithId(parentScopeId)[scopeOffsetAccessor] = nextScopeId(), ensureScopeWithId(childScopeId).e = register2(
1132
+ function _var(parentScopeId, scopeOffsetAccessor, childScopeId, registryId) {
1133
+ _scope_with_id(parentScopeId)[scopeOffsetAccessor] = _scope_id(), _scope_with_id(childScopeId).e = _resume(
1134
1134
  {},
1135
1135
  registryId,
1136
1136
  parentScopeId
1137
1137
  );
1138
1138
  }
1139
- function register2(val, id, scopeId) {
1140
- return scopeId === void 0 ? register(id, val) : register(id, val, ensureScopeWithId(scopeId));
1139
+ function _resume(val, id, scopeId) {
1140
+ return scopeId === void 0 ? register(id, val) : register(id, val, _scope_with_id(scopeId));
1141
1141
  }
1142
- function nextTagId() {
1142
+ function _id() {
1143
1143
  let state = $chunk.boundary.state, { $global: $global2 } = state;
1144
1144
  return "s" + $global2.runtimeId + $global2.renderId + (state.tagId++).toString(36);
1145
1145
  }
1146
- function nextScopeId() {
1146
+ function _scope_id() {
1147
1147
  return $chunk.boundary.state.scopeId++;
1148
1148
  }
1149
- function peekNextScopeId() {
1149
+ function _peek_scope_id() {
1150
1150
  return $chunk.boundary.state.scopeId;
1151
1151
  }
1152
1152
  function getScopeById(scopeId) {
1153
1153
  if (scopeId !== void 0)
1154
1154
  return $chunk.boundary.state.scopes.get(scopeId);
1155
1155
  }
1156
- function serializeIf(condition, key) {
1156
+ function _serialize_if(condition, key) {
1157
1157
  return condition && (condition === 1 || condition[key]) ? 1 : void 0;
1158
1158
  }
1159
- function serializeGuard(condition, key) {
1159
+ function _serialize_guard(condition, key) {
1160
1160
  return condition && (condition === 1 || condition[key]) ? 1 : 0;
1161
1161
  }
1162
- function markResumeNode(scopeId, accessor, shouldResume) {
1162
+ function _el_resume(scopeId, accessor, shouldResume) {
1163
1163
  if (shouldResume === 0) return "";
1164
1164
  let { state } = $chunk.boundary;
1165
1165
  return state.needsMainRuntime = !0, state.mark("*" /* Node */, scopeId + " " + accessor);
1166
1166
  }
1167
- function commentSeparator(shouldResume) {
1167
+ function _sep(shouldResume) {
1168
1168
  return shouldResume === 0 ? "" : "<!>";
1169
1169
  }
1170
- function nodeRef(scopeId, id) {
1170
+ function _el(scopeId, id) {
1171
1171
  let getter = () => {
1172
1172
  };
1173
- return id ? register2(getter, id, scopeId) : getter;
1173
+ return id ? _resume(getter, id, scopeId) : getter;
1174
1174
  }
1175
- function hoist(scopeId, id) {
1175
+ function _hoist(scopeId, id) {
1176
1176
  let getter = () => {
1177
1177
  };
1178
- return getter[Symbol.iterator] = getter, id ? register2(getter, id, scopeId) : getter;
1178
+ return getter[Symbol.iterator] = getter, id ? _resume(getter, id, scopeId) : getter;
1179
1179
  }
1180
- function resumeClosestBranch(scopeId) {
1180
+ function _resume_branch(scopeId) {
1181
1181
  let branchId = $chunk.context?.[branchIdKey];
1182
1182
  branchId !== void 0 && branchId !== scopeId && writeScope(scopeId, { g: branchId });
1183
1183
  }
@@ -1188,15 +1188,15 @@ function isInResumedBranch() {
1188
1188
  function withBranchId(branchId, cb) {
1189
1189
  return withContext(branchIdKey, branchId, cb);
1190
1190
  }
1191
- function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag, singleNode) {
1192
- let { state } = $chunk.boundary, resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, singleNodeBranchIds = "";
1191
+ function _for_of(list, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag, singleNode) {
1192
+ let { state } = $chunk.boundary, resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, flushBranchIds = "";
1193
1193
  if (resumeBranch) {
1194
1194
  let loopScopes = /* @__PURE__ */ new Map();
1195
1195
  forOf(list, (item, index) => {
1196
- let branchId = peekNextScopeId();
1197
- resumeMarker && (singleNode ? singleNodeBranchIds = " " + branchId + singleNodeBranchIds : $chunk.writeHTML(
1198
- state.mark("[" /* BranchStart */, branchId + (index ? " " : ""))
1199
- )), withBranchId(branchId, () => {
1196
+ let branchId = _peek_scope_id();
1197
+ resumeMarker && (singleNode ? flushBranchIds = " " + branchId + flushBranchIds : ($chunk.writeHTML(
1198
+ state.mark("[" /* BranchStart */, flushBranchIds)
1199
+ ), flushBranchIds = branchId + "")), withBranchId(branchId, () => {
1200
1200
  cb(item, index), loopScopes.set(forOfBy(by, item, index), writeScope(branchId, {}));
1201
1201
  });
1202
1202
  }), loopScopes.size && writeScope(scopeId, {
@@ -1207,23 +1207,22 @@ function resumeForOf(list, cb, by, scopeId, accessor, serializeBranch, serialize
1207
1207
  writeBranchEnd(
1208
1208
  scopeId,
1209
1209
  accessor,
1210
+ resumeBranch,
1210
1211
  resumeMarker,
1211
1212
  parentEndTag,
1212
- resumeMarker && (!parentEndTag || resumeBranch) && (singleNode ? state.mark(
1213
- parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
1214
- scopeId + " " + accessor + singleNodeBranchIds
1215
- ) : state.mark("]" /* BranchEnd */, scopeId + " " + accessor))
1213
+ singleNode,
1214
+ singleNode ? flushBranchIds : flushBranchIds ? " " + flushBranchIds : ""
1216
1215
  );
1217
1216
  }
1218
- function resumeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag, singleNode) {
1219
- let { state } = $chunk.boundary, resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, singleNodeBranchIds = "";
1217
+ function _for_in(obj, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag, singleNode) {
1218
+ let { state } = $chunk.boundary, resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, flushBranchIds = "";
1220
1219
  if (resumeBranch) {
1221
- let loopScopes = /* @__PURE__ */ new Map(), sep = "";
1220
+ let loopScopes = /* @__PURE__ */ new Map();
1222
1221
  forIn(obj, (key, value) => {
1223
- let branchId = peekNextScopeId();
1224
- resumeMarker && (singleNode ? singleNodeBranchIds = " " + branchId + singleNodeBranchIds : ($chunk.writeHTML(
1225
- state.mark("[" /* BranchStart */, branchId + sep)
1226
- ), sep = " ")), withBranchId(branchId, () => {
1222
+ let branchId = _peek_scope_id();
1223
+ resumeMarker && (singleNode ? flushBranchIds = " " + branchId + flushBranchIds : ($chunk.writeHTML(
1224
+ state.mark("[" /* BranchStart */, flushBranchIds)
1225
+ ), flushBranchIds = branchId + "")), withBranchId(branchId, () => {
1227
1226
  cb(key, value), loopScopes.set(forInBy(by, key, value), writeScope(branchId, {}));
1228
1227
  });
1229
1228
  }), loopScopes.size && writeScope(scopeId, {
@@ -1234,23 +1233,22 @@ function resumeForIn(obj, cb, by, scopeId, accessor, serializeBranch, serializeM
1234
1233
  writeBranchEnd(
1235
1234
  scopeId,
1236
1235
  accessor,
1236
+ resumeBranch,
1237
1237
  resumeMarker,
1238
1238
  parentEndTag,
1239
- resumeMarker && (!parentEndTag || resumeBranch) && (singleNode ? state.mark(
1240
- parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
1241
- scopeId + " " + accessor + singleNodeBranchIds
1242
- ) : state.mark("]" /* BranchEnd */, scopeId + " " + accessor))
1239
+ singleNode,
1240
+ singleNode ? flushBranchIds : flushBranchIds ? " " + flushBranchIds : ""
1243
1241
  );
1244
1242
  }
1245
- function resumeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag, singleNode) {
1246
- let { state } = $chunk.boundary, resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, singleNodeBranchIds = "";
1243
+ function _for_to(to, from, step, cb, by, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag, singleNode) {
1244
+ let { state } = $chunk.boundary, resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, flushBranchIds = "";
1247
1245
  if (resumeBranch) {
1248
- let loopScopes = /* @__PURE__ */ new Map(), sep = "";
1246
+ let loopScopes = /* @__PURE__ */ new Map();
1249
1247
  forTo(to, from, step, (i) => {
1250
- let branchId = peekNextScopeId();
1251
- resumeMarker && (singleNode ? singleNodeBranchIds = " " + branchId + singleNodeBranchIds : ($chunk.writeHTML(
1252
- state.mark("[" /* BranchStart */, branchId + sep)
1253
- ), sep = " ")), withBranchId(branchId, () => {
1248
+ let branchId = _peek_scope_id();
1249
+ resumeMarker && (singleNode ? flushBranchIds = " " + branchId + flushBranchIds : ($chunk.writeHTML(
1250
+ state.mark("[" /* BranchStart */, flushBranchIds)
1251
+ ), flushBranchIds = branchId + "")), withBranchId(branchId, () => {
1254
1252
  cb(i), loopScopes.set(forToBy(by, i), writeScope(branchId, {}));
1255
1253
  });
1256
1254
  }), loopScopes.size && writeScope(scopeId, {
@@ -1261,17 +1259,16 @@ function resumeForTo(to, from, step, cb, by, scopeId, accessor, serializeBranch,
1261
1259
  writeBranchEnd(
1262
1260
  scopeId,
1263
1261
  accessor,
1262
+ resumeBranch,
1264
1263
  resumeMarker,
1265
1264
  parentEndTag,
1266
- resumeMarker && (!parentEndTag || resumeBranch) && (singleNode ? state.mark(
1267
- parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
1268
- scopeId + " " + accessor + singleNodeBranchIds
1269
- ) : state.mark("]" /* BranchEnd */, scopeId + " " + accessor))
1265
+ singleNode,
1266
+ singleNode ? flushBranchIds : flushBranchIds ? " " + flushBranchIds : ""
1270
1267
  );
1271
1268
  }
1272
- function resumeConditional(cb, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag, singleNode) {
1273
- let { state } = $chunk.boundary, resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchId = peekNextScopeId();
1274
- resumeMarker && resumeBranch && !singleNode && $chunk.writeHTML(state.mark("[" /* BranchStart */, branchId + ""));
1269
+ function _if(cb, scopeId, accessor, serializeBranch, serializeMarker, parentEndTag, singleNode) {
1270
+ let { state } = $chunk.boundary, resumeBranch = serializeBranch !== 0, resumeMarker = serializeMarker !== 0, branchId = _peek_scope_id();
1271
+ resumeMarker && resumeBranch && !singleNode && $chunk.writeHTML(state.mark("[" /* BranchStart */, ""));
1275
1272
  let branchIndex = resumeBranch ? withBranchId(branchId, cb) : cb(), shouldWriteBranch = resumeBranch && branchIndex !== void 0;
1276
1273
  shouldWriteBranch && writeScope(scopeId, {
1277
1274
  ["c" /* ConditionalRenderer */ + accessor]: resumeMarker ? branchIndex : void 0,
@@ -1279,46 +1276,58 @@ function resumeConditional(cb, scopeId, accessor, serializeBranch, serializeMark
1279
1276
  }), writeBranchEnd(
1280
1277
  scopeId,
1281
1278
  accessor,
1279
+ resumeBranch,
1282
1280
  resumeMarker,
1283
1281
  parentEndTag,
1284
- resumeMarker && (!parentEndTag || resumeBranch) && (singleNode ? state.mark(
1285
- parentEndTag ? "=" /* BranchSingleNodeOnlyChildInParent */ : "|" /* BranchSingleNode */,
1286
- scopeId + " " + accessor + (shouldWriteBranch ? " " + branchId : "")
1287
- ) : state.mark("]" /* BranchEnd */, scopeId + " " + accessor))
1282
+ singleNode,
1283
+ shouldWriteBranch ? " " + branchId : ""
1288
1284
  );
1289
1285
  }
1290
- function writeBranchEnd(scopeId, accessor, resumeMarker, parentEndTag, mark) {
1286
+ function writeBranchEnd(scopeId, accessor, resumeBranch, resumeMarker, parentEndTag, singleNode, branchIds) {
1291
1287
  let endTag = parentEndTag || "";
1292
- resumeMarker ? mark ? $chunk.writeHTML(mark + endTag) : $chunk.writeHTML(endTag + markResumeNode(scopeId, accessor)) : $chunk.writeHTML(endTag);
1288
+ if (resumeMarker)
1289
+ if (!parentEndTag || resumeBranch) {
1290
+ let { state } = $chunk.boundary, mark = singleNode ? state.mark(
1291
+ parentEndTag ? "}" /* BranchEndSingleNodeOnlyChildInParent */ : "|" /* BranchEndSingleNode */,
1292
+ scopeId + " " + accessor + (branchIds || "")
1293
+ ) : state.mark(
1294
+ parentEndTag ? ")" /* BranchEndOnlyChildInParent */ : "]" /* BranchEnd */,
1295
+ scopeId + " " + accessor + (branchIds || "")
1296
+ );
1297
+ $chunk.writeHTML(mark + endTag);
1298
+ } else
1299
+ $chunk.writeHTML(endTag + _el_resume(scopeId, accessor));
1300
+ else
1301
+ $chunk.writeHTML(endTag);
1293
1302
  }
1294
1303
  var writeScope = (scopeId, partialScope) => writeScopeToState($chunk.boundary.state, scopeId, partialScope);
1295
1304
  function writeScopeToState(state, scopeId, partialScope) {
1296
1305
  let { scopes } = state, scope = scopes.get(scopeId);
1297
1306
  return state.needsMainRuntime = !0, scope ? Object.assign(scope, partialScope) : (scope = partialScope, scope[K_SCOPE_ID] = scopeId, state.scopes.set(scopeId, scope)), state.writeScopes ? state.writeScopes[scopeId] = scope : state.writeScopes = { [scopeId]: scope }, scope;
1298
1307
  }
1299
- function writeExistingScope(scopeId) {
1300
- return writeScope(scopeId, ensureScopeWithId(scopeId));
1308
+ function _existing_scope(scopeId) {
1309
+ return writeScope(scopeId, _scope_with_id(scopeId));
1301
1310
  }
1302
- function ensureScopeWithId(scopeId) {
1311
+ function _scope_with_id(scopeId) {
1303
1312
  let { state } = $chunk.boundary, scope = state.scopes.get(scopeId);
1304
1313
  return scope || (scope = { [K_SCOPE_ID]: scopeId }, state.scopes.set(scopeId, scope)), scope;
1305
1314
  }
1306
1315
  function $global() {
1307
1316
  return $chunk.boundary.state.$global;
1308
1317
  }
1309
- function fork(scopeId, accessor, promise, content, serializeMarker) {
1318
+ function _await(scopeId, accessor, promise, content, serializeMarker) {
1310
1319
  let resumeMarker = serializeMarker !== 0;
1311
1320
  if (!isPromise(promise)) {
1312
1321
  if (resumeMarker) {
1313
- let branchId = peekNextScopeId();
1322
+ let branchId = _peek_scope_id();
1314
1323
  $chunk.writeHTML(
1315
- $chunk.boundary.state.mark("[" /* BranchStart */, branchId + "")
1324
+ $chunk.boundary.state.mark("[" /* BranchStart */, "")
1316
1325
  ), content(promise), writeScope(scopeId, {
1317
1326
  ["d" /* ConditionalScope */ + accessor]: writeScope(branchId, {})
1318
1327
  }), $chunk.writeHTML(
1319
1328
  $chunk.boundary.state.mark(
1320
1329
  "]" /* BranchEnd */,
1321
- scopeId + " " + accessor
1330
+ scopeId + " " + accessor + " " + branchId
1322
1331
  )
1323
1332
  );
1324
1333
  } else
@@ -1330,20 +1339,17 @@ function fork(scopeId, accessor, promise, content, serializeMarker) {
1330
1339
  (value) => {
1331
1340
  chunk.async && (chunk.async = !1, boundary.signal.aborted || (chunk.render(() => {
1332
1341
  if (resumeMarker) {
1333
- let branchId = peekNextScopeId();
1342
+ let branchId = _peek_scope_id();
1334
1343
  $chunk.writeHTML(
1335
- $chunk.boundary.state.mark(
1336
- "[" /* BranchStart */,
1337
- branchId + ""
1338
- )
1344
+ $chunk.boundary.state.mark("[" /* BranchStart */, "")
1339
1345
  ), content(value), boundary.state.serializer.writeAssign(
1340
1346
  writeScope(branchId, {}),
1341
- ensureScopeWithId(scopeId),
1347
+ _scope_with_id(scopeId),
1342
1348
  "d" /* ConditionalScope */ + accessor
1343
1349
  ), $chunk.writeHTML(
1344
1350
  $chunk.boundary.state.mark(
1345
1351
  "]" /* BranchEnd */,
1346
- scopeId + " " + accessor
1352
+ scopeId + " " + accessor + " " + branchId
1347
1353
  )
1348
1354
  );
1349
1355
  } else
@@ -1355,11 +1361,9 @@ function fork(scopeId, accessor, promise, content, serializeMarker) {
1355
1361
  }
1356
1362
  );
1357
1363
  }
1358
- function tryContent(scopeId, accessor, content, input) {
1359
- let branchId = peekNextScopeId();
1360
- $chunk.writeHTML(
1361
- $chunk.boundary.state.mark("[" /* BranchStart */, branchId + "")
1362
- );
1364
+ function _try(scopeId, accessor, content, input) {
1365
+ let branchId = _peek_scope_id();
1366
+ $chunk.writeHTML($chunk.boundary.state.mark("[" /* BranchStart */, ""));
1363
1367
  let catchContent = normalizeDynamicRenderer(input.catch), placeholderContent = normalizeDynamicRenderer(input.placeholder);
1364
1368
  catchContent ? tryCatch(
1365
1369
  placeholderContent ? () => tryPlaceholder(content, placeholderContent) : content,
@@ -1373,7 +1377,7 @@ function tryContent(scopeId, accessor, content, input) {
1373
1377
  }), $chunk.writeHTML(
1374
1378
  $chunk.boundary.state.mark(
1375
1379
  "]" /* BranchEnd */,
1376
- scopeId + " " + accessor
1380
+ scopeId + " " + accessor + " " + branchId
1377
1381
  )
1378
1382
  );
1379
1383
  }
@@ -1607,7 +1611,7 @@ function flushSerializer(boundary) {
1607
1611
  ), state.lastSerializedScopeId = lastSerializedScopeId, state.writeScopes = null, flushed && (state.walkOnNextFlush = !0);
1608
1612
  }
1609
1613
  }
1610
- function writeTrailers(html) {
1614
+ function _trailers(html) {
1611
1615
  $chunk.boundary.state.trailerHTML += html;
1612
1616
  }
1613
1617
  function concatEffects(a, b) {
@@ -1650,23 +1654,23 @@ function getFilteredGlobals($global2) {
1650
1654
  }
1651
1655
  return filtered;
1652
1656
  }
1653
- function writeSubscribe(subscribers, scope) {
1657
+ function _subscribe(subscribers, scope) {
1654
1658
  return $chunk.boundary.state.serializer.writeCall(scope, subscribers, "add"), scope;
1655
1659
  }
1656
1660
 
1657
1661
  // src/html/attrs.ts
1658
- function classAttr(value) {
1662
+ function _attr_class(value) {
1659
1663
  return stringAttr("class", classValue(value));
1660
1664
  }
1661
- function styleAttr(value) {
1665
+ function _attr_style(value) {
1662
1666
  return stringAttr("style", styleValue(value));
1663
1667
  }
1664
- function optionValueAttr(value) {
1668
+ function _attr_option_value(value) {
1665
1669
  let selectedValue = getContext(kSelectedValue);
1666
- return attr("value", value) + (!isVoid(value) && (Array.isArray(selectedValue) ? selectedValue.includes(value) : selectedValue === value) ? " selected" : "");
1670
+ return _attr("value", value) + (!isVoid(value) && (Array.isArray(selectedValue) ? selectedValue.includes(value) : selectedValue === value) ? " selected" : "");
1667
1671
  }
1668
1672
  var kSelectedValue = Symbol("selectedValue");
1669
- function controllable_select_value(scopeId, nodeAccessor, value, valueChange, content) {
1673
+ function _attr_select_value(scopeId, nodeAccessor, value, valueChange, content) {
1670
1674
  valueChange && writeControlledScope(
1671
1675
  3 /* SelectValue */,
1672
1676
  scopeId,
@@ -1675,7 +1679,7 @@ function controllable_select_value(scopeId, nodeAccessor, value, valueChange, co
1675
1679
  valueChange
1676
1680
  ), content && withContext(kSelectedValue, value, content);
1677
1681
  }
1678
- function controllable_textarea_value(scopeId, nodeAccessor, value, valueChange) {
1682
+ function _attr_textarea_value(scopeId, nodeAccessor, value, valueChange) {
1679
1683
  return valueChange && writeControlledScope(
1680
1684
  2 /* InputValue */,
1681
1685
  scopeId,
@@ -1684,26 +1688,26 @@ function controllable_textarea_value(scopeId, nodeAccessor, value, valueChange)
1684
1688
  valueChange
1685
1689
  ), escapeTextAreaValue(value);
1686
1690
  }
1687
- function controllable_input_value(scopeId, nodeAccessor, value, valueChange) {
1691
+ function _attr_input_value(scopeId, nodeAccessor, value, valueChange) {
1688
1692
  return valueChange && writeControlledScope(
1689
1693
  2 /* InputValue */,
1690
1694
  scopeId,
1691
1695
  nodeAccessor,
1692
1696
  void 0,
1693
1697
  valueChange
1694
- ), attr("value", value);
1698
+ ), _attr("value", value);
1695
1699
  }
1696
- function controllable_input_checked(scopeId, nodeAccessor, checked, checkedChange) {
1700
+ function _attr_input_checked(scopeId, nodeAccessor, checked, checkedChange) {
1697
1701
  return checkedChange && writeControlledScope(
1698
1702
  0 /* InputChecked */,
1699
1703
  scopeId,
1700
1704
  nodeAccessor,
1701
1705
  void 0,
1702
1706
  checkedChange
1703
- ), attr("checked", checked);
1707
+ ), _attr("checked", checked);
1704
1708
  }
1705
- function controllable_input_checkedValue(scopeId, nodeAccessor, checkedValue, checkedValueChange, value) {
1706
- let multiple = Array.isArray(checkedValue), valueAttr = attr("value", value);
1709
+ function _attr_input_checkedValue(scopeId, nodeAccessor, checkedValue, checkedValueChange, value) {
1710
+ let multiple = Array.isArray(checkedValue), valueAttr = _attr("value", value);
1707
1711
  return checkedValueChange && writeControlledScope(
1708
1712
  1 /* InputCheckedValue */,
1709
1713
  scopeId,
@@ -1712,31 +1716,31 @@ function controllable_input_checkedValue(scopeId, nodeAccessor, checkedValue, ch
1712
1716
  checkedValueChange
1713
1717
  ), (multiple ? checkedValue.includes(value) : checkedValue === value) ? valueAttr + " checked" : valueAttr;
1714
1718
  }
1715
- function controllable_detailsOrDialog_open(scopeId, nodeAccessor, open, openChange) {
1719
+ function _attr_details_or_dialog_open(scopeId, nodeAccessor, open, openChange) {
1716
1720
  return openChange && writeControlledScope(
1717
1721
  4 /* DetailsOrDialogOpen */,
1718
1722
  scopeId,
1719
1723
  nodeAccessor,
1720
1724
  open,
1721
1725
  openChange
1722
- ), attr("open", open);
1726
+ ), _attr("open", open);
1723
1727
  }
1724
- function attr(name, value) {
1728
+ function _attr(name, value) {
1725
1729
  return isVoid(value) ? "" : nonVoidAttr(name, value);
1726
1730
  }
1727
- function attrs(data, nodeAccessor, scopeId, tagName) {
1731
+ function _attrs(data, nodeAccessor, scopeId, tagName) {
1728
1732
  let result = "", skip = /[\s/>"'=]/, events;
1729
1733
  switch (tagName) {
1730
1734
  case "input":
1731
1735
  if (data.checkedChange)
1732
- result += controllable_input_checked(
1736
+ result += _attr_input_checked(
1733
1737
  scopeId,
1734
1738
  nodeAccessor,
1735
1739
  data.checked,
1736
1740
  data.checkedChange
1737
1741
  );
1738
1742
  else if (data.checkedValue || data.checkedValueChange)
1739
- result += controllable_input_checkedValue(
1743
+ result += _attr_input_checkedValue(
1740
1744
  scopeId,
1741
1745
  nodeAccessor,
1742
1746
  data.checkedValue,
@@ -1744,7 +1748,7 @@ function attrs(data, nodeAccessor, scopeId, tagName) {
1744
1748
  data.value
1745
1749
  );
1746
1750
  else if (data.valueChange)
1747
- result += controllable_input_value(
1751
+ result += _attr_input_value(
1748
1752
  scopeId,
1749
1753
  nodeAccessor,
1750
1754
  data.value,
@@ -1759,11 +1763,11 @@ function attrs(data, nodeAccessor, scopeId, tagName) {
1759
1763
  (data.value || data.valueChange) && (skip = /^value(?:Change)?$|[\s/>"'=]/);
1760
1764
  break;
1761
1765
  case "option":
1762
- data.value && (result += optionValueAttr(data.value), skip = /^value$|[\s/>"'=]/);
1766
+ data.value && (result += _attr_option_value(data.value), skip = /^value$|[\s/>"'=]/);
1763
1767
  break;
1764
1768
  case "details":
1765
1769
  case "dialog":
1766
- data.openChange && (result += controllable_detailsOrDialog_open(
1770
+ data.openChange && (result += _attr_details_or_dialog_open(
1767
1771
  scopeId,
1768
1772
  nodeAccessor,
1769
1773
  data.open,
@@ -1775,10 +1779,10 @@ function attrs(data, nodeAccessor, scopeId, tagName) {
1775
1779
  let value = data[name];
1776
1780
  switch (name) {
1777
1781
  case "class":
1778
- result += classAttr(value);
1782
+ result += _attr_class(value);
1779
1783
  break;
1780
1784
  case "style":
1781
- result += styleAttr(value);
1785
+ result += _attr_style(value);
1782
1786
  break;
1783
1787
  default:
1784
1788
  name && !(isVoid(value) || skip.test(name) || name === "content" && tagName !== "meta") && (isEventHandler(name) ? (events || (events = {}, writeScope(scopeId, {
@@ -1789,17 +1793,17 @@ function attrs(data, nodeAccessor, scopeId, tagName) {
1789
1793
  }
1790
1794
  return result;
1791
1795
  }
1792
- function writeAttrsAndContent(data, nodeAccessor, scopeId, tagName, serializeReason) {
1793
- write(`${attrs(data, nodeAccessor, scopeId, tagName)}>`), writeContent(nodeAccessor, scopeId, data?.content, serializeReason);
1796
+ function _attrs_content(data, nodeAccessor, scopeId, tagName, serializeReason) {
1797
+ _html(`${_attrs(data, nodeAccessor, scopeId, tagName)}>`), _attr_content(nodeAccessor, scopeId, data?.content, serializeReason);
1794
1798
  }
1795
- function partialAttrs(data, skip, nodeAccessor, scopeId, tagName) {
1799
+ function _attrs_partial(data, skip, nodeAccessor, scopeId, tagName) {
1796
1800
  let partial = {};
1797
1801
  for (let key in data)
1798
1802
  skip[key] || (partial[key] = data[key]);
1799
- return attrs(partial, nodeAccessor, scopeId, tagName);
1803
+ return _attrs(partial, nodeAccessor, scopeId, tagName);
1800
1804
  }
1801
- function writePartialAttrsAndContent(data, skip, nodeAccessor, scopeId, tagName, serializeReason) {
1802
- write(`${partialAttrs(data, skip, nodeAccessor, scopeId, tagName)}>`), writeContent(nodeAccessor, scopeId, data?.content, serializeReason);
1805
+ function _attrs_partial_content(data, skip, nodeAccessor, scopeId, tagName, serializeReason) {
1806
+ _html(`${_attrs_partial(data, skip, nodeAccessor, scopeId, tagName)}>`), _attr_content(nodeAccessor, scopeId, data?.content, serializeReason);
1803
1807
  }
1804
1808
  function writeControlledScope(type, scopeId, nodeAccessor, value, valueChange) {
1805
1809
  writeScope(scopeId, {
@@ -1853,7 +1857,7 @@ function replaceUnsafeDoubleQuoteAttrChar(match) {
1853
1857
  var RENDERER_REGISTER_ID = "$C_r", SET_SCOPE_REGISTER_ID = "$C_s", RENDER_BODY_ID = "$C_b";
1854
1858
 
1855
1859
  // src/html/template.ts
1856
- var createTemplate = (templateId, renderer) => (renderer.render = render, renderer._ = renderer, registerContent(templateId, renderer));
1860
+ var _template = (templateId, renderer) => (renderer.render = render, renderer._ = renderer, _content_resume(templateId, renderer));
1857
1861
  function isTemplate(renderer) {
1858
1862
  return !!renderer._;
1859
1863
  }
@@ -1971,12 +1975,12 @@ var ServerRendered = class {
1971
1975
  onAbort(new Error("Cannot read from a consumed render result"));
1972
1976
  return;
1973
1977
  }
1974
- let { boundary } = head, onNext = boundary.onNext = (write2) => {
1978
+ let { boundary } = head, onNext = boundary.onNext = (write) => {
1975
1979
  if (boundary.signal.aborted)
1976
1980
  tick2 || offTick(onNext), boundary.onNext = NOOP2, onAbort(boundary.signal.reason);
1977
1981
  else {
1978
1982
  let { done } = boundary;
1979
- if (done || write2) {
1983
+ if (done || write) {
1980
1984
  let html = (head = head.consume()).flushHTML();
1981
1985
  html && onWrite(html), done ? (tick2 || offTick(onNext), onClose()) : tick2 = !0;
1982
1986
  } else tick2 && (tick2 = !1, queueTick(onNext));
@@ -1998,17 +2002,17 @@ function NOOP2() {
1998
2002
  }
1999
2003
 
2000
2004
  // src/html/dynamic-tag.ts
2001
- var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/, dynamicTag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, serializeReason) => {
2002
- let shouldResume = serializeReason !== 0, renderer = normalizeDynamicRenderer(tag), state = getState(), branchId = peekNextScopeId(), result;
2005
+ var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|param|source|track|wbr)$/, _dynamic_tag = (scopeId, accessor, tag, inputOrArgs, content, inputIsArgs, serializeReason) => {
2006
+ let shouldResume = serializeReason !== 0, renderer = normalizeDynamicRenderer(tag), state = getState(), branchId = _peek_scope_id(), rendered = !1, result;
2003
2007
  if (typeof renderer == "string") {
2004
2008
  let input = (inputIsArgs ? inputOrArgs[0] : inputOrArgs) || {};
2005
- if (nextScopeId(), write(
2006
- `<${renderer}${attrs(input, 0, branchId, renderer)}>`
2009
+ if (rendered = !0, _scope_id(), _html(
2010
+ `<${renderer}${_attrs(input, 0, branchId, renderer)}>`
2007
2011
  ), !voidElementsReg.test(renderer)) {
2008
2012
  let renderContent = content || normalizeDynamicRenderer(input.content);
2009
2013
  if (renderer === "textarea")
2010
- write(
2011
- controllable_textarea_value(
2014
+ _html(
2015
+ _attr_textarea_value(
2012
2016
  branchId,
2013
2017
  0,
2014
2018
  input.value,
@@ -2020,13 +2024,13 @@ var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|p
2020
2024
  throw new Error(
2021
2025
  `Body content is not supported for the \`<${renderer}>\` tag.`
2022
2026
  );
2023
- renderer === "select" && ("value" in input || "valueChange" in input) ? controllable_select_value(
2027
+ renderer === "select" && ("value" in input || "valueChange" in input) ? _attr_select_value(
2024
2028
  branchId,
2025
2029
  0,
2026
2030
  input.value,
2027
2031
  input.valueChange,
2028
2032
  renderContent
2029
- ) : dynamicTag(
2033
+ ) : _dynamic_tag(
2030
2034
  branchId,
2031
2035
  0,
2032
2036
  renderContent,
@@ -2036,16 +2040,16 @@ var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|p
2036
2040
  serializeReason
2037
2041
  );
2038
2042
  }
2039
- write(`</${renderer}>`);
2043
+ _html(`</${renderer}>`);
2040
2044
  }
2041
- shouldResume && write(
2045
+ shouldResume && _html(
2042
2046
  state.mark(
2043
- "'" /* BranchNativeTag */,
2047
+ "'" /* BranchEndNativeTag */,
2044
2048
  scopeId + " " + accessor + " " + branchId
2045
2049
  )
2046
2050
  );
2047
2051
  } else {
2048
- shouldResume && write(state.mark("[" /* BranchStart */, branchId + ""));
2052
+ shouldResume && _html(state.mark("[" /* BranchStart */, ""));
2049
2053
  let render2 = () => {
2050
2054
  if (renderer) {
2051
2055
  if (isTemplate(renderer)) {
@@ -2061,21 +2065,26 @@ var voidElementsReg = /^(?:area|b(?:ase|r)|col|embed|hr|i(?:mg|nput)|link|meta|p
2061
2065
  } else if (content)
2062
2066
  return content();
2063
2067
  };
2064
- result = shouldResume ? withBranchId(branchId, render2) : render2(), shouldResume && write(state.mark("]" /* BranchEnd */, scopeId + " " + accessor));
2068
+ result = shouldResume ? withBranchId(branchId, render2) : render2(), rendered = _peek_scope_id() !== branchId, shouldResume && _html(
2069
+ state.mark(
2070
+ "]" /* BranchEnd */,
2071
+ scopeId + " " + accessor + (rendered ? " " + branchId : "")
2072
+ )
2073
+ );
2065
2074
  }
2066
- return peekNextScopeId() !== branchId ? shouldResume && writeScope(scopeId, {
2075
+ return rendered ? shouldResume && writeScope(scopeId, {
2067
2076
  ["d" /* ConditionalScope */ + accessor]: writeScope(branchId, {}),
2068
2077
  ["c" /* ConditionalRenderer */ + accessor]: renderer?.h || renderer
2069
- }) : nextScopeId(), result;
2078
+ }) : _scope_id(), result;
2070
2079
  };
2071
- function createContent(id, fn) {
2080
+ function _content(id, fn) {
2072
2081
  return fn.h = id, fn;
2073
2082
  }
2074
- function registerContent(id, fn, scopeId) {
2075
- return register2(createContent(id, fn), id, scopeId);
2083
+ function _content_resume(id, fn, scopeId) {
2084
+ return _resume(_content(id, fn), id, scopeId);
2076
2085
  }
2077
2086
  function patchDynamicTag(patch) {
2078
- dynamicTag = /* @__PURE__ */ ((originalDynamicTag) => (scopeId, accessor, tag, input, content, inputIsArgs, resume) => {
2087
+ _dynamic_tag = /* @__PURE__ */ ((originalDynamicTag) => (scopeId, accessor, tag, input, content, inputIsArgs, resume) => {
2079
2088
  let patched = patch(scopeId, accessor, tag);
2080
2089
  return patched !== tag && (patched.h = tag), originalDynamicTag(
2081
2090
  scopeId,
@@ -2086,17 +2095,17 @@ function patchDynamicTag(patch) {
2086
2095
  inputIsArgs,
2087
2096
  resume
2088
2097
  );
2089
- })(dynamicTag);
2098
+ })(_dynamic_tag);
2090
2099
  }
2091
2100
 
2092
2101
  // src/html/compat.ts
2093
2102
  var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap(), compat = {
2094
2103
  $global,
2095
- fork,
2096
- write,
2104
+ fork: _await,
2105
+ write: _html,
2097
2106
  writeScript,
2098
- nextScopeId,
2099
- peekNextScopeId,
2107
+ nextScopeId: _scope_id,
2108
+ peekNextScopeId: _peek_scope_id,
2100
2109
  isInResumedBranch,
2101
2110
  ensureState($global2) {
2102
2111
  let state = $global2[K_TAGS_API_STATE] ||= getChunk()?.boundary.state;
@@ -2113,7 +2122,7 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
2113
2122
  },
2114
2123
  patchDynamicTag,
2115
2124
  writeSetScopeForComponent(branchId, m5c) {
2116
- writeScope(branchId, { m5c }), writeEffect(branchId, SET_SCOPE_REGISTER_ID);
2125
+ writeScope(branchId, { m5c }), _script(branchId, SET_SCOPE_REGISTER_ID);
2117
2126
  },
2118
2127
  toJSON(state) {
2119
2128
  return function() {
@@ -2152,8 +2161,8 @@ var K_TAGS_API_STATE = Symbol(), COMPAT_REGISTRY = /* @__PURE__ */ new WeakMap()
2152
2161
  }
2153
2162
  head.render(() => {
2154
2163
  if (willRerender) {
2155
- let scopeId = peekNextScopeId();
2156
- writeScope(scopeId, { m5c: component.id }), writeEffect(scopeId, SET_SCOPE_REGISTER_ID);
2164
+ let scopeId = _peek_scope_id();
2165
+ writeScope(scopeId, { m5c: component.id }), _script(scopeId, SET_SCOPE_REGISTER_ID);
2157
2166
  }
2158
2167
  isTemplate(renderer) && willRerender ? renderer(normalizedInput, 1) : renderer(normalizedInput);
2159
2168
  let asyncOut = classAPIOut.beginAsync();
@@ -2179,62 +2188,62 @@ function NOOP3() {
2179
2188
  // Annotate the CommonJS export names for ESM import in node:
2180
2189
  0 && (module.exports = {
2181
2190
  $global,
2182
- attr,
2191
+ _attr,
2192
+ _attr_class,
2193
+ _attr_content,
2194
+ _attr_details_open,
2195
+ _attr_dialog_open,
2196
+ _attr_input_checked,
2197
+ _attr_input_checkedValue,
2198
+ _attr_input_value,
2199
+ _attr_option_value,
2200
+ _attr_select_value,
2201
+ _attr_style,
2202
+ _attr_textarea_value,
2203
+ _attrs,
2204
+ _attrs_content,
2205
+ _attrs_partial,
2206
+ _attrs_partial_content,
2207
+ _await,
2208
+ _content,
2209
+ _content_resume,
2210
+ _dynamic_tag,
2211
+ _el,
2212
+ _el_resume,
2213
+ _escape,
2214
+ _escape_script,
2215
+ _escape_style,
2216
+ _existing_scope,
2217
+ _for_in,
2218
+ _for_of,
2219
+ _for_to,
2220
+ _hoist,
2221
+ _html,
2222
+ _id,
2223
+ _if,
2224
+ _peek_scope_id,
2225
+ _resume,
2226
+ _resume_branch,
2227
+ _scope,
2228
+ _scope_id,
2229
+ _scope_with_id,
2230
+ _script,
2231
+ _sep,
2232
+ _serialize_guard,
2233
+ _serialize_if,
2234
+ _subscribe,
2235
+ _template,
2236
+ _trailers,
2237
+ _try,
2238
+ _unescaped,
2239
+ _var,
2183
2240
  attrTag,
2184
2241
  attrTags,
2185
- attrs,
2186
- classAttr,
2187
- commentSeparator,
2188
2242
  compat,
2189
- controllable_detailsOrDialog_open,
2190
- controllable_input_checked,
2191
- controllable_input_checkedValue,
2192
- controllable_input_value,
2193
- controllable_select_value,
2194
- controllable_textarea_value,
2195
- createContent,
2196
- createTemplate,
2197
- dynamicTag,
2198
- ensureScopeWithId,
2199
- escapeScript,
2200
- escapeStyle,
2201
- escapeXML,
2202
2243
  forIn,
2203
2244
  forInBy,
2204
2245
  forOf,
2205
2246
  forOfBy,
2206
2247
  forTo,
2207
- forToBy,
2208
- fork,
2209
- getScopeById,
2210
- hoist,
2211
- markResumeNode,
2212
- nextScopeId,
2213
- nextTagId,
2214
- nodeRef,
2215
- optionValueAttr,
2216
- partialAttrs,
2217
- peekNextScopeId,
2218
- register,
2219
- registerContent,
2220
- resumeClosestBranch,
2221
- resumeConditional,
2222
- resumeForIn,
2223
- resumeForOf,
2224
- resumeForTo,
2225
- serializeGuard,
2226
- serializeIf,
2227
- setTagVar,
2228
- styleAttr,
2229
- toString,
2230
- tryContent,
2231
- write,
2232
- writeAttrsAndContent,
2233
- writeContent,
2234
- writeEffect,
2235
- writeExistingScope,
2236
- writePartialAttrsAndContent,
2237
- writeScope,
2238
- writeSubscribe,
2239
- writeTrailers
2248
+ forToBy
2240
2249
  });