haori 0.62.1 → 0.62.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/haori.es.js CHANGED
@@ -1,23 +1,23 @@
1
- const ye = class ye {
1
+ const be = class be {
2
2
  /**
3
3
  * 開発モードの状態を取得します。
4
4
  *
5
5
  * @returns 開発モードならtrue、そうでなければfalse
6
6
  */
7
7
  static isEnabled() {
8
- return ye.devMode;
8
+ return be.devMode;
9
9
  }
10
10
  /**
11
11
  * 開発モードを有効化します。
12
12
  */
13
13
  static enable() {
14
- ye.devMode = !0;
14
+ be.devMode = !0;
15
15
  }
16
16
  /**
17
17
  * 開発モードを無効化します。
18
18
  */
19
19
  static disable() {
20
- ye.devMode = !1;
20
+ be.devMode = !1;
21
21
  }
22
22
  /**
23
23
  * 開発モードを切り替えます。
@@ -25,17 +25,17 @@ const ye = class ye {
25
25
  * @param enabled trueで有効化、falseで無効化
26
26
  */
27
27
  static set(e) {
28
- ye.devMode = e;
28
+ be.devMode = e;
29
29
  }
30
30
  };
31
- ye.devMode = !1;
32
- let q = ye;
31
+ be.devMode = !1;
32
+ let q = be;
33
33
  const We = "embedded";
34
- function nt(b) {
35
- return b === "embedded" || b === "demo";
34
+ function nt(y) {
35
+ return y === "embedded" || y === "demo";
36
36
  }
37
- function Tt(b) {
38
- return b === null ? null : nt(b) ? b : We;
37
+ function Tt(y) {
38
+ return y === null ? null : nt(y) ? y : We;
39
39
  }
40
40
  const te = class te {
41
41
  /**
@@ -423,13 +423,13 @@ const Dt = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, Je = "new:
423
423
  I.enhancers = /* @__PURE__ */ new Map(), I.instances = /* @__PURE__ */ new WeakMap(), I.warnedUnknownNames = /* @__PURE__ */ new Set(), I.warnedMissingGlobals = /* @__PURE__ */ new Set(), I.visited = /* @__PURE__ */ new WeakSet(), I.mutationCapture = null;
424
424
  let re = I;
425
425
  const st = "yyyy/MM/dd HH:mm", Nt = "en-US", Ze = 1e4;
426
- function ce(b) {
427
- return String(b).padStart(2, "0");
426
+ function ce(y) {
427
+ return String(y).padStart(2, "0");
428
428
  }
429
- function at(b, e, t, r, i, n) {
429
+ function at(y, e, t, r, i, n) {
430
430
  return {
431
- yyyy: String(b).padStart(4, "0"),
432
- yy: ce(b % 100),
431
+ yyyy: String(y).padStart(4, "0"),
432
+ yy: ce(y % 100),
433
433
  MM: ce(e),
434
434
  M: String(e),
435
435
  dd: ce(t),
@@ -440,7 +440,7 @@ function at(b, e, t, r, i, n) {
440
440
  ss: ce(n)
441
441
  };
442
442
  }
443
- function ot(b, e) {
443
+ function ot(y, e) {
444
444
  let t;
445
445
  try {
446
446
  t = new Intl.DateTimeFormat("en-US", {
@@ -452,7 +452,7 @@ function ot(b, e) {
452
452
  hour: "2-digit",
453
453
  minute: "2-digit",
454
454
  second: "2-digit"
455
- }).formatToParts(b);
455
+ }).formatToParts(y);
456
456
  } catch {
457
457
  return null;
458
458
  }
@@ -462,10 +462,10 @@ function ot(b, e) {
462
462
  const i = Number(r.year), n = Number(r.month), s = Number(r.day), a = Number(r.hour), o = Number(r.minute), l = Number(r.second);
463
463
  return !Number.isFinite(i) || !Number.isFinite(n) || !Number.isFinite(s) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(l) ? null : at(i, n, s, a, o, l);
464
464
  }
465
- function Ue(b, e = st, t) {
466
- if (b == null || b === "")
465
+ function Ue(y, e = st, t) {
466
+ if (y == null || y === "")
467
467
  return "";
468
- const r = b instanceof Date ? b : new Date(b);
468
+ const r = y instanceof Date ? y : new Date(y);
469
469
  if (Number.isNaN(r.getTime()))
470
470
  return "";
471
471
  let i;
@@ -488,11 +488,11 @@ function Ue(b, e = st, t) {
488
488
  );
489
489
  }
490
490
  const Ft = "yyyy-MM-dd";
491
- function lt(b = st, e) {
492
- return Ue(/* @__PURE__ */ new Date(), b, e);
491
+ function lt(y = st, e) {
492
+ return Ue(/* @__PURE__ */ new Date(), y, e);
493
493
  }
494
- function ct(b = 0, e = Ft, t) {
495
- const r = Number.isFinite(b) ? Math.trunc(b) : 0, i = typeof t == "string" && t.trim() !== "" ? t.trim() : "";
494
+ function ct(y = 0, e = Ft, t) {
495
+ const r = Number.isFinite(y) ? Math.trunc(y) : 0, i = typeof t == "string" && t.trim() !== "" ? t.trim() : "";
496
496
  let n, s, a;
497
497
  if (i !== "") {
498
498
  const l = ot(/* @__PURE__ */ new Date(), i);
@@ -506,14 +506,14 @@ function ct(b = 0, e = Ft, t) {
506
506
  const o = new Date(Date.UTC(n, s - 1, a + r));
507
507
  return Ue(o, e, "UTC");
508
508
  }
509
- function ut(b, e) {
510
- if (b == null)
509
+ function ut(y, e) {
510
+ if (y == null)
511
511
  return "";
512
512
  let t;
513
- if (typeof b == "number")
514
- t = b;
513
+ if (typeof y == "number")
514
+ t = y;
515
515
  else {
516
- const i = String(b).trim();
516
+ const i = String(y).trim();
517
517
  if (i === "")
518
518
  return "";
519
519
  t = Number(i);
@@ -527,9 +527,9 @@ function ut(b, e) {
527
527
  }
528
528
  return new Intl.NumberFormat(Nt, r).format(t);
529
529
  }
530
- function dt(b, e, t) {
530
+ function dt(y, e, t) {
531
531
  let r, i, n;
532
- if (e === void 0 ? (r = 0, i = b, n = 1) : (r = b, i = e, n = t === void 0 ? 1 : t), !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(n) || n === 0)
532
+ if (e === void 0 ? (r = 0, i = y, n = 1) : (r = y, i = e, n = t === void 0 ? 1 : t), !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(n) || n === 0)
533
533
  return [];
534
534
  r = Math.trunc(r), i = Math.trunc(i), n = Math.trunc(n);
535
535
  const s = [];
@@ -541,25 +541,25 @@ function dt(b, e, t) {
541
541
  s.push(a);
542
542
  return s;
543
543
  }
544
- function ft(b, e, t = {}) {
545
- const r = Math.trunc(Number(b));
544
+ function ht(y, e, t = {}) {
545
+ const r = Math.trunc(Number(y));
546
546
  if (!Number.isFinite(r) || r <= 0)
547
547
  return [];
548
548
  const i = Math.min(
549
549
  Math.max(Math.trunc(Number(e)) || 0, 0),
550
550
  r - 1
551
551
  ), n = Math.max(0, Math.trunc(t.window ?? 2)), s = Math.max(0, Math.trunc(t.boundary ?? 1)), a = /* @__PURE__ */ new Set();
552
- for (let h = 0; h < s && h < r; h += 1)
553
- a.add(h);
554
- for (let h = Math.max(0, r - s); h < r; h += 1)
555
- a.add(h);
556
- for (let h = Math.max(0, i - n); h <= Math.min(r - 1, i + n); h += 1)
557
- a.add(h);
558
- const o = Array.from(a).sort((h, m) => h - m), l = [];
552
+ for (let f = 0; f < s && f < r; f += 1)
553
+ a.add(f);
554
+ for (let f = Math.max(0, r - s); f < r; f += 1)
555
+ a.add(f);
556
+ for (let f = Math.max(0, i - n); f <= Math.min(r - 1, i + n); f += 1)
557
+ a.add(f);
558
+ const o = Array.from(a).sort((f, m) => f - m), l = [];
559
559
  let u = null;
560
- for (const h of o) {
561
- if (u !== null && h - u > 1)
562
- if (h - u === 2) {
560
+ for (const f of o) {
561
+ if (u !== null && f - u > 1)
562
+ if (f - u === 2) {
563
563
  const m = u + 1;
564
564
  l.push({
565
565
  page: m,
@@ -570,23 +570,23 @@ function ft(b, e, t = {}) {
570
570
  } else
571
571
  l.push({ page: null, label: "…", active: !1, ellipsis: !0 });
572
572
  l.push({
573
- page: h,
574
- label: h + 1,
575
- active: h === i,
573
+ page: f,
574
+ label: f + 1,
575
+ active: f === i,
576
576
  ellipsis: !1
577
- }), u = h;
577
+ }), u = f;
578
578
  }
579
579
  return l;
580
580
  }
581
581
  const kt = /^(\d{4})-(\d{1,2})$/, It = 1200;
582
- function Ce(b, e) {
583
- const t = Number(b);
582
+ function Me(y, e) {
583
+ const t = Number(y);
584
584
  return Number.isFinite(t) ? Math.trunc(t) : e;
585
585
  }
586
- function He(b, e) {
587
- if (typeof b != "string")
586
+ function He(y, e) {
587
+ if (typeof y != "string")
588
588
  return "";
589
- const t = kt.exec(b.trim());
589
+ const t = kt.exec(y.trim());
590
590
  if (!t)
591
591
  return "";
592
592
  const r = Number(t[1]), i = Number(t[2]);
@@ -595,14 +595,14 @@ function He(b, e) {
595
595
  const n = Number.isFinite(e) ? Math.trunc(e) : 0, s = r * 12 + (i - 1) + n, a = Math.floor(s / 12), o = s - a * 12 + 1;
596
596
  return `${String(a).padStart(4, "0")}-${ce(o)}`;
597
597
  }
598
- function xt(b) {
599
- if (typeof b == "string" && b.trim() !== "")
600
- return He(b, 0);
598
+ function xt(y) {
599
+ if (typeof y == "string" && y.trim() !== "")
600
+ return He(y, 0);
601
601
  const e = /* @__PURE__ */ new Date();
602
602
  return `${String(e.getFullYear()).padStart(4, "0")}-${ce(e.getMonth() + 1)}`;
603
603
  }
604
- function ht(b, e) {
605
- const t = Math.trunc(Number(b));
604
+ function ft(y, e) {
605
+ const t = Math.trunc(Number(y));
606
606
  if (!Number.isFinite(t) || t < 0)
607
607
  return [];
608
608
  const r = xt(e);
@@ -615,37 +615,37 @@ function ht(b, e) {
615
615
  }
616
616
  return n;
617
617
  }
618
- function pt(b, e) {
618
+ function pt(y, e) {
619
619
  const t = { start: 0, end: 0, total: 0, empty: !0 };
620
- if (!b || typeof b != "object")
620
+ if (!y || typeof y != "object")
621
621
  return t;
622
- const r = b, i = Ce(r.totalElements ?? r.totalCount, 0);
622
+ const r = y, i = Me(r.totalElements ?? r.totalCount, 0);
623
623
  if (i <= 0)
624
624
  return t;
625
- const n = Math.max(0, Ce(r.number, 0)), s = Math.max(0, Ce(r.size, 0)), a = n * s, o = Math.min(a + 1, i);
625
+ const n = Math.max(0, Me(r.number, 0)), s = Math.max(0, Me(r.size, 0)), a = n * s, o = Math.min(a + 1, i);
626
626
  let l;
627
627
  if (e !== void 0 && Number.isFinite(e))
628
628
  l = Math.max(0, Math.trunc(e));
629
629
  else {
630
- const h = Ce(r.numberOfElements, NaN);
631
- l = Number.isFinite(h) ? h : Math.min(s, i - a);
630
+ const f = Me(r.numberOfElements, NaN);
631
+ l = Number.isFinite(f) ? f : Math.min(s, i - a);
632
632
  }
633
633
  const u = Math.min(a + l, i);
634
634
  return { start: o, end: Math.max(u, o), total: i, empty: !1 };
635
635
  }
636
- function gt(b, e, t) {
637
- if (!Array.isArray(b) || b.length === 0)
636
+ function gt(y, e, t) {
637
+ if (!Array.isArray(y) || y.length === 0)
638
638
  return null;
639
- const r = String(t), i = b.find(
639
+ const r = String(t), i = y.find(
640
640
  (n) => n != null && String(n[e]) === r
641
641
  );
642
642
  return i === void 0 ? null : i;
643
643
  }
644
- function mt(b, e) {
645
- if (!Array.isArray(b))
644
+ function mt(y, e) {
645
+ if (!Array.isArray(y))
646
646
  return 0;
647
647
  let t = 0;
648
- for (const r of b) {
648
+ for (const r of y) {
649
649
  const i = e == null ? r : r?.[e];
650
650
  if (i == null || i === "")
651
651
  continue;
@@ -654,25 +654,25 @@ function mt(b, e) {
654
654
  }
655
655
  return t;
656
656
  }
657
- function yt(b, e) {
658
- return e == null || b == null ? String(b) : String(b[e]);
657
+ function bt(y, e) {
658
+ return e == null || y == null ? String(y) : String(y[e]);
659
659
  }
660
- function bt(b, e) {
661
- if (!Array.isArray(b))
660
+ function yt(y, e) {
661
+ if (!Array.isArray(y))
662
662
  return [];
663
663
  const t = /* @__PURE__ */ new Set(), r = [];
664
- for (const i of b) {
665
- const n = yt(i, e);
664
+ for (const i of y) {
665
+ const n = bt(i, e);
666
666
  t.has(n) || (t.add(n), r.push(i));
667
667
  }
668
668
  return r;
669
669
  }
670
- function Et(b, e) {
671
- if (!Array.isArray(b))
670
+ function Et(y, e) {
671
+ if (!Array.isArray(y))
672
672
  return [];
673
673
  const t = /* @__PURE__ */ new Map(), r = [];
674
- for (const i of b) {
675
- const n = yt(i, e), s = t.get(n);
674
+ for (const i of y) {
675
+ const n = bt(i, e), s = t.get(n);
676
676
  if (s === void 0) {
677
677
  const a = i == null ? i : i[e];
678
678
  t.set(n, r.length), r.push({ key: a, items: [i] });
@@ -681,19 +681,19 @@ function Et(b, e) {
681
681
  }
682
682
  return r;
683
683
  }
684
- const Mt = Object.freeze({
684
+ const Ct = Object.freeze({
685
685
  date: Ue,
686
686
  now: lt,
687
687
  today: ct,
688
688
  number: ut,
689
- pages: ft,
689
+ pages: ht,
690
690
  range: dt,
691
691
  monthAdd: He,
692
- monthRange: ht,
692
+ monthRange: ft,
693
693
  pageSummary: pt,
694
694
  findBy: gt,
695
695
  sum: mt,
696
- distinct: bt,
696
+ distinct: yt,
697
697
  groupBy: Et
698
698
  });
699
699
  class ze {
@@ -991,6 +991,24 @@ const D = class D {
991
991
  const t = new Set(e);
992
992
  return this.FORBIDDEN_NAMES.filter((r) => !t.has(r)).map((r) => `const ${r} = undefined`).join(`;
993
993
  `);
994
+ }
995
+ /**
996
+ * 式が参照する標準組み込みを `const` として宣言するコードを生成します。
997
+ *
998
+ * `const` にした名前へ `++` / `--` を書くと `TypeError` になり、グローバルは
999
+ * 書き換わりません。バインドのキーと同じ名前は引数が遮蔽するため宣言しません
1000
+ * (宣言すると引数と重複して構文エラーになります)。
1001
+ *
1002
+ * @param expression 評価対象の式
1003
+ * @param bindKeySet 現在の式で利用するバインド識別子
1004
+ * @returns 評価前に挿入する宣言。対象が無ければ空文字
1005
+ */
1006
+ static buildBuiltinConstants(e, t) {
1007
+ const r = this.extractFreeIdentifiers(e).filter(
1008
+ (i) => this.ALLOWED_GLOBAL_IDENTIFIERS.has(i) && !t.has(i)
1009
+ );
1010
+ return r.length === 0 ? "" : `const ${r.map((i) => `${i} = this.${i}`).join(", ")};
1011
+ `;
994
1012
  }
995
1013
  /**
996
1014
  * 式の中で「使用できない(ブロックされた)グローバル識別子」を参照しているものを
@@ -1075,13 +1093,13 @@ const D = class D {
1075
1093
  continue;
1076
1094
  let o = 0, l = 0;
1077
1095
  for (let u = s - 1; u >= 0; u -= 1) {
1078
- const h = i[u].value;
1079
- if (h === ")" || h === "]" || h === "}") {
1080
- o += 1, h === ")" && (l += 1);
1096
+ const f = i[u].value;
1097
+ if (f === ")" || f === "]" || f === "}") {
1098
+ o += 1, f === ")" && (l += 1);
1081
1099
  continue;
1082
1100
  }
1083
- if (h === "(" || h === "[" || h === "{") {
1084
- if (o -= 1, h === "(" && (l -= 1), o === 0)
1101
+ if (f === "(" || f === "[" || f === "{") {
1102
+ if (o -= 1, f === "(" && (l -= 1), o === 0)
1085
1103
  break;
1086
1104
  continue;
1087
1105
  }
@@ -1418,7 +1436,7 @@ ${t}`;
1418
1436
  if (!(n.compileFailed || n.evaluator === null))
1419
1437
  try {
1420
1438
  const s = this.wrapBoundValues(i), a = n.bindKeys.map((l) => s[l]), o = this.withBlockedPropertyAccess(
1421
- () => n.evaluator(...a)
1439
+ () => n.evaluator.call(this.BUILTIN_HOLDER, ...a)
1422
1440
  );
1423
1441
  return typeof o == "boolean" ? o : void 0;
1424
1442
  } catch {
@@ -1459,13 +1477,13 @@ ${t}`;
1459
1477
  if (this.scheduleForbiddenBindingValueCacheReset(), e.trim() === "")
1460
1478
  return g.warn("[Haori]", e, "Expression is empty"), { value: null, unresolvedReference: !1 };
1461
1479
  if (this.containsDangerousPatterns(e)) {
1462
- const y = this.detectDisallowedKeywords(e);
1463
- if (y.length > 0) {
1464
- const E = y.some((A) => A === "function" || A === "return") ? " Statement keywords are not allowed in expressions; use an arrow function such as `x => ({key: value})` instead of `function(x){ return {key: value}; }`." : " These are statement keywords and cannot be used in expressions.";
1480
+ const b = this.detectDisallowedKeywords(e);
1481
+ if (b.length > 0) {
1482
+ const E = b.some((A) => A === "function" || A === "return") ? " Statement keywords are not allowed in expressions; use an arrow function such as `x => ({key: value})` instead of `function(x){ return {key: value}; }`." : " These are statement keywords and cannot be used in expressions.";
1465
1483
  g.warn(
1466
1484
  "[Haori]",
1467
1485
  e,
1468
- "Expression uses disallowed keyword(s): " + y.join(", ") + "." + E
1486
+ "Expression uses disallowed keyword(s): " + b.join(", ") + "." + E
1469
1487
  );
1470
1488
  } else
1471
1489
  g.warn(
@@ -1477,8 +1495,8 @@ ${t}`;
1477
1495
  }
1478
1496
  const r = this.collectForbiddenKeys(t);
1479
1497
  if (r.length > 0) {
1480
- const y = r.join(",");
1481
- this.loggedForbiddenKeySignatures.has(y) || (this.loggedForbiddenKeySignatures.add(y), this.scheduleForbiddenKeyLogReset(), g.error(
1498
+ const b = r.join(",");
1499
+ this.loggedForbiddenKeySignatures.has(b) || (this.loggedForbiddenKeySignatures.add(b), this.scheduleForbiddenKeyLogReset(), g.error(
1482
1500
  "[Haori]",
1483
1501
  "Binding keys are reserved and ignored: " + r.join(", ") + ". These collide with blocked global/prototype names and cannot be used as top-level binding keys; the remaining keys are still evaluated."
1484
1502
  ));
@@ -1503,22 +1521,22 @@ ${t}`;
1503
1521
  `Binding key "${this.BUILTIN_NAMESPACE}" is reserved for built-in helpers; the bound value is ignored in expressions.`
1504
1522
  );
1505
1523
  const o = {};
1506
- for (const y of Object.keys(t))
1507
- this.FORBIDDEN_BINDING_NAMES.has(y) || (o[y] = t[y]);
1524
+ for (const b of Object.keys(t))
1525
+ this.FORBIDDEN_BINDING_NAMES.has(b) || (o[b] = t[b]);
1508
1526
  a && (n ? o[this.BUILTIN_NAMESPACE] = {
1509
1527
  ...this.BUILTIN_HELPERS,
1510
1528
  [this.BUILTIN_DATA_PROPERTY]: { ...o }
1511
1529
  } : o[this.BUILTIN_NAMESPACE] = this.BUILTIN_HELPERS), this.pruneResolvedIdentifiers(o), q.isEnabled() && this.recordSuppliedIdentifiers(o);
1512
1530
  const l = this.canAttemptMissingIdentifierRecovery(e), u = this.extractFreeIdentifiers(e).filter(
1513
- (y) => !(y in o) && // 禁止グローバルは buildAssignments が `const` で遮蔽するため対象外
1531
+ (b) => !(b in o) && // 禁止グローバルは buildAssignments が `const` で遮蔽するため対象外
1514
1532
  // (二重宣言は構文エラーになる)。
1515
- !this.FORBIDDEN_NAMES.includes(y) && // 標準組み込み(`Math` など)は式から参照できる仕様のため遮蔽しない。
1516
- !this.ALLOWED_GLOBAL_IDENTIFIERS.has(y)
1533
+ !this.FORBIDDEN_NAMES.includes(b) && // 標準組み込み(`Math` など)は式から参照できる仕様のため遮蔽しない。
1534
+ !this.ALLOWED_GLOBAL_IDENTIFIERS.has(b)
1517
1535
  );
1518
- let h = null;
1536
+ let f = null;
1519
1537
  if (q.isEnabled()) {
1520
- const y = this.extractBoundIdentifiers(e);
1521
- h = y.size === 0 ? u : u.filter((E) => !y.has(E));
1538
+ const b = this.extractBoundIdentifiers(e);
1539
+ f = b.size === 0 ? u : u.filter((E) => !b.has(E));
1522
1540
  }
1523
1541
  const m = this.evaluateWithShadowing(
1524
1542
  e,
@@ -1526,12 +1544,12 @@ ${t}`;
1526
1544
  u,
1527
1545
  l
1528
1546
  );
1529
- return h !== null && this.recordScopeMissingIdentifiers(
1547
+ return f !== null && this.recordScopeMissingIdentifiers(
1530
1548
  typeof m.value == "boolean" ? (
1531
1549
  // 判定する式として結論が出た評価では、予約キーが無いのは正常
1532
1550
  // (注入より前の状態)なので報告しない(仕様「未解決参照の診断」)。
1533
- h.filter((y) => !this.isReservedBindingKey(y))
1534
- ) : h,
1551
+ f.filter((b) => !this.isReservedBindingKey(b))
1552
+ ) : f,
1535
1553
  e
1536
1554
  ), m;
1537
1555
  }
@@ -1560,11 +1578,11 @@ ${t}`;
1560
1578
  return { value: null, unresolvedReference: !1 };
1561
1579
  try {
1562
1580
  const o = [], l = this.wrapBoundValues(t);
1563
- a.bindKeys.forEach((h) => {
1564
- o.push(l[h]);
1581
+ a.bindKeys.forEach((f) => {
1582
+ o.push(l[f]);
1565
1583
  });
1566
1584
  const u = this.withBlockedPropertyAccess(
1567
- () => a.evaluator(...o)
1585
+ () => a.evaluator.call(this.BUILTIN_HOLDER, ...o)
1568
1586
  );
1569
1587
  return u === void 0 && this.warnBlockedIdentifiers(e), {
1570
1588
  value: u,
@@ -1612,12 +1630,12 @@ ${t}`;
1612
1630
  */
1613
1631
  static prepareEvaluator(e, t, r = []) {
1614
1632
  const i = Object.keys(t).filter(
1615
- (A) => !this.FORBIDDEN_BINDING_NAMES.has(A)
1633
+ (w) => !this.FORBIDDEN_BINDING_NAMES.has(w)
1616
1634
  ), n = [], s = [];
1617
- i.forEach((A) => {
1618
- this.isUsableBindingKey(A) ? n.push(A) : s.push(A);
1635
+ i.forEach((w) => {
1636
+ this.isUsableBindingKey(w) ? n.push(w) : s.push(w);
1619
1637
  }), n.sort(), this.reportUnusableBindingKeys(s);
1620
- const a = new Set(n), o = r.filter((A) => !a.has(A)), l = `${e}:${n.join(",")}:${o.join(
1638
+ const a = new Set(n), o = r.filter((w) => !a.has(w)), l = `${e}:${n.join(",")}:${o.join(
1621
1639
  ","
1622
1640
  )}`;
1623
1641
  let u = this.EXPRESSION_CACHE.get(l) || null;
@@ -1627,24 +1645,23 @@ ${t}`;
1627
1645
  evaluator: u,
1628
1646
  compileFailed: !1
1629
1647
  };
1630
- const h = this.buildAssignments(n), m = this.buildShadowDeclarations(o), y = this.toGuardedMemberExpression(
1648
+ const f = this.buildAssignments(n), m = this.buildBuiltinConstants(e, a), b = this.buildShadowDeclarations(o), E = this.toGuardedMemberExpression(
1631
1649
  this.toOptionalChainExpression(e)
1632
- ), E = h ? `"use strict";
1633
- ${h};
1634
- return (${y});${m}` : `"use strict";
1635
- return (${y});${m}`;
1650
+ ), A = `"use strict";
1651
+ ${f};
1652
+ ${m}return (${E});` + b;
1636
1653
  try {
1637
- return u = new Function(...n, E), this.EXPRESSION_CACHE.set(l, u), this.compileFailedExpressions.delete(e), {
1654
+ return u = new Function(...n, A), this.EXPRESSION_CACHE.set(l, u), this.compileFailedExpressions.delete(e), {
1638
1655
  bindKeys: n,
1639
1656
  evaluator: u,
1640
1657
  compileFailed: !1
1641
1658
  };
1642
- } catch (A) {
1659
+ } catch (w) {
1643
1660
  return o.length > 0 ? (g.warn(
1644
1661
  "[Haori]",
1645
1662
  "Failed to shadow undeclared identifier(s): " + o.join(", ") + ". Falling back to evaluation without shadowing.",
1646
1663
  e
1647
- ), this.prepareEvaluator(e, t, [])) : (g.error("[Haori]", "Failed to compile expression:", e, A), this.compileFailedExpressions.add(e), {
1664
+ ), this.prepareEvaluator(e, t, [])) : (g.error("[Haori]", "Failed to compile expression:", e, w), this.compileFailedExpressions.add(e), {
1648
1665
  bindKeys: n,
1649
1666
  evaluator: null,
1650
1667
  compileFailed: !0
@@ -1760,8 +1777,8 @@ return (${y});${m}`;
1760
1777
  break;
1761
1778
  }
1762
1779
  case "[": {
1763
- const h = this.startsMemberAccess(i) ? "member" : "array";
1764
- r.push(h);
1780
+ const f = this.startsMemberAccess(i) ? "member" : "array";
1781
+ r.push(f);
1765
1782
  break;
1766
1783
  }
1767
1784
  case "{":
@@ -2428,7 +2445,7 @@ return (${y});${m}`;
2428
2445
  }
2429
2446
  };
2430
2447
  D.MAX_IDENTIFIER_RECOVERY_COUNT = 8, D.BUILTIN_NAMESPACE = "haori", D.BUILTIN_HELPERS = {
2431
- ...Mt
2448
+ ...Ct
2432
2449
  }, D.BUILTIN_REFERENCE_PATTERN = /(^|[^\w$.])haori(?![\w$])/, D.BUILTIN_DATA_PROPERTY = "data", D.BUILTIN_DATA_REFERENCE_PATTERN = /(^|[^\w$.])haori\s*(\.\s*data(?![\w$])|\[)/, D.IDENTIFIER_NAME_PATTERN = /^[\p{ID_Start}$_][\p{ID_Continue}$\u200C\u200D]*$/u, D.usableBindingKeyCache = /* @__PURE__ */ new Map(), D.loggedUnusableBindingKeys = /* @__PURE__ */ new Set(), D.compileFailedExpressions = /* @__PURE__ */ new Set(), D.forbiddenBindingValueCache = /* @__PURE__ */ new WeakMap(), D.forbiddenBindingValueSet = null, D.forbiddenBindingValueCacheResetScheduled = !1, D.loggedForbiddenKeySignatures = /* @__PURE__ */ new Set(), D.loggedForbiddenKeyResetScheduled = !1, D.FORBIDDEN_NAMES = [
2433
2450
  // グローバルオブジェクト
2434
2451
  "window",
@@ -2593,7 +2610,20 @@ D.MAX_IDENTIFIER_RECOVERY_COUNT = 8, D.BUILTIN_NAMESPACE = "haori", D.BUILTIN_HE
2593
2610
  "encodeURIComponent",
2594
2611
  "decodeURI",
2595
2612
  "decodeURIComponent"
2596
- ]), D.EXPRESSION_CACHE = /* @__PURE__ */ new Map(), D.FREE_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), D.ALLOWED_SYNTAX_CACHE = /* @__PURE__ */ new Map(), D.REFERENCED_NAME_CACHE = /* @__PURE__ */ new Map(), D.BOUND_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), D.OPTIONAL_CHAIN_CACHE = /* @__PURE__ */ new Map(), D.GUARDED_MEMBER_CACHE = /* @__PURE__ */ new Map(), D.MEMBER_KEY_GUARD_OPEN = "(_hk=>_hk==='constructor'||_hk==='__proto__'||_hk==='prototype'?undefined:_hk)(", D.FORBIDDEN_NAME_PATTERNS = D.FORBIDDEN_NAMES.map((e) => ({
2613
+ ]), D.BUILTIN_HOLDER = Object.freeze(
2614
+ Object.defineProperties(
2615
+ {},
2616
+ Object.fromEntries(
2617
+ [...D.ALLOWED_GLOBAL_IDENTIFIERS].map((e) => [
2618
+ e,
2619
+ {
2620
+ get: () => globalThis[e],
2621
+ enumerable: !0
2622
+ }
2623
+ ])
2624
+ )
2625
+ )
2626
+ ), D.EXPRESSION_CACHE = /* @__PURE__ */ new Map(), D.FREE_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), D.ALLOWED_SYNTAX_CACHE = /* @__PURE__ */ new Map(), D.REFERENCED_NAME_CACHE = /* @__PURE__ */ new Map(), D.BOUND_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), D.OPTIONAL_CHAIN_CACHE = /* @__PURE__ */ new Map(), D.GUARDED_MEMBER_CACHE = /* @__PURE__ */ new Map(), D.MEMBER_KEY_GUARD_OPEN = "(_hk=>(_hk=typeof _hk==='symbol'?_hk:`${_hk}`)==='constructor'||_hk==='__proto__'||_hk==='prototype'?undefined:_hk)(", D.FORBIDDEN_NAME_PATTERNS = D.FORBIDDEN_NAMES.map((e) => ({
2597
2627
  name: e,
2598
2628
  pattern: new RegExp(`(^|[^\\w$.])${e}(?![\\w$])`)
2599
2629
  })), D.FORBIDDEN_IDENTIFIER_CACHE = /* @__PURE__ */ new Map(), D.pendingUnresolvedIdentifiers = /* @__PURE__ */ new Set(), D.evaluatingForDiagnosis = !1, D.unresolvedReportScheduled = !1, D.suppliedIdentifiers = /* @__PURE__ */ new Set(), D.pendingScopeMissingIdentifiers = /* @__PURE__ */ new Map(), D.scopeMissingReportScheduled = !1, D.rowScopeIdentifiers = /* @__PURE__ */ new Set(), D.loggedScopeMissingIdentifiers = /* @__PURE__ */ new Set(), D.loggedBlockedIdentifierExpressions = /* @__PURE__ */ new Set(), D.COMPOSING_OPERATORS = /* @__PURE__ */ new Set([
@@ -2781,26 +2811,26 @@ const pe = "data-haori-if-disabled", Qe = "input, select, textarea, button, fiel
2781
2811
  static report(e = L.DEFAULT_REPORT_LIMIT) {
2782
2812
  const t = /* @__PURE__ */ new Map();
2783
2813
  let r = 0, i = 0;
2784
- const n = (l, u, h) => {
2785
- r += h.totalDurationMs, i += h.calls;
2814
+ const n = (l, u, f) => {
2815
+ r += f.totalDurationMs, i += f.calls;
2786
2816
  const m = t.get(l);
2787
2817
  if (m === void 0) {
2788
2818
  t.set(l, {
2789
2819
  where: u,
2790
- template: h.template,
2820
+ template: f.template,
2791
2821
  elements: 1,
2792
- calls: h.calls,
2793
- totalDurationMs: h.totalDurationMs,
2794
- maxDurationMs: h.maxDurationMs,
2822
+ calls: f.calls,
2823
+ totalDurationMs: f.totalDurationMs,
2824
+ maxDurationMs: f.maxDurationMs,
2795
2825
  sharePercent: 0,
2796
- representativeDurationMs: h.totalDurationMs
2826
+ representativeDurationMs: f.totalDurationMs
2797
2827
  });
2798
2828
  return;
2799
2829
  }
2800
- m.elements += 1, m.calls += h.calls, m.totalDurationMs += h.totalDurationMs, m.maxDurationMs = Math.max(
2830
+ m.elements += 1, m.calls += f.calls, m.totalDurationMs += f.totalDurationMs, m.maxDurationMs = Math.max(
2801
2831
  m.maxDurationMs,
2802
- h.maxDurationMs
2803
- ), h.totalDurationMs > m.representativeDurationMs && (m.where = u, m.representativeDurationMs = h.totalDurationMs);
2832
+ f.maxDurationMs
2833
+ ), f.totalDurationMs > m.representativeDurationMs && (m.where = u, m.representativeDurationMs = f.totalDurationMs);
2804
2834
  };
2805
2835
  L.snapshot().forEach((l) => {
2806
2836
  l.attributes.forEach((u) => {
@@ -3061,7 +3091,7 @@ const ue = class ue {
3061
3091
  let t;
3062
3092
  switch (e.nodeType) {
3063
3093
  case Node.ELEMENT_NODE:
3064
- t = new S(e);
3094
+ t = new R(e);
3065
3095
  break;
3066
3096
  case Node.TEXT_NODE:
3067
3097
  t = new ne(e);
@@ -4788,11 +4818,11 @@ const v = class v extends N {
4788
4818
  if (n) {
4789
4819
  const le = this.attributeMap.get(e);
4790
4820
  if (le && (le.isEvaluate || le.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
4791
- const fe = z.enqueue(() => {
4821
+ const he = z.enqueue(() => {
4792
4822
  }).finally(() => {
4793
4823
  this.releaseSelfWritingAttributes(s);
4794
4824
  });
4795
- return this.holdSelfWritingAttributes(s, fe), fe;
4825
+ return this.holdSelfWritingAttributes(s, he), he;
4796
4826
  }
4797
4827
  }
4798
4828
  this.attributeMap.set(e, o);
@@ -4801,49 +4831,49 @@ const v = class v extends N {
4801
4831
  element: l,
4802
4832
  rawName: e,
4803
4833
  template: r
4804
- }), h = o.isEvaluate || o.isRawEvaluate, m = e === t && v.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), y = o.isSingleExpression(), E = de.joinEvaluateResults(u.results), A = u.results.length === 1 ? u.results[0] : E, T = t === "value" && v.resolveDeclaredValueType(l) === "boolean", M = A === !1 && !T, P = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || A === null || A === void 0 || M : m ? u.hasUnresolvedReference || A === null || A === void 0 || A === !1 : y ? u.hasUnresolvedReference || A === null || A === void 0 || M : h && E === "");
4834
+ }), f = o.isEvaluate || o.isRawEvaluate, m = e === t && v.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), b = o.isSingleExpression(), E = de.joinEvaluateResults(u.results), A = u.results.length === 1 ? u.results[0] : E, w = t === "value" && v.resolveDeclaredValueType(l) === "boolean", C = A === !1 && !w, P = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || A === null || A === void 0 || C : m ? u.hasUnresolvedReference || A === null || A === void 0 || A === !1 : b ? u.hasUnresolvedReference || A === null || A === void 0 || C : f && E === "");
4805
4835
  if (P && u.hasUnresolvedReference && v.warnUnresolvedAttribute(
4806
4836
  e,
4807
4837
  t,
4808
4838
  r,
4809
4839
  l
4810
- ), q.isEnabled() && A === !1 && y) {
4811
- const le = o.getSingleExpression(), fe = le === null ? null : ie.diagnoseStrictComparison(
4840
+ ), q.isEnabled() && A === !1 && b) {
4841
+ const le = o.getSingleExpression(), he = le === null ? null : ie.diagnoseStrictComparison(
4812
4842
  le,
4813
4843
  this.getBindingData()
4814
4844
  );
4815
- fe !== null && v.warnTypeMismatchedComparison(
4845
+ he !== null && v.warnTypeMismatchedComparison(
4816
4846
  e,
4817
4847
  r,
4818
- fe,
4848
+ he,
4819
4849
  l
4820
4850
  );
4821
4851
  }
4822
- const ee = o.isForceEvaluation() ? r : y ? A : E, x = i && o.isEvaluate && t === "value" && v.isValuePropertyTarget(l), Y = l.getRootNode(), Q = this.userEditSequence, X = x && v.isUserEditableValue(l) && (l === Y.activeElement || this.hasPendingUserEdit()), j = P || ee === null || ee === !1 && !T ? null : String(ee), se = o.isEvaluate && j !== null && v.URL_ATTRIBUTES.has(t) && De.hasScriptScheme(j);
4852
+ const ee = o.isForceEvaluation() ? r : b ? A : E, x = i && o.isEvaluate && t === "value" && v.isValuePropertyTarget(l), Y = l.getRootNode(), Q = this.userEditSequence, X = x && v.isUserEditableValue(l) && (l === Y.activeElement || this.hasPendingUserEdit()), j = P || ee === null || ee === !1 && !w ? null : String(ee), se = o.isEvaluate && j !== null && v.URL_ATTRIBUTES.has(t) && De.hasScriptScheme(j);
4823
4853
  se && g.warn(
4824
4854
  "[Haori]",
4825
4855
  `Attribute "${t}" was removed because the evaluated URL uses a script scheme: ${e}="${r}" -> ${j}`,
4826
4856
  l
4827
4857
  );
4828
- const R = se ? null : j, $ = e !== t && l.getAttribute(e) !== r, K = R === null ? l.hasAttribute(t) : l.getAttribute(t) !== R, _ = R === null ? "" : R, be = x && !X && l.value !== _, oe = t === "checked" && l instanceof HTMLInputElement && (l.type === "checkbox" || l.type === "radio"), U = t === "selected" && l instanceof HTMLOptionElement, G = Y.activeElement, Z = G !== null && (oe && l === G || U && l.closest("select") === G) || (oe || U) && this.hasPendingCheckableUserEdit(U), Ie = this.getCheckableUserEditSequence(U), xe = R !== null, Ve = oe && o.isEvaluate && !Z && l.checked !== xe, Me = U && o.isEvaluate && !Z && l.selected !== xe;
4829
- if (!$ && !K && !be && !Ve && !Me)
4858
+ const T = se ? null : j, $ = e !== t && l.getAttribute(e) !== r, K = T === null ? l.hasAttribute(t) : l.getAttribute(t) !== T, _ = T === null ? "" : T, ye = x && !X && l.value !== _, oe = t === "checked" && l instanceof HTMLInputElement && (l.type === "checkbox" || l.type === "radio"), U = t === "selected" && l instanceof HTMLOptionElement, G = Y.activeElement, Z = G !== null && (oe && l === G || U && l.closest("select") === G) || (oe || U) && this.hasPendingCheckableUserEdit(U), Ie = this.getCheckableUserEditSequence(U), xe = T !== null, Ve = oe && o.isEvaluate && !Z && l.checked !== xe, Ce = U && o.isEvaluate && !Z && l.selected !== xe;
4859
+ if (!$ && !K && !ye && !Ve && !Ce)
4830
4860
  return x && !X && (this.value = this.normalizeValueForElement(
4831
4861
  l,
4832
4862
  _
4833
4863
  ), this.clearUnappliedValueWrite()), (oe || U) && !Z && this.syncCheckableValueFromDom(U), Promise.resolve();
4834
4864
  const Xe = z.enqueue(() => {
4835
- const le = this.getCheckableUserEditSequence(U) !== Ie, fe = U && (Z || le) ? v.captureSelection(
4865
+ const le = this.getCheckableUserEditSequence(U) !== Ie, he = U && (Z || le) ? v.captureSelection(
4836
4866
  // 守るべき選択があるのは所属する `<select>` があるときだけ。
4837
4867
  l.closest(
4838
4868
  "select"
4839
4869
  )
4840
4870
  ) : null;
4841
- $ && l.setAttribute(e, r), R === null ? l.removeAttribute(t) : K && (l.setAttribute(t, R), t === `${c.prefix}bind` && this.recordSelfWrittenBind(R)), t === "style" && this.captureAndHideDisplay(), fe?.(), x && !X && !(v.isUserEditableValue(l) && this.isSupersededByUserEdit(Q)) && (this.value = this.normalizeValueForElement(
4871
+ $ && l.setAttribute(e, r), T === null ? l.removeAttribute(t) : K && (l.setAttribute(t, T), t === `${c.prefix}bind` && this.recordSelfWrittenBind(T)), t === "style" && this.captureAndHideDisplay(), he?.(), x && !X && !(v.isUserEditableValue(l) && this.isSupersededByUserEdit(Q)) && (this.value = this.normalizeValueForElement(
4842
4872
  l,
4843
4873
  _
4844
- ), be && (l.value = _), this.recordValueWriteResult(l.value === _));
4845
- const St = Ve && !le, Rt = Me && !le;
4846
- St && (l.checked = xe), Rt && (l.selected = xe), (Ve || Me) && this.syncCheckableValueFromDom(Me);
4874
+ ), ye && (l.value = _), this.recordValueWriteResult(l.value === _));
4875
+ const St = Ve && !le, Rt = Ce && !le;
4876
+ St && (l.checked = xe), Rt && (l.selected = xe), (Ve || Ce) && this.syncCheckableValueFromDom(Ce);
4847
4877
  }).finally(() => {
4848
4878
  this.releaseSelfWritingAttributes(s);
4849
4879
  });
@@ -5342,7 +5372,7 @@ v.NUMBER_INPUT_PATTERN = /^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/, v.VALUE
5342
5372
  "time",
5343
5373
  "week"
5344
5374
  ], v.UNAPPLIED_VALUE_WRITES = /* @__PURE__ */ new Set(), v.sequenceCounter = 0, v.bindingWorkActiveCount = 0, v.pendingMutationFlusher = null, v.loggedUnresolvedAttributes = /* @__PURE__ */ new Set(), v.loggedTypeMismatchedComparisons = /* @__PURE__ */ new Set();
5345
- let S = v;
5375
+ let R = v;
5346
5376
  class ne extends N {
5347
5377
  /**
5348
5378
  * テキストフラグメントのコンストラクタ。
@@ -5591,11 +5621,11 @@ const Be = class Be {
5591
5621
  if (r(l)) {
5592
5622
  const u = Le.measure(
5593
5623
  () => ie.evaluateDetailed(l.text, e)
5594
- ), h = u.value;
5624
+ ), f = u.value;
5595
5625
  a += u.durationMs, s.push({
5596
5626
  expression: l.text,
5597
5627
  durationMs: u.durationMs
5598
- }), o = o || h.unresolvedReference, n.push(h.value);
5628
+ }), o = o || f.unresolvedReference, n.push(f.value);
5599
5629
  } else
5600
5630
  n.push(l.text);
5601
5631
  } catch (u) {
@@ -5979,7 +6009,7 @@ const we = class we {
5979
6009
  * @returns 表示要素の配列
5980
6010
  */
5981
6011
  static pages(e, t, r) {
5982
- return ft(e, t, r);
6012
+ return ht(e, t, r);
5983
6013
  }
5984
6014
  /**
5985
6015
  * `YYYY-MM` 形式の年月文字列に月数を加算します。
@@ -6003,7 +6033,7 @@ const we = class we {
6003
6033
  * @returns 年月情報の降順配列。不正な入力は空配列
6004
6034
  */
6005
6035
  static monthRange(e, t) {
6006
- return ht(e, t);
6036
+ return ft(e, t);
6007
6037
  }
6008
6038
  /**
6009
6039
  * ページレスポンスから表示用サマリーを作ります。
@@ -6055,7 +6085,7 @@ const we = class we {
6055
6085
  * @returns 重複排除後の新しい配列。非配列は空配列
6056
6086
  */
6057
6087
  static distinct(e, t) {
6058
- return bt(e, t);
6088
+ return yt(e, t);
6059
6089
  }
6060
6090
  /**
6061
6091
  * 配列を `item[key]` ごとのグループへ分けて返します。
@@ -6093,14 +6123,14 @@ we.enhancers = {
6093
6123
  }
6094
6124
  };
6095
6125
  let Re = we;
6096
- const Ct = "入力内容を確認してください", $t = ["addErrorMessage", "clearMessages"], _e = "data-haori-group-name";
6126
+ const Mt = "入力内容を確認してください", $t = ["addErrorMessage", "clearMessages"], _e = "data-haori-group-name";
6097
6127
  function et() {
6098
6128
  const e = globalThis.window?.Haori;
6099
6129
  return $t.every(
6100
6130
  (r) => typeof e?.[r] == "function"
6101
6131
  ) ? e : Re;
6102
6132
  }
6103
- const f = class f {
6133
+ const h = class h {
6104
6134
  /**
6105
6135
  * フォーム内にある入力エレメントの値をオブジェクトとして取得します。
6106
6136
  * data-form-object属性があると、そのエレメント内の値はオブジェクトとして処理されます。
@@ -6111,7 +6141,7 @@ const f = class f {
6111
6141
  */
6112
6142
  static getValues(e) {
6113
6143
  const t = {}, r = /* @__PURE__ */ new Set();
6114
- return f.getPartValues(e, t, null, r), f.registerCollectedExcludedKeys(t, r), t;
6144
+ return h.getPartValues(e, t, null, r), h.registerCollectedExcludedKeys(t, r), t;
6115
6145
  }
6116
6146
  /**
6117
6147
  * 入力エレメントから収集する値を解決します。
@@ -6132,11 +6162,11 @@ const f = class f {
6132
6162
  */
6133
6163
  static resolveCollectedValue(e) {
6134
6164
  const t = e.getTarget();
6135
- if (f.isFileInput(e)) {
6165
+ if (h.isFileInput(e)) {
6136
6166
  const r = t, i = r.files ? Array.from(r.files) : [];
6137
6167
  return r.multiple ? i : i.length > 0 ? i[0] : null;
6138
6168
  }
6139
- if (f.isBooleanCheckbox(e)) {
6169
+ if (h.isBooleanCheckbox(e)) {
6140
6170
  const r = t;
6141
6171
  return r.value === "false" ? !r.checked : r.checked;
6142
6172
  }
@@ -6189,13 +6219,13 @@ const f = class f {
6189
6219
  * @returns 戻り値はありません。
6190
6220
  */
6191
6221
  static clearRowUserEditMarksForChangedKeys(e, t) {
6192
- const r = f.getValues(e), i = /* @__PURE__ */ new Set();
6222
+ const r = h.getValues(e), i = /* @__PURE__ */ new Set();
6193
6223
  for (const n of /* @__PURE__ */ new Set([
6194
6224
  ...Object.keys(r),
6195
6225
  ...Object.keys(t)
6196
6226
  ]))
6197
- f.isSameCollectedValue(r[n], t[n]) || i.add(n);
6198
- i.size !== 0 && f.clearUserEditMarksForKeys(e, e, i);
6227
+ h.isSameCollectedValue(r[n], t[n]) || i.add(n);
6228
+ i.size !== 0 && h.clearUserEditMarksForKeys(e, e, i);
6199
6229
  }
6200
6230
  /**
6201
6231
  * 収集値と要素データの値が同じ内容かどうかを判定します。
@@ -6224,9 +6254,9 @@ const f = class f {
6224
6254
  * @returns 戻り値はありません。
6225
6255
  */
6226
6256
  static clearUserEditMarksForKeys(e, t, r) {
6227
- const i = f.resolveRowTopLevelKey(e, t);
6257
+ const i = h.resolveRowTopLevelKey(e, t);
6228
6258
  i !== null && r.has(i) && e.clearUserEditMark(), e.getChildElementFragments().forEach((n) => {
6229
- f.clearUserEditMarksForKeys(n, t, r);
6259
+ h.clearUserEditMarksForKeys(n, t, r);
6230
6260
  });
6231
6261
  }
6232
6262
  /**
@@ -6242,7 +6272,7 @@ const f = class f {
6242
6272
  static resolveRowTopLevelKey(e, t) {
6243
6273
  let r = null, i = e;
6244
6274
  for (; i !== null && i !== t; ) {
6245
- const n = i.getAttribute(`${c.prefix}form-object`) || i.getAttribute(`${c.prefix}form-list`) || f.resolveFieldName(i);
6275
+ const n = i.getAttribute(`${c.prefix}form-object`) || i.getAttribute(`${c.prefix}form-list`) || h.resolveFieldName(i);
6246
6276
  n != null && String(n) !== "" && (r = String(n)), i = i.getParent();
6247
6277
  }
6248
6278
  return r;
@@ -6283,7 +6313,7 @@ const f = class f {
6283
6313
  const r = e.getTarget();
6284
6314
  if (!(r instanceof HTMLInputElement) || r.type !== "radio" || r.hasAttribute("name") && !r.hasAttribute(_e))
6285
6315
  return;
6286
- const i = f.resolveGroupScope(e), n = `${String(t)}--haori${f.resolveGroupScopeId(
6316
+ const i = h.resolveGroupScope(e), n = `${String(t)}--haori${h.resolveGroupScopeId(
6287
6317
  i
6288
6318
  )}`;
6289
6319
  if (r.getAttribute("name") !== n)
@@ -6317,8 +6347,8 @@ const f = class f {
6317
6347
  * @returns スコープの識別番号
6318
6348
  */
6319
6349
  static resolveGroupScopeId(e) {
6320
- const t = f.GROUP_SCOPE_IDS.get(e);
6321
- return t !== void 0 ? t : (f.groupScopeSequence += 1, f.GROUP_SCOPE_IDS.set(e, f.groupScopeSequence), f.groupScopeSequence);
6350
+ const t = h.GROUP_SCOPE_IDS.get(e);
6351
+ return t !== void 0 ? t : (h.groupScopeSequence += 1, h.GROUP_SCOPE_IDS.set(e, h.groupScopeSequence), h.groupScopeSequence);
6322
6352
  }
6323
6353
  /**
6324
6354
  * 宣言バインドで値・状態が決まり、その評価が解決している入力かどうかを判定します。
@@ -6336,17 +6366,17 @@ const f = class f {
6336
6366
  * @returns 宣言バインドで値・状態が決まり、その評価が解決している場合 true
6337
6367
  */
6338
6368
  static hasResolvedDeclarativeState(e) {
6339
- if (!f.isDeclarativeStateBound(e))
6369
+ if (!h.isDeclarativeStateBound(e))
6340
6370
  return !1;
6341
6371
  const t = e.getTarget();
6342
6372
  if (t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio"))
6343
- return f.isDeclarationResolved(e, "checked");
6344
- if (f.hasDeclarativeBinding(e, "value"))
6345
- return f.isDeclarationResolved(e, "value");
6373
+ return h.isDeclarationResolved(e, "checked");
6374
+ if (h.hasDeclarativeBinding(e, "value"))
6375
+ return h.isDeclarationResolved(e, "value");
6346
6376
  if (t instanceof HTMLSelectElement) {
6347
6377
  for (const r of Array.from(t.options)) {
6348
6378
  const i = N.get(r);
6349
- if (i instanceof S && f.hasDeclarativeBinding(i, "selected") && !f.isDeclarationResolved(i, "selected"))
6379
+ if (i instanceof R && h.hasDeclarativeBinding(i, "selected") && !h.isDeclarationResolved(i, "selected"))
6350
6380
  return !1;
6351
6381
  }
6352
6382
  return !0;
@@ -6389,7 +6419,7 @@ const f = class f {
6389
6419
  */
6390
6420
  static isDeclarativeStateBound(e) {
6391
6421
  const t = e.getTarget();
6392
- return t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? f.hasDeclarativeBinding(e, "checked") : S.isValuePropertyTarget(t) ? f.hasDeclarativeBinding(e, "value") ? !0 : t instanceof HTMLSelectElement ? f.hasDeclarativeSelectedOption(t) : !1 : !1;
6422
+ return t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? h.hasDeclarativeBinding(e, "checked") : R.isValuePropertyTarget(t) ? h.hasDeclarativeBinding(e, "value") ? !0 : t instanceof HTMLSelectElement ? h.hasDeclarativeSelectedOption(t) : !1 : !1;
6393
6423
  }
6394
6424
  /**
6395
6425
  * 対象の部分木にある入力欄を、ネイティブのフォームリセットと同じ既定値へ戻します。
@@ -6409,7 +6439,7 @@ const f = class f {
6409
6439
  const t = "input, textarea, select", r = [];
6410
6440
  e.matches(t) && r.push(e), r.push(...e.querySelectorAll(t));
6411
6441
  for (const i of r)
6412
- 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);
6442
+ 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);
6413
6443
  }
6414
6444
  /**
6415
6445
  * `<select>` の選択状態を既定の選択(`defaultSelected`)へ戻します。
@@ -6439,14 +6469,14 @@ const f = class f {
6439
6469
  * @return 戻り値はありません。
6440
6470
  */
6441
6471
  static clearDeclarativeStateFromDom(e) {
6442
- if (f.isDeclarativeStateBound(e)) {
6472
+ if (h.isDeclarativeStateBound(e)) {
6443
6473
  const t = e.getTarget();
6444
6474
  t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? t.checked = !1 : t instanceof HTMLSelectElement ? (Array.from(t.options).forEach((r) => {
6445
6475
  r.selected = !1;
6446
6476
  }), t.selectedIndex = -1) : (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && (t.value = "");
6447
6477
  }
6448
6478
  e.getChildren().forEach((t) => {
6449
- t instanceof S && f.clearDeclarativeStateFromDom(t);
6479
+ t instanceof R && h.clearDeclarativeStateFromDom(t);
6450
6480
  });
6451
6481
  }
6452
6482
  /**
@@ -6476,7 +6506,7 @@ const f = class f {
6476
6506
  static hasDeclarativeSelectedOption(e) {
6477
6507
  for (const t of Array.from(e.options)) {
6478
6508
  const r = N.get(t);
6479
- if (r instanceof S && f.hasDeclarativeBinding(r, "selected"))
6509
+ if (r instanceof R && h.hasDeclarativeBinding(r, "selected"))
6480
6510
  return !0;
6481
6511
  }
6482
6512
  return !1;
@@ -6507,7 +6537,7 @@ const f = class f {
6507
6537
  * @returns 編集された入力欄だけを含む値のオブジェクト
6508
6538
  */
6509
6539
  static getValuesEditedAfter(e, t) {
6510
- return f.getPartValues(e, {}, t);
6540
+ return h.getPartValues(e, {}, t);
6511
6541
  }
6512
6542
  /**
6513
6543
  * 利用者が編集した入力欄に対応するバインドデータの経路を集めます。
@@ -6549,10 +6579,10 @@ const f = class f {
6549
6579
  */
6550
6580
  static collectEditedPaths(e, t, r = "", i = null) {
6551
6581
  const n = /* @__PURE__ */ new Map();
6552
- for (const a of f.collectUserEditSequences(e)) {
6582
+ for (const a of h.collectUserEditSequences(e)) {
6553
6583
  const o = /* @__PURE__ */ new Set();
6554
- f.walkEditedPaths(
6555
- f.getValuesEditedAfter(e, a - 1),
6584
+ h.walkEditedPaths(
6585
+ h.getValuesEditedAfter(e, a - 1),
6556
6586
  r,
6557
6587
  o
6558
6588
  );
@@ -6560,7 +6590,7 @@ const f = class f {
6560
6590
  n.has(l) || n.set(l, a);
6561
6591
  }
6562
6592
  const s = /* @__PURE__ */ new Set();
6563
- f.walkExcludedPaths(i ?? f.getValues(e), r, s);
6593
+ h.walkExcludedPaths(i ?? h.getValues(e), r, s);
6564
6594
  for (const a of s)
6565
6595
  n.has(a) || n.set(a, t);
6566
6596
  return n;
@@ -6573,7 +6603,7 @@ const f = class f {
6573
6603
  */
6574
6604
  static collectUserEditSequences(e) {
6575
6605
  const t = /* @__PURE__ */ new Set();
6576
- return f.walkUserEditSequences(e, t), [...t].sort((r, i) => i - r);
6606
+ return h.walkUserEditSequences(e, t), [...t].sort((r, i) => i - r);
6577
6607
  }
6578
6608
  /**
6579
6609
  * 部分木をたどってユーザー編集の通番を集めます。
@@ -6586,7 +6616,7 @@ const f = class f {
6586
6616
  const r = e.getUserEditSequence();
6587
6617
  r > 0 && t.add(r);
6588
6618
  for (const i of e.getChildElementFragments())
6589
- f.walkUserEditSequences(i, t);
6619
+ h.walkUserEditSequences(i, t);
6590
6620
  }
6591
6621
  /**
6592
6622
  * 収集値をたどって、除外されたキーの経路を集めます。
@@ -6601,15 +6631,15 @@ const f = class f {
6601
6631
  static walkExcludedPaths(e, t, r) {
6602
6632
  if (Array.isArray(e))
6603
6633
  return;
6604
- const i = f.asPlainRecord(e);
6634
+ const i = h.asPlainRecord(e);
6605
6635
  if (i === null)
6606
6636
  return;
6607
- const n = f.COLLECTED_EXCLUDED_KEYS.get(i);
6637
+ const n = h.COLLECTED_EXCLUDED_KEYS.get(i);
6608
6638
  if (n)
6609
6639
  for (const s of n)
6610
6640
  s in i || r.add(t === "" ? s : `${t}.${s}`);
6611
6641
  for (const [s, a] of Object.entries(i))
6612
- f.walkExcludedPaths(
6642
+ h.walkExcludedPaths(
6613
6643
  a,
6614
6644
  t === "" ? s : `${t}.${s}`,
6615
6645
  r
@@ -6625,10 +6655,10 @@ const f = class f {
6625
6655
  static walkEditedPaths(e, t, r) {
6626
6656
  if (Array.isArray(e))
6627
6657
  return;
6628
- const i = f.asPlainRecord(e);
6658
+ const i = h.asPlainRecord(e);
6629
6659
  if (i !== null) {
6630
6660
  for (const [n, s] of Object.entries(i))
6631
- f.walkEditedPaths(
6661
+ h.walkEditedPaths(
6632
6662
  s,
6633
6663
  t === "" ? n : `${t}.${n}`,
6634
6664
  r
@@ -6643,7 +6673,7 @@ const f = class f {
6643
6673
  * @returns 最中なら true
6644
6674
  */
6645
6675
  static isResettingInternally() {
6646
- return f.internalResetDepth > 0;
6676
+ return h.internalResetDepth > 0;
6647
6677
  }
6648
6678
  /**
6649
6679
  * フォーム内の各入力エレメントから値を取得し、オブジェクトとして返します。
@@ -6662,75 +6692,75 @@ const f = class f {
6662
6692
  return t;
6663
6693
  if (e.getTarget().hasAttribute(`${c.prefix}if-false`)) {
6664
6694
  if (i !== null)
6665
- for (const u of f.collectDeclaredKeysInFragment(e))
6695
+ for (const u of h.collectDeclaredKeysInFragment(e))
6666
6696
  i.add(u);
6667
6697
  return t;
6668
6698
  }
6669
- const n = f.resolveFieldName(e), s = e.getAttribute(`${c.prefix}form-object`), a = e.getAttribute(`${c.prefix}form-list`), o = e.hasAttribute(`${c.prefix}form-list`), l = r !== null && e.getUserEditSequence() <= r;
6699
+ const n = h.resolveFieldName(e), s = e.getAttribute(`${c.prefix}form-object`), a = e.getAttribute(`${c.prefix}form-list`), o = e.hasAttribute(`${c.prefix}form-list`), l = r !== null && e.getUserEditSequence() <= r;
6670
6700
  if (n) {
6671
- if (r !== null && f.isGroupedCheckable(e)) {
6672
- const u = f.collectGroupSelection(
6701
+ if (r !== null && h.isGroupedCheckable(e)) {
6702
+ const u = h.collectGroupSelection(
6673
6703
  e,
6674
6704
  o,
6675
6705
  r
6676
6706
  );
6677
6707
  u.edited && (t[String(n)] = u.value);
6678
- } else if (o && f.isGroupedCheckable(e)) {
6679
- const u = String(n), h = e.getTarget();
6680
- r === null && !Array.isArray(t[u]) && (t[u] = []), !l && h.checked && (Array.isArray(t[u]) || (t[u] = []), t[u].push(h.value));
6708
+ } else if (o && h.isGroupedCheckable(e)) {
6709
+ const u = String(n), f = e.getTarget();
6710
+ r === null && !Array.isArray(t[u]) && (t[u] = []), !l && f.checked && (Array.isArray(t[u]) || (t[u] = []), t[u].push(f.value));
6681
6711
  } else if (o && l)
6682
6712
  Array.isArray(t[String(n)]) ? t[String(n)].push(null) : t[String(n)] = [null];
6683
6713
  else if (!l) if (o) {
6684
- const u = f.resolveCollectedValue(e), h = f.isFileInput(e) && Array.isArray(u) ? u : [u];
6685
- Array.isArray(t[String(n)]) ? t[String(n)].push(...h) : t[String(n)] = h;
6686
- } else if (f.isGroupedCheckable(e)) {
6687
- const u = e.getTarget(), h = u instanceof HTMLInputElement ? u.checked : !0, m = u instanceof HTMLInputElement ? u.value : e.getValue(), y = h ? m : null, E = String(n);
6688
- y === null ? E in t || (t[E] = null) : t[E] === null || t[E] === void 0 ? t[E] = y : Array.isArray(t[E]) ? t[E].push(y) : t[E] = [t[E], y];
6714
+ const u = h.resolveCollectedValue(e), f = h.isFileInput(e) && Array.isArray(u) ? u : [u];
6715
+ Array.isArray(t[String(n)]) ? t[String(n)].push(...f) : t[String(n)] = f;
6716
+ } else if (h.isGroupedCheckable(e)) {
6717
+ const u = e.getTarget(), f = u instanceof HTMLInputElement ? u.checked : !0, m = u instanceof HTMLInputElement ? u.value : e.getValue(), b = f ? m : null, E = String(n);
6718
+ b === null ? E in t || (t[E] = null) : t[E] === null || t[E] === void 0 ? t[E] = b : Array.isArray(t[E]) ? t[E].push(b) : t[E] = [t[E], b];
6689
6719
  } else
6690
- t[String(n)] = f.resolveCollectedValue(e);
6720
+ t[String(n)] = h.resolveCollectedValue(e);
6691
6721
  s && g.warn(
6692
6722
  "Haori",
6693
6723
  `Element cannot have both ${c.prefix}form-object and name attributes.`
6694
6724
  );
6695
6725
  for (const u of e.getChildElementFragments())
6696
- f.getPartValues(u, t, r, i);
6726
+ h.getPartValues(u, t, r, i);
6697
6727
  } else if (s) {
6698
- const u = {}, h = i === null ? null : /* @__PURE__ */ new Set();
6728
+ const u = {}, f = i === null ? null : /* @__PURE__ */ new Set();
6699
6729
  for (const m of e.getChildElementFragments())
6700
- f.getPartValues(
6730
+ h.getPartValues(
6701
6731
  m,
6702
6732
  u,
6703
6733
  r,
6704
- h
6734
+ f
6705
6735
  );
6706
- h !== null && f.registerCollectedExcludedKeys(u, h), Object.keys(u).length > 0 ? t[String(s)] = u : i !== null && (h?.size ?? 0) > 0 && i.add(String(s)), a && g.warn(
6736
+ f !== null && h.registerCollectedExcludedKeys(u, f), Object.keys(u).length > 0 ? t[String(s)] = u : i !== null && (f?.size ?? 0) > 0 && i.add(String(s)), a && g.warn(
6707
6737
  "Haori",
6708
6738
  `Element cannot have both ${c.prefix}form-list and ${c.prefix}form-object attributes.`
6709
6739
  );
6710
6740
  } else if (a) {
6711
- const u = [], h = [];
6741
+ const u = [], f = [];
6712
6742
  let m = !1;
6713
- for (const y of e.getChildElementFragments()) {
6743
+ for (const b of e.getChildElementFragments()) {
6714
6744
  const E = {}, A = i === null ? null : /* @__PURE__ */ new Set();
6715
- f.getPartValues(
6716
- y,
6745
+ h.getPartValues(
6746
+ b,
6717
6747
  E,
6718
6748
  r,
6719
6749
  A
6720
- ), A !== null && f.registerCollectedExcludedKeys(E, A), Object.keys(E).length > 0 ? (m = !0, u.push(E), h.push(y.getListKey())) : r !== null && (u.push({}), h.push(y.getListKey()));
6750
+ ), A !== null && h.registerCollectedExcludedKeys(E, A), Object.keys(E).length > 0 ? (m = !0, u.push(E), f.push(b.getListKey())) : r !== null && (u.push({}), f.push(b.getListKey()));
6721
6751
  }
6722
6752
  if (r === null) {
6723
- const y = e.getAttribute(`${c.prefix}each-key`);
6724
- f.registerCollectedRowIdentity(
6753
+ const b = e.getAttribute(`${c.prefix}each-key`);
6754
+ h.registerCollectedRowIdentity(
6725
6755
  u,
6726
- y == null ? null : String(y),
6727
- h,
6728
- f.isCollectedListFromEachSource(e)
6729
- ), f.warnDerivedRowsWithoutKey(e), t[String(a)] = u;
6756
+ b == null ? null : String(b),
6757
+ f,
6758
+ h.isCollectedListFromEachSource(e)
6759
+ ), h.warnDerivedRowsWithoutKey(e), t[String(a)] = u;
6730
6760
  } else m && (t[String(a)] = u);
6731
6761
  } else
6732
6762
  for (const u of e.getChildElementFragments())
6733
- f.getPartValues(u, t, r, i);
6763
+ h.getPartValues(u, t, r, i);
6734
6764
  return t;
6735
6765
  }
6736
6766
  /**
@@ -6743,7 +6773,7 @@ const f = class f {
6743
6773
  * @returns Promise(DOMの更新が完了したら解決される)
6744
6774
  */
6745
6775
  static setValues(e, t, r = !1) {
6746
- return f.setPartValues(e, t, r, !0);
6776
+ return h.setPartValues(e, t, r, !0);
6747
6777
  }
6748
6778
  /**
6749
6779
  * フォーム内にある入力エレメントに値をイベントなしで設定します。
@@ -6756,7 +6786,7 @@ const f = class f {
6756
6786
  * @returns Promise(DOMの更新が完了したら解決される)
6757
6787
  */
6758
6788
  static syncValues(e, t, r = !1, i = null) {
6759
- return f.setPartValues(
6789
+ return h.setPartValues(
6760
6790
  e,
6761
6791
  t,
6762
6792
  r,
@@ -6779,7 +6809,7 @@ const f = class f {
6779
6809
  * @returns 反映完了の Promise
6780
6810
  */
6781
6811
  static syncRowValues(e, t, r = null) {
6782
- return f.setPartValues(
6812
+ return h.setPartValues(
6783
6813
  e,
6784
6814
  t,
6785
6815
  !1,
@@ -6809,7 +6839,7 @@ const f = class f {
6809
6839
  if (!r)
6810
6840
  return t;
6811
6841
  const i = String(r);
6812
- return Object.prototype.hasOwnProperty.call(t, i) ? f.asPlainRecord(t[i]) ?? {} : f.resolveAncestorArgOwner(e, i)?.value ?? {};
6842
+ return Object.prototype.hasOwnProperty.call(t, i) ? h.asPlainRecord(t[i]) ?? {} : h.resolveAncestorArgOwner(e, i)?.value ?? {};
6813
6843
  }
6814
6844
  /**
6815
6845
  * キーを所有する祖先を、値の型を問わず解決します。
@@ -6855,11 +6885,11 @@ const f = class f {
6855
6885
  * @returns 所有する祖先フラグメントとその値。見つからない場合は null
6856
6886
  */
6857
6887
  static resolveAncestorArgOwner(e, t) {
6858
- const r = f.resolveAncestorKeyOwner(e, t);
6888
+ const r = h.resolveAncestorKeyOwner(e, t);
6859
6889
  if (r === null)
6860
6890
  return null;
6861
- const i = f.asPlainRecord(r.value);
6862
- return i === null ? (f.warnArgOwnerIsNotRecord(e, t, r.value), null) : { owner: r.owner, value: i };
6891
+ const i = h.asPlainRecord(r.value);
6892
+ return i === null ? (h.warnArgOwnerIsNotRecord(e, t, r.value), null) : { owner: r.owner, value: i };
6863
6893
  }
6864
6894
  /**
6865
6895
  * 収集キーの土台を祖先から解決する関数を返します。
@@ -6873,7 +6903,7 @@ const f = class f {
6873
6903
  * @returns キーを受け取り、祖先が所有する値を返す関数(所有者が無ければ undefined)
6874
6904
  */
6875
6905
  static ancestorBaseResolver(e) {
6876
- return (t) => f.resolveAncestorKeyOwner(e, t)?.value;
6906
+ return (t) => h.resolveAncestorKeyOwner(e, t)?.value;
6877
6907
  }
6878
6908
  /**
6879
6909
  * `data-form-arg` のキーをレコード以外で所有している構成を、開発モードで知らせます。
@@ -6885,8 +6915,8 @@ const f = class f {
6885
6915
  static warnArgOwnerIsNotRecord(e, t, r) {
6886
6916
  if (!q.isEnabled() || r == null)
6887
6917
  return;
6888
- const i = e.getTarget(), n = f.warnedArgOwnerNotRecord.get(i);
6889
- n?.has(t) || (n ? n.add(t) : f.warnedArgOwnerNotRecord.set(i, /* @__PURE__ */ new Set([t])), g.warn(
6918
+ const i = e.getTarget(), n = h.warnedArgOwnerNotRecord.get(i);
6919
+ n?.has(t) || (n ? n.add(t) : h.warnedArgOwnerNotRecord.set(i, /* @__PURE__ */ new Set([t])), g.warn(
6890
6920
  "[Haori]",
6891
6921
  `${c.prefix}form-arg="${t}" のキーを祖先が${Array.isArray(r) ? "配列" : `${typeof r} 型の値`}で持っています。${c.prefix}form-arg はそのキーの配下に入力欄が対応することを宣言するため、値はレコード(オブジェクト)である必要があります。このままでは収集値がそのキーへ直接入り、値の型が変わります。`
6892
6922
  ));
@@ -6908,18 +6938,18 @@ const f = class f {
6908
6938
  static buildConditionScope(e, t = null) {
6909
6939
  const r = { ...e.getBindingData() }, i = t ? {
6910
6940
  source: t,
6911
- argKey: f.resolveFormArgKey(t)
6912
- } : f.resolveConditionValueSource(e);
6941
+ argKey: h.resolveFormArgKey(t)
6942
+ } : h.resolveConditionValueSource(e);
6913
6943
  if (!i)
6914
6944
  return r;
6915
- const n = f.getValues(i.source), s = f.collectDeclaredFieldKeys(i.source);
6945
+ const n = h.getValues(i.source), s = h.collectDeclaredFieldKeys(i.source);
6916
6946
  if (i.argKey === null) {
6917
6947
  for (const o of s)
6918
6948
  r[o] = n[o];
6919
6949
  return r;
6920
6950
  }
6921
6951
  const a = {
6922
- ...f.asPlainRecord(r[i.argKey]) ?? {}
6952
+ ...h.asPlainRecord(r[i.argKey]) ?? {}
6923
6953
  };
6924
6954
  for (const o of s)
6925
6955
  a[o] = n[o];
@@ -6949,8 +6979,8 @@ const f = class f {
6949
6979
  }
6950
6980
  t = i;
6951
6981
  }
6952
- const r = f.getFormFragment(e);
6953
- return r ? { source: r, argKey: f.resolveFormArgKey(r) } : null;
6982
+ const r = h.getFormFragment(e);
6983
+ return r ? { source: r, argKey: h.resolveFormArgKey(r) } : null;
6954
6984
  }
6955
6985
  /**
6956
6986
  * フォームコンテナの `data-form-arg` のキー名を返します。
@@ -6982,7 +7012,7 @@ const f = class f {
6982
7012
  * @returns 宣言されている最上位のキー名
6983
7013
  */
6984
7014
  static collectDeclaredFieldKeys(e) {
6985
- return f.collectDeclaredKeysInFragment(e);
7015
+ return h.collectDeclaredKeysInFragment(e);
6986
7016
  }
6987
7017
  /**
6988
7018
  * フラグメントの配下で収集対象として**宣言されている**最上位のキー名を列挙します。
@@ -6994,7 +7024,7 @@ const f = class f {
6994
7024
  * @returns 宣言されている最上位のキー名
6995
7025
  */
6996
7026
  static collectDeclaredKeysInFragment(e) {
6997
- const t = /* @__PURE__ */ new Set(), r = e.getTarget(), i = f.resolveFieldName(e);
7027
+ const t = /* @__PURE__ */ new Set(), r = e.getTarget(), i = h.resolveFieldName(e);
6998
7028
  i && t.add(String(i));
6999
7029
  const n = `${c.prefix}form-object`, s = `${c.prefix}form-list`, a = r.getAttribute(n) ?? r.getAttribute(s);
7000
7030
  if (a)
@@ -7003,12 +7033,12 @@ const f = class f {
7003
7033
  return r.querySelectorAll(o).forEach((l) => {
7004
7034
  if (!(l instanceof HTMLElement))
7005
7035
  return;
7006
- let u = null, h = !1, m = l;
7036
+ let u = null, f = !1, m = l;
7007
7037
  for (; m && m !== r; )
7008
- m.hasAttribute(`${c.prefix}form-detach`) && (h = !0), (m.hasAttribute(n) || m.hasAttribute(s)) && (u = m), m = m.parentElement;
7009
- if (h)
7038
+ m.hasAttribute(`${c.prefix}form-detach`) && (f = !0), (m.hasAttribute(n) || m.hasAttribute(s)) && (u = m), m = m.parentElement;
7039
+ if (f)
7010
7040
  return;
7011
- const y = u ?? l, E = y.getAttribute(n) || y.getAttribute(s) || y.getAttribute(`${c.prefix}form-name`) || y.getAttribute("name");
7041
+ const b = u ?? l, E = b.getAttribute(n) || b.getAttribute(s) || b.getAttribute(`${c.prefix}form-name`) || b.getAttribute("name");
7012
7042
  E && t.add(E);
7013
7043
  }), t;
7014
7044
  }
@@ -7024,7 +7054,7 @@ const f = class f {
7024
7054
  */
7025
7055
  static applyCustomValidity(e) {
7026
7056
  const t = `${c.prefix}validity`, r = (i) => {
7027
- i.hasAttribute(t) && f.applyOneCustomValidity(i, t), i.getChildElementFragments().forEach(r);
7057
+ i.hasAttribute(t) && h.applyOneCustomValidity(i, t), i.getChildElementFragments().forEach(r);
7028
7058
  };
7029
7059
  r(e);
7030
7060
  }
@@ -7049,19 +7079,19 @@ const f = class f {
7049
7079
  r.setCustomValidity("");
7050
7080
  return;
7051
7081
  }
7052
- const n = f.buildConditionScope(e), s = ie.evaluateDetailed(
7053
- f.unwrapConditionExpression(i),
7082
+ const n = h.buildConditionScope(e), s = ie.evaluateDetailed(
7083
+ h.unwrapConditionExpression(i),
7054
7084
  n
7055
7085
  );
7056
7086
  if (s.unresolvedReference) {
7057
7087
  g.warn(
7058
7088
  "Haori",
7059
7089
  `${t} の参照が解決できないため無効として扱います: ${i}`
7060
- ), r.setCustomValidity(f.resolveValidityMessage(e));
7090
+ ), r.setCustomValidity(h.resolveValidityMessage(e));
7061
7091
  return;
7062
7092
  }
7063
7093
  r.setCustomValidity(
7064
- s.value ? "" : f.resolveValidityMessage(e)
7094
+ s.value ? "" : h.resolveValidityMessage(e)
7065
7095
  );
7066
7096
  }
7067
7097
  /**
@@ -7072,7 +7102,7 @@ const f = class f {
7072
7102
  */
7073
7103
  static resolveValidityMessage(e) {
7074
7104
  const t = e.getAttribute(`${c.prefix}validity-message`);
7075
- return typeof t == "string" && t.trim() !== "" ? t : Ct;
7105
+ return typeof t == "string" && t.trim() !== "" ? t : Mt;
7076
7106
  }
7077
7107
  /**
7078
7108
  * 条件属性の値から式を取り出します。
@@ -7123,7 +7153,7 @@ const f = class f {
7123
7153
  * @param identifiesItems リストキーで収集先の配列要素を識別できるかどうか
7124
7154
  */
7125
7155
  static registerCollectedRowIdentity(e, t, r, i) {
7126
- f.COLLECTED_ROW_IDENTITY.set(e, { keyArg: t, keys: r, identifiesItems: i });
7156
+ h.COLLECTED_ROW_IDENTITY.set(e, { keyArg: t, keys: r, identifiesItems: i });
7127
7157
  }
7128
7158
  /**
7129
7159
  * 収集値の階層に、除外されたキーの集合を結び付けます。
@@ -7132,7 +7162,7 @@ const f = class f {
7132
7162
  * @param keys 除外されたキー
7133
7163
  */
7134
7164
  static registerCollectedExcludedKeys(e, t) {
7135
- t.size > 0 && f.COLLECTED_EXCLUDED_KEYS.set(e, t);
7165
+ t.size > 0 && h.COLLECTED_EXCLUDED_KEYS.set(e, t);
7136
7166
  }
7137
7167
  /**
7138
7168
  * 収集値に控えた情報を、複製した値へ引き継ぎます。
@@ -7145,10 +7175,10 @@ const f = class f {
7145
7175
  * @param to 複製した値
7146
7176
  */
7147
7177
  static carryCollectedRowIdentity(e, t) {
7148
- const r = f.COLLECTED_ROW_IDENTITY.get(e);
7149
- r && f.COLLECTED_ROW_IDENTITY.set(t, r);
7150
- const i = f.COLLECTED_EXCLUDED_KEYS.get(e);
7151
- i && f.COLLECTED_EXCLUDED_KEYS.set(t, i);
7178
+ const r = h.COLLECTED_ROW_IDENTITY.get(e);
7179
+ r && h.COLLECTED_ROW_IDENTITY.set(t, r);
7180
+ const i = h.COLLECTED_EXCLUDED_KEYS.get(e);
7181
+ i && h.COLLECTED_EXCLUDED_KEYS.set(t, i);
7152
7182
  }
7153
7183
  /**
7154
7184
  * 行の対応付けが出現順へ退いたことを、開発モードで一度だけ知らせます。
@@ -7160,7 +7190,7 @@ const f = class f {
7160
7190
  * @param reason 退いた理由
7161
7191
  */
7162
7192
  static warnPositionalRowFallback(e) {
7163
- !q.isEnabled() || f.warnedPositionalRowFallbacks.has(e) || (f.warnedPositionalRowFallbacks.add(e), g.warn(
7193
+ !q.isEnabled() || h.warnedPositionalRowFallbacks.has(e) || (h.warnedPositionalRowFallbacks.add(e), g.warn(
7164
7194
  "[Haori]",
7165
7195
  `${c.prefix}form-list の行を出現順で対応付けます(${e})。配列と画面の行数・並びが一致していない場合、行の値を取り違えます。`
7166
7196
  ));
@@ -7183,7 +7213,7 @@ const f = class f {
7183
7213
  if (!q.isEnabled() || e.getRawAttribute(`${c.prefix}each-key`) !== null)
7184
7214
  return;
7185
7215
  const t = e.getRawAttribute(`${c.prefix}each`);
7186
- t === null || f.resolveLeadingPath(t) !== null || f.warnedDerivedRowsWithoutKey.has(t) || (f.warnedDerivedRowsWithoutKey.add(t), g.warn(
7216
+ t === null || h.resolveLeadingPath(t) !== null || h.warnedDerivedRowsWithoutKey.has(t) || (h.warnedDerivedRowsWithoutKey.add(t), g.warn(
7187
7217
  "[Haori]",
7188
7218
  `${c.prefix}each="${t}" の一覧を ${c.prefix}form-list で収集していますが、${c.prefix}each-key がありません。行と配列要素を出現順で対応付けるため、画面に出ていない要素があると行の値を取り違えます。${c.prefix}each-key を宣言してください。`
7189
7219
  ));
@@ -7230,12 +7260,12 @@ const f = class f {
7230
7260
  static mergeCollectedValues(e, t, r = null) {
7231
7261
  const i = { ...e ?? {} };
7232
7262
  for (const [s, a] of Object.entries(t)) {
7233
- if (f.UNSAFE_MERGE_KEYS.has(s))
7263
+ if (h.UNSAFE_MERGE_KEYS.has(s))
7234
7264
  continue;
7235
7265
  const o = e && Object.prototype.hasOwnProperty.call(e, s) ? e[s] : r?.(s);
7236
- i[s] = f.overlayCollectedValue(o, a);
7266
+ i[s] = h.overlayCollectedValue(o, a);
7237
7267
  }
7238
- const n = f.COLLECTED_EXCLUDED_KEYS.get(t);
7268
+ const n = h.COLLECTED_EXCLUDED_KEYS.get(t);
7239
7269
  if (n)
7240
7270
  for (const s of n)
7241
7271
  s in t || delete i[s];
@@ -7252,13 +7282,13 @@ const f = class f {
7252
7282
  if (Array.isArray(t)) {
7253
7283
  if (!Array.isArray(e))
7254
7284
  return t;
7255
- const n = f.overlayIdentifiedRows(e, t);
7285
+ const n = h.overlayIdentifiedRows(e, t);
7256
7286
  return n !== null ? n : t.map(
7257
- (s, a) => f.overlayCollectedValue(e[a], s)
7287
+ (s, a) => h.overlayCollectedValue(e[a], s)
7258
7288
  );
7259
7289
  }
7260
- const r = f.asPlainRecord(t), i = f.asPlainRecord(e);
7261
- return r === null || i === null ? t : f.mergeCollectedValues(i, r);
7290
+ const r = h.asPlainRecord(t), i = h.asPlainRecord(e);
7291
+ return r === null || i === null ? t : h.mergeCollectedValues(i, r);
7262
7292
  }
7263
7293
  /**
7264
7294
  * 式の先頭にある素の経路を返します。
@@ -7276,7 +7306,7 @@ const f = class f {
7276
7306
  * @returns 先頭の経路。経路として読めない場合は null
7277
7307
  */
7278
7308
  static resolveLeadingPath(e) {
7279
- const t = f.LEADING_PATH_PATTERN.exec(e);
7309
+ const t = h.LEADING_PATH_PATTERN.exec(e);
7280
7310
  if (!t)
7281
7311
  return null;
7282
7312
  const r = t[2].trim();
@@ -7313,7 +7343,7 @@ const f = class f {
7313
7343
  const r = e.getRawAttribute(`${c.prefix}each`);
7314
7344
  if (typeof r != "string" || r.trim() === "")
7315
7345
  return !0;
7316
- const i = f.resolveLeadingPath(r);
7346
+ const i = h.resolveLeadingPath(r);
7317
7347
  if (i === null)
7318
7348
  return !0;
7319
7349
  const n = i.split(".");
@@ -7337,7 +7367,7 @@ const f = class f {
7337
7367
  static createRowKeyIndexes(e, t) {
7338
7368
  const r = /* @__PURE__ */ new Map();
7339
7369
  return e.forEach((i, n) => {
7340
- const s = C.createListKey(
7370
+ const s = M.createListKey(
7341
7371
  i,
7342
7372
  t,
7343
7373
  n
@@ -7368,7 +7398,7 @@ const f = class f {
7368
7398
  const i = e.map((s) => s.getListKey());
7369
7399
  if (i.some((s) => s === null))
7370
7400
  return null;
7371
- const n = f.createRowKeyIndexes(t, r);
7401
+ const n = h.createRowKeyIndexes(t, r);
7372
7402
  return i.map((s) => {
7373
7403
  const a = n.get(s);
7374
7404
  return !a || a.length === 0 ? null : t[a.shift()];
@@ -7398,22 +7428,22 @@ const f = class f {
7398
7428
  * @returns 重ね合わせた配列。対応付けができない場合は null(出現順へ退く)
7399
7429
  */
7400
7430
  static overlayIdentifiedRows(e, t) {
7401
- const r = f.COLLECTED_ROW_IDENTITY.get(t);
7431
+ const r = h.COLLECTED_ROW_IDENTITY.get(t);
7402
7432
  if (r && !r.identifiesItems)
7403
7433
  return null;
7404
7434
  if (!r)
7405
- return t.some((s) => f.asPlainRecord(s) !== null) && f.warnPositionalRowFallback("識別情報が引き継がれていません"), null;
7435
+ return t.some((s) => h.asPlainRecord(s) !== null) && h.warnPositionalRowFallback("識別情報が引き継がれていません"), null;
7406
7436
  if (r.keys.length !== t.length)
7407
- return f.warnPositionalRowFallback("収集後に行の数が変わっています"), null;
7437
+ return h.warnPositionalRowFallback("収集後に行の数が変わっています"), null;
7408
7438
  if (r.keys.some((s) => s === null))
7409
7439
  return null;
7410
- const i = f.createRowKeyIndexes(e, r.keyArg), n = e.slice();
7440
+ const i = h.createRowKeyIndexes(e, r.keyArg), n = e.slice();
7411
7441
  for (let s = 0; s < t.length; s += 1) {
7412
7442
  const a = r.keys[s], o = i.get(a);
7413
7443
  if (!o || o.length === 0)
7414
7444
  continue;
7415
7445
  const l = o.shift();
7416
- n[l] = f.overlayCollectedValue(
7446
+ n[l] = h.overlayCollectedValue(
7417
7447
  e[l],
7418
7448
  t[s]
7419
7449
  );
@@ -7447,20 +7477,20 @@ const f = class f {
7447
7477
  */
7448
7478
  static syncAncestorArgForms(e, t, r = null, i = null) {
7449
7479
  const n = [];
7450
- for (const { form: a, key: o } of f.collectArgForms(e)) {
7480
+ for (const { form: a, key: o } of h.collectArgForms(e)) {
7451
7481
  if (a.wasResetAfter(t))
7452
7482
  continue;
7453
- const l = f.resolveAncestorArgOwner(a, o);
7454
- !l || l.owner !== e || n.push(f.pushAncestorArgValue(a, o, l.value, r));
7483
+ const l = h.resolveAncestorArgOwner(a, o);
7484
+ !l || l.owner !== e || n.push(h.pushAncestorArgValue(a, o, l.value, r));
7455
7485
  }
7456
7486
  const s = e.getRawBindingData();
7457
- for (const { form: a, keys: o } of f.collectShadowingContainers(e)) {
7487
+ for (const { form: a, keys: o } of h.collectShadowingContainers(e)) {
7458
7488
  if (a.wasResetAfter(t))
7459
7489
  continue;
7460
7490
  const l = o.filter(
7461
- (u) => f.createArgValueSignature(i?.[u]) !== f.createArgValueSignature(s?.[u])
7491
+ (u) => h.createArgValueSignature(i?.[u]) !== h.createArgValueSignature(s?.[u])
7462
7492
  );
7463
- l.length !== 0 && n.push(f.releaseOwnCopy(a, l, r));
7493
+ l.length !== 0 && n.push(h.releaseOwnCopy(a, l, r));
7464
7494
  }
7465
7495
  return Promise.all(n).then(() => {
7466
7496
  });
@@ -7489,12 +7519,12 @@ const f = class f {
7489
7519
  const t = `${c.prefix}form-arg`, r = [];
7490
7520
  return e.getTarget().querySelectorAll(`form:not([${t}]), [${c.prefix}form]`).forEach((i) => {
7491
7521
  const n = N.get(i);
7492
- if (!(n instanceof S))
7522
+ if (!(n instanceof R))
7493
7523
  return;
7494
7524
  const s = n.getRawBindingData();
7495
7525
  if (s === null)
7496
7526
  return;
7497
- const a = f.getInitialBindingData(n), o = Object.keys(s).filter((l) => Object.prototype.hasOwnProperty.call(a ?? {}, l) ? !1 : f.resolveAncestorKeyOwner(n, l)?.owner === e);
7527
+ const a = h.getInitialBindingData(n), o = Object.keys(s).filter((l) => Object.prototype.hasOwnProperty.call(a ?? {}, l) ? !1 : h.resolveAncestorKeyOwner(n, l)?.owner === e);
7498
7528
  o.length > 0 && r.push({ form: n, keys: o });
7499
7529
  }), r;
7500
7530
  }
@@ -7517,9 +7547,9 @@ const f = class f {
7517
7547
  const n = { ...i };
7518
7548
  for (const s of t)
7519
7549
  delete n[s];
7520
- return C.setBindingData(e.getTarget(), n, {
7550
+ return M.setBindingData(e.getTarget(), n, {
7521
7551
  kind: r?.kind ?? "supply",
7522
- sequence: r?.sequence ?? S.nextSequence()
7552
+ sequence: r?.sequence ?? R.nextSequence()
7523
7553
  });
7524
7554
  }
7525
7555
  /**
@@ -7532,7 +7562,7 @@ const f = class f {
7532
7562
  const t = `${c.prefix}form-arg`, r = e.getTarget().querySelectorAll(`form[${t}]`), i = [];
7533
7563
  return r.forEach((n) => {
7534
7564
  const s = N.get(n);
7535
- if (!(s instanceof S))
7565
+ if (!(s instanceof R))
7536
7566
  return;
7537
7567
  const a = s.getAttribute(t);
7538
7568
  a && i.push({ form: s, key: String(a) });
@@ -7555,15 +7585,15 @@ const f = class f {
7555
7585
  * @returns 反映完了の Promise
7556
7586
  */
7557
7587
  static pushAncestorArgValue(e, t, r, i = null) {
7558
- const n = e.getTarget(), s = f.createArgValueSignature(r);
7588
+ const n = e.getTarget(), s = h.createArgValueSignature(r);
7559
7589
  if (s !== null) {
7560
- if (f.LAST_ANCESTOR_ARG_VALUES.get(n) === s)
7590
+ if (h.LAST_ANCESTOR_ARG_VALUES.get(n) === s)
7561
7591
  return Promise.resolve();
7562
- f.LAST_ANCESTOR_ARG_VALUES.set(n, s);
7592
+ h.LAST_ANCESTOR_ARG_VALUES.set(n, s);
7563
7593
  } else
7564
- f.LAST_ANCESTOR_ARG_VALUES.delete(n);
7594
+ h.LAST_ANCESTOR_ARG_VALUES.delete(n);
7565
7595
  const a = e.getRawBindingData();
7566
- return a && Object.prototype.hasOwnProperty.call(a, t) ? f.releaseOwnCopy(e, [t], i) : f.syncValues(e, r, !1, i);
7596
+ return a && Object.prototype.hasOwnProperty.call(a, t) ? h.releaseOwnCopy(e, [t], i) : h.syncValues(e, r, !1, i);
7567
7597
  }
7568
7598
  /**
7569
7599
  * 流し込み済み判定に使う値の署名を作ります。
@@ -7602,23 +7632,23 @@ const f = class f {
7602
7632
  });
7603
7633
  const r = [];
7604
7634
  for (const i of t) {
7605
- if (f.INITIAL_RESTORED_FORMS.has(i))
7635
+ if (h.INITIAL_RESTORED_FORMS.has(i))
7606
7636
  continue;
7607
7637
  const n = N.get(i);
7608
- if (!(n instanceof S))
7638
+ if (!(n instanceof R))
7609
7639
  continue;
7610
- const s = n.getRawBindingData(), a = n.getAttribute(`${c.prefix}form-arg`), o = a ? String(a) : null, l = o !== null && !(s && Object.prototype.hasOwnProperty.call(s, o)) ? f.resolveAncestorArgOwner(n, o) : null;
7640
+ const s = n.getRawBindingData(), a = n.getAttribute(`${c.prefix}form-arg`), o = a ? String(a) : null, l = o !== null && !(s && Object.prototype.hasOwnProperty.call(s, o)) ? h.resolveAncestorArgOwner(n, o) : null;
7611
7641
  if (!(!s && !l)) {
7612
- if (f.INITIAL_RESTORED_FORMS.add(i), l) {
7642
+ if (h.INITIAL_RESTORED_FORMS.add(i), l) {
7613
7643
  r.push(
7614
- f.pushAncestorArgValue(n, o, l.value)
7644
+ h.pushAncestorArgValue(n, o, l.value)
7615
7645
  );
7616
7646
  continue;
7617
7647
  }
7618
7648
  r.push(
7619
- f.syncValues(
7649
+ h.syncValues(
7620
7650
  n,
7621
- f.resolveSyncValues(n, s)
7651
+ h.resolveSyncValues(n, s)
7622
7652
  )
7623
7653
  );
7624
7654
  }
@@ -7653,9 +7683,9 @@ const f = class f {
7653
7683
  */
7654
7684
  static collectGroupSelection(e, t, r) {
7655
7685
  const i = [];
7656
- f.collectGroupMembers(
7657
- f.resolveCollectionScope(e),
7658
- String(f.resolveFieldName(e)),
7686
+ h.collectGroupMembers(
7687
+ h.resolveCollectionScope(e),
7688
+ String(h.resolveFieldName(e)),
7659
7689
  i
7660
7690
  );
7661
7691
  let n = !1;
@@ -7665,9 +7695,9 @@ const f = class f {
7665
7695
  const o = a.getTarget();
7666
7696
  o instanceof HTMLInputElement && o.checked && s.push(o.value);
7667
7697
  }
7668
- return t ? { edited: n, value: f.markCompleteSet(s) } : s.length === 0 ? { edited: n, value: null } : {
7698
+ return t ? { edited: n, value: h.markCompleteSet(s) } : s.length === 0 ? { edited: n, value: null } : {
7669
7699
  edited: n,
7670
- value: s.length === 1 ? s[0] : f.markCompleteSet(s)
7700
+ value: s.length === 1 ? s[0] : h.markCompleteSet(s)
7671
7701
  };
7672
7702
  }
7673
7703
  /**
@@ -7682,7 +7712,7 @@ const f = class f {
7682
7712
  * @returns 新しい階層を始める場合は true
7683
7713
  */
7684
7714
  static startsCollectionLevel(e) {
7685
- return f.resolveFieldName(e) ? !1 : !!(e.getAttribute(`${c.prefix}form-object`) || e.getAttribute(`${c.prefix}form-list`));
7715
+ return h.resolveFieldName(e) ? !1 : !!(e.getAttribute(`${c.prefix}form-object`) || e.getAttribute(`${c.prefix}form-list`));
7686
7716
  }
7687
7717
  /**
7688
7718
  * 収集値の階層(同じキーの集まる範囲)となるフラグメントを解決します。
@@ -7703,9 +7733,9 @@ const f = class f {
7703
7733
  static resolveCollectionScope(e) {
7704
7734
  let t = e, r = t.getParent();
7705
7735
  for (; r !== null; ) {
7706
- if (f.startsCollectionLevel(r))
7736
+ if (h.startsCollectionLevel(r))
7707
7737
  return r.getAttribute(`${c.prefix}form-object`) ? r : t;
7708
- if (f.isFormScopeRoot(r))
7738
+ if (h.isFormScopeRoot(r))
7709
7739
  return r;
7710
7740
  t = r, r = r.getParent();
7711
7741
  }
@@ -7738,11 +7768,11 @@ const f = class f {
7738
7768
  * @param members 集める先
7739
7769
  */
7740
7770
  static collectGroupMembers(e, t, r) {
7741
- f.isGroupedCheckable(e) && String(f.resolveFieldName(e)) === t && r.push(e);
7771
+ h.isGroupedCheckable(e) && String(h.resolveFieldName(e)) === t && r.push(e);
7742
7772
  for (const i of e.getChildElementFragments())
7743
- f.startsCollectionLevel(i) || i.hasAttribute(`${c.prefix}form-detach`) || // `data-if-false` は hide() が DOM へ直接付与するため実 DOM 属性を見る
7773
+ h.startsCollectionLevel(i) || i.hasAttribute(`${c.prefix}form-detach`) || // `data-if-false` は hide() が DOM へ直接付与するため実 DOM 属性を見る
7744
7774
  // (`getPartValues()` と同じ理由)。
7745
- i.getTarget().hasAttribute(`${c.prefix}if-false`) || f.collectGroupMembers(i, t, r);
7775
+ i.getTarget().hasAttribute(`${c.prefix}if-false`) || h.collectGroupMembers(i, t, r);
7746
7776
  }
7747
7777
  /**
7748
7778
  * 「集合として完結した値」として印を付けます。
@@ -7756,7 +7786,7 @@ const f = class f {
7756
7786
  * @returns 同じ配列
7757
7787
  */
7758
7788
  static markCompleteSet(e) {
7759
- return f.COMPLETE_SET_VALUES.add(e), e;
7789
+ return h.COMPLETE_SET_VALUES.add(e), e;
7760
7790
  }
7761
7791
  /**
7762
7792
  * 「集合として完結した値」の印が付いているかを返します。
@@ -7769,7 +7799,7 @@ const f = class f {
7769
7799
  * @returns 印が付いていれば true
7770
7800
  */
7771
7801
  static isCompleteSetValue(e) {
7772
- return e !== null && typeof e == "object" && f.COMPLETE_SET_VALUES.has(e);
7802
+ return e !== null && typeof e == "object" && h.COMPLETE_SET_VALUES.has(e);
7773
7803
  }
7774
7804
  /**
7775
7805
  * 値による上書きをグループ単位で扱うべき入力要素(boolean 型でない
@@ -7821,44 +7851,44 @@ const f = class f {
7821
7851
  const o = [];
7822
7852
  if (e.hasAttribute(`${c.prefix}form-detach`) && !r)
7823
7853
  return Promise.resolve();
7824
- const l = f.resolveFieldName(e), u = e.getAttribute(`${c.prefix}form-object`), h = e.getAttribute(`${c.prefix}form-list`), m = e.hasAttribute(`${c.prefix}form-list`);
7854
+ const l = h.resolveFieldName(e), u = e.getAttribute(`${c.prefix}form-object`), f = e.getAttribute(`${c.prefix}form-list`), m = e.hasAttribute(`${c.prefix}form-list`);
7825
7855
  if (l) {
7826
- const y = t[String(l)], E = n && f.hasResolvedDeclarativeState(e), A = n && typeof y > "u" && !f.isDeclarativeStateBound(e);
7827
- let T = y;
7828
- if (E ? T = void 0 : A && (T = null), f.isFileInput(e))
7829
- return (T === null || T === "") && o.push(
7830
- f.applyFragmentValue(e, null, i, a)
7856
+ const b = t[String(l)], E = n && h.hasResolvedDeclarativeState(e), A = n && typeof b > "u" && !h.isDeclarativeStateBound(e);
7857
+ let w = b;
7858
+ if (E ? w = void 0 : A && (w = null), h.isFileInput(e))
7859
+ return (w === null || w === "") && o.push(
7860
+ h.applyFragmentValue(e, null, i, a)
7831
7861
  ), Promise.all(o).then(() => {
7832
7862
  });
7833
- if (m && Array.isArray(T) && // チェックボックスグループと複数選択 select は配列そのものを状態として
7863
+ if (m && Array.isArray(w) && // チェックボックスグループと複数選択 select は配列そのものを状態として
7834
7864
  // 解釈する(後続の分岐)。位置で配ると選択状態を決められないため、
7835
7865
  // `data-form-list` を併記していても従来どおりそちらへ渡す。
7836
- !f.isGroupedCheckable(e) && !f.isMultipleSelect(e)) {
7837
- const M = String(l), P = s.get(M) ?? 0;
7838
- s.set(M, P + 1), o.push(
7839
- f.applyFragmentValue(
7866
+ !h.isGroupedCheckable(e) && !h.isMultipleSelect(e)) {
7867
+ const C = String(l), P = s.get(C) ?? 0;
7868
+ s.set(C, P + 1), o.push(
7869
+ h.applyFragmentValue(
7840
7870
  e,
7841
- T[P] ?? null,
7871
+ w[P] ?? null,
7842
7872
  i,
7843
7873
  a
7844
7874
  )
7845
7875
  );
7846
- } else typeof T > "u" || (Array.isArray(T) && f.isGroupedCheckable(e) || Array.isArray(T) && f.isMultipleSelect(e) || typeof T == "string" || typeof T == "number" || typeof T == "boolean" || T === null || Array.isArray(T) && e.collectsLines() ? o.push(
7847
- f.applyFragmentValue(
7876
+ } else typeof w > "u" || (Array.isArray(w) && h.isGroupedCheckable(e) || Array.isArray(w) && h.isMultipleSelect(e) || typeof w == "string" || typeof w == "number" || typeof w == "boolean" || w === null || Array.isArray(w) && e.collectsLines() ? o.push(
7877
+ h.applyFragmentValue(
7848
7878
  e,
7849
- T,
7879
+ w,
7850
7880
  i,
7851
7881
  a
7852
7882
  )
7853
7883
  ) : o.push(
7854
- f.applyFragmentValue(e, String(T), i, a)
7884
+ h.applyFragmentValue(e, String(w), i, a)
7855
7885
  ));
7856
7886
  } else if (u) {
7857
- const y = t[String(u)], E = y && typeof y == "object" ? y : {}, A = /* @__PURE__ */ new Map();
7858
- for (const T of e.getChildElementFragments())
7887
+ const b = t[String(u)], E = b && typeof b == "object" ? b : {}, A = /* @__PURE__ */ new Map();
7888
+ for (const w of e.getChildElementFragments())
7859
7889
  o.push(
7860
- f.setPartValues(
7861
- T,
7890
+ h.setPartValues(
7891
+ w,
7862
7892
  E,
7863
7893
  r,
7864
7894
  i,
@@ -7867,19 +7897,19 @@ const f = class f {
7867
7897
  a
7868
7898
  )
7869
7899
  );
7870
- } else if (h) {
7871
- const y = t[String(h)], E = Array.isArray(y) ? y : [], A = e.getChildElementFragments(), T = e.getAttribute(`${c.prefix}each-key`), M = f.isCollectedListFromEachSource(e) ? f.pairRowsWithItems(
7900
+ } else if (f) {
7901
+ const b = t[String(f)], E = Array.isArray(b) ? b : [], A = e.getChildElementFragments(), w = e.getAttribute(`${c.prefix}each-key`), C = h.isCollectedListFromEachSource(e) ? h.pairRowsWithItems(
7872
7902
  A,
7873
7903
  E,
7874
- T == null ? null : String(T)
7904
+ w == null ? null : String(w)
7875
7905
  ) : null;
7876
7906
  for (let P = 0; P < A.length; P++) {
7877
- const ee = A[P], x = M ? M[P] : E.length > P ? E[P] : null;
7907
+ const ee = A[P], x = C ? C[P] : E.length > P ? E[P] : null;
7878
7908
  o.push(
7879
7909
  // 行ごとに values が切り替わるので出現位置も行単位で数える。
7880
- f.setPartValues(
7910
+ h.setPartValues(
7881
7911
  ee,
7882
- f.asPlainRecord(x) ?? {},
7912
+ h.asPlainRecord(x) ?? {},
7883
7913
  r,
7884
7914
  i,
7885
7915
  n,
@@ -7889,10 +7919,10 @@ const f = class f {
7889
7919
  );
7890
7920
  }
7891
7921
  } else
7892
- for (const y of e.getChildElementFragments())
7922
+ for (const b of e.getChildElementFragments())
7893
7923
  o.push(
7894
- f.setPartValues(
7895
- y,
7924
+ h.setPartValues(
7925
+ b,
7896
7926
  t,
7897
7927
  r,
7898
7928
  i,
@@ -7919,54 +7949,54 @@ const f = class f {
7919
7949
  * 番号を持つことになり、後勝ちが逆転する
7920
7950
  * @returns すべての初期化処理が完了するPromise
7921
7951
  */
7922
- static async reset(e, t = S.nextSequence()) {
7923
- const r = f.collectBindingTargetForms(e);
7952
+ static async reset(e, t = R.nextSequence()) {
7953
+ const r = h.collectBindingTargetForms(e);
7924
7954
  if (r.length > 0 && r.every((n) => n.isSupplyStale(t)))
7925
7955
  return;
7926
- f.markResetSubtree(e, t), C.clearUserEditMarks(e, t), f.clearValues(e), await Promise.all([
7927
- f.clearMessages(e),
7928
- f.clearEachClones(e)
7956
+ h.markResetSubtree(e, t), M.clearUserEditMarks(e, t), h.clearValues(e), await Promise.all([
7957
+ h.clearMessages(e),
7958
+ h.clearEachClones(e)
7929
7959
  ]), await z.enqueue(() => {
7930
- const n = f.collectEditsAfter(
7960
+ const n = h.collectEditsAfter(
7931
7961
  e,
7932
7962
  t
7933
7963
  ), s = e.getTarget();
7934
- f.internalResetDepth += 1;
7964
+ h.internalResetDepth += 1;
7935
7965
  try {
7936
- s instanceof HTMLFormElement ? s.reset() : (s.querySelectorAll("form").forEach((a) => a.reset()), f.restoreDefaultValues(s));
7966
+ s instanceof HTMLFormElement ? s.reset() : (s.querySelectorAll("form").forEach((a) => a.reset()), h.restoreDefaultValues(s));
7937
7967
  } finally {
7938
- f.internalResetDepth -= 1;
7968
+ h.internalResetDepth -= 1;
7939
7969
  }
7940
- f.clearDeclarativeStateFromDom(e), C.invalidateDerivedSubtreeSignatures(e), f.restoreEdits(n);
7970
+ h.clearDeclarativeStateFromDom(e), M.invalidateDerivedSubtreeSignatures(e), h.restoreEdits(n);
7941
7971
  });
7942
7972
  const i = r;
7943
7973
  for (const n of i) {
7944
- const s = f.getInitialBindingData(n);
7945
- s === null && n.getRawBindingData() === null || await C.setBindingData(n.getTarget(), s ?? {}, {
7974
+ const s = h.getInitialBindingData(n);
7975
+ s === null && n.getRawBindingData() === null || await M.setBindingData(n.getTarget(), s ?? {}, {
7946
7976
  sequence: t
7947
7977
  });
7948
7978
  }
7949
- f.syncValuesFromDom(e), await C.evaluateAll(e);
7979
+ h.syncValuesFromDom(e), await M.evaluateAll(e);
7950
7980
  for (const n of i)
7951
- f.getInitialBindingData(n) !== null || n.getRawBindingData() !== null || await f.restoreAncestorArgValues(n, {
7981
+ h.getInitialBindingData(n) !== null || n.getRawBindingData() !== null || await h.restoreAncestorArgValues(n, {
7952
7982
  sequence: t,
7953
7983
  kind: "supply"
7954
7984
  });
7955
7985
  for (const n of i) {
7956
- const s = f.getInitialBindingData(n);
7986
+ const s = h.getInitialBindingData(n);
7957
7987
  if (n.getRawBindingData() === null && s === null)
7958
7988
  continue;
7959
- const a = f.getValues(n), o = n.getAttribute(`${c.prefix}form-arg`);
7989
+ const a = h.getValues(n), o = n.getAttribute(`${c.prefix}form-arg`);
7960
7990
  let l = { ...s || {} };
7961
7991
  if (o) {
7962
7992
  const u = String(o);
7963
- !Object.prototype.hasOwnProperty.call(s ?? {}, u) && f.resolveAncestorArgOwner(n, u) !== null || (l[u] = f.mergeCollectedValues(
7993
+ !Object.prototype.hasOwnProperty.call(s ?? {}, u) && h.resolveAncestorArgOwner(n, u) !== null || (l[u] = h.mergeCollectedValues(
7964
7994
  l[u] ?? null,
7965
7995
  a
7966
7996
  ));
7967
7997
  } else
7968
- l = f.mergeCollectedValues(l, a), f.deleteAncestorOwnedKeys(n, s, l);
7969
- await C.setBindingData(n.getTarget(), l, {
7998
+ l = h.mergeCollectedValues(l, a), h.deleteAncestorOwnedKeys(n, s, l);
7999
+ await M.setBindingData(n.getTarget(), l, {
7970
8000
  sequence: t
7971
8001
  });
7972
8002
  }
@@ -7984,7 +8014,7 @@ const f = class f {
7984
8014
  */
7985
8015
  static deleteAncestorOwnedKeys(e, t, r) {
7986
8016
  for (const i of Object.keys(r))
7987
- Object.prototype.hasOwnProperty.call(t ?? {}, i) || f.resolveAncestorKeyOwner(e, i) !== null && delete r[i];
8017
+ Object.prototype.hasOwnProperty.call(t ?? {}, i) || h.resolveAncestorKeyOwner(e, i) !== null && delete r[i];
7988
8018
  }
7989
8019
  /**
7990
8020
  * data-bind 属性で宣言された初期バインドデータを取得します。
@@ -7994,7 +8024,7 @@ const f = class f {
7994
8024
  */
7995
8025
  static getInitialBindingData(e) {
7996
8026
  const t = e.getInitialBindAttribute();
7997
- return t === null ? null : C.parseDataBind(t);
8027
+ return t === null ? null : M.parseDataBind(t);
7998
8028
  }
7999
8029
  /**
8000
8030
  * フラグメント配下の入力要素について、内部値を現在の DOM 値と再同期します。
@@ -8005,7 +8035,7 @@ const f = class f {
8005
8035
  const t = e.getTarget();
8006
8036
  (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) && e.syncValue();
8007
8037
  for (const r of e.getChildElementFragments())
8008
- f.syncValuesFromDom(r);
8038
+ h.syncValuesFromDom(r);
8009
8039
  }
8010
8040
  /**
8011
8041
  * リセット後にバインドデータを更新すべきフォームフラグメントを収集します。
@@ -8022,7 +8052,7 @@ const f = class f {
8022
8052
  const i = [];
8023
8053
  for (const n of r) {
8024
8054
  const s = N.get(n);
8025
- s instanceof S && i.push(s);
8055
+ s instanceof R && i.push(s);
8026
8056
  }
8027
8057
  return i;
8028
8058
  }
@@ -8060,7 +8090,7 @@ const f = class f {
8060
8090
  static clearValues(e) {
8061
8091
  e.clearValue();
8062
8092
  for (const t of e.getChildElementFragments())
8063
- f.clearValues(t);
8093
+ h.clearValues(t);
8064
8094
  }
8065
8095
  /**
8066
8096
  * 指定した通番より後に編集された入力欄の DOM の状態を控えます。
@@ -8084,7 +8114,7 @@ const f = class f {
8084
8114
  )
8085
8115
  }) : r.push({ element: i, value: i.value }));
8086
8116
  for (const n of e.getChildElementFragments())
8087
- f.collectEditsAfter(n, t, r);
8117
+ h.collectEditsAfter(n, t, r);
8088
8118
  return r;
8089
8119
  }
8090
8120
  /**
@@ -8126,8 +8156,8 @@ const f = class f {
8126
8156
  const r = e.getAttribute(`${c.prefix}form-arg`);
8127
8157
  if (!r)
8128
8158
  return;
8129
- const i = String(r), n = f.resolveAncestorArgOwner(e, i);
8130
- n && (f.LAST_ANCESTOR_ARG_VALUES.delete(e.getTarget()), await f.pushAncestorArgValue(e, i, n.value, t));
8159
+ const i = String(r), n = h.resolveAncestorArgOwner(e, i);
8160
+ n && (h.LAST_ANCESTOR_ARG_VALUES.delete(e.getTarget()), await h.pushAncestorArgValue(e, i, n.value, t));
8131
8161
  }
8132
8162
  /**
8133
8163
  * 初期化の通番を部分木のすべてのフラグメントへ記録します。
@@ -8143,7 +8173,7 @@ const f = class f {
8143
8173
  static markResetSubtree(e, t) {
8144
8174
  e.markResetAt(t), e.markSupplyApplied(t);
8145
8175
  for (const r of e.getChildElementFragments())
8146
- f.markResetSubtree(r, t);
8176
+ h.markResetSubtree(r, t);
8147
8177
  }
8148
8178
  /**
8149
8179
  * フラグメントとその子要素のメッセージをクリアします。
@@ -8166,7 +8196,7 @@ const f = class f {
8166
8196
  * @return Promise(メッセージの追加が完了したら解決される)
8167
8197
  */
8168
8198
  static addErrorMessage(e, t, r) {
8169
- return f.addMessage(e, t, r, "error");
8199
+ return h.addMessage(e, t, r, "error");
8170
8200
  }
8171
8201
  /**
8172
8202
  * キーに一致するフラグメントにレベル付きメッセージを追加します。
@@ -8179,8 +8209,8 @@ const f = class f {
8179
8209
  * @return Promise(メッセージの追加が完了したら解決される)
8180
8210
  */
8181
8211
  static addMessage(e, t, r, i) {
8182
- const n = [], s = et(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), l = f.keepFirstRadio(
8183
- f.findFragmentsByKey(e, t)
8212
+ const n = [], s = et(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), l = h.keepFirstRadio(
8213
+ h.findFragmentsByKey(e, t)
8184
8214
  );
8185
8215
  return l.forEach((u) => {
8186
8216
  n.push(o(u.getTarget()));
@@ -8212,7 +8242,7 @@ const f = class f {
8212
8242
  * @returns 一致するフラグメントの配列
8213
8243
  */
8214
8244
  static findFragmentsByKey(e, t) {
8215
- return f.findFragmentByKeyParts(e, t.split("."));
8245
+ return h.findFragmentByKeyParts(e, t.split("."));
8216
8246
  }
8217
8247
  /**
8218
8248
  * 指定されたキーに一致するフラグメントを検索します。
@@ -8224,9 +8254,9 @@ const f = class f {
8224
8254
  */
8225
8255
  static findFragmentByKeyParts(e, t) {
8226
8256
  const r = [], i = t[0];
8227
- if (t.length == 1 && f.resolveFieldName(e) === i && r.push(e), e.hasAttribute(`${c.prefix}form-object`))
8257
+ if (t.length == 1 && h.resolveFieldName(e) === i && r.push(e), e.hasAttribute(`${c.prefix}form-object`))
8228
8258
  t.length > 1 && e.getAttribute(`${c.prefix}form-object`) === i && e.getChildElementFragments().forEach((s) => {
8229
- r.push(...f.findFragmentByKeyParts(s, t.slice(1)));
8259
+ r.push(...h.findFragmentByKeyParts(s, t.slice(1)));
8230
8260
  });
8231
8261
  else if (e.hasAttribute(`${c.prefix}form-list`)) {
8232
8262
  if (t.length > 1) {
@@ -8238,9 +8268,9 @@ const f = class f {
8238
8268
  if (isNaN(u))
8239
8269
  g.error("Haori", `Invalid index: ${i}`);
8240
8270
  else {
8241
- const h = e.getChildElementFragments().filter((m) => m.hasAttribute(`${c.prefix}row`));
8242
- u < h.length && r.push(
8243
- ...f.findFragmentByKeyParts(h[u], t.slice(1))
8271
+ const f = e.getChildElementFragments().filter((m) => m.hasAttribute(`${c.prefix}row`));
8272
+ u < f.length && r.push(
8273
+ ...h.findFragmentByKeyParts(f[u], t.slice(1))
8244
8274
  );
8245
8275
  }
8246
8276
  }
@@ -8248,7 +8278,7 @@ const f = class f {
8248
8278
  }
8249
8279
  } else
8250
8280
  e.getChildElementFragments().forEach((n) => {
8251
- r.push(...f.findFragmentByKeyParts(n, t));
8281
+ r.push(...h.findFragmentByKeyParts(n, t));
8252
8282
  });
8253
8283
  return r;
8254
8284
  }
@@ -8271,12 +8301,12 @@ const f = class f {
8271
8301
  return r ? this.getFormFragment(r) : null;
8272
8302
  }
8273
8303
  };
8274
- 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.internalResetDepth = 0, f.warnedArgOwnerNotRecord = /* @__PURE__ */ new WeakMap(), f.UNSAFE_MERGE_KEYS = /* @__PURE__ */ new Set([
8304
+ 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.internalResetDepth = 0, h.warnedArgOwnerNotRecord = /* @__PURE__ */ new WeakMap(), h.UNSAFE_MERGE_KEYS = /* @__PURE__ */ new Set([
8275
8305
  "__proto__",
8276
8306
  "constructor",
8277
8307
  "prototype"
8278
- ]), 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]*)$/;
8279
- let F = f;
8308
+ ]), 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]*)$/;
8309
+ let F = h;
8280
8310
  class B {
8281
8311
  /**
8282
8312
  * カスタムイベントを発火します。
@@ -8351,8 +8381,8 @@ class B {
8351
8381
  static bindChange(e, t, r, i = "other") {
8352
8382
  const n = [], s = new Set(Object.keys(t || {})), a = new Set(Object.keys(r)), o = /* @__PURE__ */ new Set([...s, ...a]);
8353
8383
  for (const l of o) {
8354
- const u = t?.[l], h = r[l];
8355
- u !== h && n.push(l);
8384
+ const u = t?.[l], f = r[l];
8385
+ u !== f && n.push(l);
8356
8386
  }
8357
8387
  B.dispatch(e, "bindchange", {
8358
8388
  previous: t || {},
@@ -8520,8 +8550,8 @@ const Pt = {
8520
8550
  401: "unauthorized-redirect",
8521
8551
  403: "forbidden-redirect"
8522
8552
  };
8523
- function Lt(b, e) {
8524
- return b.replace(/\{\{([\s\S]+?)\}\}/g, (t, r) => {
8553
+ function Lt(y, e) {
8554
+ return y.replace(/\{\{([\s\S]+?)\}\}/g, (t, r) => {
8525
8555
  try {
8526
8556
  const i = ie.evaluate(String(r).trim(), e);
8527
8557
  return i == null ? "" : String(i);
@@ -8530,17 +8560,17 @@ function Lt(b, e) {
8530
8560
  }
8531
8561
  });
8532
8562
  }
8533
- function Ot(b, e) {
8534
- const t = b.getAttribute(e);
8563
+ function Ot(y, e) {
8564
+ const t = y.getAttribute(e);
8535
8565
  if (t === null || t === "")
8536
8566
  return null;
8537
8567
  if (!t.includes("{{"))
8538
8568
  return t;
8539
- const r = N.get(b), i = r instanceof S ? r.getBindingData() : {}, n = Lt(t, i);
8569
+ const r = N.get(y), i = r instanceof R ? r.getBindingData() : {}, n = Lt(t, i);
8540
8570
  return n === "" ? null : n;
8541
8571
  }
8542
- function Bt(b, e, t) {
8543
- const r = b.getAttribute(`${e}-return-param`);
8572
+ function Bt(y, e, t) {
8573
+ const r = y.getAttribute(`${e}-return-param`);
8544
8574
  if (r === null || r === "")
8545
8575
  return t;
8546
8576
  try {
@@ -8552,8 +8582,8 @@ function Bt(b, e, t) {
8552
8582
  const i = window.location.pathname + window.location.search + window.location.hash, s = `${encodeURIComponent(r)}=${encodeURIComponent(i)}`, a = t.indexOf("#"), o = a >= 0 ? t.slice(a) : "", l = a >= 0 ? t.slice(0, a) : t, u = l.includes("?") ? "&" : "?";
8553
8583
  return `${l}${u}${s}${o}`;
8554
8584
  }
8555
- function At(b) {
8556
- const e = Pt[b];
8585
+ function At(y) {
8586
+ const e = Pt[y];
8557
8587
  if (e === void 0 || typeof document > "u")
8558
8588
  return !1;
8559
8589
  const t = `${c.prefix}${e}`, r = [];
@@ -8709,7 +8739,7 @@ const k = class k {
8709
8739
  * @returns 予約キーなら true
8710
8740
  */
8711
8741
  static isReservedKey(e) {
8712
- return S.isReservedBindingKey(e);
8742
+ return R.isReservedBindingKey(e);
8713
8743
  }
8714
8744
  /**
8715
8745
  * 素の JSON オブジェクト(配列でないオブジェクト)かどうかを判定します。
@@ -8780,18 +8810,18 @@ const k = class k {
8780
8810
  const n = e.getRawAttribute(`${c.prefix}store-type`);
8781
8811
  let s = "session";
8782
8812
  if (n !== null) {
8783
- const h = n.trim();
8784
- h === "local" || h === "session" ? s = h : k.warnOnce(
8813
+ const f = n.trim();
8814
+ f === "local" || f === "session" ? s = f : k.warnOnce(
8785
8815
  t,
8786
8816
  "type",
8787
- `${c.prefix}store-type は session または local を指定してください(session として扱います): ${h}`
8817
+ `${c.prefix}store-type は session または local を指定してください(session として扱います): ${f}`
8788
8818
  );
8789
8819
  }
8790
8820
  const a = e.getRawAttribute(`${c.prefix}store-arg`), o = a === null || a.trim() === "" ? null : a.trim(), l = e.getRawAttribute(`${c.prefix}store-params`);
8791
8821
  let u = null;
8792
8822
  if (l !== null) {
8793
- const h = l.split("&").map((y) => y.trim()).filter((y) => y !== ""), m = h.filter((y) => !k.isReservedKey(y));
8794
- m.length !== h.length && k.warnOnce(
8823
+ const f = l.split("&").map((b) => b.trim()).filter((b) => b !== ""), m = f.filter((b) => !k.isReservedKey(b));
8824
+ m.length !== f.length && k.warnOnce(
8795
8825
  t,
8796
8826
  "reserved",
8797
8827
  `${c.prefix}store-params の予約キー(先頭が _ のキー)は対象外です。`
@@ -9003,10 +9033,10 @@ const k = class k {
9003
9033
  ), Promise.resolve();
9004
9034
  k.RESTORED_ELEMENTS.add(r);
9005
9035
  const i = k.readRecord(t), n = i ? k.extractFromRecord(t, i) : {}, s = { ...e.getRawBindingData() ?? {}, ...n };
9006
- return k.seedSignature(r, k.selectFromData(t, s)), Object.keys(n).length === 0 ? Promise.resolve() : C.setBindingData(r, s, {
9036
+ return k.seedSignature(r, k.selectFromData(t, s)), Object.keys(n).length === 0 ? Promise.resolve() : M.setBindingData(r, s, {
9007
9037
  reentrant: !0,
9008
9038
  kind: "nonSupply",
9009
- sequence: S.nextSequence()
9039
+ sequence: R.nextSequence()
9010
9040
  });
9011
9041
  }
9012
9042
  /**
@@ -9084,7 +9114,7 @@ const k = class k {
9084
9114
  if (!k.RESTORED_ELEMENTS.has(i))
9085
9115
  return;
9086
9116
  const n = N.get(i);
9087
- if (!(n instanceof S))
9117
+ if (!(n instanceof R))
9088
9118
  return;
9089
9119
  const s = k.readDeclaration(n);
9090
9120
  if (!s || s.key !== e || s.kind !== t)
@@ -9110,42 +9140,42 @@ const Ut = [
9110
9140
  ], Ht = "__haoriHistoryState__", qe = "data-haori-click-lock", tt = "ファイルを保存できませんでした", Vt = 100;
9111
9141
  let Te = null;
9112
9142
  const qt = ["info", "warning", "error", "success"], rt = /^(\d{3})-(click|click-await|close|toast|toast-level|no-message|bind)$/;
9113
- function he() {
9143
+ function fe() {
9114
9144
  const e = globalThis.window?.Haori;
9115
9145
  return Ut.every(
9116
9146
  (r) => typeof e?.[r] == "function"
9117
9147
  ) ? e : Re;
9118
9148
  }
9119
9149
  const Wt = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
9120
- function Pe(b) {
9121
- return Wt.has(b.toUpperCase());
9150
+ function Pe(y) {
9151
+ return Wt.has(y.toUpperCase());
9122
9152
  }
9123
- function jt(b, e) {
9153
+ function jt(y, e) {
9124
9154
  for (const [t, r] of Object.entries(e))
9125
9155
  r !== void 0 && (Array.isArray(r) ? r.forEach((i) => {
9126
- b.append(t, Ee(i));
9127
- }) : b.append(t, Ee(r)));
9156
+ y.append(t, Ee(i));
9157
+ }) : y.append(t, Ee(r)));
9128
9158
  }
9129
- function Ee(b) {
9130
- if (b == null)
9159
+ function Ee(y) {
9160
+ if (y == null)
9131
9161
  return "";
9132
- if (typeof b == "object" || typeof b == "function")
9162
+ if (typeof y == "object" || typeof y == "function")
9133
9163
  try {
9134
- return JSON.stringify(b) ?? "";
9164
+ return JSON.stringify(y) ?? "";
9135
9165
  } catch {
9136
9166
  return "";
9137
9167
  }
9138
- return String(b);
9168
+ return String(y);
9139
9169
  }
9140
- function vt(b, e) {
9141
- const t = new URL(b, window.location.href), r = new URLSearchParams(t.search);
9170
+ function vt(y, e) {
9171
+ const t = new URL(y, window.location.href), r = new URLSearchParams(t.search);
9142
9172
  return jt(r, e), t.search = r.toString(), t.toString();
9143
9173
  }
9144
- function Kt(b) {
9145
- if (b == null)
9174
+ function Kt(y) {
9175
+ if (y == null)
9146
9176
  return { payload: {}, dropped: !1 };
9147
- if (typeof b == "string") {
9148
- const e = b.trim();
9177
+ if (typeof y == "string") {
9178
+ const e = y.trim();
9149
9179
  if (e === "")
9150
9180
  return { payload: {}, dropped: !1 };
9151
9181
  if (e.startsWith("{")) {
@@ -9162,12 +9192,12 @@ function Kt(b) {
9162
9192
  dropped: !1
9163
9193
  } : { payload: {}, dropped: !0 };
9164
9194
  }
9165
- if (b instanceof URLSearchParams)
9166
- return { payload: it(b), dropped: !1 };
9167
- if (typeof FormData < "u" && b instanceof FormData) {
9195
+ if (y instanceof URLSearchParams)
9196
+ return { payload: it(y), dropped: !1 };
9197
+ if (typeof FormData < "u" && y instanceof FormData) {
9168
9198
  const e = {};
9169
9199
  let t = !1;
9170
- for (const [r, i] of b.entries()) {
9200
+ for (const [r, i] of y.entries()) {
9171
9201
  if (typeof i != "string") {
9172
9202
  t = !0;
9173
9203
  continue;
@@ -9178,28 +9208,28 @@ function Kt(b) {
9178
9208
  }
9179
9209
  return { payload: {}, dropped: !0 };
9180
9210
  }
9181
- function it(b) {
9211
+ function it(y) {
9182
9212
  const e = {};
9183
- for (const [t, r] of b.entries())
9213
+ for (const [t, r] of y.entries())
9184
9214
  wt(e, t, r);
9185
9215
  return e;
9186
9216
  }
9187
- function wt(b, e, t) {
9188
- const r = b[e];
9189
- r === void 0 ? b[e] = t : Array.isArray(r) ? r.push(t) : b[e] = [r, t];
9217
+ function wt(y, e, t) {
9218
+ const r = y[e];
9219
+ r === void 0 ? y[e] = t : Array.isArray(r) ? r.push(t) : y[e] = [r, t];
9190
9220
  }
9191
- function ge(b, e) {
9221
+ function ge(y, e) {
9192
9222
  if (F.isCompleteSetValue(e))
9193
9223
  return e;
9194
9224
  if (Array.isArray(e)) {
9195
- const t = Array.isArray(b) ? b.slice() : [];
9225
+ const t = Array.isArray(y) ? y.slice() : [];
9196
9226
  let r = !1;
9197
9227
  return e.forEach((i, n) => {
9198
9228
  i != null && (typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (t[n] = ge(t[n], i), r = !0));
9199
- }), r ? t : b;
9229
+ }), r ? t : y;
9200
9230
  }
9201
9231
  if (e !== null && typeof e == "object") {
9202
- const t = b !== null && typeof b == "object" && !Array.isArray(b) ? { ...b } : {};
9232
+ const t = y !== null && typeof y == "object" && !Array.isArray(y) ? { ...y } : {};
9203
9233
  for (const [r, i] of Object.entries(
9204
9234
  e
9205
9235
  ))
@@ -9208,15 +9238,15 @@ function ge(b, e) {
9208
9238
  }
9209
9239
  return e;
9210
9240
  }
9211
- function zt(b) {
9212
- const e = b?.body;
9241
+ function zt(y) {
9242
+ const e = y?.body;
9213
9243
  return e == null ? !1 : typeof e == "string" ? e !== "" : !0;
9214
9244
  }
9215
- function Gt(b, e) {
9245
+ function Gt(y, e) {
9216
9246
  const t = { ...e || {} }, r = (t.method || "GET").toUpperCase();
9217
9247
  if (c.runtime !== "demo" || Pe(r))
9218
9248
  return {
9219
- url: b,
9249
+ url: y,
9220
9250
  options: t,
9221
9251
  requestedMethod: r,
9222
9252
  effectiveMethod: r,
@@ -9225,7 +9255,7 @@ function Gt(b, e) {
9225
9255
  const { payload: i, dropped: n } = Kt(
9226
9256
  t.body
9227
9257
  );
9228
- let s = b;
9258
+ let s = y;
9229
9259
  Object.keys(i).length > 0 && (s = vt(s, i)), n && g.warn(
9230
9260
  "Haori",
9231
9261
  `The ${r} body cannot be converted into a query string and is dropped by the demo runtime normalization. Send the values with ${c.prefix}{event}-data / ${c.prefix}{event}-form, or use the embedded runtime.`
@@ -9242,8 +9272,8 @@ function Gt(b, e) {
9242
9272
  queryString: new URL(s, window.location.href).search || void 0
9243
9273
  };
9244
9274
  }
9245
- function Yt(b) {
9246
- return b == null ? null : typeof b == "string" ? b : b instanceof URLSearchParams ? b.toString() : b instanceof FormData ? Array.from(b.entries()).map(([e, t]) => t instanceof File ? [
9275
+ function Yt(y) {
9276
+ 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 ? [
9247
9277
  e,
9248
9278
  {
9249
9279
  type: "file",
@@ -9251,22 +9281,22 @@ function Yt(b) {
9251
9281
  size: t.size,
9252
9282
  mimeType: t.type
9253
9283
  }
9254
- ] : [e, String(t)]) : String(b);
9284
+ ] : [e, String(t)]) : String(y);
9255
9285
  }
9256
- function Fe(b) {
9257
- return b instanceof Blob ? !0 : Array.isArray(b) ? b.some(Fe) : b !== null && typeof b == "object" ? Object.values(b).some(
9286
+ function Fe(y) {
9287
+ return y instanceof Blob ? !0 : Array.isArray(y) ? y.some(Fe) : y !== null && typeof y == "object" ? Object.values(y).some(
9258
9288
  Fe
9259
9289
  ) : !1;
9260
9290
  }
9261
- function Xt(b) {
9262
- return Object.values(b).some((e) => e instanceof Blob ? !1 : Array.isArray(e) ? e.some(
9291
+ function Xt(y) {
9292
+ return Object.values(y).some((e) => e instanceof Blob ? !1 : Array.isArray(e) ? e.some(
9263
9293
  (t) => !(t instanceof Blob) && Fe(t)
9264
9294
  ) : Fe(e));
9265
9295
  }
9266
- function $e(b) {
9267
- return je(F.getValues(b));
9296
+ function $e(y) {
9297
+ return je(F.getValues(y));
9268
9298
  }
9269
- function je(b) {
9299
+ function je(y) {
9270
9300
  const e = (r) => {
9271
9301
  if (r instanceof File)
9272
9302
  return r.name;
@@ -9286,18 +9316,18 @@ function je(b) {
9286
9316
  }
9287
9317
  return r;
9288
9318
  }, t = {};
9289
- for (const [r, i] of Object.entries(b))
9319
+ for (const [r, i] of Object.entries(y))
9290
9320
  t[r] = e(i);
9291
- return F.carryCollectedRowIdentity(b, t), t;
9321
+ return F.carryCollectedRowIdentity(y, t), t;
9292
9322
  }
9293
- function Jt(b, e) {
9323
+ function Jt(y, e) {
9294
9324
  const t = new Headers(
9295
9325
  e.headers || void 0
9296
9326
  ), r = Array.from(t.entries()).sort(
9297
9327
  ([i], [n]) => i.localeCompare(n)
9298
9328
  );
9299
9329
  return JSON.stringify({
9300
- url: b,
9330
+ url: y,
9301
9331
  method: String(e.method || "GET").toUpperCase(),
9302
9332
  headers: r,
9303
9333
  body: Yt(e.body || null)
@@ -9312,7 +9342,7 @@ const p = class p {
9312
9342
  * @param domEvent 起点となった DOM イベント
9313
9343
  */
9314
9344
  constructor(e, t = null, r = null) {
9315
- this.reentrantBind = !1, this.suppressEmptyReplaceBind = !1, this.requestUserEditSequence = null, this.downloadReceivedBytes = 0, this.downloadTotalBytes = null, this.downloadFolder = null, this.twoWayCommitBind = !1, this.skipped = !1, this.operationSequence = r != null ? S.nextOperationSequence() : S.nextSequence(), p.isElementFragment(e) ? (this.options = p.buildOptions(e, t), this.eventType = t) : (this.options = e, this.eventType = null), this.domEvent = r;
9345
+ this.reentrantBind = !1, this.suppressEmptyReplaceBind = !1, this.requestUserEditSequence = null, this.downloadReceivedBytes = 0, this.downloadTotalBytes = null, this.downloadFolder = null, this.twoWayCommitBind = !1, this.skipped = !1, this.operationSequence = r != null ? R.nextOperationSequence() : R.nextSequence(), p.isElementFragment(e) ? (this.options = p.buildOptions(e, t), this.eventType = t) : (this.options = e, this.eventType = null), this.domEvent = r;
9316
9346
  }
9317
9347
  /**
9318
9348
  * クリックで起動した手続きの結果を控えます。
@@ -9586,7 +9616,7 @@ const p = class p {
9586
9616
  const r = e.getRawAttribute(t);
9587
9617
  let i;
9588
9618
  try {
9589
- i = C.parseDataBind(r);
9619
+ i = M.parseDataBind(r);
9590
9620
  } catch (n) {
9591
9621
  return g.error("Haori", `Invalid fetch headers: ${n}`), null;
9592
9622
  }
@@ -9784,7 +9814,7 @@ const p = class p {
9784
9814
  const a = r.trim();
9785
9815
  if (p.SINGLE_PLACEHOLDER_REGEX.test(a))
9786
9816
  return {
9787
- value: C.parseDataBind(n),
9817
+ value: M.parseDataBind(n),
9788
9818
  hasUnresolvedReference: s
9789
9819
  };
9790
9820
  if (a.startsWith("{") || a.startsWith("[")) {
@@ -9793,7 +9823,7 @@ const p = class p {
9793
9823
  e.getBindingData()
9794
9824
  );
9795
9825
  return {
9796
- value: C.parseDataBind(l.value),
9826
+ value: M.parseDataBind(l.value),
9797
9827
  hasUnresolvedReference: s || l.hasUnresolvedReference
9798
9828
  };
9799
9829
  }
@@ -9802,7 +9832,7 @@ const p = class p {
9802
9832
  e.getBindingData()
9803
9833
  );
9804
9834
  return {
9805
- value: C.parseDataBind(o.value),
9835
+ value: M.parseDataBind(o.value),
9806
9836
  hasUnresolvedReference: s || o.hasUnresolvedReference
9807
9837
  };
9808
9838
  }
@@ -9818,8 +9848,8 @@ const p = class p {
9818
9848
  targetFragment: e
9819
9849
  }, i = t ? p.attrName(t, "if") : p.attrName(null, "if", !0);
9820
9850
  if (e.hasAttribute(i)) {
9821
- const R = e.getRawAttribute(i);
9822
- typeof R == "string" && R.trim() !== "" ? (r.conditionExpression = F.unwrapConditionExpression(R), r.conditionAttributeName = i) : g.warn(
9851
+ const T = e.getRawAttribute(i);
9852
+ typeof T == "string" && T.trim() !== "" ? (r.conditionExpression = F.unwrapConditionExpression(T), r.conditionAttributeName = i) : g.warn(
9823
9853
  "Haori",
9824
9854
  `${i} に条件式が指定されていません。`
9825
9855
  );
@@ -9869,9 +9899,9 @@ ${$}
9869
9899
  g.error("Haori", `Invalid before script: ${K}`);
9870
9900
  }
9871
9901
  }
9872
- const R = p.attrName(t, "run");
9873
- if (e.hasAttribute(R)) {
9874
- const $ = String(e.getAttribute(R) ?? "");
9902
+ const T = p.attrName(t, "run");
9903
+ if (e.hasAttribute(T)) {
9904
+ const $ = String(e.getAttribute(T) ?? "");
9875
9905
  let K = null;
9876
9906
  try {
9877
9907
  K = new Function(
@@ -9894,25 +9924,25 @@ ${$}
9894
9924
  }
9895
9925
  const n = p.attrName(t, "fetch"), s = e.hasAttribute(n);
9896
9926
  if (s) {
9897
- const R = e.getAttributeEvaluation(n);
9898
- R && (r.fetchHasUnresolvedReference = R.hasUnresolvedReference, r.fetchUrl = R.hasUnresolvedReference ? null : R.value);
9927
+ const T = e.getAttributeEvaluation(n);
9928
+ T && (r.fetchHasUnresolvedReference = T.hasUnresolvedReference, r.fetchUrl = T.hasUnresolvedReference ? null : T.value);
9899
9929
  }
9900
9930
  const a = {}, o = t ? p.attrName(t, "fetch-method") : p.attrName(null, "method", !0);
9901
9931
  if (e.hasAttribute(o)) {
9902
- const R = e.getAttributeEvaluation(o);
9903
- R?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : a.method = p.normalizeAttributeText(R?.value) ?? void 0;
9932
+ const T = e.getAttributeEvaluation(o);
9933
+ T?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : a.method = p.normalizeAttributeText(T?.value) ?? void 0;
9904
9934
  }
9905
9935
  const l = t ? p.attrName(t, "fetch-headers") : p.attrName(null, "headers", !0), u = p.readFetchHeaders(
9906
9936
  e,
9907
9937
  l
9908
9938
  );
9909
9939
  u !== null && (a.headers = u);
9910
- const h = t ? p.attrName(t, "fetch-content-type") : p.attrName(null, "content-type", !0);
9940
+ const f = t ? p.attrName(t, "fetch-content-type") : p.attrName(null, "content-type", !0);
9911
9941
  let m = null;
9912
- if (e.hasAttribute(h)) {
9913
- const R = e.getAttributeEvaluation(h);
9914
- R?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), m = p.normalizeAttributeText(
9915
- R?.value
9942
+ if (e.hasAttribute(f)) {
9943
+ const T = e.getAttributeEvaluation(f);
9944
+ T?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), m = p.normalizeAttributeText(
9945
+ T?.value
9916
9946
  );
9917
9947
  }
9918
9948
  if (m !== null)
@@ -9921,56 +9951,56 @@ ${$}
9921
9951
  m
9922
9952
  );
9923
9953
  else if (a.method && !p.hasDeclaredContentType(a.headers)) {
9924
- const R = a.method.toUpperCase();
9954
+ const T = a.method.toUpperCase();
9925
9955
  a.headers = p.withContentType(
9926
9956
  a.headers,
9927
- R === "GET" || R === "HEAD" || R === "OPTIONS" ? "application/x-www-form-urlencoded" : "application/json"
9957
+ T === "GET" || T === "HEAD" || T === "OPTIONS" ? "application/x-www-form-urlencoded" : "application/json"
9928
9958
  );
9929
9959
  }
9930
9960
  Object.keys(a).length > 0 && (r.fetchOptions = a);
9931
- const y = t ? p.attrName(t, "fetch-download") : p.attrName(null, "download", !0);
9932
- if (e.hasAttribute(y) && !s)
9961
+ const b = t ? p.attrName(t, "fetch-download") : p.attrName(null, "download", !0);
9962
+ if (e.hasAttribute(b) && !s)
9933
9963
  g.warn(
9934
9964
  "Haori",
9935
- `${y} は ${n} と併せて指定してください(保存する応答が無いため、この宣言は無視します)。`
9965
+ `${b} は ${n} と併せて指定してください(保存する応答が無いため、この宣言は無視します)。`
9936
9966
  );
9937
- else if (e.hasAttribute(y)) {
9967
+ else if (e.hasAttribute(b)) {
9938
9968
  r.download = !0;
9939
- const R = e.getAttributeEvaluation(y);
9940
- r.downloadFileName = R?.hasUnresolvedReference ? null : p.normalizeAttributeText(R?.value);
9969
+ const T = e.getAttributeEvaluation(b);
9970
+ r.downloadFileName = T?.hasUnresolvedReference ? null : p.normalizeAttributeText(T?.value);
9941
9971
  }
9942
9972
  const E = t ? p.attrName(t, "fetch-download-folder") : p.attrName(null, "download-folder", !0);
9943
9973
  e.hasAttribute(E) && (r.download ? r.downloadFolder = !0 : g.warn(
9944
9974
  "Haori",
9945
- `${E} は ${y} と併せて指定してください(書き出す応答が無いため、この宣言は無視します)。`
9975
+ `${E} は ${b} と併せて指定してください(書き出す応答が無いため、この宣言は無視します)。`
9946
9976
  ));
9947
9977
  const A = t ? p.attrName(t, "bind") : p.attrName(null, "bind", !0);
9948
9978
  if (e.hasAttribute(A)) {
9949
- const R = W.read(e, A);
9950
- if (R) {
9951
- const $ = W.queryAll(R, A);
9979
+ const T = W.read(e, A);
9980
+ if (T) {
9981
+ const $ = W.queryAll(T, A);
9952
9982
  $.length > 0 ? (r.bindFragments = [], $.forEach((K) => {
9953
9983
  const _ = N.get(K);
9954
9984
  _ && r.bindFragments.push(_);
9955
9985
  })) : g.error(
9956
9986
  "Haori",
9957
- `Bind element not found: ${R} (${A})`
9987
+ `Bind element not found: ${T} (${A})`
9958
9988
  );
9959
9989
  }
9960
9990
  }
9961
- const T = p.attrName(t, "bind-arg"), M = p.attrName(null, "arg", !0), P = p.attrName(null, "bind-arg", !0);
9962
- t ? e.hasAttribute(T) && (r.bindArg = e.getRawAttribute(T)) : e.hasAttribute(M) ? r.bindArg = e.getRawAttribute(
9963
- M
9991
+ const w = p.attrName(t, "bind-arg"), C = p.attrName(null, "arg", !0), P = p.attrName(null, "bind-arg", !0);
9992
+ t ? e.hasAttribute(w) && (r.bindArg = e.getRawAttribute(w)) : e.hasAttribute(C) ? r.bindArg = e.getRawAttribute(
9993
+ C
9964
9994
  ) : e.hasAttribute(P) && (r.bindArg = e.getRawAttribute(P));
9965
9995
  const ee = t ? p.attrName(t, "bind-params") : p.attrName(null, "bind-params", !0);
9966
9996
  if (e.hasAttribute(ee)) {
9967
- const R = e.getRawAttribute(ee);
9968
- r.bindParams = R.split("&").map(($) => $.trim());
9997
+ const T = e.getRawAttribute(ee);
9998
+ r.bindParams = T.split("&").map(($) => $.trim());
9969
9999
  }
9970
10000
  const x = t ? p.attrName(t, "bind-append") : p.attrName(null, "bind-append", !0);
9971
10001
  if (e.hasAttribute(x)) {
9972
- const R = e.getRawAttribute(x);
9973
- r.bindAppendParams = R.split("&").map(($) => $.trim()).filter(Boolean);
10002
+ const T = e.getRawAttribute(x);
10003
+ r.bindAppendParams = T.split("&").map(($) => $.trim()).filter(Boolean);
9974
10004
  }
9975
10005
  const Y = t ? p.attrName(t, "bind-merge") : p.attrName(null, "bind-merge", !0);
9976
10006
  e.hasAttribute(Y) && (r.bindMerge = !0);
@@ -9978,8 +10008,8 @@ ${$}
9978
10008
  e.hasAttribute(Q) && (r.bindTransform = e.getRawAttribute(Q));
9979
10009
  const X = t ? p.attrName(t, "copy-params") : null;
9980
10010
  if (X && e.hasAttribute(X)) {
9981
- const R = e.getRawAttribute(X);
9982
- r.copyParams = R.split("&").map(($) => $.trim()).filter(Boolean);
10011
+ const T = e.getRawAttribute(X);
10012
+ r.copyParams = T.split("&").map(($) => $.trim()).filter(Boolean);
9983
10013
  }
9984
10014
  if (t) {
9985
10015
  if (e.hasAttribute(p.attrName(t, "adjust"))) {
@@ -10063,12 +10093,12 @@ ${U}
10063
10093
  p.attrName(t, "error-bind")
10064
10094
  );
10065
10095
  }
10066
- const R = p.attrName(t, "redirect"), $ = p.attrName(t, "redirect-replace"), K = e.hasAttribute(R), _ = e.hasAttribute($);
10096
+ const T = p.attrName(t, "redirect"), $ = p.attrName(t, "redirect-replace"), K = e.hasAttribute(T), _ = e.hasAttribute($);
10067
10097
  if (K && (r.redirectUrl = p.readLateAttribute(
10068
10098
  e,
10069
10099
  r,
10070
10100
  "redirect",
10071
- R
10101
+ T
10072
10102
  )), _ && (r.redirectReplaceUrl = p.readLateAttribute(
10073
10103
  e,
10074
10104
  r,
@@ -10194,20 +10224,20 @@ ${U}
10194
10224
  }
10195
10225
  }
10196
10226
  if (!t && (e.hasAttribute(p.attrName(null, "data", !0)) && (r.dataAttrName = p.attrName(null, "data", !0)), e.hasAttribute(p.attrName(null, "form", !0)))) {
10197
- const R = W.read(
10227
+ const T = W.read(
10198
10228
  e,
10199
10229
  p.attrName(null, "form", !0)
10200
10230
  );
10201
- if (R) {
10231
+ if (T) {
10202
10232
  const $ = W.query(
10203
- R,
10233
+ T,
10204
10234
  p.attrName(null, "form", !0)
10205
10235
  );
10206
10236
  $ !== null ? r.formFragment = F.getFormFragment(
10207
10237
  N.get($)
10208
10238
  ) : g.error(
10209
10239
  "Haori",
10210
- `Form element not found: ${R} (${p.attrName(null, "fetch-form", !0)})`
10240
+ `Form element not found: ${T} (${p.attrName(null, "fetch-form", !0)})`
10211
10241
  );
10212
10242
  } else
10213
10243
  r.formFragment = F.getFormFragment(e);
@@ -10215,18 +10245,18 @@ ${U}
10215
10245
  (!t || t === "poll") && p.readNoMessageDeclarations(e, r, t ?? "fetch");
10216
10246
  const j = t ? p.attrName(t, "fetch-state") : p.attrName(null, "state", !0);
10217
10247
  if (e.hasAttribute(j)) {
10218
- const R = W.read(e, j), $ = [];
10219
- R ? (W.queryAll(R, j).forEach((_) => {
10220
- const be = N.get(_);
10221
- be && $.push(be);
10248
+ const T = W.read(e, j), $ = [];
10249
+ T ? (W.queryAll(T, j).forEach((_) => {
10250
+ const ye = N.get(_);
10251
+ ye && $.push(ye);
10222
10252
  }), $.length === 0 && g.error(
10223
10253
  "Haori",
10224
- `Element not found: ${R} (${j})`
10254
+ `Element not found: ${T} (${j})`
10225
10255
  )) : $.push(e), $.length > 0 && (r.fetchStateFragments = $);
10226
10256
  }
10227
10257
  const se = t ? p.attrName(t, "store-clear") : p.attrName(null, "store-clear", !0);
10228
10258
  if (e.hasAttribute(se)) {
10229
- const R = e.getRawAttribute(se), $ = R === null ? "" : R.trim();
10259
+ const T = e.getRawAttribute(se), $ = T === null ? "" : T.trim();
10230
10260
  if ($ === "")
10231
10261
  g.error(
10232
10262
  "Haori",
@@ -10245,7 +10275,7 @@ ${U}
10245
10275
  }
10246
10276
  return s && !r.download && (!r.bindFragments || r.bindFragments.length === 0) && (r.bindFragments = [e], r.defaultSelfBind = !0), r.download && r.bindFragments && r.bindFragments.length > 0 && (g.warn(
10247
10277
  "Haori",
10248
- `${y} と同時にバインド先が指定されています(応答はファイルとして保存し、バインドは行いません)。`
10278
+ `${b} と同時にバインド先が指定されています(応答はファイルとして保存し、バインドは行いません)。`
10249
10279
  ), r.bindFragments = null), p.recordRowWriteTargets(r), r;
10250
10280
  }
10251
10281
  /**
@@ -10361,13 +10391,13 @@ ${U}
10361
10391
  if (this.options.runScript) {
10362
10392
  const m = this.options.targetFragment?.getTarget() ?? null;
10363
10393
  try {
10364
- const y = this.options.runScript.call(
10394
+ const b = this.options.runScript.call(
10365
10395
  m,
10366
10396
  this.domEvent
10367
10397
  );
10368
- y === !1 && this.domEvent && this.domEvent.preventDefault(), y != null && typeof y.then == "function" && await y;
10369
- } catch (y) {
10370
- g.error("Haori", `Run script execution error: ${y}`);
10398
+ b === !1 && this.domEvent && this.domEvent.preventDefault(), b != null && typeof b.then == "function" && await b;
10399
+ } catch (b) {
10400
+ g.error("Haori", `Run script execution error: ${b}`);
10371
10401
  }
10372
10402
  }
10373
10403
  if (!await this.confirm())
@@ -10380,7 +10410,7 @@ ${U}
10380
10410
  )
10381
10411
  ), this.captureHistorySnapshots());
10382
10412
  const r = this.prepareFetchRequest();
10383
- this.requestUserEditSequence = S.currentSequence();
10413
+ this.requestUserEditSequence = R.currentSequence();
10384
10414
  const i = r.payload;
10385
10415
  let n = r.url, s = r.options, a = !1, o = !1;
10386
10416
  if (this.options.beforeCallback) {
@@ -10406,10 +10436,10 @@ ${U}
10406
10436
  s
10407
10437
  );
10408
10438
  n = A.url;
10409
- const T = { ...A.options }, M = A.normalized ? A.requestedMethod : r.requestedMethod, P = A.effectiveMethod, ee = r.transportMode === "query-get" || A.normalized, x = A.queryString ?? r.queryString;
10439
+ const w = { ...A.options }, C = A.normalized ? A.requestedMethod : r.requestedMethod, P = A.effectiveMethod, ee = r.transportMode === "query-get" || A.normalized, x = A.queryString ?? r.queryString;
10410
10440
  if (ee && g.info("Haori demo fetch normalization", {
10411
10441
  runtime: c.runtime,
10412
- requestedMethod: M,
10442
+ requestedMethod: C,
10413
10443
  effectiveMethod: P,
10414
10444
  transportMode: "query-get",
10415
10445
  url: n,
@@ -10418,7 +10448,7 @@ ${U}
10418
10448
  }), this.options.targetFragment && n) {
10419
10449
  const Y = performance.now(), Q = {
10420
10450
  runtime: c.runtime,
10421
- requestedMethod: M,
10451
+ requestedMethod: C,
10422
10452
  effectiveMethod: P,
10423
10453
  transportMode: ee ? "query-get" : "http",
10424
10454
  ...ee ? { queryString: x } : {}
@@ -10426,10 +10456,10 @@ ${U}
10426
10456
  return B.fetchStart(
10427
10457
  this.options.targetFragment.getTarget(),
10428
10458
  n,
10429
- T,
10459
+ w,
10430
10460
  l ? i : void 0,
10431
10461
  Q
10432
- ), await this.injectFetchState("loading"), await p.invokeFetch(n, T).then((X) => this.handleFetchResult(
10462
+ ), await this.injectFetchState("loading"), await p.invokeFetch(n, w).then((X) => this.handleFetchResult(
10433
10463
  X,
10434
10464
  n || void 0,
10435
10465
  Y
@@ -10445,17 +10475,17 @@ ${U}
10445
10475
  ), await this.runErrorActions(null), X;
10446
10476
  });
10447
10477
  }
10448
- return await fetch(n, T).then((Y) => this.handleFetchResult(Y, n || void 0));
10478
+ return await fetch(n, w).then((Y) => this.handleFetchResult(Y, n || void 0));
10449
10479
  }
10450
10480
  (!this.options.bindFragments || this.options.bindFragments.length === 0) && this.options.formFragment && l && await this.commitFormValues(
10451
10481
  this.options.formFragment,
10452
10482
  i,
10453
10483
  e
10454
10484
  ), this.suppressEmptyReplaceBind = !l && !this.options.formFragment && (this.eventType === "change" || this.eventType === "input"), this.twoWayCommitBind = this.eventType === "change" || this.eventType === "input";
10455
- const u = l ? je(i) : {}, h = new Response(JSON.stringify(u), {
10485
+ const u = l ? je(i) : {}, f = new Response(JSON.stringify(u), {
10456
10486
  headers: { "Content-Type": "application/json" }
10457
10487
  });
10458
- return await this.handleFetchResult(h);
10488
+ return await this.handleFetchResult(f);
10459
10489
  } finally {
10460
10490
  this.releaseExecutionLock(e);
10461
10491
  }
@@ -10509,9 +10539,9 @@ ${U}
10509
10539
  let l;
10510
10540
  if (o) {
10511
10541
  l = { ...s ?? {} };
10512
- const u = String(o), h = F.resolveAncestorArgOwner(e, u);
10542
+ const u = String(o), f = F.resolveAncestorArgOwner(e, u);
10513
10543
  l[u] = F.mergeCollectedValues(
10514
- (h ? h.value : l[u]) ?? null,
10544
+ (f ? f.value : l[u]) ?? null,
10515
10545
  a
10516
10546
  );
10517
10547
  } else
@@ -10520,7 +10550,7 @@ ${U}
10520
10550
  a,
10521
10551
  F.ancestorBaseResolver(e)
10522
10552
  );
10523
- await C.setBindingData(i, l, {
10553
+ await M.setBindingData(i, l, {
10524
10554
  skipFragments: n,
10525
10555
  kind: "nonSupply",
10526
10556
  sequence: this.operationSequence,
@@ -10595,7 +10625,7 @@ ${U}
10595
10625
  t.removeAttribute("disabled");
10596
10626
  return;
10597
10627
  }
10598
- C.setAttribute(t, r.name, r.value).catch(
10628
+ M.setAttribute(t, r.name, r.value).catch(
10599
10629
  (i) => {
10600
10630
  g.error(
10601
10631
  "Haori",
@@ -10763,7 +10793,7 @@ ${U}
10763
10793
  `保存先のフォルダを確かめられなかったため、今までどおり保存します: ${l}`
10764
10794
  ), "fallback";
10765
10795
  }
10766
- if (s && !await he().confirm(
10796
+ if (s && !await fe().confirm(
10767
10797
  `${n} は既にあります。上書きしますか?`
10768
10798
  ))
10769
10799
  return "cancelled";
@@ -10849,7 +10879,7 @@ ${U}
10849
10879
  * @returns 表示の完了 Promise
10850
10880
  */
10851
10881
  async showDownloadFailure(e) {
10852
- const t = this.resolveMessageScope(), r = he();
10882
+ const t = this.resolveMessageScope(), r = fe();
10853
10883
  await r.clearMessages(t), e && await r.addErrorMessage(t, tt);
10854
10884
  }
10855
10885
  /**
@@ -10933,7 +10963,7 @@ ${U}
10933
10963
  * フェッチ後の処理を実行します。
10934
10964
  */
10935
10965
  async handleFetchResult(e, t, r) {
10936
- const i = he();
10966
+ const i = fe();
10937
10967
  if (!e.ok) {
10938
10968
  if (At(e.status))
10939
10969
  return !1;
@@ -10944,17 +10974,17 @@ ${U}
10944
10974
  e.status,
10945
10975
  r
10946
10976
  );
10947
- const E = this.selectErrorActions(e.status), A = E?.bind === !0, T = await this.handleFetchError(
10977
+ const E = this.selectErrorActions(e.status), A = E?.bind === !0, w = await this.handleFetchError(
10948
10978
  A ? e.clone() : e,
10949
10979
  E?.noMessage !== !0 && !A
10950
10980
  );
10951
- return A && await this.bindResult(e).catch((M) => {
10952
- g.error("Haori", "Failed to bind the error response:", M);
10981
+ return A && await this.bindResult(e).catch((C) => {
10982
+ g.error("Haori", "Failed to bind the error response:", C);
10953
10983
  }), await this.injectFetchState(
10954
10984
  "error",
10955
10985
  e.status,
10956
10986
  e.statusText || null,
10957
- T
10987
+ w
10958
10988
  ), await this.runErrorActions(e.status), !1;
10959
10989
  }
10960
10990
  if (this.options.targetFragment && t && r && B.fetchEnd(
@@ -11032,31 +11062,31 @@ ${U}
11032
11062
  p.attrName(this.eventType, "scroll"),
11033
11063
  document
11034
11064
  )?.scrollIntoView({ behavior: "smooth", block: "nearest" });
11035
- const h = this.resolveLateAttribute(
11065
+ const f = this.resolveLateAttribute(
11036
11066
  "redirect",
11037
11067
  this.options.redirectUrl
11038
11068
  ), m = this.resolveLateAttribute(
11039
11069
  "redirect-replace",
11040
11070
  this.options.redirectReplaceUrl
11041
11071
  );
11042
- h && m && g.warn(
11072
+ f && m && g.warn(
11043
11073
  "Haori",
11044
11074
  `${p.attrName(this.eventType, "redirect")} と ${p.attrName(this.eventType, "redirect-replace")} の両方が指定されています。履歴を置き換える方を採用します。`
11045
11075
  );
11046
- const y = m || h;
11047
- if (y) {
11048
- let E = y;
11076
+ const b = m || f;
11077
+ if (b) {
11078
+ let E = b;
11049
11079
  const A = this.resolveLateAttribute(
11050
11080
  "redirect-return-param",
11051
11081
  this.options.redirectReturnParam
11052
11082
  );
11053
11083
  if (A) {
11054
- const M = new URLSearchParams(window.location.search).get(A);
11055
- if (M !== null) {
11056
- const P = M.trim();
11084
+ const C = new URLSearchParams(window.location.search).get(A);
11085
+ if (C !== null) {
11086
+ const P = C.trim();
11057
11087
  De.isSafeLocalPath(P) ? E = P : g.warn(
11058
11088
  "Haori",
11059
- `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${M}`
11089
+ `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${C}`
11060
11090
  );
11061
11091
  }
11062
11092
  }
@@ -11093,7 +11123,7 @@ ${U}
11093
11123
  if (!e || e.length === 0)
11094
11124
  return !1;
11095
11125
  for (const i of e) {
11096
- await C.evaluateAll(i);
11126
+ await M.evaluateAll(i);
11097
11127
  const n = i.getTarget();
11098
11128
  if (t && p.takeClickOutcome(n), typeof n.click == "function" ? n.click() : n.dispatchEvent(
11099
11129
  new MouseEvent("click", { bubbles: !0, cancelable: !0 })
@@ -11129,7 +11159,7 @@ ${U}
11129
11159
  `${t.key}-click-await`
11130
11160
  ))
11131
11161
  return;
11132
- const i = he(), n = [];
11162
+ const i = fe(), n = [];
11133
11163
  t.closeFragments?.forEach((a) => {
11134
11164
  const o = a.getTarget();
11135
11165
  o instanceof HTMLElement ? n.push(i.closeDialog(o)) : g.error("Haori", "Element is not an HTML element: ", o);
@@ -11223,14 +11253,14 @@ ${U}
11223
11253
  return;
11224
11254
  }
11225
11255
  const l = (u) => {
11226
- for (const [h, m] of Object.entries(u))
11227
- m != null && (Array.isArray(m) ? (o.searchParams.delete(h), m.forEach((y) => o.searchParams.append(h, String(y)))) : typeof m == "object" ? o.searchParams.set(h, JSON.stringify(m)) : o.searchParams.set(h, String(m)));
11256
+ for (const [f, m] of Object.entries(u))
11257
+ m != null && (Array.isArray(m) ? (o.searchParams.delete(f), m.forEach((b) => o.searchParams.append(f, String(b)))) : typeof m == "object" ? o.searchParams.set(f, JSON.stringify(m)) : o.searchParams.set(f, String(m)));
11228
11258
  };
11229
11259
  n && l(r), s && l(i), history.pushState(
11230
11260
  { [Ht]: !0 },
11231
11261
  "",
11232
11262
  o.toString()
11233
- ), C.refreshUrlParams();
11263
+ ), M.refreshUrlParams();
11234
11264
  } catch (a) {
11235
11265
  g.error("Haori", `history.pushState failed: ${a}`);
11236
11266
  }
@@ -11261,62 +11291,62 @@ ${U}
11261
11291
  let r = null;
11262
11292
  this.options.formFragment ? r = this.options.formFragment : this.options.targetFragment && (r = F.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
11263
11293
  const i = r ? r.getTarget() : document.body;
11264
- await he().clearMessages(i);
11294
+ await fe().clearMessages(i);
11265
11295
  const n = async (u) => {
11266
- const h = r ? r.getTarget() : document.body;
11267
- await he().addErrorMessage(h, u);
11296
+ const f = r ? r.getTarget() : document.body;
11297
+ await fe().addErrorMessage(f, u);
11268
11298
  }, s = () => {
11269
11299
  if (!this.options.scrollOnError)
11270
11300
  return;
11271
- const u = r ? r.getTarget() : document.body, h = u.nextElementSibling;
11301
+ const u = r ? r.getTarget() : document.body, f = u.nextElementSibling;
11272
11302
  (u.getAttribute("data-message-level") === "error" ? u : u.parentElement?.getAttribute("data-message-level") === "error" ? u.parentElement : u.querySelector(
11273
11303
  '[data-message-level="error"]'
11274
- ) ?? (h?.getAttribute("data-message-level") === "error" ? h : null))?.scrollIntoView({ behavior: "smooth", block: "nearest" });
11304
+ ) ?? (f?.getAttribute("data-message-level") === "error" ? f : null))?.scrollIntoView({ behavior: "smooth", block: "nearest" });
11275
11305
  }, a = async (u) => {
11276
11306
  if (t) {
11277
11307
  u.length === 0 && await n(`${e.status} ${e.statusText}`);
11278
- for (const h of u)
11279
- h.key && r ? await F.addErrorMessage(r, h.key, h.message) : await n(h.message);
11308
+ for (const f of u)
11309
+ f.key && r ? await F.addErrorMessage(r, f.key, f.message) : await n(f.message);
11280
11310
  s();
11281
11311
  }
11282
- return u.length === 0 ? null : u.map((h) => h.message).join(`
11312
+ return u.length === 0 ? null : u.map((f) => f.message).join(`
11283
11313
  `);
11284
11314
  };
11285
11315
  if ((e.headers.get("Content-Type") || "").includes("application/json"))
11286
11316
  try {
11287
- const u = await e.json(), h = [];
11317
+ const u = await e.json(), f = [];
11288
11318
  if (Array.isArray(u)) {
11289
- const m = /* @__PURE__ */ new Map(), y = [];
11319
+ const m = /* @__PURE__ */ new Map(), b = [];
11290
11320
  for (const E of u)
11291
11321
  if (E && typeof E == "object" && !Array.isArray(E)) {
11292
- const A = E.key, T = E.message, M = typeof A == "string" && A.length > 0 ? A : null, P = typeof T == "string" ? T : T != null ? String(T) : "";
11322
+ const A = E.key, w = E.message, C = typeof A == "string" && A.length > 0 ? A : null, P = typeof w == "string" ? w : w != null ? String(w) : "";
11293
11323
  if (P.length === 0)
11294
11324
  continue;
11295
- if (M !== null) {
11296
- const ee = m.get(M) ?? [];
11297
- ee.push(P), m.set(M, ee);
11325
+ if (C !== null) {
11326
+ const ee = m.get(C) ?? [];
11327
+ ee.push(P), m.set(C, ee);
11298
11328
  } else
11299
- y.push(P);
11300
- } else typeof E == "string" && E.length > 0 && y.push(E);
11329
+ b.push(P);
11330
+ } else typeof E == "string" && E.length > 0 && b.push(E);
11301
11331
  for (const [E, A] of m)
11302
- h.push({ key: E, message: A.join(`
11332
+ f.push({ key: E, message: A.join(`
11303
11333
  `) });
11304
- for (const E of y)
11305
- h.push({ message: E });
11334
+ for (const E of b)
11335
+ f.push({ message: E });
11306
11336
  } else if (u && typeof u == "object") {
11307
- if (typeof u.message == "string" && h.push({ message: u.message }), Array.isArray(u.messages))
11337
+ if (typeof u.message == "string" && f.push({ message: u.message }), Array.isArray(u.messages))
11308
11338
  for (const m of u.messages)
11309
- typeof m == "string" && h.push({ message: m });
11339
+ typeof m == "string" && f.push({ message: m });
11310
11340
  if (u.errors && typeof u.errors == "object")
11311
- for (const [m, y] of Object.entries(u.errors))
11312
- Array.isArray(y) ? h.push({ key: m, message: y.join(`
11313
- `) }) : typeof y == "string" ? h.push({ key: m, message: y }) : y != null && h.push({ key: m, message: String(y) });
11314
- if (h.length === 0)
11315
- for (const [m, y] of Object.entries(u))
11316
- m === "message" || m === "messages" || m === "errors" || (Array.isArray(y) ? h.push({ key: m, message: y.join(`
11317
- `) }) : typeof y == "string" && h.push({ key: m, message: y }));
11341
+ for (const [m, b] of Object.entries(u.errors))
11342
+ Array.isArray(b) ? f.push({ key: m, message: b.join(`
11343
+ `) }) : typeof b == "string" ? f.push({ key: m, message: b }) : b != null && f.push({ key: m, message: String(b) });
11344
+ if (f.length === 0)
11345
+ for (const [m, b] of Object.entries(u))
11346
+ m === "message" || m === "messages" || m === "errors" || (Array.isArray(b) ? f.push({ key: m, message: b.join(`
11347
+ `) }) : typeof b == "string" && f.push({ key: m, message: b }));
11318
11348
  }
11319
- return await a(h);
11349
+ return await a(f);
11320
11350
  } catch {
11321
11351
  }
11322
11352
  let l = "";
@@ -11478,7 +11508,7 @@ ${U}
11478
11508
  */
11479
11509
  confirm() {
11480
11510
  const e = this.options.confirmMessage;
11481
- return e == null ? Promise.resolve(!0) : he().confirm(e);
11511
+ return e == null ? Promise.resolve(!0) : fe().confirm(e);
11482
11512
  }
11483
11513
  /**
11484
11514
  * 結果データを対象のフラグメントにバインドします。
@@ -11527,14 +11557,14 @@ ${U}
11527
11557
  row: o,
11528
11558
  attributeName: s,
11529
11559
  syncWhenUnchanged: "reflect",
11530
- apply: (y) => {
11531
- const E = this.resolveCurrentRowItem(o, y), A = { ...E };
11560
+ apply: (b) => {
11561
+ const E = this.resolveCurrentRowItem(o, b), A = { ...E };
11532
11562
  if (i && typeof i == "object" && !Array.isArray(i)) {
11533
- const T = E[m], M = T !== null && typeof T == "object" && !Array.isArray(T) ? T : {};
11563
+ const w = E[m], C = w !== null && typeof w == "object" && !Array.isArray(w) ? w : {};
11534
11564
  A[m] = this.mergeAppendBindingData(
11535
11565
  o,
11536
11566
  i,
11537
- M
11567
+ C
11538
11568
  );
11539
11569
  } else
11540
11570
  A[m] = i;
@@ -11543,20 +11573,20 @@ ${U}
11543
11573
  });
11544
11574
  return;
11545
11575
  }
11546
- const u = { ...o.getRawBindingData() ?? {} }, h = this.options.bindArg;
11576
+ const u = { ...o.getRawBindingData() ?? {} }, f = this.options.bindArg;
11547
11577
  if (i && typeof i == "object" && !Array.isArray(i)) {
11548
- const m = u[h], y = m && typeof m == "object" && !Array.isArray(m) ? m : {};
11549
- u[h] = this.mergeAppendBindingData(
11578
+ const m = u[f], b = m && typeof m == "object" && !Array.isArray(m) ? m : {};
11579
+ u[f] = this.mergeAppendBindingData(
11550
11580
  o,
11551
11581
  i,
11552
- y
11582
+ b
11553
11583
  );
11554
11584
  } else
11555
- u[h] = i;
11585
+ u[f] = i;
11556
11586
  n.push(
11557
- C.setBindingData(
11587
+ M.setBindingData(
11558
11588
  o.getTarget(),
11559
- this.reconcileUserEditsForBind(o, u, [h]),
11589
+ this.reconcileUserEditsForBind(o, u, [f]),
11560
11590
  {
11561
11591
  // マネージド fetch の bind かつ、bind 先が実行中のバインドワークを
11562
11592
  // 持つ(= 自分自身を await している)ときだけ reentrant(即時実行)に
@@ -11597,11 +11627,11 @@ ${U}
11597
11627
  attributeName: s,
11598
11628
  syncWhenUnchanged: "reflect",
11599
11629
  apply: (m) => {
11600
- const y = this.options.bindMerge ? this.resolveCurrentRowItem(o, m) : m, E = this.mergeAppendBindingData(
11630
+ const b = this.options.bindMerge ? this.resolveCurrentRowItem(o, m) : m, E = this.mergeAppendBindingData(
11601
11631
  o,
11602
11632
  i,
11603
- y
11604
- ), A = this.options.bindMerge ? { ...y, ...E } : E;
11633
+ b
11634
+ ), A = this.options.bindMerge ? { ...b, ...E } : E;
11605
11635
  return this.reconcileRowUserEdits(o, A);
11606
11636
  }
11607
11637
  });
@@ -11610,13 +11640,13 @@ ${U}
11610
11640
  const u = this.mergeAppendBindingData(
11611
11641
  o,
11612
11642
  i
11613
- ), h = this.options.bindMerge ? { ...o.getRawBindingData() ?? {}, ...u } : u;
11643
+ ), f = this.options.bindMerge ? { ...o.getRawBindingData() ?? {}, ...u } : u;
11614
11644
  n.push(
11615
- C.setBindingData(
11645
+ M.setBindingData(
11616
11646
  o.getTarget(),
11617
11647
  this.reconcileUserEditsForBind(
11618
11648
  o,
11619
- h,
11649
+ f,
11620
11650
  Object.keys(u)
11621
11651
  ),
11622
11652
  {
@@ -11674,7 +11704,7 @@ ${U}
11674
11704
  if (i === null)
11675
11705
  return t;
11676
11706
  const n = this.eventType === "poll";
11677
- if (!n && !this.twoWayCommitBind && C.clearUserEditMarks(e, i), !(e.getTarget() instanceof HTMLFormElement))
11707
+ if (!n && !this.twoWayCommitBind && M.clearUserEditMarks(e, i), !(e.getTarget() instanceof HTMLFormElement))
11678
11708
  return this.reconcileAncestorArgFormEdits(
11679
11709
  e,
11680
11710
  t,
@@ -11714,7 +11744,7 @@ ${U}
11714
11744
  if (r === null)
11715
11745
  return t;
11716
11746
  const i = this.eventType === "poll";
11717
- !i && !this.twoWayCommitBind && C.clearUserEditMarks(e, r);
11747
+ !i && !this.twoWayCommitBind && M.clearUserEditMarks(e, r);
11718
11748
  const n = F.getValuesEditedAfter(
11719
11749
  e,
11720
11750
  i ? 0 : r
@@ -11788,7 +11818,7 @@ ${U}
11788
11818
  ...t
11789
11819
  };
11790
11820
  n.push(
11791
- C.setBindingData(s.getTarget(), o, {
11821
+ M.setBindingData(s.getTarget(), o, {
11792
11822
  // 通番はコピーを起こした操作のもの(フェッチ応答の反映と同じ理由)。
11793
11823
  sequence: this.operationSequence
11794
11824
  })
@@ -11850,9 +11880,9 @@ ${U}
11850
11880
  * @returns コピー元のデータ
11851
11881
  */
11852
11882
  resolveCopySourceData() {
11853
- return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? $e(this.options.copySourceFragment) : C.withoutReservedBindingKeys(
11883
+ return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? $e(this.options.copySourceFragment) : M.withoutReservedBindingKeys(
11854
11884
  this.options.copySourceFragment.getRawBindingData() ?? {}
11855
- ) : this.options.formFragment ? $e(this.options.formFragment) : this.options.targetFragment ? C.withoutReservedBindingKeys(
11885
+ ) : this.options.formFragment ? $e(this.options.formFragment) : this.options.targetFragment ? M.withoutReservedBindingKeys(
11856
11886
  this.options.targetFragment.getRawBindingData() ?? {}
11857
11887
  ) : {};
11858
11888
  }
@@ -11919,8 +11949,8 @@ ${U}
11919
11949
  n.headers || void 0
11920
11950
  ), a = (n.method || "GET").toUpperCase(), o = c.runtime === "demo" && !Pe(a), l = o ? "GET" : a;
11921
11951
  if (n.method = l, Object.keys(t).length > 0 && Fe(t)) {
11922
- const h = s.get("Content-Type") || "";
11923
- !Pe(a) && /multipart\/form-data/i.test(h) ? Xt(t) && g.warn(
11952
+ const f = s.get("Content-Type") || "";
11953
+ !Pe(a) && /multipart\/form-data/i.test(f) ? Xt(t) && g.warn(
11924
11954
  "Haori",
11925
11955
  `A File value nested under ${c.prefix}form-object / ${c.prefix}form-list cannot be sent. Place file inputs at the top level of the collected form values.`
11926
11956
  ) : g.warn(
@@ -11931,19 +11961,19 @@ ${U}
11931
11961
  if (l === "GET" || l === "HEAD" || l === "OPTIONS")
11932
11962
  Object.keys(t).length > 0 && (i = vt(i, t));
11933
11963
  else if (Object.keys(t).length > 0) {
11934
- const h = s.get("Content-Type") || "";
11935
- if (/multipart\/form-data/i.test(h)) {
11964
+ const f = s.get("Content-Type") || "";
11965
+ if (/multipart\/form-data/i.test(f)) {
11936
11966
  s.delete("Content-Type");
11937
11967
  const m = new FormData();
11938
- for (const [y, E] of Object.entries(t))
11939
- E == null ? m.append(y, "") : E instanceof Blob ? m.append(y, E) : Array.isArray(E) ? E.forEach((A) => {
11940
- A instanceof Blob ? m.append(y, A) : m.append(y, Ee(A));
11941
- }) : m.append(y, Ee(E));
11968
+ for (const [b, E] of Object.entries(t))
11969
+ E == null ? m.append(b, "") : E instanceof Blob ? m.append(b, E) : Array.isArray(E) ? E.forEach((A) => {
11970
+ A instanceof Blob ? m.append(b, A) : m.append(b, Ee(A));
11971
+ }) : m.append(b, Ee(E));
11942
11972
  n.body = m;
11943
- } else if (/application\/x-www-form-urlencoded/i.test(h)) {
11973
+ } else if (/application\/x-www-form-urlencoded/i.test(f)) {
11944
11974
  const m = new URLSearchParams();
11945
- for (const [y, E] of Object.entries(t))
11946
- E !== void 0 && (Array.isArray(E) ? E.forEach((A) => m.append(y, Ee(A))) : m.append(y, Ee(E)));
11975
+ for (const [b, E] of Object.entries(t))
11976
+ E !== void 0 && (Array.isArray(E) ? E.forEach((A) => m.append(b, Ee(A))) : m.append(b, Ee(E)));
11947
11977
  n.body = m;
11948
11978
  } else
11949
11979
  s.set("Content-Type", "application/json"), n.body = JSON.stringify(t);
@@ -12070,7 +12100,7 @@ ${U}
12070
12100
  `Row container not found: ${i} (${r})`
12071
12101
  ), null;
12072
12102
  const a = N.get(s);
12073
- return a instanceof S ? a.hasAttribute(`${c.prefix}each`) ? a : (g.error(
12103
+ return a instanceof R ? a.hasAttribute(`${c.prefix}each`) ? a : (g.error(
12074
12104
  "Haori",
12075
12105
  `Row container must have ${c.prefix}each: ${i} (${r})`
12076
12106
  ), null) : (g.error(
@@ -12118,27 +12148,27 @@ ${U}
12118
12148
  const u = p.resolveRowScopeBase(e, o[0]);
12119
12149
  if (u === "unresolvable")
12120
12150
  return null;
12121
- let h, m, y;
12151
+ let f, m, b;
12122
12152
  if (u)
12123
- h = u.owner, m = u.ownerData, y = [...u.path, ...o.slice(1)];
12153
+ f = u.owner, m = u.ownerData, b = [...u.path, ...o.slice(1)];
12124
12154
  else {
12125
- for (h = e, m = null; h; ) {
12126
- const A = h.getRawBindingData();
12127
- if (A && o[0] in A && !p.isRowScopeKey(h, o[0])) {
12155
+ for (f = e, m = null; f; ) {
12156
+ const A = f.getRawBindingData();
12157
+ if (A && o[0] in A && !p.isRowScopeKey(f, o[0])) {
12128
12158
  m = A;
12129
12159
  break;
12130
12160
  }
12131
- h = h.getParent();
12161
+ f = f.getParent();
12132
12162
  }
12133
- y = o;
12163
+ b = o;
12134
12164
  }
12135
- if (!h || !m)
12165
+ if (!f || !m)
12136
12166
  return t || g.error(
12137
12167
  "Haori",
12138
12168
  `Binding data owner not found for ${s}="${a}".`
12139
12169
  ), null;
12140
- const E = p.readPathValue(m, y);
12141
- return Array.isArray(E) ? { owner: h, ownerData: m, array: E, path: y, mapped: n } : (t || g.error(
12170
+ const E = p.readPathValue(m, b);
12171
+ return Array.isArray(E) ? { owner: f, ownerData: m, array: E, path: b, mapped: n } : (t || g.error(
12142
12172
  "Haori",
12143
12173
  `${s}="${a}" does not resolve to an array.`
12144
12174
  ), null);
@@ -12315,10 +12345,10 @@ ${U}
12315
12345
  const a = s.array.slice();
12316
12346
  let o = !1;
12317
12347
  for (const u of i) {
12318
- const h = p.resolveRowArrayIndex(u, a);
12319
- if (h === null)
12348
+ const f = p.resolveRowArrayIndex(u, a);
12349
+ if (f === null)
12320
12350
  continue;
12321
- const m = a[h];
12351
+ const m = a[f];
12322
12352
  if (m === null || typeof m != "object" || Array.isArray(m)) {
12323
12353
  g.warn(
12324
12354
  "Haori",
@@ -12326,22 +12356,22 @@ ${U}
12326
12356
  );
12327
12357
  continue;
12328
12358
  }
12329
- const y = u.apply(m);
12330
- if (p.isSameRowItem(m, y)) {
12359
+ const b = u.apply(m);
12360
+ if (p.isSameRowItem(m, b)) {
12331
12361
  u.syncWhenUnchanged && r.push(
12332
12362
  p.syncUnchangedRowValues(
12333
12363
  u.row,
12334
- y,
12364
+ b,
12335
12365
  u.syncWhenUnchanged
12336
12366
  )
12337
12367
  );
12338
12368
  continue;
12339
12369
  }
12340
- a[h] = y, o = !0, u.syncWhenUnchanged === "supply" && F.clearRowUserEditMarksForChangedKeys(u.row, y);
12370
+ a[f] = b, o = !0, u.syncWhenUnchanged === "supply" && F.clearRowUserEditMarksForChangedKeys(u.row, b);
12341
12371
  }
12342
12372
  if (!o)
12343
12373
  return;
12344
- const l = C.setBindingData(
12374
+ const l = M.setBindingData(
12345
12375
  s.owner.getTarget(),
12346
12376
  p.withPathValue(s.ownerData, s.path, a),
12347
12377
  {
@@ -12357,7 +12387,7 @@ ${U}
12357
12387
  sequence: this.operationSequence
12358
12388
  }
12359
12389
  );
12360
- if (C.isEachUpdateRunning(n)) {
12390
+ if (M.isEachUpdateRunning(n)) {
12361
12391
  l.catch((u) => {
12362
12392
  g.error("Haori", "Failed to write row data.", u);
12363
12393
  });
@@ -12452,18 +12482,18 @@ ${U}
12452
12482
  const a = e.getAttribute(`${c.prefix}each-key`), o = t.getListKey();
12453
12483
  if (a && o !== null) {
12454
12484
  const l = [];
12455
- r.forEach((m, y) => {
12456
- C.createListKey(
12485
+ r.forEach((m, b) => {
12486
+ M.createListKey(
12457
12487
  m,
12458
12488
  String(a),
12459
- y
12460
- ) === o && l.push(y);
12489
+ b
12490
+ ) === o && l.push(b);
12461
12491
  });
12462
- const u = n.slice(0, s).filter((m) => m.getListKey() === o).length, h = l[u] ?? -1;
12463
- return h === -1 ? (g.warn(
12492
+ const u = n.slice(0, s).filter((m) => m.getListKey() === o).length, f = l[u] ?? -1;
12493
+ return f === -1 ? (g.warn(
12464
12494
  "Haori",
12465
12495
  `No array element corresponds to the target row (key "${o}"); the write was skipped (${i}).`
12466
- ), null) : h;
12496
+ ), null) : f;
12467
12497
  }
12468
12498
  return s >= r.length ? (g.warn(
12469
12499
  "Haori",
@@ -12548,40 +12578,40 @@ ${U}
12548
12578
  const i = p.resolveEachArray(r);
12549
12579
  if (!i)
12550
12580
  return Promise.reject(new Error("Row array not resolved."));
12551
- const n = this.options.targetFragment, s = n ? n.closestByAttribute(`${c.prefix}row`) : null, a = p.getRowFragments(r), o = s ? a.indexOf(s) : a.length - 1, l = (y) => y < 0 || y >= a.length ? null : i.mapped ? p.resolveRowIndex(
12581
+ const n = this.options.targetFragment, s = n ? n.closestByAttribute(`${c.prefix}row`) : null, a = p.getRowFragments(r), o = s ? a.indexOf(s) : a.length - 1, l = (b) => b < 0 || b >= a.length ? null : i.mapped ? p.resolveRowIndex(
12552
12582
  r,
12553
- a[y],
12583
+ a[b],
12554
12584
  i.array,
12555
12585
  p.attrName(this.eventType, e)
12556
- ) : y, u = o >= 0 ? l(o) : i.mapped ? i.array.length - 1 : o;
12586
+ ) : b, u = o >= 0 ? l(o) : i.mapped ? i.array.length - 1 : o;
12557
12587
  if (u === null)
12558
12588
  return Promise.resolve();
12559
- const h = i.array.slice();
12589
+ const f = i.array.slice();
12560
12590
  if (!t(
12561
- h,
12591
+ f,
12562
12592
  u,
12563
12593
  () => l(o - 1),
12564
12594
  () => l(o + 1)
12565
12595
  ))
12566
12596
  return Promise.resolve();
12567
12597
  const m = /* @__PURE__ */ new Map();
12568
- return a.forEach((y) => {
12569
- const E = y.getListKey();
12570
- E !== null && !m.has(String(E)) && m.set(String(E), y);
12571
- }), h.forEach((y, E) => {
12572
- if (p.isSameRowItem(i.array[E], y))
12598
+ return a.forEach((b) => {
12599
+ const E = b.getListKey();
12600
+ E !== null && !m.has(String(E)) && m.set(String(E), b);
12601
+ }), f.forEach((b, E) => {
12602
+ if (p.isSameRowItem(i.array[E], b))
12573
12603
  return;
12574
12604
  const A = m.get(
12575
- C.createListKey(
12576
- y,
12605
+ M.createListKey(
12606
+ b,
12577
12607
  null,
12578
12608
  E
12579
12609
  )
12580
12610
  );
12581
- A && C.clearUserEditMarks(A);
12582
- }), C.setBindingData(
12611
+ A && M.clearUserEditMarks(A);
12612
+ }), M.setBindingData(
12583
12613
  i.owner.getTarget(),
12584
- p.withPathValue(i.ownerData, i.path, h),
12614
+ p.withPathValue(i.ownerData, i.path, f),
12585
12615
  {
12586
12616
  // 対象は配列の 1 要素だけなので、所有者の部分木を丸ごと供給の宛先にはしない
12587
12617
  // (行の書き戻し `applyRowWrites()` と同じ扱い)。
@@ -12624,7 +12654,7 @@ ${U}
12624
12654
  ...a.getRawBindingData() ?? {},
12625
12655
  _fetch: s
12626
12656
  };
12627
- return C.setBindingData(o, l, {
12657
+ return M.setBindingData(o, l, {
12628
12658
  reflectToAttribute: !1,
12629
12659
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
12630
12660
  // 解除しない)。
@@ -12728,7 +12758,7 @@ const d = class d {
12728
12758
  */
12729
12759
  static isAliasedAttributeReflection(e, t) {
12730
12760
  const r = N.get(e);
12731
- return r instanceof S ? r.hasAttribute(
12761
+ return r instanceof R ? r.hasAttribute(
12732
12762
  `${c.prefix}${d.ATTRIBUTE_ALIAS_SUFFIX}${t}`
12733
12763
  ) : !1;
12734
12764
  }
@@ -12759,7 +12789,7 @@ const d = class d {
12759
12789
  static reevaluateChildren(e) {
12760
12790
  const t = [];
12761
12791
  return e.getChildren().forEach((r) => {
12762
- r instanceof S ? t.push(d.evaluateAll(r)) : r instanceof ne && t.push(d.evaluateText(r));
12792
+ r instanceof R ? t.push(d.evaluateAll(r)) : r instanceof ne && t.push(d.evaluateText(r));
12763
12793
  }), Promise.all(t).then(() => {
12764
12794
  });
12765
12795
  }
@@ -12780,9 +12810,9 @@ const d = class d {
12780
12810
  * @param upTo この通し番号までの編集を解除対象とする(既定は現在の最新)
12781
12811
  * @return 戻り値はありません。
12782
12812
  */
12783
- static clearUserEditMarks(e, t = S.currentSequence()) {
12813
+ static clearUserEditMarks(e, t = R.currentSequence()) {
12784
12814
  e.clearUserEditMark(t), e.getChildren().forEach((r) => {
12785
- r instanceof S && d.clearUserEditMarks(r, t);
12815
+ r instanceof R && d.clearUserEditMarks(r, t);
12786
12816
  });
12787
12817
  }
12788
12818
  /**
@@ -12831,7 +12861,7 @@ const d = class d {
12831
12861
  return Promise.resolve();
12832
12862
  const r = [];
12833
12863
  return e.hasAttribute(`${c.prefix}validity`) && F.applyCustomValidity(e), e.hasAttribute(`${c.prefix}fetch`) && r.push(d.executeManagedFetch(e)), e.hasAttribute(`${c.prefix}import`) && r.push(d.executeManagedImport(e)), e.isVisible() ? (e.getChildren().forEach((i) => {
12834
- i instanceof S && r.push(
12864
+ i instanceof R && r.push(
12835
12865
  d.reevaluateReactiveSpecialAttributes(i, t)
12836
12866
  );
12837
12867
  }), Promise.all(r).then(() => {
@@ -12891,7 +12921,7 @@ const d = class d {
12891
12921
  t.removeAttribute(`${c.prefix}importing`), B.importEnd(t, n, o, s), d.adoptImportedChildren(e);
12892
12922
  const l = [];
12893
12923
  return e.getChildren().forEach((u) => {
12894
- u instanceof S ? l.push(d.scan(u.getTarget())) : u instanceof ne && l.push(d.evaluateText(u));
12924
+ u instanceof R ? l.push(d.scan(u.getTarget())) : u instanceof ne && l.push(d.evaluateText(u));
12895
12925
  }), Promise.all(l).then(() => {
12896
12926
  });
12897
12927
  });
@@ -12970,7 +13000,7 @@ const d = class d {
12970
13000
  */
12971
13001
  static applyEnhancersOnShow(e, t) {
12972
13002
  const r = e.getTarget();
12973
- return S.retryUnappliedValueWrites(r, t).then(
13003
+ return R.retryUnappliedValueWrites(r, t).then(
12974
13004
  () => {
12975
13005
  re.applySubtree(r);
12976
13006
  }
@@ -13004,7 +13034,7 @@ const d = class d {
13004
13034
  }
13005
13035
  const r = t && e.hasAttribute(`${c.prefix}each`), i = [];
13006
13036
  return e.getChildren().forEach((n) => {
13007
- n instanceof S ? (!r || d.isEachFixedChild(n)) && i.push(
13037
+ n instanceof R ? (!r || d.isEachFixedChild(n)) && i.push(
13008
13038
  d.initializeElementFragment(n, t)
13009
13039
  ) : n instanceof ne && i.push(d.evaluateText(n));
13010
13040
  }), Promise.all(i).then(() => {
@@ -13101,22 +13131,22 @@ const d = class d {
13101
13131
  i
13102
13132
  );
13103
13133
  const o = [];
13104
- let l = null, u = null, h = null;
13134
+ let l = null, u = null, f = null;
13105
13135
  switch (t) {
13106
13136
  case `${c.prefix}bind`: {
13107
- if (r !== null && i && s instanceof S && s.consumeSelfWrittenBind(r))
13137
+ if (r !== null && i && s instanceof R && s.consumeSelfWrittenBind(r))
13108
13138
  break;
13109
13139
  const m = r === null ? {} : d.parseDataBind(r);
13110
13140
  if (i) {
13111
- const y = n ?? S.nextSequence();
13141
+ const b = n ?? R.nextSequence();
13112
13142
  return r === null ? (o.push(
13113
13143
  d.setBindingData(e, m, {
13114
13144
  reflectToAttribute: !1,
13115
- sequence: y
13145
+ sequence: b
13116
13146
  })
13117
13147
  ), o.push(s.removeAttribute(t))) : o.push(
13118
13148
  d.setBindingData(e, m, {
13119
- sequence: y
13149
+ sequence: b
13120
13150
  })
13121
13151
  ), Promise.all(o).then(() => {
13122
13152
  });
@@ -13149,16 +13179,16 @@ const d = class d {
13149
13179
  }));
13150
13180
  break;
13151
13181
  case `${c.prefix}if`:
13152
- h = () => d.evaluateIfOnAttributeWrite(s);
13182
+ f = () => d.evaluateIfOnAttributeWrite(s);
13153
13183
  break;
13154
13184
  case `${c.prefix}each`:
13155
- h = () => d.evaluateEach(s);
13185
+ f = () => d.evaluateEach(s);
13156
13186
  break;
13157
13187
  case `${c.prefix}fetch`:
13158
- h = () => d.executeManagedFetch(s);
13188
+ f = () => d.executeManagedFetch(s);
13159
13189
  break;
13160
13190
  case `${c.prefix}import`:
13161
- typeof r == "string" && (h = () => d.executeManagedImport(s));
13191
+ typeof r == "string" && (f = () => d.executeManagedImport(s));
13162
13192
  break;
13163
13193
  case `${c.prefix}store`:
13164
13194
  r !== null && o.push(Ne.restore(s));
@@ -13168,7 +13198,7 @@ const d = class d {
13168
13198
  return r !== null && F.applyCustomValidity(s), Promise.all(o).then(() => {
13169
13199
  });
13170
13200
  case `${c.prefix}url-param`: {
13171
- const m = s.getAttribute(`${c.prefix}url-arg`), y = De.readParams();
13201
+ const m = s.getAttribute(`${c.prefix}url-arg`), b = De.readParams();
13172
13202
  m === null && s.hasAttribute(`${c.prefix}store`) && g.warn(
13173
13203
  "Haori",
13174
13204
  `${c.prefix}url-param を ${c.prefix}url-arg なしで ${c.prefix}store と併用すると復元した値が消えます(${c.prefix}url-arg を指定してください)。`
@@ -13176,19 +13206,19 @@ const d = class d {
13176
13206
  const E = {
13177
13207
  reentrant: !0,
13178
13208
  kind: "nonSupply",
13179
- sequence: S.nextSequence()
13209
+ sequence: R.nextSequence()
13180
13210
  };
13181
13211
  if (m === null)
13182
- o.push(d.setBindingData(e, y, E));
13212
+ o.push(d.setBindingData(e, b, E));
13183
13213
  else {
13184
13214
  const A = s.getRawBindingData() || {};
13185
- A[String(m)] = y, o.push(d.setBindingData(e, A, E));
13215
+ A[String(m)] = b, o.push(d.setBindingData(e, A, E));
13186
13216
  }
13187
13217
  break;
13188
13218
  }
13189
13219
  }
13190
13220
  return r === null ? o.push(s.removeAttribute(t)) : o.push(s.setAttribute(t, r, i)), Promise.all(o).then(
13191
- () => h === null ? void 0 : h()
13221
+ () => f === null ? void 0 : f()
13192
13222
  ).then(() => {
13193
13223
  if (l !== null)
13194
13224
  return s.setDeriveInputSignature(u), l.then((m) => {
@@ -13225,24 +13255,24 @@ const d = class d {
13225
13255
  * @returns Promise (DOM操作が完了したときに解決される)
13226
13256
  */
13227
13257
  static setBindingData(e, t, r = {}) {
13228
- const i = N.get(e), n = r.skipFragments ?? /* @__PURE__ */ new Set(), s = r.reentrant ?? !1, a = r.reflectToAttribute ?? !0, o = r.kind ?? "supply", l = r.sequence ?? S.nextOperationSequence(), u = {
13258
+ const i = N.get(e), n = r.skipFragments ?? /* @__PURE__ */ new Set(), s = r.reentrant ?? !1, a = r.reflectToAttribute ?? !0, o = r.kind ?? "supply", l = r.sequence ?? R.nextOperationSequence(), u = {
13229
13259
  sequence: l,
13230
13260
  kind: o,
13231
13261
  ...r.editedPaths === void 0 ? {} : { editedPaths: r.editedPaths }
13232
- }, h = o === "supply";
13233
- h && i.markSupplyApplied(l);
13234
- const m = S.currentSequence(), y = i.getRawBindingData();
13235
- h && (r.clearUserEdits ?? !0) && d.clearUserEditMarks(i, l);
13236
- const E = a ? d.resolveByPathAuthority(i, y, t, u) : t;
13237
- i.setBindingData(E), a && (B.bindChange(e, y, E, "manual"), Ne.mirror(i));
13262
+ }, f = o === "supply";
13263
+ f && i.markSupplyApplied(l);
13264
+ const m = R.currentSequence(), b = i.getRawBindingData();
13265
+ f && (r.clearUserEdits ?? !0) && d.clearUserEditMarks(i, l);
13266
+ const E = a ? d.resolveByPathAuthority(i, b, t, u) : t;
13267
+ i.setBindingData(E), a && (B.bindChange(e, b, E, "manual"), Ne.mirror(i));
13238
13268
  const A = () => {
13239
13269
  i.markBindingWorkStart();
13240
- const T = i.getRawBindingData() ?? E;
13241
- let M = a ? i.setAttribute(
13270
+ const w = i.getRawBindingData() ?? E;
13271
+ let C = a ? i.setAttribute(
13242
13272
  `${c.prefix}bind`,
13243
- JSON.stringify(d.withoutReservedBindingKeys(T))
13273
+ JSON.stringify(d.withoutReservedBindingKeys(w))
13244
13274
  ) : Promise.resolve();
13245
- return e.tagName === "FORM" && (M = M.then(() => {
13275
+ return e.tagName === "FORM" && (C = C.then(() => {
13246
13276
  if (i.wasResetAfter(m))
13247
13277
  return;
13248
13278
  const P = i.getRawBindingData() ?? E;
@@ -13252,13 +13282,13 @@ const d = class d {
13252
13282
  !1,
13253
13283
  u
13254
13284
  );
13255
- })), M = M.then(
13256
- () => F.syncAncestorArgForms(i, m, u, y)
13257
- ), M = M.then(() => d.evaluateAll(i, n)), M = M.then(
13258
- () => S.retryUnappliedValueWrites(e, m)
13259
- ), M = M.then(
13285
+ })), C = C.then(
13286
+ () => F.syncAncestorArgForms(i, m, u, b)
13287
+ ), C = C.then(() => d.evaluateAll(i, n)), C = C.then(
13288
+ () => R.retryUnappliedValueWrites(e, m)
13289
+ ), C = C.then(
13260
13290
  () => d.reevaluateReactiveSpecialAttributes(i, n)
13261
- ), M.then(
13291
+ ), C.then(
13262
13292
  () => i.markBindingWorkEnd(),
13263
13293
  (P) => {
13264
13294
  throw i.markBindingWorkEnd(), P;
@@ -13282,7 +13312,7 @@ const d = class d {
13282
13312
  static withoutReservedBindingKeys(e) {
13283
13313
  const t = {};
13284
13314
  for (const r of Object.keys(e))
13285
- S.isReservedBindingKey(r) || (t[r] = e[r]);
13315
+ R.isReservedBindingKey(r) || (t[r] = e[r]);
13286
13316
  return t;
13287
13317
  }
13288
13318
  /**
@@ -13325,26 +13355,26 @@ const d = class d {
13325
13355
  */
13326
13356
  static mergePathAuthority(e, t, r, i, n, s) {
13327
13357
  if (d.isPlainRecord(t) && d.isPlainRecord(r)) {
13328
- const h = t, m = r, y = {};
13329
- let E = Object.keys(h).some(
13330
- (T) => !Object.prototype.hasOwnProperty.call(m, T)
13358
+ const f = t, m = r, b = {};
13359
+ let E = Object.keys(f).some(
13360
+ (w) => !Object.prototype.hasOwnProperty.call(m, w)
13331
13361
  );
13332
13362
  const A = /* @__PURE__ */ new Set([
13333
- ...Object.keys(h),
13363
+ ...Object.keys(f),
13334
13364
  ...Object.keys(m)
13335
13365
  ]);
13336
- for (const T of A) {
13337
- const M = n === "" ? T : `${n}.${T}`, P = d.mergePathAuthority(
13366
+ for (const w of A) {
13367
+ const C = n === "" ? w : `${n}.${w}`, P = d.mergePathAuthority(
13338
13368
  e,
13339
- Object.prototype.hasOwnProperty.call(h, T) ? h[T] : d.ABSENT_PATH,
13340
- Object.prototype.hasOwnProperty.call(m, T) ? m[T] : d.ABSENT_PATH,
13369
+ Object.prototype.hasOwnProperty.call(f, w) ? f[w] : d.ABSENT_PATH,
13370
+ Object.prototype.hasOwnProperty.call(m, w) ? m[w] : d.ABSENT_PATH,
13341
13371
  i,
13342
- M,
13372
+ C,
13343
13373
  s
13344
13374
  );
13345
- P !== d.ABSENT_PATH && (y[T] = P), P !== (Object.prototype.hasOwnProperty.call(m, T) ? m[T] : d.ABSENT_PATH) && (E = !0);
13375
+ P !== d.ABSENT_PATH && (b[w] = P), P !== (Object.prototype.hasOwnProperty.call(m, w) ? m[w] : d.ABSENT_PATH) && (E = !0);
13346
13376
  }
13347
- return E ? y : m;
13377
+ return E ? b : m;
13348
13378
  }
13349
13379
  const a = d.resolveArrayPairing(
13350
13380
  e,
@@ -13354,17 +13384,17 @@ const d = class d {
13354
13384
  s
13355
13385
  );
13356
13386
  if (a !== null) {
13357
- const h = t, m = r, y = m.map(
13387
+ const f = t, m = r, b = m.map(
13358
13388
  (E, A) => d.mergePathAuthority(
13359
13389
  e,
13360
- h[A],
13390
+ f[A],
13361
13391
  E,
13362
13392
  i,
13363
13393
  `${n}[${a[A]}]`,
13364
13394
  s
13365
13395
  )
13366
13396
  );
13367
- return y.some((E, A) => E !== m[A]) ? y : m;
13397
+ return b.some((E, A) => E !== m[A]) ? b : m;
13368
13398
  }
13369
13399
  if (d.isSameBindingValue(t, r))
13370
13400
  return r;
@@ -13541,7 +13571,7 @@ const d = class d {
13541
13571
  */
13542
13572
  static getBindingData(e, t = {}) {
13543
13573
  const r = N.get(e);
13544
- return r instanceof S ? t.resolved ? r.getBindingData() : r.getRawBindingData() : null;
13574
+ return r instanceof R ? t.resolved ? r.getBindingData() : r.getRawBindingData() : null;
13545
13575
  }
13546
13576
  /**
13547
13577
  * 指定要素の式評価で見えるバインディングスコープをダンプします(デバッグ用)。
@@ -13577,15 +13607,15 @@ const d = class d {
13577
13607
  if (!t)
13578
13608
  return { resolved: {}, sources: {} };
13579
13609
  const r = t.getBindingData(), i = {}, n = (l) => {
13580
- const u = l.getTarget(), h = d.resolveElementId(u);
13581
- return h !== "" ? `#${h}` : u.tagName.toLowerCase();
13582
- }, s = (l, u, h, m) => {
13610
+ const u = l.getTarget(), f = d.resolveElementId(u);
13611
+ return f !== "" ? `#${f}` : u.tagName.toLowerCase();
13612
+ }, s = (l, u, f, m) => {
13583
13613
  if (l)
13584
- for (const y of Object.keys(l))
13585
- y in i || (i[y] = {
13586
- value: l[y],
13614
+ for (const b of Object.keys(l))
13615
+ b in i || (i[b] = {
13616
+ value: l[b],
13587
13617
  source: n(u),
13588
- kind: h,
13618
+ kind: f,
13589
13619
  depth: m
13590
13620
  });
13591
13621
  };
@@ -13629,7 +13659,7 @@ const d = class d {
13629
13659
  if (n) {
13630
13660
  if (n.getParent() === r)
13631
13661
  return Promise.resolve();
13632
- if (r.attachObserved(n, i), n instanceof S)
13662
+ if (r.attachObserved(n, i), n instanceof R)
13633
13663
  return d.scan(n.getTarget());
13634
13664
  if (n instanceof ne)
13635
13665
  return d.evaluateText(n);
@@ -13647,7 +13677,7 @@ const d = class d {
13647
13677
  const r = t.getParent();
13648
13678
  if (r && r.isSkipMutationNode(e))
13649
13679
  return;
13650
- if (t instanceof S) {
13680
+ if (t instanceof R) {
13651
13681
  t.detachObserved();
13652
13682
  return;
13653
13683
  }
@@ -13684,9 +13714,9 @@ const d = class d {
13684
13714
  let l;
13685
13715
  if (a) {
13686
13716
  l = { ...o ?? {} };
13687
- const u = String(a), h = F.resolveAncestorArgOwner(n, u);
13717
+ const u = String(a), f = F.resolveAncestorArgOwner(n, u);
13688
13718
  l[u] = F.mergeCollectedValues(
13689
- (h ? h.value : l[u]) ?? null,
13719
+ (f ? f.value : l[u]) ?? null,
13690
13720
  s
13691
13721
  );
13692
13722
  } else
@@ -13700,7 +13730,7 @@ const d = class d {
13700
13730
  // 持たず、ユーザー編集の印も解除しない)。
13701
13731
  d.setBindingData(n.getTarget(), l, {
13702
13732
  kind: "nonSupply",
13703
- sequence: S.nextSequence()
13733
+ sequence: R.nextSequence()
13704
13734
  })
13705
13735
  );
13706
13736
  }
@@ -13731,7 +13761,7 @@ const d = class d {
13731
13761
  return Promise.resolve();
13732
13762
  let r = d.reevaluateInterpolatedAttributes(e);
13733
13763
  const i = e.hasAttribute(`${c.prefix}derive`), n = e.hasAttribute(`${c.prefix}if`), s = e.hasAttribute(`${c.prefix}each`), a = e.getRawAttribute(`${c.prefix}derive`), o = e.getRawAttribute(`${c.prefix}derive-name`);
13734
- let l = !1, u = !1, h = null;
13764
+ let l = !1, u = !1, f = null;
13735
13765
  if (!i && e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), !i && e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), i) {
13736
13766
  const E = d.createDeriveInputSignature(
13737
13767
  e,
@@ -13751,25 +13781,25 @@ const d = class d {
13751
13781
  e.setDeriveInputSignature(E);
13752
13782
  })));
13753
13783
  }
13754
- let m = !1, y = 0;
13784
+ let m = !1, b = 0;
13755
13785
  return n && (r = r.then(() => {
13756
13786
  const E = e.isVisible();
13757
- return y = S.currentSequence(), d.evaluateIf(e, t).then(() => {
13787
+ return b = R.currentSequence(), d.evaluateIf(e, t).then(() => {
13758
13788
  m = !E && e.isVisible();
13759
13789
  });
13760
13790
  })), s ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => d.evaluateEachFixedChildren(e)).then(() => d.evaluateEach(e)).then(() => {
13761
13791
  if (m)
13762
- return d.applyEnhancersOnShow(e, y);
13792
+ return d.applyEnhancersOnShow(e, b);
13763
13793
  })) : n ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => {
13764
13794
  })) : (i && (r = r.then(() => {
13765
13795
  if (!d.canSkipStableDerivedSubtree(e)) {
13766
13796
  e.setDeriveSubtreeSignature(null), d.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
13767
13797
  return;
13768
13798
  }
13769
- h = d.createDescendantBindingSignature(
13799
+ f = d.createDescendantBindingSignature(
13770
13800
  e,
13771
13801
  "evaluateAll"
13772
- ), u = !0, l = e.getDeriveSubtreeSignature() !== null && e.getDeriveSubtreeSignature() === h, d.logDerivedSubtreeProfileSnapshot(
13802
+ ), u = !0, l = e.getDeriveSubtreeSignature() !== null && e.getDeriveSubtreeSignature() === f, d.logDerivedSubtreeProfileSnapshot(
13773
13803
  e,
13774
13804
  l ? "skip-hit" : "skip-miss"
13775
13805
  );
@@ -13778,7 +13808,7 @@ const d = class d {
13778
13808
  return;
13779
13809
  const E = [];
13780
13810
  return e.getChildren().forEach((A) => {
13781
- if (A instanceof S) {
13811
+ if (A instanceof R) {
13782
13812
  if (d.canSkipUnchangedNestedEach(A))
13783
13813
  return;
13784
13814
  E.push(d.evaluateAll(A, t));
@@ -13786,7 +13816,7 @@ const d = class d {
13786
13816
  }), Promise.all(E).then(() => {
13787
13817
  });
13788
13818
  }).then(() => {
13789
- u && h !== null && e.setDeriveSubtreeSignature(h);
13819
+ u && f !== null && e.setDeriveSubtreeSignature(f);
13790
13820
  }));
13791
13821
  }
13792
13822
  /**
@@ -13906,7 +13936,7 @@ const d = class d {
13906
13936
  */
13907
13937
  static hasEachFixedChildren(e) {
13908
13938
  return e.getChildren().some(
13909
- (t) => t instanceof S && d.isEachFixedChild(t)
13939
+ (t) => t instanceof R && d.isEachFixedChild(t)
13910
13940
  );
13911
13941
  }
13912
13942
  /**
@@ -13928,7 +13958,7 @@ const d = class d {
13928
13958
  static evaluateEachFixedChildren(e) {
13929
13959
  const t = [];
13930
13960
  return e.getChildren().forEach((r) => {
13931
- r instanceof S ? d.isEachFixedChild(r) && t.push(d.evaluateAll(r)) : r instanceof ne && t.push(d.evaluateText(r));
13961
+ r instanceof R ? d.isEachFixedChild(r) && t.push(d.evaluateAll(r)) : r instanceof ne && t.push(d.evaluateText(r));
13932
13962
  }), Promise.all(t).then(() => {
13933
13963
  });
13934
13964
  }
@@ -13947,7 +13977,7 @@ const d = class d {
13947
13977
  static evaluateIfOnAttributeWrite(e) {
13948
13978
  if (!e.hasAttribute(`${c.prefix}each`))
13949
13979
  return d.evaluateIf(e);
13950
- const t = e.isVisible(), r = S.currentSequence();
13980
+ const t = e.isVisible(), r = R.currentSequence();
13951
13981
  return d.evaluateIf(e).then(() => {
13952
13982
  if (!t)
13953
13983
  return d.evaluateEach(e).then(() => d.reevaluateReactiveSpecialAttributes(e)).then(() => d.applyEnhancersOnShow(e, r));
@@ -13973,9 +14003,9 @@ const d = class d {
13973
14003
  );
13974
14004
  else {
13975
14005
  e.restoreFormControlsDisabledByIf();
13976
- const n = e.isVisible(), s = S.currentSequence(), a = [], o = e.hasAttribute(`${c.prefix}each`);
14006
+ const n = e.isVisible(), s = R.currentSequence(), a = [], o = e.hasAttribute(`${c.prefix}each`);
13977
14007
  e.getChildren().forEach((l) => {
13978
- if (l instanceof S) {
14008
+ if (l instanceof R) {
13979
14009
  if (o && !d.isEachFixedChild(l))
13980
14010
  return;
13981
14011
  l.isMounted() ? n ? a.push(d.evaluateAll(l, t)) : a.push(
@@ -14211,7 +14241,7 @@ ${r}
14211
14241
  if (r === null) {
14212
14242
  let s = !1;
14213
14243
  if (e.getChildren().forEach((a) => {
14214
- if (!s && a instanceof S) {
14244
+ if (!s && a instanceof R) {
14215
14245
  if (a.hasAttribute(`${c.prefix}each-before`) || a.hasAttribute(`${c.prefix}each-after`))
14216
14246
  return;
14217
14247
  r = a.clone(), d.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0, e.removeChild(a);
@@ -14224,11 +14254,11 @@ ${r}
14224
14254
  (l) => !l.hasAttribute(`${c.prefix}each-before`) && !l.hasAttribute(`${c.prefix}each-after`)
14225
14255
  ).forEach((l) => {
14226
14256
  if (!s) {
14227
- const h = N.get(l);
14228
- h instanceof S && (r = h.clone(), d.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
14257
+ const f = N.get(l);
14258
+ f instanceof R && (r = f.clone(), d.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
14229
14259
  }
14230
14260
  const u = N.get(l);
14231
- u instanceof S && e.getChildren().includes(u) && (e.removeChild(u), u.setMounted(!1)), l.parentNode && l.parentNode.removeChild(l);
14261
+ u instanceof R && e.getChildren().includes(u) && (e.removeChild(u), u.setMounted(!1)), l.parentNode && l.parentNode.removeChild(l);
14232
14262
  });
14233
14263
  }
14234
14264
  return this.updateDiff(e, t).then(() => {
@@ -14288,7 +14318,7 @@ ${r}
14288
14318
  a instanceof ne ? d.areExpressionsRowLocal(
14289
14319
  d.extractInterpolations(a.getRawText()),
14290
14320
  i
14291
- ) && r.add(a) : a instanceof S && (d.isRowLocalSubtree(a, i) ? r.add(a) : n(a));
14321
+ ) && r.add(a) : a instanceof R && (d.isRowLocalSubtree(a, i) ? r.add(a) : n(a));
14292
14322
  };
14293
14323
  return n(t), r;
14294
14324
  }
@@ -14424,7 +14454,7 @@ ${r}
14424
14454
  typeof s == "string" && s !== "" && n.add(s), r = n;
14425
14455
  }
14426
14456
  for (const i of e.getChildren())
14427
- if (i instanceof S) {
14457
+ if (i instanceof R) {
14428
14458
  if (!d.isRowLocalSubtree(i, r))
14429
14459
  return !1;
14430
14460
  } else if (i instanceof ne) {
@@ -14487,7 +14517,7 @@ ${r}
14487
14517
  * @returns 含むなら true
14488
14518
  */
14489
14519
  static hasDisallowedDerivedSubtreeDescendant(e) {
14490
- return e.getChildren().some((t) => t instanceof S ? t.hasAttribute(`${c.prefix}derive`) || t.hasAttribute(`${c.prefix}derive-name`) || t.hasAttribute(`${c.prefix}fetch`) || t.hasAttribute(`${c.prefix}import`) ? !0 : d.hasDisallowedDerivedSubtreeDescendant(t) : !1);
14520
+ return e.getChildren().some((t) => t instanceof R ? t.hasAttribute(`${c.prefix}derive`) || t.hasAttribute(`${c.prefix}derive-name`) || t.hasAttribute(`${c.prefix}fetch`) || t.hasAttribute(`${c.prefix}import`) ? !0 : d.hasDisallowedDerivedSubtreeDescendant(t) : !1);
14491
14521
  }
14492
14522
  /**
14493
14523
  * data-derive host が子孫要素へ公開している binding の署名を返します。
@@ -14528,7 +14558,7 @@ ${r}
14528
14558
  document.querySelectorAll(`[${e}]`)
14529
14559
  ).map((i) => {
14530
14560
  const n = N.peek(i);
14531
- return n instanceof S ? d.setAttribute(
14561
+ return n instanceof R ? d.setAttribute(
14532
14562
  i,
14533
14563
  e,
14534
14564
  n.getRawAttribute(e) ?? ""
@@ -14557,7 +14587,7 @@ ${r}
14557
14587
  r.setDeriveSubtreeSignature(null);
14558
14588
  const t = (r) => {
14559
14589
  r.setDeriveSubtreeSignature(null), r.getChildren().forEach((i) => {
14560
- i instanceof S && t(i);
14590
+ i instanceof R && t(i);
14561
14591
  });
14562
14592
  };
14563
14593
  t(e);
@@ -14637,7 +14667,7 @@ ${r}
14637
14667
  typeof a == "string" && a.trim() !== "" && (n += `[${c.prefix}derive-name="${a.trim()}"]`);
14638
14668
  const o = r.getParent();
14639
14669
  if (o) {
14640
- const l = o.getChildren().filter((u) => u instanceof S).findIndex((u) => u === r);
14670
+ const l = o.getChildren().filter((u) => u instanceof R).findIndex((u) => u === r);
14641
14671
  n += `:nth-child(${l + 1})`;
14642
14672
  }
14643
14673
  t.unshift(n), r = o;
@@ -14710,7 +14740,7 @@ ${r}
14710
14740
  * @returns subtree 全体を省略可能なら true
14711
14741
  */
14712
14742
  static markFreshInitializationSkippable(e) {
14713
- const t = e.getAttributeNames().some((n) => d.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof S ? !d.markFreshInitializationSkippable(n) : n instanceof ne ? n.hasDynamicContent() : !1), i = !t && !r;
14743
+ const t = e.getAttributeNames().some((n) => d.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof R ? !d.markFreshInitializationSkippable(n) : n instanceof ne ? n.hasDynamicContent() : !1), i = !t && !r;
14714
14744
  return e.setFreshInitializationSkippable(i), i;
14715
14745
  }
14716
14746
  /**
@@ -14749,28 +14779,28 @@ ${r}
14749
14779
  l.set(x, (l.get(x) ?? 0) + 1);
14750
14780
  }), n && o.size !== a.length && d.warnDuplicateEachKey(String(n));
14751
14781
  const u = [];
14752
- let h = e.getChildren().filter((x) => x instanceof S).filter(
14782
+ let f = e.getChildren().filter((x) => x instanceof R).filter(
14753
14783
  (x) => !x.hasAttribute(`${c.prefix}each-before`) && !x.hasAttribute(`${c.prefix}each-after`)
14754
14784
  );
14755
- const m = h.map((x) => x.getListKey()), y = /* @__PURE__ */ new Set();
14756
- h = h.filter((x, Y) => {
14785
+ const m = f.map((x) => x.getListKey()), b = /* @__PURE__ */ new Set();
14786
+ f = f.filter((x, Y) => {
14757
14787
  const Q = String(x.getListKey()), X = l.get(Q) ?? 0;
14758
14788
  if (X === 0) {
14759
- y.add(x);
14789
+ b.add(x);
14760
14790
  const j = x.getListKey();
14761
14791
  return j !== null && B.rowRemove(x.getTarget(), j, Y), u.push(x.remove()), !1;
14762
14792
  }
14763
14793
  return l.set(Q, X - 1), !0;
14764
14794
  });
14765
- const E = h.map((x) => x.getListKey()), A = /* @__PURE__ */ new Map();
14766
- h.forEach((x) => {
14795
+ const E = f.map((x) => x.getListKey()), A = /* @__PURE__ */ new Map();
14796
+ f.forEach((x) => {
14767
14797
  const Y = x.getListKey();
14768
14798
  if (Y === null)
14769
14799
  return;
14770
14800
  const Q = A.get(Y);
14771
14801
  Q ? Q.push(x) : A.set(Y, [x]);
14772
14802
  });
14773
- const T = e.getChildElementFragments().filter((x) => !y.has(x)), M = T.filter(
14803
+ const w = e.getChildElementFragments().filter((x) => !b.has(x)), C = w.filter(
14774
14804
  (x) => x.hasAttribute(`${c.prefix}each-before`)
14775
14805
  ).length;
14776
14806
  let P = Promise.resolve();
@@ -14781,7 +14811,7 @@ ${r}
14781
14811
  const se = A.get(x)?.shift();
14782
14812
  if (se) {
14783
14813
  j = se;
14784
- const R = M + Y;
14814
+ const T = C + Y;
14785
14815
  P = P.then(
14786
14816
  () => d.updateRowFragment(
14787
14817
  j,
@@ -14798,13 +14828,13 @@ ${r}
14798
14828
  d.repositionEachRow(
14799
14829
  e,
14800
14830
  j,
14801
- T,
14802
- R
14831
+ w,
14832
+ T
14803
14833
  ).then((K) => {
14804
14834
  K !== null && B.rowMove(
14805
14835
  j.getTarget(),
14806
14836
  x,
14807
- K - M,
14837
+ K - C,
14808
14838
  Y
14809
14839
  ), !(!$ && d.isRowLocalEachTemplate(e)) && ee.push(
14810
14840
  d.evaluateAll(
@@ -14818,7 +14848,7 @@ ${r}
14818
14848
  );
14819
14849
  } else {
14820
14850
  j = r.clone();
14821
- const R = M + Y;
14851
+ const T = C + Y;
14822
14852
  P = P.then(
14823
14853
  () => d.updateRowFragment(
14824
14854
  j,
@@ -14828,9 +14858,9 @@ ${r}
14828
14858
  s ? String(s) : null,
14829
14859
  x
14830
14860
  ).then(() => {
14831
- const $ = T[R] ?? null;
14861
+ const $ = w[T] ?? null;
14832
14862
  return e.insertBefore(j, $).then(() => {
14833
- T.splice(R, 0, j);
14863
+ w.splice(T, 0, j);
14834
14864
  }).then(() => d.initializeFreshEachRow(j)).then(() => d.applyRowFormValues(e, j, Q)).then(() => {
14835
14865
  B.rowAdd(j.getTarget(), x, X, Q);
14836
14866
  });
@@ -14839,13 +14869,13 @@ ${r}
14839
14869
  }
14840
14870
  }), Promise.all(u).then(() => P).then(() => Promise.all(ee)).then(() => {
14841
14871
  const x = a.filter(
14842
- (R) => R !== null
14872
+ (T) => T !== null
14843
14873
  ), Y = E.filter(
14844
- (R) => R !== null
14845
- ), Q = new Set(Y), X = x.filter((R) => !Q.has(R)), se = m.filter(
14846
- (R) => R !== null
14874
+ (T) => T !== null
14875
+ ), Q = new Set(Y), X = x.filter((T) => !Q.has(T)), se = m.filter(
14876
+ (T) => T !== null
14847
14877
  ).filter(
14848
- (R) => !o.has(R)
14878
+ (T) => !o.has(T)
14849
14879
  );
14850
14880
  B.eachUpdate(
14851
14881
  e.getTarget(),
@@ -14880,7 +14910,7 @@ ${r}
14880
14910
  */
14881
14911
  static warnExtraEachChildren(e) {
14882
14912
  const t = e.getChildren().filter(
14883
- (r) => r instanceof S
14913
+ (r) => r instanceof R
14884
14914
  ).filter(
14885
14915
  (r) => !r.hasAttribute(`${c.prefix}each-before`) && !r.hasAttribute(`${c.prefix}each-after`)
14886
14916
  );
@@ -15142,7 +15172,7 @@ d.ATTRIBUTE_ALIAS_SUFFIX = "attr-", d.PRIORITY_ATTRIBUTE_SUFFIXES = [
15142
15172
  "enhance",
15143
15173
  "enhance-new"
15144
15174
  ]), d.ROW_LOCAL_ROW_OPERATIONS = /* @__PURE__ */ new Set(["row-add", "row-remove", "row-prev", "row-next"]), d.REACTIVE_FETCH_STATES = /* @__PURE__ */ new WeakMap(), d.REACTIVE_IMPORT_STATES = /* @__PURE__ */ new WeakMap(), d.DERIVE_SUBTREE_PROFILES = /* @__PURE__ */ new WeakMap(), d.EACH_UPDATE_STATES = /* @__PURE__ */ new WeakMap(), d.EACH_RENDERED_CHANGE_FIRED = /* @__PURE__ */ new WeakSet(), d.EACH_RENDERED_CHANGE_WARNED = /* @__PURE__ */ new WeakSet(), d.WARNED_DUPLICATE_EACH_KEYS = /* @__PURE__ */ new Set(), d.ABSENT_PATH = Symbol("absent");
15145
- let C = d;
15175
+ let M = d;
15146
15176
  const Se = class Se {
15147
15177
  /**
15148
15178
  * コンストラクタ。
@@ -15164,7 +15194,7 @@ const Se = class Se {
15164
15194
  }, this.onPopstate = (t) => {
15165
15195
  const r = t.state;
15166
15196
  if (!r || r[Se.HISTORY_STATE_KEY] !== !0) {
15167
- C.refreshUrlParams();
15197
+ M.refreshUrlParams();
15168
15198
  return;
15169
15199
  }
15170
15200
  location.reload();
@@ -15301,7 +15331,7 @@ const Se = class Se {
15301
15331
  if (i.getAttribute(this.onAttributeName) !== e)
15302
15332
  return;
15303
15333
  const n = N.get(i);
15304
- n instanceof S && this.isFromTarget(n, t) && new ae(n, "on", t).run().catch((s) => {
15334
+ n instanceof R && this.isFromTarget(n, t) && new ae(n, "on", t).run().catch((s) => {
15305
15335
  g.error("[Haori]", "Procedure execution error:", s);
15306
15336
  });
15307
15337
  });
@@ -15445,7 +15475,7 @@ const Se = class Se {
15445
15475
  */
15446
15476
  markUserEditOnly(e) {
15447
15477
  const t = N.get(e);
15448
- t instanceof S && t.markUserEdit();
15478
+ t instanceof R && t.markUserEdit();
15449
15479
  }
15450
15480
  /**
15451
15481
  * `change` / `input` の対象要素について、内部値の同期とユーザー編集の記録を行います。
@@ -15461,13 +15491,13 @@ const Se = class Se {
15461
15491
  */
15462
15492
  syncUserEdit(e, t) {
15463
15493
  const r = N.get(e);
15464
- if (r instanceof S && (r.syncValue(), t ? r.markUserEditOnChange() : r.markUserEdit(), e instanceof HTMLInputElement && e.type === "radio" && e.name)) {
15494
+ if (r instanceof R && (r.syncValue(), t ? r.markUserEditOnChange() : r.markUserEdit(), e instanceof HTMLInputElement && e.type === "radio" && e.name)) {
15465
15495
  const i = document.getElementsByName(e.name);
15466
15496
  for (const n of Array.from(i)) {
15467
15497
  if (n === e || !(n instanceof HTMLInputElement) || n.type !== "radio" || n.form !== e.form)
15468
15498
  continue;
15469
15499
  const s = N.get(n);
15470
- s instanceof S && (s.syncValue(), s.markUserEdit());
15500
+ s instanceof R && (s.syncValue(), s.markUserEdit());
15471
15501
  }
15472
15502
  }
15473
15503
  }
@@ -15575,8 +15605,8 @@ const V = class V {
15575
15605
  const o = new IntersectionObserver(
15576
15606
  (l) => {
15577
15607
  const u = V.registrations.get(e);
15578
- u && l.forEach((h) => {
15579
- if (u.intersecting = h.isIntersecting, !!h.isIntersecting) {
15608
+ u && l.forEach((f) => {
15609
+ if (u.intersecting = f.isIntersecting, !!f.isIntersecting) {
15580
15610
  if (u.running || V.isDisabled(u.fragment)) {
15581
15611
  u.pending = !0;
15582
15612
  return;
@@ -15719,7 +15749,7 @@ V.CONFIG_KEYS = /* @__PURE__ */ new Set([
15719
15749
  "once"
15720
15750
  ]), V.registrations = /* @__PURE__ */ new Map();
15721
15751
  let Ae = V;
15722
- const w = class w {
15752
+ const S = class S {
15723
15753
  /**
15724
15754
  * 指定ノードとその子孫を走査し、`data-poll-*` の監視状態を同期します。
15725
15755
  *
@@ -15727,8 +15757,8 @@ const w = class w {
15727
15757
  * @returns 戻り値はありません。
15728
15758
  */
15729
15759
  static syncTree(e) {
15730
- (e instanceof Element || e instanceof DocumentFragment) && (w.isHtmlElement(e) && w.syncElement(e), e.querySelectorAll("*").forEach((t) => {
15731
- w.syncElement(t);
15760
+ (e instanceof Element || e instanceof DocumentFragment) && (S.isHtmlElement(e) && S.syncElement(e), e.querySelectorAll("*").forEach((t) => {
15761
+ S.syncElement(t);
15732
15762
  }));
15733
15763
  }
15734
15764
  /**
@@ -15741,23 +15771,23 @@ const w = class w {
15741
15771
  * @returns 戻り値はありません。
15742
15772
  */
15743
15773
  static syncElement(e) {
15744
- const t = w.registrations.get(e);
15745
- if (!t && !w.hasPollAttribute(e))
15774
+ const t = S.registrations.get(e);
15775
+ if (!t && !S.hasPollAttribute(e))
15746
15776
  return;
15747
15777
  const r = N.get(e);
15748
- if (!(r instanceof S) || !w.shouldObserve(r)) {
15749
- t && w.teardown(e, t);
15778
+ if (!(r instanceof R) || !S.shouldObserve(r)) {
15779
+ t && S.teardown(e, t);
15750
15780
  return;
15751
15781
  }
15752
- const i = w.buildConfigKey(r);
15782
+ const i = S.buildConfigKey(r);
15753
15783
  if (t) {
15754
15784
  if (t.configKey === i) {
15755
15785
  t.fragment = r;
15756
15786
  return;
15757
15787
  }
15758
- w.teardown(e, t);
15788
+ S.teardown(e, t);
15759
15789
  }
15760
- w.startPolling(e, r, i);
15790
+ S.startPolling(e, r, i);
15761
15791
  }
15762
15792
  /**
15763
15793
  * 指定ノードとその子孫の監視を解除します。
@@ -15769,13 +15799,13 @@ const w = class w {
15769
15799
  * @returns 戻り値はありません。
15770
15800
  */
15771
15801
  static cleanupTree(e) {
15772
- if (w.isHtmlElement(e)) {
15773
- const t = w.registrations.get(e);
15774
- t && w.teardown(e, t);
15802
+ if (S.isHtmlElement(e)) {
15803
+ const t = S.registrations.get(e);
15804
+ t && S.teardown(e, t);
15775
15805
  }
15776
15806
  (e instanceof Element || e instanceof DocumentFragment) && e.querySelectorAll("*").forEach((t) => {
15777
- const r = w.registrations.get(t);
15778
- r && w.teardown(t, r);
15807
+ const r = S.registrations.get(t);
15808
+ r && S.teardown(t, r);
15779
15809
  });
15780
15810
  }
15781
15811
  /**
@@ -15784,12 +15814,12 @@ const w = class w {
15784
15814
  * @returns 戻り値はありません。
15785
15815
  */
15786
15816
  static disconnectAll() {
15787
- w.registrations.forEach((e) => {
15788
- w.clearTimers(e);
15789
- }), w.registrations.clear(), w.visibilityListener && typeof document < "u" && document.removeEventListener(
15817
+ S.registrations.forEach((e) => {
15818
+ S.clearTimers(e);
15819
+ }), S.registrations.clear(), S.visibilityListener && typeof document < "u" && document.removeEventListener(
15790
15820
  "visibilitychange",
15791
- w.visibilityListener
15792
- ), w.visibilityListener = null;
15821
+ S.visibilityListener
15822
+ ), S.visibilityListener = null;
15793
15823
  }
15794
15824
  /**
15795
15825
  * ノードが現在の Window に属する HTMLElement かどうかを判定します。
@@ -15831,7 +15861,7 @@ const w = class w {
15831
15861
  */
15832
15862
  static shouldObserve(e) {
15833
15863
  const t = `${c.prefix}poll-`;
15834
- return e.getAttributeNames().some((r) => r.startsWith(t) ? !w.CONFIG_KEYS.has(r.slice(t.length)) : !1);
15864
+ return e.getAttributeNames().some((r) => r.startsWith(t) ? !S.CONFIG_KEYS.has(r.slice(t.length)) : !1);
15835
15865
  }
15836
15866
  /**
15837
15867
  * 設定の同一性を判定するキーを組み立てます。
@@ -15863,9 +15893,9 @@ const w = class w {
15863
15893
  const i = {
15864
15894
  fragment: t,
15865
15895
  configKey: r,
15866
- intervalMs: w.resolveInterval(t),
15867
- timeoutMs: w.resolveTimeout(t),
15868
- errorLimit: w.resolveErrorLimit(t),
15896
+ intervalMs: S.resolveInterval(t),
15897
+ timeoutMs: S.resolveTimeout(t),
15898
+ errorLimit: S.resolveErrorLimit(t),
15869
15899
  startedAt: performance.now(),
15870
15900
  intervalTimerId: null,
15871
15901
  timeoutTimerId: null,
@@ -15877,9 +15907,9 @@ const w = class w {
15877
15907
  count: 0,
15878
15908
  consecutiveErrors: 0
15879
15909
  };
15880
- w.registrations.set(e, i), w.ensureVisibilityListener(), i.timeoutMs !== null && (i.timeoutTimerId = setTimeout(() => {
15881
- w.handleTimeout(e);
15882
- }, i.timeoutMs)), w.injectState(i), w.tick(e);
15910
+ S.registrations.set(e, i), S.ensureVisibilityListener(), i.timeoutMs !== null && (i.timeoutTimerId = setTimeout(() => {
15911
+ S.handleTimeout(e);
15912
+ }, i.timeoutMs)), S.injectState(i), S.tick(e);
15883
15913
  }
15884
15914
  /**
15885
15915
  * 1回分のポーリング処理を実行し、継続する場合は次回を予約します。
@@ -15888,20 +15918,20 @@ const w = class w {
15888
15918
  * @returns 処理完了の Promise
15889
15919
  */
15890
15920
  static async tick(e) {
15891
- const t = w.registrations.get(e);
15921
+ const t = S.registrations.get(e);
15892
15922
  if (!t || t.stopped || t.fetching)
15893
15923
  return;
15894
15924
  if (t.intervalTimerId = null, !e.isConnected) {
15895
- await w.stop(e, t, "detached");
15925
+ await S.stop(e, t, "detached");
15896
15926
  return;
15897
15927
  }
15898
- const r = w.isHidden(e) || w.isDisabled(t.fragment);
15899
- if (r !== t.paused && (t.paused = r, await w.injectState(t)), r) {
15900
- w.schedule(e, t);
15928
+ const r = S.isHidden(e) || S.isDisabled(t.fragment);
15929
+ if (r !== t.paused && (t.paused = r, await S.injectState(t)), r) {
15930
+ S.schedule(e, t);
15901
15931
  return;
15902
15932
  }
15903
- if (w.isUntilSatisfied(t.fragment)) {
15904
- await w.stop(e, t, "until");
15933
+ if (S.isUntilSatisfied(t.fragment)) {
15934
+ await S.stop(e, t, "until");
15905
15935
  return;
15906
15936
  }
15907
15937
  t.fetching = !0, t.count += 1;
@@ -15916,18 +15946,18 @@ const w = class w {
15916
15946
  } finally {
15917
15947
  t.fetching = !1;
15918
15948
  }
15919
- if (!(w.registrations.get(e) !== t || t.stopped)) {
15949
+ if (!(S.registrations.get(e) !== t || t.stopped)) {
15920
15950
  if (i)
15921
15951
  t.consecutiveErrors = 0;
15922
15952
  else if (t.consecutiveErrors += 1, t.errorLimit !== null && t.consecutiveErrors >= t.errorLimit) {
15923
- await w.stop(e, t, "error");
15953
+ await S.stop(e, t, "error");
15924
15954
  return;
15925
15955
  }
15926
- if (i && w.isUntilSatisfied(t.fragment)) {
15927
- await w.stop(e, t, "until");
15956
+ if (i && S.isUntilSatisfied(t.fragment)) {
15957
+ await S.stop(e, t, "until");
15928
15958
  return;
15929
15959
  }
15930
- w.schedule(e, t);
15960
+ S.schedule(e, t);
15931
15961
  }
15932
15962
  }
15933
15963
  /**
@@ -15942,7 +15972,7 @@ const w = class w {
15942
15972
  */
15943
15973
  static schedule(e, t) {
15944
15974
  t.stopped || t.intervalTimerId !== null || (t.intervalTimerId = setTimeout(() => {
15945
- w.tick(e);
15975
+ S.tick(e);
15946
15976
  }, t.intervalMs));
15947
15977
  }
15948
15978
  /**
@@ -15952,12 +15982,12 @@ const w = class w {
15952
15982
  * @returns 処理完了の Promise
15953
15983
  */
15954
15984
  static async handleTimeout(e) {
15955
- const t = w.registrations.get(e);
15985
+ const t = S.registrations.get(e);
15956
15986
  !t || t.stopped || (t.timeoutTimerId = null, t.timedOut = !0, e.isConnected && B.pollTimeout(
15957
15987
  e,
15958
15988
  t.count,
15959
- w.elapsed(t)
15960
- ), await w.stop(e, t, "timeout"));
15989
+ S.elapsed(t)
15990
+ ), await S.stop(e, t, "timeout"));
15961
15991
  }
15962
15992
  /**
15963
15993
  * ポーリングを恒久停止します。
@@ -15969,15 +15999,15 @@ const w = class w {
15969
15999
  */
15970
16000
  static async stop(e, t, r) {
15971
16001
  if (!t.stopped) {
15972
- if (t.stopped = !0, t.stopReason = r, t.paused = !1, w.clearTimers(t), r === "detached") {
15973
- w.registrations.delete(e);
16002
+ if (t.stopped = !0, t.stopReason = r, t.paused = !1, S.clearTimers(t), r === "detached") {
16003
+ S.registrations.delete(e);
15974
16004
  return;
15975
16005
  }
15976
- await w.injectState(t), e.isConnected && B.pollStop(
16006
+ await S.injectState(t), e.isConnected && B.pollStop(
15977
16007
  e,
15978
16008
  r,
15979
16009
  t.count,
15980
- w.elapsed(t)
16010
+ S.elapsed(t)
15981
16011
  );
15982
16012
  }
15983
16013
  }
@@ -15989,7 +16019,7 @@ const w = class w {
15989
16019
  * @returns 戻り値はありません。
15990
16020
  */
15991
16021
  static teardown(e, t) {
15992
- w.clearTimers(t), w.registrations.delete(e);
16022
+ S.clearTimers(t), S.registrations.delete(e);
15993
16023
  }
15994
16024
  /**
15995
16025
  * 登録情報が持つタイマーをすべて破棄します。
@@ -16018,16 +16048,16 @@ const w = class w {
16018
16048
  * @returns 戻り値はありません。
16019
16049
  */
16020
16050
  static ensureVisibilityListener() {
16021
- if (w.visibilityListener || typeof document > "u")
16051
+ if (S.visibilityListener || typeof document > "u")
16022
16052
  return;
16023
16053
  const e = () => {
16024
- document.visibilityState === "visible" && Array.from(w.registrations.entries()).forEach(
16054
+ document.visibilityState === "visible" && Array.from(S.registrations.entries()).forEach(
16025
16055
  ([t, r]) => {
16026
- r.stopped || r.fetching || (r.intervalTimerId !== null && (clearTimeout(r.intervalTimerId), r.intervalTimerId = null), w.tick(t));
16056
+ r.stopped || r.fetching || (r.intervalTimerId !== null && (clearTimeout(r.intervalTimerId), r.intervalTimerId = null), S.tick(t));
16027
16057
  }
16028
16058
  );
16029
16059
  };
16030
- w.visibilityListener = e, document.addEventListener("visibilitychange", e);
16060
+ S.visibilityListener = e, document.addEventListener("visibilitychange", e);
16031
16061
  }
16032
16062
  /**
16033
16063
  * `_poll` 状態を注入先のバインディングデータへ反映します。
@@ -16041,7 +16071,7 @@ const w = class w {
16041
16071
  * @returns 注入完了の Promise
16042
16072
  */
16043
16073
  static injectState(e) {
16044
- const t = w.resolveStateFragments(e);
16074
+ const t = S.resolveStateFragments(e);
16045
16075
  if (t.length === 0)
16046
16076
  return Promise.resolve();
16047
16077
  const r = {
@@ -16051,7 +16081,7 @@ const w = class w {
16051
16081
  timedOut: e.timedOut,
16052
16082
  stopReason: e.stopReason,
16053
16083
  count: e.count,
16054
- elapsedMs: w.elapsed(e)
16084
+ elapsedMs: S.elapsed(e)
16055
16085
  };
16056
16086
  return Promise.all(
16057
16087
  t.map((i) => {
@@ -16059,12 +16089,12 @@ const w = class w {
16059
16089
  ...i.getRawBindingData() ?? {},
16060
16090
  _poll: r
16061
16091
  };
16062
- return C.setBindingData(n, s, {
16092
+ return M.setBindingData(n, s, {
16063
16093
  reflectToAttribute: !1,
16064
16094
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
16065
16095
  // 解除しない)。
16066
16096
  kind: "nonSupply",
16067
- sequence: S.nextSequence()
16097
+ sequence: R.nextSequence()
16068
16098
  });
16069
16099
  })
16070
16100
  ).then(() => {
@@ -16098,7 +16128,7 @@ const w = class w {
16098
16128
  if (!a.isConnected)
16099
16129
  return;
16100
16130
  const o = N.get(a);
16101
- o instanceof S && s.push(o);
16131
+ o instanceof R && s.push(o);
16102
16132
  }), s;
16103
16133
  }
16104
16134
  /**
@@ -16113,15 +16143,15 @@ const w = class w {
16113
16143
  static resolveInterval(e) {
16114
16144
  const t = `${c.prefix}poll-interval`;
16115
16145
  if (!e.hasAttribute(t))
16116
- return w.DEFAULT_INTERVAL_MS;
16117
- const r = w.toNumber(e.getAttribute(t));
16146
+ return S.DEFAULT_INTERVAL_MS;
16147
+ const r = S.toNumber(e.getAttribute(t));
16118
16148
  return r === null ? (g.warn(
16119
16149
  "[Haori]",
16120
- `${t} は数値で指定してください。既定値 ${w.DEFAULT_INTERVAL_MS}ms を使用します。`
16121
- ), w.DEFAULT_INTERVAL_MS) : r < w.MIN_INTERVAL_MS ? (g.warn(
16150
+ `${t} は数値で指定してください。既定値 ${S.DEFAULT_INTERVAL_MS}ms を使用します。`
16151
+ ), S.DEFAULT_INTERVAL_MS) : r < S.MIN_INTERVAL_MS ? (g.warn(
16122
16152
  "[Haori]",
16123
- `${t} の下限は ${w.MIN_INTERVAL_MS}ms です。${r}ms は下限へ切り上げます。`
16124
- ), w.MIN_INTERVAL_MS) : r;
16153
+ `${t} の下限は ${S.MIN_INTERVAL_MS}ms です。${r}ms は下限へ切り上げます。`
16154
+ ), S.MIN_INTERVAL_MS) : r;
16125
16155
  }
16126
16156
  /**
16127
16157
  * `data-poll-timeout` を解決します。
@@ -16133,7 +16163,7 @@ const w = class w {
16133
16163
  const t = `${c.prefix}poll-timeout`;
16134
16164
  if (!e.hasAttribute(t))
16135
16165
  return null;
16136
- const r = w.toNumber(e.getAttribute(t));
16166
+ const r = S.toNumber(e.getAttribute(t));
16137
16167
  return r === null || r <= 0 ? (g.warn(
16138
16168
  "[Haori]",
16139
16169
  `${t} は正の数値で指定してください。無制限として扱います。`
@@ -16149,7 +16179,7 @@ const w = class w {
16149
16179
  const t = `${c.prefix}poll-error-limit`;
16150
16180
  if (!e.hasAttribute(t))
16151
16181
  return null;
16152
- const r = w.toNumber(e.getAttribute(t));
16182
+ const r = S.toNumber(e.getAttribute(t));
16153
16183
  return r === null || r < 1 ? (g.warn(
16154
16184
  "[Haori]",
16155
16185
  `${t} は 1 以上の数値で指定してください。無制限として扱います。`
@@ -16191,7 +16221,7 @@ const w = class w {
16191
16221
  */
16192
16222
  static isDisabled(e) {
16193
16223
  const t = `${c.prefix}poll-disabled`;
16194
- return e.hasAttribute(t) ? w.isTruthy(e.getAttribute(t)) : !1;
16224
+ return e.hasAttribute(t) ? S.isTruthy(e.getAttribute(t)) : !1;
16195
16225
  }
16196
16226
  /**
16197
16227
  * `data-poll-until` の条件が成立したかどうかを判定します。
@@ -16214,7 +16244,7 @@ const w = class w {
16214
16244
  `${t} に未解決の参照が含まれています(停止条件は成立扱いにしません):`,
16215
16245
  e.getRawAttribute(t),
16216
16246
  e.getTarget()
16217
- ), !1) : w.isTruthy(r.value) : !1;
16247
+ ), !1) : S.isTruthy(r.value) : !1;
16218
16248
  }
16219
16249
  /**
16220
16250
  * 属性の評価値を真偽値として解釈します。
@@ -16237,18 +16267,18 @@ const w = class w {
16237
16267
  return !!e;
16238
16268
  }
16239
16269
  };
16240
- w.CONFIG_KEYS = /* @__PURE__ */ new Set([
16270
+ S.CONFIG_KEYS = /* @__PURE__ */ new Set([
16241
16271
  "interval",
16242
16272
  "timeout",
16243
16273
  "until",
16244
16274
  "error-limit",
16245
16275
  "disabled",
16246
16276
  "state"
16247
- ]), w.DEFAULT_INTERVAL_MS = 5e3, w.MIN_INTERVAL_MS = 100, w.registrations = /* @__PURE__ */ new Map(), w.visibilityListener = null;
16248
- let ve = w;
16249
- const Qt = "0.62.1";
16250
- function _t(b) {
16251
- typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => b()) : Promise.resolve().then(b);
16277
+ ]), S.DEFAULT_INTERVAL_MS = 5e3, S.MIN_INTERVAL_MS = 100, S.registrations = /* @__PURE__ */ new Map(), S.visibilityListener = null;
16278
+ let ve = S;
16279
+ const Qt = "0.62.2";
16280
+ function _t(y) {
16281
+ typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => y()) : Promise.resolve().then(y);
16252
16282
  }
16253
16283
  const O = class O {
16254
16284
  /**
@@ -16281,7 +16311,7 @@ const O = class O {
16281
16311
  */
16282
16312
  static syncElement(e) {
16283
16313
  const t = O.registrations.get(e), r = N.get(e);
16284
- if (!(r instanceof S) || !O.shouldObserve(r)) {
16314
+ if (!(r instanceof R) || !O.shouldObserve(r)) {
16285
16315
  t && (t.observer.disconnect(), O.registrations.delete(e));
16286
16316
  return;
16287
16317
  }
@@ -16306,11 +16336,11 @@ const O = class O {
16306
16336
  const u = O.registrations.get(e);
16307
16337
  if (!u)
16308
16338
  return;
16309
- let h = !1;
16339
+ let f = !1;
16310
16340
  l.forEach((m) => {
16311
- const y = m.target;
16312
- u.observedRows.has(y) && (m.isIntersecting ? u.visibleRows.has(y) || (u.visibleRows.add(y), h = !0) : u.visibleRows.delete(y) && (h = !0));
16313
- }), h && O.scheduleCompute(u);
16341
+ const b = m.target;
16342
+ u.observedRows.has(b) && (m.isIntersecting ? u.visibleRows.has(b) || (u.visibleRows.add(b), f = !0) : u.visibleRows.delete(b) && (f = !0));
16343
+ }), f && O.scheduleCompute(u);
16314
16344
  },
16315
16345
  {
16316
16346
  root: n,
@@ -16406,7 +16436,7 @@ const O = class O {
16406
16436
  */
16407
16437
  static realRowElements(e) {
16408
16438
  return e.getChildren().filter(
16409
- (t) => t instanceof S && !t.hasAttribute(`${c.prefix}each-before`) && !t.hasAttribute(`${c.prefix}each-after`)
16439
+ (t) => t instanceof R && !t.hasAttribute(`${c.prefix}each-before`) && !t.hasAttribute(`${c.prefix}each-after`)
16410
16440
  ).map((t) => t.getTarget());
16411
16441
  }
16412
16442
  /**
@@ -16496,13 +16526,13 @@ const O = class O {
16496
16526
  };
16497
16527
  n[e.varName] = { ...t };
16498
16528
  const s = e.fragment.getTarget(), a = i === s ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([e.fragment]);
16499
- C.setBindingData(i, n, {
16529
+ M.setBindingData(i, n, {
16500
16530
  skipFragments: a,
16501
16531
  reflectToAttribute: !1,
16502
16532
  // 可視範囲の公開は値の供給ではない(権威を持たず、ユーザー編集の印も
16503
16533
  // 解除しない)。
16504
16534
  kind: "nonSupply",
16505
- sequence: S.nextSequence()
16535
+ sequence: R.nextSequence()
16506
16536
  }).catch((o) => {
16507
16537
  g.error("[Haori]", "Failed to publish visible range:", o);
16508
16538
  });
@@ -16543,15 +16573,15 @@ const H = class H {
16543
16573
  static async init() {
16544
16574
  if (H._initialized)
16545
16575
  return;
16546
- H._initialized = !0, H.disconnectMutationObservers(), S.setPendingMutationFlusher(() => {
16576
+ H._initialized = !0, H.disconnectMutationObservers(), R.setPendingMutationFlusher(() => {
16547
16577
  H.flushPendingMutations();
16548
16578
  });
16549
16579
  const e = new Ke();
16550
16580
  H._dispatcher = e, e.startDeferred(), H._initialIntakes = [];
16551
16581
  try {
16552
16582
  const t = await Promise.allSettled([
16553
- C.scan(document.head),
16554
- C.scan(document.body)
16583
+ M.scan(document.head),
16584
+ M.scan(document.body)
16555
16585
  ]), [r, i] = t;
16556
16586
  r.status !== "fulfilled" && g.error(
16557
16587
  "[Haori]",
@@ -16666,7 +16696,7 @@ const H = class H {
16666
16696
  */
16667
16697
  static hasKnownDescendant(e) {
16668
16698
  return e instanceof Element && Array.from(e.querySelectorAll("*")).some(
16669
- (t) => S.peek(t) !== null
16699
+ (t) => R.peek(t) !== null
16670
16700
  );
16671
16701
  }
16672
16702
  /**
@@ -16686,7 +16716,7 @@ const H = class H {
16686
16716
  * @returns 捨てる場合 true
16687
16717
  */
16688
16718
  static isStaleExternalRemoval(e, t) {
16689
- const r = S.peek(t)?.getParent() ?? null;
16719
+ const r = R.peek(t)?.getParent() ?? null;
16690
16720
  return r === null || r.getTarget() === e.target ? !1 : r.getTarget().closest(`[${c.prefix}external]`) !== null;
16691
16721
  }
16692
16722
  /**
@@ -16749,7 +16779,7 @@ const H = class H {
16749
16779
  const r = t.filter(H.isBindAttributeRecord), i = t.filter(
16750
16780
  (n) => !H.isBindAttributeRecord(n)
16751
16781
  );
16752
- r.length > 0 && H.processMutations(r, S.nextSequence()), i.length > 0 && Promise.resolve().then(() => {
16782
+ r.length > 0 && H.processMutations(r, R.nextSequence()), i.length > 0 && Promise.resolve().then(() => {
16753
16783
  H.processMutations(i);
16754
16784
  });
16755
16785
  }
@@ -16782,12 +16812,12 @@ const H = class H {
16782
16812
  if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(pe) && (r.attributeName === "disabled" || r.attributeName === pe))
16783
16813
  break;
16784
16814
  if (r.attributeName && (r.attributeName === `${c.prefix}if-false` || r.attributeName === "style" && i.hasAttribute(`${c.prefix}if-false`))) {
16785
- r.attributeName === "style" && S.reassertHiddenDisplay(i);
16815
+ r.attributeName === "style" && R.reassertHiddenDisplay(i);
16786
16816
  break;
16787
16817
  }
16788
- if (r.attributeName && C.isAliasedAttributeReflection(i, r.attributeName))
16818
+ if (r.attributeName && M.isAliasedAttributeReflection(i, r.attributeName))
16789
16819
  break;
16790
- const n = C.setAttribute(
16820
+ const n = M.setAttribute(
16791
16821
  i,
16792
16822
  r.attributeName,
16793
16823
  i.getAttribute(r.attributeName),
@@ -16799,17 +16829,17 @@ const H = class H {
16799
16829
  }
16800
16830
  case "childList": {
16801
16831
  Array.from(r.removedNodes).forEach((i) => {
16802
- H.isStaleExternalRemoval(r, i) || (Ae.cleanupTree(i), ve.cleanupTree(i), me.cleanupTree(i), C.removeNode(i));
16832
+ H.isStaleExternalRemoval(r, i) || (Ae.cleanupTree(i), ve.cleanupTree(i), me.cleanupTree(i), M.removeNode(i));
16803
16833
  }), Array.from(r.addedNodes).forEach((i) => {
16804
16834
  if (!(i.parentElement instanceof Element))
16805
16835
  return;
16806
- const n = C.addNode(i.parentElement, i);
16836
+ const n = M.addNode(i.parentElement, i);
16807
16837
  H._initialIntakes?.push(n), Ae.syncTree(i), ve.syncTree(i), me.syncTree(i);
16808
16838
  }), r.target instanceof Element && me.syncElement(r.target);
16809
16839
  break;
16810
16840
  }
16811
16841
  case "characterData": {
16812
- r.target instanceof Text || r.target instanceof Comment ? C.changeText(r.target, r.target.textContent) : g.warn(
16842
+ r.target instanceof Text || r.target instanceof Comment ? M.changeText(r.target, r.target.textContent) : g.warn(
16813
16843
  "[Haori]",
16814
16844
  "Unsupported character data type:",
16815
16845
  r.target
@@ -16827,11 +16857,11 @@ const H = class H {
16827
16857
  };
16828
16858
  H._initialized = !1, H._mutationObservers = [], H._dispatcher = null, H._initialIntakes = null;
16829
16859
  let ke = H;
16830
- re.setMutationCapture((b) => ke.captureMutations(b));
16860
+ re.setMutationCapture((y) => ke.captureMutations(y));
16831
16861
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ke.init) : ke.init();
16832
16862
  const er = () => Re.waitForRenders(), tr = Re.enhancers;
16833
16863
  export {
16834
- C as Core,
16864
+ M as Core,
16835
16865
  re as Enhance,
16836
16866
  c as Env,
16837
16867
  F as Form,