haori 0.47.0 → 0.47.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 fe = class fe {
1
+ const he = class he {
2
2
  /**
3
3
  * 開発モードの状態を取得します。
4
4
  *
5
5
  * @returns 開発モードならtrue、そうでなければfalse
6
6
  */
7
7
  static isEnabled() {
8
- return fe.devMode;
8
+ return he.devMode;
9
9
  }
10
10
  /**
11
11
  * 開発モードを有効化します。
12
12
  */
13
13
  static enable() {
14
- fe.devMode = !0;
14
+ he.devMode = !0;
15
15
  }
16
16
  /**
17
17
  * 開発モードを無効化します。
18
18
  */
19
19
  static disable() {
20
- fe.devMode = !1;
20
+ he.devMode = !1;
21
21
  }
22
22
  /**
23
23
  * 開発モードを切り替えます。
@@ -25,11 +25,11 @@ const fe = class fe {
25
25
  * @param enabled trueで有効化、falseで無効化
26
26
  */
27
27
  static set(e) {
28
- fe.devMode = e;
28
+ he.devMode = e;
29
29
  }
30
30
  };
31
- fe.devMode = !1;
32
- let q = fe;
31
+ he.devMode = !1;
32
+ let q = he;
33
33
  const Le = "embedded";
34
34
  function Je(y) {
35
35
  return y === "embedded" || y === "demo";
@@ -550,7 +550,7 @@ function De(y, e) {
550
550
  const t = Number(y);
551
551
  return Number.isFinite(t) ? Math.trunc(t) : e;
552
552
  }
553
- function Ce(y, e) {
553
+ function ke(y, e) {
554
554
  if (typeof y != "string")
555
555
  return "";
556
556
  const t = At.exec(y.trim());
@@ -564,7 +564,7 @@ function Ce(y, e) {
564
564
  }
565
565
  function St(y) {
566
566
  if (typeof y == "string" && y.trim() !== "")
567
- return Ce(y, 0);
567
+ return ke(y, 0);
568
568
  const e = /* @__PURE__ */ new Date();
569
569
  return `${String(e.getFullYear()).padStart(4, "0")}-${oe(e.getMonth() + 1)}`;
570
570
  }
@@ -577,7 +577,7 @@ function st(y, e) {
577
577
  return [];
578
578
  const i = Math.min(t, vt), n = [];
579
579
  for (let s = 0; s <= i; s += 1) {
580
- const a = Ce(r, -s);
580
+ const a = ke(r, -s);
581
581
  n.push({ targetMonth: a, label: a.replace(/-/g, "/") });
582
582
  }
583
583
  return n;
@@ -655,7 +655,7 @@ const wt = Object.freeze({
655
655
  number: rt,
656
656
  pages: nt,
657
657
  range: it,
658
- monthAdd: Ce,
658
+ monthAdd: ke,
659
659
  monthRange: st,
660
660
  pageSummary: at,
661
661
  findBy: ot,
@@ -2464,12 +2464,12 @@ T.MAX_IDENTIFIER_RECOVERY_COUNT = 8, T.BUILTIN_NAMESPACE = "haori", T.BUILTIN_HE
2464
2464
  "..."
2465
2465
  ]), T.strictComparisonSplits = /* @__PURE__ */ new Map(), T.WRAPPED_VALUES = /* @__PURE__ */ new WeakSet();
2466
2466
  let ee = T;
2467
- const we = "data-haori-if-disabled", ze = "input, select, textarea, button, fieldset", C = class C {
2467
+ const ue = "data-haori-if-disabled", ze = "input, select, textarea, button, fieldset", k = class k {
2468
2468
  /**
2469
2469
  * 集計状態を初期化します。
2470
2470
  */
2471
2471
  static reset() {
2472
- C.ELEMENT_STORES.clear(), C.ensureGlobalAccess();
2472
+ k.ELEMENT_STORES.clear(), k.ensureGlobalAccess();
2473
2473
  }
2474
2474
  /**
2475
2475
  * 集計を開始します。
@@ -2477,7 +2477,7 @@ const we = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2477
2477
  * @returns 戻り値はありません。
2478
2478
  */
2479
2479
  static start() {
2480
- C.collecting = !0;
2480
+ k.collecting = !0;
2481
2481
  }
2482
2482
  /**
2483
2483
  * 集計を停止します。
@@ -2485,7 +2485,7 @@ const we = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2485
2485
  * @returns 戻り値はありません。
2486
2486
  */
2487
2487
  static stop() {
2488
- C.collecting = !1;
2488
+ k.collecting = !1;
2489
2489
  }
2490
2490
  /**
2491
2491
  * 集計中かどうかを返します。
@@ -2493,7 +2493,7 @@ const we = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2493
2493
  * @returns 集計中なら true
2494
2494
  */
2495
2495
  static isCollecting() {
2496
- return C.collecting && q.isEnabled();
2496
+ return k.collecting && q.isEnabled();
2497
2497
  }
2498
2498
  /**
2499
2499
  * 現在の集計結果スナップショットを返します。
@@ -2501,7 +2501,7 @@ const we = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2501
2501
  * @returns エレメントごとの集計結果
2502
2502
  */
2503
2503
  static snapshot() {
2504
- return C.ensureGlobalAccess(), [...C.ELEMENT_STORES.entries()].map(([e, t]) => ({
2504
+ return k.ensureGlobalAccess(), [...k.ELEMENT_STORES.entries()].map(([e, t]) => ({
2505
2505
  elementId: e,
2506
2506
  tagName: t.tagName,
2507
2507
  attributes: [...t.attributes.entries()].map(([r, i]) => ({
@@ -2510,7 +2510,7 @@ const we = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2510
2510
  calls: i.calls,
2511
2511
  totalDurationMs: i.totalDurationMs,
2512
2512
  maxDurationMs: i.maxDurationMs,
2513
- placeholders: C.sortPlaceholders(
2513
+ placeholders: k.sortPlaceholders(
2514
2514
  i.placeholders
2515
2515
  )
2516
2516
  })).sort((r, i) => i.calls - r.calls),
@@ -2520,7 +2520,7 @@ const we = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2520
2520
  calls: i.calls,
2521
2521
  totalDurationMs: i.totalDurationMs,
2522
2522
  maxDurationMs: i.maxDurationMs,
2523
- placeholders: C.sortPlaceholders(
2523
+ placeholders: k.sortPlaceholders(
2524
2524
  i.placeholders
2525
2525
  )
2526
2526
  })).sort((r, i) => i.calls - r.calls)
@@ -2544,7 +2544,7 @@ const we = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2544
2544
  * @param limit 出力する宣言の数。既定は 20
2545
2545
  * @returns 要約。合計は `limit` で絞る前の全件から求める
2546
2546
  */
2547
- static report(e = C.DEFAULT_REPORT_LIMIT) {
2547
+ static report(e = k.DEFAULT_REPORT_LIMIT) {
2548
2548
  const t = /* @__PURE__ */ new Map();
2549
2549
  let r = 0, i = 0;
2550
2550
  const n = (c, u, d) => {
@@ -2568,7 +2568,7 @@ const we = "data-haori-if-disabled", ze = "input, select, textarea, button, fiel
2568
2568
  d.maxDurationMs
2569
2569
  ), d.totalDurationMs > p.representativeDurationMs && (p.where = u, p.representativeDurationMs = d.totalDurationMs);
2570
2570
  };
2571
- C.snapshot().forEach((c) => {
2571
+ k.snapshot().forEach((c) => {
2572
2572
  c.attributes.forEach((u) => {
2573
2573
  n(
2574
2574
  `@${u.name}
@@ -2598,7 +2598,7 @@ ${u.template}`,
2598
2598
  entryCount: s.length,
2599
2599
  top: a
2600
2600
  };
2601
- return C.logReport(o), o;
2601
+ return k.logReport(o), o;
2602
2602
  }
2603
2603
  /**
2604
2604
  * 要約を表形式でコンソールへ出力します。
@@ -2628,30 +2628,30 @@ ${u.template}`,
2628
2628
  * @param expressions 今回評価した式一覧
2629
2629
  */
2630
2630
  static record(e, t, r) {
2631
- if (!q.isEnabled() || !e || t.length === 0 || (C.ensureGlobalAccess(), !C.isCollecting()))
2631
+ if (!q.isEnabled() || !e || t.length === 0 || (k.ensureGlobalAccess(), !k.isCollecting()))
2632
2632
  return;
2633
- const i = C.getOrCreateElementStore(
2633
+ const i = k.getOrCreateElementStore(
2634
2634
  e.element
2635
2635
  );
2636
2636
  if (e.kind === "attribute") {
2637
- const s = C.getOrCreateCounter(
2637
+ const s = k.getOrCreateCounter(
2638
2638
  i.attributes,
2639
2639
  e.rawName,
2640
2640
  e.template
2641
2641
  );
2642
- C.updateCounter(
2642
+ k.updateCounter(
2643
2643
  s,
2644
2644
  t,
2645
2645
  r
2646
2646
  );
2647
2647
  return;
2648
2648
  }
2649
- const n = C.getOrCreateCounter(
2649
+ const n = k.getOrCreateCounter(
2650
2650
  i.texts,
2651
2651
  String(e.childIndex),
2652
2652
  e.template
2653
2653
  );
2654
- C.updateCounter(
2654
+ k.updateCounter(
2655
2655
  n,
2656
2656
  t,
2657
2657
  r
@@ -2664,12 +2664,12 @@ ${u.template}`,
2664
2664
  if (!q.isEnabled())
2665
2665
  return;
2666
2666
  const e = globalThis;
2667
- e[C.GLOBAL_KEY] === void 0 && (e[C.GLOBAL_KEY] = {
2668
- start: () => C.start(),
2669
- stop: () => C.stop(),
2670
- reset: () => C.reset(),
2671
- snapshot: () => C.snapshot(),
2672
- report: (t) => C.report(t)
2667
+ e[k.GLOBAL_KEY] === void 0 && (e[k.GLOBAL_KEY] = {
2668
+ start: () => k.start(),
2669
+ stop: () => k.stop(),
2670
+ reset: () => k.reset(),
2671
+ snapshot: () => k.snapshot(),
2672
+ report: (t) => k.report(t)
2673
2673
  });
2674
2674
  }
2675
2675
  /**
@@ -2679,7 +2679,7 @@ ${u.template}`,
2679
2679
  * @returns 集計ストア
2680
2680
  */
2681
2681
  static getOrCreateElementStore(e) {
2682
- const t = C.createElementId(e), r = C.ELEMENT_STORES.get(t);
2682
+ const t = k.createElementId(e), r = k.ELEMENT_STORES.get(t);
2683
2683
  if (r)
2684
2684
  return r;
2685
2685
  const i = {
@@ -2687,7 +2687,7 @@ ${u.template}`,
2687
2687
  attributes: /* @__PURE__ */ new Map(),
2688
2688
  texts: /* @__PURE__ */ new Map()
2689
2689
  };
2690
- return C.ELEMENT_STORES.set(t, i), i;
2690
+ return k.ELEMENT_STORES.set(t, i), i;
2691
2691
  }
2692
2692
  /**
2693
2693
  * カウンタを取得または初期化します。
@@ -2737,7 +2737,7 @@ ${u.template}`,
2737
2737
  */
2738
2738
  static updateCounter(e, t, r) {
2739
2739
  e.calls += 1, e.totalDurationMs += r, e.maxDurationMs = Math.max(e.maxDurationMs, r), t.forEach((i) => {
2740
- const n = C.getOrCreatePlaceholder(
2740
+ const n = k.getOrCreatePlaceholder(
2741
2741
  e.placeholders,
2742
2742
  i.expression
2743
2743
  );
@@ -2776,12 +2776,12 @@ ${u.template}`,
2776
2776
  * @returns 結果と所要時間
2777
2777
  */
2778
2778
  static measure(e) {
2779
- if (!C.isCollecting())
2779
+ if (!k.isCollecting())
2780
2780
  return { value: e(), durationMs: 0 };
2781
- const t = C.now();
2781
+ const t = k.now();
2782
2782
  return {
2783
2783
  value: e(),
2784
- durationMs: C.now() - t
2784
+ durationMs: k.now() - t
2785
2785
  };
2786
2786
  }
2787
2787
  /**
@@ -2808,22 +2808,22 @@ ${u.template}`,
2808
2808
  return t.join(" > ");
2809
2809
  }
2810
2810
  };
2811
- C.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", C.ELEMENT_STORES = /* @__PURE__ */ new Map(), C.collecting = !1, C.DEFAULT_REPORT_LIMIT = 20;
2812
- let Fe = C;
2813
- const he = class he {
2811
+ k.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", k.ELEMENT_STORES = /* @__PURE__ */ new Map(), k.collecting = !1, k.DEFAULT_REPORT_LIMIT = 20;
2812
+ let Fe = k;
2813
+ const pe = class pe {
2814
2814
  /**
2815
2815
  * フラグメントのコンストラクタ。
2816
2816
  *
2817
2817
  * @param target 対象ノード
2818
2818
  */
2819
2819
  constructor(e) {
2820
- this.parent = null, this.mounted = !1, this.skipMutationNodes = !1, this.target = e, he.FRAGMENT_CACHE.set(e, this);
2820
+ this.parent = null, this.mounted = !1, this.skipMutationNodes = !1, this.target = e, pe.FRAGMENT_CACHE.set(e, this);
2821
2821
  }
2822
2822
  static get(e) {
2823
2823
  if (e == null)
2824
2824
  return null;
2825
- if (he.FRAGMENT_CACHE.has(e))
2826
- return he.FRAGMENT_CACHE.get(e);
2825
+ if (pe.FRAGMENT_CACHE.has(e))
2826
+ return pe.FRAGMENT_CACHE.get(e);
2827
2827
  let t;
2828
2828
  switch (e.nodeType) {
2829
2829
  case Node.ELEMENT_NODE:
@@ -2914,7 +2914,7 @@ const he = class he {
2914
2914
  * @return 除去のPromise
2915
2915
  */
2916
2916
  remove(e = !0) {
2917
- return this.parent && this.parent.removeChild(this), he.FRAGMENT_CACHE.delete(this.target), e ? this.unmount() : Promise.resolve();
2917
+ return this.parent && this.parent.removeChild(this), pe.FRAGMENT_CACHE.delete(this.target), e ? this.unmount() : Promise.resolve();
2918
2918
  }
2919
2919
  /**
2920
2920
  * 対象ノードを取得します。
@@ -2941,9 +2941,9 @@ const he = class he {
2941
2941
  this.parent = e;
2942
2942
  }
2943
2943
  };
2944
- he.FRAGMENT_CACHE = /* @__PURE__ */ new WeakMap();
2945
- let M = he;
2946
- const R = class R extends M {
2944
+ pe.FRAGMENT_CACHE = /* @__PURE__ */ new WeakMap();
2945
+ let M = pe;
2946
+ const w = class w extends M {
2947
2947
  /**
2948
2948
  * エレメントフラグメントのコンストラクタ。
2949
2949
  * アトリビュートや子フラグメントの作成も行います。
@@ -2951,10 +2951,10 @@ const R = class R extends M {
2951
2951
  * @param target 対象エレメント
2952
2952
  */
2953
2953
  constructor(e) {
2954
- super(e), this.children = [], this.attributeMap = /* @__PURE__ */ new Map(), this.bindingData = null, this.bindingWorkChain = Promise.resolve(), this.bindingWorkActive = 0, this.lastSupplySequence = 0, this.lastResetSequence = 0, this.initialBindAttribute = null, this.derivedBindingData = null, this.bindingDataCache = null, this.descendantBindingDataCache = null, this.visible = !0, this.display = null, this.displayPriority = null, this.template = null, this.rowLocalTemplate = null, this.listKey = null, this.renderSignature = null, this.eachInputSignature = null, this.deriveSubtreeSignature = null, this.deriveInputSignature = null, this.freshInitializationSkippable = !1, this.value = null, this.selfWritingAttributes = /* @__PURE__ */ new Map(), this.skipChangeValue = !1, this.valueWriteUnapplied = !1, this.pendingValueWrite = null, this.userEditSequence = 0, this.authoritativeValueSequence = 0, this.lastValueSequence = 0, this.lastValueKind = "nonSupply", this.selfWrittenBind = /* @__PURE__ */ new Map(), this.lastPathApplied = /* @__PURE__ */ new Map(), this.lastChangeSequence = 0, this.syncValue(), this.initialBindAttribute = e.getAttribute(`${l.prefix}bind`), e.getAttributeNames().forEach((t) => {
2954
+ super(e), this.children = [], this.attributeMap = /* @__PURE__ */ new Map(), this.bindingData = null, this.bindingWorkChain = Promise.resolve(), this.bindingWorkActive = 0, this.lastSupplySequence = 0, this.lastResetSequence = 0, this.initialBindAttribute = null, this.derivedBindingData = null, this.bindingDataCache = null, this.descendantBindingDataCache = null, this.visible = !0, this.display = null, this.displayPriority = null, this.template = null, this.rowLocalTemplate = null, this.listKey = null, this.renderSignature = null, this.eachInputSignature = null, this.deriveSubtreeSignature = null, this.deriveInputSignature = null, this.freshInitializationSkippable = !1, this.value = null, this.selfWritingAttributes = /* @__PURE__ */ new Map(), this.skipChangeValue = !1, this.valueWriteUnapplied = !1, this.pendingValueWrite = null, this.userEditSequence = 0, this.authoritativeValueSequence = 0, this.lastValueSequence = 0, this.lastValueKind = "nonSupply", this.selfWrittenBind = /* @__PURE__ */ new Map(), this.lastPathApplied = /* @__PURE__ */ new Map(), this.lastChangeSequence = 0, w.dropIfVisibilityArtifacts(e), this.syncValue(), this.initialBindAttribute = e.getAttribute(`${l.prefix}bind`), e.getAttributeNames().forEach((t) => {
2955
2955
  const r = e.getAttribute(t);
2956
2956
  if (r !== null && !this.attributeMap.has(t)) {
2957
- const i = new xe(t, r);
2957
+ const i = new Ne(t, r);
2958
2958
  this.attributeMap.set(t, i);
2959
2959
  }
2960
2960
  }), e.childNodes.forEach((t) => {
@@ -2977,7 +2977,7 @@ const R = class R extends M {
2977
2977
  */
2978
2978
  getChildElementFragments() {
2979
2979
  return this.children.filter(
2980
- (e) => e instanceof R
2980
+ (e) => e instanceof w
2981
2981
  );
2982
2982
  }
2983
2983
  /**
@@ -3009,7 +3009,7 @@ const R = class R extends M {
3009
3009
  * @returns クローンされたフラグメント
3010
3010
  */
3011
3011
  clone() {
3012
- const e = new R(
3012
+ const e = new w(
3013
3013
  this.target.cloneNode(!1)
3014
3014
  );
3015
3015
  return this.attributeMap.forEach((t, r) => {
@@ -3019,12 +3019,29 @@ const R = class R extends M {
3019
3019
  e.getTarget().appendChild(r.getTarget()), e.pushChild(r);
3020
3020
  }), e.mounted = !1, e.bindingData = this.bindingData, e.derivedBindingData = this.derivedBindingData, e.clearBindingDataCache(), e.visible = !0, e.display = this.display, e.displayPriority = this.displayPriority, e.template = this.template, e.rowLocalTemplate = this.rowLocalTemplate, e.renderSignature = this.renderSignature, e.eachInputSignature = this.eachInputSignature, e.deriveSubtreeSignature = null, e.deriveInputSignature = null, e.freshInitializationSkippable = this.freshInitializationSkippable, e.normalizeClonedVisibilityState(), e;
3021
3021
  }
3022
+ /**
3023
+ * `data-if` の非表示化が DOM へ書いた追随結果を落とします。
3024
+ *
3025
+ * 仕様「data-if の動作」の「判定の基準は内部状態であり、`style.display` や
3026
+ * `data-if-false` は追随結果として扱う」に従います。内部状態を持たない要素
3027
+ * (フラグメントを作る時点の要素、複製した要素)に追随結果が残っていると、
3028
+ * 内部状態は「表示」なのに DOM は非表示という食い違いになり、`show()` は内部状態を
3029
+ * 基準に何もしないため**表示に戻れません**。
3030
+ *
3031
+ * @param target 対象エレメント
3032
+ * @returns 戻り値はありません。
3033
+ */
3034
+ static dropIfVisibilityArtifacts(e) {
3035
+ e.hasAttribute(`${l.prefix}if-false`) && (e.style.removeProperty("display"), e.getAttribute("style")?.trim() === "" && e.removeAttribute("style"), e.removeAttribute(`${l.prefix}if-false`), w.forEachFormControlInBranch(e, (t) => {
3036
+ t.hasAttribute(ue) && (t.removeAttribute(ue), t.removeAttribute("disabled"));
3037
+ }));
3038
+ }
3022
3039
  /**
3023
3040
  * clone 時に runtime の hidden 状態だけを落とします。
3024
3041
  */
3025
3042
  normalizeClonedVisibilityState() {
3026
3043
  (this.visible === !1 || this.getTarget().style.display === "none" || this.getTarget().hasAttribute(`${l.prefix}if-false`)) && (this.visible = !0, this.display = null, this.displayPriority = null, this.getTarget().style.removeProperty("display"), this.getTarget().removeAttribute(`${l.prefix}if-false`), this.restoreFormControlsDisabledByIf()), this.children.forEach((e) => {
3027
- e instanceof R && e.normalizeClonedVisibilityState();
3044
+ e instanceof w && e.normalizeClonedVisibilityState();
3028
3045
  });
3029
3046
  }
3030
3047
  /**
@@ -3144,19 +3161,19 @@ const R = class R extends M {
3144
3161
  * @returns 実行中なら true
3145
3162
  */
3146
3163
  static isExecutingAnyBindingWork() {
3147
- return R.bindingWorkActiveCount > 0;
3164
+ return w.bindingWorkActiveCount > 0;
3148
3165
  }
3149
3166
  /**
3150
3167
  * バインドワークの実行開始を記録します(`Core.setBindingData` の work 開始時に呼ぶ)。
3151
3168
  */
3152
3169
  markBindingWorkStart() {
3153
- this.bindingWorkActive++, R.bindingWorkActiveCount++;
3170
+ this.bindingWorkActive++, w.bindingWorkActiveCount++;
3154
3171
  }
3155
3172
  /**
3156
3173
  * バインドワークの実行終了を記録します(work 完了時に呼ぶ)。
3157
3174
  */
3158
3175
  markBindingWorkEnd() {
3159
- this.bindingWorkActive > 0 && (this.bindingWorkActive--, R.bindingWorkActiveCount--);
3176
+ this.bindingWorkActive > 0 && (this.bindingWorkActive--, w.bindingWorkActiveCount--);
3160
3177
  }
3161
3178
  /**
3162
3179
  * このフラグメントへ供給が適用されたことを記録します。
@@ -3248,7 +3265,7 @@ const R = class R extends M {
3248
3265
  */
3249
3266
  clearBindingDataCache() {
3250
3267
  this.bindingDataCache = null, this.descendantBindingDataCache = null, this.children.forEach((e) => {
3251
- e instanceof R && e.clearBindingDataCache();
3268
+ e instanceof w && e.clearBindingDataCache();
3252
3269
  });
3253
3270
  }
3254
3271
  /**
@@ -3466,7 +3483,7 @@ const R = class R extends M {
3466
3483
  this.value = this.normalizeValueForElement(i, e);
3467
3484
  const s = this.userEditSequence;
3468
3485
  return this.enqueueValueWrite(() => {
3469
- this.isSupersededByUserEdit(s) || r && !this.canApplyValue(r) || (i.value = n, this.recordValueWriteResult(i.value === n), t && ((i instanceof HTMLInputElement && R.INPUT_EVENT_TYPES.includes(i.type) || i instanceof HTMLTextAreaElement) && i.dispatchEvent(new Event("input", { bubbles: !0 })), i.dispatchEvent(new Event("change", { bubbles: !0 }))));
3486
+ this.isSupersededByUserEdit(s) || r && !this.canApplyValue(r) || (i.value = n, this.recordValueWriteResult(i.value === n), t && ((i instanceof HTMLInputElement && w.INPUT_EVENT_TYPES.includes(i.type) || i instanceof HTMLTextAreaElement) && i.dispatchEvent(new Event("input", { bubbles: !0 })), i.dispatchEvent(new Event("change", { bubbles: !0 }))));
3470
3487
  });
3471
3488
  }
3472
3489
  /**
@@ -3547,10 +3564,10 @@ const R = class R extends M {
3547
3564
  * @returns 再試行の完了 Promise
3548
3565
  */
3549
3566
  static retryUnappliedValueWrites(e, t) {
3550
- if (R.UNAPPLIED_VALUE_WRITES.size === 0)
3567
+ if (w.UNAPPLIED_VALUE_WRITES.size === 0)
3551
3568
  return Promise.resolve();
3552
3569
  const r = [];
3553
- for (const i of Array.from(R.UNAPPLIED_VALUE_WRITES)) {
3570
+ for (const i of Array.from(w.UNAPPLIED_VALUE_WRITES)) {
3554
3571
  const n = i.getTarget();
3555
3572
  if (i.wasResetAfter(t)) {
3556
3573
  i.clearUnappliedValueWrite();
@@ -3592,7 +3609,7 @@ const R = class R extends M {
3592
3609
  * @returns 戻り値はありません。
3593
3610
  */
3594
3611
  clearUnappliedValueWrite() {
3595
- this.valueWriteUnapplied = !1, R.UNAPPLIED_VALUE_WRITES.delete(this);
3612
+ this.valueWriteUnapplied = !1, w.UNAPPLIED_VALUE_WRITES.delete(this);
3596
3613
  }
3597
3614
  /**
3598
3615
  * 入力エレメントの値を取得します。
@@ -3613,7 +3630,7 @@ const R = class R extends M {
3613
3630
  * @returns 直近に発番した通番(未発番なら 0)
3614
3631
  */
3615
3632
  static currentSequence() {
3616
- return R.sequenceCounter;
3633
+ return w.sequenceCounter;
3617
3634
  }
3618
3635
  /**
3619
3636
  * 新しい通番を発番します。
@@ -3626,7 +3643,7 @@ const R = class R extends M {
3626
3643
  * @returns 発番した通番
3627
3644
  */
3628
3645
  static nextSequence() {
3629
- return R.sequenceCounter += 1, R.sequenceCounter;
3646
+ return w.sequenceCounter += 1, w.sequenceCounter;
3630
3647
  }
3631
3648
  /**
3632
3649
  * 保留中の外部 DOM 変更を取り込む処理を登録します。
@@ -3635,7 +3652,7 @@ const R = class R extends M {
3635
3652
  * @returns 戻り値はありません。
3636
3653
  */
3637
3654
  static setPendingMutationFlusher(e) {
3638
- R.pendingMutationFlusher = e;
3655
+ w.pendingMutationFlusher = e;
3639
3656
  }
3640
3657
  /**
3641
3658
  * 利用者の操作を起点とする通番を発番します。
@@ -3656,7 +3673,7 @@ const R = class R extends M {
3656
3673
  * @returns 発番した通番
3657
3674
  */
3658
3675
  static nextOperationSequence() {
3659
- return R.pendingMutationFlusher && !R.isExecutingAnyBindingWork() && R.pendingMutationFlusher(), R.nextSequence();
3676
+ return w.pendingMutationFlusher && !w.isExecutingAnyBindingWork() && w.pendingMutationFlusher(), w.nextSequence();
3660
3677
  }
3661
3678
  /**
3662
3679
  * この入力欄へ値を適用してよいかを返します。
@@ -3686,7 +3703,7 @@ const R = class R extends M {
3686
3703
  * @returns 適用してよい場合は true
3687
3704
  */
3688
3705
  canApplyValue(e) {
3689
- return e.kind === "nonSupply" && e.editedPaths !== void 0 && this.userEditSequence > 0 && this.wasResetAfter(this.userEditSequence) ? !1 : R.isApplicable(
3706
+ return e.kind === "nonSupply" && e.editedPaths !== void 0 && this.userEditSequence > 0 && this.wasResetAfter(this.userEditSequence) ? !1 : w.isApplicable(
3690
3707
  { sequence: this.lastValueSequence, kind: this.lastValueKind },
3691
3708
  e
3692
3709
  );
@@ -3709,7 +3726,7 @@ const R = class R extends M {
3709
3726
  * @returns 適用してよい場合は true
3710
3727
  */
3711
3728
  canApplyPath(e, t) {
3712
- return R.isApplicable(
3729
+ return w.isApplicable(
3713
3730
  this.lastPathApplied.get(e) ?? null,
3714
3731
  t
3715
3732
  );
@@ -3758,7 +3775,7 @@ const R = class R extends M {
3758
3775
  * @returns 発番した編集の通番
3759
3776
  */
3760
3777
  markUserEdit() {
3761
- return this.userEditSequence = R.nextSequence(), this.markValueApplied({ sequence: this.userEditSequence, kind: "edit" }), this.userEditSequence;
3778
+ return this.userEditSequence = w.nextSequence(), this.markValueApplied({ sequence: this.userEditSequence, kind: "edit" }), this.userEditSequence;
3762
3779
  }
3763
3780
  /**
3764
3781
  * `change` によるユーザー編集を記録します。
@@ -3813,7 +3830,7 @@ const R = class R extends M {
3813
3830
  * @param upTo この通し番号までの編集を解除対象とする(既定は現在の最新)
3814
3831
  * @return 戻り値はありません。
3815
3832
  */
3816
- clearUserEditMark(e = R.currentSequence()) {
3833
+ clearUserEditMark(e = w.currentSequence()) {
3817
3834
  e > this.authoritativeValueSequence && (this.authoritativeValueSequence = e), this.lastValueKind === "edit" && this.lastValueSequence <= e && (this.lastValueKind = "supply");
3818
3835
  }
3819
3836
  /**
@@ -3834,7 +3851,7 @@ const R = class R extends M {
3834
3851
  if (!q.isEnabled())
3835
3852
  return;
3836
3853
  const n = `${e} ${r}`;
3837
- R.loggedUnresolvedAttributes.has(n) || (R.loggedUnresolvedAttributes.add(n), m.warn(
3854
+ w.loggedUnresolvedAttributes.has(n) || (w.loggedUnresolvedAttributes.add(n), m.warn(
3838
3855
  "[Haori]",
3839
3856
  `Attribute "${t}" was not applied because the expression has an unresolved reference; the attribute is removed and the synchronized value is emptied: ${e}="${r}"`,
3840
3857
  i
@@ -3857,7 +3874,7 @@ const R = class R extends M {
3857
3874
  */
3858
3875
  static warnTypeMismatchedComparison(e, t, r, i) {
3859
3876
  const n = `${e} ${t}`;
3860
- R.loggedTypeMismatchedComparisons.has(n) || (R.loggedTypeMismatchedComparisons.add(n), m.warn(
3877
+ w.loggedTypeMismatchedComparisons.has(n) || (w.loggedTypeMismatchedComparisons.add(n), m.warn(
3861
3878
  "[Haori]",
3862
3879
  `The strict comparison compares different types (${r.left} vs ${r.right}), so it is always false even though the values match. Align the types (for example with ${l.prefix}value-type) or compare converted values: ${e}="${t}"`,
3863
3880
  i
@@ -3879,7 +3896,7 @@ const R = class R extends M {
3879
3896
  if (!t)
3880
3897
  return !1;
3881
3898
  const r = M.get(t);
3882
- return r instanceof R ? r.hasPendingUserEdit() : !1;
3899
+ return r instanceof w ? r.hasPendingUserEdit() : !1;
3883
3900
  }
3884
3901
  /**
3885
3902
  * 内部の値をクリアします。エレメントのvalue値は変化しません。
@@ -3909,8 +3926,8 @@ const R = class R extends M {
3909
3926
  * @returns 正規化後の値(宣言または `type="number"` に従う)
3910
3927
  */
3911
3928
  normalizeValueForElement(e, t) {
3912
- const r = R.resolveDeclaredValueType(e);
3913
- return r === "boolean" ? R.normalizeBooleanValue(t) : r === "string" ? t === null ? null : String(t) : r === "number" || r === null && e instanceof HTMLInputElement && e.type === "number" ? R.normalizeNumberValue(t) : t;
3929
+ const r = w.resolveDeclaredValueType(e);
3930
+ return r === "boolean" ? w.normalizeBooleanValue(t) : r === "string" ? t === null ? null : String(t) : r === "number" || r === null && e instanceof HTMLInputElement && e.type === "number" ? w.normalizeNumberValue(t) : t;
3914
3931
  }
3915
3932
  /**
3916
3933
  * 値を数値へ正規化します。
@@ -3927,7 +3944,7 @@ const R = class R extends M {
3927
3944
  return null;
3928
3945
  if (typeof e == "number")
3929
3946
  return Number.isFinite(e) ? e : null;
3930
- if (typeof e != "string" || !R.NUMBER_INPUT_PATTERN.test(e))
3947
+ if (typeof e != "string" || !w.NUMBER_INPUT_PATTERN.test(e))
3931
3948
  return null;
3932
3949
  const t = Number(e);
3933
3950
  return Number.isFinite(t) ? t : null;
@@ -3968,11 +3985,11 @@ const R = class R extends M {
3968
3985
  if (t === null)
3969
3986
  return null;
3970
3987
  const r = t.trim().toLowerCase();
3971
- return R.VALUE_TYPE_NAMES.has(r) ? R.acceptsDeclaredValueType(e) ? r : (R.warnValueTypeDeclaration(
3988
+ return w.VALUE_TYPE_NAMES.has(r) ? w.acceptsDeclaredValueType(e) ? r : (w.warnValueTypeDeclaration(
3972
3989
  e,
3973
3990
  t,
3974
3991
  "値を持つ入力(checkbox / radio / file と複数選択の select を除く)にのみ指定できます"
3975
- ), null) : (R.warnValueTypeDeclaration(
3992
+ ), null) : (w.warnValueTypeDeclaration(
3976
3993
  e,
3977
3994
  t,
3978
3995
  "boolean / number / string のいずれかを指定してください"
@@ -4005,7 +4022,7 @@ const R = class R extends M {
4005
4022
  if (!q.isEnabled())
4006
4023
  return;
4007
4024
  const i = e instanceof HTMLInputElement ? `[type=${e.type}]` : "", n = `${e.tagName}${i} ${t} ${r}`;
4008
- R.loggedValueTypeDeclarations.has(n) || (R.loggedValueTypeDeclarations.add(n), m.warn(
4025
+ w.loggedValueTypeDeclarations.has(n) || (w.loggedValueTypeDeclarations.add(n), m.warn(
4009
4026
  "Haori",
4010
4027
  `${l.prefix}value-type="${t}" を無視しました(${r}):`,
4011
4028
  e
@@ -4026,7 +4043,7 @@ const R = class R extends M {
4026
4043
  * @returns 同期対象の場合true
4027
4044
  */
4028
4045
  static isValuePropertyTarget(e) {
4029
- return e instanceof HTMLInputElement ? R.INPUT_EVENT_TYPES.includes(e.type) || e.type === "hidden" : e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement;
4046
+ return e instanceof HTMLInputElement ? w.INPUT_EVENT_TYPES.includes(e.type) || e.type === "hidden" : e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement;
4030
4047
  }
4031
4048
  /**
4032
4049
  * 利用者が打鍵で値を変えられる入力欄かどうかを判定します。
@@ -4065,7 +4082,7 @@ const R = class R extends M {
4065
4082
  */
4066
4083
  readValueFromDom() {
4067
4084
  const e = this.getTarget();
4068
- if (R.resolveDeclaredValueType(e), e instanceof HTMLInputElement) {
4085
+ if (w.resolveDeclaredValueType(e), e instanceof HTMLInputElement) {
4069
4086
  if (e.type === "checkbox" || e.type === "radio") {
4070
4087
  const t = e.type === "checkbox" && e.value === "true", r = e.value;
4071
4088
  return e.checked ? t ? !0 : r === "false" ? !1 : r : t ? !1 : r === "false" ? !0 : null;
@@ -4094,7 +4111,7 @@ const R = class R extends M {
4094
4111
  */
4095
4112
  recordValueWriteResult(e) {
4096
4113
  if (!e && this.value !== null && this.value !== "") {
4097
- this.valueWriteUnapplied = !0, R.UNAPPLIED_VALUE_WRITES.add(this);
4114
+ this.valueWriteUnapplied = !0, w.UNAPPLIED_VALUE_WRITES.add(this);
4098
4115
  return;
4099
4116
  }
4100
4117
  this.clearUnappliedValueWrite();
@@ -4124,7 +4141,7 @@ const R = class R extends M {
4124
4141
  * @returns 収集する値
4125
4142
  */
4126
4143
  getValueForCollection() {
4127
- return this.skipChangeValue || this.valueWriteUnapplied ? this.value : R.isValuePropertyTarget(this.getTarget()) ? this.readValueFromDom() : this.value;
4144
+ return this.skipChangeValue || this.valueWriteUnapplied ? this.value : w.isValuePropertyTarget(this.getTarget()) ? this.readValueFromDom() : this.value;
4128
4145
  }
4129
4146
  /**
4130
4147
  * チェック状態の DOM 反映に合わせて内部値を DOM から同期します。
@@ -4144,7 +4161,7 @@ const R = class R extends M {
4144
4161
  if (!t)
4145
4162
  return;
4146
4163
  const r = M.get(t);
4147
- r instanceof R && r.syncValue();
4164
+ r instanceof w && r.syncValue();
4148
4165
  }
4149
4166
  /**
4150
4167
  * 指定した属性のいずれかを自身が書き込み中なら、その完了 Promise を返します。
@@ -4258,15 +4275,15 @@ const R = class R extends M {
4258
4275
  );
4259
4276
  if (r === null)
4260
4277
  return e === t ? this.removeAttribute(e) : this.removeAliasedAttribute(e, t);
4261
- const o = new xe(e, r);
4278
+ const o = new Ne(e, r);
4262
4279
  if (n) {
4263
- const pe = this.attributeMap.get(e);
4264
- if (pe && (pe.isEvaluate || pe.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
4265
- const Se = G.enqueue(() => {
4280
+ const ge = this.attributeMap.get(e);
4281
+ if (ge && (ge.isEvaluate || ge.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
4282
+ const we = G.enqueue(() => {
4266
4283
  }).finally(() => {
4267
4284
  this.releaseSelfWritingAttributes(s);
4268
4285
  });
4269
- return this.holdSelfWritingAttributes(s, Se), Se;
4286
+ return this.holdSelfWritingAttributes(s, we), we;
4270
4287
  }
4271
4288
  }
4272
4289
  this.attributeMap.set(e, o);
@@ -4275,35 +4292,35 @@ const R = class R extends M {
4275
4292
  element: c,
4276
4293
  rawName: e,
4277
4294
  template: r
4278
- }), d = o.isEvaluate || o.isRawEvaluate, p = e === t && R.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), g = o.isSingleExpression(), E = le.joinEvaluateResults(u.results), A = u.results.length === 1 ? u.results[0] : E, I = t === "value" && R.resolveDeclaredValueType(c) === "boolean", k = A === !1 && !I, W = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || A === null || A === void 0 || k : p ? u.hasUnresolvedReference || A === null || A === void 0 || A === !1 : g ? u.hasUnresolvedReference || A === null || A === void 0 || k : d && E === "");
4279
- if (W && u.hasUnresolvedReference && R.warnUnresolvedAttribute(
4295
+ }), d = o.isEvaluate || o.isRawEvaluate, p = e === t && w.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), g = o.isSingleExpression(), E = le.joinEvaluateResults(u.results), A = u.results.length === 1 ? u.results[0] : E, I = t === "value" && w.resolveDeclaredValueType(c) === "boolean", C = A === !1 && !I, W = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || A === null || A === void 0 || C : p ? u.hasUnresolvedReference || A === null || A === void 0 || A === !1 : g ? u.hasUnresolvedReference || A === null || A === void 0 || C : d && E === "");
4296
+ if (W && u.hasUnresolvedReference && w.warnUnresolvedAttribute(
4280
4297
  e,
4281
4298
  t,
4282
4299
  r,
4283
4300
  c
4284
4301
  ), q.isEnabled() && A === !1 && g) {
4285
- const pe = o.getSingleExpression(), Se = pe === null ? null : ee.diagnoseStrictComparison(
4286
- pe,
4302
+ const ge = o.getSingleExpression(), we = ge === null ? null : ee.diagnoseStrictComparison(
4303
+ ge,
4287
4304
  this.getBindingData()
4288
4305
  );
4289
- Se !== null && R.warnTypeMismatchedComparison(
4306
+ we !== null && w.warnTypeMismatchedComparison(
4290
4307
  e,
4291
4308
  r,
4292
- Se,
4309
+ we,
4293
4310
  c
4294
4311
  );
4295
4312
  }
4296
- const N = o.isForceEvaluation() ? r : g ? A : E, U = i && o.isEvaluate && t === "value" && R.isValuePropertyTarget(c), K = c.getRootNode(), w = U && R.isUserEditableValue(c) && (c === K.activeElement || this.hasPendingUserEdit()), S = W || N === null || N === !1 && !I ? null : String(N), H = e !== t && c.getAttribute(e) !== r, B = S === null ? c.hasAttribute(t) : c.getAttribute(t) !== S, te = S === null ? "" : S, ie = U && !w && c.value !== te, V = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), z = t === "selected" && c instanceof HTMLOptionElement, Z = K.activeElement, J = Z !== null && (V && c === Z || z && c.closest("select") === Z) || (V || z) && this.hasPendingCheckableUserEdit(z), ae = S !== null, ve = V && !J && c.checked !== ae, ce = z && !J && c.selected !== ae;
4297
- if (!H && !B && !ie && !ve && !ce)
4298
- return U && !w && (this.value = this.normalizeValueForElement(
4313
+ const x = o.isForceEvaluation() ? r : g ? A : E, U = i && o.isEvaluate && t === "value" && w.isValuePropertyTarget(c), K = c.getRootNode(), R = U && w.isUserEditableValue(c) && (c === K.activeElement || this.hasPendingUserEdit()), S = W || x === null || x === !1 && !I ? null : String(x), H = e !== t && c.getAttribute(e) !== r, B = S === null ? c.hasAttribute(t) : c.getAttribute(t) !== S, te = S === null ? "" : S, ie = U && !R && c.value !== te, V = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), z = t === "selected" && c instanceof HTMLOptionElement, Z = K.activeElement, J = Z !== null && (V && c === Z || z && c.closest("select") === Z) || (V || z) && this.hasPendingCheckableUserEdit(z), ae = S !== null, Se = V && !J && c.checked !== ae, ce = z && !J && c.selected !== ae;
4314
+ if (!H && !B && !ie && !Se && !ce)
4315
+ return U && !R && (this.value = this.normalizeValueForElement(
4299
4316
  c,
4300
4317
  te
4301
4318
  ), this.clearUnappliedValueWrite()), (V || z) && !J && this.syncCheckableValueFromDom(z), Promise.resolve();
4302
4319
  const We = G.enqueue(() => {
4303
- H && c.setAttribute(e, r), S === null ? c.removeAttribute(t) : B && (c.setAttribute(t, S), t === `${l.prefix}bind` && this.recordSelfWrittenBind(S)), U && !w && (this.value = this.normalizeValueForElement(
4320
+ H && c.setAttribute(e, r), S === null ? c.removeAttribute(t) : B && (c.setAttribute(t, S), t === `${l.prefix}bind` && this.recordSelfWrittenBind(S)), U && !R && (this.value = this.normalizeValueForElement(
4304
4321
  c,
4305
4322
  te
4306
- ), ie && (c.value = te), this.recordValueWriteResult(c.value === te)), ve && (c.checked = ae), ce && (c.selected = ae), (ve || ce) && this.syncCheckableValueFromDom(ce);
4323
+ ), ie && (c.value = te), this.recordValueWriteResult(c.value === te)), Se && (c.checked = ae), ce && (c.selected = ae), (Se || ce) && this.syncCheckableValueFromDom(ce);
4307
4324
  }).finally(() => {
4308
4325
  this.releaseSelfWritingAttributes(s);
4309
4326
  });
@@ -4540,7 +4557,7 @@ const R = class R extends M {
4540
4557
  return Promise.resolve();
4541
4558
  this.visible = !1;
4542
4559
  const e = this.getTarget();
4543
- return this.display = e.style.getPropertyValue("display"), this.displayPriority = e.style.getPropertyPriority("display"), e.style.setProperty("display", "none", "important"), e.setAttribute(`${l.prefix}if-false`, ""), R.disableFormControlsInBranch(e), Promise.resolve();
4560
+ return this.display = e.style.getPropertyValue("display"), this.displayPriority = e.style.getPropertyPriority("display"), e.style.setProperty("display", "none", "important"), e.setAttribute(`${l.prefix}if-false`, ""), w.disableFormControlsInBranch(e), Promise.resolve();
4544
4561
  }
4545
4562
  /**
4546
4563
  * 分岐配下のフォームコントロールを順に処理します。
@@ -4578,8 +4595,8 @@ const R = class R extends M {
4578
4595
  * @returns 戻り値はありません。
4579
4596
  */
4580
4597
  static disableFormControlsInBranch(e) {
4581
- R.forEachFormControlInBranch(e, (t) => {
4582
- t.hasAttribute("disabled") || (t.setAttribute(we, ""), t.setAttribute("disabled", ""));
4598
+ w.forEachFormControlInBranch(e, (t) => {
4599
+ t.hasAttribute("disabled") || (t.setAttribute(ue, ""), t.setAttribute("disabled", ""));
4583
4600
  });
4584
4601
  }
4585
4602
  /**
@@ -4592,8 +4609,8 @@ const R = class R extends M {
4592
4609
  * @returns 戻り値はありません。
4593
4610
  */
4594
4611
  restoreFormControlsDisabledByIf() {
4595
- R.forEachFormControlInBranch(this.getTarget(), (e) => {
4596
- e.hasAttribute(we) && (e.removeAttribute(we), e.removeAttribute("disabled"));
4612
+ w.forEachFormControlInBranch(this.getTarget(), (e) => {
4613
+ e.hasAttribute(ue) && (e.removeAttribute(ue), e.removeAttribute("disabled"));
4597
4614
  });
4598
4615
  }
4599
4616
  /**
@@ -4625,11 +4642,11 @@ const R = class R extends M {
4625
4642
  return t === null ? null : t.closestByAttribute(e);
4626
4643
  }
4627
4644
  };
4628
- R.NUMBER_INPUT_PATTERN = /^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/, R.VALUE_TYPE_NAMES = /* @__PURE__ */ new Set([
4645
+ w.NUMBER_INPUT_PATTERN = /^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/, w.VALUE_TYPE_NAMES = /* @__PURE__ */ new Set([
4629
4646
  "boolean",
4630
4647
  "number",
4631
4648
  "string"
4632
- ]), R.loggedValueTypeDeclarations = /* @__PURE__ */ new Set(), R.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
4649
+ ]), w.loggedValueTypeDeclarations = /* @__PURE__ */ new Set(), w.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
4633
4650
  "allowfullscreen",
4634
4651
  "async",
4635
4652
  "autofocus",
@@ -4653,7 +4670,7 @@ R.NUMBER_INPUT_PATTERN = /^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/, R.VALUE
4653
4670
  "required",
4654
4671
  "reversed",
4655
4672
  "selected"
4656
- ]), R.INPUT_EVENT_TYPES = [
4673
+ ]), w.INPUT_EVENT_TYPES = [
4657
4674
  "text",
4658
4675
  "password",
4659
4676
  "email",
@@ -4668,8 +4685,8 @@ R.NUMBER_INPUT_PATTERN = /^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/, R.VALUE
4668
4685
  "month",
4669
4686
  "time",
4670
4687
  "week"
4671
- ], R.UNAPPLIED_VALUE_WRITES = /* @__PURE__ */ new Set(), R.sequenceCounter = 0, R.bindingWorkActiveCount = 0, R.pendingMutationFlusher = null, R.loggedUnresolvedAttributes = /* @__PURE__ */ new Set(), R.loggedTypeMismatchedComparisons = /* @__PURE__ */ new Set();
4672
- let D = R;
4688
+ ], w.UNAPPLIED_VALUE_WRITES = /* @__PURE__ */ new Set(), w.sequenceCounter = 0, w.bindingWorkActiveCount = 0, w.pendingMutationFlusher = null, w.loggedUnresolvedAttributes = /* @__PURE__ */ new Set(), w.loggedTypeMismatchedComparisons = /* @__PURE__ */ new Set();
4689
+ let D = w;
4673
4690
  class re extends M {
4674
4691
  /**
4675
4692
  * テキストフラグメントのコンストラクタ。
@@ -4797,7 +4814,7 @@ class Ve extends M {
4797
4814
  }));
4798
4815
  }
4799
4816
  }
4800
- const ke = class ke {
4817
+ const Ce = class Ce {
4801
4818
  /**
4802
4819
  * コンストラクタ。
4803
4820
  *
@@ -4805,7 +4822,7 @@ const ke = class ke {
4805
4822
  */
4806
4823
  constructor(e) {
4807
4824
  this.contents = [], this.isEvaluate = !1, this.isRawEvaluate = !1, this.value = e;
4808
- const t = [...e.matchAll(ke.PLACEHOLDER_REGEX)];
4825
+ const t = [...e.matchAll(Ce.PLACEHOLDER_REGEX)];
4809
4826
  let r = 0, i = !1, n = !1;
4810
4827
  for (const s of t) {
4811
4828
  s.index > r && this.contents.push({
@@ -4936,8 +4953,8 @@ const ke = class ke {
4936
4953
  ), { results: n, hasUnresolvedReference: o };
4937
4954
  }
4938
4955
  };
4939
- ke.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
4940
- let le = ke;
4956
+ Ce.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
4957
+ let le = Ce;
4941
4958
  const _ = class _ extends le {
4942
4959
  /**
4943
4960
  * コンストラクタ。
@@ -5017,8 +5034,8 @@ const _ = class _ extends le {
5017
5034
  }
5018
5035
  };
5019
5036
  _.FORCE_EVALUATION_SUFFIXES = ["if", "each", "derive"], _.FORCE_EVALUATION_PREFIXES = ["data-", "hor-"], _.forceEvaluationNames = null, _.forceEvaluationPrefix = null;
5020
- let xe = _;
5021
- const be = class be {
5037
+ let Ne = _;
5038
+ const Ee = class Ee {
5022
5039
  /**
5023
5040
  * 実行モードを取得します。
5024
5041
  *
@@ -5094,7 +5111,7 @@ const be = class be {
5094
5111
  */
5095
5112
  static openDialog(e) {
5096
5113
  return G.enqueue(() => {
5097
- e instanceof HTMLDialogElement ? (be.clearMessagesSync(e), e.showModal()) : m.error("[Haori]", "Element is not a dialog: ", e);
5114
+ e instanceof HTMLDialogElement ? (Ee.clearMessagesSync(e), e.showModal()) : m.error("[Haori]", "Element is not a dialog: ", e);
5098
5115
  }, !0);
5099
5116
  }
5100
5117
  /**
@@ -5114,7 +5131,7 @@ const be = class be {
5114
5131
  * @param message エラーメッセージ
5115
5132
  */
5116
5133
  static addErrorMessage(e, t) {
5117
- return be.addMessage(e, t, "error");
5134
+ return Ee.addMessage(e, t, "error");
5118
5135
  }
5119
5136
  /**
5120
5137
  * メッセージをレベル付きで追加します。
@@ -5136,7 +5153,7 @@ const be = class be {
5136
5153
  */
5137
5154
  static clearMessages(e) {
5138
5155
  return G.enqueue(() => {
5139
- be.clearMessagesSync(e);
5156
+ Ee.clearMessagesSync(e);
5140
5157
  }, !0);
5141
5158
  }
5142
5159
  /**
@@ -5240,7 +5257,7 @@ const be = class be {
5240
5257
  * @returns 加算後の年月(`YYYY-MM` 形式)。不正な入力は空文字
5241
5258
  */
5242
5259
  static monthAdd(e, t) {
5243
- return Ce(e, t);
5260
+ return ke(e, t);
5244
5261
  }
5245
5262
  /**
5246
5263
  * 基準月から過去方向へ `count + 1` 個の年月配列を降順で返します。
@@ -5320,7 +5337,7 @@ const be = class be {
5320
5337
  return dt(e, t);
5321
5338
  }
5322
5339
  };
5323
- be.enhancers = {
5340
+ Ee.enhancers = {
5324
5341
  /**
5325
5342
  * 外部ライブラリ連携を登録します。
5326
5343
  *
@@ -5341,15 +5358,15 @@ be.enhancers = {
5341
5358
  return se.has(e);
5342
5359
  }
5343
5360
  };
5344
- let Ae = be;
5361
+ let ve = Ee;
5345
5362
  const Rt = "入力内容を確認してください", Tt = ["addErrorMessage", "clearMessages"], Ge = "data-haori-group-name";
5346
5363
  function Ye() {
5347
5364
  const e = globalThis.window?.Haori;
5348
5365
  return Tt.every(
5349
5366
  (r) => typeof e?.[r] == "function"
5350
- ) ? e : Ae;
5367
+ ) ? e : ve;
5351
5368
  }
5352
- const f = class f {
5369
+ const h = class h {
5353
5370
  /**
5354
5371
  * フォーム内にある入力エレメントの値をオブジェクトとして取得します。
5355
5372
  * data-form-object属性があると、そのエレメント内の値はオブジェクトとして処理されます。
@@ -5360,7 +5377,7 @@ const f = class f {
5360
5377
  */
5361
5378
  static getValues(e) {
5362
5379
  const t = {}, r = /* @__PURE__ */ new Set();
5363
- return f.getPartValues(e, t, null, r), f.registerCollectedExcludedKeys(t, r), t;
5380
+ return h.getPartValues(e, t, null, r), h.registerCollectedExcludedKeys(t, r), t;
5364
5381
  }
5365
5382
  /**
5366
5383
  * 入力エレメントから収集する値を解決します。
@@ -5381,11 +5398,11 @@ const f = class f {
5381
5398
  */
5382
5399
  static resolveCollectedValue(e) {
5383
5400
  const t = e.getTarget();
5384
- if (f.isFileInput(e)) {
5401
+ if (h.isFileInput(e)) {
5385
5402
  const r = t, i = r.files ? Array.from(r.files) : [];
5386
5403
  return r.multiple ? i : i.length > 0 ? i[0] : null;
5387
5404
  }
5388
- if (f.isBooleanCheckbox(e)) {
5405
+ if (h.isBooleanCheckbox(e)) {
5389
5406
  const r = t;
5390
5407
  return r.value === "false" ? !r.checked : r.checked;
5391
5408
  }
@@ -5438,13 +5455,13 @@ const f = class f {
5438
5455
  * @returns 戻り値はありません。
5439
5456
  */
5440
5457
  static clearRowUserEditMarksForChangedKeys(e, t) {
5441
- const r = f.getValues(e), i = /* @__PURE__ */ new Set();
5458
+ const r = h.getValues(e), i = /* @__PURE__ */ new Set();
5442
5459
  for (const n of /* @__PURE__ */ new Set([
5443
5460
  ...Object.keys(r),
5444
5461
  ...Object.keys(t)
5445
5462
  ]))
5446
- f.isSameCollectedValue(r[n], t[n]) || i.add(n);
5447
- i.size !== 0 && f.clearUserEditMarksForKeys(e, e, i);
5463
+ h.isSameCollectedValue(r[n], t[n]) || i.add(n);
5464
+ i.size !== 0 && h.clearUserEditMarksForKeys(e, e, i);
5448
5465
  }
5449
5466
  /**
5450
5467
  * 収集値と要素データの値が同じ内容かどうかを判定します。
@@ -5473,9 +5490,9 @@ const f = class f {
5473
5490
  * @returns 戻り値はありません。
5474
5491
  */
5475
5492
  static clearUserEditMarksForKeys(e, t, r) {
5476
- const i = f.resolveRowTopLevelKey(e, t);
5493
+ const i = h.resolveRowTopLevelKey(e, t);
5477
5494
  i !== null && r.has(i) && e.clearUserEditMark(), e.getChildElementFragments().forEach((n) => {
5478
- f.clearUserEditMarksForKeys(n, t, r);
5495
+ h.clearUserEditMarksForKeys(n, t, r);
5479
5496
  });
5480
5497
  }
5481
5498
  /**
@@ -5491,7 +5508,7 @@ const f = class f {
5491
5508
  static resolveRowTopLevelKey(e, t) {
5492
5509
  let r = null, i = e;
5493
5510
  for (; i !== null && i !== t; ) {
5494
- const n = i.getAttribute(`${l.prefix}form-object`) || i.getAttribute(`${l.prefix}form-list`) || f.resolveFieldName(i);
5511
+ const n = i.getAttribute(`${l.prefix}form-object`) || i.getAttribute(`${l.prefix}form-list`) || h.resolveFieldName(i);
5495
5512
  n != null && String(n) !== "" && (r = String(n)), i = i.getParent();
5496
5513
  }
5497
5514
  return r;
@@ -5532,7 +5549,7 @@ const f = class f {
5532
5549
  const r = e.getTarget();
5533
5550
  if (!(r instanceof HTMLInputElement) || r.type !== "radio" || r.hasAttribute("name") && !r.hasAttribute(Ge))
5534
5551
  return;
5535
- const i = f.resolveGroupScope(e), n = `${String(t)}--haori${f.resolveGroupScopeId(
5552
+ const i = h.resolveGroupScope(e), n = `${String(t)}--haori${h.resolveGroupScopeId(
5536
5553
  i
5537
5554
  )}`;
5538
5555
  if (r.getAttribute("name") !== n)
@@ -5566,8 +5583,8 @@ const f = class f {
5566
5583
  * @returns スコープの識別番号
5567
5584
  */
5568
5585
  static resolveGroupScopeId(e) {
5569
- const t = f.GROUP_SCOPE_IDS.get(e);
5570
- return t !== void 0 ? t : (f.groupScopeSequence += 1, f.GROUP_SCOPE_IDS.set(e, f.groupScopeSequence), f.groupScopeSequence);
5586
+ const t = h.GROUP_SCOPE_IDS.get(e);
5587
+ return t !== void 0 ? t : (h.groupScopeSequence += 1, h.GROUP_SCOPE_IDS.set(e, h.groupScopeSequence), h.groupScopeSequence);
5571
5588
  }
5572
5589
  /**
5573
5590
  * 宣言バインドで値・状態が決まり、その評価が解決している入力かどうかを判定します。
@@ -5585,17 +5602,17 @@ const f = class f {
5585
5602
  * @returns 宣言バインドで値・状態が決まり、その評価が解決している場合 true
5586
5603
  */
5587
5604
  static hasResolvedDeclarativeState(e) {
5588
- if (!f.isDeclarativeStateBound(e))
5605
+ if (!h.isDeclarativeStateBound(e))
5589
5606
  return !1;
5590
5607
  const t = e.getTarget();
5591
5608
  if (t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio"))
5592
- return f.isDeclarationResolved(e, "checked");
5593
- if (f.hasDeclarativeBinding(e, "value"))
5594
- return f.isDeclarationResolved(e, "value");
5609
+ return h.isDeclarationResolved(e, "checked");
5610
+ if (h.hasDeclarativeBinding(e, "value"))
5611
+ return h.isDeclarationResolved(e, "value");
5595
5612
  if (t instanceof HTMLSelectElement) {
5596
5613
  for (const r of Array.from(t.options)) {
5597
5614
  const i = M.get(r);
5598
- if (i instanceof D && f.hasDeclarativeBinding(i, "selected") && !f.isDeclarationResolved(i, "selected"))
5615
+ if (i instanceof D && h.hasDeclarativeBinding(i, "selected") && !h.isDeclarationResolved(i, "selected"))
5599
5616
  return !1;
5600
5617
  }
5601
5618
  return !0;
@@ -5638,7 +5655,7 @@ const f = class f {
5638
5655
  */
5639
5656
  static isDeclarativeStateBound(e) {
5640
5657
  const t = e.getTarget();
5641
- return t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? f.hasDeclarativeBinding(e, "checked") : D.isValuePropertyTarget(t) ? f.hasDeclarativeBinding(e, "value") ? !0 : t instanceof HTMLSelectElement ? f.hasDeclarativeSelectedOption(t) : !1 : !1;
5658
+ return t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? h.hasDeclarativeBinding(e, "checked") : D.isValuePropertyTarget(t) ? h.hasDeclarativeBinding(e, "value") ? !0 : t instanceof HTMLSelectElement ? h.hasDeclarativeSelectedOption(t) : !1 : !1;
5642
5659
  }
5643
5660
  /**
5644
5661
  * 対象の部分木にある入力欄を、ネイティブのフォームリセットと同じ既定値へ戻します。
@@ -5658,7 +5675,7 @@ const f = class f {
5658
5675
  const t = "input, textarea, select", r = [];
5659
5676
  e.matches(t) && r.push(e), r.push(...e.querySelectorAll(t));
5660
5677
  for (const i of r)
5661
- 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);
5678
+ 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);
5662
5679
  }
5663
5680
  /**
5664
5681
  * `<select>` の選択状態を既定の選択(`defaultSelected`)へ戻します。
@@ -5688,14 +5705,14 @@ const f = class f {
5688
5705
  * @return 戻り値はありません。
5689
5706
  */
5690
5707
  static clearDeclarativeStateFromDom(e) {
5691
- if (f.isDeclarativeStateBound(e)) {
5708
+ if (h.isDeclarativeStateBound(e)) {
5692
5709
  const t = e.getTarget();
5693
5710
  t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio") ? t.checked = !1 : t instanceof HTMLSelectElement ? (Array.from(t.options).forEach((r) => {
5694
5711
  r.selected = !1;
5695
5712
  }), t.selectedIndex = -1) : (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) && (t.value = "");
5696
5713
  }
5697
5714
  e.getChildren().forEach((t) => {
5698
- t instanceof D && f.clearDeclarativeStateFromDom(t);
5715
+ t instanceof D && h.clearDeclarativeStateFromDom(t);
5699
5716
  });
5700
5717
  }
5701
5718
  /**
@@ -5725,7 +5742,7 @@ const f = class f {
5725
5742
  static hasDeclarativeSelectedOption(e) {
5726
5743
  for (const t of Array.from(e.options)) {
5727
5744
  const r = M.get(t);
5728
- if (r instanceof D && f.hasDeclarativeBinding(r, "selected"))
5745
+ if (r instanceof D && h.hasDeclarativeBinding(r, "selected"))
5729
5746
  return !0;
5730
5747
  }
5731
5748
  return !1;
@@ -5756,7 +5773,7 @@ const f = class f {
5756
5773
  * @returns 編集された入力欄だけを含む値のオブジェクト
5757
5774
  */
5758
5775
  static getValuesEditedAfter(e, t) {
5759
- return f.getPartValues(e, {}, t);
5776
+ return h.getPartValues(e, {}, t);
5760
5777
  }
5761
5778
  /**
5762
5779
  * 利用者が編集した入力欄に対応するバインドデータの経路を集めます。
@@ -5798,10 +5815,10 @@ const f = class f {
5798
5815
  */
5799
5816
  static collectEditedPaths(e, t, r = "", i = null) {
5800
5817
  const n = /* @__PURE__ */ new Map();
5801
- for (const a of f.collectUserEditSequences(e)) {
5818
+ for (const a of h.collectUserEditSequences(e)) {
5802
5819
  const o = /* @__PURE__ */ new Set();
5803
- f.walkEditedPaths(
5804
- f.getValuesEditedAfter(e, a - 1),
5820
+ h.walkEditedPaths(
5821
+ h.getValuesEditedAfter(e, a - 1),
5805
5822
  r,
5806
5823
  o
5807
5824
  );
@@ -5809,7 +5826,7 @@ const f = class f {
5809
5826
  n.has(c) || n.set(c, a);
5810
5827
  }
5811
5828
  const s = /* @__PURE__ */ new Set();
5812
- f.walkExcludedPaths(i ?? f.getValues(e), r, s);
5829
+ h.walkExcludedPaths(i ?? h.getValues(e), r, s);
5813
5830
  for (const a of s)
5814
5831
  n.has(a) || n.set(a, t);
5815
5832
  return n;
@@ -5822,7 +5839,7 @@ const f = class f {
5822
5839
  */
5823
5840
  static collectUserEditSequences(e) {
5824
5841
  const t = /* @__PURE__ */ new Set();
5825
- return f.walkUserEditSequences(e, t), [...t].sort((r, i) => i - r);
5842
+ return h.walkUserEditSequences(e, t), [...t].sort((r, i) => i - r);
5826
5843
  }
5827
5844
  /**
5828
5845
  * 部分木をたどってユーザー編集の通番を集めます。
@@ -5835,7 +5852,7 @@ const f = class f {
5835
5852
  const r = e.getUserEditSequence();
5836
5853
  r > 0 && t.add(r);
5837
5854
  for (const i of e.getChildElementFragments())
5838
- f.walkUserEditSequences(i, t);
5855
+ h.walkUserEditSequences(i, t);
5839
5856
  }
5840
5857
  /**
5841
5858
  * 収集値をたどって、除外されたキーの経路を集めます。
@@ -5850,15 +5867,15 @@ const f = class f {
5850
5867
  static walkExcludedPaths(e, t, r) {
5851
5868
  if (Array.isArray(e))
5852
5869
  return;
5853
- const i = f.asPlainRecord(e);
5870
+ const i = h.asPlainRecord(e);
5854
5871
  if (i === null)
5855
5872
  return;
5856
- const n = f.COLLECTED_EXCLUDED_KEYS.get(i);
5873
+ const n = h.COLLECTED_EXCLUDED_KEYS.get(i);
5857
5874
  if (n)
5858
5875
  for (const s of n)
5859
5876
  s in i || r.add(t === "" ? s : `${t}.${s}`);
5860
5877
  for (const [s, a] of Object.entries(i))
5861
- f.walkExcludedPaths(
5878
+ h.walkExcludedPaths(
5862
5879
  a,
5863
5880
  t === "" ? s : `${t}.${s}`,
5864
5881
  r
@@ -5874,10 +5891,10 @@ const f = class f {
5874
5891
  static walkEditedPaths(e, t, r) {
5875
5892
  if (Array.isArray(e))
5876
5893
  return;
5877
- const i = f.asPlainRecord(e);
5894
+ const i = h.asPlainRecord(e);
5878
5895
  if (i !== null) {
5879
5896
  for (const [n, s] of Object.entries(i))
5880
- f.walkEditedPaths(
5897
+ h.walkEditedPaths(
5881
5898
  s,
5882
5899
  t === "" ? n : `${t}.${n}`,
5883
5900
  r
@@ -5903,48 +5920,48 @@ const f = class f {
5903
5920
  return t;
5904
5921
  if (e.getTarget().hasAttribute(`${l.prefix}if-false`)) {
5905
5922
  if (i !== null)
5906
- for (const u of f.collectDeclaredKeysInFragment(e))
5923
+ for (const u of h.collectDeclaredKeysInFragment(e))
5907
5924
  i.add(u);
5908
5925
  return t;
5909
5926
  }
5910
- const n = f.resolveFieldName(e), s = e.getAttribute(`${l.prefix}form-object`), a = e.getAttribute(`${l.prefix}form-list`), o = e.hasAttribute(`${l.prefix}form-list`), c = r !== null && e.getUserEditSequence() <= r;
5927
+ const n = h.resolveFieldName(e), s = e.getAttribute(`${l.prefix}form-object`), a = e.getAttribute(`${l.prefix}form-list`), o = e.hasAttribute(`${l.prefix}form-list`), c = r !== null && e.getUserEditSequence() <= r;
5911
5928
  if (n) {
5912
- if (r !== null && f.isGroupedCheckable(e)) {
5913
- const u = f.collectGroupSelection(
5929
+ if (r !== null && h.isGroupedCheckable(e)) {
5930
+ const u = h.collectGroupSelection(
5914
5931
  e,
5915
5932
  o,
5916
5933
  r
5917
5934
  );
5918
5935
  u.edited && (t[String(n)] = u.value);
5919
- } else if (o && f.isGroupedCheckable(e)) {
5936
+ } else if (o && h.isGroupedCheckable(e)) {
5920
5937
  const u = String(n), d = e.getTarget();
5921
5938
  r === null && !Array.isArray(t[u]) && (t[u] = []), !c && d.checked && (Array.isArray(t[u]) || (t[u] = []), t[u].push(d.value));
5922
5939
  } else if (o && c)
5923
5940
  Array.isArray(t[String(n)]) ? t[String(n)].push(null) : t[String(n)] = [null];
5924
5941
  else if (!c) if (o) {
5925
- const u = f.resolveCollectedValue(e), d = f.isFileInput(e) && Array.isArray(u) ? u : [u];
5942
+ const u = h.resolveCollectedValue(e), d = h.isFileInput(e) && Array.isArray(u) ? u : [u];
5926
5943
  Array.isArray(t[String(n)]) ? t[String(n)].push(...d) : t[String(n)] = d;
5927
- } else if (f.isGroupedCheckable(e)) {
5944
+ } else if (h.isGroupedCheckable(e)) {
5928
5945
  const u = e.getTarget(), d = u instanceof HTMLInputElement ? u.checked : !0, p = u instanceof HTMLInputElement ? u.value : e.getValue(), g = d ? p : null, E = String(n);
5929
5946
  g === null ? E in t || (t[E] = null) : t[E] === null || t[E] === void 0 ? t[E] = g : Array.isArray(t[E]) ? t[E].push(g) : t[E] = [t[E], g];
5930
5947
  } else
5931
- t[String(n)] = f.resolveCollectedValue(e);
5948
+ t[String(n)] = h.resolveCollectedValue(e);
5932
5949
  s && m.warn(
5933
5950
  "Haori",
5934
5951
  `Element cannot have both ${l.prefix}form-object and name attributes.`
5935
5952
  );
5936
5953
  for (const u of e.getChildElementFragments())
5937
- f.getPartValues(u, t, r, i);
5954
+ h.getPartValues(u, t, r, i);
5938
5955
  } else if (s) {
5939
5956
  const u = {}, d = i === null ? null : /* @__PURE__ */ new Set();
5940
5957
  for (const p of e.getChildElementFragments())
5941
- f.getPartValues(
5958
+ h.getPartValues(
5942
5959
  p,
5943
5960
  u,
5944
5961
  r,
5945
5962
  d
5946
5963
  );
5947
- d !== null && f.registerCollectedExcludedKeys(u, d), Object.keys(u).length > 0 ? t[String(s)] = u : i !== null && (d?.size ?? 0) > 0 && i.add(String(s)), a && m.warn(
5964
+ d !== null && h.registerCollectedExcludedKeys(u, d), Object.keys(u).length > 0 ? t[String(s)] = u : i !== null && (d?.size ?? 0) > 0 && i.add(String(s)), a && m.warn(
5948
5965
  "Haori",
5949
5966
  `Element cannot have both ${l.prefix}form-list and ${l.prefix}form-object attributes.`
5950
5967
  );
@@ -5953,25 +5970,25 @@ const f = class f {
5953
5970
  let p = !1;
5954
5971
  for (const g of e.getChildElementFragments()) {
5955
5972
  const E = {}, A = i === null ? null : /* @__PURE__ */ new Set();
5956
- f.getPartValues(
5973
+ h.getPartValues(
5957
5974
  g,
5958
5975
  E,
5959
5976
  r,
5960
5977
  A
5961
- ), A !== null && f.registerCollectedExcludedKeys(E, A), Object.keys(E).length > 0 ? (p = !0, u.push(E), d.push(g.getListKey())) : r !== null && (u.push({}), d.push(g.getListKey()));
5978
+ ), A !== null && h.registerCollectedExcludedKeys(E, A), Object.keys(E).length > 0 ? (p = !0, u.push(E), d.push(g.getListKey())) : r !== null && (u.push({}), d.push(g.getListKey()));
5962
5979
  }
5963
5980
  if (r === null) {
5964
5981
  const g = e.getAttribute(`${l.prefix}each-key`);
5965
- f.registerCollectedRowIdentity(
5982
+ h.registerCollectedRowIdentity(
5966
5983
  u,
5967
5984
  g == null ? null : String(g),
5968
5985
  d,
5969
- f.isCollectedListFromEachSource(e)
5970
- ), f.warnDerivedRowsWithoutKey(e), t[String(a)] = u;
5986
+ h.isCollectedListFromEachSource(e)
5987
+ ), h.warnDerivedRowsWithoutKey(e), t[String(a)] = u;
5971
5988
  } else p && (t[String(a)] = u);
5972
5989
  } else
5973
5990
  for (const u of e.getChildElementFragments())
5974
- f.getPartValues(u, t, r, i);
5991
+ h.getPartValues(u, t, r, i);
5975
5992
  return t;
5976
5993
  }
5977
5994
  /**
@@ -5984,7 +6001,7 @@ const f = class f {
5984
6001
  * @returns Promise(DOMの更新が完了したら解決される)
5985
6002
  */
5986
6003
  static setValues(e, t, r = !1) {
5987
- return f.setPartValues(e, t, r, !0);
6004
+ return h.setPartValues(e, t, r, !0);
5988
6005
  }
5989
6006
  /**
5990
6007
  * フォーム内にある入力エレメントに値をイベントなしで設定します。
@@ -5997,7 +6014,7 @@ const f = class f {
5997
6014
  * @returns Promise(DOMの更新が完了したら解決される)
5998
6015
  */
5999
6016
  static syncValues(e, t, r = !1, i = null) {
6000
- return f.setPartValues(
6017
+ return h.setPartValues(
6001
6018
  e,
6002
6019
  t,
6003
6020
  r,
@@ -6020,7 +6037,7 @@ const f = class f {
6020
6037
  * @returns 反映完了の Promise
6021
6038
  */
6022
6039
  static syncRowValues(e, t, r = null) {
6023
- return f.setPartValues(
6040
+ return h.setPartValues(
6024
6041
  e,
6025
6042
  t,
6026
6043
  !1,
@@ -6050,7 +6067,7 @@ const f = class f {
6050
6067
  if (!r)
6051
6068
  return t;
6052
6069
  const i = String(r);
6053
- return Object.prototype.hasOwnProperty.call(t, i) ? f.asPlainRecord(t[i]) ?? {} : f.resolveAncestorArgOwner(e, i)?.value ?? {};
6070
+ return Object.prototype.hasOwnProperty.call(t, i) ? h.asPlainRecord(t[i]) ?? {} : h.resolveAncestorArgOwner(e, i)?.value ?? {};
6054
6071
  }
6055
6072
  /**
6056
6073
  * `data-form-arg` のキーを所有する祖先を解決します。
@@ -6075,7 +6092,7 @@ const f = class f {
6075
6092
  if (i && Object.prototype.hasOwnProperty.call(i, t)) {
6076
6093
  if (r.getListKey() !== null)
6077
6094
  return null;
6078
- const n = f.asPlainRecord(i[t]);
6095
+ const n = h.asPlainRecord(i[t]);
6079
6096
  return n ? { owner: r, value: n } : null;
6080
6097
  }
6081
6098
  r = r.getParent();
@@ -6099,18 +6116,18 @@ const f = class f {
6099
6116
  static buildConditionScope(e, t = null) {
6100
6117
  const r = { ...e.getBindingData() }, i = t ? {
6101
6118
  source: t,
6102
- argKey: f.resolveFormArgKey(t)
6103
- } : f.resolveConditionValueSource(e);
6119
+ argKey: h.resolveFormArgKey(t)
6120
+ } : h.resolveConditionValueSource(e);
6104
6121
  if (!i)
6105
6122
  return r;
6106
- const n = f.getValues(i.source), s = f.collectDeclaredFieldKeys(i.source);
6123
+ const n = h.getValues(i.source), s = h.collectDeclaredFieldKeys(i.source);
6107
6124
  if (i.argKey === null) {
6108
6125
  for (const o of s)
6109
6126
  r[o] = n[o];
6110
6127
  return r;
6111
6128
  }
6112
6129
  const a = {
6113
- ...f.asPlainRecord(r[i.argKey]) ?? {}
6130
+ ...h.asPlainRecord(r[i.argKey]) ?? {}
6114
6131
  };
6115
6132
  for (const o of s)
6116
6133
  a[o] = n[o];
@@ -6140,8 +6157,8 @@ const f = class f {
6140
6157
  }
6141
6158
  t = i;
6142
6159
  }
6143
- const r = f.getFormFragment(e);
6144
- return r ? { source: r, argKey: f.resolveFormArgKey(r) } : null;
6160
+ const r = h.getFormFragment(e);
6161
+ return r ? { source: r, argKey: h.resolveFormArgKey(r) } : null;
6145
6162
  }
6146
6163
  /**
6147
6164
  * フォームコンテナの `data-form-arg` のキー名を返します。
@@ -6173,7 +6190,7 @@ const f = class f {
6173
6190
  * @returns 宣言されている最上位のキー名
6174
6191
  */
6175
6192
  static collectDeclaredFieldKeys(e) {
6176
- return f.collectDeclaredKeysInFragment(e);
6193
+ return h.collectDeclaredKeysInFragment(e);
6177
6194
  }
6178
6195
  /**
6179
6196
  * フラグメントの配下で収集対象として**宣言されている**最上位のキー名を列挙します。
@@ -6185,7 +6202,7 @@ const f = class f {
6185
6202
  * @returns 宣言されている最上位のキー名
6186
6203
  */
6187
6204
  static collectDeclaredKeysInFragment(e) {
6188
- const t = /* @__PURE__ */ new Set(), r = e.getTarget(), i = f.resolveFieldName(e);
6205
+ const t = /* @__PURE__ */ new Set(), r = e.getTarget(), i = h.resolveFieldName(e);
6189
6206
  i && t.add(String(i));
6190
6207
  const n = `${l.prefix}form-object`, s = `${l.prefix}form-list`, a = r.getAttribute(n) ?? r.getAttribute(s);
6191
6208
  if (a)
@@ -6215,7 +6232,7 @@ const f = class f {
6215
6232
  */
6216
6233
  static applyCustomValidity(e) {
6217
6234
  const t = `${l.prefix}validity`, r = (i) => {
6218
- i.hasAttribute(t) && f.applyOneCustomValidity(i, t), i.getChildElementFragments().forEach(r);
6235
+ i.hasAttribute(t) && h.applyOneCustomValidity(i, t), i.getChildElementFragments().forEach(r);
6219
6236
  };
6220
6237
  r(e);
6221
6238
  }
@@ -6240,19 +6257,19 @@ const f = class f {
6240
6257
  r.setCustomValidity("");
6241
6258
  return;
6242
6259
  }
6243
- const n = f.buildConditionScope(e), s = ee.evaluateDetailed(
6244
- f.unwrapConditionExpression(i),
6260
+ const n = h.buildConditionScope(e), s = ee.evaluateDetailed(
6261
+ h.unwrapConditionExpression(i),
6245
6262
  n
6246
6263
  );
6247
6264
  if (s.unresolvedReference) {
6248
6265
  m.warn(
6249
6266
  "Haori",
6250
6267
  `${t} の参照が解決できないため無効として扱います: ${i}`
6251
- ), r.setCustomValidity(f.resolveValidityMessage(e));
6268
+ ), r.setCustomValidity(h.resolveValidityMessage(e));
6252
6269
  return;
6253
6270
  }
6254
6271
  r.setCustomValidity(
6255
- s.value ? "" : f.resolveValidityMessage(e)
6272
+ s.value ? "" : h.resolveValidityMessage(e)
6256
6273
  );
6257
6274
  }
6258
6275
  /**
@@ -6314,7 +6331,7 @@ const f = class f {
6314
6331
  * @param identifiesItems リストキーで収集先の配列要素を識別できるかどうか
6315
6332
  */
6316
6333
  static registerCollectedRowIdentity(e, t, r, i) {
6317
- f.COLLECTED_ROW_IDENTITY.set(e, { keyArg: t, keys: r, identifiesItems: i });
6334
+ h.COLLECTED_ROW_IDENTITY.set(e, { keyArg: t, keys: r, identifiesItems: i });
6318
6335
  }
6319
6336
  /**
6320
6337
  * 収集値の階層に、除外されたキーの集合を結び付けます。
@@ -6323,7 +6340,7 @@ const f = class f {
6323
6340
  * @param keys 除外されたキー
6324
6341
  */
6325
6342
  static registerCollectedExcludedKeys(e, t) {
6326
- t.size > 0 && f.COLLECTED_EXCLUDED_KEYS.set(e, t);
6343
+ t.size > 0 && h.COLLECTED_EXCLUDED_KEYS.set(e, t);
6327
6344
  }
6328
6345
  /**
6329
6346
  * 収集値に控えた情報を、複製した値へ引き継ぎます。
@@ -6336,10 +6353,10 @@ const f = class f {
6336
6353
  * @param to 複製した値
6337
6354
  */
6338
6355
  static carryCollectedRowIdentity(e, t) {
6339
- const r = f.COLLECTED_ROW_IDENTITY.get(e);
6340
- r && f.COLLECTED_ROW_IDENTITY.set(t, r);
6341
- const i = f.COLLECTED_EXCLUDED_KEYS.get(e);
6342
- i && f.COLLECTED_EXCLUDED_KEYS.set(t, i);
6356
+ const r = h.COLLECTED_ROW_IDENTITY.get(e);
6357
+ r && h.COLLECTED_ROW_IDENTITY.set(t, r);
6358
+ const i = h.COLLECTED_EXCLUDED_KEYS.get(e);
6359
+ i && h.COLLECTED_EXCLUDED_KEYS.set(t, i);
6343
6360
  }
6344
6361
  /**
6345
6362
  * 行の対応付けが出現順へ退いたことを、開発モードで一度だけ知らせます。
@@ -6351,7 +6368,7 @@ const f = class f {
6351
6368
  * @param reason 退いた理由
6352
6369
  */
6353
6370
  static warnPositionalRowFallback(e) {
6354
- !q.isEnabled() || f.warnedPositionalRowFallbacks.has(e) || (f.warnedPositionalRowFallbacks.add(e), m.warn(
6371
+ !q.isEnabled() || h.warnedPositionalRowFallbacks.has(e) || (h.warnedPositionalRowFallbacks.add(e), m.warn(
6355
6372
  "[Haori]",
6356
6373
  `${l.prefix}form-list の行を出現順で対応付けます(${e})。配列と画面の行数・並びが一致していない場合、行の値を取り違えます。`
6357
6374
  ));
@@ -6374,7 +6391,7 @@ const f = class f {
6374
6391
  if (!q.isEnabled() || e.getRawAttribute(`${l.prefix}each-key`) !== null)
6375
6392
  return;
6376
6393
  const t = e.getRawAttribute(`${l.prefix}each`);
6377
- t === null || f.resolveLeadingPath(t) !== null || f.warnedDerivedRowsWithoutKey.has(t) || (f.warnedDerivedRowsWithoutKey.add(t), m.warn(
6394
+ t === null || h.resolveLeadingPath(t) !== null || h.warnedDerivedRowsWithoutKey.has(t) || (h.warnedDerivedRowsWithoutKey.add(t), m.warn(
6378
6395
  "[Haori]",
6379
6396
  `${l.prefix}each="${t}" の一覧を ${l.prefix}form-list で収集していますが、${l.prefix}each-key がありません。行と配列要素を出現順で対応付けるため、画面に出ていない要素があると行の値を取り違えます。${l.prefix}each-key を宣言してください。`
6380
6397
  ));
@@ -6412,8 +6429,8 @@ const f = class f {
6412
6429
  static mergeCollectedValues(e, t) {
6413
6430
  const r = { ...e ?? {} };
6414
6431
  for (const [n, s] of Object.entries(t))
6415
- f.UNSAFE_MERGE_KEYS.has(n) || (r[n] = f.overlayCollectedValue(e?.[n], s));
6416
- const i = f.COLLECTED_EXCLUDED_KEYS.get(t);
6432
+ h.UNSAFE_MERGE_KEYS.has(n) || (r[n] = h.overlayCollectedValue(e?.[n], s));
6433
+ const i = h.COLLECTED_EXCLUDED_KEYS.get(t);
6417
6434
  if (i)
6418
6435
  for (const n of i)
6419
6436
  n in t || delete r[n];
@@ -6430,13 +6447,13 @@ const f = class f {
6430
6447
  if (Array.isArray(t)) {
6431
6448
  if (!Array.isArray(e))
6432
6449
  return t;
6433
- const n = f.overlayIdentifiedRows(e, t);
6450
+ const n = h.overlayIdentifiedRows(e, t);
6434
6451
  return n !== null ? n : t.map(
6435
- (s, a) => f.overlayCollectedValue(e[a], s)
6452
+ (s, a) => h.overlayCollectedValue(e[a], s)
6436
6453
  );
6437
6454
  }
6438
- const r = f.asPlainRecord(t), i = f.asPlainRecord(e);
6439
- return r === null || i === null ? t : f.mergeCollectedValues(i, r);
6455
+ const r = h.asPlainRecord(t), i = h.asPlainRecord(e);
6456
+ return r === null || i === null ? t : h.mergeCollectedValues(i, r);
6440
6457
  }
6441
6458
  /**
6442
6459
  * 式の先頭にある素の経路を返します。
@@ -6454,7 +6471,7 @@ const f = class f {
6454
6471
  * @returns 先頭の経路。経路として読めない場合は null
6455
6472
  */
6456
6473
  static resolveLeadingPath(e) {
6457
- const t = f.LEADING_PATH_PATTERN.exec(e);
6474
+ const t = h.LEADING_PATH_PATTERN.exec(e);
6458
6475
  if (!t)
6459
6476
  return null;
6460
6477
  const r = t[2].trim();
@@ -6491,7 +6508,7 @@ const f = class f {
6491
6508
  const r = e.getRawAttribute(`${l.prefix}each`);
6492
6509
  if (typeof r != "string" || r.trim() === "")
6493
6510
  return !0;
6494
- const i = f.resolveLeadingPath(r);
6511
+ const i = h.resolveLeadingPath(r);
6495
6512
  if (i === null)
6496
6513
  return !0;
6497
6514
  const n = i.split(".");
@@ -6546,7 +6563,7 @@ const f = class f {
6546
6563
  const i = e.map((s) => s.getListKey());
6547
6564
  if (i.some((s) => s === null))
6548
6565
  return null;
6549
- const n = f.createRowKeyIndexes(t, r);
6566
+ const n = h.createRowKeyIndexes(t, r);
6550
6567
  return i.map((s) => {
6551
6568
  const a = n.get(s);
6552
6569
  return !a || a.length === 0 ? null : t[a.shift()];
@@ -6576,22 +6593,22 @@ const f = class f {
6576
6593
  * @returns 重ね合わせた配列。対応付けができない場合は null(出現順へ退く)
6577
6594
  */
6578
6595
  static overlayIdentifiedRows(e, t) {
6579
- const r = f.COLLECTED_ROW_IDENTITY.get(t);
6596
+ const r = h.COLLECTED_ROW_IDENTITY.get(t);
6580
6597
  if (r && !r.identifiesItems)
6581
6598
  return null;
6582
6599
  if (!r)
6583
- return t.some((s) => f.asPlainRecord(s) !== null) && f.warnPositionalRowFallback("識別情報が引き継がれていません"), null;
6600
+ return t.some((s) => h.asPlainRecord(s) !== null) && h.warnPositionalRowFallback("識別情報が引き継がれていません"), null;
6584
6601
  if (r.keys.length !== t.length)
6585
- return f.warnPositionalRowFallback("収集後に行の数が変わっています"), null;
6602
+ return h.warnPositionalRowFallback("収集後に行の数が変わっています"), null;
6586
6603
  if (r.keys.some((s) => s === null))
6587
6604
  return null;
6588
- const i = f.createRowKeyIndexes(e, r.keyArg), n = e.slice();
6605
+ const i = h.createRowKeyIndexes(e, r.keyArg), n = e.slice();
6589
6606
  for (let s = 0; s < t.length; s += 1) {
6590
6607
  const a = r.keys[s], o = i.get(a);
6591
6608
  if (!o || o.length === 0)
6592
6609
  continue;
6593
6610
  const c = o.shift();
6594
- n[c] = f.overlayCollectedValue(
6611
+ n[c] = h.overlayCollectedValue(
6595
6612
  e[c],
6596
6613
  t[s]
6597
6614
  );
@@ -6614,11 +6631,11 @@ const f = class f {
6614
6631
  */
6615
6632
  static syncAncestorArgForms(e, t, r = null) {
6616
6633
  const i = [];
6617
- for (const { form: n, key: s } of f.collectArgForms(e)) {
6634
+ for (const { form: n, key: s } of h.collectArgForms(e)) {
6618
6635
  if (n.wasResetAfter(t))
6619
6636
  continue;
6620
- const a = f.resolveAncestorArgOwner(n, s);
6621
- !a || a.owner !== e || i.push(f.pushAncestorArgValue(n, s, a.value, r));
6637
+ const a = h.resolveAncestorArgOwner(n, s);
6638
+ !a || a.owner !== e || i.push(h.pushAncestorArgValue(n, s, a.value, r));
6622
6639
  }
6623
6640
  return Promise.all(i).then(() => {
6624
6641
  });
@@ -6656,13 +6673,13 @@ const f = class f {
6656
6673
  * @returns 反映完了の Promise
6657
6674
  */
6658
6675
  static pushAncestorArgValue(e, t, r, i = null) {
6659
- const n = e.getTarget(), s = f.createArgValueSignature(r);
6676
+ const n = e.getTarget(), s = h.createArgValueSignature(r);
6660
6677
  if (s !== null) {
6661
- if (f.LAST_ANCESTOR_ARG_VALUES.get(n) === s)
6678
+ if (h.LAST_ANCESTOR_ARG_VALUES.get(n) === s)
6662
6679
  return Promise.resolve();
6663
- f.LAST_ANCESTOR_ARG_VALUES.set(n, s);
6680
+ h.LAST_ANCESTOR_ARG_VALUES.set(n, s);
6664
6681
  } else
6665
- f.LAST_ANCESTOR_ARG_VALUES.delete(n);
6682
+ h.LAST_ANCESTOR_ARG_VALUES.delete(n);
6666
6683
  const a = e.getRawBindingData();
6667
6684
  if (a && Object.prototype.hasOwnProperty.call(a, t)) {
6668
6685
  const o = { ...a };
@@ -6671,7 +6688,7 @@ const f = class f {
6671
6688
  sequence: i?.sequence ?? D.nextSequence()
6672
6689
  });
6673
6690
  }
6674
- return f.syncValues(e, r, !1, i);
6691
+ return h.syncValues(e, r, !1, i);
6675
6692
  }
6676
6693
  /**
6677
6694
  * 流し込み済み判定に使う値の署名を作ります。
@@ -6710,23 +6727,23 @@ const f = class f {
6710
6727
  });
6711
6728
  const r = [];
6712
6729
  for (const i of t) {
6713
- if (f.INITIAL_RESTORED_FORMS.has(i))
6730
+ if (h.INITIAL_RESTORED_FORMS.has(i))
6714
6731
  continue;
6715
6732
  const n = M.get(i);
6716
6733
  if (!(n instanceof D))
6717
6734
  continue;
6718
- const s = n.getRawBindingData(), a = n.getAttribute(`${l.prefix}form-arg`), o = a ? String(a) : null, c = o !== null && !(s && Object.prototype.hasOwnProperty.call(s, o)) ? f.resolveAncestorArgOwner(n, o) : null;
6735
+ const s = n.getRawBindingData(), a = n.getAttribute(`${l.prefix}form-arg`), o = a ? String(a) : null, c = o !== null && !(s && Object.prototype.hasOwnProperty.call(s, o)) ? h.resolveAncestorArgOwner(n, o) : null;
6719
6736
  if (!(!s && !c)) {
6720
- if (f.INITIAL_RESTORED_FORMS.add(i), c) {
6737
+ if (h.INITIAL_RESTORED_FORMS.add(i), c) {
6721
6738
  r.push(
6722
- f.pushAncestorArgValue(n, o, c.value)
6739
+ h.pushAncestorArgValue(n, o, c.value)
6723
6740
  );
6724
6741
  continue;
6725
6742
  }
6726
6743
  r.push(
6727
- f.syncValues(
6744
+ h.syncValues(
6728
6745
  n,
6729
- f.resolveSyncValues(n, s)
6746
+ h.resolveSyncValues(n, s)
6730
6747
  )
6731
6748
  );
6732
6749
  }
@@ -6761,9 +6778,9 @@ const f = class f {
6761
6778
  */
6762
6779
  static collectGroupSelection(e, t, r) {
6763
6780
  const i = [];
6764
- f.collectGroupMembers(
6765
- f.resolveCollectionScope(e),
6766
- String(f.resolveFieldName(e)),
6781
+ h.collectGroupMembers(
6782
+ h.resolveCollectionScope(e),
6783
+ String(h.resolveFieldName(e)),
6767
6784
  i
6768
6785
  );
6769
6786
  let n = !1;
@@ -6773,9 +6790,9 @@ const f = class f {
6773
6790
  const o = a.getTarget();
6774
6791
  o instanceof HTMLInputElement && o.checked && s.push(o.value);
6775
6792
  }
6776
- return t ? { edited: n, value: f.markCompleteSet(s) } : s.length === 0 ? { edited: n, value: null } : {
6793
+ return t ? { edited: n, value: h.markCompleteSet(s) } : s.length === 0 ? { edited: n, value: null } : {
6777
6794
  edited: n,
6778
- value: s.length === 1 ? s[0] : f.markCompleteSet(s)
6795
+ value: s.length === 1 ? s[0] : h.markCompleteSet(s)
6779
6796
  };
6780
6797
  }
6781
6798
  /**
@@ -6790,7 +6807,7 @@ const f = class f {
6790
6807
  * @returns 新しい階層を始める場合は true
6791
6808
  */
6792
6809
  static startsCollectionLevel(e) {
6793
- return f.resolveFieldName(e) ? !1 : !!(e.getAttribute(`${l.prefix}form-object`) || e.getAttribute(`${l.prefix}form-list`));
6810
+ return h.resolveFieldName(e) ? !1 : !!(e.getAttribute(`${l.prefix}form-object`) || e.getAttribute(`${l.prefix}form-list`));
6794
6811
  }
6795
6812
  /**
6796
6813
  * 収集値の階層(同じキーの集まる範囲)となるフラグメントを解決します。
@@ -6811,9 +6828,9 @@ const f = class f {
6811
6828
  static resolveCollectionScope(e) {
6812
6829
  let t = e, r = t.getParent();
6813
6830
  for (; r !== null; ) {
6814
- if (f.startsCollectionLevel(r))
6831
+ if (h.startsCollectionLevel(r))
6815
6832
  return r.getAttribute(`${l.prefix}form-object`) ? r : t;
6816
- if (f.isFormScopeRoot(r))
6833
+ if (h.isFormScopeRoot(r))
6817
6834
  return r;
6818
6835
  t = r, r = r.getParent();
6819
6836
  }
@@ -6846,11 +6863,11 @@ const f = class f {
6846
6863
  * @param members 集める先
6847
6864
  */
6848
6865
  static collectGroupMembers(e, t, r) {
6849
- f.isGroupedCheckable(e) && String(f.resolveFieldName(e)) === t && r.push(e);
6866
+ h.isGroupedCheckable(e) && String(h.resolveFieldName(e)) === t && r.push(e);
6850
6867
  for (const i of e.getChildElementFragments())
6851
- f.startsCollectionLevel(i) || i.hasAttribute(`${l.prefix}form-detach`) || // `data-if-false` は hide() が DOM へ直接付与するため実 DOM 属性を見る
6868
+ h.startsCollectionLevel(i) || i.hasAttribute(`${l.prefix}form-detach`) || // `data-if-false` は hide() が DOM へ直接付与するため実 DOM 属性を見る
6852
6869
  // (`getPartValues()` と同じ理由)。
6853
- i.getTarget().hasAttribute(`${l.prefix}if-false`) || f.collectGroupMembers(i, t, r);
6870
+ i.getTarget().hasAttribute(`${l.prefix}if-false`) || h.collectGroupMembers(i, t, r);
6854
6871
  }
6855
6872
  /**
6856
6873
  * 「集合として完結した値」として印を付けます。
@@ -6864,7 +6881,7 @@ const f = class f {
6864
6881
  * @returns 同じ配列
6865
6882
  */
6866
6883
  static markCompleteSet(e) {
6867
- return f.COMPLETE_SET_VALUES.add(e), e;
6884
+ return h.COMPLETE_SET_VALUES.add(e), e;
6868
6885
  }
6869
6886
  /**
6870
6887
  * 「集合として完結した値」の印が付いているかを返します。
@@ -6877,7 +6894,7 @@ const f = class f {
6877
6894
  * @returns 印が付いていれば true
6878
6895
  */
6879
6896
  static isCompleteSetValue(e) {
6880
- return e !== null && typeof e == "object" && f.COMPLETE_SET_VALUES.has(e);
6897
+ return e !== null && typeof e == "object" && h.COMPLETE_SET_VALUES.has(e);
6881
6898
  }
6882
6899
  /**
6883
6900
  * 値による上書きをグループ単位で扱うべき入力要素(boolean 型でない
@@ -6929,37 +6946,37 @@ const f = class f {
6929
6946
  const o = [];
6930
6947
  if (e.hasAttribute(`${l.prefix}form-detach`) && !r)
6931
6948
  return Promise.resolve();
6932
- const c = f.resolveFieldName(e), u = e.getAttribute(`${l.prefix}form-object`), d = e.getAttribute(`${l.prefix}form-list`), p = e.hasAttribute(`${l.prefix}form-list`);
6949
+ const c = h.resolveFieldName(e), u = e.getAttribute(`${l.prefix}form-object`), d = e.getAttribute(`${l.prefix}form-list`), p = e.hasAttribute(`${l.prefix}form-list`);
6933
6950
  if (c) {
6934
- const g = t[String(c)], E = n && f.hasResolvedDeclarativeState(e), A = n && typeof g > "u" && !f.isDeclarativeStateBound(e);
6951
+ const g = t[String(c)], E = n && h.hasResolvedDeclarativeState(e), A = n && typeof g > "u" && !h.isDeclarativeStateBound(e);
6935
6952
  let I = g;
6936
- if (E ? I = void 0 : A && (I = null), f.isFileInput(e))
6953
+ if (E ? I = void 0 : A && (I = null), h.isFileInput(e))
6937
6954
  return (I === null || I === "") && o.push(
6938
- f.applyFragmentValue(e, null, i, a)
6955
+ h.applyFragmentValue(e, null, i, a)
6939
6956
  ), Promise.all(o).then(() => {
6940
6957
  });
6941
6958
  if (p && Array.isArray(I) && // チェックボックスグループと複数選択 select は配列そのものを状態として
6942
6959
  // 解釈する(後続の分岐)。位置で配ると選択状態を決められないため、
6943
6960
  // `data-form-list` を併記していても従来どおりそちらへ渡す。
6944
- !f.isGroupedCheckable(e) && !f.isMultipleSelect(e)) {
6945
- const k = String(c), W = s.get(k) ?? 0;
6946
- s.set(k, W + 1), o.push(
6947
- f.applyFragmentValue(
6961
+ !h.isGroupedCheckable(e) && !h.isMultipleSelect(e)) {
6962
+ const C = String(c), W = s.get(C) ?? 0;
6963
+ s.set(C, W + 1), o.push(
6964
+ h.applyFragmentValue(
6948
6965
  e,
6949
6966
  I[W] ?? null,
6950
6967
  i,
6951
6968
  a
6952
6969
  )
6953
6970
  );
6954
- } else typeof I > "u" || (Array.isArray(I) && f.isGroupedCheckable(e) || Array.isArray(I) && f.isMultipleSelect(e) || typeof I == "string" || typeof I == "number" || typeof I == "boolean" || I === null ? o.push(
6955
- f.applyFragmentValue(
6971
+ } else typeof I > "u" || (Array.isArray(I) && h.isGroupedCheckable(e) || Array.isArray(I) && h.isMultipleSelect(e) || typeof I == "string" || typeof I == "number" || typeof I == "boolean" || I === null ? o.push(
6972
+ h.applyFragmentValue(
6956
6973
  e,
6957
6974
  I,
6958
6975
  i,
6959
6976
  a
6960
6977
  )
6961
6978
  ) : o.push(
6962
- f.applyFragmentValue(e, String(I), i, a)
6979
+ h.applyFragmentValue(e, String(I), i, a)
6963
6980
  ));
6964
6981
  } else if (u) {
6965
6982
  const g = t[String(u)];
@@ -6967,7 +6984,7 @@ const f = class f {
6967
6984
  const E = /* @__PURE__ */ new Map();
6968
6985
  for (const A of e.getChildElementFragments())
6969
6986
  o.push(
6970
- f.setPartValues(
6987
+ h.setPartValues(
6971
6988
  A,
6972
6989
  g,
6973
6990
  r,
@@ -6981,18 +6998,18 @@ const f = class f {
6981
6998
  } else if (d) {
6982
6999
  const g = t[String(d)];
6983
7000
  if (Array.isArray(g)) {
6984
- const E = e.getChildElementFragments(), A = e.getAttribute(`${l.prefix}each-key`), I = f.isCollectedListFromEachSource(e) ? f.pairRowsWithItems(
7001
+ const E = e.getChildElementFragments(), A = e.getAttribute(`${l.prefix}each-key`), I = h.isCollectedListFromEachSource(e) ? h.pairRowsWithItems(
6985
7002
  E,
6986
7003
  g,
6987
7004
  A == null ? null : String(A)
6988
7005
  ) : null;
6989
- for (let k = 0; k < E.length; k++) {
6990
- const W = E[k], N = I ? I[k] : g.length > k ? g[k] : null;
7006
+ for (let C = 0; C < E.length; C++) {
7007
+ const W = E[C], x = I ? I[C] : g.length > C ? g[C] : null;
6991
7008
  o.push(
6992
7009
  // 行ごとに values が切り替わるので出現位置も行単位で数える。
6993
- f.setPartValues(
7010
+ h.setPartValues(
6994
7011
  W,
6995
- f.asPlainRecord(N) ?? {},
7012
+ h.asPlainRecord(x) ?? {},
6996
7013
  r,
6997
7014
  i,
6998
7015
  n,
@@ -7005,7 +7022,7 @@ const f = class f {
7005
7022
  } else
7006
7023
  for (const g of e.getChildElementFragments())
7007
7024
  o.push(
7008
- f.setPartValues(
7025
+ h.setPartValues(
7009
7026
  g,
7010
7027
  t,
7011
7028
  r,
@@ -7034,46 +7051,46 @@ const f = class f {
7034
7051
  * @returns すべての初期化処理が完了するPromise
7035
7052
  */
7036
7053
  static async reset(e, t = D.nextSequence()) {
7037
- const r = f.collectBindingTargetForms(e);
7054
+ const r = h.collectBindingTargetForms(e);
7038
7055
  if (r.length > 0 && r.every((n) => n.isSupplyStale(t)))
7039
7056
  return;
7040
- f.markResetSubtree(e, t), L.clearUserEditMarks(e, t), f.clearValues(e), await Promise.all([
7041
- f.clearMessages(e),
7042
- f.clearEachClones(e)
7057
+ h.markResetSubtree(e, t), L.clearUserEditMarks(e, t), h.clearValues(e), await Promise.all([
7058
+ h.clearMessages(e),
7059
+ h.clearEachClones(e)
7043
7060
  ]), await G.enqueue(() => {
7044
- const n = f.collectEditsAfter(
7061
+ const n = h.collectEditsAfter(
7045
7062
  e,
7046
7063
  t
7047
7064
  ), s = e.getTarget();
7048
- s instanceof HTMLFormElement ? s.reset() : (s.querySelectorAll("form").forEach((a) => a.reset()), f.restoreDefaultValues(s)), f.clearDeclarativeStateFromDom(e), f.restoreEdits(n);
7065
+ s instanceof HTMLFormElement ? s.reset() : (s.querySelectorAll("form").forEach((a) => a.reset()), h.restoreDefaultValues(s)), h.clearDeclarativeStateFromDom(e), h.restoreEdits(n);
7049
7066
  });
7050
7067
  const i = r;
7051
7068
  for (const n of i) {
7052
- const s = f.getInitialBindingData(n);
7069
+ const s = h.getInitialBindingData(n);
7053
7070
  s === null && n.getRawBindingData() === null || await L.setBindingData(n.getTarget(), s ?? {}, {
7054
7071
  sequence: t
7055
7072
  });
7056
7073
  }
7057
- f.syncValuesFromDom(e), await L.evaluateAll(e);
7074
+ h.syncValuesFromDom(e), await L.evaluateAll(e);
7058
7075
  for (const n of i)
7059
- f.getInitialBindingData(n) !== null || n.getRawBindingData() !== null || await f.restoreAncestorArgValues(n, {
7076
+ h.getInitialBindingData(n) !== null || n.getRawBindingData() !== null || await h.restoreAncestorArgValues(n, {
7060
7077
  sequence: t,
7061
7078
  kind: "supply"
7062
7079
  });
7063
7080
  for (const n of i) {
7064
- const s = f.getInitialBindingData(n);
7081
+ const s = h.getInitialBindingData(n);
7065
7082
  if (n.getRawBindingData() === null && s === null)
7066
7083
  continue;
7067
- const a = f.getValues(n), o = n.getAttribute(`${l.prefix}form-arg`);
7084
+ const a = h.getValues(n), o = n.getAttribute(`${l.prefix}form-arg`);
7068
7085
  let c = { ...s || {} };
7069
7086
  if (o) {
7070
7087
  const u = String(o);
7071
- !Object.prototype.hasOwnProperty.call(s ?? {}, u) && f.resolveAncestorArgOwner(n, u) !== null || (c[u] = f.mergeCollectedValues(
7088
+ !Object.prototype.hasOwnProperty.call(s ?? {}, u) && h.resolveAncestorArgOwner(n, u) !== null || (c[u] = h.mergeCollectedValues(
7072
7089
  c[u] ?? null,
7073
7090
  a
7074
7091
  ));
7075
7092
  } else
7076
- c = f.mergeCollectedValues(c, a);
7093
+ c = h.mergeCollectedValues(c, a);
7077
7094
  await L.setBindingData(n.getTarget(), c, {
7078
7095
  sequence: t
7079
7096
  });
@@ -7098,7 +7115,7 @@ const f = class f {
7098
7115
  const t = e.getTarget();
7099
7116
  (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) && e.syncValue();
7100
7117
  for (const r of e.getChildElementFragments())
7101
- f.syncValuesFromDom(r);
7118
+ h.syncValuesFromDom(r);
7102
7119
  }
7103
7120
  /**
7104
7121
  * リセット後にバインドデータを更新すべきフォームフラグメントを収集します。
@@ -7153,7 +7170,7 @@ const f = class f {
7153
7170
  static clearValues(e) {
7154
7171
  e.clearValue();
7155
7172
  for (const t of e.getChildElementFragments())
7156
- f.clearValues(t);
7173
+ h.clearValues(t);
7157
7174
  }
7158
7175
  /**
7159
7176
  * 指定した通番より後に編集された入力欄の DOM の状態を控えます。
@@ -7177,7 +7194,7 @@ const f = class f {
7177
7194
  )
7178
7195
  }) : r.push({ element: i, value: i.value }));
7179
7196
  for (const n of e.getChildElementFragments())
7180
- f.collectEditsAfter(n, t, r);
7197
+ h.collectEditsAfter(n, t, r);
7181
7198
  return r;
7182
7199
  }
7183
7200
  /**
@@ -7219,8 +7236,8 @@ const f = class f {
7219
7236
  const r = e.getAttribute(`${l.prefix}form-arg`);
7220
7237
  if (!r)
7221
7238
  return;
7222
- const i = String(r), n = f.resolveAncestorArgOwner(e, i);
7223
- n && (f.LAST_ANCESTOR_ARG_VALUES.delete(e.getTarget()), await f.pushAncestorArgValue(e, i, n.value, t));
7239
+ const i = String(r), n = h.resolveAncestorArgOwner(e, i);
7240
+ n && (h.LAST_ANCESTOR_ARG_VALUES.delete(e.getTarget()), await h.pushAncestorArgValue(e, i, n.value, t));
7224
7241
  }
7225
7242
  /**
7226
7243
  * 初期化の通番を部分木のすべてのフラグメントへ記録します。
@@ -7236,7 +7253,7 @@ const f = class f {
7236
7253
  static markResetSubtree(e, t) {
7237
7254
  e.markResetAt(t), e.markSupplyApplied(t);
7238
7255
  for (const r of e.getChildElementFragments())
7239
- f.markResetSubtree(r, t);
7256
+ h.markResetSubtree(r, t);
7240
7257
  }
7241
7258
  /**
7242
7259
  * フラグメントとその子要素のメッセージをクリアします。
@@ -7259,7 +7276,7 @@ const f = class f {
7259
7276
  * @return Promise(メッセージの追加が完了したら解決される)
7260
7277
  */
7261
7278
  static addErrorMessage(e, t, r) {
7262
- return f.addMessage(e, t, r, "error");
7279
+ return h.addMessage(e, t, r, "error");
7263
7280
  }
7264
7281
  /**
7265
7282
  * キーに一致するフラグメントにレベル付きメッセージを追加します。
@@ -7272,7 +7289,7 @@ const f = class f {
7272
7289
  * @return Promise(メッセージの追加が完了したら解決される)
7273
7290
  */
7274
7291
  static addMessage(e, t, r, i) {
7275
- const n = [], s = Ye(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), c = f.findFragmentsByKey(e, t);
7292
+ const n = [], s = Ye(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), c = h.findFragmentsByKey(e, t);
7276
7293
  return c.forEach((u) => {
7277
7294
  n.push(o(u.getTarget()));
7278
7295
  }), c.length === 0 && n.push(o(e.getTarget())), Promise.all(n).then(() => {
@@ -7286,7 +7303,7 @@ const f = class f {
7286
7303
  * @returns 一致するフラグメントの配列
7287
7304
  */
7288
7305
  static findFragmentsByKey(e, t) {
7289
- return f.findFragmentByKeyParts(e, t.split("."));
7306
+ return h.findFragmentByKeyParts(e, t.split("."));
7290
7307
  }
7291
7308
  /**
7292
7309
  * 指定されたキーに一致するフラグメントを検索します。
@@ -7298,9 +7315,9 @@ const f = class f {
7298
7315
  */
7299
7316
  static findFragmentByKeyParts(e, t) {
7300
7317
  const r = [], i = t[0];
7301
- if (t.length == 1 && f.resolveFieldName(e) === i && r.push(e), e.hasAttribute(`${l.prefix}form-object`))
7318
+ if (t.length == 1 && h.resolveFieldName(e) === i && r.push(e), e.hasAttribute(`${l.prefix}form-object`))
7302
7319
  t.length > 1 && e.getAttribute(`${l.prefix}form-object`) === i && e.getChildElementFragments().forEach((s) => {
7303
- r.push(...f.findFragmentByKeyParts(s, t.slice(1)));
7320
+ r.push(...h.findFragmentByKeyParts(s, t.slice(1)));
7304
7321
  });
7305
7322
  else if (e.hasAttribute(`${l.prefix}form-list`)) {
7306
7323
  if (t.length > 1) {
@@ -7314,7 +7331,7 @@ const f = class f {
7314
7331
  else {
7315
7332
  const d = e.getChildElementFragments().filter((p) => p.hasAttribute(`${l.prefix}row`));
7316
7333
  u < d.length && r.push(
7317
- ...f.findFragmentByKeyParts(d[u], t.slice(1))
7334
+ ...h.findFragmentByKeyParts(d[u], t.slice(1))
7318
7335
  );
7319
7336
  }
7320
7337
  }
@@ -7322,7 +7339,7 @@ const f = class f {
7322
7339
  }
7323
7340
  } else
7324
7341
  e.getChildElementFragments().forEach((n) => {
7325
- r.push(...f.findFragmentByKeyParts(n, t));
7342
+ r.push(...h.findFragmentByKeyParts(n, t));
7326
7343
  });
7327
7344
  return r;
7328
7345
  }
@@ -7345,12 +7362,12 @@ const f = class f {
7345
7362
  return r ? this.getFormFragment(r) : null;
7346
7363
  }
7347
7364
  };
7348
- 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.UNSAFE_MERGE_KEYS = /* @__PURE__ */ new Set([
7365
+ h.INITIAL_RESTORED_FORMS = /* @__PURE__ */ new WeakSet(), h.LAST_ANCESTOR_ARG_VALUES = /* @__PURE__ */ new WeakMap(), h.GROUP_SCOPE_IDS = /* @__PURE__ */ new WeakMap(), h.groupScopeSequence = 0, h.UNSAFE_MERGE_KEYS = /* @__PURE__ */ new Set([
7349
7366
  "__proto__",
7350
7367
  "constructor",
7351
7368
  "prototype"
7352
- ]), 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]*)$/;
7353
- let x = f;
7369
+ ]), 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]*)$/;
7370
+ let N = h;
7354
7371
  class O {
7355
7372
  /**
7356
7373
  * カスタムイベントを発火します。
@@ -7604,7 +7621,7 @@ function It(y, e) {
7604
7621
  }
7605
7622
  });
7606
7623
  }
7607
- function Nt(y, e) {
7624
+ function xt(y, e) {
7608
7625
  const t = y.getAttribute(e);
7609
7626
  if (t === null || t === "")
7610
7627
  return null;
@@ -7633,7 +7650,7 @@ function ft(y) {
7633
7650
  const t = `${l.prefix}${e}`, r = [];
7634
7651
  document.body && r.push(document.body), document.documentElement && r.push(document.documentElement);
7635
7652
  for (const i of r) {
7636
- const n = Nt(i, t);
7653
+ const n = xt(i, t);
7637
7654
  if (n === null)
7638
7655
  continue;
7639
7656
  const s = Ft(i, t, n);
@@ -8165,7 +8182,7 @@ class ht {
8165
8182
  }
8166
8183
  }
8167
8184
  }
8168
- const xt = [
8185
+ const Nt = [
8169
8186
  "addErrorMessage",
8170
8187
  "clearMessages",
8171
8188
  "closeDialog",
@@ -8176,21 +8193,21 @@ const xt = [
8176
8193
  ], Mt = "__haoriHistoryState__", Pe = "data-haori-click-lock";
8177
8194
  function Ie() {
8178
8195
  const e = globalThis.window?.Haori;
8179
- return xt.every(
8196
+ return Nt.every(
8180
8197
  (r) => typeof e?.[r] == "function"
8181
- ) ? e : Ae;
8198
+ ) ? e : ve;
8182
8199
  }
8183
- const kt = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
8200
+ const Ct = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
8184
8201
  function Oe(y) {
8185
- return kt.has(y.toUpperCase());
8202
+ return Ct.has(y.toUpperCase());
8186
8203
  }
8187
8204
  function $t(y, e) {
8188
8205
  for (const [t, r] of Object.entries(e))
8189
8206
  r !== void 0 && (Array.isArray(r) ? r.forEach((i) => {
8190
- y.append(t, ge(i));
8191
- }) : y.append(t, ge(r)));
8207
+ y.append(t, me(i));
8208
+ }) : y.append(t, me(r)));
8192
8209
  }
8193
- function ge(y) {
8210
+ function me(y) {
8194
8211
  if (y == null)
8195
8212
  return "";
8196
8213
  if (typeof y == "object" || typeof y == "function")
@@ -8205,7 +8222,7 @@ function pt(y, e) {
8205
8222
  const t = new URL(y, window.location.href), r = new URLSearchParams(t.search);
8206
8223
  return $t(r, e), t.search = r.toString(), t.toString();
8207
8224
  }
8208
- function Ct(y) {
8225
+ function kt(y) {
8209
8226
  if (y == null)
8210
8227
  return { payload: {}, dropped: !1 };
8211
8228
  if (typeof y == "string") {
@@ -8252,14 +8269,14 @@ function gt(y, e, t) {
8252
8269
  const r = y[e];
8253
8270
  r === void 0 ? y[e] = t : Array.isArray(r) ? r.push(t) : y[e] = [r, t];
8254
8271
  }
8255
- function ue(y, e) {
8256
- if (x.isCompleteSetValue(e))
8272
+ function de(y, e) {
8273
+ if (N.isCompleteSetValue(e))
8257
8274
  return e;
8258
8275
  if (Array.isArray(e)) {
8259
8276
  const t = Array.isArray(y) ? y.slice() : [];
8260
8277
  let r = !1;
8261
8278
  return e.forEach((i, n) => {
8262
- i != null && (typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (t[n] = ue(t[n], i), r = !0));
8279
+ i != null && (typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (t[n] = de(t[n], i), r = !0));
8263
8280
  }), r ? t : y;
8264
8281
  }
8265
8282
  if (e !== null && typeof e == "object") {
@@ -8267,7 +8284,7 @@ function ue(y, e) {
8267
8284
  for (const [r, i] of Object.entries(
8268
8285
  e
8269
8286
  ))
8270
- t[r] = ue(t[r], i);
8287
+ t[r] = de(t[r], i);
8271
8288
  return t;
8272
8289
  }
8273
8290
  return e;
@@ -8286,7 +8303,7 @@ function Lt(y, e) {
8286
8303
  effectiveMethod: r,
8287
8304
  normalized: !1
8288
8305
  };
8289
- const { payload: i, dropped: n } = Ct(
8306
+ const { payload: i, dropped: n } = kt(
8290
8307
  t.body
8291
8308
  );
8292
8309
  let s = y;
@@ -8327,8 +8344,8 @@ function Bt(y) {
8327
8344
  (t) => !(t instanceof Blob) && Te(t)
8328
8345
  ) : Te(e));
8329
8346
  }
8330
- function Ne(y) {
8331
- return Be(x.getValues(y));
8347
+ function xe(y) {
8348
+ return Be(N.getValues(y));
8332
8349
  }
8333
8350
  function Be(y) {
8334
8351
  const e = (r) => {
@@ -8338,7 +8355,7 @@ function Be(y) {
8338
8355
  return "";
8339
8356
  if (Array.isArray(r)) {
8340
8357
  const i = r.map(e);
8341
- return x.carryCollectedRowIdentity(r, i), i;
8358
+ return N.carryCollectedRowIdentity(r, i), i;
8342
8359
  }
8343
8360
  if (r !== null && typeof r == "object") {
8344
8361
  const i = {};
@@ -8346,13 +8363,13 @@ function Be(y) {
8346
8363
  r
8347
8364
  ))
8348
8365
  i[n] = e(s);
8349
- return x.carryCollectedRowIdentity(r, i), i;
8366
+ return N.carryCollectedRowIdentity(r, i), i;
8350
8367
  }
8351
8368
  return r;
8352
8369
  }, t = {};
8353
8370
  for (const [r, i] of Object.entries(y))
8354
8371
  t[r] = e(i);
8355
- return x.carryCollectedRowIdentity(y, t), t;
8372
+ return N.carryCollectedRowIdentity(y, t), t;
8356
8373
  }
8357
8374
  function Ut(y, e) {
8358
8375
  const t = new Headers(
@@ -8596,8 +8613,8 @@ const b = class b {
8596
8613
  targetFragment: e
8597
8614
  }, i = t ? b.attrName(t, "if") : b.attrName(null, "if", !0);
8598
8615
  if (e.hasAttribute(i)) {
8599
- const w = e.getRawAttribute(i);
8600
- typeof w == "string" && w.trim() !== "" ? (r.conditionExpression = x.unwrapConditionExpression(w), r.conditionAttributeName = i) : m.warn(
8616
+ const R = e.getRawAttribute(i);
8617
+ typeof R == "string" && R.trim() !== "" ? (r.conditionExpression = N.unwrapConditionExpression(R), r.conditionAttributeName = i) : m.warn(
8601
8618
  "Haori",
8602
8619
  `${i} に条件式が指定されていません。`
8603
8620
  );
@@ -8617,15 +8634,15 @@ const b = class b {
8617
8634
  S,
8618
8635
  b.attrName(t, "form")
8619
8636
  );
8620
- H !== null ? r.formFragment = x.getFormFragment(
8637
+ H !== null ? r.formFragment = N.getFormFragment(
8621
8638
  M.get(H)
8622
8639
  ) : m.error(
8623
8640
  "Haori",
8624
8641
  `Form element not found: ${S} (${b.attrName(t, "form")})`
8625
8642
  );
8626
8643
  } else
8627
- r.formFragment = x.getFormFragment(e);
8628
- } else (t === "change" || t === "input") && (r.formFragment = x.getFormFragment(e), r.formFragment === null && b.isNamedInputFragment(e) && (r.selfValueFragment = e));
8644
+ r.formFragment = N.getFormFragment(e);
8645
+ } else (t === "change" || t === "input") && (r.formFragment = N.getFormFragment(e), r.formFragment === null && b.isNamedInputFragment(e) && (r.selfValueFragment = e));
8629
8646
  if (e.hasAttribute(`${l.prefix}${t}-before-run`)) {
8630
8647
  const S = e.getRawAttribute(
8631
8648
  `${l.prefix}${t}-before-run`
@@ -8643,9 +8660,9 @@ ${S}
8643
8660
  m.error("Haori", `Invalid before script: ${H}`);
8644
8661
  }
8645
8662
  }
8646
- const w = b.attrName(t, "run");
8647
- if (e.hasAttribute(w)) {
8648
- const S = String(e.getAttribute(w) ?? "");
8663
+ const R = b.attrName(t, "run");
8664
+ if (e.hasAttribute(R)) {
8665
+ const S = String(e.getAttribute(R) ?? "");
8649
8666
  let H = null;
8650
8667
  try {
8651
8668
  H = new Function(
@@ -8668,19 +8685,19 @@ ${S}
8668
8685
  }
8669
8686
  const n = b.attrName(t, "fetch"), s = e.hasAttribute(n);
8670
8687
  if (s) {
8671
- const w = e.getAttributeEvaluation(n);
8672
- w && (r.fetchHasUnresolvedReference = w.hasUnresolvedReference, r.fetchUrl = w.hasUnresolvedReference ? null : w.value);
8688
+ const R = e.getAttributeEvaluation(n);
8689
+ R && (r.fetchHasUnresolvedReference = R.hasUnresolvedReference, r.fetchUrl = R.hasUnresolvedReference ? null : R.value);
8673
8690
  }
8674
8691
  const a = {}, o = t ? b.attrName(t, "fetch-method") : b.attrName(null, "method", !0);
8675
8692
  if (e.hasAttribute(o)) {
8676
- const w = e.getAttributeEvaluation(o);
8677
- w?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : a.method = b.normalizeAttributeText(w?.value) ?? void 0;
8693
+ const R = e.getAttributeEvaluation(o);
8694
+ R?.hasUnresolvedReference ? r.fetchHasUnresolvedReference = !0 : a.method = b.normalizeAttributeText(R?.value) ?? void 0;
8678
8695
  }
8679
8696
  if (t) {
8680
- const w = b.attrName(t, "fetch-headers");
8681
- if (e.hasAttribute(w)) {
8697
+ const R = b.attrName(t, "fetch-headers");
8698
+ if (e.hasAttribute(R)) {
8682
8699
  const S = e.getRawAttribute(
8683
- w
8700
+ R
8684
8701
  );
8685
8702
  try {
8686
8703
  a.headers = L.parseDataBind(S);
@@ -8689,14 +8706,14 @@ ${S}
8689
8706
  }
8690
8707
  }
8691
8708
  } else {
8692
- const w = b.attrName(
8709
+ const R = b.attrName(
8693
8710
  null,
8694
8711
  "headers",
8695
8712
  !0
8696
8713
  );
8697
- if (e.hasAttribute(w)) {
8714
+ if (e.hasAttribute(R)) {
8698
8715
  const S = e.getRawAttribute(
8699
- w
8716
+ R
8700
8717
  );
8701
8718
  try {
8702
8719
  a.headers = L.parseDataBind(S);
@@ -8708,9 +8725,9 @@ ${S}
8708
8725
  const c = t ? b.attrName(t, "fetch-content-type") : b.attrName(null, "content-type", !0);
8709
8726
  let u = null;
8710
8727
  if (e.hasAttribute(c)) {
8711
- const w = e.getAttributeEvaluation(c);
8712
- w?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), u = b.normalizeAttributeText(
8713
- w?.value
8728
+ const R = e.getAttributeEvaluation(c);
8729
+ R?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), u = b.normalizeAttributeText(
8730
+ R?.value
8714
8731
  );
8715
8732
  }
8716
8733
  if (u !== null)
@@ -8719,8 +8736,8 @@ ${S}
8719
8736
  "Content-Type": u
8720
8737
  };
8721
8738
  else if (a.method) {
8722
- const w = a.method.toUpperCase();
8723
- if (w === "GET" || w === "HEAD" || w === "OPTIONS")
8739
+ const R = a.method.toUpperCase();
8740
+ if (R === "GET" || R === "HEAD" || R === "OPTIONS")
8724
8741
  a.headers = {
8725
8742
  ...a.headers,
8726
8743
  "Content-Type": "application/x-www-form-urlencoded"
@@ -8736,15 +8753,15 @@ ${S}
8736
8753
  Object.keys(a).length > 0 && (r.fetchOptions = a);
8737
8754
  const d = t ? b.attrName(t, "bind") : b.attrName(null, "bind", !0);
8738
8755
  if (e.hasAttribute(d)) {
8739
- const w = X.read(e, d);
8740
- if (w) {
8741
- const S = X.queryAll(w, d);
8756
+ const R = X.read(e, d);
8757
+ if (R) {
8758
+ const S = X.queryAll(R, d);
8742
8759
  S.length > 0 ? (r.bindFragments = [], S.forEach((H) => {
8743
8760
  const B = M.get(H);
8744
8761
  B && r.bindFragments.push(B);
8745
8762
  })) : m.error(
8746
8763
  "Haori",
8747
- `Bind element not found: ${w} (${d})`
8764
+ `Bind element not found: ${R} (${d})`
8748
8765
  );
8749
8766
  }
8750
8767
  }
@@ -8754,22 +8771,22 @@ ${S}
8754
8771
  ) : e.hasAttribute(E) && (r.bindArg = e.getRawAttribute(E));
8755
8772
  const A = t ? b.attrName(t, "bind-params") : b.attrName(null, "bind-params", !0);
8756
8773
  if (e.hasAttribute(A)) {
8757
- const w = e.getRawAttribute(A);
8758
- r.bindParams = w.split("&").map((S) => S.trim());
8774
+ const R = e.getRawAttribute(A);
8775
+ r.bindParams = R.split("&").map((S) => S.trim());
8759
8776
  }
8760
8777
  const I = t ? b.attrName(t, "bind-append") : b.attrName(null, "bind-append", !0);
8761
8778
  if (e.hasAttribute(I)) {
8762
- const w = e.getRawAttribute(I);
8763
- r.bindAppendParams = w.split("&").map((S) => S.trim()).filter(Boolean);
8779
+ const R = e.getRawAttribute(I);
8780
+ r.bindAppendParams = R.split("&").map((S) => S.trim()).filter(Boolean);
8764
8781
  }
8765
- const k = t ? b.attrName(t, "bind-merge") : b.attrName(null, "bind-merge", !0);
8766
- e.hasAttribute(k) && (r.bindMerge = !0);
8782
+ const C = t ? b.attrName(t, "bind-merge") : b.attrName(null, "bind-merge", !0);
8783
+ e.hasAttribute(C) && (r.bindMerge = !0);
8767
8784
  const W = t ? b.attrName(t, "bind-transform") : b.attrName(null, "bind-transform", !0);
8768
8785
  e.hasAttribute(W) && (r.bindTransform = e.getRawAttribute(W));
8769
- const N = t ? b.attrName(t, "copy-params") : null;
8770
- if (N && e.hasAttribute(N)) {
8771
- const w = e.getRawAttribute(N);
8772
- r.copyParams = w.split("&").map((S) => S.trim()).filter(Boolean);
8786
+ const x = t ? b.attrName(t, "copy-params") : null;
8787
+ if (x && e.hasAttribute(x)) {
8788
+ const R = e.getRawAttribute(x);
8789
+ r.copyParams = R.split("&").map((S) => S.trim()).filter(Boolean);
8773
8790
  }
8774
8791
  if (t) {
8775
8792
  if (e.hasAttribute(b.attrName(t, "adjust"))) {
@@ -8832,12 +8849,12 @@ ${V}
8832
8849
  ), Z = ["info", "warning", "error", "success"].includes(V);
8833
8850
  r.toastLevel = Z ? V : null;
8834
8851
  }
8835
- const w = b.attrName(t, "redirect"), S = b.attrName(t, "redirect-replace"), H = e.hasAttribute(w), B = e.hasAttribute(S);
8852
+ const R = b.attrName(t, "redirect"), S = b.attrName(t, "redirect-replace"), H = e.hasAttribute(R), B = e.hasAttribute(S);
8836
8853
  if (H && (r.redirectUrl = b.readLateAttribute(
8837
8854
  e,
8838
8855
  r,
8839
8856
  "redirect",
8840
- w
8857
+ R
8841
8858
  )), B && (r.redirectReplaceUrl = b.readLateAttribute(
8842
8859
  e,
8843
8860
  r,
@@ -8875,14 +8892,14 @@ ${V}
8875
8892
  V,
8876
8893
  b.attrName(t, "history-form")
8877
8894
  );
8878
- z !== null ? r.historyFormFragment = x.getFormFragment(
8895
+ z !== null ? r.historyFormFragment = N.getFormFragment(
8879
8896
  M.get(z)
8880
8897
  ) : m.error(
8881
8898
  "Haori",
8882
8899
  `Form element not found: ${V} (${b.attrName(t, "history-form")})`
8883
8900
  );
8884
8901
  } else
8885
- r.historyFormFragment = x.getFormFragment(e);
8902
+ r.historyFormFragment = N.getFormFragment(e);
8886
8903
  }
8887
8904
  [
8888
8905
  "reset-before",
@@ -8898,8 +8915,8 @@ ${V}
8898
8915
  return;
8899
8916
  const Z = X.read(e, z), J = [];
8900
8917
  if (Z)
8901
- X.queryAll(Z, z).forEach((ve) => {
8902
- const ce = M.get(ve);
8918
+ X.queryAll(Z, z).forEach((Se) => {
8919
+ const ce = M.get(Se);
8903
8920
  ce && J.push(ce);
8904
8921
  }), J.length === 0 && m.error("Haori", `Element not found: ${Z} (${z})`);
8905
8922
  else if (V === "open" || V === "close") {
@@ -8953,38 +8970,38 @@ ${V}
8953
8970
  }
8954
8971
  }
8955
8972
  if (!t && (e.hasAttribute(b.attrName(null, "data", !0)) && (r.dataAttrName = b.attrName(null, "data", !0)), e.hasAttribute(b.attrName(null, "form", !0)))) {
8956
- const w = X.read(
8973
+ const R = X.read(
8957
8974
  e,
8958
8975
  b.attrName(null, "form", !0)
8959
8976
  );
8960
- if (w) {
8977
+ if (R) {
8961
8978
  const S = X.query(
8962
- w,
8979
+ R,
8963
8980
  b.attrName(null, "form", !0)
8964
8981
  );
8965
- S !== null ? r.formFragment = x.getFormFragment(
8982
+ S !== null ? r.formFragment = N.getFormFragment(
8966
8983
  M.get(S)
8967
8984
  ) : m.error(
8968
8985
  "Haori",
8969
- `Form element not found: ${w} (${b.attrName(null, "fetch-form", !0)})`
8986
+ `Form element not found: ${R} (${b.attrName(null, "fetch-form", !0)})`
8970
8987
  );
8971
8988
  } else
8972
- r.formFragment = x.getFormFragment(e);
8989
+ r.formFragment = N.getFormFragment(e);
8973
8990
  }
8974
8991
  const U = t ? b.attrName(t, "fetch-state") : b.attrName(null, "state", !0);
8975
8992
  if (e.hasAttribute(U)) {
8976
- const w = X.read(e, U), S = [];
8977
- w ? (X.queryAll(w, U).forEach((B) => {
8993
+ const R = X.read(e, U), S = [];
8994
+ R ? (X.queryAll(R, U).forEach((B) => {
8978
8995
  const te = M.get(B);
8979
8996
  te && S.push(te);
8980
8997
  }), S.length === 0 && m.error(
8981
8998
  "Haori",
8982
- `Element not found: ${w} (${U})`
8999
+ `Element not found: ${R} (${U})`
8983
9000
  )) : S.push(e), S.length > 0 && (r.fetchStateFragments = S);
8984
9001
  }
8985
9002
  const K = t ? b.attrName(t, "store-clear") : b.attrName(null, "store-clear", !0);
8986
9003
  if (e.hasAttribute(K)) {
8987
- const w = e.getRawAttribute(K), S = w === null ? "" : w.trim();
9004
+ const R = e.getRawAttribute(K), S = R === null ? "" : R.trim();
8988
9005
  if (S === "")
8989
9006
  m.error(
8990
9007
  "Haori",
@@ -9097,8 +9114,8 @@ ${V}
9097
9114
  if (e === !1)
9098
9115
  return !1;
9099
9116
  try {
9100
- if (Object.keys(this.options).length === 0 || this.options.formFragment && this.validate(this.options.formFragment) === !1 || (!this.options.formFragment && this.options.targetFragment && x.warnUnvalidatedCustomValidity(
9101
- x.getFormFragment(this.options.targetFragment),
9117
+ if (Object.keys(this.options).length === 0 || this.options.formFragment && this.validate(this.options.formFragment) === !1 || (!this.options.formFragment && this.options.targetFragment && N.warnUnvalidatedCustomValidity(
9118
+ N.getFormFragment(this.options.targetFragment),
9102
9119
  `${l.prefix}${this.eventType ?? "fetch"}-form が解決できません`
9103
9120
  ), !this.evaluateExecutionCondition()))
9104
9121
  return !1;
@@ -9118,7 +9135,7 @@ ${V}
9118
9135
  return !1;
9119
9136
  this.options.resetBeforeFragments && this.options.resetBeforeFragments.length > 0 && (await Promise.all(
9120
9137
  this.options.resetBeforeFragments.map(
9121
- (p) => x.reset(p, this.operationSequence)
9138
+ (p) => N.reset(p, this.operationSequence)
9122
9139
  )
9123
9140
  ), this.captureHistorySnapshots());
9124
9141
  const r = this.prepareFetchRequest();
@@ -9143,29 +9160,29 @@ ${V}
9143
9160
  s
9144
9161
  );
9145
9162
  n = A.url;
9146
- const I = { ...A.options }, k = A.normalized ? A.requestedMethod : r.requestedMethod, W = A.effectiveMethod, N = r.transportMode === "query-get" || A.normalized, U = A.queryString ?? r.queryString;
9147
- if (N && m.info("Haori demo fetch normalization", {
9163
+ const I = { ...A.options }, C = A.normalized ? A.requestedMethod : r.requestedMethod, W = A.effectiveMethod, x = r.transportMode === "query-get" || A.normalized, U = A.queryString ?? r.queryString;
9164
+ if (x && m.info("Haori demo fetch normalization", {
9148
9165
  runtime: l.runtime,
9149
- requestedMethod: k,
9166
+ requestedMethod: C,
9150
9167
  effectiveMethod: W,
9151
9168
  transportMode: "query-get",
9152
9169
  url: n,
9153
9170
  payload: c ? i : void 0,
9154
9171
  queryString: U
9155
9172
  }), this.options.targetFragment && n) {
9156
- const K = performance.now(), w = {
9173
+ const K = performance.now(), R = {
9157
9174
  runtime: l.runtime,
9158
- requestedMethod: k,
9175
+ requestedMethod: C,
9159
9176
  effectiveMethod: W,
9160
- transportMode: N ? "query-get" : "http",
9161
- ...N ? { queryString: U } : {}
9177
+ transportMode: x ? "query-get" : "http",
9178
+ ...x ? { queryString: U } : {}
9162
9179
  };
9163
9180
  return O.fetchStart(
9164
9181
  this.options.targetFragment.getTarget(),
9165
9182
  n,
9166
9183
  I,
9167
9184
  c ? i : void 0,
9168
- w
9185
+ R
9169
9186
  ), await this.injectFetchState("loading"), await fetch(n, I).then((S) => this.handleFetchResult(
9170
9187
  S,
9171
9188
  n || void 0,
@@ -9187,25 +9204,25 @@ ${V}
9187
9204
  if ((!this.options.bindFragments || this.options.bindFragments.length === 0) && this.options.formFragment && c) {
9188
9205
  const p = this.options.formFragment, g = p.getTarget(), E = /* @__PURE__ */ new Set();
9189
9206
  e && e.appliedDisabledAttribute && this.options.targetFragment && E.add(this.options.targetFragment);
9190
- const A = p.getRawBindingData(), I = Be(i), k = p.getAttribute(`${l.prefix}form-arg`);
9207
+ const A = p.getRawBindingData(), I = Be(i), C = p.getAttribute(`${l.prefix}form-arg`);
9191
9208
  let W;
9192
- if (k) {
9209
+ if (C) {
9193
9210
  W = { ...A ?? {} };
9194
- const N = String(k), U = x.resolveAncestorArgOwner(p, N);
9195
- W[N] = x.mergeCollectedValues(
9196
- (U ? U.value : W[N]) ?? null,
9211
+ const x = String(C), U = N.resolveAncestorArgOwner(p, x);
9212
+ W[x] = N.mergeCollectedValues(
9213
+ (U ? U.value : W[x]) ?? null,
9197
9214
  I
9198
9215
  );
9199
9216
  } else
9200
- W = x.mergeCollectedValues(A, I);
9217
+ W = N.mergeCollectedValues(A, I);
9201
9218
  await L.setBindingData(g, W, {
9202
9219
  skipFragments: E,
9203
9220
  kind: "nonSupply",
9204
9221
  sequence: this.operationSequence,
9205
- editedPaths: x.collectEditedPaths(
9222
+ editedPaths: N.collectEditedPaths(
9206
9223
  p,
9207
9224
  this.operationSequence,
9208
- k ? String(k) : "",
9225
+ C ? String(C) : "",
9209
9226
  I
9210
9227
  )
9211
9228
  });
@@ -9278,7 +9295,7 @@ ${V}
9278
9295
  const n = [];
9279
9296
  n.push(this.bindResult(e)), n.push(this.adjust()), n.push(this.addRow()), n.push(this.removeRow()), n.push(this.movePrevRow()), n.push(this.moveNextRow()), await Promise.all(n), await this.injectFetchState("success", e.status, null), this.options.resetFragments && this.options.resetFragments.length > 0 && await Promise.all(
9280
9297
  this.options.resetFragments.map(
9281
- (g) => x.reset(g, this.operationSequence)
9298
+ (g) => N.reset(g, this.operationSequence)
9282
9299
  )
9283
9300
  ), await this.copy();
9284
9301
  const s = [];
@@ -9339,8 +9356,8 @@ ${V}
9339
9356
  if (E) {
9340
9357
  const I = new URLSearchParams(window.location.search).get(E);
9341
9358
  if (I !== null) {
9342
- const k = I.trim();
9343
- ht.isSafeLocalPath(k) ? g = k : m.warn(
9359
+ const C = I.trim();
9360
+ ht.isSafeLocalPath(C) ? g = C : m.warn(
9344
9361
  "Haori",
9345
9362
  `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${I}`
9346
9363
  );
@@ -9420,7 +9437,7 @@ ${V}
9420
9437
  */
9421
9438
  async handleFetchError(e) {
9422
9439
  let t = null;
9423
- this.options.formFragment ? t = this.options.formFragment : this.options.targetFragment && (t = x.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
9440
+ this.options.formFragment ? t = this.options.formFragment : this.options.targetFragment && (t = N.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
9424
9441
  const r = t ? t.getTarget() : document.body;
9425
9442
  await Ie().clearMessages(r);
9426
9443
  const i = async (a) => {
@@ -9469,7 +9486,7 @@ ${V}
9469
9486
  if (o.length === 0)
9470
9487
  return await i(`${e.status} ${e.statusText}`), n(), !1;
9471
9488
  for (const c of o)
9472
- c.key && t ? await x.addErrorMessage(t, c.key, c.message) : await i(c.message);
9489
+ c.key && t ? await N.addErrorMessage(t, c.key, c.message) : await i(c.message);
9473
9490
  return n(), !1;
9474
9491
  } catch {
9475
9492
  }
@@ -9490,11 +9507,11 @@ ${V}
9490
9507
  */
9491
9508
  validate(e) {
9492
9509
  if (this.options.valid !== !0)
9493
- return x.warnUnvalidatedCustomValidity(
9510
+ return N.warnUnvalidatedCustomValidity(
9494
9511
  e,
9495
9512
  `${l.prefix}${this.eventType ?? "fetch"}-validate の指定がありません`
9496
9513
  ), !0;
9497
- x.applyCustomValidity(e);
9514
+ N.applyCustomValidity(e);
9498
9515
  const t = this.findFirstInvalid(e);
9499
9516
  if (t === null)
9500
9517
  return !0;
@@ -9585,7 +9602,7 @@ ${V}
9585
9602
  const r = this.options.targetFragment;
9586
9603
  if (!r)
9587
9604
  return !0;
9588
- const i = this.options.conditionAttributeName ?? `${l.prefix}if`, n = x.buildConditionScope(
9605
+ const i = this.options.conditionAttributeName ?? `${l.prefix}if`, n = N.buildConditionScope(
9589
9606
  r,
9590
9607
  this.options.formFragment ?? null
9591
9608
  ), s = ee.evaluateDetailed(t, n);
@@ -9685,11 +9702,11 @@ ${V}
9685
9702
  apply: (g) => {
9686
9703
  const E = this.resolveCurrentRowItem(o, g), A = { ...E };
9687
9704
  if (i && typeof i == "object" && !Array.isArray(i)) {
9688
- const I = E[p], k = I !== null && typeof I == "object" && !Array.isArray(I) ? I : {};
9705
+ const I = E[p], C = I !== null && typeof I == "object" && !Array.isArray(I) ? I : {};
9689
9706
  A[p] = this.mergeAppendBindingData(
9690
9707
  o,
9691
9708
  i,
9692
- k
9709
+ C
9693
9710
  );
9694
9711
  } else
9695
9712
  A[p] = i;
@@ -9829,7 +9846,7 @@ ${V}
9829
9846
  t,
9830
9847
  i ? 0 : r
9831
9848
  );
9832
- const n = x.getValuesEditedAfter(
9849
+ const n = N.getValuesEditedAfter(
9833
9850
  e,
9834
9851
  i ? 0 : r
9835
9852
  );
@@ -9838,9 +9855,9 @@ ${V}
9838
9855
  const s = e.getAttribute(`${l.prefix}form-arg`);
9839
9856
  if (s) {
9840
9857
  const a = String(s), o = t[a], c = o && typeof o == "object" && !Array.isArray(o) ? o : {};
9841
- return { ...t, [a]: ue(c, n) };
9858
+ return { ...t, [a]: de(c, n) };
9842
9859
  }
9843
- return ue(t, n);
9860
+ return de(t, n);
9844
9861
  }
9845
9862
  /**
9846
9863
  * 編集可能な行へのバインドについて、送信後の編集を要素データへ上書きし直します。
@@ -9863,11 +9880,11 @@ ${V}
9863
9880
  return t;
9864
9881
  const i = this.eventType === "poll";
9865
9882
  !i && !this.twoWayCommitBind && L.clearUserEditMarks(e, r);
9866
- const n = x.getValuesEditedAfter(
9883
+ const n = N.getValuesEditedAfter(
9867
9884
  e,
9868
9885
  i ? 0 : r
9869
9886
  );
9870
- return Object.keys(n).length === 0 ? t : ue(t, n);
9887
+ return Object.keys(n).length === 0 ? t : de(t, n);
9871
9888
  }
9872
9889
  /**
9873
9890
  * 祖先へのバインドについて、配下の `data-form-arg` フォームで送信後に行われた
@@ -9885,14 +9902,14 @@ ${V}
9885
9902
  */
9886
9903
  reconcileAncestorArgFormEdits(e, t, r) {
9887
9904
  let i = t;
9888
- for (const { form: n, key: s } of x.collectArgForms(e)) {
9905
+ for (const { form: n, key: s } of N.collectArgForms(e)) {
9889
9906
  if (!Object.prototype.hasOwnProperty.call(i, s))
9890
9907
  continue;
9891
- const a = x.getValuesEditedAfter(n, r);
9908
+ const a = N.getValuesEditedAfter(n, r);
9892
9909
  if (Object.keys(a).length === 0)
9893
9910
  continue;
9894
9911
  const o = i[s], c = o && typeof o == "object" && !Array.isArray(o) ? o : {};
9895
- i = { ...i, [s]: ue(c, a) };
9912
+ i = { ...i, [s]: de(c, a) };
9896
9913
  }
9897
9914
  return i;
9898
9915
  }
@@ -9968,8 +9985,8 @@ ${V}
9968
9985
  * @returns 行の入力欄の状態を反映した要素データ
9969
9986
  */
9970
9987
  resolveCurrentRowItem(e, t) {
9971
- const r = x.getValuesEditedAfter(e, 0);
9972
- return Object.keys(r).length === 0 ? t : ue(t, r);
9988
+ const r = N.getValuesEditedAfter(e, 0);
9989
+ return Object.keys(r).length === 0 ? t : de(t, r);
9973
9990
  }
9974
9991
  /**
9975
9992
  * 行の要素データへコピーの値を反映します。
@@ -9997,7 +10014,7 @@ ${V}
9997
10014
  * @returns コピー元のデータ
9998
10015
  */
9999
10016
  resolveCopySourceData() {
10000
- return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? Ne(this.options.copySourceFragment) : { ...this.options.copySourceFragment.getRawBindingData() ?? {} } : this.options.formFragment ? Ne(this.options.formFragment) : this.options.targetFragment ? { ...this.options.targetFragment.getRawBindingData() ?? {} } : {};
10017
+ return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? xe(this.options.copySourceFragment) : { ...this.options.copySourceFragment.getRawBindingData() ?? {} } : this.options.formFragment ? xe(this.options.formFragment) : this.options.targetFragment ? { ...this.options.targetFragment.getRawBindingData() ?? {} } : {};
10001
10018
  }
10002
10019
  /**
10003
10020
  * data 属性とフォーム値を統合した送信データを作成し、未解決参照の有無を返します。
@@ -10009,8 +10026,8 @@ ${V}
10009
10026
  let t = !1;
10010
10027
  const r = this.options.formFragment ?? this.options.selfValueFragment;
10011
10028
  if (r) {
10012
- const i = x.getValues(r);
10013
- Object.assign(e, i), x.carryCollectedRowIdentity(i, e);
10029
+ const i = N.getValues(r);
10030
+ Object.assign(e, i), N.carryCollectedRowIdentity(i, e);
10014
10031
  }
10015
10032
  if (this.options.data && typeof this.options.data == "object" && Object.assign(e, this.options.data), this.options.targetFragment && this.options.dataAttrName) {
10016
10033
  const i = b.resolveDataAttributeDetailed(
@@ -10080,13 +10097,13 @@ ${V}
10080
10097
  const p = new FormData();
10081
10098
  for (const [g, E] of Object.entries(t))
10082
10099
  E == null ? p.append(g, "") : E instanceof Blob ? p.append(g, E) : Array.isArray(E) ? E.forEach((A) => {
10083
- A instanceof Blob ? p.append(g, A) : p.append(g, ge(A));
10084
- }) : p.append(g, ge(E));
10100
+ A instanceof Blob ? p.append(g, A) : p.append(g, me(A));
10101
+ }) : p.append(g, me(E));
10085
10102
  n.body = p;
10086
10103
  } else if (/application\/x-www-form-urlencoded/i.test(d)) {
10087
10104
  const p = new URLSearchParams();
10088
10105
  for (const [g, E] of Object.entries(t))
10089
- E !== void 0 && (Array.isArray(E) ? E.forEach((A) => p.append(g, ge(A))) : p.append(g, ge(E)));
10106
+ E !== void 0 && (Array.isArray(E) ? E.forEach((A) => p.append(g, me(A))) : p.append(g, me(E)));
10090
10107
  n.body = p;
10091
10108
  } else
10092
10109
  s.set("Content-Type", "application/json"), n.body = JSON.stringify(t);
@@ -10113,7 +10130,7 @@ ${V}
10113
10130
  this.options.targetFragment && this.options.historyDataAttrName ? this.historyDataSnapshot = b.resolveDataAttribute(
10114
10131
  this.options.targetFragment,
10115
10132
  this.options.historyDataAttrName
10116
- ) : this.historyDataSnapshot = void 0, this.historyFormSnapshot = this.options.historyFormFragment ? Ne(this.options.historyFormFragment) : void 0;
10133
+ ) : this.historyDataSnapshot = void 0, this.historyFormSnapshot = this.options.historyFormFragment ? xe(this.options.historyFormFragment) : void 0;
10117
10134
  }
10118
10135
  /**
10119
10136
  * history-data の評価値を取得します。
@@ -10135,7 +10152,7 @@ ${V}
10135
10152
  if (this.historyFormSnapshot !== void 0)
10136
10153
  return this.historyFormSnapshot;
10137
10154
  if (this.options.historyFormFragment)
10138
- return Ne(this.options.historyFormFragment);
10155
+ return xe(this.options.historyFormFragment);
10139
10156
  }
10140
10157
  /**
10141
10158
  * copy-params が指定されている場合は include / exclude を考慮して抽出します。
@@ -10480,7 +10497,7 @@ ${V}
10480
10497
  );
10481
10498
  continue;
10482
10499
  }
10483
- a[d] = g, o = !0, u.syncWhenUnchanged === "supply" && x.clearRowUserEditMarksForChangedKeys(u.row, g);
10500
+ a[d] = g, o = !0, u.syncWhenUnchanged === "supply" && N.clearRowUserEditMarksForChangedKeys(u.row, g);
10484
10501
  }
10485
10502
  if (!o)
10486
10503
  return;
@@ -10530,7 +10547,7 @@ ${V}
10530
10547
  * @returns 反映完了の Promise
10531
10548
  */
10532
10549
  static syncUnchangedRowValues(e, t, r) {
10533
- return r === "supply" && x.clearRowUserEditMarksForChangedKeys(e, t), x.syncRowValues(e, t);
10550
+ return r === "supply" && N.clearRowUserEditMarksForChangedKeys(e, t), N.syncRowValues(e, t);
10534
10551
  }
10535
10552
  /**
10536
10553
  * 行の要素データが同じ内容かどうかを判定します。
@@ -10817,7 +10834,7 @@ class Ht {
10817
10834
  }
10818
10835
  }
10819
10836
  }
10820
- const h = class h {
10837
+ const f = class f {
10821
10838
  /**
10822
10839
  * 遅延属性かどうか(完全名で判定)を判定します。
10823
10840
  *
@@ -10825,7 +10842,7 @@ const h = class h {
10825
10842
  * @returns 遅延属性かどうか
10826
10843
  */
10827
10844
  static isDeferredAttributeName(e) {
10828
- return h.DEFERRED_ATTRIBUTE_SUFFIXES.some(
10845
+ return f.DEFERRED_ATTRIBUTE_SUFFIXES.some(
10829
10846
  (t) => e === `${l.prefix}${t}`
10830
10847
  );
10831
10848
  }
@@ -10836,7 +10853,7 @@ const h = class h {
10836
10853
  * @returns 除外対象かどうか
10837
10854
  */
10838
10855
  static isEvaluateAllExcludedAttributeName(e) {
10839
- return h.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES.some(
10856
+ return f.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES.some(
10840
10857
  (t) => e === `${l.prefix}${t}`
10841
10858
  );
10842
10859
  }
@@ -10848,7 +10865,7 @@ const h = class h {
10848
10865
  * @returns 再評価する場合は true
10849
10866
  */
10850
10867
  static shouldReevaluateAttribute(e, t) {
10851
- return t !== null && !h.isEvaluateAllExcludedAttributeName(e) && h.ATTRIBUTE_PLACEHOLDER_REGEX.test(t);
10868
+ return t !== null && !f.isEvaluateAllExcludedAttributeName(e) && f.ATTRIBUTE_PLACEHOLDER_REGEX.test(t);
10852
10869
  }
10853
10870
  /**
10854
10871
  * data-attr-* 形式の属性名から実際に更新する属性名を取得します。
@@ -10857,7 +10874,7 @@ const h = class h {
10857
10874
  * @returns 実際の属性名。data-attr-* でない場合は null
10858
10875
  */
10859
10876
  static getAliasedAttributeName(e) {
10860
- const t = `${l.prefix}${h.ATTRIBUTE_ALIAS_SUFFIX}`;
10877
+ const t = `${l.prefix}${f.ATTRIBUTE_ALIAS_SUFFIX}`;
10861
10878
  return !e.startsWith(t) || e.length <= t.length ? null : e.slice(t.length);
10862
10879
  }
10863
10880
  /**
@@ -10870,7 +10887,7 @@ const h = class h {
10870
10887
  static isAliasedAttributeReflection(e, t) {
10871
10888
  const r = M.get(e);
10872
10889
  return r instanceof D ? r.hasAttribute(
10873
- `${l.prefix}${h.ATTRIBUTE_ALIAS_SUFFIX}${t}`
10890
+ `${l.prefix}${f.ATTRIBUTE_ALIAS_SUFFIX}${t}`
10874
10891
  ) : !1;
10875
10892
  }
10876
10893
  /**
@@ -10884,8 +10901,8 @@ const h = class h {
10884
10901
  let t = Promise.resolve();
10885
10902
  for (const r of e.getAttributeNames()) {
10886
10903
  const i = e.getRawAttribute(r);
10887
- h.shouldReevaluateAttribute(r, i) && (t = t.then(
10888
- () => h.setAttribute(e.getTarget(), r, i)
10904
+ f.shouldReevaluateAttribute(r, i) && (t = t.then(
10905
+ () => f.setAttribute(e.getTarget(), r, i)
10889
10906
  ));
10890
10907
  }
10891
10908
  return t.then(() => {
@@ -10900,7 +10917,7 @@ const h = class h {
10900
10917
  static reevaluateChildren(e) {
10901
10918
  const t = [];
10902
10919
  return e.getChildren().forEach((r) => {
10903
- r instanceof D ? t.push(h.evaluateAll(r)) : r instanceof re && t.push(h.evaluateText(r));
10920
+ r instanceof D ? t.push(f.evaluateAll(r)) : r instanceof re && t.push(f.evaluateText(r));
10904
10921
  }), Promise.all(t).then(() => {
10905
10922
  });
10906
10923
  }
@@ -10923,7 +10940,7 @@ const h = class h {
10923
10940
  */
10924
10941
  static clearUserEditMarks(e, t = D.currentSequence()) {
10925
10942
  e.clearUserEditMark(t), e.getChildren().forEach((r) => {
10926
- r instanceof D && h.clearUserEditMarks(r, t);
10943
+ r instanceof D && f.clearUserEditMarks(r, t);
10927
10944
  });
10928
10945
  }
10929
10946
  /**
@@ -10933,7 +10950,7 @@ const h = class h {
10933
10950
  * @returns 再評価状態
10934
10951
  */
10935
10952
  static getReactiveFetchState(e) {
10936
- const t = h.REACTIVE_FETCH_STATES.get(e);
10953
+ const t = f.REACTIVE_FETCH_STATES.get(e);
10937
10954
  if (t)
10938
10955
  return t;
10939
10956
  const r = {
@@ -10941,7 +10958,7 @@ const h = class h {
10941
10958
  running: !1,
10942
10959
  rerunRequested: !1
10943
10960
  };
10944
- return h.REACTIVE_FETCH_STATES.set(e, r), r;
10961
+ return f.REACTIVE_FETCH_STATES.set(e, r), r;
10945
10962
  }
10946
10963
  /**
10947
10964
  * data-import の再評価状態を取得します。
@@ -10950,7 +10967,7 @@ const h = class h {
10950
10967
  * @returns 再評価状態
10951
10968
  */
10952
10969
  static getReactiveImportState(e) {
10953
- const t = h.REACTIVE_IMPORT_STATES.get(e);
10970
+ const t = f.REACTIVE_IMPORT_STATES.get(e);
10954
10971
  if (t)
10955
10972
  return t;
10956
10973
  const r = {
@@ -10958,7 +10975,7 @@ const h = class h {
10958
10975
  running: !1,
10959
10976
  rerunRequested: !1
10960
10977
  };
10961
- return h.REACTIVE_IMPORT_STATES.set(e, r), r;
10978
+ return f.REACTIVE_IMPORT_STATES.set(e, r), r;
10962
10979
  }
10963
10980
  /**
10964
10981
  * bind 更新時に data-fetch / data-import を専用ルートで再評価します。
@@ -10971,9 +10988,9 @@ const h = class h {
10971
10988
  if (t.has(e))
10972
10989
  return Promise.resolve();
10973
10990
  const r = [];
10974
- return e.hasAttribute(`${l.prefix}validity`) && x.applyCustomValidity(e), e.hasAttribute(`${l.prefix}fetch`) && r.push(h.executeManagedFetch(e)), e.hasAttribute(`${l.prefix}import`) && r.push(h.executeManagedImport(e)), e.getChildren().forEach((i) => {
10991
+ return e.hasAttribute(`${l.prefix}validity`) && N.applyCustomValidity(e), e.hasAttribute(`${l.prefix}fetch`) && r.push(f.executeManagedFetch(e)), e.hasAttribute(`${l.prefix}import`) && r.push(f.executeManagedImport(e)), e.getChildren().forEach((i) => {
10975
10992
  i instanceof D && r.push(
10976
- h.reevaluateReactiveSpecialAttributes(i, t)
10993
+ f.reevaluateReactiveSpecialAttributes(i, t)
10977
10994
  );
10978
10995
  }), Promise.all(r).then(() => {
10979
10996
  });
@@ -10985,7 +11002,7 @@ const h = class h {
10985
11002
  * @returns 実行完了の Promise
10986
11003
  */
10987
11004
  static executeManagedFetch(e) {
10988
- const t = e.getTarget(), r = h.getReactiveFetchState(t), i = ne.resolveAutoFetchSignature(e);
11005
+ const t = e.getTarget(), r = f.getReactiveFetchState(t), i = ne.resolveAutoFetchSignature(e);
10989
11006
  if (r.running)
10990
11007
  return (i.hasUnresolvedReference || i.signature !== r.lastSignature) && (r.rerunRequested = !0), Promise.resolve();
10991
11008
  if (i.hasUnresolvedReference || i.signature === null)
@@ -10997,7 +11014,7 @@ const h = class h {
10997
11014
  return n.markReentrantBind(), n.runWithResult().then(() => {
10998
11015
  }).finally(() => {
10999
11016
  if (r.running = !1, r.rerunRequested)
11000
- return r.rerunRequested = !1, h.executeManagedFetch(e);
11017
+ return r.rerunRequested = !1, f.executeManagedFetch(e);
11001
11018
  });
11002
11019
  }
11003
11020
  /**
@@ -11007,7 +11024,7 @@ const h = class h {
11007
11024
  * @returns 実行完了の Promise
11008
11025
  */
11009
11026
  static executeManagedImport(e) {
11010
- const t = e.getTarget(), r = h.getReactiveImportState(t), i = e.getAttributeEvaluation(
11027
+ const t = e.getTarget(), r = f.getReactiveImportState(t), i = e.getAttributeEvaluation(
11011
11028
  `${l.prefix}import`
11012
11029
  ), n = i && !i.hasUnresolvedReference && typeof i.value == "string" && i.value !== "" ? i.value : null;
11013
11030
  if (r.running)
@@ -11023,10 +11040,10 @@ const h = class h {
11023
11040
  return G.enqueue(() => {
11024
11041
  t.innerHTML = a;
11025
11042
  }).then(() => {
11026
- t.removeAttribute(`${l.prefix}importing`), O.importEnd(t, n, o, s), h.adoptImportedChildren(e);
11043
+ t.removeAttribute(`${l.prefix}importing`), O.importEnd(t, n, o, s), f.adoptImportedChildren(e);
11027
11044
  const c = [];
11028
11045
  return e.getChildren().forEach((u) => {
11029
- u instanceof D ? c.push(h.scan(u.getTarget())) : u instanceof re && c.push(h.evaluateText(u));
11046
+ u instanceof D ? c.push(f.scan(u.getTarget())) : u instanceof re && c.push(f.evaluateText(u));
11030
11047
  }), Promise.all(c).then(() => {
11031
11048
  });
11032
11049
  });
@@ -11034,7 +11051,7 @@ const h = class h {
11034
11051
  t.removeAttribute(`${l.prefix}importing`), O.importError(t, n, a), m.error("[Haori]", "Failed to import HTML:", n, a);
11035
11052
  }).finally(() => {
11036
11053
  if (r.running = !1, r.rerunRequested)
11037
- return r.rerunRequested = !1, h.executeManagedImport(e);
11054
+ return r.rerunRequested = !1, f.executeManagedImport(e);
11038
11055
  });
11039
11056
  }
11040
11057
  /**
@@ -11066,7 +11083,7 @@ const h = class h {
11066
11083
  */
11067
11084
  static scan(e) {
11068
11085
  const t = M.get(e);
11069
- return t ? h.initializeElementFragment(t, !1).then(() => x.restoreInitialValues(e)).then(() => {
11086
+ return t ? f.initializeElementFragment(t, !1).then(() => N.restoreInitialValues(e)).then(() => {
11070
11087
  se.applySubtree(e);
11071
11088
  }) : Promise.resolve();
11072
11089
  }
@@ -11078,8 +11095,8 @@ const h = class h {
11078
11095
  * @returns 初期化完了の Promise
11079
11096
  */
11080
11097
  static initializeFreshEachRow(e) {
11081
- return h.initializeElementFragment(e, !0).then(() => {
11082
- h.needsScheduledEvaluateAll(e) && h.scheduleEvaluateAll(e), se.applySubtree(e.getTarget());
11098
+ return f.initializeElementFragment(e, !0).then(() => {
11099
+ f.needsScheduledEvaluateAll(e) && f.scheduleEvaluateAll(e), se.applySubtree(e.getTarget());
11083
11100
  });
11084
11101
  }
11085
11102
  /**
@@ -11090,16 +11107,16 @@ const h = class h {
11090
11107
  * @returns 初期化完了の Promise
11091
11108
  */
11092
11109
  static initializeElementFragment(e, t) {
11093
- return h.syncMountedState(e), t && e.isFreshInitializationSkippable() ? Promise.resolve() : h.initializeElementAttributes(e).then(() => {
11094
- if (h.shouldSkipChildInitialization(e, t)) {
11095
- h.refreshDerivedSubtreeSignature(e);
11110
+ return f.syncMountedState(e), t && e.isFreshInitializationSkippable() ? Promise.resolve() : f.initializeElementAttributes(e).then(() => {
11111
+ if (f.shouldSkipChildInitialization(e, t)) {
11112
+ f.refreshDerivedSubtreeSignature(e);
11096
11113
  return;
11097
11114
  }
11098
11115
  const r = [];
11099
11116
  return e.getChildren().forEach((i) => {
11100
- i instanceof D ? r.push(h.initializeElementFragment(i, t)) : i instanceof re && r.push(h.evaluateText(i));
11117
+ i instanceof D ? r.push(f.initializeElementFragment(i, t)) : i instanceof re && r.push(f.evaluateText(i));
11101
11118
  }), Promise.all(r).then(() => {
11102
- h.refreshDerivedSubtreeSignature(e);
11119
+ f.refreshDerivedSubtreeSignature(e);
11103
11120
  });
11104
11121
  });
11105
11122
  }
@@ -11129,10 +11146,10 @@ const h = class h {
11129
11146
  static initializeElementAttributes(e) {
11130
11147
  let t = Promise.resolve();
11131
11148
  const r = /* @__PURE__ */ new Set();
11132
- for (const i of h.PRIORITY_ATTRIBUTE_SUFFIXES) {
11149
+ for (const i of f.PRIORITY_ATTRIBUTE_SUFFIXES) {
11133
11150
  const n = l.prefix + i;
11134
11151
  e.hasAttribute(n) && (t = t.then(
11135
- () => h.setAttribute(
11152
+ () => f.setAttribute(
11136
11153
  e.getTarget(),
11137
11154
  n,
11138
11155
  e.getRawAttribute(n)
@@ -11140,24 +11157,24 @@ const h = class h {
11140
11157
  ), r.add(n));
11141
11158
  }
11142
11159
  for (const i of e.getAttributeNames()) {
11143
- if (r.has(i) || h.isDeferredAttributeName(i))
11160
+ if (r.has(i) || f.isDeferredAttributeName(i))
11144
11161
  continue;
11145
11162
  const n = e.getRawAttribute(i);
11146
11163
  n !== null && (t = t.then(
11147
- () => h.setAttribute(e.getTarget(), i, n)
11164
+ () => f.setAttribute(e.getTarget(), i, n)
11148
11165
  ));
11149
11166
  }
11150
- for (const i of h.DEFERRED_ATTRIBUTE_SUFFIXES) {
11167
+ for (const i of f.DEFERRED_ATTRIBUTE_SUFFIXES) {
11151
11168
  const n = l.prefix + i;
11152
11169
  e.hasAttribute(n) && (t = t.then(
11153
- () => h.setAttribute(
11170
+ () => f.setAttribute(
11154
11171
  e.getTarget(),
11155
11172
  n,
11156
11173
  e.getRawAttribute(n)
11157
11174
  )
11158
11175
  ), r.add(n));
11159
11176
  }
11160
- return t.then(() => x.prepareFormName(e));
11177
+ return t.then(() => N.prepareFormName(e));
11161
11178
  }
11162
11179
  /**
11163
11180
  * 子孫初期化をスキップすべきかどうかを返します。
@@ -11168,7 +11185,7 @@ const h = class h {
11168
11185
  */
11169
11186
  static shouldSkipChildInitialization(e, t) {
11170
11187
  const r = e.getAttribute(`${l.prefix}if`);
11171
- return e.hasAttribute(`${l.prefix}if`) && h.isHiddenIfCondition(r) ? !0 : t && e.hasAttribute(`${l.prefix}each`);
11188
+ return e.hasAttribute(`${l.prefix}if`) && f.isHiddenIfCondition(r) ? !0 : t && e.hasAttribute(`${l.prefix}each`);
11172
11189
  }
11173
11190
  /**
11174
11191
  * エレメントに属性を設定します。
@@ -11184,7 +11201,7 @@ const h = class h {
11184
11201
  * @returns Promise (DOM操作が完了したときに解決される)
11185
11202
  */
11186
11203
  static setAttribute(e, t, r, i = !1, n) {
11187
- const s = M.get(e), a = h.getAliasedAttributeName(t);
11204
+ const s = M.get(e), a = f.getAliasedAttributeName(t);
11188
11205
  if (a !== null)
11189
11206
  return r === null ? s.removeAliasedAttribute(t, a) : s.setAliasedAttribute(
11190
11207
  t,
@@ -11198,16 +11215,16 @@ const h = class h {
11198
11215
  case `${l.prefix}bind`: {
11199
11216
  if (r !== null && i && s instanceof D && s.consumeSelfWrittenBind(r))
11200
11217
  break;
11201
- const p = r === null ? {} : h.parseDataBind(r);
11218
+ const p = r === null ? {} : f.parseDataBind(r);
11202
11219
  if (i) {
11203
11220
  const g = n ?? D.nextSequence();
11204
11221
  return r === null ? (o.push(
11205
- h.setBindingData(e, p, {
11222
+ f.setBindingData(e, p, {
11206
11223
  reflectToAttribute: !1,
11207
11224
  sequence: g
11208
11225
  })
11209
11226
  ), o.push(s.removeAttribute(t))) : o.push(
11210
- h.setBindingData(e, p, {
11227
+ f.setBindingData(e, p, {
11211
11228
  sequence: g
11212
11229
  })
11213
11230
  ), Promise.all(o).then(() => {
@@ -11217,11 +11234,11 @@ const h = class h {
11217
11234
  break;
11218
11235
  }
11219
11236
  case `${l.prefix}derive`:
11220
- u = h.createDeriveInputSignature(
11237
+ u = f.createDeriveInputSignature(
11221
11238
  s,
11222
11239
  r,
11223
11240
  s.getRawAttribute(`${l.prefix}derive-name`)
11224
- ), c = h.evaluateDerive(
11241
+ ), c = f.evaluateDerive(
11225
11242
  s,
11226
11243
  r,
11227
11244
  s.getRawAttribute(`${l.prefix}derive-name`)
@@ -11229,11 +11246,11 @@ const h = class h {
11229
11246
  }));
11230
11247
  break;
11231
11248
  case `${l.prefix}derive-name`:
11232
- u = h.createDeriveInputSignature(
11249
+ u = f.createDeriveInputSignature(
11233
11250
  s,
11234
11251
  s.getRawAttribute(`${l.prefix}derive`),
11235
11252
  r
11236
- ), c = h.evaluateDerive(
11253
+ ), c = f.evaluateDerive(
11237
11254
  s,
11238
11255
  s.getRawAttribute(`${l.prefix}derive`),
11239
11256
  r
@@ -11241,23 +11258,23 @@ const h = class h {
11241
11258
  }));
11242
11259
  break;
11243
11260
  case `${l.prefix}if`:
11244
- o.push(h.evaluateIf(s));
11261
+ d = () => f.evaluateIf(s);
11245
11262
  break;
11246
11263
  case `${l.prefix}each`:
11247
- o.push(h.evaluateEach(s));
11264
+ d = () => f.evaluateEach(s);
11248
11265
  break;
11249
11266
  case `${l.prefix}fetch`:
11250
- d = () => h.executeManagedFetch(s);
11267
+ d = () => f.executeManagedFetch(s);
11251
11268
  break;
11252
11269
  case `${l.prefix}import`:
11253
- typeof r == "string" && (d = () => h.executeManagedImport(s));
11270
+ typeof r == "string" && (d = () => f.executeManagedImport(s));
11254
11271
  break;
11255
11272
  case `${l.prefix}store`:
11256
11273
  r !== null && o.push(Re.restore(s));
11257
11274
  break;
11258
11275
  case `${l.prefix}validity`:
11259
11276
  case `${l.prefix}validity-message`:
11260
- return r !== null && x.applyCustomValidity(s), Promise.all(o).then(() => {
11277
+ return r !== null && N.applyCustomValidity(s), Promise.all(o).then(() => {
11261
11278
  });
11262
11279
  case `${l.prefix}url-param`: {
11263
11280
  const p = s.getAttribute(`${l.prefix}url-arg`), g = ht.readParams();
@@ -11271,10 +11288,10 @@ const h = class h {
11271
11288
  sequence: D.nextSequence()
11272
11289
  };
11273
11290
  if (p === null)
11274
- o.push(h.setBindingData(e, g, E));
11291
+ o.push(f.setBindingData(e, g, E));
11275
11292
  else {
11276
11293
  const A = s.getRawBindingData() || {};
11277
- A[String(p)] = g, o.push(h.setBindingData(e, A, E));
11294
+ A[String(p)] = g, o.push(f.setBindingData(e, A, E));
11278
11295
  }
11279
11296
  break;
11280
11297
  }
@@ -11285,7 +11302,7 @@ const h = class h {
11285
11302
  if (c !== null)
11286
11303
  return s.setDeriveInputSignature(u), c.then((p) => {
11287
11304
  if (p)
11288
- return h.reevaluateChildren(s);
11305
+ return f.reevaluateChildren(s);
11289
11306
  });
11290
11307
  }).then(() => {
11291
11308
  });
@@ -11324,30 +11341,30 @@ const h = class h {
11324
11341
  }, d = o === "supply";
11325
11342
  d && i.markSupplyApplied(c);
11326
11343
  const p = D.currentSequence(), g = i.getRawBindingData();
11327
- d && (r.clearUserEdits ?? !0) && h.clearUserEditMarks(i, c);
11328
- const E = a ? h.resolveByPathAuthority(i, g, t, u) : t;
11344
+ d && (r.clearUserEdits ?? !0) && f.clearUserEditMarks(i, c);
11345
+ const E = a ? f.resolveByPathAuthority(i, g, t, u) : t;
11329
11346
  i.setBindingData(E), a && (O.bindChange(e, g, E, "manual"), Re.mirror(i));
11330
11347
  const A = () => {
11331
11348
  i.markBindingWorkStart();
11332
11349
  const I = i.getRawBindingData() ?? E;
11333
- let k = a ? i.setAttribute(`${l.prefix}bind`, JSON.stringify(I)) : Promise.resolve();
11334
- return e.tagName === "FORM" && (k = k.then(() => {
11350
+ let C = a ? i.setAttribute(`${l.prefix}bind`, JSON.stringify(I)) : Promise.resolve();
11351
+ return e.tagName === "FORM" && (C = C.then(() => {
11335
11352
  if (i.wasResetAfter(p))
11336
11353
  return;
11337
11354
  const W = i.getRawBindingData() ?? E;
11338
- return x.syncValues(
11355
+ return N.syncValues(
11339
11356
  i,
11340
- x.resolveSyncValues(i, W),
11357
+ N.resolveSyncValues(i, W),
11341
11358
  !1,
11342
11359
  u
11343
11360
  );
11344
- })), k = k.then(
11345
- () => x.syncAncestorArgForms(i, p, u)
11346
- ), k = k.then(() => h.evaluateAll(i, n)), k = k.then(
11361
+ })), C = C.then(
11362
+ () => N.syncAncestorArgForms(i, p, u)
11363
+ ), C = C.then(() => f.evaluateAll(i, n)), C = C.then(
11347
11364
  () => D.retryUnappliedValueWrites(e, p)
11348
- ), k = k.then(
11349
- () => h.reevaluateReactiveSpecialAttributes(i, n)
11350
- ), k.then(
11365
+ ), C = C.then(
11366
+ () => f.reevaluateReactiveSpecialAttributes(i, n)
11367
+ ), C.then(
11351
11368
  () => i.markBindingWorkEnd(),
11352
11369
  (W) => {
11353
11370
  throw i.markBindingWorkEnd(), W;
@@ -11372,14 +11389,14 @@ const h = class h {
11372
11389
  * @returns 適用を許した経路だけが `next` の値になったバインドデータ
11373
11390
  */
11374
11391
  static resolveByPathAuthority(e, t, r, i) {
11375
- const n = h.mergePathAuthority(
11392
+ const n = f.mergePathAuthority(
11376
11393
  e,
11377
11394
  t ?? {},
11378
11395
  r,
11379
11396
  i,
11380
11397
  ""
11381
11398
  );
11382
- return n === h.ABSENT_PATH ? r : n;
11399
+ return n === f.ABSENT_PATH ? r : n;
11383
11400
  }
11384
11401
  /**
11385
11402
  * 経路をたどりながら、変化した葉ごとに適用可否を判定します。
@@ -11392,7 +11409,7 @@ const h = class h {
11392
11409
  * @returns 採用した値。その経路を持たせない場合は `ABSENT_PATH`
11393
11410
  */
11394
11411
  static mergePathAuthority(e, t, r, i, n) {
11395
- if (h.isPlainRecord(t) && h.isPlainRecord(r)) {
11412
+ if (f.isPlainRecord(t) && f.isPlainRecord(r)) {
11396
11413
  const u = t, d = r, p = {};
11397
11414
  let g = Object.keys(u).some(
11398
11415
  (A) => !Object.prototype.hasOwnProperty.call(d, A)
@@ -11402,21 +11419,21 @@ const h = class h {
11402
11419
  ...Object.keys(d)
11403
11420
  ]);
11404
11421
  for (const A of E) {
11405
- const I = n === "" ? A : `${n}.${A}`, k = h.mergePathAuthority(
11422
+ const I = n === "" ? A : `${n}.${A}`, C = f.mergePathAuthority(
11406
11423
  e,
11407
- Object.prototype.hasOwnProperty.call(u, A) ? u[A] : h.ABSENT_PATH,
11408
- Object.prototype.hasOwnProperty.call(d, A) ? d[A] : h.ABSENT_PATH,
11424
+ Object.prototype.hasOwnProperty.call(u, A) ? u[A] : f.ABSENT_PATH,
11425
+ Object.prototype.hasOwnProperty.call(d, A) ? d[A] : f.ABSENT_PATH,
11409
11426
  i,
11410
11427
  I
11411
11428
  );
11412
- k !== h.ABSENT_PATH && (p[A] = k), k !== (Object.prototype.hasOwnProperty.call(d, A) ? d[A] : h.ABSENT_PATH) && (g = !0);
11429
+ C !== f.ABSENT_PATH && (p[A] = C), C !== (Object.prototype.hasOwnProperty.call(d, A) ? d[A] : f.ABSENT_PATH) && (g = !0);
11413
11430
  }
11414
11431
  return g ? p : d;
11415
11432
  }
11416
- const s = h.resolveArrayPairing(e, t, r, n);
11433
+ const s = f.resolveArrayPairing(e, t, r, n);
11417
11434
  if (s !== null) {
11418
11435
  const u = t, d = r, p = d.map(
11419
- (g, E) => h.mergePathAuthority(
11436
+ (g, E) => f.mergePathAuthority(
11420
11437
  e,
11421
11438
  u[E],
11422
11439
  g,
@@ -11426,7 +11443,7 @@ const h = class h {
11426
11443
  );
11427
11444
  return p.some((g, E) => g !== d[E]) ? p : d;
11428
11445
  }
11429
- if (h.isSameBindingValue(t, r))
11446
+ if (f.isSameBindingValue(t, r))
11430
11447
  return r;
11431
11448
  const a = i.editedPaths?.get(n), o = a === void 0 ? i.kind : "edit", c = {
11432
11449
  sequence: a ?? i.sequence,
@@ -11452,14 +11469,14 @@ const h = class h {
11452
11469
  static resolveArrayPairing(e, t, r, i) {
11453
11470
  if (!Array.isArray(t) || !Array.isArray(r) || t.length !== r.length || r.length === 0)
11454
11471
  return null;
11455
- const n = r.some((o) => h.isPlainRecord(o)) ? h.resolveEachKeyArg(e, i) : null, s = t.map(
11456
- (o, c) => h.createListKey(
11472
+ const n = r.some((o) => f.isPlainRecord(o)) ? f.resolveEachKeyArg(e, i) : null, s = t.map(
11473
+ (o, c) => f.createListKey(
11457
11474
  o,
11458
11475
  n,
11459
11476
  c
11460
11477
  )
11461
11478
  ), a = r.map(
11462
- (o, c) => h.createListKey(
11479
+ (o, c) => f.createListKey(
11463
11480
  o,
11464
11481
  n,
11465
11482
  c
@@ -11483,7 +11500,7 @@ const h = class h {
11483
11500
  static resolveEachKeyArg(e, t) {
11484
11501
  const r = `${l.prefix}each`, i = e.getTarget(), n = t.replace(/\[[^\]]*\]/g, ""), s = i.querySelectorAll(`[${r}]`);
11485
11502
  for (const a of Array.from(s)) {
11486
- const o = h.resolveEachDeclarationPath(a, i);
11503
+ const o = f.resolveEachDeclarationPath(a, i);
11487
11504
  if (o === null || o !== n)
11488
11505
  continue;
11489
11506
  const c = a.getAttribute(`${r}-key`);
@@ -11552,7 +11569,7 @@ const h = class h {
11552
11569
  static isSameBindingValue(e, t) {
11553
11570
  if (e === t)
11554
11571
  return !0;
11555
- if (e === h.ABSENT_PATH || t === h.ABSENT_PATH)
11572
+ if (e === f.ABSENT_PATH || t === f.ABSENT_PATH)
11556
11573
  return !1;
11557
11574
  try {
11558
11575
  return JSON.stringify(e) === JSON.stringify(t);
@@ -11597,7 +11614,7 @@ const h = class h {
11597
11614
  * @return 解決済みスコープと各キーの由来情報
11598
11615
  */
11599
11616
  static dumpScope(e) {
11600
- const t = h.collectScope(e);
11617
+ const t = f.collectScope(e);
11601
11618
  return q.isEnabled() && m.info("[Haori]", "scope dump for", e, t), t;
11602
11619
  }
11603
11620
  /**
@@ -11615,7 +11632,7 @@ const h = class h {
11615
11632
  if (!t)
11616
11633
  return { resolved: {}, sources: {} };
11617
11634
  const r = t.getBindingData(), i = {}, n = (c) => {
11618
- const u = c.getTarget(), d = h.resolveElementId(u);
11635
+ const u = c.getTarget(), d = f.resolveElementId(u);
11619
11636
  return d !== "" ? `#${d}` : u.tagName.toLowerCase();
11620
11637
  }, s = (c, u, d, p) => {
11621
11638
  if (c)
@@ -11666,7 +11683,7 @@ const h = class h {
11666
11683
  if (n) {
11667
11684
  if (n.getParent() === r)
11668
11685
  return;
11669
- r.insertBefore(n, i), n instanceof D ? h.scan(n.getTarget()) : n instanceof re && h.evaluateText(n);
11686
+ r.insertBefore(n, i), n instanceof D ? f.scan(n.getTarget()) : n instanceof re && f.evaluateText(n);
11670
11687
  }
11671
11688
  }
11672
11689
  /**
@@ -11707,23 +11724,23 @@ const h = class h {
11707
11724
  return Promise.resolve();
11708
11725
  const i = [];
11709
11726
  i.push(r.setValue(t));
11710
- const n = h.getFormFragment(r);
11727
+ const n = f.getFormFragment(r);
11711
11728
  if (n) {
11712
- const s = x.getValues(n), a = n.getAttribute(`${l.prefix}form-arg`), o = n.getRawBindingData();
11729
+ const s = N.getValues(n), a = n.getAttribute(`${l.prefix}form-arg`), o = n.getRawBindingData();
11713
11730
  let c;
11714
11731
  if (a) {
11715
11732
  c = { ...o ?? {} };
11716
- const u = String(a), d = x.resolveAncestorArgOwner(n, u);
11717
- c[u] = x.mergeCollectedValues(
11733
+ const u = String(a), d = N.resolveAncestorArgOwner(n, u);
11734
+ c[u] = N.mergeCollectedValues(
11718
11735
  (d ? d.value : c[u]) ?? null,
11719
11736
  s
11720
11737
  );
11721
11738
  } else
11722
- c = x.mergeCollectedValues(o, s);
11739
+ c = N.mergeCollectedValues(o, s);
11723
11740
  i.push(
11724
11741
  // 値の設定に伴うコミットなので、値の供給ではない更新として扱う(権威を
11725
11742
  // 持たず、ユーザー編集の印も解除しない)。
11726
- h.setBindingData(n.getTarget(), c, {
11743
+ f.setBindingData(n.getTarget(), c, {
11727
11744
  kind: "nonSupply",
11728
11745
  sequence: D.nextSequence()
11729
11746
  })
@@ -11742,7 +11759,7 @@ const h = class h {
11742
11759
  if (e.getTarget() instanceof HTMLFormElement)
11743
11760
  return e;
11744
11761
  const t = e.getParent();
11745
- return t ? h.getFormFragment(t) : null;
11762
+ return t ? f.getFormFragment(t) : null;
11746
11763
  }
11747
11764
  /**
11748
11765
  * フラグメントとその子要素を評価します。
@@ -11753,21 +11770,21 @@ const h = class h {
11753
11770
  static evaluateAll(e, t = /* @__PURE__ */ new Set()) {
11754
11771
  if (t.has(e))
11755
11772
  return Promise.resolve();
11756
- let r = h.reevaluateInterpolatedAttributes(e);
11773
+ let r = f.reevaluateInterpolatedAttributes(e);
11757
11774
  const i = e.hasAttribute(`${l.prefix}derive`), n = e.hasAttribute(`${l.prefix}if`), s = e.hasAttribute(`${l.prefix}each`), a = e.getRawAttribute(`${l.prefix}derive`), o = e.getRawAttribute(`${l.prefix}derive-name`);
11758
11775
  let c = !1, u = !1, d = null;
11759
11776
  if (!i && e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), !i && e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), i) {
11760
- const p = h.createDeriveInputSignature(
11777
+ const p = f.createDeriveInputSignature(
11761
11778
  e,
11762
11779
  a,
11763
11780
  o
11764
11781
  );
11765
11782
  p === null ? (e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), r = r.then(
11766
- () => h.evaluateDerive(e, a, o).then(
11783
+ () => f.evaluateDerive(e, a, o).then(
11767
11784
  () => {
11768
11785
  }
11769
11786
  )
11770
- )) : e.getDeriveInputSignature() !== p && (r = r.then(() => h.evaluateDerive(
11787
+ )) : e.getDeriveInputSignature() !== p && (r = r.then(() => f.evaluateDerive(
11771
11788
  e,
11772
11789
  a,
11773
11790
  o
@@ -11775,16 +11792,16 @@ const h = class h {
11775
11792
  e.setDeriveInputSignature(p);
11776
11793
  })));
11777
11794
  }
11778
- return n && (r = r.then(() => h.evaluateIf(e))), s ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => h.evaluateEach(e))) : n ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => {
11795
+ return n && (r = r.then(() => f.evaluateIf(e))), s ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => f.evaluateEachFixedChildren(e)).then(() => f.evaluateEach(e))) : n ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => {
11779
11796
  })) : (i && (r = r.then(() => {
11780
- if (!h.canSkipStableDerivedSubtree(e)) {
11781
- e.setDeriveSubtreeSignature(null), h.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
11797
+ if (!f.canSkipStableDerivedSubtree(e)) {
11798
+ e.setDeriveSubtreeSignature(null), f.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
11782
11799
  return;
11783
11800
  }
11784
- d = h.createDescendantBindingSignature(
11801
+ d = f.createDescendantBindingSignature(
11785
11802
  e,
11786
11803
  "evaluateAll"
11787
- ), u = !0, c = e.getDeriveSubtreeSignature() !== null && e.getDeriveSubtreeSignature() === d, h.logDerivedSubtreeProfileSnapshot(
11804
+ ), u = !0, c = e.getDeriveSubtreeSignature() !== null && e.getDeriveSubtreeSignature() === d, f.logDerivedSubtreeProfileSnapshot(
11788
11805
  e,
11789
11806
  c ? "skip-hit" : "skip-miss"
11790
11807
  );
@@ -11794,10 +11811,10 @@ const h = class h {
11794
11811
  const p = [];
11795
11812
  return e.getChildren().forEach((g) => {
11796
11813
  if (g instanceof D) {
11797
- if (h.canSkipUnchangedNestedEach(g))
11814
+ if (f.canSkipUnchangedNestedEach(g))
11798
11815
  return;
11799
- p.push(h.evaluateAll(g, t));
11800
- } else g instanceof re && p.push(h.evaluateText(g));
11816
+ p.push(f.evaluateAll(g, t));
11817
+ } else g instanceof re && p.push(f.evaluateText(g));
11801
11818
  }), Promise.all(p).then(() => {
11802
11819
  });
11803
11820
  }).then(() => {
@@ -11829,7 +11846,7 @@ const h = class h {
11829
11846
  const a = {
11830
11847
  [n]: s.value
11831
11848
  };
11832
- return h.createBindingSignature(i) === h.createBindingSignature(a) ? Promise.resolve(!1) : (e.setDerivedBindingData(a), Promise.resolve(!0));
11849
+ return f.createBindingSignature(i) === f.createBindingSignature(a) ? Promise.resolve(!1) : (e.setDerivedBindingData(a), Promise.resolve(!0));
11833
11850
  }
11834
11851
  /**
11835
11852
  * テキストフラグメントを評価します。
@@ -11875,7 +11892,7 @@ const h = class h {
11875
11892
  );
11876
11893
  return;
11877
11894
  }
11878
- const { sources: r } = h.collectScope(e.getTarget()), i = /* @__PURE__ */ new Set(), n = t.match(/[A-Za-z_$][\w$]*/g) ?? [];
11895
+ const { sources: r } = f.collectScope(e.getTarget()), i = /* @__PURE__ */ new Set(), n = t.match(/[A-Za-z_$][\w$]*/g) ?? [];
11879
11896
  let s = 0;
11880
11897
  n.forEach((o) => {
11881
11898
  const c = t.indexOf(o, s);
@@ -11892,6 +11909,61 @@ const h = class h {
11892
11909
  a
11893
11910
  );
11894
11911
  }
11912
+ /**
11913
+ * `data-each` コンテナの子のうち、行にならない固定要素かどうかを返します。
11914
+ *
11915
+ * 仕様「`data-each`」の `data-each-before` / `data-each-after`(「ループ前に表示
11916
+ * する要素をマーク」「ループ後に表示する要素をマーク」)です。テンプレートの選定
11917
+ * (`performEachUpdate`)でも同じ属性で除いています。
11918
+ *
11919
+ * @param fragment 判定する子フラグメント
11920
+ * @returns 行にならない固定要素なら true
11921
+ */
11922
+ static isEachFixedChild(e) {
11923
+ return e.hasAttribute(`${l.prefix}each-before`) || e.hasAttribute(`${l.prefix}each-after`);
11924
+ }
11925
+ /**
11926
+ * `data-each` コンテナが固定要素を持つかどうかを返します。
11927
+ *
11928
+ * 固定要素(`data-each-before` / `data-each-after`)はコンテナのスコープで評価する
11929
+ * ため、配列が同値でも一覧の外のデータの更新で描画が変わります。行と行テンプレートは
11930
+ * 行スコープで評価するため数えません。
11931
+ *
11932
+ * コンテナ直下のテキストノードは数えません。式を含むテキストは
11933
+ * `hasNonEachDynamicElementState()` がすでに拾っており、ここで重ねても落ちるテストが
11934
+ * 無いためです(`docs/ja/testing.md` の規則 3)。
11935
+ *
11936
+ * @param fragment `data-each` コンテナのフラグメント
11937
+ * @returns 固定要素があれば true
11938
+ */
11939
+ static hasEachFixedChildren(e) {
11940
+ return e.getChildren().some(
11941
+ (t) => t instanceof D && f.isEachFixedChild(t)
11942
+ );
11943
+ }
11944
+ /**
11945
+ * `data-each` コンテナの固定要素とテキストノードを再評価します。
11946
+ *
11947
+ * 行と行テンプレートは `data-each` が管理するため `evaluateAll` は each コンテナの
11948
+ * 子へ降りません。しかし固定要素(`data-each-before` / `data-each-after`)と
11949
+ * コンテナ直下のテキストノードは行ではなく、仕様「`data-each`」の「固定要素と
11950
+ * コンテナ直下のテキストノードは、行と違いコンテナのスコープで、バインドデータの
11951
+ * 更新のたびに再評価します」に従ってコンテナのスコープで再評価します。
11952
+ *
11953
+ * これが無いと、ガイドが案内している「空のリストの場合のメッセージ」
11954
+ * (`data-each-after` に `data-if="items.length === 0"` を書く形)が、配列が
11955
+ * 変わっても初期の判定のまま固定されます。
11956
+ *
11957
+ * @param fragment `data-each` コンテナのフラグメント
11958
+ * @returns 再評価完了の Promise
11959
+ */
11960
+ static evaluateEachFixedChildren(e) {
11961
+ const t = [];
11962
+ return e.getChildren().forEach((r) => {
11963
+ r instanceof D ? f.isEachFixedChild(r) && t.push(f.evaluateAll(r)) : r instanceof re && t.push(f.evaluateText(r));
11964
+ }), Promise.all(t).then(() => {
11965
+ });
11966
+ }
11895
11967
  /**
11896
11968
  * if要素を評価します。
11897
11969
  * 値が falsy(false・null・undefined・NaN・0・空文字列)の場合は非表示にし、
@@ -11902,22 +11974,26 @@ const h = class h {
11902
11974
  */
11903
11975
  static evaluateIf(e) {
11904
11976
  const t = [], r = e.getAttribute(`${l.prefix}if`);
11905
- if (h.isHiddenIfCondition(r))
11906
- q.isEnabled() && e.isVisible() && h.logFalsyIfDiagnostics(e), t.push(
11977
+ if (f.isHiddenIfCondition(r))
11978
+ q.isEnabled() && e.isVisible() && f.logFalsyIfDiagnostics(e), t.push(
11907
11979
  e.hide().then(() => {
11908
11980
  O.hide(e.getTarget());
11909
11981
  })
11910
11982
  );
11911
11983
  else {
11912
11984
  e.restoreFormControlsDisabledByIf();
11913
- const i = e.isVisible(), n = [];
11914
- e.getChildren().forEach((s) => {
11915
- s instanceof D ? n.push(
11916
- s.isMounted() ? h.evaluateAll(s) : h.scan(s.getTarget())
11917
- ) : s instanceof re && n.push(h.evaluateText(s));
11985
+ const i = e.isVisible(), n = [], s = e.hasAttribute(`${l.prefix}each`);
11986
+ e.getChildren().forEach((a) => {
11987
+ if (a instanceof D) {
11988
+ if (s && !f.isEachFixedChild(a))
11989
+ return;
11990
+ n.push(
11991
+ a.isMounted() ? f.evaluateAll(a) : f.scan(a.getTarget())
11992
+ );
11993
+ } else a instanceof re && n.push(f.evaluateText(a));
11918
11994
  }), t.push(
11919
11995
  e.show().then(() => {
11920
- O.show(e.getTarget()), i || (h.triggerLoadOnShow(e), se.refreshSubtree(e.getTarget()));
11996
+ O.show(e.getTarget()), i || (f.triggerLoadOnShow(e), se.refreshSubtree(e.getTarget()));
11921
11997
  })
11922
11998
  ), t.push(Promise.all(n).then(() => {
11923
11999
  }));
@@ -11947,8 +12023,8 @@ const h = class h {
11947
12023
  * @return 再入制御状態
11948
12024
  */
11949
12025
  static getEachUpdateState(e) {
11950
- let t = h.EACH_UPDATE_STATES.get(e);
11951
- return t || (t = { running: !1, rerunRequested: !1, settled: null }, h.EACH_UPDATE_STATES.set(e, t)), t;
12026
+ let t = f.EACH_UPDATE_STATES.get(e);
12027
+ return t || (t = { running: !1, rerunRequested: !1, settled: null }, f.EACH_UPDATE_STATES.set(e, t)), t;
11952
12028
  }
11953
12029
  /**
11954
12030
  * each要素を評価します。
@@ -11965,12 +12041,12 @@ const h = class h {
11965
12041
  */
11966
12042
  static evaluateEach(e) {
11967
12043
  if (q.isEnabled() && ee.recordRowScopeIdentifiers([
11968
- h.getRowScopeName(e, "each-arg"),
11969
- h.getRowScopeName(e, "each-index")
11970
- ]), e.isMounted() || h.syncMountedState(e), !e.isVisible() || !e.isMounted())
11971
- return Promise.resolve();
11972
- const t = h.getEachUpdateState(e);
11973
- return t.running ? (t.rerunRequested = !0, t.settled ?? Promise.resolve()) : h.runEachUpdateLoop(e, t);
12044
+ f.getRowScopeName(e, "each-arg"),
12045
+ f.getRowScopeName(e, "each-index")
12046
+ ]), e.isMounted() || f.syncMountedState(e), !e.isVisible() || !e.isMounted())
12047
+ return e.getTarget().removeAttribute(`${l.prefix}each-done`), Promise.resolve();
12048
+ const t = f.getEachUpdateState(e);
12049
+ return t.running ? (t.rerunRequested = !0, t.settled ?? Promise.resolve()) : f.runEachUpdateLoop(e, t);
11974
12050
  }
11975
12051
  /**
11976
12052
  * `data-each` が行スコープへ公開する名前を返します。
@@ -11995,7 +12071,7 @@ const h = class h {
11995
12071
  * @returns 差分更新が実行中なら true
11996
12072
  */
11997
12073
  static isEachUpdateRunning(e) {
11998
- return h.getEachUpdateState(e).running;
12074
+ return f.getEachUpdateState(e).running;
11999
12075
  }
12000
12076
  /**
12001
12077
  * data-each の差分更新を、再評価要求が無くなるまで直列に繰り返し実行します。
@@ -12011,14 +12087,14 @@ const h = class h {
12011
12087
  const r = (async () => {
12012
12088
  try {
12013
12089
  do
12014
- t.rerunRequested = !1, await h.performEachUpdate(e);
12090
+ t.rerunRequested = !1, await f.performEachUpdate(e);
12015
12091
  while (t.rerunRequested);
12016
12092
  const i = e.getTarget();
12017
- i.setAttribute(`${l.prefix}each-done`, ""), se.refreshSubtree(i), h.runEachRenderedScript(i);
12093
+ i.setAttribute(`${l.prefix}each-done`, ""), se.refreshSubtree(i), f.runEachRenderedScript(i);
12018
12094
  } finally {
12019
12095
  t.running = !1, t.settled = null;
12020
12096
  }
12021
- h.runEachRenderedChange(e);
12097
+ f.runEachRenderedChange(e);
12022
12098
  })();
12023
12099
  return t.settled = r, r;
12024
12100
  }
@@ -12088,14 +12164,14 @@ ${r}
12088
12164
  return;
12089
12165
  const i = String(r.getAttribute(t) ?? "").trim().toLowerCase();
12090
12166
  let n = !1;
12091
- if (i === "always" ? n = !0 : i !== "" && i !== "once" && (h.EACH_RENDERED_CHANGE_WARNED.has(r) || (h.EACH_RENDERED_CHANGE_WARNED.add(r), m.warn(
12167
+ if (i === "always" ? n = !0 : i !== "" && i !== "once" && (f.EACH_RENDERED_CHANGE_WARNED.has(r) || (f.EACH_RENDERED_CHANGE_WARNED.add(r), m.warn(
12092
12168
  "[Haori]",
12093
12169
  `Invalid ${t} value: "${i}". Use "once" (default) or "always".`
12094
- ))), h.countEachRenderedRows(e) !== 0) {
12170
+ ))), f.countEachRenderedRows(e) !== 0) {
12095
12171
  if (!n) {
12096
- if (h.EACH_RENDERED_CHANGE_FIRED.has(r))
12172
+ if (f.EACH_RENDERED_CHANGE_FIRED.has(r))
12097
12173
  return;
12098
- h.EACH_RENDERED_CHANGE_FIRED.add(r);
12174
+ f.EACH_RENDERED_CHANGE_FIRED.add(r);
12099
12175
  }
12100
12176
  try {
12101
12177
  r.dispatchEvent(new Event("change", { bubbles: !0 }));
@@ -12127,11 +12203,11 @@ ${r}
12127
12203
  * @return 差分更新完了の Promise
12128
12204
  */
12129
12205
  static performEachUpdate(e) {
12130
- const t = h.resolveEachItems(e);
12206
+ const t = f.resolveEachItems(e);
12131
12207
  if (t === null)
12132
12208
  return Promise.reject(new Error("Invalid each attribute."));
12133
12209
  let r = e.getTemplate();
12134
- const i = e.getAttribute(`${l.prefix}each-key`), n = h.createBindingSignature({
12210
+ const i = e.getAttribute(`${l.prefix}each-key`), n = f.createBindingSignature({
12135
12211
  key: i ? String(i) : null,
12136
12212
  items: t
12137
12213
  });
@@ -12141,18 +12217,18 @@ ${r}
12141
12217
  if (!s && a instanceof D) {
12142
12218
  if (a.hasAttribute(`${l.prefix}each-before`) || a.hasAttribute(`${l.prefix}each-after`))
12143
12219
  return;
12144
- r = a.clone(), h.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0, e.removeChild(a);
12220
+ r = a.clone(), f.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0, e.removeChild(a);
12145
12221
  const o = a.getTarget();
12146
12222
  o.parentNode && o.parentNode.removeChild(o), a.setMounted(!1);
12147
12223
  }
12148
- }), s && h.warnExtraEachChildren(e), !s) {
12224
+ }), s && f.warnExtraEachChildren(e), !s) {
12149
12225
  const a = e.getTarget();
12150
12226
  Array.from(a.children).filter(
12151
12227
  (c) => !c.hasAttribute(`${l.prefix}each-before`) && !c.hasAttribute(`${l.prefix}each-after`)
12152
12228
  ).forEach((c) => {
12153
12229
  if (!s) {
12154
12230
  const d = M.get(c);
12155
- d instanceof D && (r = d.clone(), h.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
12231
+ d instanceof D && (r = d.clone(), f.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
12156
12232
  }
12157
12233
  const u = M.get(c);
12158
12234
  u instanceof D && e.getChildren().includes(u) && (e.removeChild(u), u.setMounted(!1)), c.parentNode && c.parentNode.removeChild(c);
@@ -12162,7 +12238,7 @@ ${r}
12162
12238
  e.setEachInputSignature(n);
12163
12239
  });
12164
12240
  }
12165
- return e.getEachInputSignature() === n ? h.reevaluateEachRows(e) : this.updateDiff(e, t).then(() => {
12241
+ return e.getEachInputSignature() === n ? f.reevaluateEachRows(e) : this.updateDiff(e, t).then(() => {
12166
12242
  e.setEachInputSignature(n);
12167
12243
  });
12168
12244
  }
@@ -12176,12 +12252,12 @@ ${r}
12176
12252
  * @returns 再評価完了の Promise
12177
12253
  */
12178
12254
  static reevaluateEachRows(e) {
12179
- if (h.isRowLocalEachTemplate(e))
12255
+ if (f.isRowLocalEachTemplate(e))
12180
12256
  return Promise.resolve();
12181
12257
  const t = e.getChildElementFragments().filter(
12182
12258
  (r) => !r.hasAttribute(`${l.prefix}each-before`) && !r.hasAttribute(`${l.prefix}each-after`)
12183
12259
  );
12184
- return t.length === 0 ? Promise.resolve() : Promise.all(t.map((r) => h.evaluateAll(r))).then(
12260
+ return t.length === 0 ? Promise.resolve() : Promise.all(t.map((r) => f.evaluateAll(r))).then(
12185
12261
  () => {
12186
12262
  }
12187
12263
  );
@@ -12207,12 +12283,12 @@ ${r}
12207
12283
  if (!e.hasAttribute(`${l.prefix}each`) || e.getEachInputSignature() === null)
12208
12284
  return !1;
12209
12285
  const t = e.getParent();
12210
- if (t?.closestByAttribute(`${l.prefix}derive`) || t?.closestByAttribute(`${l.prefix}derive-name`) || t?.closestByAttribute(`${l.prefix}if`) || t?.closestByAttribute(`${l.prefix}fetch`) || t?.closestByAttribute(`${l.prefix}import`) || h.hasNonEachDynamicElementState(e) || !h.isRowLocalEachTemplate(e))
12286
+ if (t?.closestByAttribute(`${l.prefix}derive`) || t?.closestByAttribute(`${l.prefix}derive-name`) || t?.closestByAttribute(`${l.prefix}if`) || t?.closestByAttribute(`${l.prefix}fetch`) || t?.closestByAttribute(`${l.prefix}import`) || f.hasNonEachDynamicElementState(e) || !f.isRowLocalEachTemplate(e) || f.hasEachFixedChildren(e))
12211
12287
  return !1;
12212
- const r = h.resolveEachItems(e);
12288
+ const r = f.resolveEachItems(e);
12213
12289
  if (r === null)
12214
12290
  return !1;
12215
- const i = e.getAttribute(`${l.prefix}each-key`), n = h.createBindingSignature({
12291
+ const i = e.getAttribute(`${l.prefix}each-key`), n = f.createBindingSignature({
12216
12292
  key: i ? String(i) : null,
12217
12293
  items: r
12218
12294
  });
@@ -12246,7 +12322,7 @@ ${r}
12246
12322
  return e.setRowLocalTemplate(!1), !1;
12247
12323
  const n = /* @__PURE__ */ new Set([String(i)]), s = e.getAttribute(`${l.prefix}each-index`);
12248
12324
  s && n.add(String(s));
12249
- const a = h.isRowLocalSubtree(r, n);
12325
+ const a = f.isRowLocalSubtree(r, n);
12250
12326
  return e.setRowLocalTemplate(a), a;
12251
12327
  }
12252
12328
  /**
@@ -12260,8 +12336,8 @@ ${r}
12260
12336
  for (const i of e.getAttributeNames()) {
12261
12337
  const n = e.getRawAttribute(i), s = typeof n == "string" ? n : "";
12262
12338
  if (s.includes("{{")) {
12263
- if (!h.areExpressionsRowLocal(
12264
- h.extractInterpolations(s),
12339
+ if (!f.areExpressionsRowLocal(
12340
+ f.extractInterpolations(s),
12265
12341
  t
12266
12342
  ))
12267
12343
  return !1;
@@ -12270,15 +12346,15 @@ ${r}
12270
12346
  if (!i.startsWith(l.prefix))
12271
12347
  continue;
12272
12348
  const a = i.slice(l.prefix.length);
12273
- if (h.ROW_LOCAL_EXPRESSION_ATTRIBUTES.has(a)) {
12274
- if (!h.areExpressionsRowLocal([s], t))
12349
+ if (f.ROW_LOCAL_EXPRESSION_ATTRIBUTES.has(a)) {
12350
+ if (!f.areExpressionsRowLocal([s], t))
12275
12351
  return !1;
12276
12352
  continue;
12277
12353
  }
12278
- if (h.ROW_LOCAL_STATIC_ATTRIBUTES.has(a))
12354
+ if (f.ROW_LOCAL_STATIC_ATTRIBUTES.has(a))
12279
12355
  continue;
12280
12356
  const o = a.indexOf("-");
12281
- if (!(o !== -1 && h.ROW_LOCAL_ROW_OPERATIONS.has(a.slice(o + 1))))
12357
+ if (!(o !== -1 && f.ROW_LOCAL_ROW_OPERATIONS.has(a.slice(o + 1))))
12282
12358
  return !1;
12283
12359
  }
12284
12360
  let r = t;
@@ -12293,12 +12369,12 @@ ${r}
12293
12369
  }
12294
12370
  for (const i of e.getChildren())
12295
12371
  if (i instanceof D) {
12296
- if (!h.isRowLocalSubtree(i, r))
12372
+ if (!f.isRowLocalSubtree(i, r))
12297
12373
  return !1;
12298
12374
  } else if (i instanceof re) {
12299
12375
  const n = i.getRawText();
12300
- if (n.includes("{{") && !h.areExpressionsRowLocal(
12301
- h.extractInterpolations(n),
12376
+ if (n.includes("{{") && !f.areExpressionsRowLocal(
12377
+ f.extractInterpolations(n),
12302
12378
  t
12303
12379
  ))
12304
12380
  return !1;
@@ -12346,7 +12422,7 @@ ${r}
12346
12422
  * @returns 省略可能なら true
12347
12423
  */
12348
12424
  static canSkipStableDerivedSubtree(e) {
12349
- return !e.hasAttribute(`${l.prefix}derive`) || e.hasAttribute(`${l.prefix}if`) || e.hasAttribute(`${l.prefix}each`) || e.hasAttribute(`${l.prefix}fetch`) || e.hasAttribute(`${l.prefix}import`) ? !1 : !h.hasDisallowedDerivedSubtreeDescendant(e);
12425
+ return !e.hasAttribute(`${l.prefix}derive`) || e.hasAttribute(`${l.prefix}if`) || e.hasAttribute(`${l.prefix}each`) || e.hasAttribute(`${l.prefix}fetch`) || e.hasAttribute(`${l.prefix}import`) ? !1 : !f.hasDisallowedDerivedSubtreeDescendant(e);
12350
12426
  }
12351
12427
  /**
12352
12428
  * data-derive subtree skip の初期 PoC で扱わない子孫要素を含むかを返します。
@@ -12355,7 +12431,7 @@ ${r}
12355
12431
  * @returns 含むなら true
12356
12432
  */
12357
12433
  static hasDisallowedDerivedSubtreeDescendant(e) {
12358
- return e.getChildren().some((t) => t instanceof D ? t.hasAttribute(`${l.prefix}derive`) || t.hasAttribute(`${l.prefix}derive-name`) || t.hasAttribute(`${l.prefix}fetch`) || t.hasAttribute(`${l.prefix}import`) ? !0 : h.hasDisallowedDerivedSubtreeDescendant(t) : !1);
12434
+ return e.getChildren().some((t) => t instanceof D ? t.hasAttribute(`${l.prefix}derive`) || t.hasAttribute(`${l.prefix}derive-name`) || t.hasAttribute(`${l.prefix}fetch`) || t.hasAttribute(`${l.prefix}import`) ? !0 : f.hasDisallowedDerivedSubtreeDescendant(t) : !1);
12359
12435
  }
12360
12436
  /**
12361
12437
  * data-derive host が子孫要素へ公開している binding の署名を返します。
@@ -12364,7 +12440,7 @@ ${r}
12364
12440
  * @returns binding 署名
12365
12441
  */
12366
12442
  static createDescendantBindingSignature(e, t) {
12367
- return h.recordDerivedSubtreeSignatureComputation(e, t), h.createBindingSignature(e.getDescendantBindingData());
12443
+ return f.recordDerivedSubtreeSignatureComputation(e, t), f.createBindingSignature(e.getDescendantBindingData());
12368
12444
  }
12369
12445
  /**
12370
12446
  * data-derive 実行前の入力署名を返します。
@@ -12376,7 +12452,7 @@ ${r}
12376
12452
  */
12377
12453
  static createDeriveInputSignature(e, t, r) {
12378
12454
  const i = typeof r == "string" ? r.trim() : "";
12379
- return !t || i === "" ? null : h.createBindingSignature({
12455
+ return !t || i === "" ? null : f.createBindingSignature({
12380
12456
  expression: t,
12381
12457
  name: i,
12382
12458
  scope: e.getBindingData()
@@ -12388,13 +12464,13 @@ ${r}
12388
12464
  * @param fragment 対象フラグメント
12389
12465
  */
12390
12466
  static refreshDerivedSubtreeSignature(e) {
12391
- if (!h.canSkipStableDerivedSubtree(e)) {
12392
- e.setDeriveSubtreeSignature(null), h.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
12467
+ if (!f.canSkipStableDerivedSubtree(e)) {
12468
+ e.setDeriveSubtreeSignature(null), f.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
12393
12469
  return;
12394
12470
  }
12395
12471
  e.setDeriveSubtreeSignature(
12396
- h.createDescendantBindingSignature(e, "refresh")
12397
- ), h.logDerivedSubtreeProfileSnapshot(e, "refresh");
12472
+ f.createDescendantBindingSignature(e, "refresh")
12473
+ ), f.logDerivedSubtreeProfileSnapshot(e, "refresh");
12398
12474
  }
12399
12475
  /**
12400
12476
  * data-derive subtree skip のプロファイルを取得または初期化します。
@@ -12405,11 +12481,11 @@ ${r}
12405
12481
  static getOrCreateDerivedSubtreeProfile(e) {
12406
12482
  if (!q.isEnabled() || !e.hasAttribute(`${l.prefix}derive`))
12407
12483
  return null;
12408
- const t = h.DERIVE_SUBTREE_PROFILES.get(e);
12484
+ const t = f.DERIVE_SUBTREE_PROFILES.get(e);
12409
12485
  if (t)
12410
12486
  return t;
12411
12487
  const r = {
12412
- hostId: h.createDerivedSubtreeHostId(e),
12488
+ hostId: f.createDerivedSubtreeHostId(e),
12413
12489
  signatureComputeTotal: 0,
12414
12490
  signatureComputeFromEvaluateAll: 0,
12415
12491
  signatureComputeFromRefresh: 0,
@@ -12417,7 +12493,7 @@ ${r}
12417
12493
  skipMissCount: 0,
12418
12494
  skipIneligibleCount: 0
12419
12495
  };
12420
- return h.DERIVE_SUBTREE_PROFILES.set(e, r), r;
12496
+ return f.DERIVE_SUBTREE_PROFILES.set(e, r), r;
12421
12497
  }
12422
12498
  /**
12423
12499
  * 要素の `id` 属性を安全に取得します。
@@ -12448,7 +12524,7 @@ ${r}
12448
12524
  if (!(i instanceof HTMLElement))
12449
12525
  break;
12450
12526
  let n = i.tagName.toLowerCase();
12451
- const s = h.resolveElementId(i).trim();
12527
+ const s = f.resolveElementId(i).trim();
12452
12528
  if (s !== "") {
12453
12529
  n += `#${s}`, t.unshift(n);
12454
12530
  break;
@@ -12471,7 +12547,7 @@ ${r}
12471
12547
  * @param source 計算元
12472
12548
  */
12473
12549
  static recordDerivedSubtreeSignatureComputation(e, t) {
12474
- const r = h.getOrCreateDerivedSubtreeProfile(e);
12550
+ const r = f.getOrCreateDerivedSubtreeProfile(e);
12475
12551
  if (r !== null) {
12476
12552
  if (r.signatureComputeTotal += 1, t === "refresh") {
12477
12553
  r.signatureComputeFromRefresh += 1;
@@ -12487,7 +12563,7 @@ ${r}
12487
12563
  * @param reason ログ理由
12488
12564
  */
12489
12565
  static logDerivedSubtreeProfileSnapshot(e, t) {
12490
- const r = h.getOrCreateDerivedSubtreeProfile(e);
12566
+ const r = f.getOrCreateDerivedSubtreeProfile(e);
12491
12567
  r !== null && (t === "skip-hit" ? r.skipHitCount += 1 : t === "skip-miss" ? r.skipMissCount += 1 : t === "skip-ineligible" && (r.skipIneligibleCount += 1), m.info("[Haori][derive-profile]", {
12492
12568
  reason: t,
12493
12569
  hostId: r.hostId,
@@ -12530,7 +12606,7 @@ ${r}
12530
12606
  * @returns subtree 全体を省略可能なら true
12531
12607
  */
12532
12608
  static markFreshInitializationSkippable(e) {
12533
- const t = e.getAttributeNames().some((n) => h.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof D ? !h.markFreshInitializationSkippable(n) : n instanceof re ? n.hasDynamicContent() : !1), i = !t && !r;
12609
+ const t = e.getAttributeNames().some((n) => f.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof D ? !f.markFreshInitializationSkippable(n) : n instanceof re ? n.hasDynamicContent() : !1), i = !t && !r;
12534
12610
  return e.setFreshInitializationSkippable(i), i;
12535
12611
  }
12536
12612
  /**
@@ -12563,58 +12639,58 @@ ${r}
12563
12639
  let i = e.getAttribute(`${l.prefix}each-index`);
12564
12640
  i && (i = String(i));
12565
12641
  const n = e.getAttribute(`${l.prefix}each-key`), s = e.getAttribute(`${l.prefix}each-arg`), a = t.map(
12566
- (N, U) => h.createListKey(N, n ? String(n) : null, U)
12642
+ (x, U) => f.createListKey(x, n ? String(n) : null, U)
12567
12643
  ), o = new Set(a), c = /* @__PURE__ */ new Map();
12568
- a.forEach((N) => {
12569
- c.set(N, (c.get(N) ?? 0) + 1);
12570
- }), n && o.size !== a.length && h.warnDuplicateEachKey(String(n));
12644
+ a.forEach((x) => {
12645
+ c.set(x, (c.get(x) ?? 0) + 1);
12646
+ }), n && o.size !== a.length && f.warnDuplicateEachKey(String(n));
12571
12647
  const u = [];
12572
- let d = e.getChildren().filter((N) => N instanceof D).filter(
12573
- (N) => !N.hasAttribute(`${l.prefix}each-before`) && !N.hasAttribute(`${l.prefix}each-after`)
12648
+ let d = e.getChildren().filter((x) => x instanceof D).filter(
12649
+ (x) => !x.hasAttribute(`${l.prefix}each-before`) && !x.hasAttribute(`${l.prefix}each-after`)
12574
12650
  );
12575
- const p = d.map((N) => N.getListKey()), g = /* @__PURE__ */ new Set();
12576
- d = d.filter((N, U) => {
12577
- const K = String(N.getListKey()), w = c.get(K) ?? 0;
12578
- if (w === 0) {
12579
- g.add(N);
12580
- const S = N.getListKey();
12581
- return S !== null && O.rowRemove(N.getTarget(), S, U), u.push(N.remove()), !1;
12651
+ const p = d.map((x) => x.getListKey()), g = /* @__PURE__ */ new Set();
12652
+ d = d.filter((x, U) => {
12653
+ const K = String(x.getListKey()), R = c.get(K) ?? 0;
12654
+ if (R === 0) {
12655
+ g.add(x);
12656
+ const S = x.getListKey();
12657
+ return S !== null && O.rowRemove(x.getTarget(), S, U), u.push(x.remove()), !1;
12582
12658
  }
12583
- return c.set(K, w - 1), !0;
12659
+ return c.set(K, R - 1), !0;
12584
12660
  });
12585
- const E = d.map((N) => N.getListKey()), A = /* @__PURE__ */ new Map();
12586
- d.forEach((N) => {
12587
- const U = N.getListKey();
12661
+ const E = d.map((x) => x.getListKey()), A = /* @__PURE__ */ new Map();
12662
+ d.forEach((x) => {
12663
+ const U = x.getListKey();
12588
12664
  if (U === null)
12589
12665
  return;
12590
12666
  const K = A.get(U);
12591
- K ? K.push(N) : A.set(U, [N]);
12667
+ K ? K.push(x) : A.set(U, [x]);
12592
12668
  });
12593
- const I = e.getChildElementFragments().filter((N) => !g.has(N)), k = I.filter(
12594
- (N) => N.hasAttribute(`${l.prefix}each-before`)
12669
+ const I = e.getChildElementFragments().filter((x) => !g.has(x)), C = I.filter(
12670
+ (x) => x.hasAttribute(`${l.prefix}each-before`)
12595
12671
  ).length;
12596
12672
  let W = Promise.resolve();
12597
- return a.forEach((N, U) => {
12598
- const K = t[U], w = U;
12673
+ return a.forEach((x, U) => {
12674
+ const K = t[U], R = U;
12599
12675
  let S;
12600
- const H = A.get(N)?.shift();
12676
+ const H = A.get(x)?.shift();
12601
12677
  if (H) {
12602
12678
  S = H;
12603
- const B = k + U;
12679
+ const B = C + U;
12604
12680
  W = W.then(
12605
- () => h.updateRowFragment(
12681
+ () => f.updateRowFragment(
12606
12682
  S,
12607
12683
  K,
12608
12684
  i,
12609
- w,
12685
+ R,
12610
12686
  s ? String(s) : null,
12611
- N
12687
+ x
12612
12688
  ).then(
12613
12689
  (te) => (
12614
12690
  // 再利用行も新しい並び順の位置へ移動する。移動しないと、配列を並べ替え
12615
12691
  // ただけの更新(data-each-key 指定時はキーが変わらないため全行が再利用
12616
12692
  // される)で DOM の順序が古いまま残る。
12617
- h.repositionEachRow(
12693
+ f.repositionEachRow(
12618
12694
  e,
12619
12695
  S,
12620
12696
  I,
@@ -12622,12 +12698,12 @@ ${r}
12622
12698
  ).then((ie) => {
12623
12699
  if (ie !== null && O.rowMove(
12624
12700
  S.getTarget(),
12625
- N,
12626
- ie - k,
12701
+ x,
12702
+ ie - C,
12627
12703
  U
12628
- ), !(!te && h.isRowLocalEachTemplate(e)))
12629
- return h.evaluateAll(S).then(
12630
- () => h.applyRowFormValues(e, S, K)
12704
+ ), !(!te && f.isRowLocalEachTemplate(e)))
12705
+ return f.evaluateAll(S).then(
12706
+ () => f.applyRowFormValues(e, S, K)
12631
12707
  );
12632
12708
  })
12633
12709
  )
@@ -12635,40 +12711,40 @@ ${r}
12635
12711
  );
12636
12712
  } else {
12637
12713
  S = r.clone();
12638
- const B = k + U;
12714
+ const B = C + U;
12639
12715
  W = W.then(
12640
- () => h.updateRowFragment(
12716
+ () => f.updateRowFragment(
12641
12717
  S,
12642
12718
  K,
12643
12719
  i,
12644
- w,
12720
+ R,
12645
12721
  s ? String(s) : null,
12646
- N
12722
+ x
12647
12723
  ).then(() => {
12648
12724
  const te = I[B] ?? null;
12649
12725
  return e.insertBefore(S, te).then(() => {
12650
12726
  I.splice(B, 0, S);
12651
- }).then(() => h.initializeFreshEachRow(S)).then(() => h.applyRowFormValues(e, S, K)).then(() => {
12652
- O.rowAdd(S.getTarget(), N, w, K);
12727
+ }).then(() => f.initializeFreshEachRow(S)).then(() => f.applyRowFormValues(e, S, K)).then(() => {
12728
+ O.rowAdd(S.getTarget(), x, R, K);
12653
12729
  });
12654
12730
  })
12655
12731
  );
12656
12732
  }
12657
12733
  }), Promise.all(u).then(() => W).then(() => {
12658
- const N = a.filter(
12734
+ const x = a.filter(
12659
12735
  (B) => B !== null
12660
12736
  ), U = E.filter(
12661
12737
  (B) => B !== null
12662
- ), K = new Set(U), w = N.filter((B) => !K.has(B)), H = p.filter(
12738
+ ), K = new Set(U), R = x.filter((B) => !K.has(B)), H = p.filter(
12663
12739
  (B) => B !== null
12664
12740
  ).filter(
12665
12741
  (B) => !o.has(B)
12666
12742
  );
12667
12743
  O.eachUpdate(
12668
12744
  e.getTarget(),
12669
- w,
12745
+ R,
12670
12746
  H,
12671
- N
12747
+ x
12672
12748
  );
12673
12749
  });
12674
12750
  }
@@ -12719,7 +12795,7 @@ ${r}
12719
12795
  * @returns 戻り値はありません。
12720
12796
  */
12721
12797
  static warnDuplicateEachKey(e) {
12722
- !q.isEnabled() || h.WARNED_DUPLICATE_EACH_KEYS.has(e) || (h.WARNED_DUPLICATE_EACH_KEYS.add(e), m.warn(
12798
+ !q.isEnabled() || f.WARNED_DUPLICATE_EACH_KEYS.has(e) || (f.WARNED_DUPLICATE_EACH_KEYS.add(e), m.warn(
12723
12799
  "[Haori]",
12724
12800
  `${l.prefix}each-key="${e}" の値が配列の中で重複しています。行は出現順で対応付けますが、キーによる行の識別はできません。`
12725
12801
  ));
@@ -12771,7 +12847,7 @@ ${r}
12771
12847
  * @returns 反映完了の Promise
12772
12848
  */
12773
12849
  static applyRowFormValues(e, t, r) {
12774
- return !e.hasAttribute(`${l.prefix}form-list`) || !x.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : x.syncRowValues(t, r);
12850
+ return !e.hasAttribute(`${l.prefix}form-list`) || !N.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : N.syncRowValues(t, r);
12775
12851
  }
12776
12852
  /**
12777
12853
  * リスト比較用のキーを生成します。
@@ -12821,7 +12897,7 @@ ${r}
12821
12897
  `Primitive value requires '${l.prefix}each-arg' attribute: ${t}`
12822
12898
  ), Promise.resolve(!1);
12823
12899
  r && (a[r] = i);
12824
- const o = a, c = h.createBindingSignature({
12900
+ const o = a, c = f.createBindingSignature({
12825
12901
  listKey: s,
12826
12902
  bindingData: o
12827
12903
  });
@@ -12839,7 +12915,7 @@ ${r}
12839
12915
  const r = t.pop();
12840
12916
  if (r.getChildElementFragments().forEach((i) => {
12841
12917
  t.push(i);
12842
- }), r !== e && !r.isMounted() && h.hasMountSensitiveAttribute(r))
12918
+ }), r !== e && !r.isMounted() && f.hasMountSensitiveAttribute(r))
12843
12919
  return !0;
12844
12920
  }
12845
12921
  return !1;
@@ -12886,7 +12962,7 @@ ${r}
12886
12962
  if (t.has(e))
12887
12963
  return `[Circular:${t.get(e)}]`;
12888
12964
  const i = `array-${r.value}`;
12889
- return r.value += 1, t.set(e, i), `[${e.map((n) => h.createBindingSignature(n, t, r)).join(",")}]`;
12965
+ return r.value += 1, t.set(e, i), `[${e.map((n) => f.createBindingSignature(n, t, r)).join(",")}]`;
12890
12966
  }
12891
12967
  if (typeof e == "object") {
12892
12968
  if (t.has(e))
@@ -12895,7 +12971,7 @@ ${r}
12895
12971
  r.value += 1, t.set(e, i);
12896
12972
  const n = e;
12897
12973
  return `{${Object.keys(n).sort().map(
12898
- (s) => `${JSON.stringify(s)}:${h.createBindingSignature(
12974
+ (s) => `${JSON.stringify(s)}:${f.createBindingSignature(
12899
12975
  n[s],
12900
12976
  t,
12901
12977
  r
@@ -12911,11 +12987,11 @@ ${r}
12911
12987
  */
12912
12988
  static scheduleEvaluateAll(e) {
12913
12989
  setTimeout(() => {
12914
- h.evaluateAll(e);
12990
+ f.evaluateAll(e);
12915
12991
  }, 100);
12916
12992
  }
12917
12993
  };
12918
- h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
12994
+ f.ATTRIBUTE_ALIAS_SUFFIX = "attr-", f.PRIORITY_ATTRIBUTE_SUFFIXES = [
12919
12995
  "bind",
12920
12996
  // `store` は `bind`(既定値)の後、`url-param` の前に置く。URL クエリで明示
12921
12997
  // された値を保存済みの値より優先するため。
@@ -12925,7 +13001,7 @@ h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
12925
13001
  "derive",
12926
13002
  "if",
12927
13003
  "each"
12928
- ], h.DEFERRED_ATTRIBUTE_SUFFIXES = ["fetch"], h.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES = [
13004
+ ], f.DEFERRED_ATTRIBUTE_SUFFIXES = ["fetch"], f.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES = [
12929
13005
  "bind",
12930
13006
  "derive",
12931
13007
  "derive-name",
@@ -12938,7 +13014,7 @@ h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
12938
13014
  // 条件は評価結果を DOM 属性へ書かない(式は実行時に生値から評価する)。
12939
13015
  "validity",
12940
13016
  "validity-message"
12941
- ], h.ATTRIBUTE_PLACEHOLDER_REGEX = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/, h.ROW_LOCAL_EXPRESSION_ATTRIBUTES = /* @__PURE__ */ new Set(["each", "if", "derive"]), h.ROW_LOCAL_STATIC_ATTRIBUTES = /* @__PURE__ */ new Set([
13017
+ ], f.ATTRIBUTE_PLACEHOLDER_REGEX = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/, f.ROW_LOCAL_EXPRESSION_ATTRIBUTES = /* @__PURE__ */ new Set(["each", "if", "derive"]), f.ROW_LOCAL_STATIC_ATTRIBUTES = /* @__PURE__ */ new Set([
12942
13018
  "each-arg",
12943
13019
  "each-key",
12944
13020
  "each-index",
@@ -12958,9 +13034,9 @@ h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
12958
13034
  "store-type",
12959
13035
  "enhance",
12960
13036
  "enhance-new"
12961
- ]), h.ROW_LOCAL_ROW_OPERATIONS = /* @__PURE__ */ new Set(["row-add", "row-remove", "row-prev", "row-next"]), h.REACTIVE_FETCH_STATES = /* @__PURE__ */ new WeakMap(), h.REACTIVE_IMPORT_STATES = /* @__PURE__ */ new WeakMap(), h.DERIVE_SUBTREE_PROFILES = /* @__PURE__ */ new WeakMap(), h.EACH_UPDATE_STATES = /* @__PURE__ */ new WeakMap(), h.EACH_RENDERED_CHANGE_FIRED = /* @__PURE__ */ new WeakSet(), h.EACH_RENDERED_CHANGE_WARNED = /* @__PURE__ */ new WeakSet(), h.WARNED_DUPLICATE_EACH_KEYS = /* @__PURE__ */ new Set(), h.ABSENT_PATH = Symbol("absent");
12962
- let L = h;
12963
- const Ee = class Ee {
13037
+ ]), f.ROW_LOCAL_ROW_OPERATIONS = /* @__PURE__ */ new Set(["row-add", "row-remove", "row-prev", "row-next"]), f.REACTIVE_FETCH_STATES = /* @__PURE__ */ new WeakMap(), f.REACTIVE_IMPORT_STATES = /* @__PURE__ */ new WeakMap(), f.DERIVE_SUBTREE_PROFILES = /* @__PURE__ */ new WeakMap(), f.EACH_UPDATE_STATES = /* @__PURE__ */ new WeakMap(), f.EACH_RENDERED_CHANGE_FIRED = /* @__PURE__ */ new WeakSet(), f.EACH_RENDERED_CHANGE_WARNED = /* @__PURE__ */ new WeakSet(), f.WARNED_DUPLICATE_EACH_KEYS = /* @__PURE__ */ new Set(), f.ABSENT_PATH = Symbol("absent");
13038
+ let L = f;
13039
+ const Ae = class Ae {
12964
13040
  /**
12965
13041
  * コンストラクタ。
12966
13042
  *
@@ -12975,7 +13051,7 @@ const Ee = class Ee {
12975
13051
  this.runWindowLoadProcedure();
12976
13052
  }, this.onPopstate = (t) => {
12977
13053
  const r = t.state;
12978
- !r || r[Ee.HISTORY_STATE_KEY] !== !0 || location.reload();
13054
+ !r || r[Ae.HISTORY_STATE_KEY] !== !0 || location.reload();
12979
13055
  }, this.root = e;
12980
13056
  }
12981
13057
  /**
@@ -13079,7 +13155,7 @@ const Ee = class Ee {
13079
13155
  subscribeCustomEvent(e) {
13080
13156
  if (e === null || e === "")
13081
13157
  return;
13082
- if (Ee.BUILTIN_EVENT_NAMES.has(e)) {
13158
+ if (Ae.BUILTIN_EVENT_NAMES.has(e)) {
13083
13159
  m.warn(
13084
13160
  "[Haori]",
13085
13161
  `data-on="${e}" は組み込みイベントです。data-${e}-* を使用してください(data-on はカスタムイベント専用)。`
@@ -13299,13 +13375,13 @@ const Ee = class Ee {
13299
13375
  return null;
13300
13376
  }
13301
13377
  };
13302
- Ee.HISTORY_STATE_KEY = "__haoriHistoryState__", Ee.BUILTIN_EVENT_NAMES = /* @__PURE__ */ new Set([
13378
+ Ae.HISTORY_STATE_KEY = "__haoriHistoryState__", Ae.BUILTIN_EVENT_NAMES = /* @__PURE__ */ new Set([
13303
13379
  "click",
13304
13380
  "change",
13305
13381
  "input",
13306
13382
  "load"
13307
13383
  ]);
13308
- let Ue = Ee;
13384
+ let Ue = Ae;
13309
13385
  const j = class j {
13310
13386
  /**
13311
13387
  * ノードが現在の Window に属する HTMLElement かどうかを判定します。
@@ -13433,7 +13509,7 @@ j.CONFIG_KEYS = /* @__PURE__ */ new Set([
13433
13509
  "disabled",
13434
13510
  "once"
13435
13511
  ]), j.registrations = /* @__PURE__ */ new Map();
13436
- let me = j;
13512
+ let ye = j;
13437
13513
  const v = class v {
13438
13514
  /**
13439
13515
  * 指定ノードとその子孫を走査し、`data-poll-*` の監視状態を同期します。
@@ -13977,8 +14053,8 @@ v.CONFIG_KEYS = /* @__PURE__ */ new Set([
13977
14053
  "disabled",
13978
14054
  "state"
13979
14055
  ]), v.DEFAULT_INTERVAL_MS = 5e3, v.MIN_INTERVAL_MS = 100, v.registrations = /* @__PURE__ */ new Map(), v.visibilityListener = null;
13980
- let ye = v;
13981
- const Vt = "0.47.0";
14056
+ let be = v;
14057
+ const Vt = "0.47.2";
13982
14058
  function qt(y) {
13983
14059
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => y()) : Promise.resolve().then(y);
13984
14060
  }
@@ -14258,7 +14334,7 @@ const P = class P {
14258
14334
  }
14259
14335
  };
14260
14336
  P.THRESHOLD = 0, P.DEFAULT_ROOT_MARGIN = "0px", P.registrations = /* @__PURE__ */ new Map();
14261
- let de = P;
14337
+ let fe = P;
14262
14338
  const Y = class Y {
14263
14339
  /**
14264
14340
  * 既存の MutationObserver をすべて停止します。
@@ -14293,7 +14369,7 @@ const Y = class Y {
14293
14369
  "[Haori]",
14294
14370
  "Failed to build body fragment:",
14295
14371
  i.reason
14296
- ), await G.wait(), document.body.setAttribute("data-haori-ready", ""), Y.observe(document.head), Y.observe(document.body), me.syncTree(document.body), ye.syncTree(document.body), de.syncTree(document.body);
14372
+ ), await G.wait(), document.body.setAttribute("data-haori-ready", ""), Y.observe(document.head), Y.observe(document.body), ye.syncTree(document.body), be.syncTree(document.body), fe.syncTree(document.body);
14297
14373
  } finally {
14298
14374
  e.release();
14299
14375
  }
@@ -14398,7 +14474,7 @@ const Y = class Y {
14398
14474
  switch (r.type) {
14399
14475
  case "attributes": {
14400
14476
  const i = r.target;
14401
- if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(we) && (r.attributeName === "disabled" || r.attributeName === we) || r.attributeName && (r.attributeName === `${l.prefix}if-false` || r.attributeName === "style" && i.hasAttribute(`${l.prefix}if-false`)) || r.attributeName && L.isAliasedAttributeReflection(i, r.attributeName))
14477
+ if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(ue) && (r.attributeName === "disabled" || r.attributeName === ue) || r.attributeName && (r.attributeName === `${l.prefix}if-false` || r.attributeName === "style" && i.hasAttribute(`${l.prefix}if-false`)) || r.attributeName && L.isAliasedAttributeReflection(i, r.attributeName))
14402
14478
  break;
14403
14479
  L.setAttribute(
14404
14480
  i,
@@ -14406,15 +14482,15 @@ const Y = class Y {
14406
14482
  i.getAttribute(r.attributeName),
14407
14483
  !0,
14408
14484
  t
14409
- ), me.syncElement(i), ye.syncElement(i), de.syncElement(i);
14485
+ ), ye.syncElement(i), be.syncElement(i), fe.syncElement(i);
14410
14486
  break;
14411
14487
  }
14412
14488
  case "childList": {
14413
14489
  Array.from(r.removedNodes).forEach((i) => {
14414
- me.cleanupTree(i), ye.cleanupTree(i), de.cleanupTree(i), L.removeNode(i);
14490
+ ye.cleanupTree(i), be.cleanupTree(i), fe.cleanupTree(i), L.removeNode(i);
14415
14491
  }), Array.from(r.addedNodes).forEach((i) => {
14416
- i.parentElement instanceof Element && (L.addNode(i.parentElement, i), me.syncTree(i), ye.syncTree(i), de.syncTree(i));
14417
- }), r.target instanceof Element && de.syncElement(r.target);
14492
+ i.parentElement instanceof Element && (L.addNode(i.parentElement, i), ye.syncTree(i), be.syncTree(i), fe.syncTree(i));
14493
+ }), r.target instanceof Element && fe.syncElement(r.target);
14418
14494
  break;
14419
14495
  }
14420
14496
  case "characterData": {
@@ -14437,17 +14513,17 @@ const Y = class Y {
14437
14513
  Y._initialized = !1, Y._mutationObservers = [], Y._dispatcher = null;
14438
14514
  let Me = Y;
14439
14515
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", Me.init) : Me.init();
14440
- const Wt = () => Ae.waitForRenders(), jt = Ae.enhancers;
14516
+ const Wt = () => ve.waitForRenders(), jt = ve.enhancers;
14441
14517
  export {
14442
14518
  L as Core,
14443
14519
  se as Enhance,
14444
14520
  l as Env,
14445
- x as Form,
14521
+ N as Form,
14446
14522
  M as Fragment,
14447
- Ae as Haori,
14523
+ ve as Haori,
14448
14524
  m as Log,
14449
14525
  G as Queue,
14450
- Ae as default,
14526
+ ve as default,
14451
14527
  jt as enhancers,
14452
14528
  Vt as version,
14453
14529
  Wt as waitForRenders