haori 0.22.0 → 0.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +1 -1
- package/README.md +1 -1
- package/dist/haori.cjs.js +10 -9
- package/dist/haori.es.js +112 -102
- package/dist/haori.iife.js +10 -9
- package/package.json +1 -1
package/dist/haori.es.js
CHANGED
|
@@ -533,8 +533,8 @@ const We = Object.freeze({
|
|
|
533
533
|
return { value: null, unresolvedReference: !1 };
|
|
534
534
|
try {
|
|
535
535
|
const u = [], p = this.wrapBoundValues(a);
|
|
536
|
-
return h.bindKeys.forEach((
|
|
537
|
-
u.push(p[
|
|
536
|
+
return h.bindKeys.forEach((v) => {
|
|
537
|
+
u.push(p[v]);
|
|
538
538
|
}), {
|
|
539
539
|
value: this.withBlockedPropertyAccess(
|
|
540
540
|
() => h.evaluator(...u)
|
|
@@ -543,9 +543,9 @@ const We = Object.freeze({
|
|
|
543
543
|
};
|
|
544
544
|
} catch (u) {
|
|
545
545
|
if (o && u instanceof ReferenceError) {
|
|
546
|
-
const
|
|
547
|
-
if (
|
|
548
|
-
a[
|
|
546
|
+
const v = this.extractMissingIdentifier(u);
|
|
547
|
+
if (v !== null && this.canRecoverMissingIdentifier(v, a)) {
|
|
548
|
+
a[v] = void 0;
|
|
549
549
|
continue;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
@@ -2242,9 +2242,9 @@ const K = class K extends R {
|
|
|
2242
2242
|
element: a,
|
|
2243
2243
|
rawName: e,
|
|
2244
2244
|
template: r
|
|
2245
|
-
}), l = s.isEvaluate || s.isRawEvaluate, h = e === t && K.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), u = s.isSingleExpression(), p = G.joinEvaluateResults(o.results),
|
|
2246
|
-
return !k && !C && !O && !ve && !ye ? (A && !
|
|
2247
|
-
k && a.setAttribute(e, r), S === null ? a.removeAttribute(t) : (C && (a.setAttribute(t, S), t === `${c.prefix}bind` && this.recordSelfWrittenBind(S)), A && !
|
|
2245
|
+
}), l = s.isEvaluate || s.isRawEvaluate, h = e === t && K.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), u = s.isSingleExpression(), p = G.joinEvaluateResults(o.results), v = o.results.length === 1 ? o.results[0] : p, T = !s.isForceEvaluation() && (t !== e || h || u ? o.hasUnresolvedReference || v === null || v === void 0 || v === !1 : l && p === ""), I = s.isForceEvaluation() ? r : u ? v : p, A = i && s.isEvaluate && t === "value" && (a instanceof HTMLInputElement && this.INPUT_EVENT_TYPES.includes(a.type) || a instanceof HTMLTextAreaElement || a instanceof HTMLSelectElement), y = a.getRootNode(), b = A && a === y.activeElement, S = T || I === null || I === !1 ? null : String(I), k = e !== t && a.getAttribute(e) !== r, C = S === null ? a.hasAttribute(t) : a.getAttribute(t) !== S, O = A && !b && S !== null && a.value !== S, j = t === "checked" && a instanceof HTMLInputElement && (a.type === "checkbox" || a.type === "radio"), $ = t === "selected" && a instanceof HTMLOptionElement, _ = y.activeElement, be = _ !== null && (j && a === _ || $ && a.closest("select") === _), te = S !== null, ve = j && !be && a.checked !== te, ye = $ && !be && a.selected !== te;
|
|
2246
|
+
return !k && !C && !O && !ve && !ye ? (A && !b && S !== null && (this.value = this.normalizeValueForElement(a, S)), Promise.resolve()) : (this.skipMutationAttributes = !0, P.enqueue(() => {
|
|
2247
|
+
k && a.setAttribute(e, r), S === null ? a.removeAttribute(t) : (C && (a.setAttribute(t, S), t === `${c.prefix}bind` && this.recordSelfWrittenBind(S)), A && !b && (this.value = this.normalizeValueForElement(a, S), O && (a.value = S))), ve && (a.checked = te), ye && (a.selected = te);
|
|
2248
2248
|
}).finally(() => {
|
|
2249
2249
|
this.skipMutationAttributes = !1;
|
|
2250
2250
|
}));
|
|
@@ -2381,15 +2381,15 @@ const K = class K extends R {
|
|
|
2381
2381
|
else {
|
|
2382
2382
|
let p;
|
|
2383
2383
|
if (s ? a !== -1 && a < o ? p = o - 1 : p = o : p = this.children.indexOf(t), p === -1) {
|
|
2384
|
-
const
|
|
2384
|
+
const v = this.resolveInsertionPointFromDom(
|
|
2385
2385
|
t,
|
|
2386
2386
|
!1
|
|
2387
2387
|
);
|
|
2388
|
-
|
|
2388
|
+
v === null ? (m.warn(
|
|
2389
2389
|
"[Haori]",
|
|
2390
2390
|
"Reference child not found in children.",
|
|
2391
2391
|
t
|
|
2392
|
-
), this.children.push(e)) : (this.children.splice(
|
|
2392
|
+
), this.children.push(e)) : (this.children.splice(v.index, 0, e), h = v.referenceNode);
|
|
2393
2393
|
} else
|
|
2394
2394
|
this.children.splice(p, 0, e);
|
|
2395
2395
|
}
|
|
@@ -3263,17 +3263,17 @@ class E {
|
|
|
3263
3263
|
const u = t[String(l)];
|
|
3264
3264
|
if (Array.isArray(u)) {
|
|
3265
3265
|
const p = e.getChildElementFragments();
|
|
3266
|
-
for (let
|
|
3267
|
-
const T = p[
|
|
3268
|
-
u.length >
|
|
3266
|
+
for (let v = 0; v < p.length; v++) {
|
|
3267
|
+
const T = p[v];
|
|
3268
|
+
u.length > v ? s.push(
|
|
3269
3269
|
E.setPartValues(
|
|
3270
3270
|
T,
|
|
3271
|
-
u[
|
|
3272
|
-
|
|
3271
|
+
u[v],
|
|
3272
|
+
v,
|
|
3273
3273
|
i,
|
|
3274
3274
|
n
|
|
3275
3275
|
)
|
|
3276
|
-
) : s.push(E.setPartValues(T, {},
|
|
3276
|
+
) : s.push(E.setPartValues(T, {}, v, i, n));
|
|
3277
3277
|
}
|
|
3278
3278
|
}
|
|
3279
3279
|
} else
|
|
@@ -4073,9 +4073,9 @@ const g = class g {
|
|
|
4073
4073
|
g.attrName(t, "form")
|
|
4074
4074
|
);
|
|
4075
4075
|
if (y) {
|
|
4076
|
-
const
|
|
4077
|
-
|
|
4078
|
-
R.get(
|
|
4076
|
+
const b = document.body.querySelector(y);
|
|
4077
|
+
b !== null ? r.formFragment = E.getFormFragment(
|
|
4078
|
+
R.get(b)
|
|
4079
4079
|
) : m.error(
|
|
4080
4080
|
"Haori",
|
|
4081
4081
|
`Form element not found: ${y} (${g.attrName(t, "form")})`
|
|
@@ -4096,24 +4096,34 @@ const g = class g {
|
|
|
4096
4096
|
${y}
|
|
4097
4097
|
`
|
|
4098
4098
|
);
|
|
4099
|
-
} catch (
|
|
4100
|
-
m.error("Haori", `Invalid before script: ${
|
|
4099
|
+
} catch (b) {
|
|
4100
|
+
m.error("Haori", `Invalid before script: ${b}`);
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
4103
4103
|
const A = g.attrName(t, "run");
|
|
4104
4104
|
if (e.hasAttribute(A)) {
|
|
4105
4105
|
const y = String(e.getAttribute(A) ?? "");
|
|
4106
|
+
let b = null;
|
|
4106
4107
|
try {
|
|
4107
|
-
|
|
4108
|
+
b = new Function(
|
|
4108
4109
|
"event",
|
|
4109
|
-
`
|
|
4110
|
-
"use strict";
|
|
4110
|
+
`"use strict"; return (
|
|
4111
4111
|
${y}
|
|
4112
|
-
|
|
4112
|
+
);`
|
|
4113
4113
|
);
|
|
4114
|
-
} catch
|
|
4115
|
-
|
|
4114
|
+
} catch {
|
|
4115
|
+
try {
|
|
4116
|
+
b = new Function(
|
|
4117
|
+
"event",
|
|
4118
|
+
`"use strict";
|
|
4119
|
+
${y}
|
|
4120
|
+
`
|
|
4121
|
+
);
|
|
4122
|
+
} catch (S) {
|
|
4123
|
+
m.error("Haori", `Invalid run script: ${S}`);
|
|
4124
|
+
}
|
|
4116
4125
|
}
|
|
4126
|
+
b && (r.runScript = b);
|
|
4117
4127
|
}
|
|
4118
4128
|
}
|
|
4119
4129
|
const i = g.attrName(t, "fetch"), n = e.hasAttribute(i);
|
|
@@ -4145,8 +4155,8 @@ ${y}
|
|
|
4145
4155
|
);
|
|
4146
4156
|
try {
|
|
4147
4157
|
s.headers = x.parseDataBind(y);
|
|
4148
|
-
} catch (
|
|
4149
|
-
m.error("Haori", `Invalid fetch headers: ${
|
|
4158
|
+
} catch (b) {
|
|
4159
|
+
m.error("Haori", `Invalid fetch headers: ${b}`);
|
|
4150
4160
|
}
|
|
4151
4161
|
}
|
|
4152
4162
|
} else {
|
|
@@ -4161,8 +4171,8 @@ ${y}
|
|
|
4161
4171
|
);
|
|
4162
4172
|
try {
|
|
4163
4173
|
s.headers = x.parseDataBind(y);
|
|
4164
|
-
} catch (
|
|
4165
|
-
m.error("Haori", `Invalid fetch headers: ${
|
|
4174
|
+
} catch (b) {
|
|
4175
|
+
m.error("Haori", `Invalid fetch headers: ${b}`);
|
|
4166
4176
|
}
|
|
4167
4177
|
}
|
|
4168
4178
|
}
|
|
@@ -4213,8 +4223,8 @@ ${y}
|
|
|
4213
4223
|
const A = e.getRawAttribute(a);
|
|
4214
4224
|
if (A) {
|
|
4215
4225
|
const y = document.body.querySelectorAll(A);
|
|
4216
|
-
y.length > 0 ? (r.bindFragments = [], y.forEach((
|
|
4217
|
-
const S = R.get(
|
|
4226
|
+
y.length > 0 ? (r.bindFragments = [], y.forEach((b) => {
|
|
4227
|
+
const S = R.get(b);
|
|
4218
4228
|
S && r.bindFragments.push(S);
|
|
4219
4229
|
})) : m.error(
|
|
4220
4230
|
"Haori",
|
|
@@ -4244,8 +4254,8 @@ ${y}
|
|
|
4244
4254
|
const A = e.getRawAttribute(p);
|
|
4245
4255
|
r.bindAppendParams = A.split("&").map((y) => y.trim()).filter(Boolean);
|
|
4246
4256
|
}
|
|
4247
|
-
const
|
|
4248
|
-
e.hasAttribute(
|
|
4257
|
+
const v = t ? g.attrName(t, "bind-merge") : g.attrName(null, "bind-merge", !0);
|
|
4258
|
+
e.hasAttribute(v) && (r.bindMerge = !0);
|
|
4249
4259
|
const T = t ? g.attrName(t, "bind-transform") : g.attrName(null, "bind-transform", !0);
|
|
4250
4260
|
e.hasAttribute(T) && (r.bindTransform = e.getRawAttribute(T));
|
|
4251
4261
|
const I = t ? g.attrName(t, "copy-params") : null;
|
|
@@ -4255,17 +4265,17 @@ ${y}
|
|
|
4255
4265
|
}
|
|
4256
4266
|
if (t) {
|
|
4257
4267
|
if (e.hasAttribute(g.attrName(t, "adjust"))) {
|
|
4258
|
-
const
|
|
4268
|
+
const b = e.getRawAttribute(
|
|
4259
4269
|
g.attrName(t, "adjust")
|
|
4260
4270
|
);
|
|
4261
|
-
if (
|
|
4262
|
-
const S = document.body.querySelectorAll(
|
|
4271
|
+
if (b) {
|
|
4272
|
+
const S = document.body.querySelectorAll(b);
|
|
4263
4273
|
S.length > 0 ? (r.adjustFragments = [], S.forEach((k) => {
|
|
4264
4274
|
const C = R.get(k);
|
|
4265
4275
|
C && r.adjustFragments.push(C);
|
|
4266
4276
|
})) : m.error(
|
|
4267
4277
|
"Haori",
|
|
4268
|
-
`Adjust element not found: ${
|
|
4278
|
+
`Adjust element not found: ${b} (${g.attrName(t, "adjust")})`
|
|
4269
4279
|
);
|
|
4270
4280
|
}
|
|
4271
4281
|
if (e.hasAttribute(g.attrName(t, "adjust-value"))) {
|
|
@@ -4276,7 +4286,7 @@ ${y}
|
|
|
4276
4286
|
}
|
|
4277
4287
|
}
|
|
4278
4288
|
if (e.hasAttribute(g.attrName(t, "row-add")) && (r.rowAdd = !0), e.hasAttribute(g.attrName(t, "row-remove")) && (r.rowRemove = !0), e.hasAttribute(g.attrName(t, "row-prev")) && (r.rowMovePrev = !0), e.hasAttribute(g.attrName(t, "row-next")) && (r.rowMoveNext = !0), e.hasAttribute(`${c.prefix}${t}-after-run`)) {
|
|
4279
|
-
const
|
|
4289
|
+
const b = e.getRawAttribute(
|
|
4280
4290
|
`${c.prefix}${t}-after-run`
|
|
4281
4291
|
);
|
|
4282
4292
|
try {
|
|
@@ -4284,7 +4294,7 @@ ${y}
|
|
|
4284
4294
|
"response",
|
|
4285
4295
|
`
|
|
4286
4296
|
"use strict";
|
|
4287
|
-
${
|
|
4297
|
+
${b}
|
|
4288
4298
|
`
|
|
4289
4299
|
);
|
|
4290
4300
|
} catch (S) {
|
|
@@ -4296,21 +4306,21 @@ ${v}
|
|
|
4296
4306
|
r.toastMessage = e.getAttribute(
|
|
4297
4307
|
g.attrName(t, "toast")
|
|
4298
4308
|
);
|
|
4299
|
-
const
|
|
4309
|
+
const b = e.getRawAttribute(
|
|
4300
4310
|
g.attrName(t, "toast-level")
|
|
4301
|
-
), k = ["info", "warning", "error", "success"].includes(
|
|
4302
|
-
r.toastLevel = k ?
|
|
4311
|
+
), k = ["info", "warning", "error", "success"].includes(b);
|
|
4312
|
+
r.toastLevel = k ? b : null;
|
|
4303
4313
|
}
|
|
4304
4314
|
if (e.hasAttribute(g.attrName(t, "redirect"))) {
|
|
4305
4315
|
r.redirectUrl = e.getAttribute(
|
|
4306
4316
|
g.attrName(t, "redirect")
|
|
4307
4317
|
);
|
|
4308
|
-
const
|
|
4318
|
+
const b = g.attrName(
|
|
4309
4319
|
t,
|
|
4310
4320
|
"redirect-return-param"
|
|
4311
4321
|
);
|
|
4312
|
-
e.hasAttribute(
|
|
4313
|
-
|
|
4322
|
+
e.hasAttribute(b) && (r.redirectReturnParam = e.getAttribute(
|
|
4323
|
+
b
|
|
4314
4324
|
));
|
|
4315
4325
|
}
|
|
4316
4326
|
if (e.hasAttribute(g.attrName(t, "scroll-error")) && (r.scrollOnError = !0), e.hasAttribute(g.attrName(t, "scroll")) && (r.scrollTarget = e.getAttribute(
|
|
@@ -4318,16 +4328,16 @@ ${v}
|
|
|
4318
4328
|
)), e.hasAttribute(g.attrName(t, "history")) && (r.historyUrl = e.getAttribute(
|
|
4319
4329
|
g.attrName(t, "history")
|
|
4320
4330
|
)), e.hasAttribute(g.attrName(t, "history-data")) && (r.historyDataAttrName = g.attrName(t, "history-data")), e.hasAttribute(g.attrName(t, "history-form"))) {
|
|
4321
|
-
const
|
|
4331
|
+
const b = e.getRawAttribute(
|
|
4322
4332
|
g.attrName(t, "history-form")
|
|
4323
4333
|
);
|
|
4324
|
-
if (
|
|
4325
|
-
const S = document.body.querySelector(
|
|
4334
|
+
if (b) {
|
|
4335
|
+
const S = document.body.querySelector(b);
|
|
4326
4336
|
S !== null ? r.historyFormFragment = E.getFormFragment(
|
|
4327
4337
|
R.get(S)
|
|
4328
4338
|
) : m.error(
|
|
4329
4339
|
"Haori",
|
|
4330
|
-
`Form element not found: ${
|
|
4340
|
+
`Form element not found: ${b} (${g.attrName(t, "history-form")})`
|
|
4331
4341
|
);
|
|
4332
4342
|
} else
|
|
4333
4343
|
r.historyFormFragment = E.getFormFragment(e);
|
|
@@ -4340,8 +4350,8 @@ ${v}
|
|
|
4340
4350
|
"copy",
|
|
4341
4351
|
"open",
|
|
4342
4352
|
"close"
|
|
4343
|
-
].forEach((
|
|
4344
|
-
const S = g.attrName(t,
|
|
4353
|
+
].forEach((b) => {
|
|
4354
|
+
const S = g.attrName(t, b);
|
|
4345
4355
|
if (!e.hasAttribute(S))
|
|
4346
4356
|
return;
|
|
4347
4357
|
const k = e.getRawAttribute(S), C = [];
|
|
@@ -4349,7 +4359,7 @@ ${v}
|
|
|
4349
4359
|
const $ = R.get(j);
|
|
4350
4360
|
$ && C.push($);
|
|
4351
4361
|
}), C.length === 0 && m.error("Haori", `Element not found: ${k} (${S})`)) : C.push(e), C.length > 0)
|
|
4352
|
-
switch (
|
|
4362
|
+
switch (b) {
|
|
4353
4363
|
case "reset-before":
|
|
4354
4364
|
r.resetBeforeFragments = C;
|
|
4355
4365
|
break;
|
|
@@ -4375,21 +4385,21 @@ ${v}
|
|
|
4375
4385
|
});
|
|
4376
4386
|
const y = g.attrName(t, "copy-source");
|
|
4377
4387
|
if (e.hasAttribute(y)) {
|
|
4378
|
-
const
|
|
4388
|
+
const b = e.getRawAttribute(
|
|
4379
4389
|
y
|
|
4380
4390
|
);
|
|
4381
|
-
if (
|
|
4382
|
-
const S = document.body.querySelector(
|
|
4391
|
+
if (b) {
|
|
4392
|
+
const S = document.body.querySelector(b);
|
|
4383
4393
|
if (S !== null) {
|
|
4384
4394
|
const k = R.get(S);
|
|
4385
4395
|
k ? r.copySourceFragment = k : m.error(
|
|
4386
4396
|
"Haori",
|
|
4387
|
-
`Element is not managed by Haori: ${
|
|
4397
|
+
`Element is not managed by Haori: ${b} (${y})`
|
|
4388
4398
|
);
|
|
4389
4399
|
} else
|
|
4390
4400
|
m.error(
|
|
4391
4401
|
"Haori",
|
|
4392
|
-
`Element not found: ${
|
|
4402
|
+
`Element not found: ${b} (${y})`
|
|
4393
4403
|
);
|
|
4394
4404
|
} else
|
|
4395
4405
|
r.copySourceFragment = e;
|
|
@@ -4503,8 +4513,8 @@ ${v}
|
|
|
4503
4513
|
}
|
|
4504
4514
|
const a = Object.keys(i).length > 0;
|
|
4505
4515
|
if (n) {
|
|
4506
|
-
const h = { ...s || {} }, u = r.requestedMethod, p = r.effectiveMethod,
|
|
4507
|
-
if (
|
|
4516
|
+
const h = { ...s || {} }, u = r.requestedMethod, p = r.effectiveMethod, v = r.transportMode === "query-get", T = r.queryString;
|
|
4517
|
+
if (v && m.info("Haori demo fetch normalization", {
|
|
4508
4518
|
runtime: c.runtime,
|
|
4509
4519
|
requestedMethod: u,
|
|
4510
4520
|
effectiveMethod: p,
|
|
@@ -4517,8 +4527,8 @@ ${v}
|
|
|
4517
4527
|
runtime: c.runtime,
|
|
4518
4528
|
requestedMethod: u,
|
|
4519
4529
|
effectiveMethod: p,
|
|
4520
|
-
transportMode:
|
|
4521
|
-
...
|
|
4530
|
+
transportMode: v ? "query-get" : "http",
|
|
4531
|
+
...v ? { queryString: T } : {}
|
|
4522
4532
|
};
|
|
4523
4533
|
return N.fetchStart(
|
|
4524
4534
|
this.options.targetFragment.getTarget(),
|
|
@@ -4543,8 +4553,8 @@ ${v}
|
|
|
4543
4553
|
if ((!this.options.bindFragments || this.options.bindFragments.length === 0) && this.options.formFragment && a) {
|
|
4544
4554
|
const h = this.options.formFragment, u = h.getTarget(), p = /* @__PURE__ */ new Set();
|
|
4545
4555
|
e && e.appliedDisabledAttribute && this.options.targetFragment && p.add(this.options.targetFragment);
|
|
4546
|
-
const
|
|
4547
|
-
Object.assign(
|
|
4556
|
+
const v = h.getBindingData();
|
|
4557
|
+
Object.assign(v, i), await x.setBindingData(u, v, p);
|
|
4548
4558
|
}
|
|
4549
4559
|
const o = a ? i : {}, l = new Response(JSON.stringify(o), {
|
|
4550
4560
|
headers: { "Content-Type": "application/json" }
|
|
@@ -4703,7 +4713,7 @@ ${v}
|
|
|
4703
4713
|
const l = /* @__PURE__ */ new Map(), h = [];
|
|
4704
4714
|
for (const u of a)
|
|
4705
4715
|
if (u && typeof u == "object" && !Array.isArray(u)) {
|
|
4706
|
-
const p = u.key,
|
|
4716
|
+
const p = u.key, v = u.message, T = typeof p == "string" && p.length > 0 ? p : null, I = typeof v == "string" ? v : v != null ? String(v) : "";
|
|
4707
4717
|
if (I.length === 0)
|
|
4708
4718
|
continue;
|
|
4709
4719
|
if (T !== null) {
|
|
@@ -4983,13 +4993,13 @@ ${v}
|
|
|
4983
4993
|
if (/multipart\/form-data/i.test(u)) {
|
|
4984
4994
|
s.delete("Content-Type");
|
|
4985
4995
|
const p = new FormData();
|
|
4986
|
-
for (const [
|
|
4987
|
-
T == null ? p.append(
|
|
4996
|
+
for (const [v, T] of Object.entries(t))
|
|
4997
|
+
T == null ? p.append(v, "") : T instanceof Blob ? p.append(v, T) : Array.isArray(T) ? T.forEach((I) => p.append(v, String(I))) : typeof T == "object" ? p.append(v, JSON.stringify(T)) : p.append(v, String(T));
|
|
4988
4998
|
n.body = p;
|
|
4989
4999
|
} else if (/application\/x-www-form-urlencoded/i.test(u)) {
|
|
4990
5000
|
const p = new URLSearchParams();
|
|
4991
|
-
for (const [
|
|
4992
|
-
T !== void 0 && (T === null ? p.append(
|
|
5001
|
+
for (const [v, T] of Object.entries(t))
|
|
5002
|
+
T !== void 0 && (T === null ? p.append(v, "") : Array.isArray(T) ? T.forEach((I) => p.append(v, String(I))) : typeof T == "object" ? p.append(v, JSON.stringify(T)) : p.append(v, String(T)));
|
|
4993
5003
|
n.body = p;
|
|
4994
5004
|
} else
|
|
4995
5005
|
s.set("Content-Type", "application/json"), n.body = JSON.stringify(t);
|
|
@@ -5681,9 +5691,9 @@ const d = class d {
|
|
|
5681
5691
|
return h.id ? `#${h.id}` : h.tagName.toLowerCase();
|
|
5682
5692
|
}, s = (l, h, u, p) => {
|
|
5683
5693
|
if (l)
|
|
5684
|
-
for (const
|
|
5685
|
-
|
|
5686
|
-
value: l[
|
|
5694
|
+
for (const v of Object.keys(l))
|
|
5695
|
+
v in i || (i[v] = {
|
|
5696
|
+
value: l[v],
|
|
5687
5697
|
source: n(h),
|
|
5688
5698
|
kind: u,
|
|
5689
5699
|
depth: p
|
|
@@ -5834,12 +5844,12 @@ const d = class d {
|
|
|
5834
5844
|
if (l)
|
|
5835
5845
|
return;
|
|
5836
5846
|
const p = [];
|
|
5837
|
-
return e.getChildren().forEach((
|
|
5838
|
-
if (
|
|
5839
|
-
if (d.canSkipUnchangedNestedEach(
|
|
5847
|
+
return e.getChildren().forEach((v) => {
|
|
5848
|
+
if (v instanceof M) {
|
|
5849
|
+
if (d.canSkipUnchangedNestedEach(v))
|
|
5840
5850
|
return;
|
|
5841
|
-
p.push(d.evaluateAll(
|
|
5842
|
-
} else
|
|
5851
|
+
p.push(d.evaluateAll(v, t));
|
|
5852
|
+
} else v instanceof V && p.push(d.evaluateText(v));
|
|
5843
5853
|
}), Promise.all(p).then(() => {
|
|
5844
5854
|
});
|
|
5845
5855
|
}).then(() => {
|
|
@@ -6308,33 +6318,33 @@ const d = class d {
|
|
|
6308
6318
|
let i = e.getAttribute(`${c.prefix}each-index`);
|
|
6309
6319
|
i && (i = String(i));
|
|
6310
6320
|
const n = e.getAttribute(`${c.prefix}each-key`), s = e.getAttribute(`${c.prefix}each-arg`), a = /* @__PURE__ */ new Map(), o = [];
|
|
6311
|
-
t.forEach((
|
|
6321
|
+
t.forEach((b, S) => {
|
|
6312
6322
|
const k = d.createListKey(
|
|
6313
|
-
|
|
6323
|
+
b,
|
|
6314
6324
|
n ? String(n) : null,
|
|
6315
6325
|
S
|
|
6316
6326
|
);
|
|
6317
|
-
o.push(k), a.set(k, { item:
|
|
6327
|
+
o.push(k), a.set(k, { item: b, itemIndex: S });
|
|
6318
6328
|
});
|
|
6319
6329
|
const l = new Set(o), h = [];
|
|
6320
|
-
let u = e.getChildren().filter((
|
|
6321
|
-
(
|
|
6330
|
+
let u = e.getChildren().filter((b) => b instanceof M).filter(
|
|
6331
|
+
(b) => !b.hasAttribute(`${c.prefix}each-before`) && !b.hasAttribute(`${c.prefix}each-after`)
|
|
6322
6332
|
);
|
|
6323
|
-
const p = u.map((
|
|
6324
|
-
u = u.filter((
|
|
6325
|
-
const
|
|
6326
|
-
u.forEach((
|
|
6327
|
-
const S =
|
|
6328
|
-
S !== null && !T.has(S) && T.set(S,
|
|
6333
|
+
const p = u.map((b) => b.getListKey());
|
|
6334
|
+
u = u.filter((b) => l.has(String(b.getListKey())) ? !0 : (h.push(b.remove()), !1));
|
|
6335
|
+
const v = u.map((b) => b.getListKey()), T = /* @__PURE__ */ new Map();
|
|
6336
|
+
u.forEach((b) => {
|
|
6337
|
+
const S = b.getListKey();
|
|
6338
|
+
S !== null && !T.has(S) && T.set(S, b);
|
|
6329
6339
|
});
|
|
6330
6340
|
const I = e.getChildElementFragments().slice(), A = I.filter(
|
|
6331
|
-
(
|
|
6341
|
+
(b) => b.hasAttribute(`${c.prefix}each-before`)
|
|
6332
6342
|
).length;
|
|
6333
6343
|
let y = Promise.resolve();
|
|
6334
|
-
return o.forEach((
|
|
6335
|
-
const { item: k, itemIndex: C } = a.get(
|
|
6344
|
+
return o.forEach((b, S) => {
|
|
6345
|
+
const { item: k, itemIndex: C } = a.get(b);
|
|
6336
6346
|
let O;
|
|
6337
|
-
const j = T.get(
|
|
6347
|
+
const j = T.get(b);
|
|
6338
6348
|
if (j)
|
|
6339
6349
|
O = j, y = y.then(
|
|
6340
6350
|
() => d.updateRowFragment(
|
|
@@ -6343,7 +6353,7 @@ const d = class d {
|
|
|
6343
6353
|
i,
|
|
6344
6354
|
C,
|
|
6345
6355
|
s ? String(s) : null,
|
|
6346
|
-
|
|
6356
|
+
b
|
|
6347
6357
|
).then(($) => {
|
|
6348
6358
|
if ($)
|
|
6349
6359
|
return d.evaluateAll(O);
|
|
@@ -6359,7 +6369,7 @@ const d = class d {
|
|
|
6359
6369
|
i,
|
|
6360
6370
|
C,
|
|
6361
6371
|
s ? String(s) : null,
|
|
6362
|
-
|
|
6372
|
+
b
|
|
6363
6373
|
).then(() => {
|
|
6364
6374
|
const _ = I[$] ?? null;
|
|
6365
6375
|
return e.insertBefore(O, _).then(() => {
|
|
@@ -6369,11 +6379,11 @@ const d = class d {
|
|
|
6369
6379
|
);
|
|
6370
6380
|
}
|
|
6371
6381
|
}), Promise.all(h).then(() => y).then(() => {
|
|
6372
|
-
const
|
|
6382
|
+
const b = o.filter(
|
|
6373
6383
|
($) => $ !== null
|
|
6374
|
-
), S =
|
|
6384
|
+
), S = v.filter(
|
|
6375
6385
|
($) => $ !== null
|
|
6376
|
-
), k = new Set(S), C =
|
|
6386
|
+
), k = new Set(S), C = b.filter(($) => !k.has($)), j = p.filter(
|
|
6377
6387
|
($) => $ !== null
|
|
6378
6388
|
).filter(
|
|
6379
6389
|
($) => !l.has($)
|
|
@@ -6382,7 +6392,7 @@ const d = class d {
|
|
|
6382
6392
|
e.getTarget(),
|
|
6383
6393
|
C,
|
|
6384
6394
|
j,
|
|
6385
|
-
|
|
6395
|
+
b
|
|
6386
6396
|
);
|
|
6387
6397
|
});
|
|
6388
6398
|
}
|
|
@@ -6927,8 +6937,8 @@ const w = class w {
|
|
|
6927
6937
|
return;
|
|
6928
6938
|
let u = !1;
|
|
6929
6939
|
l.forEach((p) => {
|
|
6930
|
-
const
|
|
6931
|
-
h.observedRows.has(
|
|
6940
|
+
const v = p.target;
|
|
6941
|
+
h.observedRows.has(v) && (p.isIntersecting ? h.visibleRows.has(v) || (h.visibleRows.add(v), u = !0) : h.visibleRows.delete(v) && (u = !0));
|
|
6932
6942
|
}), u && w.scheduleCompute(h);
|
|
6933
6943
|
},
|
|
6934
6944
|
{
|