haori 0.47.3 → 0.47.4

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/haori.es.js CHANGED
@@ -29,7 +29,7 @@ const he = class he {
29
29
  }
30
30
  };
31
31
  he.devMode = !1;
32
- let q = he;
32
+ let V = he;
33
33
  const Le = "embedded";
34
34
  function Je(y) {
35
35
  return y === "embedded" || y === "demo";
@@ -96,15 +96,15 @@ const Q = class Q {
96
96
  }
97
97
  if (e instanceof HTMLScriptElement && e.hasAttribute(`${Q._prefix}dev`)) {
98
98
  const r = (e.getAttribute(`${Q._prefix}dev`) ?? "").trim().toLowerCase();
99
- q.set(r !== "false" && r !== "off" && r !== "0");
99
+ V.set(r !== "false" && r !== "off" && r !== "0");
100
100
  return;
101
101
  }
102
102
  const t = window.location.hostname;
103
103
  if (t === "localhost" || t.endsWith(".localhost") || t === "127.0.0.1" || t === "::1" || t.endsWith(".local")) {
104
- q.set(!0);
104
+ V.set(!0);
105
105
  return;
106
106
  }
107
- q.set(!1);
107
+ V.set(!1);
108
108
  } catch {
109
109
  }
110
110
  }
@@ -128,7 +128,7 @@ class m {
128
128
  * @param args 追加の引数
129
129
  */
130
130
  static info(e, ...t) {
131
- q.isEnabled() && console.log && console.log(e, ...t);
131
+ V.isEnabled() && console.log && console.log(e, ...t);
132
132
  }
133
133
  /**
134
134
  * 開発モードでのみコンソールに警告を出力します。
@@ -137,7 +137,7 @@ class m {
137
137
  * @param args 追加の引数
138
138
  */
139
139
  static warn(e, ...t) {
140
- q.isEnabled() && console.warn && console.warn(e, ...t);
140
+ V.isEnabled() && console.warn && console.warn(e, ...t);
141
141
  }
142
142
  /**
143
143
  * モードに関係なくコンソールにエラーを出力します。
@@ -149,7 +149,7 @@ class m {
149
149
  console.error(e, ...t);
150
150
  }
151
151
  }
152
- const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:", k = class k {
152
+ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:", C = class C {
153
153
  /**
154
154
  * 外部ライブラリ連携を登録します。
155
155
  *
@@ -170,7 +170,7 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
170
170
  m.error("[Haori]", `Enhancer "${r}" must have an init function.`);
171
171
  return;
172
172
  }
173
- k.enhancers.set(r, t), k.warnedUnknownNames.delete(r), typeof document < "u" && document.body && k.applySubtree(document.body);
173
+ C.enhancers.set(r, t), C.warnedUnknownNames.delete(r), typeof document < "u" && document.body && C.applySubtree(document.body);
174
174
  }
175
175
  /**
176
176
  * 登録済みの連携かどうかを返します。
@@ -179,7 +179,7 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
179
179
  * @returns 登録済みなら true
180
180
  */
181
181
  static has(e) {
182
- return k.enhancers.has(e);
182
+ return C.enhancers.has(e);
183
183
  }
184
184
  /**
185
185
  * 対象要素とその子孫へ、まだ適用していない連携を適用します。
@@ -190,8 +190,8 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
190
190
  * @returns 戻り値はありません。
191
191
  */
192
192
  static applySubtree(e) {
193
- k.forEachTarget(e, (t) => {
194
- k.applyElement(t);
193
+ C.forEachTarget(e, (t) => {
194
+ C.applyElement(t);
195
195
  });
196
196
  }
197
197
  /**
@@ -204,8 +204,8 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
204
204
  * @returns 戻り値はありません。
205
205
  */
206
206
  static refreshSubtree(e) {
207
- k.forEachTarget(e, (t) => {
208
- k.refreshElement(t);
207
+ C.forEachTarget(e, (t) => {
208
+ C.refreshElement(t);
209
209
  });
210
210
  }
211
211
  /**
@@ -217,8 +217,8 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
217
217
  * @returns 戻り値はありません。
218
218
  */
219
219
  static destroySubtree(e) {
220
- k.forEachTarget(e, (t) => {
221
- k.destroyElement(t);
220
+ C.forEachTarget(e, (t) => {
221
+ C.destroyElement(t);
222
222
  });
223
223
  }
224
224
  /**
@@ -243,27 +243,27 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
243
243
  * @returns 戻り値はありません。
244
244
  */
245
245
  static applyElement(e) {
246
- const t = k.instances.get(e) ?? null;
247
- k.names(e, `${l.prefix}enhance`).forEach((r) => {
246
+ const t = C.instances.get(e) ?? null;
247
+ C.names(e, `${l.prefix}enhance`).forEach((r) => {
248
248
  if (t?.has(r))
249
249
  return;
250
- const i = k.enhancers.get(r);
250
+ const i = C.enhancers.get(r);
251
251
  if (!i) {
252
- k.warnUnknownName(r);
252
+ C.warnUnknownName(r);
253
253
  return;
254
254
  }
255
- k.run(`enhance "${r}"`, () => {
255
+ C.run(`enhance "${r}"`, () => {
256
256
  const n = i.init(e);
257
- k.appliedKeys(e).set(r, n);
257
+ C.appliedKeys(e).set(r, n);
258
258
  });
259
- }), k.names(e, `${l.prefix}enhance-new`).forEach((r) => {
259
+ }), C.names(e, `${l.prefix}enhance-new`).forEach((r) => {
260
260
  const i = `${je}${r}`;
261
- if (k.instances.get(e)?.has(i))
261
+ if (C.instances.get(e)?.has(i))
262
262
  return;
263
- const n = k.resolveGlobal(r);
264
- n !== null && k.run(`enhance-new "${r}"`, () => {
263
+ const n = C.resolveGlobal(r);
264
+ n !== null && C.run(`enhance-new "${r}"`, () => {
265
265
  const s = new n(e);
266
- k.appliedKeys(e).set(i, s);
266
+ C.appliedKeys(e).set(i, s);
267
267
  });
268
268
  });
269
269
  }
@@ -274,15 +274,15 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
274
274
  * @returns 戻り値はありません。
275
275
  */
276
276
  static refreshElement(e) {
277
- const t = k.instances.get(e);
278
- k.names(e, `${l.prefix}enhance`).forEach((r) => {
277
+ const t = C.instances.get(e);
278
+ C.names(e, `${l.prefix}enhance`).forEach((r) => {
279
279
  if (!t || !t.has(r))
280
280
  return;
281
- const i = k.enhancers.get(r);
282
- !i || typeof i.refresh != "function" || k.run(`enhance "${r}" refresh`, () => {
281
+ const i = C.enhancers.get(r);
282
+ !i || typeof i.refresh != "function" || C.run(`enhance "${r}" refresh`, () => {
283
283
  i.refresh(e, t.get(r));
284
284
  });
285
- }), k.applyElement(e);
285
+ }), C.applyElement(e);
286
286
  }
287
287
  /**
288
288
  * 1 要素の連携を破棄します。
@@ -291,15 +291,15 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
291
291
  * @returns 戻り値はありません。
292
292
  */
293
293
  static destroyElement(e) {
294
- const t = k.instances.get(e);
294
+ const t = C.instances.get(e);
295
295
  t && (t.forEach((r, i) => {
296
296
  if (i.startsWith(je))
297
297
  return;
298
- const n = k.enhancers.get(i);
299
- !n || typeof n.destroy != "function" || k.run(`enhance "${i}" destroy`, () => {
298
+ const n = C.enhancers.get(i);
299
+ !n || typeof n.destroy != "function" || C.run(`enhance "${i}" destroy`, () => {
300
300
  n.destroy(e, r);
301
301
  });
302
- }), k.instances.delete(e));
302
+ }), C.instances.delete(e));
303
303
  }
304
304
  /**
305
305
  * 要素の適用状況を返します(無ければ作成します)。
@@ -308,11 +308,11 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
308
308
  * @returns キー → インスタンスの対応
309
309
  */
310
310
  static appliedKeys(e) {
311
- const t = k.instances.get(e);
311
+ const t = C.instances.get(e);
312
312
  if (t)
313
313
  return t;
314
314
  const r = /* @__PURE__ */ new Map();
315
- return k.instances.set(e, r), r;
315
+ return C.instances.set(e, r), r;
316
316
  }
317
317
  /**
318
318
  * 空白区切りの属性値を名前の一覧へ分解します。
@@ -353,7 +353,7 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
353
353
  if (t = t[r], t === void 0)
354
354
  break;
355
355
  }
356
- return typeof t != "function" ? (q.isEnabled() && !k.warnedMissingGlobals.has(e) && (k.warnedMissingGlobals.add(e), m.warn(
356
+ return typeof t != "function" ? (V.isEnabled() && !C.warnedMissingGlobals.has(e) && (C.warnedMissingGlobals.add(e), m.warn(
357
357
  "[Haori]",
358
358
  `${l.prefix}enhance-new could not resolve the global reference (load the library before Haori runs): ${e}`
359
359
  )), null) : t;
@@ -365,7 +365,7 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
365
365
  * @returns 戻り値はありません。
366
366
  */
367
367
  static warnUnknownName(e) {
368
- !q.isEnabled() || k.warnedUnknownNames.has(e) || (k.warnedUnknownNames.add(e), m.warn(
368
+ !V.isEnabled() || C.warnedUnknownNames.has(e) || (C.warnedUnknownNames.add(e), m.warn(
369
369
  "[Haori]",
370
370
  `Enhancer "${e}" is not registered yet; the declaration is kept pending and applied when it is registered (Haori.enhancers.register('${e}', {init(el) {...}})).`
371
371
  ));
@@ -387,8 +387,8 @@ const yt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, je = "new:
387
387
  }
388
388
  }
389
389
  };
390
- k.enhancers = /* @__PURE__ */ new Map(), k.instances = /* @__PURE__ */ new WeakMap(), k.warnedUnknownNames = /* @__PURE__ */ new Set(), k.warnedMissingGlobals = /* @__PURE__ */ new Set();
391
- let se = k;
390
+ C.enhancers = /* @__PURE__ */ new Map(), C.instances = /* @__PURE__ */ new WeakMap(), C.warnedUnknownNames = /* @__PURE__ */ new Set(), C.warnedMissingGlobals = /* @__PURE__ */ new Set();
391
+ let se = C;
392
392
  const Ze = "yyyy/MM/dd HH:mm", bt = "en-US", Ke = 1e4;
393
393
  function oe(y) {
394
394
  return String(y).padStart(2, "0");
@@ -429,7 +429,7 @@ function _e(y, e) {
429
429
  const i = Number(r.year), n = Number(r.month), s = Number(r.day), a = Number(r.hour), o = Number(r.minute), c = Number(r.second);
430
430
  return !Number.isFinite(i) || !Number.isFinite(n) || !Number.isFinite(s) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(c) ? null : Qe(i, n, s, a, o, c);
431
431
  }
432
- function ke(y, e = Ze, t) {
432
+ function Ce(y, e = Ze, t) {
433
433
  if (y == null || y === "")
434
434
  return "";
435
435
  const r = y instanceof Date ? y : new Date(y);
@@ -456,7 +456,7 @@ function ke(y, e = Ze, t) {
456
456
  }
457
457
  const Et = "yyyy-MM-dd";
458
458
  function et(y = Ze, e) {
459
- return ke(/* @__PURE__ */ new Date(), y, e);
459
+ return Ce(/* @__PURE__ */ new Date(), y, e);
460
460
  }
461
461
  function tt(y = 0, e = Et, t) {
462
462
  const r = Number.isFinite(y) ? Math.trunc(y) : 0, i = typeof t == "string" && t.trim() !== "" ? t.trim() : "";
@@ -471,7 +471,7 @@ function tt(y = 0, e = Et, t) {
471
471
  n = c.getFullYear(), s = c.getMonth() + 1, a = c.getDate();
472
472
  }
473
473
  const o = new Date(Date.UTC(n, s - 1, a + r));
474
- return ke(o, e, "UTC");
474
+ return Ce(o, e, "UTC");
475
475
  }
476
476
  function rt(y, e) {
477
477
  if (y == null)
@@ -550,7 +550,7 @@ function De(y, e) {
550
550
  const t = Number(y);
551
551
  return Number.isFinite(t) ? Math.trunc(t) : e;
552
552
  }
553
- function $e(y, e) {
553
+ function ke(y, e) {
554
554
  if (typeof y != "string")
555
555
  return "";
556
556
  const t = At.exec(y.trim());
@@ -564,7 +564,7 @@ function $e(y, e) {
564
564
  }
565
565
  function St(y) {
566
566
  if (typeof y == "string" && y.trim() !== "")
567
- return $e(y, 0);
567
+ return ke(y, 0);
568
568
  const e = /* @__PURE__ */ new Date();
569
569
  return `${String(e.getFullYear()).padStart(4, "0")}-${oe(e.getMonth() + 1)}`;
570
570
  }
@@ -577,7 +577,7 @@ function st(y, e) {
577
577
  return [];
578
578
  const i = Math.min(t, vt), n = [];
579
579
  for (let s = 0; s <= i; s += 1) {
580
- const a = $e(r, -s);
580
+ const a = ke(r, -s);
581
581
  n.push({ targetMonth: a, label: a.replace(/-/g, "/") });
582
582
  }
583
583
  return n;
@@ -649,13 +649,13 @@ function dt(y, e) {
649
649
  return r;
650
650
  }
651
651
  const wt = Object.freeze({
652
- date: ke,
652
+ date: Ce,
653
653
  now: et,
654
654
  today: tt,
655
655
  number: rt,
656
656
  pages: nt,
657
657
  range: it,
658
- monthAdd: $e,
658
+ monthAdd: ke,
659
659
  monthRange: st,
660
660
  pageSummary: at,
661
661
  findBy: ot,
@@ -941,7 +941,7 @@ const D = class D {
941
941
  * @returns 戻り値はありません。
942
942
  */
943
943
  static reportUnusableBindingKeys(e) {
944
- if (e.length === 0 || !q.isEnabled())
944
+ if (e.length === 0 || !V.isEnabled())
945
945
  return;
946
946
  const t = e.filter(
947
947
  (r) => !this.loggedUnusableBindingKeys.has(r)
@@ -1239,7 +1239,7 @@ let ${e.join(", ")};`;
1239
1239
  );
1240
1240
  return;
1241
1241
  }
1242
- q.isEnabled() && (e.forEach((r) => {
1242
+ V.isEnabled() && (e.forEach((r) => {
1243
1243
  this.pendingUnresolvedIdentifiers.add(r);
1244
1244
  }), this.scheduleUnresolvedIdentifierReport());
1245
1245
  }
@@ -1296,7 +1296,7 @@ let ${e.join(", ")};`;
1296
1296
  * @return 戻り値はありません。
1297
1297
  */
1298
1298
  static recordRowScopeIdentifiers(e) {
1299
- if (q.isEnabled())
1299
+ if (V.isEnabled())
1300
1300
  for (const t of e)
1301
1301
  typeof t == "string" && t !== "" && this.rowScopeIdentifiers.add(t);
1302
1302
  }
@@ -1466,14 +1466,14 @@ ${t}`;
1466
1466
  s && (this.BUILTIN_DATA_REFERENCE_PATTERN.test(n) ? a[this.BUILTIN_NAMESPACE] = {
1467
1467
  ...this.BUILTIN_HELPERS,
1468
1468
  [this.BUILTIN_DATA_PROPERTY]: { ...a }
1469
- } : a[this.BUILTIN_NAMESPACE] = this.BUILTIN_HELPERS), this.pruneResolvedIdentifiers(a), q.isEnabled() && this.recordSuppliedIdentifiers(a);
1469
+ } : a[this.BUILTIN_NAMESPACE] = this.BUILTIN_HELPERS), this.pruneResolvedIdentifiers(a), V.isEnabled() && this.recordSuppliedIdentifiers(a);
1470
1470
  const o = this.canAttemptMissingIdentifierRecovery(e), c = this.extractFreeIdentifiers(e).filter(
1471
1471
  (d) => !(d in a) && // 禁止グローバルは buildAssignments が `const` で遮蔽するため対象外
1472
1472
  // (二重宣言は構文エラーになる)。
1473
1473
  !this.FORBIDDEN_NAMES.includes(d) && // 標準組み込み(`Math` など)は式から参照できる仕様のため遮蔽しない。
1474
1474
  !this.ALLOWED_GLOBAL_IDENTIFIERS.has(d)
1475
1475
  );
1476
- if (q.isEnabled()) {
1476
+ if (V.isEnabled()) {
1477
1477
  const d = this.extractBoundIdentifiers(e);
1478
1478
  this.recordScopeMissingIdentifiers(
1479
1479
  d.size === 0 ? c : c.filter((p) => !d.has(p)),
@@ -2493,7 +2493,7 @@ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2493
2493
  * @returns 集計中なら true
2494
2494
  */
2495
2495
  static isCollecting() {
2496
- return P.collecting && q.isEnabled();
2496
+ return P.collecting && V.isEnabled();
2497
2497
  }
2498
2498
  /**
2499
2499
  * 現在の集計結果スナップショットを返します。
@@ -2628,7 +2628,7 @@ ${u.template}`,
2628
2628
  * @param expressions 今回評価した式一覧
2629
2629
  */
2630
2630
  static record(e, t, r) {
2631
- if (!q.isEnabled() || !e || t.length === 0 || (P.ensureGlobalAccess(), !P.isCollecting()))
2631
+ if (!V.isEnabled() || !e || t.length === 0 || (P.ensureGlobalAccess(), !P.isCollecting()))
2632
2632
  return;
2633
2633
  const i = P.getOrCreateElementStore(
2634
2634
  e.element
@@ -2661,7 +2661,7 @@ ${u.template}`,
2661
2661
  * globalThis から dev-only の取得窓口を参照できるようにします。
2662
2662
  */
2663
2663
  static ensureGlobalAccess() {
2664
- if (!q.isEnabled())
2664
+ if (!V.isEnabled())
2665
2665
  return;
2666
2666
  const e = globalThis;
2667
2667
  e[P.GLOBAL_KEY] === void 0 && (e[P.GLOBAL_KEY] = {
@@ -2809,7 +2809,7 @@ ${u.template}`,
2809
2809
  }
2810
2810
  };
2811
2811
  P.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", P.ELEMENT_STORES = /* @__PURE__ */ new Map(), P.collecting = !1, P.DEFAULT_REPORT_LIMIT = 20;
2812
- let Fe = P;
2812
+ let Ne = P;
2813
2813
  const pe = class pe {
2814
2814
  /**
2815
2815
  * フラグメントのコンストラクタ。
@@ -2954,7 +2954,7 @@ const w = class w extends M {
2954
2954
  super(e), this.children = [], this.attributeMap = /* @__PURE__ */ new Map(), this.bindingData = null, this.bindingWorkChain = Promise.resolve(), this.bindingWorkActive = 0, this.lastSupplySequence = 0, this.lastResetSequence = 0, this.initialBindAttribute = null, this.derivedBindingData = null, this.bindingDataCache = null, this.descendantBindingDataCache = null, this.visible = !0, this.display = null, this.displayPriority = null, this.template = null, this.rowLocalTemplate = null, this.listKey = null, this.renderSignature = null, this.eachInputSignature = null, this.deriveSubtreeSignature = null, this.deriveInputSignature = null, this.freshInitializationSkippable = !1, this.value = null, this.selfWritingAttributes = /* @__PURE__ */ new Map(), this.skipChangeValue = !1, this.valueWriteUnapplied = !1, this.pendingValueWrite = null, this.userEditSequence = 0, this.authoritativeValueSequence = 0, this.lastValueSequence = 0, this.lastValueKind = "nonSupply", this.selfWrittenBind = /* @__PURE__ */ new Map(), this.lastPathApplied = /* @__PURE__ */ new Map(), this.lastChangeSequence = 0, w.dropIfVisibilityArtifacts(e), this.syncValue(), this.initialBindAttribute = e.getAttribute(`${l.prefix}bind`), e.getAttributeNames().forEach((t) => {
2955
2955
  const r = e.getAttribute(t);
2956
2956
  if (r !== null && !this.attributeMap.has(t)) {
2957
- const i = new Ne(t, r);
2957
+ const i = new Fe(t, r);
2958
2958
  this.attributeMap.set(t, i);
2959
2959
  }
2960
2960
  }), e.childNodes.forEach((t) => {
@@ -3884,7 +3884,7 @@ const w = class w extends M {
3884
3884
  * @return 戻り値はありません。
3885
3885
  */
3886
3886
  static warnUnresolvedAttribute(e, t, r, i) {
3887
- if (!q.isEnabled())
3887
+ if (!V.isEnabled())
3888
3888
  return;
3889
3889
  const n = `${e} ${r}`;
3890
3890
  w.loggedUnresolvedAttributes.has(n) || (w.loggedUnresolvedAttributes.add(n), m.warn(
@@ -4055,7 +4055,7 @@ const w = class w extends M {
4055
4055
  * @returns 戻り値はありません。
4056
4056
  */
4057
4057
  static warnValueTypeDeclaration(e, t, r) {
4058
- if (!q.isEnabled())
4058
+ if (!V.isEnabled())
4059
4059
  return;
4060
4060
  const i = e instanceof HTMLInputElement ? `[type=${e.type}]` : "", n = `${e.tagName}${i} ${t} ${r}`;
4061
4061
  w.loggedValueTypeDeclarations.has(n) || (w.loggedValueTypeDeclarations.add(n), m.warn(
@@ -4311,7 +4311,7 @@ const w = class w extends M {
4311
4311
  );
4312
4312
  if (r === null)
4313
4313
  return e === t ? this.removeAttribute(e) : this.removeAliasedAttribute(e, t);
4314
- const o = new Ne(e, r);
4314
+ const o = new Fe(e, r);
4315
4315
  if (n) {
4316
4316
  const ge = this.attributeMap.get(e);
4317
4317
  if (ge && (ge.isEvaluate || ge.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
@@ -4328,13 +4328,13 @@ const w = class w extends M {
4328
4328
  element: c,
4329
4329
  rawName: e,
4330
4330
  template: r
4331
- }), d = o.isEvaluate || o.isRawEvaluate, p = e === t && w.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), g = o.isSingleExpression(), E = le.joinEvaluateResults(u.results), A = u.results.length === 1 ? u.results[0] : E, I = t === "value" && w.resolveDeclaredValueType(c) === "boolean", C = A === !1 && !I, W = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || A === null || A === void 0 || C : p ? u.hasUnresolvedReference || A === null || A === void 0 || A === !1 : g ? u.hasUnresolvedReference || A === null || A === void 0 || C : d && E === "");
4331
+ }), d = o.isEvaluate || o.isRawEvaluate, p = e === t && w.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), g = o.isSingleExpression(), E = le.joinEvaluateResults(u.results), A = u.results.length === 1 ? u.results[0] : E, I = t === "value" && w.resolveDeclaredValueType(c) === "boolean", $ = A === !1 && !I, W = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || A === null || A === void 0 || $ : p ? u.hasUnresolvedReference || A === null || A === void 0 || A === !1 : g ? u.hasUnresolvedReference || A === null || A === void 0 || $ : d && E === "");
4332
4332
  if (W && u.hasUnresolvedReference && w.warnUnresolvedAttribute(
4333
4333
  e,
4334
4334
  t,
4335
4335
  r,
4336
4336
  c
4337
- ), q.isEnabled() && A === !1 && g) {
4337
+ ), V.isEnabled() && A === !1 && g) {
4338
4338
  const ge = o.getSingleExpression(), we = ge === null ? null : ee.diagnoseStrictComparison(
4339
4339
  ge,
4340
4340
  this.getBindingData()
@@ -4346,14 +4346,14 @@ const w = class w extends M {
4346
4346
  c
4347
4347
  );
4348
4348
  }
4349
- const x = o.isForceEvaluation() ? r : g ? A : E, U = i && o.isEvaluate && t === "value" && w.isValuePropertyTarget(c), K = c.getRootNode(), R = U && w.isUserEditableValue(c) && (c === K.activeElement || this.hasPendingUserEdit()), S = W || x === null || x === !1 && !I ? null : String(x), H = e !== t && c.getAttribute(e) !== r, O = S === null ? c.hasAttribute(t) : c.getAttribute(t) !== S, te = S === null ? "" : S, ie = U && !R && c.value !== te, V = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), z = t === "selected" && c instanceof HTMLOptionElement, Z = K.activeElement, J = Z !== null && (V && c === Z || z && c.closest("select") === Z) || (V || z) && this.hasPendingCheckableUserEdit(z), ae = S !== null, Se = V && !J && c.checked !== ae, ce = z && !J && c.selected !== ae;
4350
- if (!H && !O && !ie && !Se && !ce)
4349
+ const x = o.isForceEvaluation() ? r : g ? A : E, U = i && o.isEvaluate && t === "value" && w.isValuePropertyTarget(c), K = c.getRootNode(), R = U && w.isUserEditableValue(c) && (c === K.activeElement || this.hasPendingUserEdit()), S = W || x === null || x === !1 && !I ? null : String(x), H = e !== t && c.getAttribute(e) !== r, B = S === null ? c.hasAttribute(t) : c.getAttribute(t) !== S, te = S === null ? "" : S, ie = U && !R && c.value !== te, q = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), z = t === "selected" && c instanceof HTMLOptionElement, Z = K.activeElement, J = Z !== null && (q && c === Z || z && c.closest("select") === Z) || (q || z) && this.hasPendingCheckableUserEdit(z), ae = S !== null, Se = q && !J && c.checked !== ae, ce = z && !J && c.selected !== ae;
4350
+ if (!H && !B && !ie && !Se && !ce)
4351
4351
  return U && !R && (this.value = this.normalizeValueForElement(
4352
4352
  c,
4353
4353
  te
4354
- ), this.clearUnappliedValueWrite()), (V || z) && !J && this.syncCheckableValueFromDom(z), Promise.resolve();
4354
+ ), this.clearUnappliedValueWrite()), (q || z) && !J && this.syncCheckableValueFromDom(z), Promise.resolve();
4355
4355
  const We = G.enqueue(() => {
4356
- H && c.setAttribute(e, r), S === null ? c.removeAttribute(t) : O && (c.setAttribute(t, S), t === `${l.prefix}bind` && this.recordSelfWrittenBind(S)), U && !R && (this.value = this.normalizeValueForElement(
4356
+ H && c.setAttribute(e, r), S === null ? c.removeAttribute(t) : B && (c.setAttribute(t, S), t === `${l.prefix}bind` && this.recordSelfWrittenBind(S)), U && !R && (this.value = this.normalizeValueForElement(
4357
4357
  c,
4358
4358
  te
4359
4359
  ), ie && (c.value = te), this.recordValueWriteResult(c.value === te)), Se && (c.checked = ae), ce && (c.selected = ae), (Se || ce) && this.syncCheckableValueFromDom(ce);
@@ -4850,7 +4850,7 @@ class Ve extends M {
4850
4850
  }));
4851
4851
  }
4852
4852
  }
4853
- const Ce = class Ce {
4853
+ const $e = class $e {
4854
4854
  /**
4855
4855
  * コンストラクタ。
4856
4856
  *
@@ -4858,7 +4858,7 @@ const Ce = class Ce {
4858
4858
  */
4859
4859
  constructor(e) {
4860
4860
  this.contents = [], this.isEvaluate = !1, this.isRawEvaluate = !1, this.value = e;
4861
- const t = [...e.matchAll(Ce.PLACEHOLDER_REGEX)];
4861
+ const t = [...e.matchAll($e.PLACEHOLDER_REGEX)];
4862
4862
  let r = 0, i = !1, n = !1;
4863
4863
  for (const s of t) {
4864
4864
  s.index > r && this.contents.push({
@@ -4963,7 +4963,7 @@ const Ce = class Ce {
4963
4963
  return this.contents.forEach((c) => {
4964
4964
  try {
4965
4965
  if (r(c)) {
4966
- const u = Fe.measure(
4966
+ const u = Ne.measure(
4967
4967
  () => ee.evaluateDetailed(c.text, e)
4968
4968
  ), d = u.value;
4969
4969
  a += u.durationMs, s.push({
@@ -4982,15 +4982,15 @@ const Ce = class Ce {
4982
4982
  durationMs: 0
4983
4983
  }), n.push("");
4984
4984
  }
4985
- }), Fe.record(
4985
+ }), Ne.record(
4986
4986
  t,
4987
4987
  s,
4988
4988
  a
4989
4989
  ), { results: n, hasUnresolvedReference: o };
4990
4990
  }
4991
4991
  };
4992
- Ce.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
4993
- let le = Ce;
4992
+ $e.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
4993
+ let le = $e;
4994
4994
  const _ = class _ extends le {
4995
4995
  /**
4996
4996
  * コンストラクタ。
@@ -5070,7 +5070,7 @@ const _ = class _ extends le {
5070
5070
  }
5071
5071
  };
5072
5072
  _.FORCE_EVALUATION_SUFFIXES = ["if", "each", "derive"], _.FORCE_EVALUATION_PREFIXES = ["data-", "hor-"], _.forceEvaluationNames = null, _.forceEvaluationPrefix = null;
5073
- let Ne = _;
5073
+ let Fe = _;
5074
5074
  const Ee = class Ee {
5075
5075
  /**
5076
5076
  * 実行モードを取得します。
@@ -5216,7 +5216,7 @@ const Ee = class Ee {
5216
5216
  * @returns 整形済み文字列。整形できない場合は空文字
5217
5217
  */
5218
5218
  static date(e, t, r) {
5219
- return ke(e, t, r);
5219
+ return Ce(e, t, r);
5220
5220
  }
5221
5221
  /**
5222
5222
  * 現在日時を指定フォーマットの文字列へ整形します。
@@ -5293,7 +5293,7 @@ const Ee = class Ee {
5293
5293
  * @returns 加算後の年月(`YYYY-MM` 形式)。不正な入力は空文字
5294
5294
  */
5295
5295
  static monthAdd(e, t) {
5296
- return $e(e, t);
5296
+ return ke(e, t);
5297
5297
  }
5298
5298
  /**
5299
5299
  * 基準月から過去方向へ `count + 1` 個の年月配列を降順で返します。
@@ -5402,7 +5402,7 @@ function Ye() {
5402
5402
  (r) => typeof e?.[r] == "function"
5403
5403
  ) ? e : ve;
5404
5404
  }
5405
- const h = class h {
5405
+ const f = class f {
5406
5406
  /**
5407
5407
  * フォーム内にある入力エレメントの値をオブジェクトとして取得します。
5408
5408
  * data-form-object属性があると、そのエレメント内の値はオブジェクトとして処理されます。
@@ -5413,7 +5413,7 @@ const h = class h {
5413
5413
  */
5414
5414
  static getValues(e) {
5415
5415
  const t = {}, r = /* @__PURE__ */ new Set();
5416
- return h.getPartValues(e, t, null, r), h.registerCollectedExcludedKeys(t, r), t;
5416
+ return f.getPartValues(e, t, null, r), f.registerCollectedExcludedKeys(t, r), t;
5417
5417
  }
5418
5418
  /**
5419
5419
  * 入力エレメントから収集する値を解決します。
@@ -5434,11 +5434,11 @@ const h = class h {
5434
5434
  */
5435
5435
  static resolveCollectedValue(e) {
5436
5436
  const t = e.getTarget();
5437
- if (h.isFileInput(e)) {
5437
+ if (f.isFileInput(e)) {
5438
5438
  const r = t, i = r.files ? Array.from(r.files) : [];
5439
5439
  return r.multiple ? i : i.length > 0 ? i[0] : null;
5440
5440
  }
5441
- if (h.isBooleanCheckbox(e)) {
5441
+ if (f.isBooleanCheckbox(e)) {
5442
5442
  const r = t;
5443
5443
  return r.value === "false" ? !r.checked : r.checked;
5444
5444
  }
@@ -5491,13 +5491,13 @@ const h = class h {
5491
5491
  * @returns 戻り値はありません。
5492
5492
  */
5493
5493
  static clearRowUserEditMarksForChangedKeys(e, t) {
5494
- const r = h.getValues(e), i = /* @__PURE__ */ new Set();
5494
+ const r = f.getValues(e), i = /* @__PURE__ */ new Set();
5495
5495
  for (const n of /* @__PURE__ */ new Set([
5496
5496
  ...Object.keys(r),
5497
5497
  ...Object.keys(t)
5498
5498
  ]))
5499
- h.isSameCollectedValue(r[n], t[n]) || i.add(n);
5500
- i.size !== 0 && h.clearUserEditMarksForKeys(e, e, i);
5499
+ f.isSameCollectedValue(r[n], t[n]) || i.add(n);
5500
+ i.size !== 0 && f.clearUserEditMarksForKeys(e, e, i);
5501
5501
  }
5502
5502
  /**
5503
5503
  * 収集値と要素データの値が同じ内容かどうかを判定します。
@@ -5526,9 +5526,9 @@ const h = class h {
5526
5526
  * @returns 戻り値はありません。
5527
5527
  */
5528
5528
  static clearUserEditMarksForKeys(e, t, r) {
5529
- const i = h.resolveRowTopLevelKey(e, t);
5529
+ const i = f.resolveRowTopLevelKey(e, t);
5530
5530
  i !== null && r.has(i) && e.clearUserEditMark(), e.getChildElementFragments().forEach((n) => {
5531
- h.clearUserEditMarksForKeys(n, t, r);
5531
+ f.clearUserEditMarksForKeys(n, t, r);
5532
5532
  });
5533
5533
  }
5534
5534
  /**
@@ -5544,7 +5544,7 @@ const h = class h {
5544
5544
  static resolveRowTopLevelKey(e, t) {
5545
5545
  let r = null, i = e;
5546
5546
  for (; i !== null && i !== t; ) {
5547
- const n = i.getAttribute(`${l.prefix}form-object`) || i.getAttribute(`${l.prefix}form-list`) || h.resolveFieldName(i);
5547
+ const n = i.getAttribute(`${l.prefix}form-object`) || i.getAttribute(`${l.prefix}form-list`) || f.resolveFieldName(i);
5548
5548
  n != null && String(n) !== "" && (r = String(n)), i = i.getParent();
5549
5549
  }
5550
5550
  return r;
@@ -5585,7 +5585,7 @@ const h = class h {
5585
5585
  const r = e.getTarget();
5586
5586
  if (!(r instanceof HTMLInputElement) || r.type !== "radio" || r.hasAttribute("name") && !r.hasAttribute(Ge))
5587
5587
  return;
5588
- const i = h.resolveGroupScope(e), n = `${String(t)}--haori${h.resolveGroupScopeId(
5588
+ const i = f.resolveGroupScope(e), n = `${String(t)}--haori${f.resolveGroupScopeId(
5589
5589
  i
5590
5590
  )}`;
5591
5591
  if (r.getAttribute("name") !== n)
@@ -5619,8 +5619,8 @@ const h = class h {
5619
5619
  * @returns スコープの識別番号
5620
5620
  */
5621
5621
  static resolveGroupScopeId(e) {
5622
- const t = h.GROUP_SCOPE_IDS.get(e);
5623
- return t !== void 0 ? t : (h.groupScopeSequence += 1, h.GROUP_SCOPE_IDS.set(e, h.groupScopeSequence), h.groupScopeSequence);
5622
+ const t = f.GROUP_SCOPE_IDS.get(e);
5623
+ return t !== void 0 ? t : (f.groupScopeSequence += 1, f.GROUP_SCOPE_IDS.set(e, f.groupScopeSequence), f.groupScopeSequence);
5624
5624
  }
5625
5625
  /**
5626
5626
  * 宣言バインドで値・状態が決まり、その評価が解決している入力かどうかを判定します。
@@ -5638,17 +5638,17 @@ const h = class h {
5638
5638
  * @returns 宣言バインドで値・状態が決まり、その評価が解決している場合 true
5639
5639
  */
5640
5640
  static hasResolvedDeclarativeState(e) {
5641
- if (!h.isDeclarativeStateBound(e))
5641
+ if (!f.isDeclarativeStateBound(e))
5642
5642
  return !1;
5643
5643
  const t = e.getTarget();
5644
5644
  if (t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio"))
5645
- return h.isDeclarationResolved(e, "checked");
5646
- if (h.hasDeclarativeBinding(e, "value"))
5647
- return h.isDeclarationResolved(e, "value");
5645
+ return f.isDeclarationResolved(e, "checked");
5646
+ if (f.hasDeclarativeBinding(e, "value"))
5647
+ return f.isDeclarationResolved(e, "value");
5648
5648
  if (t instanceof HTMLSelectElement) {
5649
5649
  for (const r of Array.from(t.options)) {
5650
5650
  const i = M.get(r);
5651
- if (i instanceof T && h.hasDeclarativeBinding(i, "selected") && !h.isDeclarationResolved(i, "selected"))
5651
+ if (i instanceof T && f.hasDeclarativeBinding(i, "selected") && !f.isDeclarationResolved(i, "selected"))
5652
5652
  return !1;
5653
5653
  }
5654
5654
  return !0;
@@ -5691,7 +5691,7 @@ const h = class h {
5691
5691
  */
5692
5692
  static isDeclarativeStateBound(e) {
5693
5693
  const t = e.getTarget();
5694
- return t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? h.hasDeclarativeBinding(e, "checked") : T.isValuePropertyTarget(t) ? h.hasDeclarativeBinding(e, "value") ? !0 : t instanceof HTMLSelectElement ? h.hasDeclarativeSelectedOption(t) : !1 : !1;
5694
+ return t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? f.hasDeclarativeBinding(e, "checked") : T.isValuePropertyTarget(t) ? f.hasDeclarativeBinding(e, "value") ? !0 : t instanceof HTMLSelectElement ? f.hasDeclarativeSelectedOption(t) : !1 : !1;
5695
5695
  }
5696
5696
  /**
5697
5697
  * 対象の部分木にある入力欄を、ネイティブのフォームリセットと同じ既定値へ戻します。
@@ -5711,7 +5711,7 @@ const h = class h {
5711
5711
  const t = "input, textarea, select", r = [];
5712
5712
  e.matches(t) && r.push(e), r.push(...e.querySelectorAll(t));
5713
5713
  for (const i of r)
5714
- i instanceof HTMLInputElement ? i.type === "checkbox" || i.type === "radio" ? i.checked = i.defaultChecked : i.type === "file" ? i.value = "" : i.value = i.defaultValue : i instanceof HTMLTextAreaElement ? i.value = i.defaultValue : i instanceof HTMLSelectElement && h.restoreDefaultSelection(i);
5714
+ i instanceof HTMLInputElement ? i.type === "checkbox" || i.type === "radio" ? i.checked = i.defaultChecked : i.type === "file" ? i.value = "" : i.value = i.defaultValue : i instanceof HTMLTextAreaElement ? i.value = i.defaultValue : i instanceof HTMLSelectElement && f.restoreDefaultSelection(i);
5715
5715
  }
5716
5716
  /**
5717
5717
  * `<select>` の選択状態を既定の選択(`defaultSelected`)へ戻します。
@@ -5741,14 +5741,14 @@ const h = class h {
5741
5741
  * @return 戻り値はありません。
5742
5742
  */
5743
5743
  static clearDeclarativeStateFromDom(e) {
5744
- if (h.isDeclarativeStateBound(e)) {
5744
+ if (f.isDeclarativeStateBound(e)) {
5745
5745
  const t = e.getTarget();
5746
5746
  t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? t.checked = !1 : t instanceof HTMLSelectElement ? (Array.from(t.options).forEach((r) => {
5747
5747
  r.selected = !1;
5748
5748
  }), t.selectedIndex = -1) : (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && (t.value = "");
5749
5749
  }
5750
5750
  e.getChildren().forEach((t) => {
5751
- t instanceof T && h.clearDeclarativeStateFromDom(t);
5751
+ t instanceof T && f.clearDeclarativeStateFromDom(t);
5752
5752
  });
5753
5753
  }
5754
5754
  /**
@@ -5778,7 +5778,7 @@ const h = class h {
5778
5778
  static hasDeclarativeSelectedOption(e) {
5779
5779
  for (const t of Array.from(e.options)) {
5780
5780
  const r = M.get(t);
5781
- if (r instanceof T && h.hasDeclarativeBinding(r, "selected"))
5781
+ if (r instanceof T && f.hasDeclarativeBinding(r, "selected"))
5782
5782
  return !0;
5783
5783
  }
5784
5784
  return !1;
@@ -5809,7 +5809,7 @@ const h = class h {
5809
5809
  * @returns 編集された入力欄だけを含む値のオブジェクト
5810
5810
  */
5811
5811
  static getValuesEditedAfter(e, t) {
5812
- return h.getPartValues(e, {}, t);
5812
+ return f.getPartValues(e, {}, t);
5813
5813
  }
5814
5814
  /**
5815
5815
  * 利用者が編集した入力欄に対応するバインドデータの経路を集めます。
@@ -5851,10 +5851,10 @@ const h = class h {
5851
5851
  */
5852
5852
  static collectEditedPaths(e, t, r = "", i = null) {
5853
5853
  const n = /* @__PURE__ */ new Map();
5854
- for (const a of h.collectUserEditSequences(e)) {
5854
+ for (const a of f.collectUserEditSequences(e)) {
5855
5855
  const o = /* @__PURE__ */ new Set();
5856
- h.walkEditedPaths(
5857
- h.getValuesEditedAfter(e, a - 1),
5856
+ f.walkEditedPaths(
5857
+ f.getValuesEditedAfter(e, a - 1),
5858
5858
  r,
5859
5859
  o
5860
5860
  );
@@ -5862,7 +5862,7 @@ const h = class h {
5862
5862
  n.has(c) || n.set(c, a);
5863
5863
  }
5864
5864
  const s = /* @__PURE__ */ new Set();
5865
- h.walkExcludedPaths(i ?? h.getValues(e), r, s);
5865
+ f.walkExcludedPaths(i ?? f.getValues(e), r, s);
5866
5866
  for (const a of s)
5867
5867
  n.has(a) || n.set(a, t);
5868
5868
  return n;
@@ -5875,7 +5875,7 @@ const h = class h {
5875
5875
  */
5876
5876
  static collectUserEditSequences(e) {
5877
5877
  const t = /* @__PURE__ */ new Set();
5878
- return h.walkUserEditSequences(e, t), [...t].sort((r, i) => i - r);
5878
+ return f.walkUserEditSequences(e, t), [...t].sort((r, i) => i - r);
5879
5879
  }
5880
5880
  /**
5881
5881
  * 部分木をたどってユーザー編集の通番を集めます。
@@ -5888,7 +5888,7 @@ const h = class h {
5888
5888
  const r = e.getUserEditSequence();
5889
5889
  r > 0 && t.add(r);
5890
5890
  for (const i of e.getChildElementFragments())
5891
- h.walkUserEditSequences(i, t);
5891
+ f.walkUserEditSequences(i, t);
5892
5892
  }
5893
5893
  /**
5894
5894
  * 収集値をたどって、除外されたキーの経路を集めます。
@@ -5903,15 +5903,15 @@ const h = class h {
5903
5903
  static walkExcludedPaths(e, t, r) {
5904
5904
  if (Array.isArray(e))
5905
5905
  return;
5906
- const i = h.asPlainRecord(e);
5906
+ const i = f.asPlainRecord(e);
5907
5907
  if (i === null)
5908
5908
  return;
5909
- const n = h.COLLECTED_EXCLUDED_KEYS.get(i);
5909
+ const n = f.COLLECTED_EXCLUDED_KEYS.get(i);
5910
5910
  if (n)
5911
5911
  for (const s of n)
5912
5912
  s in i || r.add(t === "" ? s : `${t}.${s}`);
5913
5913
  for (const [s, a] of Object.entries(i))
5914
- h.walkExcludedPaths(
5914
+ f.walkExcludedPaths(
5915
5915
  a,
5916
5916
  t === "" ? s : `${t}.${s}`,
5917
5917
  r
@@ -5927,10 +5927,10 @@ const h = class h {
5927
5927
  static walkEditedPaths(e, t, r) {
5928
5928
  if (Array.isArray(e))
5929
5929
  return;
5930
- const i = h.asPlainRecord(e);
5930
+ const i = f.asPlainRecord(e);
5931
5931
  if (i !== null) {
5932
5932
  for (const [n, s] of Object.entries(i))
5933
- h.walkEditedPaths(
5933
+ f.walkEditedPaths(
5934
5934
  s,
5935
5935
  t === "" ? n : `${t}.${n}`,
5936
5936
  r
@@ -5956,48 +5956,48 @@ const h = class h {
5956
5956
  return t;
5957
5957
  if (e.getTarget().hasAttribute(`${l.prefix}if-false`)) {
5958
5958
  if (i !== null)
5959
- for (const u of h.collectDeclaredKeysInFragment(e))
5959
+ for (const u of f.collectDeclaredKeysInFragment(e))
5960
5960
  i.add(u);
5961
5961
  return t;
5962
5962
  }
5963
- const n = h.resolveFieldName(e), s = e.getAttribute(`${l.prefix}form-object`), a = e.getAttribute(`${l.prefix}form-list`), o = e.hasAttribute(`${l.prefix}form-list`), c = r !== null && e.getUserEditSequence() <= r;
5963
+ const n = f.resolveFieldName(e), s = e.getAttribute(`${l.prefix}form-object`), a = e.getAttribute(`${l.prefix}form-list`), o = e.hasAttribute(`${l.prefix}form-list`), c = r !== null && e.getUserEditSequence() <= r;
5964
5964
  if (n) {
5965
- if (r !== null && h.isGroupedCheckable(e)) {
5966
- const u = h.collectGroupSelection(
5965
+ if (r !== null && f.isGroupedCheckable(e)) {
5966
+ const u = f.collectGroupSelection(
5967
5967
  e,
5968
5968
  o,
5969
5969
  r
5970
5970
  );
5971
5971
  u.edited && (t[String(n)] = u.value);
5972
- } else if (o && h.isGroupedCheckable(e)) {
5972
+ } else if (o && f.isGroupedCheckable(e)) {
5973
5973
  const u = String(n), d = e.getTarget();
5974
5974
  r === null && !Array.isArray(t[u]) && (t[u] = []), !c && d.checked && (Array.isArray(t[u]) || (t[u] = []), t[u].push(d.value));
5975
5975
  } else if (o && c)
5976
5976
  Array.isArray(t[String(n)]) ? t[String(n)].push(null) : t[String(n)] = [null];
5977
5977
  else if (!c) if (o) {
5978
- const u = h.resolveCollectedValue(e), d = h.isFileInput(e) && Array.isArray(u) ? u : [u];
5978
+ const u = f.resolveCollectedValue(e), d = f.isFileInput(e) && Array.isArray(u) ? u : [u];
5979
5979
  Array.isArray(t[String(n)]) ? t[String(n)].push(...d) : t[String(n)] = d;
5980
- } else if (h.isGroupedCheckable(e)) {
5980
+ } else if (f.isGroupedCheckable(e)) {
5981
5981
  const u = e.getTarget(), d = u instanceof HTMLInputElement ? u.checked : !0, p = u instanceof HTMLInputElement ? u.value : e.getValue(), g = d ? p : null, E = String(n);
5982
5982
  g === null ? E in t || (t[E] = null) : t[E] === null || t[E] === void 0 ? t[E] = g : Array.isArray(t[E]) ? t[E].push(g) : t[E] = [t[E], g];
5983
5983
  } else
5984
- t[String(n)] = h.resolveCollectedValue(e);
5984
+ t[String(n)] = f.resolveCollectedValue(e);
5985
5985
  s && m.warn(
5986
5986
  "Haori",
5987
5987
  `Element cannot have both ${l.prefix}form-object and name attributes.`
5988
5988
  );
5989
5989
  for (const u of e.getChildElementFragments())
5990
- h.getPartValues(u, t, r, i);
5990
+ f.getPartValues(u, t, r, i);
5991
5991
  } else if (s) {
5992
5992
  const u = {}, d = i === null ? null : /* @__PURE__ */ new Set();
5993
5993
  for (const p of e.getChildElementFragments())
5994
- h.getPartValues(
5994
+ f.getPartValues(
5995
5995
  p,
5996
5996
  u,
5997
5997
  r,
5998
5998
  d
5999
5999
  );
6000
- d !== null && h.registerCollectedExcludedKeys(u, d), Object.keys(u).length > 0 ? t[String(s)] = u : i !== null && (d?.size ?? 0) > 0 && i.add(String(s)), a && m.warn(
6000
+ d !== null && f.registerCollectedExcludedKeys(u, d), Object.keys(u).length > 0 ? t[String(s)] = u : i !== null && (d?.size ?? 0) > 0 && i.add(String(s)), a && m.warn(
6001
6001
  "Haori",
6002
6002
  `Element cannot have both ${l.prefix}form-list and ${l.prefix}form-object attributes.`
6003
6003
  );
@@ -6006,25 +6006,25 @@ const h = class h {
6006
6006
  let p = !1;
6007
6007
  for (const g of e.getChildElementFragments()) {
6008
6008
  const E = {}, A = i === null ? null : /* @__PURE__ */ new Set();
6009
- h.getPartValues(
6009
+ f.getPartValues(
6010
6010
  g,
6011
6011
  E,
6012
6012
  r,
6013
6013
  A
6014
- ), A !== null && h.registerCollectedExcludedKeys(E, A), Object.keys(E).length > 0 ? (p = !0, u.push(E), d.push(g.getListKey())) : r !== null && (u.push({}), d.push(g.getListKey()));
6014
+ ), A !== null && f.registerCollectedExcludedKeys(E, A), Object.keys(E).length > 0 ? (p = !0, u.push(E), d.push(g.getListKey())) : r !== null && (u.push({}), d.push(g.getListKey()));
6015
6015
  }
6016
6016
  if (r === null) {
6017
6017
  const g = e.getAttribute(`${l.prefix}each-key`);
6018
- h.registerCollectedRowIdentity(
6018
+ f.registerCollectedRowIdentity(
6019
6019
  u,
6020
6020
  g == null ? null : String(g),
6021
6021
  d,
6022
- h.isCollectedListFromEachSource(e)
6023
- ), h.warnDerivedRowsWithoutKey(e), t[String(a)] = u;
6022
+ f.isCollectedListFromEachSource(e)
6023
+ ), f.warnDerivedRowsWithoutKey(e), t[String(a)] = u;
6024
6024
  } else p && (t[String(a)] = u);
6025
6025
  } else
6026
6026
  for (const u of e.getChildElementFragments())
6027
- h.getPartValues(u, t, r, i);
6027
+ f.getPartValues(u, t, r, i);
6028
6028
  return t;
6029
6029
  }
6030
6030
  /**
@@ -6037,7 +6037,7 @@ const h = class h {
6037
6037
  * @returns Promise(DOMの更新が完了したら解決される)
6038
6038
  */
6039
6039
  static setValues(e, t, r = !1) {
6040
- return h.setPartValues(e, t, r, !0);
6040
+ return f.setPartValues(e, t, r, !0);
6041
6041
  }
6042
6042
  /**
6043
6043
  * フォーム内にある入力エレメントに値をイベントなしで設定します。
@@ -6050,7 +6050,7 @@ const h = class h {
6050
6050
  * @returns Promise(DOMの更新が完了したら解決される)
6051
6051
  */
6052
6052
  static syncValues(e, t, r = !1, i = null) {
6053
- return h.setPartValues(
6053
+ return f.setPartValues(
6054
6054
  e,
6055
6055
  t,
6056
6056
  r,
@@ -6073,7 +6073,7 @@ const h = class h {
6073
6073
  * @returns 反映完了の Promise
6074
6074
  */
6075
6075
  static syncRowValues(e, t, r = null) {
6076
- return h.setPartValues(
6076
+ return f.setPartValues(
6077
6077
  e,
6078
6078
  t,
6079
6079
  !1,
@@ -6103,38 +6103,88 @@ const h = class h {
6103
6103
  if (!r)
6104
6104
  return t;
6105
6105
  const i = String(r);
6106
- return Object.prototype.hasOwnProperty.call(t, i) ? h.asPlainRecord(t[i]) ?? {} : h.resolveAncestorArgOwner(e, i)?.value ?? {};
6106
+ return Object.prototype.hasOwnProperty.call(t, i) ? f.asPlainRecord(t[i]) ?? {} : f.resolveAncestorArgOwner(e, i)?.value ?? {};
6107
6107
  }
6108
6108
  /**
6109
- * `data-form-arg` のキーを所有する祖先を解決します。
6109
+ * キーを所有する祖先を、値の型を問わず解決します。
6110
6110
  *
6111
6111
  * 対象はフォームより外側の要素の**生バインドデータ**(`data-bind` で宣言・更新
6112
6112
  * された値)だけです。`data-derive` の派生データと `data-each` の行データは対象外
6113
6113
  * とします。どちらも描画のたびに作り直される仮想スコープで、行単位の書き戻しは
6114
6114
  * `data-form-list` が担うため、ここで扱うと反映が行生成と競合します。
6115
6115
  *
6116
- * 最も近い所有者だけを見ます。その値がオブジェクトでない場合、または所有者が
6117
- * `data-each` の行である場合は、より外側は探しません(近い方が権威という
6118
- * シャドーの規則に従うため)。
6116
+ * 最も近い所有者だけを見ます。所有者が `data-each` の行である場合は、より外側は
6117
+ * 探しません(近い方が権威というシャドーの規則に従うため)。
6118
+ *
6119
+ * 値の型を問わないのは、収集キーの土台を解決する用途があるためです
6120
+ * (仕様「祖先が所有する値の反映(`data-form-arg` なし)」の「土台に使う値の型は
6121
+ * 問いません」)。`data-form-list` の収集キーは配列になるので、レコード限定に
6122
+ * すると土台が解決できません。`data-form-arg` のキーはレコードに限るため、
6123
+ * そちらは `resolveAncestorArgOwner()` が絞り込みます。
6119
6124
  *
6120
6125
  * @param form フォームのElementFragment
6121
- * @param key `data-form-arg` で指定されたキー名
6126
+ * @param key キー名
6122
6127
  * @returns 所有する祖先フラグメントとその値。見つからない場合は null
6123
6128
  */
6124
- static resolveAncestorArgOwner(e, t) {
6129
+ static resolveAncestorKeyOwner(e, t) {
6125
6130
  let r = e.getParent();
6126
6131
  for (; r; ) {
6127
6132
  const i = r.getRawBindingData();
6128
- if (i && Object.prototype.hasOwnProperty.call(i, t)) {
6129
- if (r.getListKey() !== null)
6130
- return null;
6131
- const n = h.asPlainRecord(i[t]);
6132
- return n ? { owner: r, value: n } : null;
6133
- }
6133
+ if (i && Object.prototype.hasOwnProperty.call(i, t))
6134
+ return r.getListKey() !== null ? null : { owner: r, value: i[t] };
6134
6135
  r = r.getParent();
6135
6136
  }
6136
6137
  return null;
6137
6138
  }
6139
+ /**
6140
+ * `data-form-arg` のキーを所有する祖先を解決します。
6141
+ *
6142
+ * `data-form-arg` はフォームの入力欄が**そのキーの配下**に対応することを宣言する
6143
+ * ため、値はレコードに限ります。レコードでない値を所有している場合は所有者なしと
6144
+ * して扱い、開発モードで警告します。黙って退くと収集値がそのままそのキーへ入り、
6145
+ * 配列を宣言していた場合は**型がオブジェクトへ変わります**(一覧を描く式が壊れる)。
6146
+ *
6147
+ * @param form フォームのElementFragment
6148
+ * @param key `data-form-arg` で指定されたキー名
6149
+ * @returns 所有する祖先フラグメントとその値。見つからない場合は null
6150
+ */
6151
+ static resolveAncestorArgOwner(e, t) {
6152
+ const r = f.resolveAncestorKeyOwner(e, t);
6153
+ if (r === null)
6154
+ return null;
6155
+ const i = f.asPlainRecord(r.value);
6156
+ return i === null ? (f.warnArgOwnerIsNotRecord(e, t, r.value), null) : { owner: r.owner, value: i };
6157
+ }
6158
+ /**
6159
+ * 収集キーの土台を祖先から解決する関数を返します。
6160
+ *
6161
+ * `data-form-arg` を宣言しないフォームでも、収集キーを祖先が所有する構成では
6162
+ * その値が土台になります(仕様「祖先が所有する値の反映(`data-form-arg` なし)」の
6163
+ * 「コミット時は**収集したキーごとに、最も近い所有者の値を土台に収集値を
6164
+ * 重ねます**」)。`Form.mergeCollectedValues()` へ渡して使います。
6165
+ *
6166
+ * @param form フォームのElementFragment
6167
+ * @returns キーを受け取り、祖先が所有する値を返す関数(所有者が無ければ undefined)
6168
+ */
6169
+ static ancestorBaseResolver(e) {
6170
+ return (t) => f.resolveAncestorKeyOwner(e, t)?.value;
6171
+ }
6172
+ /**
6173
+ * `data-form-arg` のキーをレコード以外で所有している構成を、開発モードで知らせます。
6174
+ *
6175
+ * @param form フォームのElementFragment
6176
+ * @param key `data-form-arg` で指定されたキー名
6177
+ * @param value 祖先が所有している値
6178
+ */
6179
+ static warnArgOwnerIsNotRecord(e, t, r) {
6180
+ if (!V.isEnabled() || r == null)
6181
+ return;
6182
+ const i = e.getTarget(), n = f.warnedArgOwnerNotRecord.get(i);
6183
+ n?.has(t) || (n ? n.add(t) : f.warnedArgOwnerNotRecord.set(i, /* @__PURE__ */ new Set([t])), m.warn(
6184
+ "[Haori]",
6185
+ `${l.prefix}form-arg="${t}" のキーを祖先が${Array.isArray(r) ? "配列" : `${typeof r} 型の値`}で持っています。${l.prefix}form-arg はそのキーの配下に入力欄が対応することを宣言するため、値はレコード(オブジェクト)である必要があります。このままでは収集値がそのキーへ直接入り、値の型が変わります。`
6186
+ ));
6187
+ }
6138
6188
  /**
6139
6189
  * 条件式(`data-validity` / `data-{event}-if`)の評価スコープを作ります。
6140
6190
  *
@@ -6152,18 +6202,18 @@ const h = class h {
6152
6202
  static buildConditionScope(e, t = null) {
6153
6203
  const r = { ...e.getBindingData() }, i = t ? {
6154
6204
  source: t,
6155
- argKey: h.resolveFormArgKey(t)
6156
- } : h.resolveConditionValueSource(e);
6205
+ argKey: f.resolveFormArgKey(t)
6206
+ } : f.resolveConditionValueSource(e);
6157
6207
  if (!i)
6158
6208
  return r;
6159
- const n = h.getValues(i.source), s = h.collectDeclaredFieldKeys(i.source);
6209
+ const n = f.getValues(i.source), s = f.collectDeclaredFieldKeys(i.source);
6160
6210
  if (i.argKey === null) {
6161
6211
  for (const o of s)
6162
6212
  r[o] = n[o];
6163
6213
  return r;
6164
6214
  }
6165
6215
  const a = {
6166
- ...h.asPlainRecord(r[i.argKey]) ?? {}
6216
+ ...f.asPlainRecord(r[i.argKey]) ?? {}
6167
6217
  };
6168
6218
  for (const o of s)
6169
6219
  a[o] = n[o];
@@ -6193,8 +6243,8 @@ const h = class h {
6193
6243
  }
6194
6244
  t = i;
6195
6245
  }
6196
- const r = h.getFormFragment(e);
6197
- return r ? { source: r, argKey: h.resolveFormArgKey(r) } : null;
6246
+ const r = f.getFormFragment(e);
6247
+ return r ? { source: r, argKey: f.resolveFormArgKey(r) } : null;
6198
6248
  }
6199
6249
  /**
6200
6250
  * フォームコンテナの `data-form-arg` のキー名を返します。
@@ -6226,7 +6276,7 @@ const h = class h {
6226
6276
  * @returns 宣言されている最上位のキー名
6227
6277
  */
6228
6278
  static collectDeclaredFieldKeys(e) {
6229
- return h.collectDeclaredKeysInFragment(e);
6279
+ return f.collectDeclaredKeysInFragment(e);
6230
6280
  }
6231
6281
  /**
6232
6282
  * フラグメントの配下で収集対象として**宣言されている**最上位のキー名を列挙します。
@@ -6238,7 +6288,7 @@ const h = class h {
6238
6288
  * @returns 宣言されている最上位のキー名
6239
6289
  */
6240
6290
  static collectDeclaredKeysInFragment(e) {
6241
- const t = /* @__PURE__ */ new Set(), r = e.getTarget(), i = h.resolveFieldName(e);
6291
+ const t = /* @__PURE__ */ new Set(), r = e.getTarget(), i = f.resolveFieldName(e);
6242
6292
  i && t.add(String(i));
6243
6293
  const n = `${l.prefix}form-object`, s = `${l.prefix}form-list`, a = r.getAttribute(n) ?? r.getAttribute(s);
6244
6294
  if (a)
@@ -6268,7 +6318,7 @@ const h = class h {
6268
6318
  */
6269
6319
  static applyCustomValidity(e) {
6270
6320
  const t = `${l.prefix}validity`, r = (i) => {
6271
- i.hasAttribute(t) && h.applyOneCustomValidity(i, t), i.getChildElementFragments().forEach(r);
6321
+ i.hasAttribute(t) && f.applyOneCustomValidity(i, t), i.getChildElementFragments().forEach(r);
6272
6322
  };
6273
6323
  r(e);
6274
6324
  }
@@ -6293,19 +6343,19 @@ const h = class h {
6293
6343
  r.setCustomValidity("");
6294
6344
  return;
6295
6345
  }
6296
- const n = h.buildConditionScope(e), s = ee.evaluateDetailed(
6297
- h.unwrapConditionExpression(i),
6346
+ const n = f.buildConditionScope(e), s = ee.evaluateDetailed(
6347
+ f.unwrapConditionExpression(i),
6298
6348
  n
6299
6349
  );
6300
6350
  if (s.unresolvedReference) {
6301
6351
  m.warn(
6302
6352
  "Haori",
6303
6353
  `${t} の参照が解決できないため無効として扱います: ${i}`
6304
- ), r.setCustomValidity(h.resolveValidityMessage(e));
6354
+ ), r.setCustomValidity(f.resolveValidityMessage(e));
6305
6355
  return;
6306
6356
  }
6307
6357
  r.setCustomValidity(
6308
- s.value ? "" : h.resolveValidityMessage(e)
6358
+ s.value ? "" : f.resolveValidityMessage(e)
6309
6359
  );
6310
6360
  }
6311
6361
  /**
@@ -6341,7 +6391,7 @@ const h = class h {
6341
6391
  * @returns 戻り値はありません。
6342
6392
  */
6343
6393
  static warnUnvalidatedCustomValidity(e, t) {
6344
- if (!q.isEnabled() || !e)
6394
+ if (!V.isEnabled() || !e)
6345
6395
  return;
6346
6396
  const r = `${l.prefix}validity`;
6347
6397
  (e.hasAttribute(r) || e.getTarget().querySelector(`[${r}]`) !== null) && m.warn(
@@ -6367,7 +6417,7 @@ const h = class h {
6367
6417
  * @param identifiesItems リストキーで収集先の配列要素を識別できるかどうか
6368
6418
  */
6369
6419
  static registerCollectedRowIdentity(e, t, r, i) {
6370
- h.COLLECTED_ROW_IDENTITY.set(e, { keyArg: t, keys: r, identifiesItems: i });
6420
+ f.COLLECTED_ROW_IDENTITY.set(e, { keyArg: t, keys: r, identifiesItems: i });
6371
6421
  }
6372
6422
  /**
6373
6423
  * 収集値の階層に、除外されたキーの集合を結び付けます。
@@ -6376,7 +6426,7 @@ const h = class h {
6376
6426
  * @param keys 除外されたキー
6377
6427
  */
6378
6428
  static registerCollectedExcludedKeys(e, t) {
6379
- t.size > 0 && h.COLLECTED_EXCLUDED_KEYS.set(e, t);
6429
+ t.size > 0 && f.COLLECTED_EXCLUDED_KEYS.set(e, t);
6380
6430
  }
6381
6431
  /**
6382
6432
  * 収集値に控えた情報を、複製した値へ引き継ぎます。
@@ -6389,10 +6439,10 @@ const h = class h {
6389
6439
  * @param to 複製した値
6390
6440
  */
6391
6441
  static carryCollectedRowIdentity(e, t) {
6392
- const r = h.COLLECTED_ROW_IDENTITY.get(e);
6393
- r && h.COLLECTED_ROW_IDENTITY.set(t, r);
6394
- const i = h.COLLECTED_EXCLUDED_KEYS.get(e);
6395
- i && h.COLLECTED_EXCLUDED_KEYS.set(t, i);
6442
+ const r = f.COLLECTED_ROW_IDENTITY.get(e);
6443
+ r && f.COLLECTED_ROW_IDENTITY.set(t, r);
6444
+ const i = f.COLLECTED_EXCLUDED_KEYS.get(e);
6445
+ i && f.COLLECTED_EXCLUDED_KEYS.set(t, i);
6396
6446
  }
6397
6447
  /**
6398
6448
  * 行の対応付けが出現順へ退いたことを、開発モードで一度だけ知らせます。
@@ -6404,7 +6454,7 @@ const h = class h {
6404
6454
  * @param reason 退いた理由
6405
6455
  */
6406
6456
  static warnPositionalRowFallback(e) {
6407
- !q.isEnabled() || h.warnedPositionalRowFallbacks.has(e) || (h.warnedPositionalRowFallbacks.add(e), m.warn(
6457
+ !V.isEnabled() || f.warnedPositionalRowFallbacks.has(e) || (f.warnedPositionalRowFallbacks.add(e), m.warn(
6408
6458
  "[Haori]",
6409
6459
  `${l.prefix}form-list の行を出現順で対応付けます(${e})。配列と画面の行数・並びが一致していない場合、行の値を取り違えます。`
6410
6460
  ));
@@ -6424,10 +6474,10 @@ const h = class h {
6424
6474
  * @param container `data-form-list` を持つコンテナのフラグメント
6425
6475
  */
6426
6476
  static warnDerivedRowsWithoutKey(e) {
6427
- if (!q.isEnabled() || e.getRawAttribute(`${l.prefix}each-key`) !== null)
6477
+ if (!V.isEnabled() || e.getRawAttribute(`${l.prefix}each-key`) !== null)
6428
6478
  return;
6429
6479
  const t = e.getRawAttribute(`${l.prefix}each`);
6430
- t === null || h.resolveLeadingPath(t) !== null || h.warnedDerivedRowsWithoutKey.has(t) || (h.warnedDerivedRowsWithoutKey.add(t), m.warn(
6480
+ t === null || f.resolveLeadingPath(t) !== null || f.warnedDerivedRowsWithoutKey.has(t) || (f.warnedDerivedRowsWithoutKey.add(t), m.warn(
6431
6481
  "[Haori]",
6432
6482
  `${l.prefix}each="${t}" の一覧を ${l.prefix}form-list で収集していますが、${l.prefix}each-key がありません。行と配列要素を出現順で対応付けるため、画面に出ていない要素があると行の値を取り違えます。${l.prefix}each-key を宣言してください。`
6433
6483
  ));
@@ -6458,19 +6508,32 @@ const h = class h {
6458
6508
  * これらをバインドキーとして受け付けないため、載せても参照できず、`__proto__` に
6459
6509
  * 至っては代入でオブジェクトのプロトタイプが差し替わってしまいます。
6460
6510
  *
6511
+ * **土台に無いキーは `resolveBase` で解決します。** フォーム自身が収集キーを
6512
+ * 持たず祖先が持っている構成では、土台がここに無いためです(仕様「双方向
6513
+ * バインディングの自動更新」の「土台はフォーム自身のバインドデータに限りません」)。
6514
+ * 呼び出し側で土台を組み立ててから渡す形にしないのは、上のプロトタイプ汚染の
6515
+ * ガードを迂回させないためです(解決した値の代入もこのループの中で行います)。
6516
+ * 入れ子のレコードへ再帰する際は渡しません(解決するのはトップレベルの収集キー
6517
+ * だけで、入れ子のキーはバインドキーではないため)。
6518
+ *
6461
6519
  * @param previous 直前のバインドデータ(無い場合は null)
6462
6520
  * @param collected 収集値
6521
+ * @param resolveBase 土台に無いキーの土台を返す関数。省略時は解決しない
6463
6522
  * @returns 収集値を重ねたバインドデータ
6464
6523
  */
6465
- static mergeCollectedValues(e, t) {
6466
- const r = { ...e ?? {} };
6467
- for (const [n, s] of Object.entries(t))
6468
- h.UNSAFE_MERGE_KEYS.has(n) || (r[n] = h.overlayCollectedValue(e?.[n], s));
6469
- const i = h.COLLECTED_EXCLUDED_KEYS.get(t);
6470
- if (i)
6471
- for (const n of i)
6472
- n in t || delete r[n];
6473
- return r;
6524
+ static mergeCollectedValues(e, t, r = null) {
6525
+ const i = { ...e ?? {} };
6526
+ for (const [s, a] of Object.entries(t)) {
6527
+ if (f.UNSAFE_MERGE_KEYS.has(s))
6528
+ continue;
6529
+ const o = e && Object.prototype.hasOwnProperty.call(e, s) ? e[s] : r?.(s);
6530
+ i[s] = f.overlayCollectedValue(o, a);
6531
+ }
6532
+ const n = f.COLLECTED_EXCLUDED_KEYS.get(t);
6533
+ if (n)
6534
+ for (const s of n)
6535
+ s in t || delete i[s];
6536
+ return i;
6474
6537
  }
6475
6538
  /**
6476
6539
  * 収集値の 1 項目を、直前の値へ重ねます。
@@ -6483,13 +6546,13 @@ const h = class h {
6483
6546
  if (Array.isArray(t)) {
6484
6547
  if (!Array.isArray(e))
6485
6548
  return t;
6486
- const n = h.overlayIdentifiedRows(e, t);
6549
+ const n = f.overlayIdentifiedRows(e, t);
6487
6550
  return n !== null ? n : t.map(
6488
- (s, a) => h.overlayCollectedValue(e[a], s)
6551
+ (s, a) => f.overlayCollectedValue(e[a], s)
6489
6552
  );
6490
6553
  }
6491
- const r = h.asPlainRecord(t), i = h.asPlainRecord(e);
6492
- return r === null || i === null ? t : h.mergeCollectedValues(i, r);
6554
+ const r = f.asPlainRecord(t), i = f.asPlainRecord(e);
6555
+ return r === null || i === null ? t : f.mergeCollectedValues(i, r);
6493
6556
  }
6494
6557
  /**
6495
6558
  * 式の先頭にある素の経路を返します。
@@ -6507,7 +6570,7 @@ const h = class h {
6507
6570
  * @returns 先頭の経路。経路として読めない場合は null
6508
6571
  */
6509
6572
  static resolveLeadingPath(e) {
6510
- const t = h.LEADING_PATH_PATTERN.exec(e);
6573
+ const t = f.LEADING_PATH_PATTERN.exec(e);
6511
6574
  if (!t)
6512
6575
  return null;
6513
6576
  const r = t[2].trim();
@@ -6544,7 +6607,7 @@ const h = class h {
6544
6607
  const r = e.getRawAttribute(`${l.prefix}each`);
6545
6608
  if (typeof r != "string" || r.trim() === "")
6546
6609
  return !0;
6547
- const i = h.resolveLeadingPath(r);
6610
+ const i = f.resolveLeadingPath(r);
6548
6611
  if (i === null)
6549
6612
  return !0;
6550
6613
  const n = i.split(".");
@@ -6568,7 +6631,7 @@ const h = class h {
6568
6631
  static createRowKeyIndexes(e, t) {
6569
6632
  const r = /* @__PURE__ */ new Map();
6570
6633
  return e.forEach((i, n) => {
6571
- const s = $.createListKey(
6634
+ const s = k.createListKey(
6572
6635
  i,
6573
6636
  t,
6574
6637
  n
@@ -6599,7 +6662,7 @@ const h = class h {
6599
6662
  const i = e.map((s) => s.getListKey());
6600
6663
  if (i.some((s) => s === null))
6601
6664
  return null;
6602
- const n = h.createRowKeyIndexes(t, r);
6665
+ const n = f.createRowKeyIndexes(t, r);
6603
6666
  return i.map((s) => {
6604
6667
  const a = n.get(s);
6605
6668
  return !a || a.length === 0 ? null : t[a.shift()];
@@ -6629,22 +6692,22 @@ const h = class h {
6629
6692
  * @returns 重ね合わせた配列。対応付けができない場合は null(出現順へ退く)
6630
6693
  */
6631
6694
  static overlayIdentifiedRows(e, t) {
6632
- const r = h.COLLECTED_ROW_IDENTITY.get(t);
6695
+ const r = f.COLLECTED_ROW_IDENTITY.get(t);
6633
6696
  if (r && !r.identifiesItems)
6634
6697
  return null;
6635
6698
  if (!r)
6636
- return t.some((s) => h.asPlainRecord(s) !== null) && h.warnPositionalRowFallback("識別情報が引き継がれていません"), null;
6699
+ return t.some((s) => f.asPlainRecord(s) !== null) && f.warnPositionalRowFallback("識別情報が引き継がれていません"), null;
6637
6700
  if (r.keys.length !== t.length)
6638
- return h.warnPositionalRowFallback("収集後に行の数が変わっています"), null;
6701
+ return f.warnPositionalRowFallback("収集後に行の数が変わっています"), null;
6639
6702
  if (r.keys.some((s) => s === null))
6640
6703
  return null;
6641
- const i = h.createRowKeyIndexes(e, r.keyArg), n = e.slice();
6704
+ const i = f.createRowKeyIndexes(e, r.keyArg), n = e.slice();
6642
6705
  for (let s = 0; s < t.length; s += 1) {
6643
6706
  const a = r.keys[s], o = i.get(a);
6644
6707
  if (!o || o.length === 0)
6645
6708
  continue;
6646
6709
  const c = o.shift();
6647
- n[c] = h.overlayCollectedValue(
6710
+ n[c] = f.overlayCollectedValue(
6648
6711
  e[c],
6649
6712
  t[s]
6650
6713
  );
@@ -6652,10 +6715,20 @@ const h = class h {
6652
6715
  return n;
6653
6716
  }
6654
6717
  /**
6655
- * 祖先のバインドデータ更新を、配下の `data-form-arg` フォームの入力欄へ反映します。
6718
+ * 祖先のバインドデータ更新を、配下のフォームへ反映します。
6656
6719
  *
6657
- * 対象は「当該キーを所有するのが更新された祖先自身」であるフォームだけです。
6658
- * 間に同名キーを持つ要素があればそちらが権威なので対象外とします。
6720
+ * `data-form-arg` を宣言したフォームへは入力欄まで流し込みます。対象は「当該キーを
6721
+ * 所有するのが更新された祖先自身」であるフォームだけです。間に同名キーを持つ要素が
6722
+ * あればそちらが権威なので対象外とします。
6723
+ *
6724
+ * `data-form-arg` の無い収集単位(`<form>` と `data-form` コンテナ)には、双方向
6725
+ * コミットが作ったコピーの解除だけを行います(仕様「祖先が所有する値の反映
6726
+ * (`data-form-arg` なし)」の「祖先が当該キーを更新したときに解除するため、以降の
6727
+ * 更新が届かなくなることはありません」)。解除しないと、一度でも入力した収集単位は
6728
+ * 以降どの再取得も受け付けません。入力欄へ流し込まないのは、どのキーが対応するかを
6729
+ * 宣言していないためです(同節の「入力欄への流し込みは `data-form-arg` を宣言した
6730
+ * 場合だけです」)。行の入力欄は解除後の再評価で `data-each` の行単位の反映が
6731
+ * 拾います。
6659
6732
  *
6660
6733
  * 更新が始まった後に初期化されたフォームも対象外です。祖先の更新は初期化前の
6661
6734
  * 状態を運んでいるため、流し込むとクリアしたはずの値が復活します。
@@ -6663,17 +6736,84 @@ const h = class h {
6663
6736
  * @param fragment 更新された祖先のフラグメント
6664
6737
  * @param resetSequence 更新が始まった時点の初期化の通番
6665
6738
  * @param origin 値の由来(通番と種別)。渡すと入力欄ごとに適用可否を判定します
6739
+ * @param previous 更新前の祖先の生バインドデータ。渡すと値が変わったキーだけ解除する
6666
6740
  * @returns 反映完了の Promise
6667
6741
  */
6668
- static syncAncestorArgForms(e, t, r = null) {
6669
- const i = [];
6670
- for (const { form: n, key: s } of h.collectArgForms(e)) {
6671
- if (n.wasResetAfter(t))
6742
+ static syncAncestorArgForms(e, t, r = null, i = null) {
6743
+ const n = [];
6744
+ for (const { form: a, key: o } of f.collectArgForms(e)) {
6745
+ if (a.wasResetAfter(t))
6672
6746
  continue;
6673
- const a = h.resolveAncestorArgOwner(n, s);
6674
- !a || a.owner !== e || i.push(h.pushAncestorArgValue(n, s, a.value, r));
6747
+ const c = f.resolveAncestorArgOwner(a, o);
6748
+ !c || c.owner !== e || n.push(f.pushAncestorArgValue(a, o, c.value, r));
6675
6749
  }
6676
- return Promise.all(i).then(() => {
6750
+ const s = e.getRawBindingData();
6751
+ for (const { form: a, keys: o } of f.collectShadowingContainers(e)) {
6752
+ if (a.wasResetAfter(t))
6753
+ continue;
6754
+ const c = o.filter(
6755
+ (u) => f.createArgValueSignature(i?.[u]) !== f.createArgValueSignature(s?.[u])
6756
+ );
6757
+ c.length !== 0 && n.push(f.releaseOwnCopy(a, c, r));
6758
+ }
6759
+ return Promise.all(n).then(() => {
6760
+ });
6761
+ }
6762
+ /**
6763
+ * 配下の収集単位のうち、祖先のキーをコピーでシャドーしているものを列挙します。
6764
+ *
6765
+ * 収集単位は `<form>` と `data-form` コンテナの両方です(`Form.getFormFragment()`
6766
+ * が対象にする範囲と揃えます)。どちらも双方向コミットの書き込み先になるため、
6767
+ * どちらもコピーを作って祖先をシャドーしえます。仕様「祖先が所有するレコードの
6768
+ * 反映(`data-form-arg`)」が `data-form` を対象外とするのは**入力欄への流し込み**
6769
+ * についてで、シャドーの解除には当てはまりません。
6770
+ *
6771
+ * `data-form-arg` を宣言した `<form>` は除きます。そちらは `collectArgForms()` が
6772
+ * 扱い、`pushAncestorArgValue()` が入力欄への流し込みまで行います。
6773
+ *
6774
+ * 列挙するキーは、収集単位自身の生バインドデータが持ち、かつ**初期 `data-bind`
6775
+ * 宣言に無い**キーに限ります。宣言のあるキーは双方向コミットが作ったコピーでは
6776
+ * なく自身の宣言なので、祖先が同名のキーを更新しても落としてはなりません。
6777
+ *
6778
+ * @param root 走査の起点フラグメント(更新された祖先)
6779
+ * @returns 収集単位のフラグメントと、それが `root` のキーをシャドーしているキー名の
6780
+ * 一覧。シャドーしているキーが無い収集単位は含みません
6781
+ */
6782
+ static collectShadowingContainers(e) {
6783
+ const t = `${l.prefix}form-arg`, r = [];
6784
+ return e.getTarget().querySelectorAll(`form:not([${t}]), [${l.prefix}form]`).forEach((i) => {
6785
+ const n = M.get(i);
6786
+ if (!(n instanceof T))
6787
+ return;
6788
+ const s = n.getRawBindingData();
6789
+ if (s === null)
6790
+ return;
6791
+ const a = f.getInitialBindingData(n), o = Object.keys(s).filter((c) => Object.prototype.hasOwnProperty.call(a ?? {}, c) ? !1 : f.resolveAncestorKeyOwner(n, c)?.owner === e);
6792
+ o.length > 0 && r.push({ form: n, keys: o });
6793
+ }), r;
6794
+ }
6795
+ /**
6796
+ * 双方向コミットが作ったコピーを、フォーム自身のバインドデータから取り除きます。
6797
+ *
6798
+ * 取り除くと、フォーム内の式とフラグメントの継承は祖先の値を見るようになります。
6799
+ * 入力欄へは触りません(`data-each` の行は解除後の再評価で描き直され、行単位の
6800
+ * 反映が値を入れます)。
6801
+ *
6802
+ * @param form フォームのElementFragment
6803
+ * @param keys 取り除くキー名の一覧
6804
+ * @param origin 値の由来(通番と種別)。祖先の更新を起こした操作のものを引き継ぐ
6805
+ * @returns 反映完了の Promise
6806
+ */
6807
+ static releaseOwnCopy(e, t, r = null) {
6808
+ const i = e.getRawBindingData();
6809
+ if (i === null)
6810
+ return Promise.resolve();
6811
+ const n = { ...i };
6812
+ for (const s of t)
6813
+ delete n[s];
6814
+ return k.setBindingData(e.getTarget(), n, {
6815
+ kind: r?.kind ?? "supply",
6816
+ sequence: r?.sequence ?? T.nextSequence()
6677
6817
  });
6678
6818
  }
6679
6819
  /**
@@ -6709,22 +6849,15 @@ const h = class h {
6709
6849
  * @returns 反映完了の Promise
6710
6850
  */
6711
6851
  static pushAncestorArgValue(e, t, r, i = null) {
6712
- const n = e.getTarget(), s = h.createArgValueSignature(r);
6852
+ const n = e.getTarget(), s = f.createArgValueSignature(r);
6713
6853
  if (s !== null) {
6714
- if (h.LAST_ANCESTOR_ARG_VALUES.get(n) === s)
6854
+ if (f.LAST_ANCESTOR_ARG_VALUES.get(n) === s)
6715
6855
  return Promise.resolve();
6716
- h.LAST_ANCESTOR_ARG_VALUES.set(n, s);
6856
+ f.LAST_ANCESTOR_ARG_VALUES.set(n, s);
6717
6857
  } else
6718
- h.LAST_ANCESTOR_ARG_VALUES.delete(n);
6858
+ f.LAST_ANCESTOR_ARG_VALUES.delete(n);
6719
6859
  const a = e.getRawBindingData();
6720
- if (a && Object.prototype.hasOwnProperty.call(a, t)) {
6721
- const o = { ...a };
6722
- return delete o[t], $.setBindingData(n, o, {
6723
- kind: i?.kind ?? "supply",
6724
- sequence: i?.sequence ?? T.nextSequence()
6725
- });
6726
- }
6727
- return h.syncValues(e, r, !1, i);
6860
+ return a && Object.prototype.hasOwnProperty.call(a, t) ? f.releaseOwnCopy(e, [t], i) : f.syncValues(e, r, !1, i);
6728
6861
  }
6729
6862
  /**
6730
6863
  * 流し込み済み判定に使う値の署名を作ります。
@@ -6763,23 +6896,23 @@ const h = class h {
6763
6896
  });
6764
6897
  const r = [];
6765
6898
  for (const i of t) {
6766
- if (h.INITIAL_RESTORED_FORMS.has(i))
6899
+ if (f.INITIAL_RESTORED_FORMS.has(i))
6767
6900
  continue;
6768
6901
  const n = M.get(i);
6769
6902
  if (!(n instanceof T))
6770
6903
  continue;
6771
- const s = n.getRawBindingData(), a = n.getAttribute(`${l.prefix}form-arg`), o = a ? String(a) : null, c = o !== null && !(s && Object.prototype.hasOwnProperty.call(s, o)) ? h.resolveAncestorArgOwner(n, o) : null;
6904
+ const s = n.getRawBindingData(), a = n.getAttribute(`${l.prefix}form-arg`), o = a ? String(a) : null, c = o !== null && !(s && Object.prototype.hasOwnProperty.call(s, o)) ? f.resolveAncestorArgOwner(n, o) : null;
6772
6905
  if (!(!s && !c)) {
6773
- if (h.INITIAL_RESTORED_FORMS.add(i), c) {
6906
+ if (f.INITIAL_RESTORED_FORMS.add(i), c) {
6774
6907
  r.push(
6775
- h.pushAncestorArgValue(n, o, c.value)
6908
+ f.pushAncestorArgValue(n, o, c.value)
6776
6909
  );
6777
6910
  continue;
6778
6911
  }
6779
6912
  r.push(
6780
- h.syncValues(
6913
+ f.syncValues(
6781
6914
  n,
6782
- h.resolveSyncValues(n, s)
6915
+ f.resolveSyncValues(n, s)
6783
6916
  )
6784
6917
  );
6785
6918
  }
@@ -6814,9 +6947,9 @@ const h = class h {
6814
6947
  */
6815
6948
  static collectGroupSelection(e, t, r) {
6816
6949
  const i = [];
6817
- h.collectGroupMembers(
6818
- h.resolveCollectionScope(e),
6819
- String(h.resolveFieldName(e)),
6950
+ f.collectGroupMembers(
6951
+ f.resolveCollectionScope(e),
6952
+ String(f.resolveFieldName(e)),
6820
6953
  i
6821
6954
  );
6822
6955
  let n = !1;
@@ -6826,9 +6959,9 @@ const h = class h {
6826
6959
  const o = a.getTarget();
6827
6960
  o instanceof HTMLInputElement && o.checked && s.push(o.value);
6828
6961
  }
6829
- return t ? { edited: n, value: h.markCompleteSet(s) } : s.length === 0 ? { edited: n, value: null } : {
6962
+ return t ? { edited: n, value: f.markCompleteSet(s) } : s.length === 0 ? { edited: n, value: null } : {
6830
6963
  edited: n,
6831
- value: s.length === 1 ? s[0] : h.markCompleteSet(s)
6964
+ value: s.length === 1 ? s[0] : f.markCompleteSet(s)
6832
6965
  };
6833
6966
  }
6834
6967
  /**
@@ -6843,7 +6976,7 @@ const h = class h {
6843
6976
  * @returns 新しい階層を始める場合は true
6844
6977
  */
6845
6978
  static startsCollectionLevel(e) {
6846
- return h.resolveFieldName(e) ? !1 : !!(e.getAttribute(`${l.prefix}form-object`) || e.getAttribute(`${l.prefix}form-list`));
6979
+ return f.resolveFieldName(e) ? !1 : !!(e.getAttribute(`${l.prefix}form-object`) || e.getAttribute(`${l.prefix}form-list`));
6847
6980
  }
6848
6981
  /**
6849
6982
  * 収集値の階層(同じキーの集まる範囲)となるフラグメントを解決します。
@@ -6864,9 +6997,9 @@ const h = class h {
6864
6997
  static resolveCollectionScope(e) {
6865
6998
  let t = e, r = t.getParent();
6866
6999
  for (; r !== null; ) {
6867
- if (h.startsCollectionLevel(r))
7000
+ if (f.startsCollectionLevel(r))
6868
7001
  return r.getAttribute(`${l.prefix}form-object`) ? r : t;
6869
- if (h.isFormScopeRoot(r))
7002
+ if (f.isFormScopeRoot(r))
6870
7003
  return r;
6871
7004
  t = r, r = r.getParent();
6872
7005
  }
@@ -6899,11 +7032,11 @@ const h = class h {
6899
7032
  * @param members 集める先
6900
7033
  */
6901
7034
  static collectGroupMembers(e, t, r) {
6902
- h.isGroupedCheckable(e) && String(h.resolveFieldName(e)) === t && r.push(e);
7035
+ f.isGroupedCheckable(e) && String(f.resolveFieldName(e)) === t && r.push(e);
6903
7036
  for (const i of e.getChildElementFragments())
6904
- h.startsCollectionLevel(i) || i.hasAttribute(`${l.prefix}form-detach`) || // `data-if-false` は hide() が DOM へ直接付与するため実 DOM 属性を見る
7037
+ f.startsCollectionLevel(i) || i.hasAttribute(`${l.prefix}form-detach`) || // `data-if-false` は hide() が DOM へ直接付与するため実 DOM 属性を見る
6905
7038
  // (`getPartValues()` と同じ理由)。
6906
- i.getTarget().hasAttribute(`${l.prefix}if-false`) || h.collectGroupMembers(i, t, r);
7039
+ i.getTarget().hasAttribute(`${l.prefix}if-false`) || f.collectGroupMembers(i, t, r);
6907
7040
  }
6908
7041
  /**
6909
7042
  * 「集合として完結した値」として印を付けます。
@@ -6917,7 +7050,7 @@ const h = class h {
6917
7050
  * @returns 同じ配列
6918
7051
  */
6919
7052
  static markCompleteSet(e) {
6920
- return h.COMPLETE_SET_VALUES.add(e), e;
7053
+ return f.COMPLETE_SET_VALUES.add(e), e;
6921
7054
  }
6922
7055
  /**
6923
7056
  * 「集合として完結した値」の印が付いているかを返します。
@@ -6930,7 +7063,7 @@ const h = class h {
6930
7063
  * @returns 印が付いていれば true
6931
7064
  */
6932
7065
  static isCompleteSetValue(e) {
6933
- return e !== null && typeof e == "object" && h.COMPLETE_SET_VALUES.has(e);
7066
+ return e !== null && typeof e == "object" && f.COMPLETE_SET_VALUES.has(e);
6934
7067
  }
6935
7068
  /**
6936
7069
  * 値による上書きをグループ単位で扱うべき入力要素(boolean 型でない
@@ -6982,37 +7115,37 @@ const h = class h {
6982
7115
  const o = [];
6983
7116
  if (e.hasAttribute(`${l.prefix}form-detach`) && !r)
6984
7117
  return Promise.resolve();
6985
- const c = h.resolveFieldName(e), u = e.getAttribute(`${l.prefix}form-object`), d = e.getAttribute(`${l.prefix}form-list`), p = e.hasAttribute(`${l.prefix}form-list`);
7118
+ const c = f.resolveFieldName(e), u = e.getAttribute(`${l.prefix}form-object`), d = e.getAttribute(`${l.prefix}form-list`), p = e.hasAttribute(`${l.prefix}form-list`);
6986
7119
  if (c) {
6987
- const g = t[String(c)], E = n && h.hasResolvedDeclarativeState(e), A = n && typeof g > "u" && !h.isDeclarativeStateBound(e);
7120
+ const g = t[String(c)], E = n && f.hasResolvedDeclarativeState(e), A = n && typeof g > "u" && !f.isDeclarativeStateBound(e);
6988
7121
  let I = g;
6989
- if (E ? I = void 0 : A && (I = null), h.isFileInput(e))
7122
+ if (E ? I = void 0 : A && (I = null), f.isFileInput(e))
6990
7123
  return (I === null || I === "") && o.push(
6991
- h.applyFragmentValue(e, null, i, a)
7124
+ f.applyFragmentValue(e, null, i, a)
6992
7125
  ), Promise.all(o).then(() => {
6993
7126
  });
6994
7127
  if (p && Array.isArray(I) && // チェックボックスグループと複数選択 select は配列そのものを状態として
6995
7128
  // 解釈する(後続の分岐)。位置で配ると選択状態を決められないため、
6996
7129
  // `data-form-list` を併記していても従来どおりそちらへ渡す。
6997
- !h.isGroupedCheckable(e) && !h.isMultipleSelect(e)) {
6998
- const C = String(c), W = s.get(C) ?? 0;
6999
- s.set(C, W + 1), o.push(
7000
- h.applyFragmentValue(
7130
+ !f.isGroupedCheckable(e) && !f.isMultipleSelect(e)) {
7131
+ const $ = String(c), W = s.get($) ?? 0;
7132
+ s.set($, W + 1), o.push(
7133
+ f.applyFragmentValue(
7001
7134
  e,
7002
7135
  I[W] ?? null,
7003
7136
  i,
7004
7137
  a
7005
7138
  )
7006
7139
  );
7007
- } else typeof I > "u" || (Array.isArray(I) && h.isGroupedCheckable(e) || Array.isArray(I) && h.isMultipleSelect(e) || typeof I == "string" || typeof I == "number" || typeof I == "boolean" || I === null ? o.push(
7008
- h.applyFragmentValue(
7140
+ } else typeof I > "u" || (Array.isArray(I) && f.isGroupedCheckable(e) || Array.isArray(I) && f.isMultipleSelect(e) || typeof I == "string" || typeof I == "number" || typeof I == "boolean" || I === null ? o.push(
7141
+ f.applyFragmentValue(
7009
7142
  e,
7010
7143
  I,
7011
7144
  i,
7012
7145
  a
7013
7146
  )
7014
7147
  ) : o.push(
7015
- h.applyFragmentValue(e, String(I), i, a)
7148
+ f.applyFragmentValue(e, String(I), i, a)
7016
7149
  ));
7017
7150
  } else if (u) {
7018
7151
  const g = t[String(u)];
@@ -7020,7 +7153,7 @@ const h = class h {
7020
7153
  const E = /* @__PURE__ */ new Map();
7021
7154
  for (const A of e.getChildElementFragments())
7022
7155
  o.push(
7023
- h.setPartValues(
7156
+ f.setPartValues(
7024
7157
  A,
7025
7158
  g,
7026
7159
  r,
@@ -7034,18 +7167,18 @@ const h = class h {
7034
7167
  } else if (d) {
7035
7168
  const g = t[String(d)];
7036
7169
  if (Array.isArray(g)) {
7037
- const E = e.getChildElementFragments(), A = e.getAttribute(`${l.prefix}each-key`), I = h.isCollectedListFromEachSource(e) ? h.pairRowsWithItems(
7170
+ const E = e.getChildElementFragments(), A = e.getAttribute(`${l.prefix}each-key`), I = f.isCollectedListFromEachSource(e) ? f.pairRowsWithItems(
7038
7171
  E,
7039
7172
  g,
7040
7173
  A == null ? null : String(A)
7041
7174
  ) : null;
7042
- for (let C = 0; C < E.length; C++) {
7043
- const W = E[C], x = I ? I[C] : g.length > C ? g[C] : null;
7175
+ for (let $ = 0; $ < E.length; $++) {
7176
+ const W = E[$], x = I ? I[$] : g.length > $ ? g[$] : null;
7044
7177
  o.push(
7045
7178
  // 行ごとに values が切り替わるので出現位置も行単位で数える。
7046
- h.setPartValues(
7179
+ f.setPartValues(
7047
7180
  W,
7048
- h.asPlainRecord(x) ?? {},
7181
+ f.asPlainRecord(x) ?? {},
7049
7182
  r,
7050
7183
  i,
7051
7184
  n,
@@ -7058,7 +7191,7 @@ const h = class h {
7058
7191
  } else
7059
7192
  for (const g of e.getChildElementFragments())
7060
7193
  o.push(
7061
- h.setPartValues(
7194
+ f.setPartValues(
7062
7195
  g,
7063
7196
  t,
7064
7197
  r,
@@ -7087,51 +7220,65 @@ const h = class h {
7087
7220
  * @returns すべての初期化処理が完了するPromise
7088
7221
  */
7089
7222
  static async reset(e, t = T.nextSequence()) {
7090
- const r = h.collectBindingTargetForms(e);
7223
+ const r = f.collectBindingTargetForms(e);
7091
7224
  if (r.length > 0 && r.every((n) => n.isSupplyStale(t)))
7092
7225
  return;
7093
- h.markResetSubtree(e, t), $.clearUserEditMarks(e, t), h.clearValues(e), await Promise.all([
7094
- h.clearMessages(e),
7095
- h.clearEachClones(e)
7226
+ f.markResetSubtree(e, t), k.clearUserEditMarks(e, t), f.clearValues(e), await Promise.all([
7227
+ f.clearMessages(e),
7228
+ f.clearEachClones(e)
7096
7229
  ]), await G.enqueue(() => {
7097
- const n = h.collectEditsAfter(
7230
+ const n = f.collectEditsAfter(
7098
7231
  e,
7099
7232
  t
7100
7233
  ), s = e.getTarget();
7101
- s instanceof HTMLFormElement ? s.reset() : (s.querySelectorAll("form").forEach((a) => a.reset()), h.restoreDefaultValues(s)), h.clearDeclarativeStateFromDom(e), h.restoreEdits(n);
7234
+ s instanceof HTMLFormElement ? s.reset() : (s.querySelectorAll("form").forEach((a) => a.reset()), f.restoreDefaultValues(s)), f.clearDeclarativeStateFromDom(e), f.restoreEdits(n);
7102
7235
  });
7103
7236
  const i = r;
7104
7237
  for (const n of i) {
7105
- const s = h.getInitialBindingData(n);
7106
- s === null && n.getRawBindingData() === null || await $.setBindingData(n.getTarget(), s ?? {}, {
7238
+ const s = f.getInitialBindingData(n);
7239
+ s === null && n.getRawBindingData() === null || await k.setBindingData(n.getTarget(), s ?? {}, {
7107
7240
  sequence: t
7108
7241
  });
7109
7242
  }
7110
- h.syncValuesFromDom(e), await $.evaluateAll(e);
7243
+ f.syncValuesFromDom(e), await k.evaluateAll(e);
7111
7244
  for (const n of i)
7112
- h.getInitialBindingData(n) !== null || n.getRawBindingData() !== null || await h.restoreAncestorArgValues(n, {
7245
+ f.getInitialBindingData(n) !== null || n.getRawBindingData() !== null || await f.restoreAncestorArgValues(n, {
7113
7246
  sequence: t,
7114
7247
  kind: "supply"
7115
7248
  });
7116
7249
  for (const n of i) {
7117
- const s = h.getInitialBindingData(n);
7250
+ const s = f.getInitialBindingData(n);
7118
7251
  if (n.getRawBindingData() === null && s === null)
7119
7252
  continue;
7120
- const a = h.getValues(n), o = n.getAttribute(`${l.prefix}form-arg`);
7253
+ const a = f.getValues(n), o = n.getAttribute(`${l.prefix}form-arg`);
7121
7254
  let c = { ...s || {} };
7122
7255
  if (o) {
7123
7256
  const u = String(o);
7124
- !Object.prototype.hasOwnProperty.call(s ?? {}, u) && h.resolveAncestorArgOwner(n, u) !== null || (c[u] = h.mergeCollectedValues(
7257
+ !Object.prototype.hasOwnProperty.call(s ?? {}, u) && f.resolveAncestorArgOwner(n, u) !== null || (c[u] = f.mergeCollectedValues(
7125
7258
  c[u] ?? null,
7126
7259
  a
7127
7260
  ));
7128
7261
  } else
7129
- c = h.mergeCollectedValues(c, a);
7130
- await $.setBindingData(n.getTarget(), c, {
7262
+ c = f.mergeCollectedValues(c, a), f.deleteAncestorOwnedKeys(n, s, c);
7263
+ await k.setBindingData(n.getTarget(), c, {
7131
7264
  sequence: t
7132
7265
  });
7133
7266
  }
7134
7267
  }
7268
+ /**
7269
+ * 祖先が所有するキーを、リセットの書き込み対象から落とします。
7270
+ *
7271
+ * 落とすのは初期 `data-bind` 宣言に無いキーだけです。宣言のあるキーはフォーム
7272
+ * 自身が持つべき値で、祖先が同名のキーを持っていてもフォームの宣言が権威です。
7273
+ *
7274
+ * @param form フォームのElementFragment
7275
+ * @param initial 初期 `data-bind` 宣言(無い場合は null)
7276
+ * @param target リセットで書き込むバインドデータ(この場で書き換えます)
7277
+ */
7278
+ static deleteAncestorOwnedKeys(e, t, r) {
7279
+ for (const i of Object.keys(r))
7280
+ Object.prototype.hasOwnProperty.call(t ?? {}, i) || f.resolveAncestorKeyOwner(e, i) !== null && delete r[i];
7281
+ }
7135
7282
  /**
7136
7283
  * data-bind 属性で宣言された初期バインドデータを取得します。
7137
7284
  *
@@ -7140,7 +7287,7 @@ const h = class h {
7140
7287
  */
7141
7288
  static getInitialBindingData(e) {
7142
7289
  const t = e.getInitialBindAttribute();
7143
- return t === null ? null : $.parseDataBind(t);
7290
+ return t === null ? null : k.parseDataBind(t);
7144
7291
  }
7145
7292
  /**
7146
7293
  * フラグメント配下の入力要素について、内部値を現在の DOM 値と再同期します。
@@ -7151,7 +7298,7 @@ const h = class h {
7151
7298
  const t = e.getTarget();
7152
7299
  (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) && e.syncValue();
7153
7300
  for (const r of e.getChildElementFragments())
7154
- h.syncValuesFromDom(r);
7301
+ f.syncValuesFromDom(r);
7155
7302
  }
7156
7303
  /**
7157
7304
  * リセット後にバインドデータを更新すべきフォームフラグメントを収集します。
@@ -7206,7 +7353,7 @@ const h = class h {
7206
7353
  static clearValues(e) {
7207
7354
  e.clearValue();
7208
7355
  for (const t of e.getChildElementFragments())
7209
- h.clearValues(t);
7356
+ f.clearValues(t);
7210
7357
  }
7211
7358
  /**
7212
7359
  * 指定した通番より後に編集された入力欄の DOM の状態を控えます。
@@ -7230,7 +7377,7 @@ const h = class h {
7230
7377
  )
7231
7378
  }) : r.push({ element: i, value: i.value }));
7232
7379
  for (const n of e.getChildElementFragments())
7233
- h.collectEditsAfter(n, t, r);
7380
+ f.collectEditsAfter(n, t, r);
7234
7381
  return r;
7235
7382
  }
7236
7383
  /**
@@ -7272,8 +7419,8 @@ const h = class h {
7272
7419
  const r = e.getAttribute(`${l.prefix}form-arg`);
7273
7420
  if (!r)
7274
7421
  return;
7275
- const i = String(r), n = h.resolveAncestorArgOwner(e, i);
7276
- n && (h.LAST_ANCESTOR_ARG_VALUES.delete(e.getTarget()), await h.pushAncestorArgValue(e, i, n.value, t));
7422
+ const i = String(r), n = f.resolveAncestorArgOwner(e, i);
7423
+ n && (f.LAST_ANCESTOR_ARG_VALUES.delete(e.getTarget()), await f.pushAncestorArgValue(e, i, n.value, t));
7277
7424
  }
7278
7425
  /**
7279
7426
  * 初期化の通番を部分木のすべてのフラグメントへ記録します。
@@ -7289,7 +7436,7 @@ const h = class h {
7289
7436
  static markResetSubtree(e, t) {
7290
7437
  e.markResetAt(t), e.markSupplyApplied(t);
7291
7438
  for (const r of e.getChildElementFragments())
7292
- h.markResetSubtree(r, t);
7439
+ f.markResetSubtree(r, t);
7293
7440
  }
7294
7441
  /**
7295
7442
  * フラグメントとその子要素のメッセージをクリアします。
@@ -7312,7 +7459,7 @@ const h = class h {
7312
7459
  * @return Promise(メッセージの追加が完了したら解決される)
7313
7460
  */
7314
7461
  static addErrorMessage(e, t, r) {
7315
- return h.addMessage(e, t, r, "error");
7462
+ return f.addMessage(e, t, r, "error");
7316
7463
  }
7317
7464
  /**
7318
7465
  * キーに一致するフラグメントにレベル付きメッセージを追加します。
@@ -7325,7 +7472,7 @@ const h = class h {
7325
7472
  * @return Promise(メッセージの追加が完了したら解決される)
7326
7473
  */
7327
7474
  static addMessage(e, t, r, i) {
7328
- const n = [], s = Ye(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), c = h.findFragmentsByKey(e, t);
7475
+ const n = [], s = Ye(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), c = f.findFragmentsByKey(e, t);
7329
7476
  return c.forEach((u) => {
7330
7477
  n.push(o(u.getTarget()));
7331
7478
  }), c.length === 0 && n.push(o(e.getTarget())), Promise.all(n).then(() => {
@@ -7339,7 +7486,7 @@ const h = class h {
7339
7486
  * @returns 一致するフラグメントの配列
7340
7487
  */
7341
7488
  static findFragmentsByKey(e, t) {
7342
- return h.findFragmentByKeyParts(e, t.split("."));
7489
+ return f.findFragmentByKeyParts(e, t.split("."));
7343
7490
  }
7344
7491
  /**
7345
7492
  * 指定されたキーに一致するフラグメントを検索します。
@@ -7351,9 +7498,9 @@ const h = class h {
7351
7498
  */
7352
7499
  static findFragmentByKeyParts(e, t) {
7353
7500
  const r = [], i = t[0];
7354
- if (t.length == 1 && h.resolveFieldName(e) === i && r.push(e), e.hasAttribute(`${l.prefix}form-object`))
7501
+ if (t.length == 1 && f.resolveFieldName(e) === i && r.push(e), e.hasAttribute(`${l.prefix}form-object`))
7355
7502
  t.length > 1 && e.getAttribute(`${l.prefix}form-object`) === i && e.getChildElementFragments().forEach((s) => {
7356
- r.push(...h.findFragmentByKeyParts(s, t.slice(1)));
7503
+ r.push(...f.findFragmentByKeyParts(s, t.slice(1)));
7357
7504
  });
7358
7505
  else if (e.hasAttribute(`${l.prefix}form-list`)) {
7359
7506
  if (t.length > 1) {
@@ -7367,7 +7514,7 @@ const h = class h {
7367
7514
  else {
7368
7515
  const d = e.getChildElementFragments().filter((p) => p.hasAttribute(`${l.prefix}row`));
7369
7516
  u < d.length && r.push(
7370
- ...h.findFragmentByKeyParts(d[u], t.slice(1))
7517
+ ...f.findFragmentByKeyParts(d[u], t.slice(1))
7371
7518
  );
7372
7519
  }
7373
7520
  }
@@ -7375,7 +7522,7 @@ const h = class h {
7375
7522
  }
7376
7523
  } else
7377
7524
  e.getChildElementFragments().forEach((n) => {
7378
- r.push(...h.findFragmentByKeyParts(n, t));
7525
+ r.push(...f.findFragmentByKeyParts(n, t));
7379
7526
  });
7380
7527
  return r;
7381
7528
  }
@@ -7398,13 +7545,13 @@ const h = class h {
7398
7545
  return r ? this.getFormFragment(r) : null;
7399
7546
  }
7400
7547
  };
7401
- h.INITIAL_RESTORED_FORMS = /* @__PURE__ */ new WeakSet(), h.LAST_ANCESTOR_ARG_VALUES = /* @__PURE__ */ new WeakMap(), h.GROUP_SCOPE_IDS = /* @__PURE__ */ new WeakMap(), h.groupScopeSequence = 0, h.UNSAFE_MERGE_KEYS = /* @__PURE__ */ new Set([
7548
+ f.INITIAL_RESTORED_FORMS = /* @__PURE__ */ new WeakSet(), f.LAST_ANCESTOR_ARG_VALUES = /* @__PURE__ */ new WeakMap(), f.GROUP_SCOPE_IDS = /* @__PURE__ */ new WeakMap(), f.groupScopeSequence = 0, f.warnedArgOwnerNotRecord = /* @__PURE__ */ new WeakMap(), f.UNSAFE_MERGE_KEYS = /* @__PURE__ */ new Set([
7402
7549
  "__proto__",
7403
7550
  "constructor",
7404
7551
  "prototype"
7405
- ]), h.COLLECTED_ROW_IDENTITY = /* @__PURE__ */ new WeakMap(), h.COMPLETE_SET_VALUES = /* @__PURE__ */ new WeakSet(), h.COLLECTED_EXCLUDED_KEYS = /* @__PURE__ */ new WeakMap(), h.warnedPositionalRowFallbacks = /* @__PURE__ */ new Set(), h.warnedDerivedRowsWithoutKey = /* @__PURE__ */ new Set(), h.LEADING_PATH_PATTERN = /^\s*([A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)\s*([\s\S]*)$/;
7406
- let N = h;
7407
- class B {
7552
+ ]), f.COLLECTED_ROW_IDENTITY = /* @__PURE__ */ new WeakMap(), f.COMPLETE_SET_VALUES = /* @__PURE__ */ new WeakSet(), f.COLLECTED_EXCLUDED_KEYS = /* @__PURE__ */ new WeakMap(), f.warnedPositionalRowFallbacks = /* @__PURE__ */ new Set(), f.warnedDerivedRowsWithoutKey = /* @__PURE__ */ new Set(), f.LEADING_PATH_PATTERN = /^\s*([A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)\s*([\s\S]*)$/;
7553
+ let F = f;
7554
+ class O {
7408
7555
  /**
7409
7556
  * カスタムイベントを発火します。
7410
7557
  *
@@ -7428,7 +7575,7 @@ class B {
7428
7575
  * @param version ライブラリバージョン
7429
7576
  */
7430
7577
  static ready(e) {
7431
- B.dispatch(document, "ready", { version: e });
7578
+ O.dispatch(document, "ready", { version: e });
7432
7579
  }
7433
7580
  /**
7434
7581
  * importstartイベントを発火します。
@@ -7437,7 +7584,7 @@ class B {
7437
7584
  * @param url インポート対象URL
7438
7585
  */
7439
7586
  static importStart(e, t) {
7440
- B.dispatch(e, "importstart", {
7587
+ O.dispatch(e, "importstart", {
7441
7588
  url: t,
7442
7589
  startedAt: performance.now()
7443
7590
  });
@@ -7451,7 +7598,7 @@ class B {
7451
7598
  * @param startedAt 開始時刻
7452
7599
  */
7453
7600
  static importEnd(e, t, r, i) {
7454
- B.dispatch(e, "importend", {
7601
+ O.dispatch(e, "importend", {
7455
7602
  url: t,
7456
7603
  bytes: r,
7457
7604
  durationMs: performance.now() - i
@@ -7465,7 +7612,7 @@ class B {
7465
7612
  * @param error エラー内容
7466
7613
  */
7467
7614
  static importError(e, t, r) {
7468
- B.dispatch(e, "importerror", { url: t, error: r });
7615
+ O.dispatch(e, "importerror", { url: t, error: r });
7469
7616
  }
7470
7617
  /**
7471
7618
  * bindchangeイベントを発火します。
@@ -7481,7 +7628,7 @@ class B {
7481
7628
  const u = t?.[c], d = r[c];
7482
7629
  u !== d && n.push(c);
7483
7630
  }
7484
- B.dispatch(e, "bindchange", {
7631
+ O.dispatch(e, "bindchange", {
7485
7632
  previous: t || {},
7486
7633
  next: r,
7487
7634
  changedKeys: n,
@@ -7500,7 +7647,7 @@ class B {
7500
7647
  * @param reason 変更理由
7501
7648
  */
7502
7649
  static bindComplete(e, t = null, r = "other") {
7503
- B.dispatch(e, "bindcomplete", { bindArg: t, reason: r });
7650
+ O.dispatch(e, "bindcomplete", { bindArg: t, reason: r });
7504
7651
  }
7505
7652
  /**
7506
7653
  * eachupdateイベントを発火します。
@@ -7511,7 +7658,7 @@ class B {
7511
7658
  * @param order 現在の順序
7512
7659
  */
7513
7660
  static eachUpdate(e, t, r, i) {
7514
- B.dispatch(e, "eachupdate", {
7661
+ O.dispatch(e, "eachupdate", {
7515
7662
  added: t,
7516
7663
  removed: r,
7517
7664
  order: i,
@@ -7527,7 +7674,7 @@ class B {
7527
7674
  * @param item 行データ
7528
7675
  */
7529
7676
  static rowAdd(e, t, r, i) {
7530
- B.dispatch(e, "rowadd", { key: t, index: r, item: i });
7677
+ O.dispatch(e, "rowadd", { key: t, index: r, item: i });
7531
7678
  }
7532
7679
  /**
7533
7680
  * rowremoveイベントを発火します。
@@ -7537,7 +7684,7 @@ class B {
7537
7684
  * @param index インデックス
7538
7685
  */
7539
7686
  static rowRemove(e, t, r) {
7540
- B.dispatch(e, "rowremove", { key: t, index: r });
7687
+ O.dispatch(e, "rowremove", { key: t, index: r });
7541
7688
  }
7542
7689
  /**
7543
7690
  * rowmoveイベントを発火します。
@@ -7548,7 +7695,7 @@ class B {
7548
7695
  * @param to 移動後インデックス
7549
7696
  */
7550
7697
  static rowMove(e, t, r, i) {
7551
- B.dispatch(e, "rowmove", { key: t, from: r, to: i });
7698
+ O.dispatch(e, "rowmove", { key: t, from: r, to: i });
7552
7699
  }
7553
7700
  /**
7554
7701
  * showイベントを発火します。
@@ -7556,7 +7703,7 @@ class B {
7556
7703
  * @param target data-if要素
7557
7704
  */
7558
7705
  static show(e) {
7559
- B.dispatch(e, "show", { visible: !0 });
7706
+ O.dispatch(e, "show", { visible: !0 });
7560
7707
  }
7561
7708
  /**
7562
7709
  * hideイベントを発火します。
@@ -7564,7 +7711,7 @@ class B {
7564
7711
  * @param target data-if要素
7565
7712
  */
7566
7713
  static hide(e) {
7567
- B.dispatch(e, "hide", { visible: !1 });
7714
+ O.dispatch(e, "hide", { visible: !1 });
7568
7715
  }
7569
7716
  /**
7570
7717
  * fetchstartイベントを発火します。
@@ -7577,7 +7724,7 @@ class B {
7577
7724
  * @return 戻り値はありません。
7578
7725
  */
7579
7726
  static fetchStart(e, t, r, i, n) {
7580
- B.dispatch(e, "fetchstart", {
7727
+ O.dispatch(e, "fetchstart", {
7581
7728
  url: t,
7582
7729
  options: r || {},
7583
7730
  payload: i,
@@ -7594,7 +7741,7 @@ class B {
7594
7741
  * @param startedAt 開始時刻
7595
7742
  */
7596
7743
  static fetchEnd(e, t, r, i) {
7597
- B.dispatch(e, "fetchend", {
7744
+ O.dispatch(e, "fetchend", {
7598
7745
  url: t,
7599
7746
  status: r,
7600
7747
  durationMs: performance.now() - i
@@ -7610,7 +7757,7 @@ class B {
7610
7757
  * @param startedAt 開始時刻(存在する場合)
7611
7758
  */
7612
7759
  static fetchError(e, t, r, i, n) {
7613
- B.dispatch(e, "fetcherror", {
7760
+ O.dispatch(e, "fetcherror", {
7614
7761
  url: t,
7615
7762
  status: i,
7616
7763
  error: r,
@@ -7626,7 +7773,7 @@ class B {
7626
7773
  * @return 戻り値はありません。
7627
7774
  */
7628
7775
  static pollTimeout(e, t, r) {
7629
- B.dispatch(e, "polltimeout", { count: t, elapsedMs: r });
7776
+ O.dispatch(e, "polltimeout", { count: t, elapsedMs: r });
7630
7777
  }
7631
7778
  /**
7632
7779
  * pollstopイベントを発火します。
@@ -7640,7 +7787,7 @@ class B {
7640
7787
  * @return 戻り値はありません。
7641
7788
  */
7642
7789
  static pollStop(e, t, r, i) {
7643
- B.dispatch(e, "pollstop", { reason: t, count: r, elapsedMs: i });
7790
+ O.dispatch(e, "pollstop", { reason: t, count: r, elapsedMs: i });
7644
7791
  }
7645
7792
  }
7646
7793
  const Dt = {
@@ -7666,7 +7813,7 @@ function xt(y, e) {
7666
7813
  const r = M.get(y), i = r instanceof T ? r.getBindingData() : {}, n = It(t, i);
7667
7814
  return n === "" ? null : n;
7668
7815
  }
7669
- function Ft(y, e, t) {
7816
+ function Nt(y, e, t) {
7670
7817
  const r = y.getAttribute(`${e}-return-param`);
7671
7818
  if (r === null || r === "")
7672
7819
  return t;
@@ -7689,7 +7836,7 @@ function ft(y) {
7689
7836
  const n = xt(i, t);
7690
7837
  if (n === null)
7691
7838
  continue;
7692
- const s = Ft(i, t, n);
7839
+ const s = Nt(i, t, n);
7693
7840
  try {
7694
7841
  if (new URL(s, window.location.href).href === window.location.href)
7695
7842
  return !1;
@@ -7756,7 +7903,7 @@ class X {
7756
7903
  }
7757
7904
  }
7758
7905
  }
7759
- const F = class F {
7906
+ const N = class N {
7760
7907
  /**
7761
7908
  * ストレージ種別に対応する `Storage` を解決します。
7762
7909
  *
@@ -7774,7 +7921,7 @@ const F = class F {
7774
7921
  throw new Error("storage is not available");
7775
7922
  return t;
7776
7923
  } catch (t) {
7777
- return F.WARNED_KINDS.has(e) || (F.WARNED_KINDS.add(e), m.warn(
7924
+ return N.WARNED_KINDS.has(e) || (N.WARNED_KINDS.add(e), m.warn(
7778
7925
  "Haori",
7779
7926
  `${e}Storage が利用できないため ${l.prefix}store を無効にします:`,
7780
7927
  t
@@ -7811,8 +7958,8 @@ const F = class F {
7811
7958
  * @param message 警告メッセージ
7812
7959
  */
7813
7960
  static warnOnce(e, t, r) {
7814
- let i = F.WARNED_ELEMENTS.get(e);
7815
- i || (i = /* @__PURE__ */ new Set(), F.WARNED_ELEMENTS.set(e, i)), !i.has(t) && (i.add(t), m.warn("Haori", r));
7961
+ let i = N.WARNED_ELEMENTS.get(e);
7962
+ i || (i = /* @__PURE__ */ new Set(), N.WARNED_ELEMENTS.set(e, i)), !i.has(t) && (i.add(t), m.warn("Haori", r));
7816
7963
  }
7817
7964
  /**
7818
7965
  * `data-each` の行の内側かどうかを判定します。
@@ -7849,13 +7996,13 @@ const F = class F {
7849
7996
  return null;
7850
7997
  const i = r.trim();
7851
7998
  if (i === "")
7852
- return F.warnOnce(
7999
+ return N.warnOnce(
7853
8000
  t,
7854
8001
  "key",
7855
8002
  `${l.prefix}store にストレージキーが指定されていません。`
7856
8003
  ), null;
7857
8004
  if (i.includes("{{"))
7858
- return F.warnOnce(
8005
+ return N.warnOnce(
7859
8006
  t,
7860
8007
  "expression",
7861
8008
  `${l.prefix}store に式は使用できません(静的な文字列を指定してください): ${i}`
@@ -7864,7 +8011,7 @@ const F = class F {
7864
8011
  let s = "session";
7865
8012
  if (n !== null) {
7866
8013
  const d = n.trim();
7867
- d === "local" || d === "session" ? s = d : F.warnOnce(
8014
+ d === "local" || d === "session" ? s = d : N.warnOnce(
7868
8015
  t,
7869
8016
  "type",
7870
8017
  `${l.prefix}store-type は session または local を指定してください(session として扱います): ${d}`
@@ -7873,14 +8020,14 @@ const F = class F {
7873
8020
  const a = e.getRawAttribute(`${l.prefix}store-arg`), o = a === null || a.trim() === "" ? null : a.trim(), c = e.getRawAttribute(`${l.prefix}store-params`);
7874
8021
  let u = null;
7875
8022
  if (c !== null) {
7876
- const d = c.split("&").map((g) => g.trim()).filter((g) => g !== ""), p = d.filter((g) => !F.isReservedKey(g));
7877
- p.length !== d.length && F.warnOnce(
8023
+ const d = c.split("&").map((g) => g.trim()).filter((g) => g !== ""), p = d.filter((g) => !N.isReservedKey(g));
8024
+ p.length !== d.length && N.warnOnce(
7878
8025
  t,
7879
8026
  "reserved",
7880
8027
  `${l.prefix}store-params の予約キー(先頭が _ のキー)は対象外です。`
7881
8028
  ), u = p.length > 0 ? p : null;
7882
8029
  }
7883
- return u === null && o === null ? (F.warnOnce(
8030
+ return u === null && o === null ? (N.warnOnce(
7884
8031
  t,
7885
8032
  "target",
7886
8033
  `${l.prefix}store には ${l.prefix}store-params または ${l.prefix}store-arg のいずれかが必要です。`
@@ -7897,7 +8044,7 @@ const F = class F {
7897
8044
  * @returns レコード。読み取れない場合は null
7898
8045
  */
7899
8046
  static readRecord(e) {
7900
- const t = F.resolveStorage(e.kind);
8047
+ const t = N.resolveStorage(e.kind);
7901
8048
  if (!t)
7902
8049
  return null;
7903
8050
  let r;
@@ -7922,7 +8069,7 @@ const F = class F {
7922
8069
  n
7923
8070
  ), null;
7924
8071
  }
7925
- return F.isPlainRecord(i) ? i : (m.warn(
8072
+ return N.isPlainRecord(i) ? i : (m.warn(
7926
8073
  "Haori",
7927
8074
  `保存済みデータがオブジェクトではありません: ${e.key}`
7928
8075
  ), null);
@@ -7940,7 +8087,7 @@ const F = class F {
7940
8087
  const s = t[e.arg];
7941
8088
  if (s === void 0)
7942
8089
  return {};
7943
- if (!F.isPlainRecord(s))
8090
+ if (!N.isPlainRecord(s))
7944
8091
  return m.warn(
7945
8092
  "Haori",
7946
8093
  `保存済みデータの ${e.arg} がオブジェクトではありません: ` + e.key
@@ -7949,7 +8096,7 @@ const F = class F {
7949
8096
  }
7950
8097
  const i = e.params ?? Object.keys(r), n = {};
7951
8098
  for (const s of i)
7952
- F.isReservedKey(s) || Object.prototype.hasOwnProperty.call(r, s) && (n[s] = r[s]);
8099
+ N.isReservedKey(s) || Object.prototype.hasOwnProperty.call(r, s) && (n[s] = r[s]);
7953
8100
  return n;
7954
8101
  }
7955
8102
  /**
@@ -7966,7 +8113,7 @@ const F = class F {
7966
8113
  static selectFromData(e, t) {
7967
8114
  const r = e.params ?? Object.keys(t), i = {};
7968
8115
  for (const n of r) {
7969
- if (F.isReservedKey(n) || !Object.prototype.hasOwnProperty.call(t, n))
8116
+ if (N.isReservedKey(n) || !Object.prototype.hasOwnProperty.call(t, n))
7970
8117
  continue;
7971
8118
  const s = t[n];
7972
8119
  s !== void 0 && (i[n] = s);
@@ -8025,12 +8172,12 @@ const F = class F {
8025
8172
  * @param selected 基準にする選択内容
8026
8173
  */
8027
8174
  static seedSignature(e, t) {
8028
- const r = F.stringify(t);
8175
+ const r = N.stringify(t);
8029
8176
  if (r === null) {
8030
- F.SIGNATURES.delete(e);
8177
+ N.SIGNATURES.delete(e);
8031
8178
  return;
8032
8179
  }
8033
- F.SIGNATURES.set(e, { json: r, refs: F.createRefs(t) });
8180
+ N.SIGNATURES.set(e, { json: r, refs: N.createRefs(t) });
8034
8181
  }
8035
8182
  /**
8036
8183
  * レコードへ選択内容を書き込みます。
@@ -8044,12 +8191,12 @@ const F = class F {
8044
8191
  * @returns 書き込めたら true
8045
8192
  */
8046
8193
  static writeRecord(e, t) {
8047
- const r = F.resolveStorage(e.kind);
8194
+ const r = N.resolveStorage(e.kind);
8048
8195
  if (!r)
8049
8196
  return !1;
8050
- const i = F.readRecord(e) ?? {};
8197
+ const i = N.readRecord(e) ?? {};
8051
8198
  if (e.arg !== null) {
8052
- const n = i[e.arg], s = F.isPlainRecord(n) ? { ...n } : {};
8199
+ const n = i[e.arg], s = N.isPlainRecord(n) ? { ...n } : {};
8053
8200
  i[e.arg] = { ...s, ...t };
8054
8201
  } else
8055
8202
  Object.assign(i, t);
@@ -8074,19 +8221,19 @@ const F = class F {
8074
8221
  * @returns 復元完了の Promise
8075
8222
  */
8076
8223
  static restore(e) {
8077
- const t = F.readDeclaration(e);
8224
+ const t = N.readDeclaration(e);
8078
8225
  if (!t)
8079
8226
  return Promise.resolve();
8080
8227
  const r = e.getTarget();
8081
- if (F.isInsideEachRow(e))
8082
- return F.warnOnce(
8228
+ if (N.isInsideEachRow(e))
8229
+ return N.warnOnce(
8083
8230
  r,
8084
8231
  "each-row",
8085
8232
  `${l.prefix}each の行の内側では ${l.prefix}store を使用できません(行データは親要素側で配列キーを指定してください)。`
8086
8233
  ), Promise.resolve();
8087
- F.RESTORED_ELEMENTS.add(r);
8088
- const i = F.readRecord(t), n = i ? F.extractFromRecord(t, i) : {}, s = { ...e.getRawBindingData() ?? {}, ...n };
8089
- return F.seedSignature(r, F.selectFromData(t, s)), Object.keys(n).length === 0 ? Promise.resolve() : $.setBindingData(r, s, {
8234
+ N.RESTORED_ELEMENTS.add(r);
8235
+ const i = N.readRecord(t), n = i ? N.extractFromRecord(t, i) : {}, s = { ...e.getRawBindingData() ?? {}, ...n };
8236
+ return N.seedSignature(r, N.selectFromData(t, s)), Object.keys(n).length === 0 ? Promise.resolve() : k.setBindingData(r, s, {
8090
8237
  reentrant: !0,
8091
8238
  kind: "nonSupply",
8092
8239
  sequence: T.nextSequence()
@@ -8103,22 +8250,22 @@ const F = class F {
8103
8250
  * @param fragment 対象フラグメント
8104
8251
  */
8105
8252
  static mirror(e) {
8106
- const t = F.readDeclaration(e);
8107
- if (!t || F.isInsideEachRow(e))
8253
+ const t = N.readDeclaration(e);
8254
+ if (!t || N.isInsideEachRow(e))
8108
8255
  return;
8109
8256
  const r = e.getTarget();
8110
- if (!F.RESTORED_ELEMENTS.has(r))
8257
+ if (!N.RESTORED_ELEMENTS.has(r))
8111
8258
  return;
8112
8259
  const i = e.getRawBindingData();
8113
8260
  if (!i)
8114
8261
  return;
8115
- const n = F.selectFromData(t, i);
8262
+ const n = N.selectFromData(t, i);
8116
8263
  if (Object.keys(n).length === 0)
8117
8264
  return;
8118
- const s = F.SIGNATURES.get(r);
8119
- if (s && F.hasSameRefs(s, n))
8265
+ const s = N.SIGNATURES.get(r);
8266
+ if (s && N.hasSameRefs(s, n))
8120
8267
  return;
8121
- const a = F.stringify(n);
8268
+ const a = N.stringify(n);
8122
8269
  if (a === null) {
8123
8270
  m.warn(
8124
8271
  "Haori",
@@ -8127,10 +8274,10 @@ const F = class F {
8127
8274
  return;
8128
8275
  }
8129
8276
  if (s && s.json === a) {
8130
- s.refs = F.createRefs(n);
8277
+ s.refs = N.createRefs(n);
8131
8278
  return;
8132
8279
  }
8133
- F.writeRecord(t, n) && F.SIGNATURES.set(r, { json: a, refs: F.createRefs(n) });
8280
+ N.writeRecord(t, n) && N.SIGNATURES.set(r, { json: a, refs: N.createRefs(n) });
8134
8281
  }
8135
8282
  /**
8136
8283
  * レコードを破棄します。
@@ -8143,7 +8290,7 @@ const F = class F {
8143
8290
  * @param kind ストレージ種別
8144
8291
  */
8145
8292
  static clear(e, t) {
8146
- const r = F.resolveStorage(t);
8293
+ const r = N.resolveStorage(t);
8147
8294
  if (r) {
8148
8295
  try {
8149
8296
  r.removeItem(e);
@@ -8151,7 +8298,7 @@ const F = class F {
8151
8298
  m.warn("Haori", `ストレージの破棄に失敗しました: ${e}`, i);
8152
8299
  return;
8153
8300
  }
8154
- F.reseedDeclaringElements(e, t);
8301
+ N.reseedDeclaringElements(e, t);
8155
8302
  }
8156
8303
  }
8157
8304
  /**
@@ -8164,24 +8311,24 @@ const F = class F {
8164
8311
  document.querySelectorAll(
8165
8312
  `[${l.prefix}store]`
8166
8313
  ).forEach((i) => {
8167
- if (!F.RESTORED_ELEMENTS.has(i))
8314
+ if (!N.RESTORED_ELEMENTS.has(i))
8168
8315
  return;
8169
8316
  const n = M.get(i);
8170
8317
  if (!(n instanceof T))
8171
8318
  return;
8172
- const s = F.readDeclaration(n);
8319
+ const s = N.readDeclaration(n);
8173
8320
  if (!s || s.key !== e || s.kind !== t)
8174
8321
  return;
8175
8322
  const a = n.getRawBindingData();
8176
- F.seedSignature(
8323
+ N.seedSignature(
8177
8324
  i,
8178
- a ? F.selectFromData(s, a) : {}
8325
+ a ? N.selectFromData(s, a) : {}
8179
8326
  );
8180
8327
  });
8181
8328
  }
8182
8329
  };
8183
- F.SIGNATURES = /* @__PURE__ */ new WeakMap(), F.RESTORED_ELEMENTS = /* @__PURE__ */ new WeakSet(), F.WARNED_ELEMENTS = /* @__PURE__ */ new WeakMap(), F.WARNED_KINDS = /* @__PURE__ */ new Set();
8184
- let Re = F;
8330
+ N.SIGNATURES = /* @__PURE__ */ new WeakMap(), N.RESTORED_ELEMENTS = /* @__PURE__ */ new WeakSet(), N.WARNED_ELEMENTS = /* @__PURE__ */ new WeakMap(), N.WARNED_KINDS = /* @__PURE__ */ new Set();
8331
+ let Re = N;
8185
8332
  class ht {
8186
8333
  /**
8187
8334
  * URLのクエリパラメータを取得します。
@@ -8220,7 +8367,7 @@ class ht {
8220
8367
  }
8221
8368
  }
8222
8369
  }
8223
- const Nt = [
8370
+ const Ft = [
8224
8371
  "addErrorMessage",
8225
8372
  "clearMessages",
8226
8373
  "closeDialog",
@@ -8231,15 +8378,15 @@ const Nt = [
8231
8378
  ], Mt = "__haoriHistoryState__", Pe = "data-haori-click-lock";
8232
8379
  function Ie() {
8233
8380
  const e = globalThis.window?.Haori;
8234
- return Nt.every(
8381
+ return Ft.every(
8235
8382
  (r) => typeof e?.[r] == "function"
8236
8383
  ) ? e : ve;
8237
8384
  }
8238
- const Ct = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
8239
- function Be(y) {
8240
- return Ct.has(y.toUpperCase());
8385
+ const $t = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
8386
+ function Oe(y) {
8387
+ return $t.has(y.toUpperCase());
8241
8388
  }
8242
- function kt(y, e) {
8389
+ function Ct(y, e) {
8243
8390
  for (const [t, r] of Object.entries(e))
8244
8391
  r !== void 0 && (Array.isArray(r) ? r.forEach((i) => {
8245
8392
  y.append(t, me(i));
@@ -8258,9 +8405,9 @@ function me(y) {
8258
8405
  }
8259
8406
  function pt(y, e) {
8260
8407
  const t = new URL(y, window.location.href), r = new URLSearchParams(t.search);
8261
- return kt(r, e), t.search = r.toString(), t.toString();
8408
+ return Ct(r, e), t.search = r.toString(), t.toString();
8262
8409
  }
8263
- function $t(y) {
8410
+ function kt(y) {
8264
8411
  if (y == null)
8265
8412
  return { payload: {}, dropped: !1 };
8266
8413
  if (typeof y == "string") {
@@ -8308,7 +8455,7 @@ function gt(y, e, t) {
8308
8455
  r === void 0 ? y[e] = t : Array.isArray(r) ? r.push(t) : y[e] = [r, t];
8309
8456
  }
8310
8457
  function de(y, e) {
8311
- if (N.isCompleteSetValue(e))
8458
+ if (F.isCompleteSetValue(e))
8312
8459
  return e;
8313
8460
  if (Array.isArray(e)) {
8314
8461
  const t = Array.isArray(y) ? y.slice() : [];
@@ -8333,7 +8480,7 @@ function Pt(y) {
8333
8480
  }
8334
8481
  function Lt(y, e) {
8335
8482
  const t = { ...e || {} }, r = (t.method || "GET").toUpperCase();
8336
- if (l.runtime !== "demo" || Be(r))
8483
+ if (l.runtime !== "demo" || Oe(r))
8337
8484
  return {
8338
8485
  url: y,
8339
8486
  options: t,
@@ -8341,7 +8488,7 @@ function Lt(y, e) {
8341
8488
  effectiveMethod: r,
8342
8489
  normalized: !1
8343
8490
  };
8344
- const { payload: i, dropped: n } = $t(
8491
+ const { payload: i, dropped: n } = kt(
8345
8492
  t.body
8346
8493
  );
8347
8494
  let s = y;
@@ -8361,7 +8508,7 @@ function Lt(y, e) {
8361
8508
  queryString: new URL(s, window.location.href).search || void 0
8362
8509
  };
8363
8510
  }
8364
- function Bt(y) {
8511
+ function Ot(y) {
8365
8512
  return y == null ? null : typeof y == "string" ? y : y instanceof URLSearchParams ? y.toString() : y instanceof FormData ? Array.from(y.entries()).map(([e, t]) => t instanceof File ? [
8366
8513
  e,
8367
8514
  {
@@ -8377,15 +8524,15 @@ function Te(y) {
8377
8524
  Te
8378
8525
  ) : !1;
8379
8526
  }
8380
- function Ot(y) {
8527
+ function Bt(y) {
8381
8528
  return Object.values(y).some((e) => e instanceof Blob ? !1 : Array.isArray(e) ? e.some(
8382
8529
  (t) => !(t instanceof Blob) && Te(t)
8383
8530
  ) : Te(e));
8384
8531
  }
8385
8532
  function xe(y) {
8386
- return Oe(N.getValues(y));
8533
+ return Be(F.getValues(y));
8387
8534
  }
8388
- function Oe(y) {
8535
+ function Be(y) {
8389
8536
  const e = (r) => {
8390
8537
  if (r instanceof File)
8391
8538
  return r.name;
@@ -8393,7 +8540,7 @@ function Oe(y) {
8393
8540
  return "";
8394
8541
  if (Array.isArray(r)) {
8395
8542
  const i = r.map(e);
8396
- return N.carryCollectedRowIdentity(r, i), i;
8543
+ return F.carryCollectedRowIdentity(r, i), i;
8397
8544
  }
8398
8545
  if (r !== null && typeof r == "object") {
8399
8546
  const i = {};
@@ -8401,13 +8548,13 @@ function Oe(y) {
8401
8548
  r
8402
8549
  ))
8403
8550
  i[n] = e(s);
8404
- return N.carryCollectedRowIdentity(r, i), i;
8551
+ return F.carryCollectedRowIdentity(r, i), i;
8405
8552
  }
8406
8553
  return r;
8407
8554
  }, t = {};
8408
8555
  for (const [r, i] of Object.entries(y))
8409
8556
  t[r] = e(i);
8410
- return N.carryCollectedRowIdentity(y, t), t;
8557
+ return F.carryCollectedRowIdentity(y, t), t;
8411
8558
  }
8412
8559
  function Ut(y, e) {
8413
8560
  const t = new Headers(
@@ -8419,7 +8566,7 @@ function Ut(y, e) {
8419
8566
  url: y,
8420
8567
  method: String(e.method || "GET").toUpperCase(),
8421
8568
  headers: r,
8422
- body: Bt(e.body || null)
8569
+ body: Ot(e.body || null)
8423
8570
  });
8424
8571
  }
8425
8572
  const b = class b {
@@ -8617,7 +8764,7 @@ const b = class b {
8617
8764
  const a = r.trim();
8618
8765
  if (b.SINGLE_PLACEHOLDER_REGEX.test(a))
8619
8766
  return {
8620
- value: $.parseDataBind(n),
8767
+ value: k.parseDataBind(n),
8621
8768
  hasUnresolvedReference: s
8622
8769
  };
8623
8770
  if (a.startsWith("{") || a.startsWith("[")) {
@@ -8626,7 +8773,7 @@ const b = class b {
8626
8773
  e.getBindingData()
8627
8774
  );
8628
8775
  return {
8629
- value: $.parseDataBind(c.value),
8776
+ value: k.parseDataBind(c.value),
8630
8777
  hasUnresolvedReference: s || c.hasUnresolvedReference
8631
8778
  };
8632
8779
  }
@@ -8635,7 +8782,7 @@ const b = class b {
8635
8782
  e.getBindingData()
8636
8783
  );
8637
8784
  return {
8638
- value: $.parseDataBind(o.value),
8785
+ value: k.parseDataBind(o.value),
8639
8786
  hasUnresolvedReference: s || o.hasUnresolvedReference
8640
8787
  };
8641
8788
  }
@@ -8652,7 +8799,7 @@ const b = class b {
8652
8799
  }, i = t ? b.attrName(t, "if") : b.attrName(null, "if", !0);
8653
8800
  if (e.hasAttribute(i)) {
8654
8801
  const R = e.getRawAttribute(i);
8655
- typeof R == "string" && R.trim() !== "" ? (r.conditionExpression = N.unwrapConditionExpression(R), r.conditionAttributeName = i) : m.warn(
8802
+ typeof R == "string" && R.trim() !== "" ? (r.conditionExpression = F.unwrapConditionExpression(R), r.conditionAttributeName = i) : m.warn(
8656
8803
  "Haori",
8657
8804
  `${i} に条件式が指定されていません。`
8658
8805
  );
@@ -8672,15 +8819,15 @@ const b = class b {
8672
8819
  S,
8673
8820
  b.attrName(t, "form")
8674
8821
  );
8675
- H !== null ? r.formFragment = N.getFormFragment(
8822
+ H !== null ? r.formFragment = F.getFormFragment(
8676
8823
  M.get(H)
8677
8824
  ) : m.error(
8678
8825
  "Haori",
8679
8826
  `Form element not found: ${S} (${b.attrName(t, "form")})`
8680
8827
  );
8681
8828
  } else
8682
- r.formFragment = N.getFormFragment(e);
8683
- } else (t === "change" || t === "input") && (r.formFragment = N.getFormFragment(e), r.formFragment === null && b.isNamedInputFragment(e) && (r.selfValueFragment = e));
8829
+ r.formFragment = F.getFormFragment(e);
8830
+ } else (t === "change" || t === "input") && (r.formFragment = F.getFormFragment(e), r.formFragment === null && b.isNamedInputFragment(e) && (r.selfValueFragment = e));
8684
8831
  if (e.hasAttribute(`${l.prefix}${t}-before-run`)) {
8685
8832
  const S = e.getRawAttribute(
8686
8833
  `${l.prefix}${t}-before-run`
@@ -8714,8 +8861,8 @@ ${S}
8714
8861
  H = new Function("event", `"use strict";
8715
8862
  ${S}
8716
8863
  `);
8717
- } catch (O) {
8718
- m.error("Haori", `Invalid run script: ${O}`);
8864
+ } catch (B) {
8865
+ m.error("Haori", `Invalid run script: ${B}`);
8719
8866
  }
8720
8867
  }
8721
8868
  H && (r.runScript = H);
@@ -8738,7 +8885,7 @@ ${S}
8738
8885
  R
8739
8886
  );
8740
8887
  try {
8741
- a.headers = $.parseDataBind(S);
8888
+ a.headers = k.parseDataBind(S);
8742
8889
  } catch (H) {
8743
8890
  m.error("Haori", `Invalid fetch headers: ${H}`);
8744
8891
  }
@@ -8754,7 +8901,7 @@ ${S}
8754
8901
  R
8755
8902
  );
8756
8903
  try {
8757
- a.headers = $.parseDataBind(S);
8904
+ a.headers = k.parseDataBind(S);
8758
8905
  } catch (H) {
8759
8906
  m.error("Haori", `Invalid fetch headers: ${H}`);
8760
8907
  }
@@ -8795,8 +8942,8 @@ ${S}
8795
8942
  if (R) {
8796
8943
  const S = X.queryAll(R, d);
8797
8944
  S.length > 0 ? (r.bindFragments = [], S.forEach((H) => {
8798
- const O = M.get(H);
8799
- O && r.bindFragments.push(O);
8945
+ const B = M.get(H);
8946
+ B && r.bindFragments.push(B);
8800
8947
  })) : m.error(
8801
8948
  "Haori",
8802
8949
  `Bind element not found: ${R} (${d})`
@@ -8817,8 +8964,8 @@ ${S}
8817
8964
  const R = e.getRawAttribute(I);
8818
8965
  r.bindAppendParams = R.split("&").map((S) => S.trim()).filter(Boolean);
8819
8966
  }
8820
- const C = t ? b.attrName(t, "bind-merge") : b.attrName(null, "bind-merge", !0);
8821
- e.hasAttribute(C) && (r.bindMerge = !0);
8967
+ const $ = t ? b.attrName(t, "bind-merge") : b.attrName(null, "bind-merge", !0);
8968
+ e.hasAttribute($) && (r.bindMerge = !0);
8822
8969
  const W = t ? b.attrName(t, "bind-transform") : b.attrName(null, "bind-transform", !0);
8823
8970
  e.hasAttribute(W) && (r.bindTransform = e.getRawAttribute(W));
8824
8971
  const x = t ? b.attrName(t, "copy-params") : null;
@@ -8828,13 +8975,13 @@ ${S}
8828
8975
  }
8829
8976
  if (t) {
8830
8977
  if (e.hasAttribute(b.attrName(t, "adjust"))) {
8831
- const V = X.read(
8978
+ const q = X.read(
8832
8979
  e,
8833
8980
  b.attrName(t, "adjust")
8834
8981
  );
8835
- if (V) {
8982
+ if (q) {
8836
8983
  const z = X.queryAll(
8837
- V,
8984
+ q,
8838
8985
  b.attrName(t, "adjust")
8839
8986
  );
8840
8987
  z.length > 0 ? (r.adjustFragments = [], z.forEach((Z) => {
@@ -8842,7 +8989,7 @@ ${S}
8842
8989
  J && r.adjustFragments.push(J);
8843
8990
  })) : m.error(
8844
8991
  "Haori",
8845
- `Adjust element not found: ${V} (${b.attrName(t, "adjust")})`
8992
+ `Adjust element not found: ${q} (${b.attrName(t, "adjust")})`
8846
8993
  );
8847
8994
  }
8848
8995
  if (e.hasAttribute(b.attrName(t, "adjust-value"))) {
@@ -8853,7 +9000,7 @@ ${S}
8853
9000
  }
8854
9001
  }
8855
9002
  if (e.hasAttribute(b.attrName(t, "row-add")) && (r.rowAdd = !0), e.hasAttribute(b.attrName(t, "row-remove")) && (r.rowRemove = !0), e.hasAttribute(b.attrName(t, "row-prev")) && (r.rowMovePrev = !0), e.hasAttribute(b.attrName(t, "row-next")) && (r.rowMoveNext = !0), e.hasAttribute(`${l.prefix}${t}-after-run`)) {
8856
- const V = e.getRawAttribute(
9003
+ const q = e.getRawAttribute(
8857
9004
  `${l.prefix}${t}-after-run`
8858
9005
  );
8859
9006
  try {
@@ -8861,7 +9008,7 @@ ${S}
8861
9008
  "response",
8862
9009
  `
8863
9010
  "use strict";
8864
- ${V}
9011
+ ${q}
8865
9012
  `
8866
9013
  );
8867
9014
  } catch (z) {
@@ -8882,32 +9029,32 @@ ${V}
8882
9029
  "toast",
8883
9030
  b.attrName(t, "toast")
8884
9031
  );
8885
- const V = e.getRawAttribute(
9032
+ const q = e.getRawAttribute(
8886
9033
  b.attrName(t, "toast-level")
8887
- ), Z = ["info", "warning", "error", "success"].includes(V);
8888
- r.toastLevel = Z ? V : null;
9034
+ ), Z = ["info", "warning", "error", "success"].includes(q);
9035
+ r.toastLevel = Z ? q : null;
8889
9036
  }
8890
- const R = b.attrName(t, "redirect"), S = b.attrName(t, "redirect-replace"), H = e.hasAttribute(R), O = e.hasAttribute(S);
9037
+ const R = b.attrName(t, "redirect"), S = b.attrName(t, "redirect-replace"), H = e.hasAttribute(R), B = e.hasAttribute(S);
8891
9038
  if (H && (r.redirectUrl = b.readLateAttribute(
8892
9039
  e,
8893
9040
  r,
8894
9041
  "redirect",
8895
9042
  R
8896
- )), O && (r.redirectReplaceUrl = b.readLateAttribute(
9043
+ )), B && (r.redirectReplaceUrl = b.readLateAttribute(
8897
9044
  e,
8898
9045
  r,
8899
9046
  "redirect-replace",
8900
9047
  S
8901
- )), H || O) {
8902
- const V = b.attrName(
9048
+ )), H || B) {
9049
+ const q = b.attrName(
8903
9050
  t,
8904
9051
  "redirect-return-param"
8905
9052
  );
8906
- e.hasAttribute(V) && (r.redirectReturnParam = b.readLateAttribute(
9053
+ e.hasAttribute(q) && (r.redirectReturnParam = b.readLateAttribute(
8907
9054
  e,
8908
9055
  r,
8909
9056
  "redirect-return-param",
8910
- V
9057
+ q
8911
9058
  ));
8912
9059
  }
8913
9060
  if (e.hasAttribute(b.attrName(t, "scroll-error")) && (r.scrollOnError = !0), e.hasAttribute(b.attrName(t, "scroll")) && (r.scrollTarget = b.readLateAttribute(
@@ -8921,23 +9068,23 @@ ${V}
8921
9068
  "history",
8922
9069
  b.attrName(t, "history")
8923
9070
  )), e.hasAttribute(b.attrName(t, "history-data")) && (r.historyDataAttrName = b.attrName(t, "history-data")), e.hasAttribute(b.attrName(t, "history-form"))) {
8924
- const V = X.read(
9071
+ const q = X.read(
8925
9072
  e,
8926
9073
  b.attrName(t, "history-form")
8927
9074
  );
8928
- if (V) {
9075
+ if (q) {
8929
9076
  const z = X.query(
8930
- V,
9077
+ q,
8931
9078
  b.attrName(t, "history-form")
8932
9079
  );
8933
- z !== null ? r.historyFormFragment = N.getFormFragment(
9080
+ z !== null ? r.historyFormFragment = F.getFormFragment(
8934
9081
  M.get(z)
8935
9082
  ) : m.error(
8936
9083
  "Haori",
8937
- `Form element not found: ${V} (${b.attrName(t, "history-form")})`
9084
+ `Form element not found: ${q} (${b.attrName(t, "history-form")})`
8938
9085
  );
8939
9086
  } else
8940
- r.historyFormFragment = N.getFormFragment(e);
9087
+ r.historyFormFragment = F.getFormFragment(e);
8941
9088
  }
8942
9089
  [
8943
9090
  "reset-before",
@@ -8947,8 +9094,8 @@ ${V}
8947
9094
  "copy",
8948
9095
  "open",
8949
9096
  "close"
8950
- ].forEach((V) => {
8951
- const z = b.attrName(t, V);
9097
+ ].forEach((q) => {
9098
+ const z = b.attrName(t, q);
8952
9099
  if (!e.hasAttribute(z))
8953
9100
  return;
8954
9101
  const Z = X.read(e, z), J = [];
@@ -8957,13 +9104,13 @@ ${V}
8957
9104
  const ce = M.get(Se);
8958
9105
  ce && J.push(ce);
8959
9106
  }), J.length === 0 && m.error("Haori", `Element not found: ${Z} (${z})`);
8960
- else if (V === "open" || V === "close") {
9107
+ else if (q === "open" || q === "close") {
8961
9108
  const ae = e.getTarget().closest("dialog");
8962
9109
  ae ? J.push(M.get(ae)) : m.error("Haori", `Ancestor <dialog> not found (${z})`);
8963
9110
  } else
8964
9111
  J.push(e);
8965
9112
  if (J.length > 0)
8966
- switch (V) {
9113
+ switch (q) {
8967
9114
  case "reset-before":
8968
9115
  r.resetBeforeFragments = J;
8969
9116
  break;
@@ -8989,19 +9136,19 @@ ${V}
8989
9136
  });
8990
9137
  const ie = b.attrName(t, "copy-source");
8991
9138
  if (e.hasAttribute(ie)) {
8992
- const V = X.read(e, ie);
8993
- if (V) {
8994
- const z = X.query(V, ie);
9139
+ const q = X.read(e, ie);
9140
+ if (q) {
9141
+ const z = X.query(q, ie);
8995
9142
  if (z !== null) {
8996
9143
  const Z = M.get(z);
8997
9144
  Z ? r.copySourceFragment = Z : m.error(
8998
9145
  "Haori",
8999
- `Element is not managed by Haori: ${V} (${ie})`
9146
+ `Element is not managed by Haori: ${q} (${ie})`
9000
9147
  );
9001
9148
  } else
9002
9149
  m.error(
9003
9150
  "Haori",
9004
- `Element not found: ${V} (${ie})`
9151
+ `Element not found: ${q} (${ie})`
9005
9152
  );
9006
9153
  } else
9007
9154
  r.copySourceFragment = e;
@@ -9017,20 +9164,20 @@ ${V}
9017
9164
  R,
9018
9165
  b.attrName(null, "form", !0)
9019
9166
  );
9020
- S !== null ? r.formFragment = N.getFormFragment(
9167
+ S !== null ? r.formFragment = F.getFormFragment(
9021
9168
  M.get(S)
9022
9169
  ) : m.error(
9023
9170
  "Haori",
9024
9171
  `Form element not found: ${R} (${b.attrName(null, "fetch-form", !0)})`
9025
9172
  );
9026
9173
  } else
9027
- r.formFragment = N.getFormFragment(e);
9174
+ r.formFragment = F.getFormFragment(e);
9028
9175
  }
9029
9176
  const U = t ? b.attrName(t, "fetch-state") : b.attrName(null, "state", !0);
9030
9177
  if (e.hasAttribute(U)) {
9031
9178
  const R = X.read(e, U), S = [];
9032
- R ? (X.queryAll(R, U).forEach((O) => {
9033
- const te = M.get(O);
9179
+ R ? (X.queryAll(R, U).forEach((B) => {
9180
+ const te = M.get(B);
9034
9181
  te && S.push(te);
9035
9182
  }), S.length === 0 && m.error(
9036
9183
  "Haori",
@@ -9049,10 +9196,10 @@ ${V}
9049
9196
  r.storeClearKey = S;
9050
9197
  const H = e.getRawAttribute(
9051
9198
  `${K}-type`
9052
- ), O = H === null ? "session" : H.trim();
9053
- O === "local" || O === "session" ? r.storeClearKind = O : (m.warn(
9199
+ ), B = H === null ? "session" : H.trim();
9200
+ B === "local" || B === "session" ? r.storeClearKind = B : (m.warn(
9054
9201
  "Haori",
9055
- `${K}-type は session または local を指定してください(session として扱います): ${O}`
9202
+ `${K}-type は session または local を指定してください(session として扱います): ${B}`
9056
9203
  ), r.storeClearKind = "session");
9057
9204
  }
9058
9205
  }
@@ -9152,8 +9299,8 @@ ${V}
9152
9299
  if (e === !1)
9153
9300
  return !1;
9154
9301
  try {
9155
- if (Object.keys(this.options).length === 0 || this.options.formFragment && this.validate(this.options.formFragment) === !1 || (!this.options.formFragment && this.options.targetFragment && N.warnUnvalidatedCustomValidity(
9156
- N.getFormFragment(this.options.targetFragment),
9302
+ if (Object.keys(this.options).length === 0 || this.options.formFragment && this.validate(this.options.formFragment) === !1 || (!this.options.formFragment && this.options.targetFragment && F.warnUnvalidatedCustomValidity(
9303
+ F.getFormFragment(this.options.targetFragment),
9157
9304
  `${l.prefix}${this.eventType ?? "fetch"}-form が解決できません`
9158
9305
  ), !this.evaluateExecutionCondition()))
9159
9306
  return !1;
@@ -9173,7 +9320,7 @@ ${V}
9173
9320
  return !1;
9174
9321
  this.options.resetBeforeFragments && this.options.resetBeforeFragments.length > 0 && (await Promise.all(
9175
9322
  this.options.resetBeforeFragments.map(
9176
- (p) => N.reset(p, this.operationSequence)
9323
+ (p) => F.reset(p, this.operationSequence)
9177
9324
  )
9178
9325
  ), this.captureHistorySnapshots());
9179
9326
  const r = this.prepareFetchRequest();
@@ -9193,15 +9340,15 @@ ${V}
9193
9340
  }
9194
9341
  const c = Object.keys(i).length > 0;
9195
9342
  if (n) {
9196
- const p = (s?.method || "GET").toUpperCase(), E = !a && o && r.transportMode === "query-get" && Pt(s) && !Be(p) ? r.baseUrl ?? n : n, A = Lt(
9343
+ const p = (s?.method || "GET").toUpperCase(), E = !a && o && r.transportMode === "query-get" && Pt(s) && !Oe(p) ? r.baseUrl ?? n : n, A = Lt(
9197
9344
  E,
9198
9345
  s
9199
9346
  );
9200
9347
  n = A.url;
9201
- const I = { ...A.options }, C = A.normalized ? A.requestedMethod : r.requestedMethod, W = A.effectiveMethod, x = r.transportMode === "query-get" || A.normalized, U = A.queryString ?? r.queryString;
9348
+ const I = { ...A.options }, $ = A.normalized ? A.requestedMethod : r.requestedMethod, W = A.effectiveMethod, x = r.transportMode === "query-get" || A.normalized, U = A.queryString ?? r.queryString;
9202
9349
  if (x && m.info("Haori demo fetch normalization", {
9203
9350
  runtime: l.runtime,
9204
- requestedMethod: C,
9351
+ requestedMethod: $,
9205
9352
  effectiveMethod: W,
9206
9353
  transportMode: "query-get",
9207
9354
  url: n,
@@ -9210,12 +9357,12 @@ ${V}
9210
9357
  }), this.options.targetFragment && n) {
9211
9358
  const K = performance.now(), R = {
9212
9359
  runtime: l.runtime,
9213
- requestedMethod: C,
9360
+ requestedMethod: $,
9214
9361
  effectiveMethod: W,
9215
9362
  transportMode: x ? "query-get" : "http",
9216
9363
  ...x ? { queryString: U } : {}
9217
9364
  };
9218
- return B.fetchStart(
9365
+ return O.fetchStart(
9219
9366
  this.options.targetFragment.getTarget(),
9220
9367
  n,
9221
9368
  I,
@@ -9226,7 +9373,7 @@ ${V}
9226
9373
  n || void 0,
9227
9374
  K
9228
9375
  )).catch(async (S) => {
9229
- throw n && B.fetchError(
9376
+ throw n && O.fetchError(
9230
9377
  this.options.targetFragment.getTarget(),
9231
9378
  n,
9232
9379
  S
@@ -9242,31 +9389,35 @@ ${V}
9242
9389
  if ((!this.options.bindFragments || this.options.bindFragments.length === 0) && this.options.formFragment && c) {
9243
9390
  const p = this.options.formFragment, g = p.getTarget(), E = /* @__PURE__ */ new Set();
9244
9391
  e && e.appliedDisabledAttribute && this.options.targetFragment && E.add(this.options.targetFragment);
9245
- const A = p.getRawBindingData(), I = Oe(i), C = p.getAttribute(`${l.prefix}form-arg`);
9392
+ const A = p.getRawBindingData(), I = Be(i), $ = p.getAttribute(`${l.prefix}form-arg`);
9246
9393
  let W;
9247
- if (C) {
9394
+ if ($) {
9248
9395
  W = { ...A ?? {} };
9249
- const x = String(C), U = N.resolveAncestorArgOwner(p, x);
9250
- W[x] = N.mergeCollectedValues(
9396
+ const x = String($), U = F.resolveAncestorArgOwner(p, x);
9397
+ W[x] = F.mergeCollectedValues(
9251
9398
  (U ? U.value : W[x]) ?? null,
9252
9399
  I
9253
9400
  );
9254
9401
  } else
9255
- W = N.mergeCollectedValues(A, I);
9256
- await $.setBindingData(g, W, {
9402
+ W = F.mergeCollectedValues(
9403
+ A,
9404
+ I,
9405
+ F.ancestorBaseResolver(p)
9406
+ );
9407
+ await k.setBindingData(g, W, {
9257
9408
  skipFragments: E,
9258
9409
  kind: "nonSupply",
9259
9410
  sequence: this.operationSequence,
9260
- editedPaths: N.collectEditedPaths(
9411
+ editedPaths: F.collectEditedPaths(
9261
9412
  p,
9262
9413
  this.operationSequence,
9263
- C ? String(C) : "",
9414
+ $ ? String($) : "",
9264
9415
  I
9265
9416
  )
9266
9417
  });
9267
9418
  }
9268
9419
  this.suppressEmptyReplaceBind = !c && !this.options.formFragment && (this.eventType === "change" || this.eventType === "input"), this.twoWayCommitBind = this.eventType === "change" || this.eventType === "input";
9269
- const u = c ? Oe(i) : {}, d = new Response(JSON.stringify(u), {
9420
+ const u = c ? Be(i) : {}, d = new Response(JSON.stringify(u), {
9270
9421
  headers: { "Content-Type": "application/json" }
9271
9422
  });
9272
9423
  return await this.handleFetchResult(d);
@@ -9306,7 +9457,7 @@ ${V}
9306
9457
  async handleFetchResult(e, t, r) {
9307
9458
  const i = Ie();
9308
9459
  if (!e.ok)
9309
- return ft(e.status) || (this.options.targetFragment && t && B.fetchError(
9460
+ return ft(e.status) || (this.options.targetFragment && t && O.fetchError(
9310
9461
  this.options.targetFragment.getTarget(),
9311
9462
  t,
9312
9463
  new Error(`${e.status} ${e.statusText}`),
@@ -9317,7 +9468,7 @@ ${V}
9317
9468
  e.status,
9318
9469
  e.statusText || null
9319
9470
  )), !1;
9320
- if (this.options.targetFragment && t && r && B.fetchEnd(
9471
+ if (this.options.targetFragment && t && r && O.fetchEnd(
9321
9472
  this.options.targetFragment.getTarget(),
9322
9473
  t,
9323
9474
  e.status,
@@ -9333,7 +9484,7 @@ ${V}
9333
9484
  const n = [];
9334
9485
  n.push(this.bindResult(e)), n.push(this.adjust()), n.push(this.addRow()), n.push(this.removeRow()), n.push(this.movePrevRow()), n.push(this.moveNextRow()), await Promise.all(n), await this.injectFetchState("success", e.status, null), this.options.resetFragments && this.options.resetFragments.length > 0 && await Promise.all(
9335
9486
  this.options.resetFragments.map(
9336
- (g) => N.reset(g, this.operationSequence)
9487
+ (g) => F.reset(g, this.operationSequence)
9337
9488
  )
9338
9489
  ), await this.copy();
9339
9490
  const s = [];
@@ -9341,7 +9492,7 @@ ${V}
9341
9492
  s.push(new b(g, null).run());
9342
9493
  }), this.options.clickFragments && this.options.clickFragments.length > 0)
9343
9494
  for (const g of this.options.clickFragments) {
9344
- await $.evaluateAll(g);
9495
+ await k.evaluateAll(g);
9345
9496
  const E = g.getTarget();
9346
9497
  typeof E.click == "function" ? E.click() : E.dispatchEvent(
9347
9498
  new MouseEvent("click", { bubbles: !0, cancelable: !0 })
@@ -9394,8 +9545,8 @@ ${V}
9394
9545
  if (E) {
9395
9546
  const I = new URLSearchParams(window.location.search).get(E);
9396
9547
  if (I !== null) {
9397
- const C = I.trim();
9398
- ht.isSafeLocalPath(C) ? g = C : m.warn(
9548
+ const $ = I.trim();
9549
+ ht.isSafeLocalPath($) ? g = $ : m.warn(
9399
9550
  "Haori",
9400
9551
  `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${I}`
9401
9552
  );
@@ -9432,7 +9583,7 @@ ${V}
9432
9583
  if (!i || !n || !n.hasAttribute(i.attributeName))
9433
9584
  return r;
9434
9585
  const s = n.getAttributeEvaluation(i.attributeName);
9435
- return s === null ? r : s.hasUnresolvedReference && !i.hasUnresolvedReference ? (q.isEnabled() && m.warn(
9586
+ return s === null ? r : s.hasUnresolvedReference && !i.hasUnresolvedReference ? (V.isEnabled() && m.warn(
9436
9587
  "Haori",
9437
9588
  `${i.attributeName} の参照が手続きの途中で解決できなくなったため、手続き開始時の値を使います`
9438
9589
  ), r) : s.value ?? null;
@@ -9475,7 +9626,7 @@ ${V}
9475
9626
  */
9476
9627
  async handleFetchError(e) {
9477
9628
  let t = null;
9478
- this.options.formFragment ? t = this.options.formFragment : this.options.targetFragment && (t = N.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
9629
+ this.options.formFragment ? t = this.options.formFragment : this.options.targetFragment && (t = F.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
9479
9630
  const r = t ? t.getTarget() : document.body;
9480
9631
  await Ie().clearMessages(r);
9481
9632
  const i = async (a) => {
@@ -9524,7 +9675,7 @@ ${V}
9524
9675
  if (o.length === 0)
9525
9676
  return await i(`${e.status} ${e.statusText}`), n(), !1;
9526
9677
  for (const c of o)
9527
- c.key && t ? await N.addErrorMessage(t, c.key, c.message) : await i(c.message);
9678
+ c.key && t ? await F.addErrorMessage(t, c.key, c.message) : await i(c.message);
9528
9679
  return n(), !1;
9529
9680
  } catch {
9530
9681
  }
@@ -9545,11 +9696,11 @@ ${V}
9545
9696
  */
9546
9697
  validate(e) {
9547
9698
  if (this.options.valid !== !0)
9548
- return N.warnUnvalidatedCustomValidity(
9699
+ return F.warnUnvalidatedCustomValidity(
9549
9700
  e,
9550
9701
  `${l.prefix}${this.eventType ?? "fetch"}-validate の指定がありません`
9551
9702
  ), !0;
9552
- N.applyCustomValidity(e);
9703
+ F.applyCustomValidity(e);
9553
9704
  const t = this.findFirstInvalid(e);
9554
9705
  if (t === null)
9555
9706
  return !0;
@@ -9640,14 +9791,14 @@ ${V}
9640
9791
  const r = this.options.targetFragment;
9641
9792
  if (!r)
9642
9793
  return !0;
9643
- const i = this.options.conditionAttributeName ?? `${l.prefix}if`, n = N.buildConditionScope(
9794
+ const i = this.options.conditionAttributeName ?? `${l.prefix}if`, n = F.buildConditionScope(
9644
9795
  r,
9645
9796
  this.options.formFragment ?? null
9646
9797
  ), s = ee.evaluateDetailed(t, n);
9647
9798
  return s.unresolvedReference ? (e || m.warn(
9648
9799
  "Haori",
9649
9800
  `${i} の参照が解決できないため実行しません: ${t}`
9650
- ), !1) : s.value ? !0 : (!e && q.isEnabled() && m.warn(
9801
+ ), !1) : s.value ? !0 : (!e && V.isEnabled() && m.warn(
9651
9802
  "Haori",
9652
9803
  `${i} の条件が偽のため手続きを中断しました: ${t}`
9653
9804
  ), !1);
@@ -9740,11 +9891,11 @@ ${V}
9740
9891
  apply: (g) => {
9741
9892
  const E = this.resolveCurrentRowItem(o, g), A = { ...E };
9742
9893
  if (i && typeof i == "object" && !Array.isArray(i)) {
9743
- const I = E[p], C = I !== null && typeof I == "object" && !Array.isArray(I) ? I : {};
9894
+ const I = E[p], $ = I !== null && typeof I == "object" && !Array.isArray(I) ? I : {};
9744
9895
  A[p] = this.mergeAppendBindingData(
9745
9896
  o,
9746
9897
  i,
9747
- C
9898
+ $
9748
9899
  );
9749
9900
  } else
9750
9901
  A[p] = i;
@@ -9764,7 +9915,7 @@ ${V}
9764
9915
  } else
9765
9916
  u[d] = i;
9766
9917
  n.push(
9767
- $.setBindingData(
9918
+ k.setBindingData(
9768
9919
  o.getTarget(),
9769
9920
  this.reconcileUserEditsForBind(o, u),
9770
9921
  {
@@ -9822,7 +9973,7 @@ ${V}
9822
9973
  i
9823
9974
  ), d = this.options.bindMerge ? { ...o.getRawBindingData() ?? {}, ...u } : u;
9824
9975
  n.push(
9825
- $.setBindingData(
9976
+ k.setBindingData(
9826
9977
  o.getTarget(),
9827
9978
  this.reconcileUserEditsForBind(o, d),
9828
9979
  {
@@ -9837,7 +9988,7 @@ ${V}
9837
9988
  return n.push(this.applyRowWrites(a)), Promise.all(n).then(() => {
9838
9989
  const o = this.options.bindArg ?? null;
9839
9990
  this.options.bindFragments.forEach((c) => {
9840
- B.bindComplete(c.getTarget(), o);
9991
+ O.bindComplete(c.getTarget(), o);
9841
9992
  });
9842
9993
  });
9843
9994
  });
@@ -9878,13 +10029,13 @@ ${V}
9878
10029
  if (r === null)
9879
10030
  return t;
9880
10031
  const i = this.eventType === "poll";
9881
- if (!i && !this.twoWayCommitBind && $.clearUserEditMarks(e, r), !(e.getTarget() instanceof HTMLFormElement))
10032
+ if (!i && !this.twoWayCommitBind && k.clearUserEditMarks(e, r), !(e.getTarget() instanceof HTMLFormElement))
9882
10033
  return this.reconcileAncestorArgFormEdits(
9883
10034
  e,
9884
10035
  t,
9885
10036
  i ? 0 : r
9886
10037
  );
9887
- const n = N.getValuesEditedAfter(
10038
+ const n = F.getValuesEditedAfter(
9888
10039
  e,
9889
10040
  i ? 0 : r
9890
10041
  );
@@ -9917,8 +10068,8 @@ ${V}
9917
10068
  if (r === null)
9918
10069
  return t;
9919
10070
  const i = this.eventType === "poll";
9920
- !i && !this.twoWayCommitBind && $.clearUserEditMarks(e, r);
9921
- const n = N.getValuesEditedAfter(
10071
+ !i && !this.twoWayCommitBind && k.clearUserEditMarks(e, r);
10072
+ const n = F.getValuesEditedAfter(
9922
10073
  e,
9923
10074
  i ? 0 : r
9924
10075
  );
@@ -9940,10 +10091,10 @@ ${V}
9940
10091
  */
9941
10092
  reconcileAncestorArgFormEdits(e, t, r) {
9942
10093
  let i = t;
9943
- for (const { form: n, key: s } of N.collectArgForms(e)) {
10094
+ for (const { form: n, key: s } of F.collectArgForms(e)) {
9944
10095
  if (!Object.prototype.hasOwnProperty.call(i, s))
9945
10096
  continue;
9946
- const a = N.getValuesEditedAfter(n, r);
10097
+ const a = F.getValuesEditedAfter(n, r);
9947
10098
  if (Object.keys(a).length === 0)
9948
10099
  continue;
9949
10100
  const o = i[s], c = o && typeof o == "object" && !Array.isArray(o) ? o : {};
@@ -9990,7 +10141,7 @@ ${V}
9990
10141
  ...t
9991
10142
  };
9992
10143
  n.push(
9993
- $.setBindingData(s.getTarget(), o, {
10144
+ k.setBindingData(s.getTarget(), o, {
9994
10145
  // 通番はコピーを起こした操作のもの(フェッチ応答の反映と同じ理由)。
9995
10146
  sequence: this.operationSequence
9996
10147
  })
@@ -10023,7 +10174,7 @@ ${V}
10023
10174
  * @returns 行の入力欄の状態を反映した要素データ
10024
10175
  */
10025
10176
  resolveCurrentRowItem(e, t) {
10026
- const r = N.getValuesEditedAfter(e, 0);
10177
+ const r = F.getValuesEditedAfter(e, 0);
10027
10178
  return Object.keys(r).length === 0 ? t : de(t, r);
10028
10179
  }
10029
10180
  /**
@@ -10052,9 +10203,9 @@ ${V}
10052
10203
  * @returns コピー元のデータ
10053
10204
  */
10054
10205
  resolveCopySourceData() {
10055
- return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? xe(this.options.copySourceFragment) : $.withoutReservedBindingKeys(
10206
+ return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? xe(this.options.copySourceFragment) : k.withoutReservedBindingKeys(
10056
10207
  this.options.copySourceFragment.getRawBindingData() ?? {}
10057
- ) : this.options.formFragment ? xe(this.options.formFragment) : this.options.targetFragment ? $.withoutReservedBindingKeys(
10208
+ ) : this.options.formFragment ? xe(this.options.formFragment) : this.options.targetFragment ? k.withoutReservedBindingKeys(
10058
10209
  this.options.targetFragment.getRawBindingData() ?? {}
10059
10210
  ) : {};
10060
10211
  }
@@ -10068,8 +10219,8 @@ ${V}
10068
10219
  let t = !1;
10069
10220
  const r = this.options.formFragment ?? this.options.selfValueFragment;
10070
10221
  if (r) {
10071
- const i = N.getValues(r);
10072
- Object.assign(e, i), N.carryCollectedRowIdentity(i, e);
10222
+ const i = F.getValues(r);
10223
+ Object.assign(e, i), F.carryCollectedRowIdentity(i, e);
10073
10224
  }
10074
10225
  if (this.options.data && typeof this.options.data == "object" && Object.assign(e, this.options.data), this.options.targetFragment && this.options.dataAttrName) {
10075
10226
  const i = b.resolveDataAttributeDetailed(
@@ -10119,10 +10270,10 @@ ${V}
10119
10270
  let i = this.options.fetchUrl;
10120
10271
  const n = { ...this.options.fetchOptions || {} }, s = new Headers(
10121
10272
  n.headers || void 0
10122
- ), a = (n.method || "GET").toUpperCase(), o = l.runtime === "demo" && !Be(a), c = o ? "GET" : a;
10273
+ ), a = (n.method || "GET").toUpperCase(), o = l.runtime === "demo" && !Oe(a), c = o ? "GET" : a;
10123
10274
  if (n.method = c, Object.keys(t).length > 0 && Te(t)) {
10124
10275
  const d = s.get("Content-Type") || "";
10125
- c !== "GET" && c !== "HEAD" && c !== "OPTIONS" && /multipart\/form-data/i.test(d) ? Ot(t) && m.warn(
10276
+ c !== "GET" && c !== "HEAD" && c !== "OPTIONS" && /multipart\/form-data/i.test(d) ? Bt(t) && m.warn(
10126
10277
  "Haori",
10127
10278
  `A File value nested under ${l.prefix}form-object / ${l.prefix}form-list cannot be sent. Place file inputs at the top level of the collected form values.`
10128
10279
  ) : m.warn(
@@ -10539,11 +10690,11 @@ ${V}
10539
10690
  );
10540
10691
  continue;
10541
10692
  }
10542
- a[d] = g, o = !0, u.syncWhenUnchanged === "supply" && N.clearRowUserEditMarksForChangedKeys(u.row, g);
10693
+ a[d] = g, o = !0, u.syncWhenUnchanged === "supply" && F.clearRowUserEditMarksForChangedKeys(u.row, g);
10543
10694
  }
10544
10695
  if (!o)
10545
10696
  return;
10546
- const c = $.setBindingData(
10697
+ const c = k.setBindingData(
10547
10698
  s.owner.getTarget(),
10548
10699
  b.withPathValue(s.ownerData, s.path, a),
10549
10700
  {
@@ -10559,7 +10710,7 @@ ${V}
10559
10710
  sequence: this.operationSequence
10560
10711
  }
10561
10712
  );
10562
- if ($.isEachUpdateRunning(n)) {
10713
+ if (k.isEachUpdateRunning(n)) {
10563
10714
  c.catch((u) => {
10564
10715
  m.error("Haori", "Failed to write row data.", u);
10565
10716
  });
@@ -10589,7 +10740,7 @@ ${V}
10589
10740
  * @returns 反映完了の Promise
10590
10741
  */
10591
10742
  static syncUnchangedRowValues(e, t, r) {
10592
- return r === "supply" && N.clearRowUserEditMarksForChangedKeys(e, t), N.syncRowValues(e, t);
10743
+ return r === "supply" && F.clearRowUserEditMarksForChangedKeys(e, t), F.syncRowValues(e, t);
10593
10744
  }
10594
10745
  /**
10595
10746
  * 行の要素データが同じ内容かどうかを判定します。
@@ -10655,7 +10806,7 @@ ${V}
10655
10806
  if (a && o !== null) {
10656
10807
  const c = [];
10657
10808
  r.forEach((p, g) => {
10658
- $.createListKey(
10809
+ k.createListKey(
10659
10810
  p,
10660
10811
  String(a),
10661
10812
  g
@@ -10774,14 +10925,14 @@ ${V}
10774
10925
  if (b.isSameRowItem(i.array[E], g))
10775
10926
  return;
10776
10927
  const A = p.get(
10777
- $.createListKey(
10928
+ k.createListKey(
10778
10929
  g,
10779
10930
  null,
10780
10931
  E
10781
10932
  )
10782
10933
  );
10783
- A && $.clearUserEditMarks(A);
10784
- }), $.setBindingData(
10934
+ A && k.clearUserEditMarks(A);
10935
+ }), k.setBindingData(
10785
10936
  i.owner.getTarget(),
10786
10937
  b.withPathValue(i.ownerData, i.path, d),
10787
10938
  {
@@ -10824,7 +10975,7 @@ ${V}
10824
10975
  ...s.getRawBindingData() ?? {},
10825
10976
  _fetch: n
10826
10977
  };
10827
- return $.setBindingData(a, o, {
10978
+ return k.setBindingData(a, o, {
10828
10979
  reflectToAttribute: !1,
10829
10980
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
10830
10981
  // 解除しない)。
@@ -10876,7 +11027,7 @@ class Ht {
10876
11027
  }
10877
11028
  }
10878
11029
  }
10879
- const f = class f {
11030
+ const h = class h {
10880
11031
  /**
10881
11032
  * 遅延属性かどうか(完全名で判定)を判定します。
10882
11033
  *
@@ -10884,7 +11035,7 @@ const f = class f {
10884
11035
  * @returns 遅延属性かどうか
10885
11036
  */
10886
11037
  static isDeferredAttributeName(e) {
10887
- return f.DEFERRED_ATTRIBUTE_SUFFIXES.some(
11038
+ return h.DEFERRED_ATTRIBUTE_SUFFIXES.some(
10888
11039
  (t) => e === `${l.prefix}${t}`
10889
11040
  );
10890
11041
  }
@@ -10895,7 +11046,7 @@ const f = class f {
10895
11046
  * @returns 除外対象かどうか
10896
11047
  */
10897
11048
  static isEvaluateAllExcludedAttributeName(e) {
10898
- return f.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES.some(
11049
+ return h.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES.some(
10899
11050
  (t) => e === `${l.prefix}${t}`
10900
11051
  );
10901
11052
  }
@@ -10907,7 +11058,7 @@ const f = class f {
10907
11058
  * @returns 再評価する場合は true
10908
11059
  */
10909
11060
  static shouldReevaluateAttribute(e, t) {
10910
- return t !== null && !f.isEvaluateAllExcludedAttributeName(e) && f.ATTRIBUTE_PLACEHOLDER_REGEX.test(t);
11061
+ return t !== null && !h.isEvaluateAllExcludedAttributeName(e) && h.ATTRIBUTE_PLACEHOLDER_REGEX.test(t);
10911
11062
  }
10912
11063
  /**
10913
11064
  * data-attr-* 形式の属性名から実際に更新する属性名を取得します。
@@ -10916,7 +11067,7 @@ const f = class f {
10916
11067
  * @returns 実際の属性名。data-attr-* でない場合は null
10917
11068
  */
10918
11069
  static getAliasedAttributeName(e) {
10919
- const t = `${l.prefix}${f.ATTRIBUTE_ALIAS_SUFFIX}`;
11070
+ const t = `${l.prefix}${h.ATTRIBUTE_ALIAS_SUFFIX}`;
10920
11071
  return !e.startsWith(t) || e.length <= t.length ? null : e.slice(t.length);
10921
11072
  }
10922
11073
  /**
@@ -10929,7 +11080,7 @@ const f = class f {
10929
11080
  static isAliasedAttributeReflection(e, t) {
10930
11081
  const r = M.get(e);
10931
11082
  return r instanceof T ? r.hasAttribute(
10932
- `${l.prefix}${f.ATTRIBUTE_ALIAS_SUFFIX}${t}`
11083
+ `${l.prefix}${h.ATTRIBUTE_ALIAS_SUFFIX}${t}`
10933
11084
  ) : !1;
10934
11085
  }
10935
11086
  /**
@@ -10943,8 +11094,8 @@ const f = class f {
10943
11094
  let t = Promise.resolve();
10944
11095
  for (const r of e.getAttributeNames()) {
10945
11096
  const i = e.getRawAttribute(r);
10946
- f.shouldReevaluateAttribute(r, i) && (t = t.then(
10947
- () => f.setAttribute(e.getTarget(), r, i)
11097
+ h.shouldReevaluateAttribute(r, i) && (t = t.then(
11098
+ () => h.setAttribute(e.getTarget(), r, i)
10948
11099
  ));
10949
11100
  }
10950
11101
  return t.then(() => {
@@ -10959,7 +11110,7 @@ const f = class f {
10959
11110
  static reevaluateChildren(e) {
10960
11111
  const t = [];
10961
11112
  return e.getChildren().forEach((r) => {
10962
- r instanceof T ? t.push(f.evaluateAll(r)) : r instanceof re && t.push(f.evaluateText(r));
11113
+ r instanceof T ? t.push(h.evaluateAll(r)) : r instanceof re && t.push(h.evaluateText(r));
10963
11114
  }), Promise.all(t).then(() => {
10964
11115
  });
10965
11116
  }
@@ -10982,7 +11133,7 @@ const f = class f {
10982
11133
  */
10983
11134
  static clearUserEditMarks(e, t = T.currentSequence()) {
10984
11135
  e.clearUserEditMark(t), e.getChildren().forEach((r) => {
10985
- r instanceof T && f.clearUserEditMarks(r, t);
11136
+ r instanceof T && h.clearUserEditMarks(r, t);
10986
11137
  });
10987
11138
  }
10988
11139
  /**
@@ -10992,7 +11143,7 @@ const f = class f {
10992
11143
  * @returns 再評価状態
10993
11144
  */
10994
11145
  static getReactiveFetchState(e) {
10995
- const t = f.REACTIVE_FETCH_STATES.get(e);
11146
+ const t = h.REACTIVE_FETCH_STATES.get(e);
10996
11147
  if (t)
10997
11148
  return t;
10998
11149
  const r = {
@@ -11000,7 +11151,7 @@ const f = class f {
11000
11151
  running: !1,
11001
11152
  rerunRequested: !1
11002
11153
  };
11003
- return f.REACTIVE_FETCH_STATES.set(e, r), r;
11154
+ return h.REACTIVE_FETCH_STATES.set(e, r), r;
11004
11155
  }
11005
11156
  /**
11006
11157
  * data-import の再評価状態を取得します。
@@ -11009,7 +11160,7 @@ const f = class f {
11009
11160
  * @returns 再評価状態
11010
11161
  */
11011
11162
  static getReactiveImportState(e) {
11012
- const t = f.REACTIVE_IMPORT_STATES.get(e);
11163
+ const t = h.REACTIVE_IMPORT_STATES.get(e);
11013
11164
  if (t)
11014
11165
  return t;
11015
11166
  const r = {
@@ -11017,7 +11168,7 @@ const f = class f {
11017
11168
  running: !1,
11018
11169
  rerunRequested: !1
11019
11170
  };
11020
- return f.REACTIVE_IMPORT_STATES.set(e, r), r;
11171
+ return h.REACTIVE_IMPORT_STATES.set(e, r), r;
11021
11172
  }
11022
11173
  /**
11023
11174
  * bind 更新時に data-fetch / data-import を専用ルートで再評価します。
@@ -11030,9 +11181,9 @@ const f = class f {
11030
11181
  if (t.has(e))
11031
11182
  return Promise.resolve();
11032
11183
  const r = [];
11033
- return e.hasAttribute(`${l.prefix}validity`) && N.applyCustomValidity(e), e.hasAttribute(`${l.prefix}fetch`) && r.push(f.executeManagedFetch(e)), e.hasAttribute(`${l.prefix}import`) && r.push(f.executeManagedImport(e)), e.getChildren().forEach((i) => {
11184
+ return e.hasAttribute(`${l.prefix}validity`) && F.applyCustomValidity(e), e.hasAttribute(`${l.prefix}fetch`) && r.push(h.executeManagedFetch(e)), e.hasAttribute(`${l.prefix}import`) && r.push(h.executeManagedImport(e)), e.getChildren().forEach((i) => {
11034
11185
  i instanceof T && r.push(
11035
- f.reevaluateReactiveSpecialAttributes(i, t)
11186
+ h.reevaluateReactiveSpecialAttributes(i, t)
11036
11187
  );
11037
11188
  }), Promise.all(r).then(() => {
11038
11189
  });
@@ -11044,7 +11195,7 @@ const f = class f {
11044
11195
  * @returns 実行完了の Promise
11045
11196
  */
11046
11197
  static executeManagedFetch(e) {
11047
- const t = e.getTarget(), r = f.getReactiveFetchState(t), i = ne.resolveAutoFetchSignature(e);
11198
+ const t = e.getTarget(), r = h.getReactiveFetchState(t), i = ne.resolveAutoFetchSignature(e);
11048
11199
  if (r.running)
11049
11200
  return (i.hasUnresolvedReference || i.signature !== r.lastSignature) && (r.rerunRequested = !0), Promise.resolve();
11050
11201
  if (i.hasUnresolvedReference || i.signature === null)
@@ -11056,7 +11207,7 @@ const f = class f {
11056
11207
  return n.markReentrantBind(), n.runWithResult().then(() => {
11057
11208
  }).finally(() => {
11058
11209
  if (r.running = !1, r.rerunRequested)
11059
- return r.rerunRequested = !1, f.executeManagedFetch(e);
11210
+ return r.rerunRequested = !1, h.executeManagedFetch(e);
11060
11211
  });
11061
11212
  }
11062
11213
  /**
@@ -11066,7 +11217,7 @@ const f = class f {
11066
11217
  * @returns 実行完了の Promise
11067
11218
  */
11068
11219
  static executeManagedImport(e) {
11069
- const t = e.getTarget(), r = f.getReactiveImportState(t), i = e.getAttributeEvaluation(
11220
+ const t = e.getTarget(), r = h.getReactiveImportState(t), i = e.getAttributeEvaluation(
11070
11221
  `${l.prefix}import`
11071
11222
  ), n = i && !i.hasUnresolvedReference && typeof i.value == "string" && i.value !== "" ? i.value : null;
11072
11223
  if (r.running)
@@ -11077,23 +11228,23 @@ const f = class f {
11077
11228
  return Promise.resolve();
11078
11229
  r.lastUrl = n, r.running = !0;
11079
11230
  const s = performance.now();
11080
- return t.setAttribute(`${l.prefix}importing`, ""), B.importStart(t, n), Ht.load(n).then((a) => {
11231
+ return t.setAttribute(`${l.prefix}importing`, ""), O.importStart(t, n), Ht.load(n).then((a) => {
11081
11232
  const o = new TextEncoder().encode(a).length;
11082
11233
  return G.enqueue(() => {
11083
11234
  t.innerHTML = a;
11084
11235
  }).then(() => {
11085
- t.removeAttribute(`${l.prefix}importing`), B.importEnd(t, n, o, s), f.adoptImportedChildren(e);
11236
+ t.removeAttribute(`${l.prefix}importing`), O.importEnd(t, n, o, s), h.adoptImportedChildren(e);
11086
11237
  const c = [];
11087
11238
  return e.getChildren().forEach((u) => {
11088
- u instanceof T ? c.push(f.scan(u.getTarget())) : u instanceof re && c.push(f.evaluateText(u));
11239
+ u instanceof T ? c.push(h.scan(u.getTarget())) : u instanceof re && c.push(h.evaluateText(u));
11089
11240
  }), Promise.all(c).then(() => {
11090
11241
  });
11091
11242
  });
11092
11243
  }).catch((a) => {
11093
- t.removeAttribute(`${l.prefix}importing`), B.importError(t, n, a), m.error("[Haori]", "Failed to import HTML:", n, a);
11244
+ t.removeAttribute(`${l.prefix}importing`), O.importError(t, n, a), m.error("[Haori]", "Failed to import HTML:", n, a);
11094
11245
  }).finally(() => {
11095
11246
  if (r.running = !1, r.rerunRequested)
11096
- return r.rerunRequested = !1, f.executeManagedImport(e);
11247
+ return r.rerunRequested = !1, h.executeManagedImport(e);
11097
11248
  });
11098
11249
  }
11099
11250
  /**
@@ -11125,7 +11276,7 @@ const f = class f {
11125
11276
  */
11126
11277
  static scan(e) {
11127
11278
  const t = M.get(e);
11128
- return t ? f.initializeElementFragment(t, !1).then(() => N.restoreInitialValues(e)).then(() => {
11279
+ return t ? h.initializeElementFragment(t, !1).then(() => F.restoreInitialValues(e)).then(() => {
11129
11280
  se.applySubtree(e);
11130
11281
  }) : Promise.resolve();
11131
11282
  }
@@ -11137,8 +11288,8 @@ const f = class f {
11137
11288
  * @returns 初期化完了の Promise
11138
11289
  */
11139
11290
  static initializeFreshEachRow(e) {
11140
- return f.initializeElementFragment(e, !0).then(() => {
11141
- f.needsScheduledEvaluateAll(e) && f.scheduleEvaluateAll(e), se.applySubtree(e.getTarget());
11291
+ return h.initializeElementFragment(e, !0).then(() => {
11292
+ h.needsScheduledEvaluateAll(e) && h.scheduleEvaluateAll(e), se.applySubtree(e.getTarget());
11142
11293
  });
11143
11294
  }
11144
11295
  /**
@@ -11149,16 +11300,16 @@ const f = class f {
11149
11300
  * @returns 初期化完了の Promise
11150
11301
  */
11151
11302
  static initializeElementFragment(e, t) {
11152
- return f.syncMountedState(e), t && e.isFreshInitializationSkippable() ? Promise.resolve() : f.initializeElementAttributes(e).then(() => {
11153
- if (f.shouldSkipChildInitialization(e, t)) {
11154
- f.refreshDerivedSubtreeSignature(e);
11303
+ return h.syncMountedState(e), t && e.isFreshInitializationSkippable() ? Promise.resolve() : h.initializeElementAttributes(e).then(() => {
11304
+ if (h.shouldSkipChildInitialization(e, t)) {
11305
+ h.refreshDerivedSubtreeSignature(e);
11155
11306
  return;
11156
11307
  }
11157
11308
  const r = [];
11158
11309
  return e.getChildren().forEach((i) => {
11159
- i instanceof T ? r.push(f.initializeElementFragment(i, t)) : i instanceof re && r.push(f.evaluateText(i));
11310
+ i instanceof T ? r.push(h.initializeElementFragment(i, t)) : i instanceof re && r.push(h.evaluateText(i));
11160
11311
  }), Promise.all(r).then(() => {
11161
- f.refreshDerivedSubtreeSignature(e);
11312
+ h.refreshDerivedSubtreeSignature(e);
11162
11313
  });
11163
11314
  });
11164
11315
  }
@@ -11188,10 +11339,10 @@ const f = class f {
11188
11339
  static initializeElementAttributes(e) {
11189
11340
  let t = Promise.resolve();
11190
11341
  const r = /* @__PURE__ */ new Set();
11191
- for (const i of f.PRIORITY_ATTRIBUTE_SUFFIXES) {
11342
+ for (const i of h.PRIORITY_ATTRIBUTE_SUFFIXES) {
11192
11343
  const n = l.prefix + i;
11193
11344
  e.hasAttribute(n) && (t = t.then(
11194
- () => f.setAttribute(
11345
+ () => h.setAttribute(
11195
11346
  e.getTarget(),
11196
11347
  n,
11197
11348
  e.getRawAttribute(n)
@@ -11199,24 +11350,24 @@ const f = class f {
11199
11350
  ), r.add(n));
11200
11351
  }
11201
11352
  for (const i of e.getAttributeNames()) {
11202
- if (r.has(i) || f.isDeferredAttributeName(i))
11353
+ if (r.has(i) || h.isDeferredAttributeName(i))
11203
11354
  continue;
11204
11355
  const n = e.getRawAttribute(i);
11205
11356
  n !== null && (t = t.then(
11206
- () => f.setAttribute(e.getTarget(), i, n)
11357
+ () => h.setAttribute(e.getTarget(), i, n)
11207
11358
  ));
11208
11359
  }
11209
- for (const i of f.DEFERRED_ATTRIBUTE_SUFFIXES) {
11360
+ for (const i of h.DEFERRED_ATTRIBUTE_SUFFIXES) {
11210
11361
  const n = l.prefix + i;
11211
11362
  e.hasAttribute(n) && (t = t.then(
11212
- () => f.setAttribute(
11363
+ () => h.setAttribute(
11213
11364
  e.getTarget(),
11214
11365
  n,
11215
11366
  e.getRawAttribute(n)
11216
11367
  )
11217
11368
  ), r.add(n));
11218
11369
  }
11219
- return t.then(() => N.prepareFormName(e));
11370
+ return t.then(() => F.prepareFormName(e));
11220
11371
  }
11221
11372
  /**
11222
11373
  * 子孫初期化をスキップすべきかどうかを返します。
@@ -11227,7 +11378,7 @@ const f = class f {
11227
11378
  */
11228
11379
  static shouldSkipChildInitialization(e, t) {
11229
11380
  const r = e.getAttribute(`${l.prefix}if`);
11230
- return e.hasAttribute(`${l.prefix}if`) && f.isHiddenIfCondition(r) ? !0 : t && e.hasAttribute(`${l.prefix}each`);
11381
+ return e.hasAttribute(`${l.prefix}if`) && h.isHiddenIfCondition(r) ? !0 : t && e.hasAttribute(`${l.prefix}each`);
11231
11382
  }
11232
11383
  /**
11233
11384
  * エレメントに属性を設定します。
@@ -11243,7 +11394,7 @@ const f = class f {
11243
11394
  * @returns Promise (DOM操作が完了したときに解決される)
11244
11395
  */
11245
11396
  static setAttribute(e, t, r, i = !1, n) {
11246
- const s = M.get(e), a = f.getAliasedAttributeName(t);
11397
+ const s = M.get(e), a = h.getAliasedAttributeName(t);
11247
11398
  if (a !== null)
11248
11399
  return r === null ? s.removeAliasedAttribute(t, a) : s.setAliasedAttribute(
11249
11400
  t,
@@ -11257,16 +11408,16 @@ const f = class f {
11257
11408
  case `${l.prefix}bind`: {
11258
11409
  if (r !== null && i && s instanceof T && s.consumeSelfWrittenBind(r))
11259
11410
  break;
11260
- const p = r === null ? {} : f.parseDataBind(r);
11411
+ const p = r === null ? {} : h.parseDataBind(r);
11261
11412
  if (i) {
11262
11413
  const g = n ?? T.nextSequence();
11263
11414
  return r === null ? (o.push(
11264
- f.setBindingData(e, p, {
11415
+ h.setBindingData(e, p, {
11265
11416
  reflectToAttribute: !1,
11266
11417
  sequence: g
11267
11418
  })
11268
11419
  ), o.push(s.removeAttribute(t))) : o.push(
11269
- f.setBindingData(e, p, {
11420
+ h.setBindingData(e, p, {
11270
11421
  sequence: g
11271
11422
  })
11272
11423
  ), Promise.all(o).then(() => {
@@ -11276,11 +11427,11 @@ const f = class f {
11276
11427
  break;
11277
11428
  }
11278
11429
  case `${l.prefix}derive`:
11279
- u = f.createDeriveInputSignature(
11430
+ u = h.createDeriveInputSignature(
11280
11431
  s,
11281
11432
  r,
11282
11433
  s.getRawAttribute(`${l.prefix}derive-name`)
11283
- ), c = f.evaluateDerive(
11434
+ ), c = h.evaluateDerive(
11284
11435
  s,
11285
11436
  r,
11286
11437
  s.getRawAttribute(`${l.prefix}derive-name`)
@@ -11288,11 +11439,11 @@ const f = class f {
11288
11439
  }));
11289
11440
  break;
11290
11441
  case `${l.prefix}derive-name`:
11291
- u = f.createDeriveInputSignature(
11442
+ u = h.createDeriveInputSignature(
11292
11443
  s,
11293
11444
  s.getRawAttribute(`${l.prefix}derive`),
11294
11445
  r
11295
- ), c = f.evaluateDerive(
11446
+ ), c = h.evaluateDerive(
11296
11447
  s,
11297
11448
  s.getRawAttribute(`${l.prefix}derive`),
11298
11449
  r
@@ -11300,23 +11451,23 @@ const f = class f {
11300
11451
  }));
11301
11452
  break;
11302
11453
  case `${l.prefix}if`:
11303
- d = () => f.evaluateIf(s);
11454
+ d = () => h.evaluateIf(s);
11304
11455
  break;
11305
11456
  case `${l.prefix}each`:
11306
- d = () => f.evaluateEach(s);
11457
+ d = () => h.evaluateEach(s);
11307
11458
  break;
11308
11459
  case `${l.prefix}fetch`:
11309
- d = () => f.executeManagedFetch(s);
11460
+ d = () => h.executeManagedFetch(s);
11310
11461
  break;
11311
11462
  case `${l.prefix}import`:
11312
- typeof r == "string" && (d = () => f.executeManagedImport(s));
11463
+ typeof r == "string" && (d = () => h.executeManagedImport(s));
11313
11464
  break;
11314
11465
  case `${l.prefix}store`:
11315
11466
  r !== null && o.push(Re.restore(s));
11316
11467
  break;
11317
11468
  case `${l.prefix}validity`:
11318
11469
  case `${l.prefix}validity-message`:
11319
- return r !== null && N.applyCustomValidity(s), Promise.all(o).then(() => {
11470
+ return r !== null && F.applyCustomValidity(s), Promise.all(o).then(() => {
11320
11471
  });
11321
11472
  case `${l.prefix}url-param`: {
11322
11473
  const p = s.getAttribute(`${l.prefix}url-arg`), g = ht.readParams();
@@ -11330,10 +11481,10 @@ const f = class f {
11330
11481
  sequence: T.nextSequence()
11331
11482
  };
11332
11483
  if (p === null)
11333
- o.push(f.setBindingData(e, g, E));
11484
+ o.push(h.setBindingData(e, g, E));
11334
11485
  else {
11335
11486
  const A = s.getRawBindingData() || {};
11336
- A[String(p)] = g, o.push(f.setBindingData(e, A, E));
11487
+ A[String(p)] = g, o.push(h.setBindingData(e, A, E));
11337
11488
  }
11338
11489
  break;
11339
11490
  }
@@ -11344,7 +11495,7 @@ const f = class f {
11344
11495
  if (c !== null)
11345
11496
  return s.setDeriveInputSignature(u), c.then((p) => {
11346
11497
  if (p)
11347
- return f.reevaluateChildren(s);
11498
+ return h.reevaluateChildren(s);
11348
11499
  });
11349
11500
  }).then(() => {
11350
11501
  });
@@ -11383,33 +11534,33 @@ const f = class f {
11383
11534
  }, d = o === "supply";
11384
11535
  d && i.markSupplyApplied(c);
11385
11536
  const p = T.currentSequence(), g = i.getRawBindingData();
11386
- d && (r.clearUserEdits ?? !0) && f.clearUserEditMarks(i, c);
11387
- const E = a ? f.resolveByPathAuthority(i, g, t, u) : t;
11388
- i.setBindingData(E), a && (B.bindChange(e, g, E, "manual"), Re.mirror(i));
11537
+ d && (r.clearUserEdits ?? !0) && h.clearUserEditMarks(i, c);
11538
+ const E = a ? h.resolveByPathAuthority(i, g, t, u) : t;
11539
+ i.setBindingData(E), a && (O.bindChange(e, g, E, "manual"), Re.mirror(i));
11389
11540
  const A = () => {
11390
11541
  i.markBindingWorkStart();
11391
11542
  const I = i.getRawBindingData() ?? E;
11392
- let C = a ? i.setAttribute(
11543
+ let $ = a ? i.setAttribute(
11393
11544
  `${l.prefix}bind`,
11394
- JSON.stringify(f.withoutReservedBindingKeys(I))
11545
+ JSON.stringify(h.withoutReservedBindingKeys(I))
11395
11546
  ) : Promise.resolve();
11396
- return e.tagName === "FORM" && (C = C.then(() => {
11547
+ return e.tagName === "FORM" && ($ = $.then(() => {
11397
11548
  if (i.wasResetAfter(p))
11398
11549
  return;
11399
11550
  const W = i.getRawBindingData() ?? E;
11400
- return N.syncValues(
11551
+ return F.syncValues(
11401
11552
  i,
11402
- N.resolveSyncValues(i, W),
11553
+ F.resolveSyncValues(i, W),
11403
11554
  !1,
11404
11555
  u
11405
11556
  );
11406
- })), C = C.then(
11407
- () => N.syncAncestorArgForms(i, p, u)
11408
- ), C = C.then(() => f.evaluateAll(i, n)), C = C.then(
11557
+ })), $ = $.then(
11558
+ () => F.syncAncestorArgForms(i, p, u, g)
11559
+ ), $ = $.then(() => h.evaluateAll(i, n)), $ = $.then(
11409
11560
  () => T.retryUnappliedValueWrites(e, p)
11410
- ), C = C.then(
11411
- () => f.reevaluateReactiveSpecialAttributes(i, n)
11412
- ), C.then(
11561
+ ), $ = $.then(
11562
+ () => h.reevaluateReactiveSpecialAttributes(i, n)
11563
+ ), $.then(
11413
11564
  () => i.markBindingWorkEnd(),
11414
11565
  (W) => {
11415
11566
  throw i.markBindingWorkEnd(), W;
@@ -11452,14 +11603,14 @@ const f = class f {
11452
11603
  * @returns 適用を許した経路だけが `next` の値になったバインドデータ
11453
11604
  */
11454
11605
  static resolveByPathAuthority(e, t, r, i) {
11455
- const n = f.mergePathAuthority(
11606
+ const n = h.mergePathAuthority(
11456
11607
  e,
11457
11608
  t ?? {},
11458
11609
  r,
11459
11610
  i,
11460
11611
  ""
11461
11612
  );
11462
- return n === f.ABSENT_PATH ? r : n;
11613
+ return n === h.ABSENT_PATH ? r : n;
11463
11614
  }
11464
11615
  /**
11465
11616
  * 経路をたどりながら、変化した葉ごとに適用可否を判定します。
@@ -11472,7 +11623,7 @@ const f = class f {
11472
11623
  * @returns 採用した値。その経路を持たせない場合は `ABSENT_PATH`
11473
11624
  */
11474
11625
  static mergePathAuthority(e, t, r, i, n) {
11475
- if (f.isPlainRecord(t) && f.isPlainRecord(r)) {
11626
+ if (h.isPlainRecord(t) && h.isPlainRecord(r)) {
11476
11627
  const u = t, d = r, p = {};
11477
11628
  let g = Object.keys(u).some(
11478
11629
  (A) => !Object.prototype.hasOwnProperty.call(d, A)
@@ -11482,21 +11633,21 @@ const f = class f {
11482
11633
  ...Object.keys(d)
11483
11634
  ]);
11484
11635
  for (const A of E) {
11485
- const I = n === "" ? A : `${n}.${A}`, C = f.mergePathAuthority(
11636
+ const I = n === "" ? A : `${n}.${A}`, $ = h.mergePathAuthority(
11486
11637
  e,
11487
- Object.prototype.hasOwnProperty.call(u, A) ? u[A] : f.ABSENT_PATH,
11488
- Object.prototype.hasOwnProperty.call(d, A) ? d[A] : f.ABSENT_PATH,
11638
+ Object.prototype.hasOwnProperty.call(u, A) ? u[A] : h.ABSENT_PATH,
11639
+ Object.prototype.hasOwnProperty.call(d, A) ? d[A] : h.ABSENT_PATH,
11489
11640
  i,
11490
11641
  I
11491
11642
  );
11492
- C !== f.ABSENT_PATH && (p[A] = C), C !== (Object.prototype.hasOwnProperty.call(d, A) ? d[A] : f.ABSENT_PATH) && (g = !0);
11643
+ $ !== h.ABSENT_PATH && (p[A] = $), $ !== (Object.prototype.hasOwnProperty.call(d, A) ? d[A] : h.ABSENT_PATH) && (g = !0);
11493
11644
  }
11494
11645
  return g ? p : d;
11495
11646
  }
11496
- const s = f.resolveArrayPairing(e, t, r, n);
11647
+ const s = h.resolveArrayPairing(e, t, r, n);
11497
11648
  if (s !== null) {
11498
11649
  const u = t, d = r, p = d.map(
11499
- (g, E) => f.mergePathAuthority(
11650
+ (g, E) => h.mergePathAuthority(
11500
11651
  e,
11501
11652
  u[E],
11502
11653
  g,
@@ -11506,7 +11657,7 @@ const f = class f {
11506
11657
  );
11507
11658
  return p.some((g, E) => g !== d[E]) ? p : d;
11508
11659
  }
11509
- if (f.isSameBindingValue(t, r))
11660
+ if (h.isSameBindingValue(t, r))
11510
11661
  return r;
11511
11662
  const a = i.editedPaths?.get(n), o = a === void 0 ? i.kind : "edit", c = {
11512
11663
  sequence: a ?? i.sequence,
@@ -11532,14 +11683,14 @@ const f = class f {
11532
11683
  static resolveArrayPairing(e, t, r, i) {
11533
11684
  if (!Array.isArray(t) || !Array.isArray(r) || t.length !== r.length || r.length === 0)
11534
11685
  return null;
11535
- const n = r.some((o) => f.isPlainRecord(o)) ? f.resolveEachKeyArg(e, i) : null, s = t.map(
11536
- (o, c) => f.createListKey(
11686
+ const n = r.some((o) => h.isPlainRecord(o)) ? h.resolveEachKeyArg(e, i) : null, s = t.map(
11687
+ (o, c) => h.createListKey(
11537
11688
  o,
11538
11689
  n,
11539
11690
  c
11540
11691
  )
11541
11692
  ), a = r.map(
11542
- (o, c) => f.createListKey(
11693
+ (o, c) => h.createListKey(
11543
11694
  o,
11544
11695
  n,
11545
11696
  c
@@ -11563,7 +11714,7 @@ const f = class f {
11563
11714
  static resolveEachKeyArg(e, t) {
11564
11715
  const r = `${l.prefix}each`, i = e.getTarget(), n = t.replace(/\[[^\]]*\]/g, ""), s = i.querySelectorAll(`[${r}]`);
11565
11716
  for (const a of Array.from(s)) {
11566
- const o = f.resolveEachDeclarationPath(a, i);
11717
+ const o = h.resolveEachDeclarationPath(a, i);
11567
11718
  if (o === null || o !== n)
11568
11719
  continue;
11569
11720
  const c = a.getAttribute(`${r}-key`);
@@ -11632,7 +11783,7 @@ const f = class f {
11632
11783
  static isSameBindingValue(e, t) {
11633
11784
  if (e === t)
11634
11785
  return !0;
11635
- if (e === f.ABSENT_PATH || t === f.ABSENT_PATH)
11786
+ if (e === h.ABSENT_PATH || t === h.ABSENT_PATH)
11636
11787
  return !1;
11637
11788
  try {
11638
11789
  return JSON.stringify(e) === JSON.stringify(t);
@@ -11677,8 +11828,8 @@ const f = class f {
11677
11828
  * @return 解決済みスコープと各キーの由来情報
11678
11829
  */
11679
11830
  static dumpScope(e) {
11680
- const t = f.collectScope(e);
11681
- return q.isEnabled() && m.info("[Haori]", "scope dump for", e, t), t;
11831
+ const t = h.collectScope(e);
11832
+ return V.isEnabled() && m.info("[Haori]", "scope dump for", e, t), t;
11682
11833
  }
11683
11834
  /**
11684
11835
  * スコープの解決結果と由来を収集します。
@@ -11695,7 +11846,7 @@ const f = class f {
11695
11846
  if (!t)
11696
11847
  return { resolved: {}, sources: {} };
11697
11848
  const r = t.getBindingData(), i = {}, n = (c) => {
11698
- const u = c.getTarget(), d = f.resolveElementId(u);
11849
+ const u = c.getTarget(), d = h.resolveElementId(u);
11699
11850
  return d !== "" ? `#${d}` : u.tagName.toLowerCase();
11700
11851
  }, s = (c, u, d, p) => {
11701
11852
  if (c)
@@ -11746,7 +11897,7 @@ const f = class f {
11746
11897
  if (n) {
11747
11898
  if (n.getParent() === r)
11748
11899
  return;
11749
- r.insertBefore(n, i), n instanceof T ? f.scan(n.getTarget()) : n instanceof re && f.evaluateText(n);
11900
+ r.insertBefore(n, i), n instanceof T ? h.scan(n.getTarget()) : n instanceof re && h.evaluateText(n);
11750
11901
  }
11751
11902
  }
11752
11903
  /**
@@ -11787,23 +11938,27 @@ const f = class f {
11787
11938
  return Promise.resolve();
11788
11939
  const i = [];
11789
11940
  i.push(r.setValue(t));
11790
- const n = f.getFormFragment(r);
11941
+ const n = h.getFormFragment(r);
11791
11942
  if (n) {
11792
- const s = N.getValues(n), a = n.getAttribute(`${l.prefix}form-arg`), o = n.getRawBindingData();
11943
+ const s = F.getValues(n), a = n.getAttribute(`${l.prefix}form-arg`), o = n.getRawBindingData();
11793
11944
  let c;
11794
11945
  if (a) {
11795
11946
  c = { ...o ?? {} };
11796
- const u = String(a), d = N.resolveAncestorArgOwner(n, u);
11797
- c[u] = N.mergeCollectedValues(
11947
+ const u = String(a), d = F.resolveAncestorArgOwner(n, u);
11948
+ c[u] = F.mergeCollectedValues(
11798
11949
  (d ? d.value : c[u]) ?? null,
11799
11950
  s
11800
11951
  );
11801
11952
  } else
11802
- c = N.mergeCollectedValues(o, s);
11953
+ c = F.mergeCollectedValues(
11954
+ o,
11955
+ s,
11956
+ F.ancestorBaseResolver(n)
11957
+ );
11803
11958
  i.push(
11804
11959
  // 値の設定に伴うコミットなので、値の供給ではない更新として扱う(権威を
11805
11960
  // 持たず、ユーザー編集の印も解除しない)。
11806
- f.setBindingData(n.getTarget(), c, {
11961
+ h.setBindingData(n.getTarget(), c, {
11807
11962
  kind: "nonSupply",
11808
11963
  sequence: T.nextSequence()
11809
11964
  })
@@ -11822,7 +11977,7 @@ const f = class f {
11822
11977
  if (e.getTarget() instanceof HTMLFormElement)
11823
11978
  return e;
11824
11979
  const t = e.getParent();
11825
- return t ? f.getFormFragment(t) : null;
11980
+ return t ? h.getFormFragment(t) : null;
11826
11981
  }
11827
11982
  /**
11828
11983
  * フラグメントとその子要素を評価します。
@@ -11833,21 +11988,21 @@ const f = class f {
11833
11988
  static evaluateAll(e, t = /* @__PURE__ */ new Set()) {
11834
11989
  if (t.has(e))
11835
11990
  return Promise.resolve();
11836
- let r = f.reevaluateInterpolatedAttributes(e);
11991
+ let r = h.reevaluateInterpolatedAttributes(e);
11837
11992
  const i = e.hasAttribute(`${l.prefix}derive`), n = e.hasAttribute(`${l.prefix}if`), s = e.hasAttribute(`${l.prefix}each`), a = e.getRawAttribute(`${l.prefix}derive`), o = e.getRawAttribute(`${l.prefix}derive-name`);
11838
11993
  let c = !1, u = !1, d = null;
11839
11994
  if (!i && e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), !i && e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), i) {
11840
- const p = f.createDeriveInputSignature(
11995
+ const p = h.createDeriveInputSignature(
11841
11996
  e,
11842
11997
  a,
11843
11998
  o
11844
11999
  );
11845
12000
  p === null ? (e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), r = r.then(
11846
- () => f.evaluateDerive(e, a, o).then(
12001
+ () => h.evaluateDerive(e, a, o).then(
11847
12002
  () => {
11848
12003
  }
11849
12004
  )
11850
- )) : e.getDeriveInputSignature() !== p && (r = r.then(() => f.evaluateDerive(
12005
+ )) : e.getDeriveInputSignature() !== p && (r = r.then(() => h.evaluateDerive(
11851
12006
  e,
11852
12007
  a,
11853
12008
  o
@@ -11855,16 +12010,16 @@ const f = class f {
11855
12010
  e.setDeriveInputSignature(p);
11856
12011
  })));
11857
12012
  }
11858
- return n && (r = r.then(() => f.evaluateIf(e))), s ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => f.evaluateEachFixedChildren(e)).then(() => f.evaluateEach(e))) : n ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => {
12013
+ return n && (r = r.then(() => h.evaluateIf(e))), s ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => h.evaluateEachFixedChildren(e)).then(() => h.evaluateEach(e))) : n ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => {
11859
12014
  })) : (i && (r = r.then(() => {
11860
- if (!f.canSkipStableDerivedSubtree(e)) {
11861
- e.setDeriveSubtreeSignature(null), f.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
12015
+ if (!h.canSkipStableDerivedSubtree(e)) {
12016
+ e.setDeriveSubtreeSignature(null), h.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
11862
12017
  return;
11863
12018
  }
11864
- d = f.createDescendantBindingSignature(
12019
+ d = h.createDescendantBindingSignature(
11865
12020
  e,
11866
12021
  "evaluateAll"
11867
- ), u = !0, c = e.getDeriveSubtreeSignature() !== null && e.getDeriveSubtreeSignature() === d, f.logDerivedSubtreeProfileSnapshot(
12022
+ ), u = !0, c = e.getDeriveSubtreeSignature() !== null && e.getDeriveSubtreeSignature() === d, h.logDerivedSubtreeProfileSnapshot(
11868
12023
  e,
11869
12024
  c ? "skip-hit" : "skip-miss"
11870
12025
  );
@@ -11874,10 +12029,10 @@ const f = class f {
11874
12029
  const p = [];
11875
12030
  return e.getChildren().forEach((g) => {
11876
12031
  if (g instanceof T) {
11877
- if (f.canSkipUnchangedNestedEach(g))
12032
+ if (h.canSkipUnchangedNestedEach(g))
11878
12033
  return;
11879
- p.push(f.evaluateAll(g, t));
11880
- } else g instanceof re && p.push(f.evaluateText(g));
12034
+ p.push(h.evaluateAll(g, t));
12035
+ } else g instanceof re && p.push(h.evaluateText(g));
11881
12036
  }), Promise.all(p).then(() => {
11882
12037
  });
11883
12038
  }).then(() => {
@@ -11909,7 +12064,7 @@ const f = class f {
11909
12064
  const a = {
11910
12065
  [n]: s.value
11911
12066
  };
11912
- return f.createBindingSignature(i) === f.createBindingSignature(a) ? Promise.resolve(!1) : (e.setDerivedBindingData(a), Promise.resolve(!0));
12067
+ return h.createBindingSignature(i) === h.createBindingSignature(a) ? Promise.resolve(!1) : (e.setDerivedBindingData(a), Promise.resolve(!0));
11913
12068
  }
11914
12069
  /**
11915
12070
  * テキストフラグメントを評価します。
@@ -11955,7 +12110,7 @@ const f = class f {
11955
12110
  );
11956
12111
  return;
11957
12112
  }
11958
- const { sources: r } = f.collectScope(e.getTarget()), i = /* @__PURE__ */ new Set(), n = t.match(/[A-Za-z_$][\w$]*/g) ?? [];
12113
+ const { sources: r } = h.collectScope(e.getTarget()), i = /* @__PURE__ */ new Set(), n = t.match(/[A-Za-z_$][\w$]*/g) ?? [];
11959
12114
  let s = 0;
11960
12115
  n.forEach((o) => {
11961
12116
  const c = t.indexOf(o, s);
@@ -12001,7 +12156,7 @@ const f = class f {
12001
12156
  */
12002
12157
  static hasEachFixedChildren(e) {
12003
12158
  return e.getChildren().some(
12004
- (t) => t instanceof T && f.isEachFixedChild(t)
12159
+ (t) => t instanceof T && h.isEachFixedChild(t)
12005
12160
  );
12006
12161
  }
12007
12162
  /**
@@ -12023,7 +12178,7 @@ const f = class f {
12023
12178
  static evaluateEachFixedChildren(e) {
12024
12179
  const t = [];
12025
12180
  return e.getChildren().forEach((r) => {
12026
- r instanceof T ? f.isEachFixedChild(r) && t.push(f.evaluateAll(r)) : r instanceof re && t.push(f.evaluateText(r));
12181
+ r instanceof T ? h.isEachFixedChild(r) && t.push(h.evaluateAll(r)) : r instanceof re && t.push(h.evaluateText(r));
12027
12182
  }), Promise.all(t).then(() => {
12028
12183
  });
12029
12184
  }
@@ -12037,10 +12192,10 @@ const f = class f {
12037
12192
  */
12038
12193
  static evaluateIf(e) {
12039
12194
  const t = [], r = e.getAttribute(`${l.prefix}if`);
12040
- if (f.isHiddenIfCondition(r))
12041
- q.isEnabled() && e.isVisible() && f.logFalsyIfDiagnostics(e), t.push(
12195
+ if (h.isHiddenIfCondition(r))
12196
+ V.isEnabled() && e.isVisible() && h.logFalsyIfDiagnostics(e), t.push(
12042
12197
  e.hide().then(() => {
12043
- B.hide(e.getTarget());
12198
+ O.hide(e.getTarget());
12044
12199
  })
12045
12200
  );
12046
12201
  else {
@@ -12048,15 +12203,15 @@ const f = class f {
12048
12203
  const i = e.isVisible(), n = [], s = e.hasAttribute(`${l.prefix}each`);
12049
12204
  e.getChildren().forEach((a) => {
12050
12205
  if (a instanceof T) {
12051
- if (s && !f.isEachFixedChild(a))
12206
+ if (s && !h.isEachFixedChild(a))
12052
12207
  return;
12053
12208
  n.push(
12054
- a.isMounted() ? f.evaluateAll(a) : f.scan(a.getTarget())
12209
+ a.isMounted() ? h.evaluateAll(a) : h.scan(a.getTarget())
12055
12210
  );
12056
- } else a instanceof re && n.push(f.evaluateText(a));
12211
+ } else a instanceof re && n.push(h.evaluateText(a));
12057
12212
  }), t.push(
12058
12213
  e.show().then(() => {
12059
- B.show(e.getTarget()), i || (f.triggerLoadOnShow(e), se.refreshSubtree(e.getTarget()));
12214
+ O.show(e.getTarget()), i || (h.triggerLoadOnShow(e), se.refreshSubtree(e.getTarget()));
12060
12215
  })
12061
12216
  ), t.push(Promise.all(n).then(() => {
12062
12217
  }));
@@ -12086,8 +12241,8 @@ const f = class f {
12086
12241
  * @return 再入制御状態
12087
12242
  */
12088
12243
  static getEachUpdateState(e) {
12089
- let t = f.EACH_UPDATE_STATES.get(e);
12090
- return t || (t = { running: !1, rerunRequested: !1, settled: null }, f.EACH_UPDATE_STATES.set(e, t)), t;
12244
+ let t = h.EACH_UPDATE_STATES.get(e);
12245
+ return t || (t = { running: !1, rerunRequested: !1, settled: null }, h.EACH_UPDATE_STATES.set(e, t)), t;
12091
12246
  }
12092
12247
  /**
12093
12248
  * each要素を評価します。
@@ -12103,13 +12258,13 @@ const f = class f {
12103
12258
  * @return 差分更新(再実行を含む)の完了 Promise
12104
12259
  */
12105
12260
  static evaluateEach(e) {
12106
- if (q.isEnabled() && ee.recordRowScopeIdentifiers([
12107
- f.getRowScopeName(e, "each-arg"),
12108
- f.getRowScopeName(e, "each-index")
12109
- ]), e.isMounted() || f.syncMountedState(e), !e.isVisible() || !e.isMounted())
12261
+ if (V.isEnabled() && ee.recordRowScopeIdentifiers([
12262
+ h.getRowScopeName(e, "each-arg"),
12263
+ h.getRowScopeName(e, "each-index")
12264
+ ]), e.isMounted() || h.syncMountedState(e), !e.isVisible() || !e.isMounted())
12110
12265
  return e.getTarget().removeAttribute(`${l.prefix}each-done`), Promise.resolve();
12111
- const t = f.getEachUpdateState(e);
12112
- return t.running ? (t.rerunRequested = !0, t.settled ?? Promise.resolve()) : f.runEachUpdateLoop(e, t);
12266
+ const t = h.getEachUpdateState(e);
12267
+ return t.running ? (t.rerunRequested = !0, t.settled ?? Promise.resolve()) : h.runEachUpdateLoop(e, t);
12113
12268
  }
12114
12269
  /**
12115
12270
  * `data-each` が行スコープへ公開する名前を返します。
@@ -12134,7 +12289,7 @@ const f = class f {
12134
12289
  * @returns 差分更新が実行中なら true
12135
12290
  */
12136
12291
  static isEachUpdateRunning(e) {
12137
- return f.getEachUpdateState(e).running;
12292
+ return h.getEachUpdateState(e).running;
12138
12293
  }
12139
12294
  /**
12140
12295
  * data-each の差分更新を、再評価要求が無くなるまで直列に繰り返し実行します。
@@ -12150,14 +12305,14 @@ const f = class f {
12150
12305
  const r = (async () => {
12151
12306
  try {
12152
12307
  do
12153
- t.rerunRequested = !1, await f.performEachUpdate(e);
12308
+ t.rerunRequested = !1, await h.performEachUpdate(e);
12154
12309
  while (t.rerunRequested);
12155
12310
  const i = e.getTarget();
12156
- i.setAttribute(`${l.prefix}each-done`, ""), se.refreshSubtree(i), f.runEachRenderedScript(i);
12311
+ i.setAttribute(`${l.prefix}each-done`, ""), se.refreshSubtree(i), h.runEachRenderedScript(i);
12157
12312
  } finally {
12158
12313
  t.running = !1, t.settled = null;
12159
12314
  }
12160
- f.runEachRenderedChange(e);
12315
+ h.runEachRenderedChange(e);
12161
12316
  })();
12162
12317
  return t.settled = r, r;
12163
12318
  }
@@ -12227,14 +12382,14 @@ ${r}
12227
12382
  return;
12228
12383
  const i = String(r.getAttribute(t) ?? "").trim().toLowerCase();
12229
12384
  let n = !1;
12230
- if (i === "always" ? n = !0 : i !== "" && i !== "once" && (f.EACH_RENDERED_CHANGE_WARNED.has(r) || (f.EACH_RENDERED_CHANGE_WARNED.add(r), m.warn(
12385
+ if (i === "always" ? n = !0 : i !== "" && i !== "once" && (h.EACH_RENDERED_CHANGE_WARNED.has(r) || (h.EACH_RENDERED_CHANGE_WARNED.add(r), m.warn(
12231
12386
  "[Haori]",
12232
12387
  `Invalid ${t} value: "${i}". Use "once" (default) or "always".`
12233
- ))), f.countEachRenderedRows(e) !== 0) {
12388
+ ))), h.countEachRenderedRows(e) !== 0) {
12234
12389
  if (!n) {
12235
- if (f.EACH_RENDERED_CHANGE_FIRED.has(r))
12390
+ if (h.EACH_RENDERED_CHANGE_FIRED.has(r))
12236
12391
  return;
12237
- f.EACH_RENDERED_CHANGE_FIRED.add(r);
12392
+ h.EACH_RENDERED_CHANGE_FIRED.add(r);
12238
12393
  }
12239
12394
  try {
12240
12395
  r.dispatchEvent(new Event("change", { bubbles: !0 }));
@@ -12266,11 +12421,11 @@ ${r}
12266
12421
  * @return 差分更新完了の Promise
12267
12422
  */
12268
12423
  static performEachUpdate(e) {
12269
- const t = f.resolveEachItems(e);
12424
+ const t = h.resolveEachItems(e);
12270
12425
  if (t === null)
12271
12426
  return Promise.reject(new Error("Invalid each attribute."));
12272
12427
  let r = e.getTemplate();
12273
- const i = e.getAttribute(`${l.prefix}each-key`), n = f.createBindingSignature({
12428
+ const i = e.getAttribute(`${l.prefix}each-key`), n = h.createBindingSignature({
12274
12429
  key: i ? String(i) : null,
12275
12430
  items: t
12276
12431
  });
@@ -12280,18 +12435,18 @@ ${r}
12280
12435
  if (!s && a instanceof T) {
12281
12436
  if (a.hasAttribute(`${l.prefix}each-before`) || a.hasAttribute(`${l.prefix}each-after`))
12282
12437
  return;
12283
- r = a.clone(), f.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0, e.removeChild(a);
12438
+ r = a.clone(), h.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0, e.removeChild(a);
12284
12439
  const o = a.getTarget();
12285
12440
  o.parentNode && o.parentNode.removeChild(o), a.setMounted(!1);
12286
12441
  }
12287
- }), s && f.warnExtraEachChildren(e), !s) {
12442
+ }), s && h.warnExtraEachChildren(e), !s) {
12288
12443
  const a = e.getTarget();
12289
12444
  Array.from(a.children).filter(
12290
12445
  (c) => !c.hasAttribute(`${l.prefix}each-before`) && !c.hasAttribute(`${l.prefix}each-after`)
12291
12446
  ).forEach((c) => {
12292
12447
  if (!s) {
12293
12448
  const d = M.get(c);
12294
- d instanceof T && (r = d.clone(), f.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
12449
+ d instanceof T && (r = d.clone(), h.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
12295
12450
  }
12296
12451
  const u = M.get(c);
12297
12452
  u instanceof T && e.getChildren().includes(u) && (e.removeChild(u), u.setMounted(!1)), c.parentNode && c.parentNode.removeChild(c);
@@ -12301,7 +12456,7 @@ ${r}
12301
12456
  e.setEachInputSignature(n);
12302
12457
  });
12303
12458
  }
12304
- return e.getEachInputSignature() === n ? f.reevaluateEachRows(e) : this.updateDiff(e, t).then(() => {
12459
+ return e.getEachInputSignature() === n ? h.reevaluateEachRows(e) : this.updateDiff(e, t).then(() => {
12305
12460
  e.setEachInputSignature(n);
12306
12461
  });
12307
12462
  }
@@ -12315,12 +12470,12 @@ ${r}
12315
12470
  * @returns 再評価完了の Promise
12316
12471
  */
12317
12472
  static reevaluateEachRows(e) {
12318
- if (f.isRowLocalEachTemplate(e))
12473
+ if (h.isRowLocalEachTemplate(e))
12319
12474
  return Promise.resolve();
12320
12475
  const t = e.getChildElementFragments().filter(
12321
12476
  (r) => !r.hasAttribute(`${l.prefix}each-before`) && !r.hasAttribute(`${l.prefix}each-after`)
12322
12477
  );
12323
- return t.length === 0 ? Promise.resolve() : Promise.all(t.map((r) => f.evaluateAll(r))).then(
12478
+ return t.length === 0 ? Promise.resolve() : Promise.all(t.map((r) => h.evaluateAll(r))).then(
12324
12479
  () => {
12325
12480
  }
12326
12481
  );
@@ -12346,12 +12501,12 @@ ${r}
12346
12501
  if (!e.hasAttribute(`${l.prefix}each`) || e.getEachInputSignature() === null)
12347
12502
  return !1;
12348
12503
  const t = e.getParent();
12349
- if (t?.closestByAttribute(`${l.prefix}derive`) || t?.closestByAttribute(`${l.prefix}derive-name`) || t?.closestByAttribute(`${l.prefix}if`) || t?.closestByAttribute(`${l.prefix}fetch`) || t?.closestByAttribute(`${l.prefix}import`) || f.hasNonEachDynamicElementState(e) || !f.isRowLocalEachTemplate(e) || f.hasEachFixedChildren(e))
12504
+ if (t?.closestByAttribute(`${l.prefix}derive`) || t?.closestByAttribute(`${l.prefix}derive-name`) || t?.closestByAttribute(`${l.prefix}if`) || t?.closestByAttribute(`${l.prefix}fetch`) || t?.closestByAttribute(`${l.prefix}import`) || h.hasNonEachDynamicElementState(e) || !h.isRowLocalEachTemplate(e) || h.hasEachFixedChildren(e))
12350
12505
  return !1;
12351
- const r = f.resolveEachItems(e);
12506
+ const r = h.resolveEachItems(e);
12352
12507
  if (r === null)
12353
12508
  return !1;
12354
- const i = e.getAttribute(`${l.prefix}each-key`), n = f.createBindingSignature({
12509
+ const i = e.getAttribute(`${l.prefix}each-key`), n = h.createBindingSignature({
12355
12510
  key: i ? String(i) : null,
12356
12511
  items: r
12357
12512
  });
@@ -12385,7 +12540,7 @@ ${r}
12385
12540
  return e.setRowLocalTemplate(!1), !1;
12386
12541
  const n = /* @__PURE__ */ new Set([String(i)]), s = e.getAttribute(`${l.prefix}each-index`);
12387
12542
  s && n.add(String(s));
12388
- const a = f.isRowLocalSubtree(r, n);
12543
+ const a = h.isRowLocalSubtree(r, n);
12389
12544
  return e.setRowLocalTemplate(a), a;
12390
12545
  }
12391
12546
  /**
@@ -12399,8 +12554,8 @@ ${r}
12399
12554
  for (const i of e.getAttributeNames()) {
12400
12555
  const n = e.getRawAttribute(i), s = typeof n == "string" ? n : "";
12401
12556
  if (s.includes("{{")) {
12402
- if (!f.areExpressionsRowLocal(
12403
- f.extractInterpolations(s),
12557
+ if (!h.areExpressionsRowLocal(
12558
+ h.extractInterpolations(s),
12404
12559
  t
12405
12560
  ))
12406
12561
  return !1;
@@ -12409,15 +12564,15 @@ ${r}
12409
12564
  if (!i.startsWith(l.prefix))
12410
12565
  continue;
12411
12566
  const a = i.slice(l.prefix.length);
12412
- if (f.ROW_LOCAL_EXPRESSION_ATTRIBUTES.has(a)) {
12413
- if (!f.areExpressionsRowLocal([s], t))
12567
+ if (h.ROW_LOCAL_EXPRESSION_ATTRIBUTES.has(a)) {
12568
+ if (!h.areExpressionsRowLocal([s], t))
12414
12569
  return !1;
12415
12570
  continue;
12416
12571
  }
12417
- if (f.ROW_LOCAL_STATIC_ATTRIBUTES.has(a))
12572
+ if (h.ROW_LOCAL_STATIC_ATTRIBUTES.has(a))
12418
12573
  continue;
12419
12574
  const o = a.indexOf("-");
12420
- if (!(o !== -1 && f.ROW_LOCAL_ROW_OPERATIONS.has(a.slice(o + 1))))
12575
+ if (!(o !== -1 && h.ROW_LOCAL_ROW_OPERATIONS.has(a.slice(o + 1))))
12421
12576
  return !1;
12422
12577
  }
12423
12578
  let r = t;
@@ -12432,12 +12587,12 @@ ${r}
12432
12587
  }
12433
12588
  for (const i of e.getChildren())
12434
12589
  if (i instanceof T) {
12435
- if (!f.isRowLocalSubtree(i, r))
12590
+ if (!h.isRowLocalSubtree(i, r))
12436
12591
  return !1;
12437
12592
  } else if (i instanceof re) {
12438
12593
  const n = i.getRawText();
12439
- if (n.includes("{{") && !f.areExpressionsRowLocal(
12440
- f.extractInterpolations(n),
12594
+ if (n.includes("{{") && !h.areExpressionsRowLocal(
12595
+ h.extractInterpolations(n),
12441
12596
  t
12442
12597
  ))
12443
12598
  return !1;
@@ -12485,7 +12640,7 @@ ${r}
12485
12640
  * @returns 省略可能なら true
12486
12641
  */
12487
12642
  static canSkipStableDerivedSubtree(e) {
12488
- return !e.hasAttribute(`${l.prefix}derive`) || e.hasAttribute(`${l.prefix}if`) || e.hasAttribute(`${l.prefix}each`) || e.hasAttribute(`${l.prefix}fetch`) || e.hasAttribute(`${l.prefix}import`) ? !1 : !f.hasDisallowedDerivedSubtreeDescendant(e);
12643
+ return !e.hasAttribute(`${l.prefix}derive`) || e.hasAttribute(`${l.prefix}if`) || e.hasAttribute(`${l.prefix}each`) || e.hasAttribute(`${l.prefix}fetch`) || e.hasAttribute(`${l.prefix}import`) ? !1 : !h.hasDisallowedDerivedSubtreeDescendant(e);
12489
12644
  }
12490
12645
  /**
12491
12646
  * data-derive subtree skip の初期 PoC で扱わない子孫要素を含むかを返します。
@@ -12494,7 +12649,7 @@ ${r}
12494
12649
  * @returns 含むなら true
12495
12650
  */
12496
12651
  static hasDisallowedDerivedSubtreeDescendant(e) {
12497
- return e.getChildren().some((t) => t instanceof T ? t.hasAttribute(`${l.prefix}derive`) || t.hasAttribute(`${l.prefix}derive-name`) || t.hasAttribute(`${l.prefix}fetch`) || t.hasAttribute(`${l.prefix}import`) ? !0 : f.hasDisallowedDerivedSubtreeDescendant(t) : !1);
12652
+ return e.getChildren().some((t) => t instanceof T ? t.hasAttribute(`${l.prefix}derive`) || t.hasAttribute(`${l.prefix}derive-name`) || t.hasAttribute(`${l.prefix}fetch`) || t.hasAttribute(`${l.prefix}import`) ? !0 : h.hasDisallowedDerivedSubtreeDescendant(t) : !1);
12498
12653
  }
12499
12654
  /**
12500
12655
  * data-derive host が子孫要素へ公開している binding の署名を返します。
@@ -12503,7 +12658,7 @@ ${r}
12503
12658
  * @returns binding 署名
12504
12659
  */
12505
12660
  static createDescendantBindingSignature(e, t) {
12506
- return f.recordDerivedSubtreeSignatureComputation(e, t), f.createBindingSignature(e.getDescendantBindingData());
12661
+ return h.recordDerivedSubtreeSignatureComputation(e, t), h.createBindingSignature(e.getDescendantBindingData());
12507
12662
  }
12508
12663
  /**
12509
12664
  * data-derive 実行前の入力署名を返します。
@@ -12515,7 +12670,7 @@ ${r}
12515
12670
  */
12516
12671
  static createDeriveInputSignature(e, t, r) {
12517
12672
  const i = typeof r == "string" ? r.trim() : "";
12518
- return !t || i === "" ? null : f.createBindingSignature({
12673
+ return !t || i === "" ? null : h.createBindingSignature({
12519
12674
  expression: t,
12520
12675
  name: i,
12521
12676
  scope: e.getBindingData()
@@ -12527,13 +12682,13 @@ ${r}
12527
12682
  * @param fragment 対象フラグメント
12528
12683
  */
12529
12684
  static refreshDerivedSubtreeSignature(e) {
12530
- if (!f.canSkipStableDerivedSubtree(e)) {
12531
- e.setDeriveSubtreeSignature(null), f.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
12685
+ if (!h.canSkipStableDerivedSubtree(e)) {
12686
+ e.setDeriveSubtreeSignature(null), h.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
12532
12687
  return;
12533
12688
  }
12534
12689
  e.setDeriveSubtreeSignature(
12535
- f.createDescendantBindingSignature(e, "refresh")
12536
- ), f.logDerivedSubtreeProfileSnapshot(e, "refresh");
12690
+ h.createDescendantBindingSignature(e, "refresh")
12691
+ ), h.logDerivedSubtreeProfileSnapshot(e, "refresh");
12537
12692
  }
12538
12693
  /**
12539
12694
  * data-derive subtree skip のプロファイルを取得または初期化します。
@@ -12542,13 +12697,13 @@ ${r}
12542
12697
  * @returns プロファイル
12543
12698
  */
12544
12699
  static getOrCreateDerivedSubtreeProfile(e) {
12545
- if (!q.isEnabled() || !e.hasAttribute(`${l.prefix}derive`))
12700
+ if (!V.isEnabled() || !e.hasAttribute(`${l.prefix}derive`))
12546
12701
  return null;
12547
- const t = f.DERIVE_SUBTREE_PROFILES.get(e);
12702
+ const t = h.DERIVE_SUBTREE_PROFILES.get(e);
12548
12703
  if (t)
12549
12704
  return t;
12550
12705
  const r = {
12551
- hostId: f.createDerivedSubtreeHostId(e),
12706
+ hostId: h.createDerivedSubtreeHostId(e),
12552
12707
  signatureComputeTotal: 0,
12553
12708
  signatureComputeFromEvaluateAll: 0,
12554
12709
  signatureComputeFromRefresh: 0,
@@ -12556,7 +12711,7 @@ ${r}
12556
12711
  skipMissCount: 0,
12557
12712
  skipIneligibleCount: 0
12558
12713
  };
12559
- return f.DERIVE_SUBTREE_PROFILES.set(e, r), r;
12714
+ return h.DERIVE_SUBTREE_PROFILES.set(e, r), r;
12560
12715
  }
12561
12716
  /**
12562
12717
  * 要素の `id` 属性を安全に取得します。
@@ -12587,7 +12742,7 @@ ${r}
12587
12742
  if (!(i instanceof HTMLElement))
12588
12743
  break;
12589
12744
  let n = i.tagName.toLowerCase();
12590
- const s = f.resolveElementId(i).trim();
12745
+ const s = h.resolveElementId(i).trim();
12591
12746
  if (s !== "") {
12592
12747
  n += `#${s}`, t.unshift(n);
12593
12748
  break;
@@ -12610,7 +12765,7 @@ ${r}
12610
12765
  * @param source 計算元
12611
12766
  */
12612
12767
  static recordDerivedSubtreeSignatureComputation(e, t) {
12613
- const r = f.getOrCreateDerivedSubtreeProfile(e);
12768
+ const r = h.getOrCreateDerivedSubtreeProfile(e);
12614
12769
  if (r !== null) {
12615
12770
  if (r.signatureComputeTotal += 1, t === "refresh") {
12616
12771
  r.signatureComputeFromRefresh += 1;
@@ -12626,7 +12781,7 @@ ${r}
12626
12781
  * @param reason ログ理由
12627
12782
  */
12628
12783
  static logDerivedSubtreeProfileSnapshot(e, t) {
12629
- const r = f.getOrCreateDerivedSubtreeProfile(e);
12784
+ const r = h.getOrCreateDerivedSubtreeProfile(e);
12630
12785
  r !== null && (t === "skip-hit" ? r.skipHitCount += 1 : t === "skip-miss" ? r.skipMissCount += 1 : t === "skip-ineligible" && (r.skipIneligibleCount += 1), m.info("[Haori][derive-profile]", {
12631
12786
  reason: t,
12632
12787
  hostId: r.hostId,
@@ -12669,7 +12824,7 @@ ${r}
12669
12824
  * @returns subtree 全体を省略可能なら true
12670
12825
  */
12671
12826
  static markFreshInitializationSkippable(e) {
12672
- const t = e.getAttributeNames().some((n) => f.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof T ? !f.markFreshInitializationSkippable(n) : n instanceof re ? n.hasDynamicContent() : !1), i = !t && !r;
12827
+ const t = e.getAttributeNames().some((n) => h.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof T ? !h.markFreshInitializationSkippable(n) : n instanceof re ? n.hasDynamicContent() : !1), i = !t && !r;
12673
12828
  return e.setFreshInitializationSkippable(i), i;
12674
12829
  }
12675
12830
  /**
@@ -12702,11 +12857,11 @@ ${r}
12702
12857
  let i = e.getAttribute(`${l.prefix}each-index`);
12703
12858
  i && (i = String(i));
12704
12859
  const n = e.getAttribute(`${l.prefix}each-key`), s = e.getAttribute(`${l.prefix}each-arg`), a = t.map(
12705
- (x, U) => f.createListKey(x, n ? String(n) : null, U)
12860
+ (x, U) => h.createListKey(x, n ? String(n) : null, U)
12706
12861
  ), o = new Set(a), c = /* @__PURE__ */ new Map();
12707
12862
  a.forEach((x) => {
12708
12863
  c.set(x, (c.get(x) ?? 0) + 1);
12709
- }), n && o.size !== a.length && f.warnDuplicateEachKey(String(n));
12864
+ }), n && o.size !== a.length && h.warnDuplicateEachKey(String(n));
12710
12865
  const u = [];
12711
12866
  let d = e.getChildren().filter((x) => x instanceof T).filter(
12712
12867
  (x) => !x.hasAttribute(`${l.prefix}each-before`) && !x.hasAttribute(`${l.prefix}each-after`)
@@ -12717,7 +12872,7 @@ ${r}
12717
12872
  if (R === 0) {
12718
12873
  g.add(x);
12719
12874
  const S = x.getListKey();
12720
- return S !== null && B.rowRemove(x.getTarget(), S, U), u.push(x.remove()), !1;
12875
+ return S !== null && O.rowRemove(x.getTarget(), S, U), u.push(x.remove()), !1;
12721
12876
  }
12722
12877
  return c.set(K, R - 1), !0;
12723
12878
  });
@@ -12729,7 +12884,7 @@ ${r}
12729
12884
  const K = A.get(U);
12730
12885
  K ? K.push(x) : A.set(U, [x]);
12731
12886
  });
12732
- const I = e.getChildElementFragments().filter((x) => !g.has(x)), C = I.filter(
12887
+ const I = e.getChildElementFragments().filter((x) => !g.has(x)), $ = I.filter(
12733
12888
  (x) => x.hasAttribute(`${l.prefix}each-before`)
12734
12889
  ).length;
12735
12890
  let W = Promise.resolve();
@@ -12739,9 +12894,9 @@ ${r}
12739
12894
  const H = A.get(x)?.shift();
12740
12895
  if (H) {
12741
12896
  S = H;
12742
- const O = C + U;
12897
+ const B = $ + U;
12743
12898
  W = W.then(
12744
- () => f.updateRowFragment(
12899
+ () => h.updateRowFragment(
12745
12900
  S,
12746
12901
  K,
12747
12902
  i,
@@ -12753,20 +12908,20 @@ ${r}
12753
12908
  // 再利用行も新しい並び順の位置へ移動する。移動しないと、配列を並べ替え
12754
12909
  // ただけの更新(data-each-key 指定時はキーが変わらないため全行が再利用
12755
12910
  // される)で DOM の順序が古いまま残る。
12756
- f.repositionEachRow(
12911
+ h.repositionEachRow(
12757
12912
  e,
12758
12913
  S,
12759
12914
  I,
12760
- O
12915
+ B
12761
12916
  ).then((ie) => {
12762
- if (ie !== null && B.rowMove(
12917
+ if (ie !== null && O.rowMove(
12763
12918
  S.getTarget(),
12764
12919
  x,
12765
- ie - C,
12920
+ ie - $,
12766
12921
  U
12767
- ), !(!te && f.isRowLocalEachTemplate(e)))
12768
- return f.evaluateAll(S).then(
12769
- () => f.applyRowFormValues(e, S, K)
12922
+ ), !(!te && h.isRowLocalEachTemplate(e)))
12923
+ return h.evaluateAll(S).then(
12924
+ () => h.applyRowFormValues(e, S, K)
12770
12925
  );
12771
12926
  })
12772
12927
  )
@@ -12774,9 +12929,9 @@ ${r}
12774
12929
  );
12775
12930
  } else {
12776
12931
  S = r.clone();
12777
- const O = C + U;
12932
+ const B = $ + U;
12778
12933
  W = W.then(
12779
- () => f.updateRowFragment(
12934
+ () => h.updateRowFragment(
12780
12935
  S,
12781
12936
  K,
12782
12937
  i,
@@ -12784,26 +12939,26 @@ ${r}
12784
12939
  s ? String(s) : null,
12785
12940
  x
12786
12941
  ).then(() => {
12787
- const te = I[O] ?? null;
12942
+ const te = I[B] ?? null;
12788
12943
  return e.insertBefore(S, te).then(() => {
12789
- I.splice(O, 0, S);
12790
- }).then(() => f.initializeFreshEachRow(S)).then(() => f.applyRowFormValues(e, S, K)).then(() => {
12791
- B.rowAdd(S.getTarget(), x, R, K);
12944
+ I.splice(B, 0, S);
12945
+ }).then(() => h.initializeFreshEachRow(S)).then(() => h.applyRowFormValues(e, S, K)).then(() => {
12946
+ O.rowAdd(S.getTarget(), x, R, K);
12792
12947
  });
12793
12948
  })
12794
12949
  );
12795
12950
  }
12796
12951
  }), Promise.all(u).then(() => W).then(() => {
12797
12952
  const x = a.filter(
12798
- (O) => O !== null
12953
+ (B) => B !== null
12799
12954
  ), U = E.filter(
12800
- (O) => O !== null
12801
- ), K = new Set(U), R = x.filter((O) => !K.has(O)), H = p.filter(
12802
- (O) => O !== null
12955
+ (B) => B !== null
12956
+ ), K = new Set(U), R = x.filter((B) => !K.has(B)), H = p.filter(
12957
+ (B) => B !== null
12803
12958
  ).filter(
12804
- (O) => !o.has(O)
12959
+ (B) => !o.has(B)
12805
12960
  );
12806
- B.eachUpdate(
12961
+ O.eachUpdate(
12807
12962
  e.getTarget(),
12808
12963
  R,
12809
12964
  H,
@@ -12858,7 +13013,7 @@ ${r}
12858
13013
  * @returns 戻り値はありません。
12859
13014
  */
12860
13015
  static warnDuplicateEachKey(e) {
12861
- !q.isEnabled() || f.WARNED_DUPLICATE_EACH_KEYS.has(e) || (f.WARNED_DUPLICATE_EACH_KEYS.add(e), m.warn(
13016
+ !V.isEnabled() || h.WARNED_DUPLICATE_EACH_KEYS.has(e) || (h.WARNED_DUPLICATE_EACH_KEYS.add(e), m.warn(
12862
13017
  "[Haori]",
12863
13018
  `${l.prefix}each-key="${e}" の値が配列の中で重複しています。行は出現順で対応付けますが、キーによる行の識別はできません。`
12864
13019
  ));
@@ -12910,7 +13065,7 @@ ${r}
12910
13065
  * @returns 反映完了の Promise
12911
13066
  */
12912
13067
  static applyRowFormValues(e, t, r) {
12913
- return !e.hasAttribute(`${l.prefix}form-list`) || !N.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : N.syncRowValues(t, r);
13068
+ return !e.hasAttribute(`${l.prefix}form-list`) || !F.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : F.syncRowValues(t, r);
12914
13069
  }
12915
13070
  /**
12916
13071
  * リスト比較用のキーを生成します。
@@ -12960,7 +13115,7 @@ ${r}
12960
13115
  `Primitive value requires '${l.prefix}each-arg' attribute: ${t}`
12961
13116
  ), Promise.resolve(!1);
12962
13117
  r && (a[r] = i);
12963
- const o = a, c = f.createBindingSignature({
13118
+ const o = a, c = h.createBindingSignature({
12964
13119
  listKey: s,
12965
13120
  bindingData: o
12966
13121
  });
@@ -12978,7 +13133,7 @@ ${r}
12978
13133
  const r = t.pop();
12979
13134
  if (r.getChildElementFragments().forEach((i) => {
12980
13135
  t.push(i);
12981
- }), r !== e && !r.isMounted() && f.hasMountSensitiveAttribute(r))
13136
+ }), r !== e && !r.isMounted() && h.hasMountSensitiveAttribute(r))
12982
13137
  return !0;
12983
13138
  }
12984
13139
  return !1;
@@ -13025,7 +13180,7 @@ ${r}
13025
13180
  if (t.has(e))
13026
13181
  return `[Circular:${t.get(e)}]`;
13027
13182
  const i = `array-${r.value}`;
13028
- return r.value += 1, t.set(e, i), `[${e.map((n) => f.createBindingSignature(n, t, r)).join(",")}]`;
13183
+ return r.value += 1, t.set(e, i), `[${e.map((n) => h.createBindingSignature(n, t, r)).join(",")}]`;
13029
13184
  }
13030
13185
  if (typeof e == "object") {
13031
13186
  if (t.has(e))
@@ -13034,7 +13189,7 @@ ${r}
13034
13189
  r.value += 1, t.set(e, i);
13035
13190
  const n = e;
13036
13191
  return `{${Object.keys(n).sort().map(
13037
- (s) => `${JSON.stringify(s)}:${f.createBindingSignature(
13192
+ (s) => `${JSON.stringify(s)}:${h.createBindingSignature(
13038
13193
  n[s],
13039
13194
  t,
13040
13195
  r
@@ -13050,11 +13205,11 @@ ${r}
13050
13205
  */
13051
13206
  static scheduleEvaluateAll(e) {
13052
13207
  setTimeout(() => {
13053
- f.evaluateAll(e);
13208
+ h.evaluateAll(e);
13054
13209
  }, 100);
13055
13210
  }
13056
13211
  };
13057
- f.ATTRIBUTE_ALIAS_SUFFIX = "attr-", f.PRIORITY_ATTRIBUTE_SUFFIXES = [
13212
+ h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
13058
13213
  "bind",
13059
13214
  // `store` は `bind`(既定値)の後、`url-param` の前に置く。URL クエリで明示
13060
13215
  // された値を保存済みの値より優先するため。
@@ -13064,7 +13219,7 @@ f.ATTRIBUTE_ALIAS_SUFFIX = "attr-", f.PRIORITY_ATTRIBUTE_SUFFIXES = [
13064
13219
  "derive",
13065
13220
  "if",
13066
13221
  "each"
13067
- ], f.DEFERRED_ATTRIBUTE_SUFFIXES = ["fetch"], f.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES = [
13222
+ ], h.DEFERRED_ATTRIBUTE_SUFFIXES = ["fetch"], h.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES = [
13068
13223
  "bind",
13069
13224
  "derive",
13070
13225
  "derive-name",
@@ -13077,7 +13232,7 @@ f.ATTRIBUTE_ALIAS_SUFFIX = "attr-", f.PRIORITY_ATTRIBUTE_SUFFIXES = [
13077
13232
  // 条件は評価結果を DOM 属性へ書かない(式は実行時に生値から評価する)。
13078
13233
  "validity",
13079
13234
  "validity-message"
13080
- ], f.ATTRIBUTE_PLACEHOLDER_REGEX = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/, f.ROW_LOCAL_EXPRESSION_ATTRIBUTES = /* @__PURE__ */ new Set(["each", "if", "derive"]), f.ROW_LOCAL_STATIC_ATTRIBUTES = /* @__PURE__ */ new Set([
13235
+ ], h.ATTRIBUTE_PLACEHOLDER_REGEX = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/, h.ROW_LOCAL_EXPRESSION_ATTRIBUTES = /* @__PURE__ */ new Set(["each", "if", "derive"]), h.ROW_LOCAL_STATIC_ATTRIBUTES = /* @__PURE__ */ new Set([
13081
13236
  "each-arg",
13082
13237
  "each-key",
13083
13238
  "each-index",
@@ -13097,8 +13252,8 @@ f.ATTRIBUTE_ALIAS_SUFFIX = "attr-", f.PRIORITY_ATTRIBUTE_SUFFIXES = [
13097
13252
  "store-type",
13098
13253
  "enhance",
13099
13254
  "enhance-new"
13100
- ]), f.ROW_LOCAL_ROW_OPERATIONS = /* @__PURE__ */ new Set(["row-add", "row-remove", "row-prev", "row-next"]), f.REACTIVE_FETCH_STATES = /* @__PURE__ */ new WeakMap(), f.REACTIVE_IMPORT_STATES = /* @__PURE__ */ new WeakMap(), f.DERIVE_SUBTREE_PROFILES = /* @__PURE__ */ new WeakMap(), f.EACH_UPDATE_STATES = /* @__PURE__ */ new WeakMap(), f.EACH_RENDERED_CHANGE_FIRED = /* @__PURE__ */ new WeakSet(), f.EACH_RENDERED_CHANGE_WARNED = /* @__PURE__ */ new WeakSet(), f.WARNED_DUPLICATE_EACH_KEYS = /* @__PURE__ */ new Set(), f.ABSENT_PATH = Symbol("absent");
13101
- let $ = f;
13255
+ ]), h.ROW_LOCAL_ROW_OPERATIONS = /* @__PURE__ */ new Set(["row-add", "row-remove", "row-prev", "row-next"]), h.REACTIVE_FETCH_STATES = /* @__PURE__ */ new WeakMap(), h.REACTIVE_IMPORT_STATES = /* @__PURE__ */ new WeakMap(), h.DERIVE_SUBTREE_PROFILES = /* @__PURE__ */ new WeakMap(), h.EACH_UPDATE_STATES = /* @__PURE__ */ new WeakMap(), h.EACH_RENDERED_CHANGE_FIRED = /* @__PURE__ */ new WeakSet(), h.EACH_RENDERED_CHANGE_WARNED = /* @__PURE__ */ new WeakSet(), h.WARNED_DUPLICATE_EACH_KEYS = /* @__PURE__ */ new Set(), h.ABSENT_PATH = Symbol("absent");
13256
+ let k = h;
13102
13257
  const Ae = class Ae {
13103
13258
  /**
13104
13259
  * コンストラクタ。
@@ -13807,7 +13962,7 @@ const v = class v {
13807
13962
  */
13808
13963
  static async handleTimeout(e) {
13809
13964
  const t = v.registrations.get(e);
13810
- !t || t.stopped || (t.timeoutTimerId = null, t.timedOut = !0, e.isConnected && B.pollTimeout(
13965
+ !t || t.stopped || (t.timeoutTimerId = null, t.timedOut = !0, e.isConnected && O.pollTimeout(
13811
13966
  e,
13812
13967
  t.count,
13813
13968
  v.elapsed(t)
@@ -13827,7 +13982,7 @@ const v = class v {
13827
13982
  v.registrations.delete(e);
13828
13983
  return;
13829
13984
  }
13830
- await v.injectState(t), e.isConnected && B.pollStop(
13985
+ await v.injectState(t), e.isConnected && O.pollStop(
13831
13986
  e,
13832
13987
  r,
13833
13988
  t.count,
@@ -13913,7 +14068,7 @@ const v = class v {
13913
14068
  ...i.getRawBindingData() ?? {},
13914
14069
  _poll: r
13915
14070
  };
13916
- return $.setBindingData(n, s, {
14071
+ return k.setBindingData(n, s, {
13917
14072
  reflectToAttribute: !1,
13918
14073
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
13919
14074
  // 解除しない)。
@@ -14100,7 +14255,7 @@ v.CONFIG_KEYS = /* @__PURE__ */ new Set([
14100
14255
  "state"
14101
14256
  ]), v.DEFAULT_INTERVAL_MS = 5e3, v.MIN_INTERVAL_MS = 100, v.registrations = /* @__PURE__ */ new Map(), v.visibilityListener = null;
14102
14257
  let be = v;
14103
- const Vt = "0.47.3";
14258
+ const Vt = "0.47.4";
14104
14259
  function qt(y) {
14105
14260
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => y()) : Promise.resolve().then(y);
14106
14261
  }
@@ -14350,7 +14505,7 @@ const L = class L {
14350
14505
  };
14351
14506
  n[e.varName] = { ...t };
14352
14507
  const s = e.fragment.getTarget(), a = i === s ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([e.fragment]);
14353
- $.setBindingData(i, n, {
14508
+ k.setBindingData(i, n, {
14354
14509
  skipFragments: a,
14355
14510
  reflectToAttribute: !1,
14356
14511
  // 可視範囲の公開は値の供給ではない(権威を持たず、ユーザー編集の印も
@@ -14404,8 +14559,8 @@ const Y = class Y {
14404
14559
  Y._dispatcher = e, e.startDeferred();
14405
14560
  try {
14406
14561
  const t = await Promise.allSettled([
14407
- $.scan(document.head),
14408
- $.scan(document.body)
14562
+ k.scan(document.head),
14563
+ k.scan(document.body)
14409
14564
  ]), [r, i] = t;
14410
14565
  r.status !== "fulfilled" && m.error(
14411
14566
  "[Haori]",
@@ -14419,7 +14574,7 @@ const Y = class Y {
14419
14574
  } finally {
14420
14575
  e.release();
14421
14576
  }
14422
- B.ready(Vt);
14577
+ O.ready(Vt);
14423
14578
  }
14424
14579
  /**
14425
14580
  * 稼働中の EventDispatcher を返します。
@@ -14520,9 +14675,9 @@ const Y = class Y {
14520
14675
  switch (r.type) {
14521
14676
  case "attributes": {
14522
14677
  const i = r.target;
14523
- if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(ue) && (r.attributeName === "disabled" || r.attributeName === ue) || r.attributeName && (r.attributeName === `${l.prefix}if-false` || r.attributeName === "style" && i.hasAttribute(`${l.prefix}if-false`)) || r.attributeName && $.isAliasedAttributeReflection(i, r.attributeName))
14678
+ if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(ue) && (r.attributeName === "disabled" || r.attributeName === ue) || r.attributeName && (r.attributeName === `${l.prefix}if-false` || r.attributeName === "style" && i.hasAttribute(`${l.prefix}if-false`)) || r.attributeName && k.isAliasedAttributeReflection(i, r.attributeName))
14524
14679
  break;
14525
- $.setAttribute(
14680
+ k.setAttribute(
14526
14681
  i,
14527
14682
  r.attributeName,
14528
14683
  i.getAttribute(r.attributeName),
@@ -14533,14 +14688,14 @@ const Y = class Y {
14533
14688
  }
14534
14689
  case "childList": {
14535
14690
  Array.from(r.removedNodes).forEach((i) => {
14536
- ye.cleanupTree(i), be.cleanupTree(i), fe.cleanupTree(i), $.removeNode(i);
14691
+ ye.cleanupTree(i), be.cleanupTree(i), fe.cleanupTree(i), k.removeNode(i);
14537
14692
  }), Array.from(r.addedNodes).forEach((i) => {
14538
- i.parentElement instanceof Element && ($.addNode(i.parentElement, i), ye.syncTree(i), be.syncTree(i), fe.syncTree(i));
14693
+ i.parentElement instanceof Element && (k.addNode(i.parentElement, i), ye.syncTree(i), be.syncTree(i), fe.syncTree(i));
14539
14694
  }), r.target instanceof Element && fe.syncElement(r.target);
14540
14695
  break;
14541
14696
  }
14542
14697
  case "characterData": {
14543
- r.target instanceof Text || r.target instanceof Comment ? $.changeText(r.target, r.target.textContent) : m.warn(
14698
+ r.target instanceof Text || r.target instanceof Comment ? k.changeText(r.target, r.target.textContent) : m.warn(
14544
14699
  "[Haori]",
14545
14700
  "Unsupported character data type:",
14546
14701
  r.target
@@ -14561,10 +14716,10 @@ let Me = Y;
14561
14716
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", Me.init) : Me.init();
14562
14717
  const Wt = () => ve.waitForRenders(), jt = ve.enhancers;
14563
14718
  export {
14564
- $ as Core,
14719
+ k as Core,
14565
14720
  se as Enhance,
14566
14721
  l as Env,
14567
- N as Form,
14722
+ F as Form,
14568
14723
  M as Fragment,
14569
14724
  ve as Haori,
14570
14725
  m as Log,