haori 0.55.0 → 0.57.0

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 Ee = class Ee {
1
+ const me = class me {
2
2
  /**
3
3
  * 開発モードの状態を取得します。
4
4
  *
5
5
  * @returns 開発モードならtrue、そうでなければfalse
6
6
  */
7
7
  static isEnabled() {
8
- return Ee.devMode;
8
+ return me.devMode;
9
9
  }
10
10
  /**
11
11
  * 開発モードを有効化します。
12
12
  */
13
13
  static enable() {
14
- Ee.devMode = !0;
14
+ me.devMode = !0;
15
15
  }
16
16
  /**
17
17
  * 開発モードを無効化します。
18
18
  */
19
19
  static disable() {
20
- Ee.devMode = !1;
20
+ me.devMode = !1;
21
21
  }
22
22
  /**
23
23
  * 開発モードを切り替えます。
@@ -25,17 +25,17 @@ const Ee = class Ee {
25
25
  * @param enabled trueで有効化、falseで無効化
26
26
  */
27
27
  static set(e) {
28
- Ee.devMode = e;
28
+ me.devMode = e;
29
29
  }
30
30
  };
31
- Ee.devMode = !1;
32
- let W = Ee;
31
+ me.devMode = !1;
32
+ let q = me;
33
33
  const Be = "embedded";
34
- function _e(b) {
34
+ function Qe(b) {
35
35
  return b === "embedded" || b === "demo";
36
36
  }
37
- function Et(b) {
38
- return b === null ? null : _e(b) ? b : Be;
37
+ function bt(b) {
38
+ return b === null ? null : Qe(b) ? b : Be;
39
39
  }
40
40
  const ee = class ee {
41
41
  /**
@@ -73,7 +73,7 @@ const ee = class ee {
73
73
  * @return 戻り値はありません。
74
74
  */
75
75
  static setRuntime(e) {
76
- ee._runtime = _e(e) ? e : Be;
76
+ ee._runtime = Qe(e) ? e : Be;
77
77
  }
78
78
  /**
79
79
  * 実行環境からプレフィックスと開発モードかどうかを自動検出します。
@@ -87,7 +87,7 @@ const ee = class ee {
87
87
  if (e instanceof HTMLScriptElement) {
88
88
  const r = e.getAttribute("data-prefix") || ee._prefix;
89
89
  ee._prefix = r.endsWith("-") ? r : r + "-";
90
- const i = Et(
90
+ const i = bt(
91
91
  e.getAttribute("data-runtime")
92
92
  );
93
93
  i !== null && (ee._runtime = i), ee._strictBind = e.hasAttribute(
@@ -96,15 +96,15 @@ const ee = class ee {
96
96
  }
97
97
  if (e instanceof HTMLScriptElement && e.hasAttribute(`${ee._prefix}dev`)) {
98
98
  const r = (e.getAttribute(`${ee._prefix}dev`) ?? "").trim().toLowerCase();
99
- W.set(r !== "false" && r !== "off" && r !== "0");
99
+ q.set(r !== "false" && r !== "off" && r !== "0");
100
100
  return;
101
101
  }
102
102
  const t = window.location.hostname;
103
103
  if (t === "localhost" || t.endsWith(".localhost") || t === "127.0.0.1" || t === "::1" || t.endsWith(".local")) {
104
- W.set(!0);
104
+ q.set(!0);
105
105
  return;
106
106
  }
107
- W.set(!1);
107
+ q.set(!1);
108
108
  } catch {
109
109
  }
110
110
  }
@@ -128,7 +128,7 @@ class m {
128
128
  * @param args 追加の引数
129
129
  */
130
130
  static info(e, ...t) {
131
- W.isEnabled() && console.log && console.log(e, ...t);
131
+ q.isEnabled() && console.log && console.log(e, ...t);
132
132
  }
133
133
  /**
134
134
  * 開発モードでのみコンソールに警告を出力します。
@@ -137,7 +137,7 @@ class m {
137
137
  * @param args 追加の引数
138
138
  */
139
139
  static warn(e, ...t) {
140
- W.isEnabled() && console.warn && console.warn(e, ...t);
140
+ q.isEnabled() && console.warn && console.warn(e, ...t);
141
141
  }
142
142
  /**
143
143
  * モードに関係なくコンソールにエラーを出力します。
@@ -149,7 +149,7 @@ class m {
149
149
  console.error(e, ...t);
150
150
  }
151
151
  }
152
- const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:", k = class k {
152
+ const Et = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, Ke = "new:", M = class M {
153
153
  /**
154
154
  * 外部ライブラリ連携を登録します。
155
155
  *
@@ -171,8 +171,8 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
171
171
  m.error("[Haori]", `Enhancer "${r}" must have an init function.`);
172
172
  return;
173
173
  }
174
- k.enhancers.set(r, t), k.warnedUnknownNames.delete(r), typeof document < "u" && document.body && k.forEachTarget(document.body, (i) => {
175
- k.visited.has(i) && k.applyElement(i);
174
+ M.enhancers.set(r, t), M.warnedUnknownNames.delete(r), typeof document < "u" && document.body && M.forEachTarget(document.body, (i) => {
175
+ M.visited.has(i) && M.applyElement(i);
176
176
  });
177
177
  }
178
178
  /**
@@ -183,7 +183,7 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
183
183
  * @returns 戻り値はありません。
184
184
  */
185
185
  static setMutationCapture(e) {
186
- k.mutationCapture = e;
186
+ M.mutationCapture = e;
187
187
  }
188
188
  /**
189
189
  * 登録済みの連携かどうかを返します。
@@ -192,7 +192,7 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
192
192
  * @returns 登録済みなら true
193
193
  */
194
194
  static has(e) {
195
- return k.enhancers.has(e);
195
+ return M.enhancers.has(e);
196
196
  }
197
197
  /**
198
198
  * 対象要素とその子孫へ、まだ適用していない連携を適用します。
@@ -204,8 +204,8 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
204
204
  * @returns 戻り値はありません。
205
205
  */
206
206
  static applySubtree(e) {
207
- k.forEachTarget(e, (t) => {
208
- k.visited.add(t), k.applyElement(t);
207
+ M.forEachTarget(e, (t) => {
208
+ M.visited.add(t), M.applyElement(t);
209
209
  });
210
210
  }
211
211
  /**
@@ -215,7 +215,7 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
215
215
  * @returns 1 つでも適用済みの連携があれば true
216
216
  */
217
217
  static isApplied(e) {
218
- return (k.instances.get(e)?.size ?? 0) > 0;
218
+ return (M.instances.get(e)?.size ?? 0) > 0;
219
219
  }
220
220
  /**
221
221
  * 対象要素とその子孫の連携を再同期します。
@@ -230,8 +230,8 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
230
230
  * @returns 戻り値はありません。
231
231
  */
232
232
  static refreshSubtree(e, t = !0) {
233
- k.forEachTarget(e, (r) => {
234
- k.refreshElement(r, t);
233
+ M.forEachTarget(e, (r) => {
234
+ M.refreshElement(r, t);
235
235
  });
236
236
  }
237
237
  /**
@@ -243,8 +243,8 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
243
243
  * @returns 戻り値はありません。
244
244
  */
245
245
  static destroySubtree(e) {
246
- k.forEachTarget(e, (t) => {
247
- k.destroyElement(t);
246
+ M.forEachTarget(e, (t) => {
247
+ M.destroyElement(t);
248
248
  });
249
249
  }
250
250
  /**
@@ -271,27 +271,27 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
271
271
  static applyElement(e) {
272
272
  if (e.closest(`[${l.prefix}if-false]`))
273
273
  return;
274
- const t = k.instances.get(e) ?? null;
275
- k.names(e, `${l.prefix}enhance`).forEach((r) => {
274
+ const t = M.instances.get(e) ?? null;
275
+ M.names(e, `${l.prefix}enhance`).forEach((r) => {
276
276
  if (t?.has(r))
277
277
  return;
278
- const i = k.enhancers.get(r);
278
+ const i = M.enhancers.get(r);
279
279
  if (!i) {
280
- k.warnUnknownName(r);
280
+ M.warnUnknownName(r);
281
281
  return;
282
282
  }
283
- k.run(`enhance "${r}"`, () => {
283
+ M.run(`enhance "${r}"`, () => {
284
284
  const n = i.init(e);
285
- k.appliedKeys(e).set(r, n);
285
+ M.appliedKeys(e).set(r, n);
286
286
  });
287
- }), k.names(e, `${l.prefix}enhance-new`).forEach((r) => {
288
- const i = `${ze}${r}`;
289
- if (k.instances.get(e)?.has(i))
287
+ }), M.names(e, `${l.prefix}enhance-new`).forEach((r) => {
288
+ const i = `${Ke}${r}`;
289
+ if (M.instances.get(e)?.has(i))
290
290
  return;
291
- const n = k.resolveGlobal(r);
292
- n !== null && k.run(`enhance-new "${r}"`, () => {
291
+ const n = M.resolveGlobal(r);
292
+ n !== null && M.run(`enhance-new "${r}"`, () => {
293
293
  const s = new n(e);
294
- k.appliedKeys(e).set(i, s);
294
+ M.appliedKeys(e).set(i, s);
295
295
  });
296
296
  });
297
297
  }
@@ -303,15 +303,15 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
303
303
  * @returns 戻り値はありません。
304
304
  */
305
305
  static refreshElement(e, t) {
306
- const r = k.instances.get(e);
307
- k.names(e, `${l.prefix}enhance`).forEach((i) => {
306
+ const r = M.instances.get(e);
307
+ M.names(e, `${l.prefix}enhance`).forEach((i) => {
308
308
  if (!r || !r.has(i))
309
309
  return;
310
- const n = k.enhancers.get(i);
311
- !n || typeof n.refresh != "function" || k.run(`enhance "${i}" refresh`, () => {
310
+ const n = M.enhancers.get(i);
311
+ !n || typeof n.refresh != "function" || M.run(`enhance "${i}" refresh`, () => {
312
312
  n.refresh(e, r.get(i));
313
313
  });
314
- }), t && k.applyElement(e);
314
+ }), t && M.applyElement(e);
315
315
  }
316
316
  /**
317
317
  * 1 要素の連携を破棄します。
@@ -320,15 +320,15 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
320
320
  * @returns 戻り値はありません。
321
321
  */
322
322
  static destroyElement(e) {
323
- const t = k.instances.get(e);
323
+ const t = M.instances.get(e);
324
324
  t && (t.forEach((r, i) => {
325
- if (i.startsWith(ze))
325
+ if (i.startsWith(Ke))
326
326
  return;
327
- const n = k.enhancers.get(i);
328
- !n || typeof n.destroy != "function" || k.run(`enhance "${i}" destroy`, () => {
327
+ const n = M.enhancers.get(i);
328
+ !n || typeof n.destroy != "function" || M.run(`enhance "${i}" destroy`, () => {
329
329
  n.destroy(e, r);
330
330
  });
331
- }), k.instances.delete(e));
331
+ }), M.instances.delete(e));
332
332
  }
333
333
  /**
334
334
  * 要素の適用状況を返します(無ければ作成します)。
@@ -337,11 +337,11 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
337
337
  * @returns キー → インスタンスの対応
338
338
  */
339
339
  static appliedKeys(e) {
340
- const t = k.instances.get(e);
340
+ const t = M.instances.get(e);
341
341
  if (t)
342
342
  return t;
343
343
  const r = /* @__PURE__ */ new Map();
344
- return k.instances.set(e, r), r;
344
+ return M.instances.set(e, r), r;
345
345
  }
346
346
  /**
347
347
  * 空白区切りの属性値を名前の一覧へ分解します。
@@ -368,7 +368,7 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
368
368
  * @returns 解決した値。解決できない場合は null
369
369
  */
370
370
  static resolveGlobal(e) {
371
- if (!At.test(e))
371
+ if (!Et.test(e))
372
372
  return m.error(
373
373
  "[Haori]",
374
374
  `${l.prefix}enhance-new accepts a dot-separated global reference only: ${e}`
@@ -382,7 +382,7 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
382
382
  if (t = t[r], t === void 0)
383
383
  break;
384
384
  }
385
- return typeof t != "function" ? (W.isEnabled() && !k.warnedMissingGlobals.has(e) && (k.warnedMissingGlobals.add(e), m.warn(
385
+ return typeof t != "function" ? (q.isEnabled() && !M.warnedMissingGlobals.has(e) && (M.warnedMissingGlobals.add(e), m.warn(
386
386
  "[Haori]",
387
387
  `${l.prefix}enhance-new could not resolve the global reference (load the library before Haori runs): ${e}`
388
388
  )), null) : t;
@@ -394,7 +394,7 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
394
394
  * @returns 戻り値はありません。
395
395
  */
396
396
  static warnUnknownName(e) {
397
- !W.isEnabled() || k.warnedUnknownNames.has(e) || (k.warnedUnknownNames.add(e), m.warn(
397
+ !q.isEnabled() || M.warnedUnknownNames.has(e) || (M.warnedUnknownNames.add(e), m.warn(
398
398
  "[Haori]",
399
399
  `Enhancer "${e}" is not registered yet; the declaration is kept pending and applied when it is registered (Haori.enhancers.register('${e}', {init(el) {...}})).`
400
400
  ));
@@ -417,30 +417,30 @@ const At = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ze = "new:
417
417
  m.error("[Haori]", `${e} failed:`, i);
418
418
  }
419
419
  };
420
- k.mutationCapture ? k.mutationCapture(r) : r();
420
+ M.mutationCapture ? M.mutationCapture(r) : r();
421
421
  }
422
422
  };
423
- k.enhancers = /* @__PURE__ */ new Map(), k.instances = /* @__PURE__ */ new WeakMap(), k.warnedUnknownNames = /* @__PURE__ */ new Set(), k.warnedMissingGlobals = /* @__PURE__ */ new Set(), k.visited = /* @__PURE__ */ new WeakSet(), k.mutationCapture = null;
424
- let re = k;
425
- const et = "yyyy/MM/dd HH:mm", vt = "en-US", Ge = 1e4;
426
- function ue(b) {
423
+ M.enhancers = /* @__PURE__ */ new Map(), M.instances = /* @__PURE__ */ new WeakMap(), M.warnedUnknownNames = /* @__PURE__ */ new Set(), M.warnedMissingGlobals = /* @__PURE__ */ new Set(), M.visited = /* @__PURE__ */ new WeakSet(), M.mutationCapture = null;
424
+ let te = M;
425
+ const _e = "yyyy/MM/dd HH:mm", At = "en-US", ze = 1e4;
426
+ function le(b) {
427
427
  return String(b).padStart(2, "0");
428
428
  }
429
- function tt(b, e, t, r, i, n) {
429
+ function et(b, e, t, r, i, n) {
430
430
  return {
431
431
  yyyy: String(b).padStart(4, "0"),
432
- yy: ue(b % 100),
433
- MM: ue(e),
432
+ yy: le(b % 100),
433
+ MM: le(e),
434
434
  M: String(e),
435
- dd: ue(t),
435
+ dd: le(t),
436
436
  d: String(t),
437
- HH: ue(r),
437
+ HH: le(r),
438
438
  H: String(r),
439
- mm: ue(i),
440
- ss: ue(n)
439
+ mm: le(i),
440
+ ss: le(n)
441
441
  };
442
442
  }
443
- function rt(b, e) {
443
+ function tt(b, e) {
444
444
  let t;
445
445
  try {
446
446
  t = new Intl.DateTimeFormat("en-US", {
@@ -460,9 +460,9 @@ function rt(b, e) {
460
460
  for (const u of t)
461
461
  u.type !== "literal" && (r[u.type] = u.value);
462
462
  const i = Number(r.year), n = Number(r.month), s = Number(r.day), a = Number(r.hour), o = Number(r.minute), c = Number(r.second);
463
- return !Number.isFinite(i) || !Number.isFinite(n) || !Number.isFinite(s) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(c) ? null : tt(i, n, s, a, o, c);
463
+ return !Number.isFinite(i) || !Number.isFinite(n) || !Number.isFinite(s) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(c) ? null : et(i, n, s, a, o, c);
464
464
  }
465
- function Pe(b, e = et, t) {
465
+ function Pe(b, e = _e, t) {
466
466
  if (b == null || b === "")
467
467
  return "";
468
468
  const r = b instanceof Date ? b : new Date(b);
@@ -470,10 +470,10 @@ function Pe(b, e = et, t) {
470
470
  return "";
471
471
  let i;
472
472
  if (typeof t == "string" && t.trim() !== "") {
473
- if (i = rt(r, t.trim()), i === null)
473
+ if (i = tt(r, t.trim()), i === null)
474
474
  return "";
475
475
  } else
476
- i = tt(
476
+ i = et(
477
477
  r.getFullYear(),
478
478
  r.getMonth() + 1,
479
479
  r.getDate(),
@@ -487,15 +487,15 @@ function Pe(b, e = et, t) {
487
487
  (s, a) => a !== void 0 ? a === "" ? "'" : a : n[s]
488
488
  );
489
489
  }
490
- const wt = "yyyy-MM-dd";
491
- function it(b = et, e) {
490
+ const vt = "yyyy-MM-dd";
491
+ function rt(b = _e, e) {
492
492
  return Pe(/* @__PURE__ */ new Date(), b, e);
493
493
  }
494
- function nt(b = 0, e = wt, t) {
494
+ function it(b = 0, e = vt, t) {
495
495
  const r = Number.isFinite(b) ? Math.trunc(b) : 0, i = typeof t == "string" && t.trim() !== "" ? t.trim() : "";
496
496
  let n, s, a;
497
497
  if (i !== "") {
498
- const c = rt(/* @__PURE__ */ new Date(), i);
498
+ const c = tt(/* @__PURE__ */ new Date(), i);
499
499
  if (c === null)
500
500
  return "";
501
501
  n = Number(c.yyyy), s = Number(c.MM), a = Number(c.dd);
@@ -506,7 +506,7 @@ function nt(b = 0, e = wt, t) {
506
506
  const o = new Date(Date.UTC(n, s - 1, a + r));
507
507
  return Pe(o, e, "UTC");
508
508
  }
509
- function st(b, e) {
509
+ function nt(b, e) {
510
510
  if (b == null)
511
511
  return "";
512
512
  let t;
@@ -525,23 +525,23 @@ function st(b, e) {
525
525
  const i = Math.max(0, Math.trunc(e));
526
526
  r.minimumFractionDigits = i, r.maximumFractionDigits = i;
527
527
  }
528
- return new Intl.NumberFormat(vt, r).format(t);
528
+ return new Intl.NumberFormat(At, r).format(t);
529
529
  }
530
- function at(b, e, t) {
530
+ function st(b, e, t) {
531
531
  let r, i, n;
532
532
  if (e === void 0 ? (r = 0, i = b, n = 1) : (r = b, i = e, n = t === void 0 ? 1 : t), !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(n) || n === 0)
533
533
  return [];
534
534
  r = Math.trunc(r), i = Math.trunc(i), n = Math.trunc(n);
535
535
  const s = [];
536
536
  if (n > 0)
537
- for (let a = r; a < i && s.length < Ge; a += n)
537
+ for (let a = r; a < i && s.length < ze; a += n)
538
538
  s.push(a);
539
539
  else
540
- for (let a = r; a > i && s.length < Ge; a += n)
540
+ for (let a = r; a > i && s.length < ze; a += n)
541
541
  s.push(a);
542
542
  return s;
543
543
  }
544
- function ot(b, e, t = {}) {
544
+ function at(b, e, t = {}) {
545
545
  const r = Math.trunc(Number(b));
546
546
  if (!Number.isFinite(r) || r <= 0)
547
547
  return [];
@@ -578,62 +578,62 @@ function ot(b, e, t = {}) {
578
578
  }
579
579
  return c;
580
580
  }
581
- const St = /^(\d{4})-(\d{1,2})$/, Rt = 1200;
582
- function xe(b, e) {
581
+ const wt = /^(\d{4})-(\d{1,2})$/, St = 1200;
582
+ function Ne(b, e) {
583
583
  const t = Number(b);
584
584
  return Number.isFinite(t) ? Math.trunc(t) : e;
585
585
  }
586
586
  function Le(b, e) {
587
587
  if (typeof b != "string")
588
588
  return "";
589
- const t = St.exec(b.trim());
589
+ const t = wt.exec(b.trim());
590
590
  if (!t)
591
591
  return "";
592
592
  const r = Number(t[1]), i = Number(t[2]);
593
593
  if (i < 1 || i > 12)
594
594
  return "";
595
595
  const n = Number.isFinite(e) ? Math.trunc(e) : 0, s = r * 12 + (i - 1) + n, a = Math.floor(s / 12), o = s - a * 12 + 1;
596
- return `${String(a).padStart(4, "0")}-${ue(o)}`;
596
+ return `${String(a).padStart(4, "0")}-${le(o)}`;
597
597
  }
598
- function Tt(b) {
598
+ function Rt(b) {
599
599
  if (typeof b == "string" && b.trim() !== "")
600
600
  return Le(b, 0);
601
601
  const e = /* @__PURE__ */ new Date();
602
- return `${String(e.getFullYear()).padStart(4, "0")}-${ue(e.getMonth() + 1)}`;
602
+ return `${String(e.getFullYear()).padStart(4, "0")}-${le(e.getMonth() + 1)}`;
603
603
  }
604
- function lt(b, e) {
604
+ function ot(b, e) {
605
605
  const t = Math.trunc(Number(b));
606
606
  if (!Number.isFinite(t) || t < 0)
607
607
  return [];
608
- const r = Tt(e);
608
+ const r = Rt(e);
609
609
  if (r === "")
610
610
  return [];
611
- const i = Math.min(t, Rt), n = [];
611
+ const i = Math.min(t, St), n = [];
612
612
  for (let s = 0; s <= i; s += 1) {
613
613
  const a = Le(r, -s);
614
614
  n.push({ targetMonth: a, label: a.replace(/-/g, "/") });
615
615
  }
616
616
  return n;
617
617
  }
618
- function ct(b, e) {
618
+ function lt(b, e) {
619
619
  const t = { start: 0, end: 0, total: 0, empty: !0 };
620
620
  if (!b || typeof b != "object")
621
621
  return t;
622
- const r = b, i = xe(r.totalElements ?? r.totalCount, 0);
622
+ const r = b, i = Ne(r.totalElements ?? r.totalCount, 0);
623
623
  if (i <= 0)
624
624
  return t;
625
- const n = Math.max(0, xe(r.number, 0)), s = Math.max(0, xe(r.size, 0)), a = n * s, o = Math.min(a + 1, i);
625
+ const n = Math.max(0, Ne(r.number, 0)), s = Math.max(0, Ne(r.size, 0)), a = n * s, o = Math.min(a + 1, i);
626
626
  let c;
627
627
  if (e !== void 0 && Number.isFinite(e))
628
628
  c = Math.max(0, Math.trunc(e));
629
629
  else {
630
- const d = xe(r.numberOfElements, NaN);
630
+ const d = Ne(r.numberOfElements, NaN);
631
631
  c = Number.isFinite(d) ? d : Math.min(s, i - a);
632
632
  }
633
633
  const u = Math.min(a + c, i);
634
634
  return { start: o, end: Math.max(u, o), total: i, empty: !1 };
635
635
  }
636
- function ut(b, e, t) {
636
+ function ct(b, e, t) {
637
637
  if (!Array.isArray(b) || b.length === 0)
638
638
  return null;
639
639
  const r = String(t), i = b.find(
@@ -641,7 +641,7 @@ function ut(b, e, t) {
641
641
  );
642
642
  return i === void 0 ? null : i;
643
643
  }
644
- function dt(b, e) {
644
+ function ut(b, e) {
645
645
  if (!Array.isArray(b))
646
646
  return 0;
647
647
  let t = 0;
@@ -654,25 +654,25 @@ function dt(b, e) {
654
654
  }
655
655
  return t;
656
656
  }
657
- function ft(b, e) {
657
+ function dt(b, e) {
658
658
  return e == null || b == null ? String(b) : String(b[e]);
659
659
  }
660
- function ht(b, e) {
660
+ function ft(b, e) {
661
661
  if (!Array.isArray(b))
662
662
  return [];
663
663
  const t = /* @__PURE__ */ new Set(), r = [];
664
664
  for (const i of b) {
665
- const n = ft(i, e);
665
+ const n = dt(i, e);
666
666
  t.has(n) || (t.add(n), r.push(i));
667
667
  }
668
668
  return r;
669
669
  }
670
- function pt(b, e) {
670
+ function ht(b, e) {
671
671
  if (!Array.isArray(b))
672
672
  return [];
673
673
  const t = /* @__PURE__ */ new Map(), r = [];
674
674
  for (const i of b) {
675
- const n = ft(i, e), s = t.get(n);
675
+ const n = dt(i, e), s = t.get(n);
676
676
  if (s === void 0) {
677
677
  const a = i == null ? i : i[e];
678
678
  t.set(n, r.length), r.push({ key: a, items: [i] });
@@ -681,20 +681,20 @@ function pt(b, e) {
681
681
  }
682
682
  return r;
683
683
  }
684
- const Dt = Object.freeze({
684
+ const Tt = Object.freeze({
685
685
  date: Pe,
686
- now: it,
687
- today: nt,
688
- number: st,
689
- pages: ot,
690
- range: at,
686
+ now: rt,
687
+ today: it,
688
+ number: nt,
689
+ pages: at,
690
+ range: st,
691
691
  monthAdd: Le,
692
- monthRange: lt,
693
- pageSummary: ct,
694
- findBy: ut,
695
- sum: dt,
696
- distinct: ht,
697
- groupBy: pt
692
+ monthRange: ot,
693
+ pageSummary: lt,
694
+ findBy: ct,
695
+ sum: ut,
696
+ distinct: ft,
697
+ groupBy: ht
698
698
  });
699
699
  class qe {
700
700
  constructor() {
@@ -827,7 +827,7 @@ const je = class je {
827
827
  }
828
828
  };
829
829
  je.ASYNC_QUEUE = new qe();
830
- let z = je;
830
+ let K = je;
831
831
  const R = class R {
832
832
  /**
833
833
  * ストレージを、参照が例外になる環境でも安全に読み出します。
@@ -974,7 +974,7 @@ const R = class R {
974
974
  * @returns 戻り値はありません。
975
975
  */
976
976
  static reportUnusableBindingKeys(e) {
977
- if (e.length === 0 || !W.isEnabled())
977
+ if (e.length === 0 || !q.isEnabled())
978
978
  return;
979
979
  const t = e.filter(
980
980
  (r) => !this.loggedUnusableBindingKeys.has(r)
@@ -1272,7 +1272,7 @@ let ${e.join(", ")};`;
1272
1272
  );
1273
1273
  return;
1274
1274
  }
1275
- W.isEnabled() && (e.forEach((r) => {
1275
+ q.isEnabled() && (e.forEach((r) => {
1276
1276
  this.pendingUnresolvedIdentifiers.add(r);
1277
1277
  }), this.scheduleUnresolvedIdentifierReport());
1278
1278
  }
@@ -1283,7 +1283,7 @@ let ${e.join(", ")};`;
1283
1283
  * @return 戻り値はありません。
1284
1284
  */
1285
1285
  static scheduleUnresolvedIdentifierReport() {
1286
- this.unresolvedReportScheduled || (this.unresolvedReportScheduled = !0, z.waitForIdle().then(() => {
1286
+ this.unresolvedReportScheduled || (this.unresolvedReportScheduled = !0, K.waitForIdle().then(() => {
1287
1287
  this.unresolvedReportScheduled = !1, this.reportUnresolvedIdentifiers();
1288
1288
  }));
1289
1289
  }
@@ -1329,7 +1329,7 @@ let ${e.join(", ")};`;
1329
1329
  * @return 戻り値はありません。
1330
1330
  */
1331
1331
  static recordRowScopeIdentifiers(e) {
1332
- if (W.isEnabled())
1332
+ if (q.isEnabled())
1333
1333
  for (const t of e)
1334
1334
  typeof t == "string" && t !== "" && this.rowScopeIdentifiers.add(t);
1335
1335
  }
@@ -1350,7 +1350,7 @@ let ${e.join(", ")};`;
1350
1350
  this.pendingScopeMissingIdentifiers.delete(t);
1351
1351
  return;
1352
1352
  }
1353
- this.pendingScopeMissingIdentifiers.set(t, new Set(e)), !this.scopeMissingReportScheduled && (this.scopeMissingReportScheduled = !0, z.waitForIdle().then(() => {
1353
+ this.pendingScopeMissingIdentifiers.set(t, new Set(e)), !this.scopeMissingReportScheduled && (this.scopeMissingReportScheduled = !0, K.waitForIdle().then(() => {
1354
1354
  this.scopeMissingReportScheduled = !1, this.reportScopeMissingIdentifiers();
1355
1355
  }));
1356
1356
  }
@@ -1499,14 +1499,14 @@ ${t}`;
1499
1499
  s && (this.BUILTIN_DATA_REFERENCE_PATTERN.test(n) ? a[this.BUILTIN_NAMESPACE] = {
1500
1500
  ...this.BUILTIN_HELPERS,
1501
1501
  [this.BUILTIN_DATA_PROPERTY]: { ...a }
1502
- } : a[this.BUILTIN_NAMESPACE] = this.BUILTIN_HELPERS), this.pruneResolvedIdentifiers(a), W.isEnabled() && this.recordSuppliedIdentifiers(a);
1502
+ } : a[this.BUILTIN_NAMESPACE] = this.BUILTIN_HELPERS), this.pruneResolvedIdentifiers(a), q.isEnabled() && this.recordSuppliedIdentifiers(a);
1503
1503
  const o = this.canAttemptMissingIdentifierRecovery(e), c = this.extractFreeIdentifiers(e).filter(
1504
1504
  (d) => !(d in a) && // 禁止グローバルは buildAssignments が `const` で遮蔽するため対象外
1505
1505
  // (二重宣言は構文エラーになる)。
1506
1506
  !this.FORBIDDEN_NAMES.includes(d) && // 標準組み込み(`Math` など)は式から参照できる仕様のため遮蔽しない。
1507
1507
  !this.ALLOWED_GLOBAL_IDENTIFIERS.has(d)
1508
1508
  );
1509
- if (W.isEnabled()) {
1509
+ if (q.isEnabled()) {
1510
1510
  const d = this.extractBoundIdentifiers(e);
1511
1511
  this.recordScopeMissingIdentifiers(
1512
1512
  d.size === 0 ? c : c.filter((g) => !d.has(g)),
@@ -1527,8 +1527,8 @@ ${t}`;
1527
1527
  return { value: null, unresolvedReference: !1 };
1528
1528
  try {
1529
1529
  const y = [], E = this.wrapBoundValues(a);
1530
- g.bindKeys.forEach((I) => {
1531
- y.push(E[I]);
1530
+ g.bindKeys.forEach((D) => {
1531
+ y.push(E[D]);
1532
1532
  });
1533
1533
  const A = this.withBlockedPropertyAccess(
1534
1534
  () => g.evaluator(...y)
@@ -2308,7 +2308,7 @@ return (${y});${g}`;
2308
2308
  }
2309
2309
  };
2310
2310
  R.MAX_IDENTIFIER_RECOVERY_COUNT = 8, R.BUILTIN_NAMESPACE = "haori", R.BUILTIN_HELPERS = {
2311
- ...Dt
2311
+ ...Tt
2312
2312
  }, R.BUILTIN_REFERENCE_PATTERN = /(^|[^\w$.])haori(?![\w$])/, R.BUILTIN_DATA_PROPERTY = "data", R.BUILTIN_DATA_REFERENCE_PATTERN = /(^|[^\w$.])haori\s*(\.\s*data(?![\w$])|\[)/, R.IDENTIFIER_NAME_PATTERN = /^[\p{ID_Start}$_][\p{ID_Continue}$\u200C\u200D]*$/u, R.usableBindingKeyCache = /* @__PURE__ */ new Map(), R.loggedUnusableBindingKeys = /* @__PURE__ */ new Set(), R.compileFailedExpressions = /* @__PURE__ */ new Set(), R.forbiddenBindingValueCache = /* @__PURE__ */ new WeakMap(), R.forbiddenBindingValueCacheResetScheduled = !1, R.loggedForbiddenKeySignatures = /* @__PURE__ */ new Set(), R.loggedForbiddenKeyResetScheduled = !1, R.FORBIDDEN_NAMES = [
2313
2313
  // グローバルオブジェクト
2314
2314
  "window",
@@ -2496,13 +2496,13 @@ R.MAX_IDENTIFIER_RECOVERY_COUNT = 8, R.BUILTIN_NAMESPACE = "haori", R.BUILTIN_HE
2496
2496
  "%",
2497
2497
  "..."
2498
2498
  ]), R.strictComparisonSplits = /* @__PURE__ */ new Map(), R.WRAPPED_VALUES = /* @__PURE__ */ new WeakSet();
2499
- let ne = R;
2500
- const me = "data-haori-if-disabled", Ye = "input, select, textarea, button, fieldset", M = class M {
2499
+ let ie = R;
2500
+ const he = "data-haori-if-disabled", Ge = "input, select, textarea, button, fieldset", C = class C {
2501
2501
  /**
2502
2502
  * 集計状態を初期化します。
2503
2503
  */
2504
2504
  static reset() {
2505
- M.ELEMENT_STORES.clear(), M.ensureGlobalAccess();
2505
+ C.ELEMENT_STORES.clear(), C.ensureGlobalAccess();
2506
2506
  }
2507
2507
  /**
2508
2508
  * 集計を開始します。
@@ -2510,7 +2510,7 @@ const me = "data-haori-if-disabled", Ye = "input, select, textarea, button, fiel
2510
2510
  * @returns 戻り値はありません。
2511
2511
  */
2512
2512
  static start() {
2513
- M.collecting = !0;
2513
+ C.collecting = !0;
2514
2514
  }
2515
2515
  /**
2516
2516
  * 集計を停止します。
@@ -2518,7 +2518,7 @@ const me = "data-haori-if-disabled", Ye = "input, select, textarea, button, fiel
2518
2518
  * @returns 戻り値はありません。
2519
2519
  */
2520
2520
  static stop() {
2521
- M.collecting = !1;
2521
+ C.collecting = !1;
2522
2522
  }
2523
2523
  /**
2524
2524
  * 集計中かどうかを返します。
@@ -2526,7 +2526,7 @@ const me = "data-haori-if-disabled", Ye = "input, select, textarea, button, fiel
2526
2526
  * @returns 集計中なら true
2527
2527
  */
2528
2528
  static isCollecting() {
2529
- return M.collecting && W.isEnabled();
2529
+ return C.collecting && q.isEnabled();
2530
2530
  }
2531
2531
  /**
2532
2532
  * 現在の集計結果スナップショットを返します。
@@ -2534,7 +2534,7 @@ const me = "data-haori-if-disabled", Ye = "input, select, textarea, button, fiel
2534
2534
  * @returns エレメントごとの集計結果
2535
2535
  */
2536
2536
  static snapshot() {
2537
- return M.ensureGlobalAccess(), [...M.ELEMENT_STORES.entries()].map(([e, t]) => ({
2537
+ return C.ensureGlobalAccess(), [...C.ELEMENT_STORES.entries()].map(([e, t]) => ({
2538
2538
  elementId: e,
2539
2539
  tagName: t.tagName,
2540
2540
  attributes: [...t.attributes.entries()].map(([r, i]) => ({
@@ -2543,7 +2543,7 @@ const me = "data-haori-if-disabled", Ye = "input, select, textarea, button, fiel
2543
2543
  calls: i.calls,
2544
2544
  totalDurationMs: i.totalDurationMs,
2545
2545
  maxDurationMs: i.maxDurationMs,
2546
- placeholders: M.sortPlaceholders(
2546
+ placeholders: C.sortPlaceholders(
2547
2547
  i.placeholders
2548
2548
  )
2549
2549
  })).sort((r, i) => i.calls - r.calls),
@@ -2553,7 +2553,7 @@ const me = "data-haori-if-disabled", Ye = "input, select, textarea, button, fiel
2553
2553
  calls: i.calls,
2554
2554
  totalDurationMs: i.totalDurationMs,
2555
2555
  maxDurationMs: i.maxDurationMs,
2556
- placeholders: M.sortPlaceholders(
2556
+ placeholders: C.sortPlaceholders(
2557
2557
  i.placeholders
2558
2558
  )
2559
2559
  })).sort((r, i) => i.calls - r.calls)
@@ -2577,7 +2577,7 @@ const me = "data-haori-if-disabled", Ye = "input, select, textarea, button, fiel
2577
2577
  * @param limit 出力する宣言の数。既定は 20
2578
2578
  * @returns 要約。合計は `limit` で絞る前の全件から求める
2579
2579
  */
2580
- static report(e = M.DEFAULT_REPORT_LIMIT) {
2580
+ static report(e = C.DEFAULT_REPORT_LIMIT) {
2581
2581
  const t = /* @__PURE__ */ new Map();
2582
2582
  let r = 0, i = 0;
2583
2583
  const n = (c, u, d) => {
@@ -2601,7 +2601,7 @@ const me = "data-haori-if-disabled", Ye = "input, select, textarea, button, fiel
2601
2601
  d.maxDurationMs
2602
2602
  ), d.totalDurationMs > g.representativeDurationMs && (g.where = u, g.representativeDurationMs = d.totalDurationMs);
2603
2603
  };
2604
- M.snapshot().forEach((c) => {
2604
+ C.snapshot().forEach((c) => {
2605
2605
  c.attributes.forEach((u) => {
2606
2606
  n(
2607
2607
  `@${u.name}
@@ -2631,7 +2631,7 @@ ${u.template}`,
2631
2631
  entryCount: s.length,
2632
2632
  top: a
2633
2633
  };
2634
- return M.logReport(o), o;
2634
+ return C.logReport(o), o;
2635
2635
  }
2636
2636
  /**
2637
2637
  * 要約を表形式でコンソールへ出力します。
@@ -2661,30 +2661,30 @@ ${u.template}`,
2661
2661
  * @param expressions 今回評価した式一覧
2662
2662
  */
2663
2663
  static record(e, t, r) {
2664
- if (!W.isEnabled() || !e || t.length === 0 || (M.ensureGlobalAccess(), !M.isCollecting()))
2664
+ if (!q.isEnabled() || !e || t.length === 0 || (C.ensureGlobalAccess(), !C.isCollecting()))
2665
2665
  return;
2666
- const i = M.getOrCreateElementStore(
2666
+ const i = C.getOrCreateElementStore(
2667
2667
  e.element
2668
2668
  );
2669
2669
  if (e.kind === "attribute") {
2670
- const s = M.getOrCreateCounter(
2670
+ const s = C.getOrCreateCounter(
2671
2671
  i.attributes,
2672
2672
  e.rawName,
2673
2673
  e.template
2674
2674
  );
2675
- M.updateCounter(
2675
+ C.updateCounter(
2676
2676
  s,
2677
2677
  t,
2678
2678
  r
2679
2679
  );
2680
2680
  return;
2681
2681
  }
2682
- const n = M.getOrCreateCounter(
2682
+ const n = C.getOrCreateCounter(
2683
2683
  i.texts,
2684
2684
  String(e.childIndex),
2685
2685
  e.template
2686
2686
  );
2687
- M.updateCounter(
2687
+ C.updateCounter(
2688
2688
  n,
2689
2689
  t,
2690
2690
  r
@@ -2694,15 +2694,15 @@ ${u.template}`,
2694
2694
  * globalThis から dev-only の取得窓口を参照できるようにします。
2695
2695
  */
2696
2696
  static ensureGlobalAccess() {
2697
- if (!W.isEnabled())
2697
+ if (!q.isEnabled())
2698
2698
  return;
2699
2699
  const e = globalThis;
2700
- e[M.GLOBAL_KEY] === void 0 && (e[M.GLOBAL_KEY] = {
2701
- start: () => M.start(),
2702
- stop: () => M.stop(),
2703
- reset: () => M.reset(),
2704
- snapshot: () => M.snapshot(),
2705
- report: (t) => M.report(t)
2700
+ e[C.GLOBAL_KEY] === void 0 && (e[C.GLOBAL_KEY] = {
2701
+ start: () => C.start(),
2702
+ stop: () => C.stop(),
2703
+ reset: () => C.reset(),
2704
+ snapshot: () => C.snapshot(),
2705
+ report: (t) => C.report(t)
2706
2706
  });
2707
2707
  }
2708
2708
  /**
@@ -2712,7 +2712,7 @@ ${u.template}`,
2712
2712
  * @returns 集計ストア
2713
2713
  */
2714
2714
  static getOrCreateElementStore(e) {
2715
- const t = M.createElementId(e), r = M.ELEMENT_STORES.get(t);
2715
+ const t = C.createElementId(e), r = C.ELEMENT_STORES.get(t);
2716
2716
  if (r)
2717
2717
  return r;
2718
2718
  const i = {
@@ -2720,7 +2720,7 @@ ${u.template}`,
2720
2720
  attributes: /* @__PURE__ */ new Map(),
2721
2721
  texts: /* @__PURE__ */ new Map()
2722
2722
  };
2723
- return M.ELEMENT_STORES.set(t, i), i;
2723
+ return C.ELEMENT_STORES.set(t, i), i;
2724
2724
  }
2725
2725
  /**
2726
2726
  * カウンタを取得または初期化します。
@@ -2770,7 +2770,7 @@ ${u.template}`,
2770
2770
  */
2771
2771
  static updateCounter(e, t, r) {
2772
2772
  e.calls += 1, e.totalDurationMs += r, e.maxDurationMs = Math.max(e.maxDurationMs, r), t.forEach((i) => {
2773
- const n = M.getOrCreatePlaceholder(
2773
+ const n = C.getOrCreatePlaceholder(
2774
2774
  e.placeholders,
2775
2775
  i.expression
2776
2776
  );
@@ -2809,12 +2809,12 @@ ${u.template}`,
2809
2809
  * @returns 結果と所要時間
2810
2810
  */
2811
2811
  static measure(e) {
2812
- if (!M.isCollecting())
2812
+ if (!C.isCollecting())
2813
2813
  return { value: e(), durationMs: 0 };
2814
- const t = M.now();
2814
+ const t = C.now();
2815
2815
  return {
2816
2816
  value: e(),
2817
- durationMs: M.now() - t
2817
+ durationMs: C.now() - t
2818
2818
  };
2819
2819
  }
2820
2820
  /**
@@ -2841,29 +2841,29 @@ ${u.template}`,
2841
2841
  return t.join(" > ");
2842
2842
  }
2843
2843
  };
2844
- M.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", M.ELEMENT_STORES = /* @__PURE__ */ new Map(), M.collecting = !1, M.DEFAULT_REPORT_LIMIT = 20;
2845
- let Ce = M;
2846
- const de = class de {
2844
+ C.GLOBAL_KEY = "__HAORI_EVALUATION_PROFILE__", C.ELEMENT_STORES = /* @__PURE__ */ new Map(), C.collecting = !1, C.DEFAULT_REPORT_LIMIT = 20;
2845
+ let Me = C;
2846
+ const ce = class ce {
2847
2847
  /**
2848
2848
  * フラグメントのコンストラクタ。
2849
2849
  *
2850
2850
  * @param target 対象ノード
2851
2851
  */
2852
2852
  constructor(e) {
2853
- this.parent = null, this.mounted = !1, this.skipMutationNodes = !1, this.skipMutationNodeSet = /* @__PURE__ */ new Set(), this.target = e, de.FRAGMENT_CACHE.set(e, this);
2853
+ this.parent = null, this.mounted = !1, this.skipMutationNodes = !1, this.skipMutationNodeSet = /* @__PURE__ */ new Set(), this.target = e, ce.FRAGMENT_CACHE.set(e, this);
2854
2854
  }
2855
2855
  static get(e) {
2856
2856
  if (e == null)
2857
2857
  return null;
2858
- if (de.FRAGMENT_CACHE.has(e))
2859
- return de.FRAGMENT_CACHE.get(e);
2858
+ if (ce.FRAGMENT_CACHE.has(e))
2859
+ return ce.FRAGMENT_CACHE.get(e);
2860
2860
  let t;
2861
2861
  switch (e.nodeType) {
2862
2862
  case Node.ELEMENT_NODE:
2863
2863
  t = new S(e);
2864
2864
  break;
2865
2865
  case Node.TEXT_NODE:
2866
- t = new se(e);
2866
+ t = new ne(e);
2867
2867
  break;
2868
2868
  case Node.COMMENT_NODE:
2869
2869
  t = new We(e);
@@ -2884,7 +2884,7 @@ const de = class de {
2884
2884
  * @returns キャッシュ済みのフラグメント。無ければ `null`
2885
2885
  */
2886
2886
  static peek(e) {
2887
- return de.FRAGMENT_CACHE.get(e) ?? null;
2887
+ return ce.FRAGMENT_CACHE.get(e) ?? null;
2888
2888
  }
2889
2889
  /**
2890
2890
  * 指定した子ノードを、エンジン自身が出し入れしている最中かどうかを返します。
@@ -2923,7 +2923,7 @@ const de = class de {
2923
2923
  return Promise.resolve();
2924
2924
  if (this.parent) {
2925
2925
  const e = this.parent, t = e.skipMutationNodes;
2926
- return e.holdSkipMutationNode(this.target), z.enqueue(() => {
2926
+ return e.holdSkipMutationNode(this.target), K.enqueue(() => {
2927
2927
  e.skipMutationNodes = !0, this.target.parentNode === e.getTarget() && e.getTarget().removeChild(this.target), this.mounted = !1;
2928
2928
  }).finally(() => {
2929
2929
  e.skipMutationNodes = t, e.releaseSkipMutationNode(this.target);
@@ -2931,7 +2931,7 @@ const de = class de {
2931
2931
  } else {
2932
2932
  const e = this.target.parentNode;
2933
2933
  if (e)
2934
- return z.enqueue(() => {
2934
+ return K.enqueue(() => {
2935
2935
  this.target.parentNode === e && e.removeChild(this.target), this.mounted = !1;
2936
2936
  });
2937
2937
  this.mounted = !1;
@@ -2948,7 +2948,7 @@ const de = class de {
2948
2948
  return Promise.resolve();
2949
2949
  if (this.parent) {
2950
2950
  const e = this.parent, t = e.skipMutationNodes;
2951
- return e.holdSkipMutationNode(this.target), z.enqueue(() => {
2951
+ return e.holdSkipMutationNode(this.target), K.enqueue(() => {
2952
2952
  e.skipMutationNodes = !0, this.target.parentNode !== e.getTarget() && e.getTarget().appendChild(this.target), this.mounted = !0;
2953
2953
  }).finally(() => {
2954
2954
  e.skipMutationNodes = t, e.releaseSkipMutationNode(this.target);
@@ -2979,7 +2979,7 @@ const de = class de {
2979
2979
  * @return 除去のPromise
2980
2980
  */
2981
2981
  remove(e = !0) {
2982
- return this.parent && this.parent.removeChild(this), de.FRAGMENT_CACHE.delete(this.target), e ? this.unmount() : Promise.resolve();
2982
+ return this.parent && this.parent.removeChild(this), ce.FRAGMENT_CACHE.delete(this.target), e ? this.unmount() : Promise.resolve();
2983
2983
  }
2984
2984
  /**
2985
2985
  * 対象ノードを取得します。
@@ -3006,9 +3006,9 @@ const de = class de {
3006
3006
  this.parent = e;
3007
3007
  }
3008
3008
  };
3009
- de.FRAGMENT_CACHE = /* @__PURE__ */ new WeakMap();
3010
- let D = de;
3011
- const w = class w extends D {
3009
+ ce.FRAGMENT_CACHE = /* @__PURE__ */ new WeakMap();
3010
+ let I = ce;
3011
+ const w = class w extends I {
3012
3012
  /**
3013
3013
  * エレメントフラグメントのコンストラクタ。
3014
3014
  * アトリビュートや子フラグメントの作成も行います。
@@ -3028,7 +3028,7 @@ const w = class w extends D {
3028
3028
  e.childNodes.forEach((i) => {
3029
3029
  if (w.isOwnedWithinExternal(i))
3030
3030
  return;
3031
- const n = D.peek(i)?.getParent() ?? null, s = D.get(i);
3031
+ const n = I.peek(i)?.getParent() ?? null, s = I.get(i);
3032
3032
  n !== null && n !== this && (t = t ?? n, n === t && r.push(s)), s.setParent(this), this.children.push(s);
3033
3033
  }), t !== null && this.takeOverPlaceOf(t, r);
3034
3034
  }
@@ -3068,7 +3068,7 @@ const w = class w extends D {
3068
3068
  * @returns 取り込まない場合 true
3069
3069
  */
3070
3070
  static isOwnedWithinExternal(e) {
3071
- const r = D.peek(e)?.getParent() ?? null;
3071
+ const r = I.peek(e)?.getParent() ?? null;
3072
3072
  if (r === null)
3073
3073
  return !1;
3074
3074
  const i = r.getTarget().closest(`[${l.prefix}external]`);
@@ -3161,7 +3161,7 @@ const w = class w extends D {
3161
3161
  */
3162
3162
  static dropIfVisibilityArtifacts(e) {
3163
3163
  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) => {
3164
- t.hasAttribute(me) && (t.removeAttribute(me), t.removeAttribute("disabled"));
3164
+ t.hasAttribute(he) && (t.removeAttribute(he), t.removeAttribute("disabled"));
3165
3165
  }));
3166
3166
  }
3167
3167
  /**
@@ -3172,7 +3172,7 @@ const w = class w extends D {
3172
3172
  */
3173
3173
  remove(e = !0) {
3174
3174
  const t = [];
3175
- return e && re.destroySubtree(this.getTarget()), this.getTarget().hasAttribute(`${l.prefix}external`) ? this.detachPreservingSubtree(e) : (this.children.slice().forEach((r) => {
3175
+ return e && te.destroySubtree(this.getTarget()), this.getTarget().hasAttribute(`${l.prefix}external`) ? this.detachPreservingSubtree(e) : (this.children.slice().forEach((r) => {
3176
3176
  t.push(r.remove(!1));
3177
3177
  }), this.children.length = 0, this.attributeMap.clear(), this.bindingData = null, this.bindingDataCache = null, this.derivedBindingData = null, this.descendantBindingDataCache = null, this.template && (t.push(this.template.remove(!1)), this.template = null), this.eachInputSignature = null, this.deriveSubtreeSignature = null, this.deriveInputSignature = null, this.clearUnappliedValueWrite(), t.push(super.remove(e)), Promise.all(t).then(() => {
3178
3178
  }));
@@ -3627,7 +3627,7 @@ const w = class w extends D {
3627
3627
  return Promise.resolve();
3628
3628
  const i = this.getTarget();
3629
3629
  if (i instanceof HTMLInputElement && i.type === "file")
3630
- return e === null || e === "" ? (this.value = null, i.value === "" ? Promise.resolve() : z.enqueue(() => {
3630
+ return e === null || e === "" ? (this.value = null, i.value === "" ? Promise.resolve() : K.enqueue(() => {
3631
3631
  i.value = "";
3632
3632
  })) : (m.warn(
3633
3633
  "[Haori]",
@@ -3716,7 +3716,7 @@ const w = class w extends D {
3716
3716
  */
3717
3717
  enqueueValueWrite(e) {
3718
3718
  this.skipChangeValue = !0;
3719
- const t = z.enqueue(e).finally(() => {
3719
+ const t = K.enqueue(e).finally(() => {
3720
3720
  this.skipChangeValue = !1;
3721
3721
  });
3722
3722
  return this.pendingValueWrite = t, t;
@@ -3809,7 +3809,7 @@ const w = class w extends D {
3809
3809
  * @returns 戻り値はありません。
3810
3810
  */
3811
3811
  static notifyValueToEnhancers(e) {
3812
- re.isApplied(e) && re.refreshSubtree(e);
3812
+ te.isApplied(e) && te.refreshSubtree(e);
3813
3813
  }
3814
3814
  /**
3815
3815
  * 「載らなかった書き込み」の記録を解除します。
@@ -4056,7 +4056,7 @@ const w = class w extends D {
4056
4056
  * @return 戻り値はありません。
4057
4057
  */
4058
4058
  static warnUnresolvedAttribute(e, t, r, i) {
4059
- if (!W.isEnabled())
4059
+ if (!q.isEnabled())
4060
4060
  return;
4061
4061
  const n = `${e} ${r}`;
4062
4062
  w.loggedUnresolvedAttributes.has(n) || (w.loggedUnresolvedAttributes.add(n), m.warn(
@@ -4103,7 +4103,7 @@ const w = class w extends D {
4103
4103
  const t = this.getTarget().closest("select");
4104
4104
  if (!t)
4105
4105
  return !1;
4106
- const r = D.get(t);
4106
+ const r = I.get(t);
4107
4107
  return r instanceof w ? r.hasPendingUserEdit() : !1;
4108
4108
  }
4109
4109
  /**
@@ -4227,7 +4227,7 @@ const w = class w extends D {
4227
4227
  * @returns 戻り値はありません。
4228
4228
  */
4229
4229
  static warnValueTypeDeclaration(e, t, r) {
4230
- if (!W.isEnabled())
4230
+ if (!q.isEnabled())
4231
4231
  return;
4232
4232
  const i = e instanceof HTMLInputElement ? `[type=${e.type}]` : "", n = `${e.tagName}${i} ${t} ${r}`;
4233
4233
  w.loggedValueTypeDeclarations.has(n) || (w.loggedValueTypeDeclarations.add(n), m.warn(
@@ -4368,7 +4368,7 @@ const w = class w extends D {
4368
4368
  const t = this.getTarget().closest("select");
4369
4369
  if (!t)
4370
4370
  return;
4371
- const r = D.get(t);
4371
+ const r = I.get(t);
4372
4372
  r instanceof w && r.syncValue();
4373
4373
  }
4374
4374
  /**
@@ -4452,7 +4452,7 @@ const w = class w extends D {
4452
4452
  const i = this.getTarget(), n = i.hasAttribute(e), s = t !== e && i.hasAttribute(t);
4453
4453
  if (!n && !s)
4454
4454
  return Promise.resolve();
4455
- const a = z.enqueue(() => {
4455
+ const a = K.enqueue(() => {
4456
4456
  n && i.removeAttribute(e), s && i.removeAttribute(t);
4457
4457
  }).finally(() => {
4458
4458
  this.releaseSelfWritingAttributes(r);
@@ -4485,13 +4485,13 @@ const w = class w extends D {
4485
4485
  return e === t ? this.removeAttribute(e) : this.removeAliasedAttribute(e, t);
4486
4486
  const o = new $e(e, r);
4487
4487
  if (n) {
4488
- const le = this.attributeMap.get(e);
4489
- if (le && (le.isEvaluate || le.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
4490
- const pe = z.enqueue(() => {
4488
+ const ye = this.attributeMap.get(e);
4489
+ if (ye && (ye.isEvaluate || ye.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
4490
+ const Te = K.enqueue(() => {
4491
4491
  }).finally(() => {
4492
4492
  this.releaseSelfWritingAttributes(s);
4493
4493
  });
4494
- return this.holdSelfWritingAttributes(s, pe), pe;
4494
+ return this.holdSelfWritingAttributes(s, Te), Te;
4495
4495
  }
4496
4496
  }
4497
4497
  this.attributeMap.set(e, o);
@@ -4500,39 +4500,39 @@ const w = class w extends D {
4500
4500
  element: c,
4501
4501
  rawName: e,
4502
4502
  template: r
4503
- }), d = o.isEvaluate || o.isRawEvaluate, g = e === t && w.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), y = o.isSingleExpression(), E = fe.joinEvaluateResults(u.results), A = u.results.length === 1 ? u.results[0] : E, I = t === "value" && w.resolveDeclaredValueType(c) === "boolean", C = A === !1 && !I, q = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || A === null || A === void 0 || C : g ? u.hasUnresolvedReference || A === null || A === void 0 || A === !1 : y ? u.hasUnresolvedReference || A === null || A === void 0 || C : d && E === "");
4504
- if (q && u.hasUnresolvedReference && w.warnUnresolvedAttribute(
4503
+ }), d = o.isEvaluate || o.isRawEvaluate, g = e === t && w.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), y = o.isSingleExpression(), E = ue.joinEvaluateResults(u.results), A = u.results.length === 1 ? u.results[0] : E, D = t === "value" && w.resolveDeclaredValueType(c) === "boolean", N = A === !1 && !D, B = !o.isForceEvaluation() && (t !== e ? u.hasUnresolvedReference || A === null || A === void 0 || N : g ? u.hasUnresolvedReference || A === null || A === void 0 || A === !1 : y ? u.hasUnresolvedReference || A === null || A === void 0 || N : d && E === "");
4504
+ if (B && u.hasUnresolvedReference && w.warnUnresolvedAttribute(
4505
4505
  e,
4506
4506
  t,
4507
4507
  r,
4508
4508
  c
4509
- ), W.isEnabled() && A === !1 && y) {
4510
- const le = o.getSingleExpression(), pe = le === null ? null : ne.diagnoseStrictComparison(
4511
- le,
4509
+ ), q.isEnabled() && A === !1 && y) {
4510
+ const ye = o.getSingleExpression(), Te = ye === null ? null : ie.diagnoseStrictComparison(
4511
+ ye,
4512
4512
  this.getBindingData()
4513
4513
  );
4514
- pe !== null && w.warnTypeMismatchedComparison(
4514
+ Te !== null && w.warnTypeMismatchedComparison(
4515
4515
  e,
4516
4516
  r,
4517
- pe,
4517
+ Te,
4518
4518
  c
4519
4519
  );
4520
4520
  }
4521
- const N = o.isForceEvaluation() ? r : y ? A : E, j = i && o.isEvaluate && t === "value" && w.isValuePropertyTarget(c), X = c.getRootNode(), _ = j && w.isUserEditableValue(c) && (c === X.activeElement || this.hasPendingUserEdit()), P = q || N === null || N === !1 && !I ? null : String(N), ae = e !== t && c.getAttribute(e) !== r, G = P === null ? c.hasAttribute(t) : c.getAttribute(t) !== P, T = P === null ? "" : P, L = j && !_ && c.value !== T, Y = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), Z = t === "selected" && c instanceof HTMLOptionElement, he = X.activeElement, ce = he !== null && (Y && c === he || Z && c.closest("select") === he) || (Y || Z) && this.hasPendingCheckableUserEdit(Z), U = P !== null, K = Y && o.isEvaluate && !ce && c.checked !== U, te = Z && o.isEvaluate && !ce && c.selected !== U;
4522
- if (!ae && !G && !L && !K && !te)
4521
+ const F = o.isForceEvaluation() ? r : y ? A : E, j = i && o.isEvaluate && t === "value" && w.isValuePropertyTarget(c), J = c.getRootNode(), _ = j && w.isUserEditableValue(c) && (c === J.activeElement || this.hasPendingUserEdit()), P = B || F === null || F === !1 && !D ? null : String(F), se = e !== t && c.getAttribute(e) !== r, G = P === null ? c.hasAttribute(t) : c.getAttribute(t) !== P, T = P === null ? "" : P, L = j && !_ && c.value !== T, Y = t === "checked" && c instanceof HTMLInputElement && (c.type === "checkbox" || c.type === "radio"), Q = t === "selected" && c instanceof HTMLOptionElement, de = J.activeElement, oe = de !== null && (Y && c === de || Q && c.closest("select") === de) || (Y || Q) && this.hasPendingCheckableUserEdit(Q), W = P !== null, z = Y && o.isEvaluate && !oe && c.checked !== W, X = Q && o.isEvaluate && !oe && c.selected !== W;
4522
+ if (!se && !G && !L && !z && !X)
4523
4523
  return j && !_ && (this.value = this.normalizeValueForElement(
4524
4524
  c,
4525
4525
  T
4526
- ), this.clearUnappliedValueWrite()), (Y || Z) && !ce && this.syncCheckableValueFromDom(Z), Promise.resolve();
4527
- const Q = z.enqueue(() => {
4528
- ae && c.setAttribute(e, r), P === null ? c.removeAttribute(t) : G && (c.setAttribute(t, P), t === `${l.prefix}bind` && this.recordSelfWrittenBind(P)), t === "style" && this.captureAndHideDisplay(), j && !_ && (this.value = this.normalizeValueForElement(
4526
+ ), this.clearUnappliedValueWrite()), (Y || Q) && !oe && this.syncCheckableValueFromDom(Q), Promise.resolve();
4527
+ const Re = K.enqueue(() => {
4528
+ se && c.setAttribute(e, r), P === null ? c.removeAttribute(t) : G && (c.setAttribute(t, P), t === `${l.prefix}bind` && this.recordSelfWrittenBind(P)), t === "style" && this.captureAndHideDisplay(), j && !_ && (this.value = this.normalizeValueForElement(
4529
4529
  c,
4530
4530
  T
4531
- ), L && (c.value = T), this.recordValueWriteResult(c.value === T)), K && (c.checked = U), te && (c.selected = U), (K || te) && this.syncCheckableValueFromDom(te);
4531
+ ), L && (c.value = T), this.recordValueWriteResult(c.value === T)), z && (c.checked = W), X && (c.selected = W), (z || X) && this.syncCheckableValueFromDom(X);
4532
4532
  }).finally(() => {
4533
4533
  this.releaseSelfWritingAttributes(s);
4534
4534
  });
4535
- return this.holdSelfWritingAttributes(s, Q), Q;
4535
+ return this.holdSelfWritingAttributes(s, Re), Re;
4536
4536
  }
4537
4537
  /**
4538
4538
  * 属性の値を削除します。
@@ -4551,7 +4551,7 @@ const w = class w extends D {
4551
4551
  const t = this.getTarget();
4552
4552
  if (!t.hasAttribute(e))
4553
4553
  return Promise.resolve();
4554
- const r = z.enqueue(() => {
4554
+ const r = K.enqueue(() => {
4555
4555
  t.removeAttribute(e);
4556
4556
  }).finally(() => {
4557
4557
  this.releaseSelfWritingAttributes([e]);
@@ -4588,7 +4588,7 @@ const w = class w extends D {
4588
4588
  value: r.results[0],
4589
4589
  hasUnresolvedReference: r.hasUnresolvedReference
4590
4590
  } : {
4591
- value: fe.joinEvaluateResults(r.results),
4591
+ value: ue.joinEvaluateResults(r.results),
4592
4592
  hasUnresolvedReference: r.hasUnresolvedReference
4593
4593
  };
4594
4594
  }
@@ -4633,7 +4633,7 @@ const w = class w extends D {
4633
4633
  const i = t ? r.nextSibling : r;
4634
4634
  let n = t ? r.nextSibling : r;
4635
4635
  for (; n !== null; ) {
4636
- const s = D.get(n);
4636
+ const s = I.get(n);
4637
4637
  if (s !== null) {
4638
4638
  const a = this.children.indexOf(s);
4639
4639
  if (a !== -1)
@@ -4687,7 +4687,7 @@ const w = class w extends D {
4687
4687
  }
4688
4688
  e.setParent(this), e.setMounted(this.mounted);
4689
4689
  const d = this.skipMutationNodes;
4690
- return this.skipMutationNodes = !0, this.holdSkipMutationNode(e.getTarget()), z.enqueue(() => {
4690
+ return this.skipMutationNodes = !0, this.holdSkipMutationNode(e.getTarget()), K.enqueue(() => {
4691
4691
  this.target.insertBefore(e.getTarget(), u);
4692
4692
  }).finally(() => {
4693
4693
  this.skipMutationNodes = d, this.releaseSkipMutationNode(e.getTarget());
@@ -4822,7 +4822,7 @@ const w = class w extends D {
4822
4822
  * @returns 戻り値はありません。
4823
4823
  */
4824
4824
  static reassertHiddenDisplay(e) {
4825
- const t = D.get(e);
4825
+ const t = I.get(e);
4826
4826
  t instanceof w && t.hideDisplayWithoutCapture();
4827
4827
  }
4828
4828
  /**
@@ -4849,10 +4849,10 @@ const w = class w extends D {
4849
4849
  * @returns 戻り値はありません。
4850
4850
  */
4851
4851
  static forEachFormControlInBranch(e, t) {
4852
- e.matches(Ye) && t(e);
4852
+ e.matches(Ge) && t(e);
4853
4853
  const r = (i) => {
4854
4854
  Array.from(i.children).forEach((n) => {
4855
- n.hasAttribute(`${l.prefix}if-false`) || (n instanceof HTMLElement && n.matches(Ye) && t(n), r(n));
4855
+ n.hasAttribute(`${l.prefix}if-false`) || (n instanceof HTMLElement && n.matches(Ge) && t(n), r(n));
4856
4856
  });
4857
4857
  };
4858
4858
  r(e);
@@ -4874,7 +4874,7 @@ const w = class w extends D {
4874
4874
  */
4875
4875
  static disableFormControlsInBranch(e) {
4876
4876
  w.forEachFormControlInBranch(e, (t) => {
4877
- t.hasAttribute("disabled") || (t.setAttribute(me, ""), t.setAttribute("disabled", ""));
4877
+ t.hasAttribute("disabled") || (t.setAttribute(he, ""), t.setAttribute("disabled", ""));
4878
4878
  });
4879
4879
  }
4880
4880
  /**
@@ -4888,7 +4888,7 @@ const w = class w extends D {
4888
4888
  */
4889
4889
  restoreFormControlsDisabledByIf() {
4890
4890
  w.forEachFormControlInBranch(this.getTarget(), (e) => {
4891
- e.hasAttribute(me) && (e.removeAttribute(me), e.removeAttribute("disabled"));
4891
+ e.hasAttribute(he) && (e.removeAttribute(he), e.removeAttribute("disabled"));
4892
4892
  });
4893
4893
  }
4894
4894
  /**
@@ -4965,7 +4965,7 @@ w.NUMBER_INPUT_PATTERN = /^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/, w.VALUE
4965
4965
  "week"
4966
4966
  ], 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();
4967
4967
  let S = w;
4968
- class se extends D {
4968
+ class ne extends I {
4969
4969
  /**
4970
4970
  * テキストフラグメントのコンストラクタ。
4971
4971
  * 対象テキストノードの内容を初期化します。
@@ -4973,7 +4973,7 @@ class se extends D {
4973
4973
  * @param target 対象テキストノード
4974
4974
  */
4975
4975
  constructor(e) {
4976
- super(e), this.skipMutation = !1, this.renderedText = null, this.text = e.textContent || "", this.contents = new fe(this.text);
4976
+ super(e), this.skipMutation = !1, this.renderedText = null, this.text = e.textContent || "", this.contents = new ue(this.text);
4977
4977
  }
4978
4978
  /**
4979
4979
  * フラグメントをクローンします。
@@ -4981,7 +4981,7 @@ class se extends D {
4981
4981
  * @returns クローンされたフラグメント
4982
4982
  */
4983
4983
  clone() {
4984
- const e = new se(this.target.cloneNode(!0));
4984
+ const e = new ne(this.target.cloneNode(!0));
4985
4985
  return e.mounted = !1, e.text = this.text, e.contents = this.contents, e.renderedText = this.renderedText, e;
4986
4986
  }
4987
4987
  /**
@@ -5018,7 +5018,7 @@ class se extends D {
5018
5018
  * @returns 更新のPromise
5019
5019
  */
5020
5020
  setContent(e) {
5021
- return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, this.contents = new fe(e), this.evaluate());
5021
+ return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, this.contents = new ue(e), this.evaluate());
5022
5022
  }
5023
5023
  /**
5024
5024
  * フラグメントを評価します。
@@ -5028,7 +5028,7 @@ class se extends D {
5028
5028
  evaluate() {
5029
5029
  return this.contents.isRawEvaluate && this.parent === null ? Promise.reject(
5030
5030
  new Error("Parent fragment is required for raw evaluation")
5031
- ) : z.enqueue(() => {
5031
+ ) : K.enqueue(() => {
5032
5032
  this.skipMutation = !0;
5033
5033
  let e = this.text;
5034
5034
  this.contents.isRawEvaluate ? e = this.contents.evaluate(this.parent.getBindingData(), {
@@ -5036,7 +5036,7 @@ class se extends D {
5036
5036
  element: this.parent.getTarget(),
5037
5037
  childIndex: this.parent.getChildren().indexOf(this),
5038
5038
  template: this.text
5039
- })[0] : this.contents.isEvaluate && (e = fe.joinEvaluateResults(
5039
+ })[0] : this.contents.isEvaluate && (e = ue.joinEvaluateResults(
5040
5040
  this.contents.evaluate(this.parent.getBindingData(), {
5041
5041
  kind: "text",
5042
5042
  element: this.parent.getTarget(),
@@ -5051,7 +5051,7 @@ class se extends D {
5051
5051
  });
5052
5052
  }
5053
5053
  }
5054
- class We extends D {
5054
+ class We extends I {
5055
5055
  /**
5056
5056
  * コメントフラグメントのコンストラクタ。
5057
5057
  * 対象コメントノードの内容を初期化します。
@@ -5085,14 +5085,14 @@ class We extends D {
5085
5085
  * @return 更新のPromise
5086
5086
  */
5087
5087
  setContent(e) {
5088
- return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, z.enqueue(() => {
5088
+ return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, K.enqueue(() => {
5089
5089
  this.skipMutation = !0, this.target.textContent = this.text;
5090
5090
  }).finally(() => {
5091
5091
  this.skipMutation = !1;
5092
5092
  }));
5093
5093
  }
5094
5094
  }
5095
- const Me = class Me {
5095
+ const Ce = class Ce {
5096
5096
  /**
5097
5097
  * コンストラクタ。
5098
5098
  *
@@ -5100,7 +5100,7 @@ const Me = class Me {
5100
5100
  */
5101
5101
  constructor(e) {
5102
5102
  this.contents = [], this.isEvaluate = !1, this.isRawEvaluate = !1, this.value = e;
5103
- const t = [...e.matchAll(Me.PLACEHOLDER_REGEX)];
5103
+ const t = [...e.matchAll(Ce.PLACEHOLDER_REGEX)];
5104
5104
  let r = 0, i = !1, n = !1;
5105
5105
  for (const s of t) {
5106
5106
  s.index > r && this.contents.push({
@@ -5205,8 +5205,8 @@ const Me = class Me {
5205
5205
  return this.contents.forEach((c) => {
5206
5206
  try {
5207
5207
  if (r(c)) {
5208
- const u = Ce.measure(
5209
- () => ne.evaluateDetailed(c.text, e)
5208
+ const u = Me.measure(
5209
+ () => ie.evaluateDetailed(c.text, e)
5210
5210
  ), d = u.value;
5211
5211
  a += u.durationMs, s.push({
5212
5212
  expression: c.text,
@@ -5224,16 +5224,16 @@ const Me = class Me {
5224
5224
  durationMs: 0
5225
5225
  }), n.push("");
5226
5226
  }
5227
- }), Ce.record(
5227
+ }), Me.record(
5228
5228
  t,
5229
5229
  s,
5230
5230
  a
5231
5231
  ), { results: n, hasUnresolvedReference: o };
5232
5232
  }
5233
5233
  };
5234
- Me.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
5235
- let fe = Me;
5236
- const ie = class ie extends fe {
5234
+ Ce.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
5235
+ let ue = Ce;
5236
+ const re = class re extends ue {
5237
5237
  /**
5238
5238
  * コンストラクタ。
5239
5239
  *
@@ -5241,7 +5241,7 @@ const ie = class ie extends fe {
5241
5241
  * @param text 属性値
5242
5242
  */
5243
5243
  constructor(e, t) {
5244
- super(t), this.forceEvaluation = ie.needsForceEvaluation(e);
5244
+ super(t), this.forceEvaluation = re.needsForceEvaluation(e);
5245
5245
  }
5246
5246
  /**
5247
5247
  * 属性名が強制評価の対象かどうかを判定します。
@@ -5254,17 +5254,17 @@ const ie = class ie extends fe {
5254
5254
  * @returns 強制評価の対象なら true
5255
5255
  */
5256
5256
  static needsForceEvaluation(e) {
5257
- if (ie.forceEvaluationNames === null || ie.forceEvaluationPrefix !== l.prefix) {
5257
+ if (re.forceEvaluationNames === null || re.forceEvaluationPrefix !== l.prefix) {
5258
5258
  const t = /* @__PURE__ */ new Set();
5259
5259
  for (const r of [
5260
5260
  l.prefix,
5261
- ...ie.FORCE_EVALUATION_PREFIXES
5261
+ ...re.FORCE_EVALUATION_PREFIXES
5262
5262
  ])
5263
- for (const i of ie.FORCE_EVALUATION_SUFFIXES)
5263
+ for (const i of re.FORCE_EVALUATION_SUFFIXES)
5264
5264
  t.add(`${r}${i}`);
5265
- ie.forceEvaluationNames = t, ie.forceEvaluationPrefix = l.prefix;
5265
+ re.forceEvaluationNames = t, re.forceEvaluationPrefix = l.prefix;
5266
5266
  }
5267
- return ie.forceEvaluationNames.has(e);
5267
+ return re.forceEvaluationNames.has(e);
5268
5268
  }
5269
5269
  /**
5270
5270
  * 強制評価フラグを取得します。
@@ -5311,9 +5311,9 @@ const ie = class ie extends fe {
5311
5311
  }) : r;
5312
5312
  }
5313
5313
  };
5314
- ie.FORCE_EVALUATION_SUFFIXES = ["if", "each", "derive"], ie.FORCE_EVALUATION_PREFIXES = ["data-", "hor-"], ie.forceEvaluationNames = null, ie.forceEvaluationPrefix = null;
5315
- let $e = ie;
5316
- const Se = class Se {
5314
+ re.FORCE_EVALUATION_SUFFIXES = ["if", "each", "derive"], re.FORCE_EVALUATION_PREFIXES = ["data-", "hor-"], re.forceEvaluationNames = null, re.forceEvaluationPrefix = null;
5315
+ let $e = re;
5316
+ const ve = class ve {
5317
5317
  /**
5318
5318
  * 実行モードを取得します。
5319
5319
  *
@@ -5343,7 +5343,7 @@ const Se = class Se {
5343
5343
  * @return すべてのレンダリングが完了したら解決される Promise
5344
5344
  */
5345
5345
  static waitForRenders() {
5346
- return z.waitForIdle();
5346
+ return K.waitForIdle();
5347
5347
  }
5348
5348
  /**
5349
5349
  * 通知ダイアログを表示します。
@@ -5352,7 +5352,7 @@ const Se = class Se {
5352
5352
  * @returns 通知が閉じられると解決されるPromise
5353
5353
  */
5354
5354
  static dialog(e) {
5355
- return z.enqueue(() => {
5355
+ return K.enqueue(() => {
5356
5356
  window.alert(e);
5357
5357
  }, !0);
5358
5358
  }
@@ -5380,7 +5380,7 @@ const Se = class Se {
5380
5380
  * @returns ユーザーがOKをクリックした場合はtrue、キャンセルした場合はfalseが解決されるPromise
5381
5381
  */
5382
5382
  static confirm(e) {
5383
- return z.enqueue(() => window.confirm(e), !0);
5383
+ return K.enqueue(() => window.confirm(e), !0);
5384
5384
  }
5385
5385
  /**
5386
5386
  * ダイアログを開きます。
@@ -5388,8 +5388,8 @@ const Se = class Se {
5388
5388
  * @param element 開くダイアログのHTML要素
5389
5389
  */
5390
5390
  static openDialog(e) {
5391
- return z.enqueue(() => {
5392
- e instanceof HTMLDialogElement ? (Se.clearMessagesSync(e), e.showModal()) : m.error("[Haori]", "Element is not a dialog: ", e);
5391
+ return K.enqueue(() => {
5392
+ e instanceof HTMLDialogElement ? (ve.clearMessagesSync(e), e.showModal()) : m.error("[Haori]", "Element is not a dialog: ", e);
5393
5393
  }, !0);
5394
5394
  }
5395
5395
  /**
@@ -5398,7 +5398,7 @@ const Se = class Se {
5398
5398
  * @param element 閉じるダイアログのHTML要素
5399
5399
  */
5400
5400
  static closeDialog(e) {
5401
- return z.enqueue(() => {
5401
+ return K.enqueue(() => {
5402
5402
  e instanceof HTMLDialogElement ? e.close() : m.error("[Haori]", "Element is not a dialog: ", e);
5403
5403
  }, !0);
5404
5404
  }
@@ -5409,7 +5409,7 @@ const Se = class Se {
5409
5409
  * @param message エラーメッセージ
5410
5410
  */
5411
5411
  static addErrorMessage(e, t) {
5412
- return Se.addMessage(e, t, "error");
5412
+ return ve.addMessage(e, t, "error");
5413
5413
  }
5414
5414
  /**
5415
5415
  * メッセージをレベル付きで追加します。
@@ -5419,7 +5419,7 @@ const Se = class Se {
5419
5419
  * @param level メッセージのレベル(省略可能)
5420
5420
  */
5421
5421
  static addMessage(e, t, r) {
5422
- return z.enqueue(() => {
5422
+ return K.enqueue(() => {
5423
5423
  const i = e instanceof HTMLFormElement ? e : e.parentElement ?? e;
5424
5424
  i.setAttribute("data-message", t), r !== void 0 ? i.setAttribute("data-message-level", r) : i.removeAttribute("data-message-level");
5425
5425
  }, !0);
@@ -5430,8 +5430,8 @@ const Se = class Se {
5430
5430
  * @param parent メッセージをクリアする親要素
5431
5431
  */
5432
5432
  static clearMessages(e) {
5433
- return z.enqueue(() => {
5434
- Se.clearMessagesSync(e);
5433
+ return K.enqueue(() => {
5434
+ ve.clearMessagesSync(e);
5435
5435
  }, !0);
5436
5436
  }
5437
5437
  /**
@@ -5471,7 +5471,7 @@ const Se = class Se {
5471
5471
  * @returns 整形済みの現在日時文字列
5472
5472
  */
5473
5473
  static now(e, t) {
5474
- return it(e, t);
5474
+ return rt(e, t);
5475
5475
  }
5476
5476
  /**
5477
5477
  * 現在日付に日数を加減した日付を指定フォーマットの文字列へ整形します。
@@ -5485,7 +5485,7 @@ const Se = class Se {
5485
5485
  * @returns 整形済みの日付文字列。timeZone が不正な場合は空文字
5486
5486
  */
5487
5487
  static today(e, t, r) {
5488
- return nt(e, t, r);
5488
+ return it(e, t, r);
5489
5489
  }
5490
5490
  /**
5491
5491
  * 数値を桁区切り・小数桁付きの文字列へ整形します。
@@ -5497,7 +5497,7 @@ const Se = class Se {
5497
5497
  * @returns 整形済み文字列。整形できない場合は空文字
5498
5498
  */
5499
5499
  static number(e, t) {
5500
- return st(e, t);
5500
+ return nt(e, t);
5501
5501
  }
5502
5502
  /**
5503
5503
  * 整数の配列を生成します(終端は排他)。
@@ -5510,7 +5510,7 @@ const Se = class Se {
5510
5510
  * @returns 整数配列
5511
5511
  */
5512
5512
  static range(e, t, r) {
5513
- return at(e, t, r);
5513
+ return st(e, t, r);
5514
5514
  }
5515
5515
  /**
5516
5516
  * 番号ページネーション用の表示要素列を生成します。
@@ -5523,7 +5523,7 @@ const Se = class Se {
5523
5523
  * @returns 表示要素の配列
5524
5524
  */
5525
5525
  static pages(e, t, r) {
5526
- return ot(e, t, r);
5526
+ return at(e, t, r);
5527
5527
  }
5528
5528
  /**
5529
5529
  * `YYYY-MM` 形式の年月文字列に月数を加算します。
@@ -5547,7 +5547,7 @@ const Se = class Se {
5547
5547
  * @returns 年月情報の降順配列。不正な入力は空配列
5548
5548
  */
5549
5549
  static monthRange(e, t) {
5550
- return lt(e, t);
5550
+ return ot(e, t);
5551
5551
  }
5552
5552
  /**
5553
5553
  * ページレスポンスから表示用サマリーを作ります。
@@ -5559,7 +5559,7 @@ const Se = class Se {
5559
5559
  * @returns 表示サマリー
5560
5560
  */
5561
5561
  static pageSummary(e, t) {
5562
- return ct(e, t);
5562
+ return lt(e, t);
5563
5563
  }
5564
5564
  /**
5565
5565
  * 配列から `item[key]` が指定値に一致する最初の要素を返します。
@@ -5573,7 +5573,7 @@ const Se = class Se {
5573
5573
  * @returns 一致した最初の要素。無ければ null
5574
5574
  */
5575
5575
  static findBy(e, t, r) {
5576
- return ut(e, t, r);
5576
+ return ct(e, t, r);
5577
5577
  }
5578
5578
  /**
5579
5579
  * 配列の数値合計を返します。
@@ -5586,7 +5586,7 @@ const Se = class Se {
5586
5586
  * @returns 数値の合計。対象が無ければ 0
5587
5587
  */
5588
5588
  static sum(e, t) {
5589
- return dt(e, t);
5589
+ return ut(e, t);
5590
5590
  }
5591
5591
  /**
5592
5592
  * 配列から重複を取り除いた新しい配列を返します。
@@ -5599,7 +5599,7 @@ const Se = class Se {
5599
5599
  * @returns 重複排除後の新しい配列。非配列は空配列
5600
5600
  */
5601
5601
  static distinct(e, t) {
5602
- return ht(e, t);
5602
+ return ft(e, t);
5603
5603
  }
5604
5604
  /**
5605
5605
  * 配列を `item[key]` ごとのグループへ分けて返します。
@@ -5612,10 +5612,10 @@ const Se = class Se {
5612
5612
  * @returns グループ情報の配列。非配列は空配列
5613
5613
  */
5614
5614
  static groupBy(e, t) {
5615
- return pt(e, t);
5615
+ return ht(e, t);
5616
5616
  }
5617
5617
  };
5618
- Se.enhancers = {
5618
+ ve.enhancers = {
5619
5619
  /**
5620
5620
  * 外部ライブラリ連携を登録します。
5621
5621
  *
@@ -5624,7 +5624,7 @@ Se.enhancers = {
5624
5624
  * @return 戻り値はありません。
5625
5625
  */
5626
5626
  register(e, t) {
5627
- re.register(e, t);
5627
+ te.register(e, t);
5628
5628
  },
5629
5629
  /**
5630
5630
  * 登録済みの連携かどうかを返します。
@@ -5633,16 +5633,16 @@ Se.enhancers = {
5633
5633
  * @return 登録済みなら true
5634
5634
  */
5635
5635
  has(e) {
5636
- return re.has(e);
5636
+ return te.has(e);
5637
5637
  }
5638
5638
  };
5639
- let Te = Se;
5640
- const Ft = "入力内容を確認してください", It = ["addErrorMessage", "clearMessages"], Xe = "data-haori-group-name";
5641
- function Je() {
5639
+ let Se = ve;
5640
+ const Dt = "入力内容を確認してください", Ft = ["addErrorMessage", "clearMessages"], Ye = "data-haori-group-name";
5641
+ function Xe() {
5642
5642
  const e = globalThis.window?.Haori;
5643
- return It.every(
5643
+ return Ft.every(
5644
5644
  (r) => typeof e?.[r] == "function"
5645
- ) ? e : Te;
5645
+ ) ? e : Se;
5646
5646
  }
5647
5647
  const h = class h {
5648
5648
  /**
@@ -5825,13 +5825,13 @@ const h = class h {
5825
5825
  return;
5826
5826
  }
5827
5827
  const r = e.getTarget();
5828
- if (!(r instanceof HTMLInputElement) || r.type !== "radio" || r.hasAttribute("name") && !r.hasAttribute(Xe))
5828
+ if (!(r instanceof HTMLInputElement) || r.type !== "radio" || r.hasAttribute("name") && !r.hasAttribute(Ye))
5829
5829
  return;
5830
5830
  const i = h.resolveGroupScope(e), n = `${String(t)}--haori${h.resolveGroupScopeId(
5831
5831
  i
5832
5832
  )}`;
5833
5833
  if (r.getAttribute("name") !== n)
5834
- return e.setAttribute(Xe, "").then(() => e.setAttribute("name", n));
5834
+ return e.setAttribute(Ye, "").then(() => e.setAttribute("name", n));
5835
5835
  }
5836
5836
  /**
5837
5837
  * ラジオグループのスコープとなるフラグメントを解決します。
@@ -5889,7 +5889,7 @@ const h = class h {
5889
5889
  return h.isDeclarationResolved(e, "value");
5890
5890
  if (t instanceof HTMLSelectElement) {
5891
5891
  for (const r of Array.from(t.options)) {
5892
- const i = D.get(r);
5892
+ const i = I.get(r);
5893
5893
  if (i instanceof S && h.hasDeclarativeBinding(i, "selected") && !h.isDeclarationResolved(i, "selected"))
5894
5894
  return !1;
5895
5895
  }
@@ -6019,7 +6019,7 @@ const h = class h {
6019
6019
  */
6020
6020
  static hasDeclarativeSelectedOption(e) {
6021
6021
  for (const t of Array.from(e.options)) {
6022
- const r = D.get(t);
6022
+ const r = I.get(t);
6023
6023
  if (r instanceof S && h.hasDeclarativeBinding(r, "selected"))
6024
6024
  return !0;
6025
6025
  }
@@ -6427,7 +6427,7 @@ const h = class h {
6427
6427
  * @param value 祖先が所有している値
6428
6428
  */
6429
6429
  static warnArgOwnerIsNotRecord(e, t, r) {
6430
- if (!W.isEnabled() || r == null)
6430
+ if (!q.isEnabled() || r == null)
6431
6431
  return;
6432
6432
  const i = e.getTarget(), n = h.warnedArgOwnerNotRecord.get(i);
6433
6433
  n?.has(t) || (n ? n.add(t) : h.warnedArgOwnerNotRecord.set(i, /* @__PURE__ */ new Set([t])), m.warn(
@@ -6593,7 +6593,7 @@ const h = class h {
6593
6593
  r.setCustomValidity("");
6594
6594
  return;
6595
6595
  }
6596
- const n = h.buildConditionScope(e), s = ne.evaluateDetailed(
6596
+ const n = h.buildConditionScope(e), s = ie.evaluateDetailed(
6597
6597
  h.unwrapConditionExpression(i),
6598
6598
  n
6599
6599
  );
@@ -6616,7 +6616,7 @@ const h = class h {
6616
6616
  */
6617
6617
  static resolveValidityMessage(e) {
6618
6618
  const t = e.getAttribute(`${l.prefix}validity-message`);
6619
- return typeof t == "string" && t.trim() !== "" ? t : Ft;
6619
+ return typeof t == "string" && t.trim() !== "" ? t : Dt;
6620
6620
  }
6621
6621
  /**
6622
6622
  * 条件属性の値から式を取り出します。
@@ -6641,7 +6641,7 @@ const h = class h {
6641
6641
  * @returns 戻り値はありません。
6642
6642
  */
6643
6643
  static warnUnvalidatedCustomValidity(e, t) {
6644
- if (!W.isEnabled() || !e)
6644
+ if (!q.isEnabled() || !e)
6645
6645
  return;
6646
6646
  const r = `${l.prefix}validity`;
6647
6647
  (e.hasAttribute(r) || e.getTarget().querySelector(`[${r}]`) !== null) && m.warn(
@@ -6704,7 +6704,7 @@ const h = class h {
6704
6704
  * @param reason 退いた理由
6705
6705
  */
6706
6706
  static warnPositionalRowFallback(e) {
6707
- !W.isEnabled() || h.warnedPositionalRowFallbacks.has(e) || (h.warnedPositionalRowFallbacks.add(e), m.warn(
6707
+ !q.isEnabled() || h.warnedPositionalRowFallbacks.has(e) || (h.warnedPositionalRowFallbacks.add(e), m.warn(
6708
6708
  "[Haori]",
6709
6709
  `${l.prefix}form-list の行を出現順で対応付けます(${e})。配列と画面の行数・並びが一致していない場合、行の値を取り違えます。`
6710
6710
  ));
@@ -6724,7 +6724,7 @@ const h = class h {
6724
6724
  * @param container `data-form-list` を持つコンテナのフラグメント
6725
6725
  */
6726
6726
  static warnDerivedRowsWithoutKey(e) {
6727
- if (!W.isEnabled() || e.getRawAttribute(`${l.prefix}each-key`) !== null)
6727
+ if (!q.isEnabled() || e.getRawAttribute(`${l.prefix}each-key`) !== null)
6728
6728
  return;
6729
6729
  const t = e.getRawAttribute(`${l.prefix}each`);
6730
6730
  t === null || h.resolveLeadingPath(t) !== null || h.warnedDerivedRowsWithoutKey.has(t) || (h.warnedDerivedRowsWithoutKey.add(t), m.warn(
@@ -7032,7 +7032,7 @@ const h = class h {
7032
7032
  static collectShadowingContainers(e) {
7033
7033
  const t = `${l.prefix}form-arg`, r = [];
7034
7034
  return e.getTarget().querySelectorAll(`form:not([${t}]), [${l.prefix}form]`).forEach((i) => {
7035
- const n = D.get(i);
7035
+ const n = I.get(i);
7036
7036
  if (!(n instanceof S))
7037
7037
  return;
7038
7038
  const s = n.getRawBindingData();
@@ -7075,7 +7075,7 @@ const h = class h {
7075
7075
  static collectArgForms(e) {
7076
7076
  const t = `${l.prefix}form-arg`, r = e.getTarget().querySelectorAll(`form[${t}]`), i = [];
7077
7077
  return r.forEach((n) => {
7078
- const s = D.get(n);
7078
+ const s = I.get(n);
7079
7079
  if (!(s instanceof S))
7080
7080
  return;
7081
7081
  const a = s.getAttribute(t);
@@ -7148,7 +7148,7 @@ const h = class h {
7148
7148
  for (const i of t) {
7149
7149
  if (h.INITIAL_RESTORED_FORMS.has(i))
7150
7150
  continue;
7151
- const n = D.get(i);
7151
+ const n = I.get(i);
7152
7152
  if (!(n instanceof S))
7153
7153
  continue;
7154
7154
  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;
@@ -7368,34 +7368,34 @@ const h = class h {
7368
7368
  const c = h.resolveFieldName(e), u = e.getAttribute(`${l.prefix}form-object`), d = e.getAttribute(`${l.prefix}form-list`), g = e.hasAttribute(`${l.prefix}form-list`);
7369
7369
  if (c) {
7370
7370
  const y = t[String(c)], E = n && h.hasResolvedDeclarativeState(e), A = n && typeof y > "u" && !h.isDeclarativeStateBound(e);
7371
- let I = y;
7372
- if (E ? I = void 0 : A && (I = null), h.isFileInput(e))
7373
- return (I === null || I === "") && o.push(
7371
+ let D = y;
7372
+ if (E ? D = void 0 : A && (D = null), h.isFileInput(e))
7373
+ return (D === null || D === "") && o.push(
7374
7374
  h.applyFragmentValue(e, null, i, a)
7375
7375
  ), Promise.all(o).then(() => {
7376
7376
  });
7377
- if (g && Array.isArray(I) && // チェックボックスグループと複数選択 select は配列そのものを状態として
7377
+ if (g && Array.isArray(D) && // チェックボックスグループと複数選択 select は配列そのものを状態として
7378
7378
  // 解釈する(後続の分岐)。位置で配ると選択状態を決められないため、
7379
7379
  // `data-form-list` を併記していても従来どおりそちらへ渡す。
7380
7380
  !h.isGroupedCheckable(e) && !h.isMultipleSelect(e)) {
7381
- const C = String(c), q = s.get(C) ?? 0;
7382
- s.set(C, q + 1), o.push(
7381
+ const N = String(c), B = s.get(N) ?? 0;
7382
+ s.set(N, B + 1), o.push(
7383
7383
  h.applyFragmentValue(
7384
7384
  e,
7385
- I[q] ?? null,
7385
+ D[B] ?? null,
7386
7386
  i,
7387
7387
  a
7388
7388
  )
7389
7389
  );
7390
- } 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(
7390
+ } else typeof D > "u" || (Array.isArray(D) && h.isGroupedCheckable(e) || Array.isArray(D) && h.isMultipleSelect(e) || typeof D == "string" || typeof D == "number" || typeof D == "boolean" || D === null ? o.push(
7391
7391
  h.applyFragmentValue(
7392
7392
  e,
7393
- I,
7393
+ D,
7394
7394
  i,
7395
7395
  a
7396
7396
  )
7397
7397
  ) : o.push(
7398
- h.applyFragmentValue(e, String(I), i, a)
7398
+ h.applyFragmentValue(e, String(D), i, a)
7399
7399
  ));
7400
7400
  } else if (u) {
7401
7401
  const y = t[String(u)];
@@ -7417,18 +7417,18 @@ const h = class h {
7417
7417
  } else if (d) {
7418
7418
  const y = t[String(d)];
7419
7419
  if (Array.isArray(y)) {
7420
- const E = e.getChildElementFragments(), A = e.getAttribute(`${l.prefix}each-key`), I = h.isCollectedListFromEachSource(e) ? h.pairRowsWithItems(
7420
+ const E = e.getChildElementFragments(), A = e.getAttribute(`${l.prefix}each-key`), D = h.isCollectedListFromEachSource(e) ? h.pairRowsWithItems(
7421
7421
  E,
7422
7422
  y,
7423
7423
  A == null ? null : String(A)
7424
7424
  ) : null;
7425
- for (let C = 0; C < E.length; C++) {
7426
- const q = E[C], N = I ? I[C] : y.length > C ? y[C] : null;
7425
+ for (let N = 0; N < E.length; N++) {
7426
+ const B = E[N], F = D ? D[N] : y.length > N ? y[N] : null;
7427
7427
  o.push(
7428
7428
  // 行ごとに values が切り替わるので出現位置も行単位で数える。
7429
7429
  h.setPartValues(
7430
- q,
7431
- h.asPlainRecord(N) ?? {},
7430
+ B,
7431
+ h.asPlainRecord(F) ?? {},
7432
7432
  r,
7433
7433
  i,
7434
7434
  n,
@@ -7476,7 +7476,7 @@ const h = class h {
7476
7476
  h.markResetSubtree(e, t), $.clearUserEditMarks(e, t), h.clearValues(e), await Promise.all([
7477
7477
  h.clearMessages(e),
7478
7478
  h.clearEachClones(e)
7479
- ]), await z.enqueue(() => {
7479
+ ]), await K.enqueue(() => {
7480
7480
  const n = h.collectEditsAfter(
7481
7481
  e,
7482
7482
  t
@@ -7520,7 +7520,7 @@ const h = class h {
7520
7520
  sequence: t
7521
7521
  });
7522
7522
  }
7523
- re.refreshSubtree(e.getTarget());
7523
+ te.refreshSubtree(e.getTarget());
7524
7524
  }
7525
7525
  /**
7526
7526
  * 祖先が所有するキーを、リセットの書き込み対象から落とします。
@@ -7571,7 +7571,7 @@ const h = class h {
7571
7571
  t instanceof HTMLFormElement ? r.push(t) : r.push(...Array.from(t.querySelectorAll("form")));
7572
7572
  const i = [];
7573
7573
  for (const n of r) {
7574
- const s = D.get(n);
7574
+ const s = I.get(n);
7575
7575
  s instanceof S && i.push(s);
7576
7576
  }
7577
7577
  return i;
@@ -7702,7 +7702,7 @@ const h = class h {
7702
7702
  * @returns Promise(メッセージのクリアが完了したら解決される)
7703
7703
  */
7704
7704
  static clearMessages(e) {
7705
- return Je().clearMessages(
7705
+ return Xe().clearMessages(
7706
7706
  e.getTarget()
7707
7707
  );
7708
7708
  }
@@ -7729,7 +7729,7 @@ const h = class h {
7729
7729
  * @return Promise(メッセージの追加が完了したら解決される)
7730
7730
  */
7731
7731
  static addMessage(e, t, r, i) {
7732
- const n = [], s = Je(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), c = h.findFragmentsByKey(e, t);
7732
+ const n = [], s = Xe(), a = s.addMessage, o = (u) => typeof a == "function" ? a.call(s, u, r, i) : s.addErrorMessage(u, r), c = h.findFragmentsByKey(e, t);
7733
7733
  return c.forEach((u) => {
7734
7734
  n.push(o(u.getTarget()));
7735
7735
  }), c.length === 0 && n.push(o(e.getTarget())), Promise.all(n).then(() => {
@@ -7807,8 +7807,8 @@ h.INITIAL_RESTORED_FORMS = /* @__PURE__ */ new WeakSet(), h.LAST_ANCESTOR_ARG_VA
7807
7807
  "constructor",
7808
7808
  "prototype"
7809
7809
  ]), 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]*)$/;
7810
- let F = h;
7811
- class B {
7810
+ let k = h;
7811
+ class H {
7812
7812
  /**
7813
7813
  * カスタムイベントを発火します。
7814
7814
  *
@@ -7832,7 +7832,7 @@ class B {
7832
7832
  * @param version ライブラリバージョン
7833
7833
  */
7834
7834
  static ready(e) {
7835
- B.dispatch(document, "ready", { version: e });
7835
+ H.dispatch(document, "ready", { version: e });
7836
7836
  }
7837
7837
  /**
7838
7838
  * importstartイベントを発火します。
@@ -7841,7 +7841,7 @@ class B {
7841
7841
  * @param url インポート対象URL
7842
7842
  */
7843
7843
  static importStart(e, t) {
7844
- B.dispatch(e, "importstart", {
7844
+ H.dispatch(e, "importstart", {
7845
7845
  url: t,
7846
7846
  startedAt: performance.now()
7847
7847
  });
@@ -7855,7 +7855,7 @@ class B {
7855
7855
  * @param startedAt 開始時刻
7856
7856
  */
7857
7857
  static importEnd(e, t, r, i) {
7858
- B.dispatch(e, "importend", {
7858
+ H.dispatch(e, "importend", {
7859
7859
  url: t,
7860
7860
  bytes: r,
7861
7861
  durationMs: performance.now() - i
@@ -7869,7 +7869,7 @@ class B {
7869
7869
  * @param error エラー内容
7870
7870
  */
7871
7871
  static importError(e, t, r) {
7872
- B.dispatch(e, "importerror", { url: t, error: r });
7872
+ H.dispatch(e, "importerror", { url: t, error: r });
7873
7873
  }
7874
7874
  /**
7875
7875
  * bindchangeイベントを発火します。
@@ -7885,7 +7885,7 @@ class B {
7885
7885
  const u = t?.[c], d = r[c];
7886
7886
  u !== d && n.push(c);
7887
7887
  }
7888
- B.dispatch(e, "bindchange", {
7888
+ H.dispatch(e, "bindchange", {
7889
7889
  previous: t || {},
7890
7890
  next: r,
7891
7891
  changedKeys: n,
@@ -7904,7 +7904,7 @@ class B {
7904
7904
  * @param reason 変更理由
7905
7905
  */
7906
7906
  static bindComplete(e, t = null, r = "other") {
7907
- B.dispatch(e, "bindcomplete", { bindArg: t, reason: r });
7907
+ H.dispatch(e, "bindcomplete", { bindArg: t, reason: r });
7908
7908
  }
7909
7909
  /**
7910
7910
  * eachupdateイベントを発火します。
@@ -7915,7 +7915,7 @@ class B {
7915
7915
  * @param order 現在の順序
7916
7916
  */
7917
7917
  static eachUpdate(e, t, r, i) {
7918
- B.dispatch(e, "eachupdate", {
7918
+ H.dispatch(e, "eachupdate", {
7919
7919
  added: t,
7920
7920
  removed: r,
7921
7921
  order: i,
@@ -7931,7 +7931,7 @@ class B {
7931
7931
  * @param item 行データ
7932
7932
  */
7933
7933
  static rowAdd(e, t, r, i) {
7934
- B.dispatch(e, "rowadd", { key: t, index: r, item: i });
7934
+ H.dispatch(e, "rowadd", { key: t, index: r, item: i });
7935
7935
  }
7936
7936
  /**
7937
7937
  * rowremoveイベントを発火します。
@@ -7941,7 +7941,7 @@ class B {
7941
7941
  * @param index インデックス
7942
7942
  */
7943
7943
  static rowRemove(e, t, r) {
7944
- B.dispatch(e, "rowremove", { key: t, index: r });
7944
+ H.dispatch(e, "rowremove", { key: t, index: r });
7945
7945
  }
7946
7946
  /**
7947
7947
  * rowmoveイベントを発火します。
@@ -7952,7 +7952,7 @@ class B {
7952
7952
  * @param to 移動後インデックス
7953
7953
  */
7954
7954
  static rowMove(e, t, r, i) {
7955
- B.dispatch(e, "rowmove", { key: t, from: r, to: i });
7955
+ H.dispatch(e, "rowmove", { key: t, from: r, to: i });
7956
7956
  }
7957
7957
  /**
7958
7958
  * showイベントを発火します。
@@ -7960,7 +7960,7 @@ class B {
7960
7960
  * @param target data-if要素
7961
7961
  */
7962
7962
  static show(e) {
7963
- B.dispatch(e, "show", { visible: !0 });
7963
+ H.dispatch(e, "show", { visible: !0 });
7964
7964
  }
7965
7965
  /**
7966
7966
  * hideイベントを発火します。
@@ -7968,7 +7968,7 @@ class B {
7968
7968
  * @param target data-if要素
7969
7969
  */
7970
7970
  static hide(e) {
7971
- B.dispatch(e, "hide", { visible: !1 });
7971
+ H.dispatch(e, "hide", { visible: !1 });
7972
7972
  }
7973
7973
  /**
7974
7974
  * fetchstartイベントを発火します。
@@ -7981,7 +7981,7 @@ class B {
7981
7981
  * @return 戻り値はありません。
7982
7982
  */
7983
7983
  static fetchStart(e, t, r, i, n) {
7984
- B.dispatch(e, "fetchstart", {
7984
+ H.dispatch(e, "fetchstart", {
7985
7985
  url: t,
7986
7986
  options: r || {},
7987
7987
  payload: i,
@@ -7998,7 +7998,7 @@ class B {
7998
7998
  * @param startedAt 開始時刻
7999
7999
  */
8000
8000
  static fetchEnd(e, t, r, i) {
8001
- B.dispatch(e, "fetchend", {
8001
+ H.dispatch(e, "fetchend", {
8002
8002
  url: t,
8003
8003
  status: r,
8004
8004
  durationMs: performance.now() - i
@@ -8014,7 +8014,7 @@ class B {
8014
8014
  * @param startedAt 開始時刻(存在する場合)
8015
8015
  */
8016
8016
  static fetchError(e, t, r, i, n) {
8017
- B.dispatch(e, "fetcherror", {
8017
+ H.dispatch(e, "fetcherror", {
8018
8018
  url: t,
8019
8019
  status: i,
8020
8020
  error: r,
@@ -8030,7 +8030,7 @@ class B {
8030
8030
  * @return 戻り値はありません。
8031
8031
  */
8032
8032
  static pollTimeout(e, t, r) {
8033
- B.dispatch(e, "polltimeout", { count: t, elapsedMs: r });
8033
+ H.dispatch(e, "polltimeout", { count: t, elapsedMs: r });
8034
8034
  }
8035
8035
  /**
8036
8036
  * pollstopイベントを発火します。
@@ -8044,33 +8044,33 @@ class B {
8044
8044
  * @return 戻り値はありません。
8045
8045
  */
8046
8046
  static pollStop(e, t, r, i) {
8047
- B.dispatch(e, "pollstop", { reason: t, count: r, elapsedMs: i });
8047
+ H.dispatch(e, "pollstop", { reason: t, count: r, elapsedMs: i });
8048
8048
  }
8049
8049
  }
8050
- const Nt = {
8050
+ const It = {
8051
8051
  401: "unauthorized-redirect",
8052
8052
  403: "forbidden-redirect"
8053
8053
  };
8054
- function xt(b, e) {
8054
+ function kt(b, e) {
8055
8055
  return b.replace(/\{\{([\s\S]+?)\}\}/g, (t, r) => {
8056
8056
  try {
8057
- const i = ne.evaluate(String(r).trim(), e);
8057
+ const i = ie.evaluate(String(r).trim(), e);
8058
8058
  return i == null ? "" : String(i);
8059
8059
  } catch {
8060
8060
  return "";
8061
8061
  }
8062
8062
  });
8063
8063
  }
8064
- function kt(b, e) {
8064
+ function Nt(b, e) {
8065
8065
  const t = b.getAttribute(e);
8066
8066
  if (t === null || t === "")
8067
8067
  return null;
8068
8068
  if (!t.includes("{{"))
8069
8069
  return t;
8070
- const r = D.get(b), i = r instanceof S ? r.getBindingData() : {}, n = xt(t, i);
8070
+ const r = I.get(b), i = r instanceof S ? r.getBindingData() : {}, n = kt(t, i);
8071
8071
  return n === "" ? null : n;
8072
8072
  }
8073
- function Ct(b, e, t) {
8073
+ function xt(b, e, t) {
8074
8074
  const r = b.getAttribute(`${e}-return-param`);
8075
8075
  if (r === null || r === "")
8076
8076
  return t;
@@ -8083,17 +8083,17 @@ function Ct(b, e, t) {
8083
8083
  const i = window.location.pathname + window.location.search + window.location.hash, s = `${encodeURIComponent(r)}=${encodeURIComponent(i)}`, a = t.indexOf("#"), o = a >= 0 ? t.slice(a) : "", c = a >= 0 ? t.slice(0, a) : t, u = c.includes("?") ? "&" : "?";
8084
8084
  return `${c}${u}${s}${o}`;
8085
8085
  }
8086
- function gt(b) {
8087
- const e = Nt[b];
8086
+ function pt(b) {
8087
+ const e = It[b];
8088
8088
  if (e === void 0 || typeof document > "u")
8089
8089
  return !1;
8090
8090
  const t = `${l.prefix}${e}`, r = [];
8091
8091
  document.body && r.push(document.body), document.documentElement && r.push(document.documentElement);
8092
8092
  for (const i of r) {
8093
- const n = kt(i, t);
8093
+ const n = Nt(i, t);
8094
8094
  if (n === null)
8095
8095
  continue;
8096
- const s = Ct(i, t, n);
8096
+ const s = xt(i, t, n);
8097
8097
  try {
8098
8098
  if (new URL(s, window.location.href).href === window.location.href)
8099
8099
  return !1;
@@ -8103,7 +8103,7 @@ function gt(b) {
8103
8103
  }
8104
8104
  return !1;
8105
8105
  }
8106
- class J {
8106
+ class Z {
8107
8107
  /**
8108
8108
  * セレクタ属性の値を評価済みの文字列として読み取ります。
8109
8109
  *
@@ -8570,7 +8570,7 @@ const x = class x {
8570
8570
  ).forEach((i) => {
8571
8571
  if (!x.RESTORED_ELEMENTS.has(i))
8572
8572
  return;
8573
- const n = D.get(i);
8573
+ const n = I.get(i);
8574
8574
  if (!(n instanceof S))
8575
8575
  return;
8576
8576
  const s = x.readDeclaration(n);
@@ -8586,7 +8586,7 @@ const x = class x {
8586
8586
  };
8587
8587
  x.SIGNATURES = /* @__PURE__ */ new WeakMap(), x.RESTORED_ELEMENTS = /* @__PURE__ */ new WeakSet(), x.WARNED_ELEMENTS = /* @__PURE__ */ new WeakMap(), x.WARNED_KINDS = /* @__PURE__ */ new Set();
8588
8588
  let Fe = x;
8589
- class mt {
8589
+ class gt {
8590
8590
  /**
8591
8591
  * URLのクエリパラメータを取得します。
8592
8592
  *
@@ -8632,7 +8632,7 @@ class mt {
8632
8632
  }
8633
8633
  }
8634
8634
  }
8635
- const $t = [
8635
+ const Mt = [
8636
8636
  "addErrorMessage",
8637
8637
  "clearMessages",
8638
8638
  "closeDialog",
@@ -8640,25 +8640,26 @@ const $t = [
8640
8640
  "dialog",
8641
8641
  "openDialog",
8642
8642
  "toast"
8643
- ], Mt = "__haoriHistoryState__", Oe = "data-haori-click-lock", Ze = "ファイルを保存できませんでした", Pt = 100;
8643
+ ], $t = "__haoriHistoryState__", Oe = "data-haori-click-lock", Je = "ファイルを保存できませんでした", Ct = 100;
8644
8644
  let De = null;
8645
- function ge() {
8645
+ const Pt = ["info", "warning", "error", "success"], Lt = /^(\d{3})-(click|click-await|close|toast|toast-level|no-message)$/;
8646
+ function fe() {
8646
8647
  const e = globalThis.window?.Haori;
8647
- return $t.every(
8648
+ return Mt.every(
8648
8649
  (r) => typeof e?.[r] == "function"
8649
- ) ? e : Te;
8650
+ ) ? e : Se;
8650
8651
  }
8651
- const Lt = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
8652
+ const Ot = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
8652
8653
  function He(b) {
8653
- return Lt.has(b.toUpperCase());
8654
+ return Ot.has(b.toUpperCase());
8654
8655
  }
8655
- function Ot(b, e) {
8656
+ function Bt(b, e) {
8656
8657
  for (const [t, r] of Object.entries(e))
8657
8658
  r !== void 0 && (Array.isArray(r) ? r.forEach((i) => {
8658
- b.append(t, Ae(i));
8659
- }) : b.append(t, Ae(r)));
8659
+ b.append(t, be(i));
8660
+ }) : b.append(t, be(r)));
8660
8661
  }
8661
- function Ae(b) {
8662
+ function be(b) {
8662
8663
  if (b == null)
8663
8664
  return "";
8664
8665
  if (typeof b == "object" || typeof b == "function")
@@ -8669,11 +8670,11 @@ function Ae(b) {
8669
8670
  }
8670
8671
  return String(b);
8671
8672
  }
8672
- function yt(b, e) {
8673
+ function mt(b, e) {
8673
8674
  const t = new URL(b, window.location.href), r = new URLSearchParams(t.search);
8674
- return Ot(r, e), t.search = r.toString(), t.toString();
8675
+ return Bt(r, e), t.search = r.toString(), t.toString();
8675
8676
  }
8676
- function Bt(b) {
8677
+ function Ht(b) {
8677
8678
  if (b == null)
8678
8679
  return { payload: {}, dropped: !1 };
8679
8680
  if (typeof b == "string") {
@@ -8690,12 +8691,12 @@ function Bt(b) {
8690
8691
  return { payload: {}, dropped: !0 };
8691
8692
  }
8692
8693
  return e.includes("=") ? {
8693
- payload: Qe(new URLSearchParams(e)),
8694
+ payload: Ze(new URLSearchParams(e)),
8694
8695
  dropped: !1
8695
8696
  } : { payload: {}, dropped: !0 };
8696
8697
  }
8697
8698
  if (b instanceof URLSearchParams)
8698
- return { payload: Qe(b), dropped: !1 };
8699
+ return { payload: Ze(b), dropped: !1 };
8699
8700
  if (typeof FormData < "u" && b instanceof FormData) {
8700
8701
  const e = {};
8701
8702
  let t = !1;
@@ -8704,30 +8705,30 @@ function Bt(b) {
8704
8705
  t = !0;
8705
8706
  continue;
8706
8707
  }
8707
- bt(e, r, i);
8708
+ yt(e, r, i);
8708
8709
  }
8709
8710
  return { payload: e, dropped: t };
8710
8711
  }
8711
8712
  return { payload: {}, dropped: !0 };
8712
8713
  }
8713
- function Qe(b) {
8714
+ function Ze(b) {
8714
8715
  const e = {};
8715
8716
  for (const [t, r] of b.entries())
8716
- bt(e, t, r);
8717
+ yt(e, t, r);
8717
8718
  return e;
8718
8719
  }
8719
- function bt(b, e, t) {
8720
+ function yt(b, e, t) {
8720
8721
  const r = b[e];
8721
8722
  r === void 0 ? b[e] = t : Array.isArray(r) ? r.push(t) : b[e] = [r, t];
8722
8723
  }
8723
- function ye(b, e) {
8724
- if (F.isCompleteSetValue(e))
8724
+ function pe(b, e) {
8725
+ if (k.isCompleteSetValue(e))
8725
8726
  return e;
8726
8727
  if (Array.isArray(e)) {
8727
8728
  const t = Array.isArray(b) ? b.slice() : [];
8728
8729
  let r = !1;
8729
8730
  return e.forEach((i, n) => {
8730
- i != null && (typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (t[n] = ye(t[n], i), r = !0));
8731
+ i != null && (typeof i == "object" && !Array.isArray(i) && Object.keys(i).length === 0 || (t[n] = pe(t[n], i), r = !0));
8731
8732
  }), r ? t : b;
8732
8733
  }
8733
8734
  if (e !== null && typeof e == "object") {
@@ -8735,16 +8736,16 @@ function ye(b, e) {
8735
8736
  for (const [r, i] of Object.entries(
8736
8737
  e
8737
8738
  ))
8738
- t[r] = ye(t[r], i);
8739
+ t[r] = pe(t[r], i);
8739
8740
  return t;
8740
8741
  }
8741
8742
  return e;
8742
8743
  }
8743
- function Ht(b) {
8744
+ function Ut(b) {
8744
8745
  const e = b?.body;
8745
8746
  return e == null ? !1 : typeof e == "string" ? e !== "" : !0;
8746
8747
  }
8747
- function Ut(b, e) {
8748
+ function Vt(b, e) {
8748
8749
  const t = { ...e || {} }, r = (t.method || "GET").toUpperCase();
8749
8750
  if (l.runtime !== "demo" || He(r))
8750
8751
  return {
@@ -8754,11 +8755,11 @@ function Ut(b, e) {
8754
8755
  effectiveMethod: r,
8755
8756
  normalized: !1
8756
8757
  };
8757
- const { payload: i, dropped: n } = Bt(
8758
+ const { payload: i, dropped: n } = Ht(
8758
8759
  t.body
8759
8760
  );
8760
8761
  let s = b;
8761
- Object.keys(i).length > 0 && (s = yt(s, i)), n && m.warn(
8762
+ Object.keys(i).length > 0 && (s = mt(s, i)), n && m.warn(
8762
8763
  "Haori",
8763
8764
  `The ${r} body cannot be converted into a query string and is dropped by the demo runtime normalization. Send the values with ${l.prefix}{event}-data / ${l.prefix}{event}-form, or use the embedded runtime.`
8764
8765
  ), delete t.body, t.method = "GET";
@@ -8774,7 +8775,7 @@ function Ut(b, e) {
8774
8775
  queryString: new URL(s, window.location.href).search || void 0
8775
8776
  };
8776
8777
  }
8777
- function Vt(b) {
8778
+ function qt(b) {
8778
8779
  return b == null ? null : typeof b == "string" ? b : b instanceof URLSearchParams ? b.toString() : b instanceof FormData ? Array.from(b.entries()).map(([e, t]) => t instanceof File ? [
8779
8780
  e,
8780
8781
  {
@@ -8790,13 +8791,13 @@ function Ie(b) {
8790
8791
  Ie
8791
8792
  ) : !1;
8792
8793
  }
8793
- function qt(b) {
8794
+ function Wt(b) {
8794
8795
  return Object.values(b).some((e) => e instanceof Blob ? !1 : Array.isArray(e) ? e.some(
8795
8796
  (t) => !(t instanceof Blob) && Ie(t)
8796
8797
  ) : Ie(e));
8797
8798
  }
8798
- function ke(b) {
8799
- return Ue(F.getValues(b));
8799
+ function xe(b) {
8800
+ return Ue(k.getValues(b));
8800
8801
  }
8801
8802
  function Ue(b) {
8802
8803
  const e = (r) => {
@@ -8806,7 +8807,7 @@ function Ue(b) {
8806
8807
  return "";
8807
8808
  if (Array.isArray(r)) {
8808
8809
  const i = r.map(e);
8809
- return F.carryCollectedRowIdentity(r, i), i;
8810
+ return k.carryCollectedRowIdentity(r, i), i;
8810
8811
  }
8811
8812
  if (r !== null && typeof r == "object") {
8812
8813
  const i = {};
@@ -8814,15 +8815,15 @@ function Ue(b) {
8814
8815
  r
8815
8816
  ))
8816
8817
  i[n] = e(s);
8817
- return F.carryCollectedRowIdentity(r, i), i;
8818
+ return k.carryCollectedRowIdentity(r, i), i;
8818
8819
  }
8819
8820
  return r;
8820
8821
  }, t = {};
8821
8822
  for (const [r, i] of Object.entries(b))
8822
8823
  t[r] = e(i);
8823
- return F.carryCollectedRowIdentity(b, t), t;
8824
+ return k.carryCollectedRowIdentity(b, t), t;
8824
8825
  }
8825
- function Wt(b, e) {
8826
+ function jt(b, e) {
8826
8827
  const t = new Headers(
8827
8828
  e.headers || void 0
8828
8829
  ), r = Array.from(t.entries()).sort(
@@ -8832,7 +8833,7 @@ function Wt(b, e) {
8832
8833
  url: b,
8833
8834
  method: String(e.method || "GET").toUpperCase(),
8834
8835
  headers: r,
8835
- body: Vt(e.body || null)
8836
+ body: qt(e.body || null)
8836
8837
  });
8837
8838
  }
8838
8839
  const p = class p {
@@ -8879,17 +8880,121 @@ const p = class p {
8879
8880
  static attrName(e, t, r = !1) {
8880
8881
  return e ? `${l.prefix}${e}-${t}` : r ? `${l.prefix}fetch-${t}` : `${l.prefix}${t}`;
8881
8882
  }
8883
+ /**
8884
+ * セレクタを値に取る属性(`data-{event}-click` / `-close` / `-error-click` など)
8885
+ * の対象を解決します。
8886
+ *
8887
+ * 値を省略した場合の扱いは属性によって異なります。`-error-click` はエラーを
8888
+ * 記録し、`-open` / `-close` / `-error-close` は祖先方向で最も近い `<dialog>`、
8889
+ * それ以外は自要素を対象にします。
8890
+ *
8891
+ * @param fragment 属性を宣言したフラグメント
8892
+ * @param attrName 属性名
8893
+ * @param attrKey 属性名から `data-{event}-` を除いた部分。ステータスごとの組
8894
+ * (`-error-404-close` など)では、ステータスを除いた `error-close` などを渡す
8895
+ * @returns 対象のフラグメント(見つからない場合は空)
8896
+ */
8897
+ static resolveSelectorTargets(e, t, r) {
8898
+ const i = Z.read(e, t), n = [];
8899
+ if (i)
8900
+ Z.queryAll(i, t).forEach((a) => {
8901
+ const o = I.get(a);
8902
+ o && n.push(o);
8903
+ }), n.length === 0 && m.error("Haori", `Element not found: ${i} (${t})`);
8904
+ else if (r === "error-click")
8905
+ m.error(
8906
+ "Haori",
8907
+ `${t} にはクリックする要素のセレクタが必要です。`
8908
+ );
8909
+ else if (r === "open" || r === "close" || r === "error-close") {
8910
+ const s = e.getTarget().closest("dialog");
8911
+ s ? n.push(I.get(s)) : m.error("Haori", `Ancestor <dialog> not found (${t})`);
8912
+ } else
8913
+ n.push(e);
8914
+ return n;
8915
+ }
8882
8916
  /**
8883
8917
  * トーストのレベル(`data-{event}-toast-level` など)を読み取ります。
8884
- * 式は使えない生値です。
8918
+ *
8919
+ * メッセージと同じく表示直前に評価し直すため、開始時の評価情報を記録します
8920
+ * (仕様「`data-{event}-toast`」の「メッセージと同じく**表示直前**に評価する
8921
+ * ため、式を書けます」)。
8885
8922
  *
8886
8923
  * @param fragment 対象フラグメント
8924
+ * @param options 記録先のオプション
8925
+ * @param key アクション名(`toast-level` / `error-toast-level` など)
8887
8926
  * @param attributeName 属性名
8888
- * @returns レベル。属性が無いか値が不正な場合は null(`info` で表示する)
8927
+ * @returns 開始時のレベル。属性が無いか値が不正な場合は null(`info` で表示する)
8889
8928
  */
8890
- static readToastLevel(e, t) {
8891
- const r = e.getRawAttribute(t);
8892
- return ["info", "warning", "error", "success"].includes(r) ? r : null;
8929
+ static readToastLevel(e, t, r, i) {
8930
+ return p.toToastLevel(
8931
+ p.readLateAttribute(e, t, r, i)
8932
+ );
8933
+ }
8934
+ /**
8935
+ * ステータスごとの失敗時のアクション(`data-{event}-error-{ステータス}-*`)を
8936
+ * 読み取ります。
8937
+ *
8938
+ * 属性名からステータスを集め、ステータスごとに組を作ります。各属性の意味は
8939
+ * ステータスの付かない属性と同じです(仕様「失敗時のアクション」の「意味は
8940
+ * ステータスの付かない属性と同じです」)。
8941
+ *
8942
+ * @param fragment 対象フラグメント
8943
+ * @param options 遅延評価の記録先のオプション
8944
+ * @param event イベント名
8945
+ * @returns ステータスと組の対応(宣言が無い場合は空)
8946
+ */
8947
+ static readErrorStatusActions(e, t, r) {
8948
+ const i = p.attrName(r, "error-"), n = /* @__PURE__ */ new Set();
8949
+ for (const a of e.getAttributeNames()) {
8950
+ if (!a.startsWith(i))
8951
+ continue;
8952
+ const o = Lt.exec(
8953
+ a.slice(i.length)
8954
+ );
8955
+ o && n.add(o[1]);
8956
+ }
8957
+ const s = /* @__PURE__ */ new Map();
8958
+ return n.forEach((a) => {
8959
+ const o = `error-${a}`, c = (u) => p.attrName(r, `${o}-${u}`);
8960
+ s.set(Number(a), {
8961
+ key: o,
8962
+ clickFragments: e.hasAttribute(c("click")) ? p.resolveSelectorTargets(
8963
+ e,
8964
+ c("click"),
8965
+ "error-click"
8966
+ ) : null,
8967
+ clickAwait: e.hasAttribute(c("click-await")),
8968
+ closeFragments: e.hasAttribute(c("close")) ? p.resolveSelectorTargets(
8969
+ e,
8970
+ c("close"),
8971
+ "error-close"
8972
+ ) : null,
8973
+ // `-toast` / `-toast-level` が無い場合は、どちらも null になる。
8974
+ toastMessage: p.readLateAttribute(
8975
+ e,
8976
+ t,
8977
+ `${o}-toast`,
8978
+ c("toast")
8979
+ ),
8980
+ toastLevel: p.readToastLevel(
8981
+ e,
8982
+ t,
8983
+ `${o}-toast-level`,
8984
+ c("toast-level")
8985
+ ),
8986
+ noMessage: e.hasAttribute(c("no-message"))
8987
+ });
8988
+ }), s;
8989
+ }
8990
+ /**
8991
+ * 評価値を、トーストのレベルへ変換します。
8992
+ *
8993
+ * @param value 評価値
8994
+ * @returns レベル。4 つの値のどれとも一致しない場合は null(`info` で表示する)
8995
+ */
8996
+ static toToastLevel(e) {
8997
+ return Pt.includes(e) ? e : null;
8893
8998
  }
8894
8999
  /**
8895
9000
  * `data-{event}-error-status` の値を、ステータスの一覧へ変換します。
@@ -9067,7 +9172,7 @@ const p = class p {
9067
9172
  return { value: e.replace(
9068
9173
  p.DATA_PLACEHOLDER_REGEX,
9069
9174
  (n, s, a) => {
9070
- const o = ne.evaluateDetailed(
9175
+ const o = ie.evaluateDetailed(
9071
9176
  s ?? a ?? "",
9072
9177
  t
9073
9178
  );
@@ -9137,7 +9242,7 @@ const p = class p {
9137
9242
  return { value: e.replace(
9138
9243
  p.DATA_PLACEHOLDER_REGEX,
9139
9244
  (n, s, a, o) => {
9140
- const c = ne.evaluateDetailed(
9245
+ const c = ie.evaluateDetailed(
9141
9246
  s ?? a ?? "",
9142
9247
  t
9143
9248
  );
@@ -9209,7 +9314,7 @@ const p = class p {
9209
9314
  }, i = t ? p.attrName(t, "if") : p.attrName(null, "if", !0);
9210
9315
  if (e.hasAttribute(i)) {
9211
9316
  const T = e.getRawAttribute(i);
9212
- typeof T == "string" && T.trim() !== "" ? (r.conditionExpression = F.unwrapConditionExpression(T), r.conditionAttributeName = i) : m.warn(
9317
+ typeof T == "string" && T.trim() !== "" ? (r.conditionExpression = k.unwrapConditionExpression(T), r.conditionAttributeName = i) : m.warn(
9213
9318
  "Haori",
9214
9319
  `${i} に条件式が指定されていません。`
9215
9320
  );
@@ -9220,24 +9325,24 @@ const p = class p {
9220
9325
  e.getAttribute(p.attrName(t, "confirm"))
9221
9326
  )
9222
9327
  )), e.hasAttribute(p.attrName(t, "data")) && (r.dataAttrName = p.attrName(t, "data")), e.hasAttribute(p.attrName(t, "form"))) {
9223
- const L = J.read(
9328
+ const L = Z.read(
9224
9329
  e,
9225
9330
  p.attrName(t, "form")
9226
9331
  );
9227
9332
  if (L) {
9228
- const Y = J.query(
9333
+ const Y = Z.query(
9229
9334
  L,
9230
9335
  p.attrName(t, "form")
9231
9336
  );
9232
- Y !== null ? r.formFragment = F.getFormFragment(
9233
- D.get(Y)
9337
+ Y !== null ? r.formFragment = k.getFormFragment(
9338
+ I.get(Y)
9234
9339
  ) : m.error(
9235
9340
  "Haori",
9236
9341
  `Form element not found: ${L} (${p.attrName(t, "form")})`
9237
9342
  );
9238
9343
  } else
9239
- r.formFragment = F.getFormFragment(e);
9240
- } else (t === "change" || t === "input") && (r.formFragment = F.getFormFragment(e), r.formFragment === null && p.isNamedInputFragment(e) && (r.selfValueFragment = e));
9344
+ r.formFragment = k.getFormFragment(e);
9345
+ } else (t === "change" || t === "input") && (r.formFragment = k.getFormFragment(e), r.formFragment === null && p.isNamedInputFragment(e) && (r.selfValueFragment = e));
9241
9346
  if (e.hasAttribute(`${l.prefix}${t}-before-run`)) {
9242
9347
  const L = e.getRawAttribute(
9243
9348
  `${l.prefix}${t}-before-run`
@@ -9271,8 +9376,8 @@ ${L}
9271
9376
  Y = new Function("event", `"use strict";
9272
9377
  ${L}
9273
9378
  `);
9274
- } catch (Z) {
9275
- m.error("Haori", `Invalid run script: ${Z}`);
9379
+ } catch (Q) {
9380
+ m.error("Haori", `Invalid run script: ${Q}`);
9276
9381
  }
9277
9382
  }
9278
9383
  Y && (r.runScript = Y);
@@ -9332,25 +9437,25 @@ ${L}
9332
9437
  ));
9333
9438
  const A = t ? p.attrName(t, "bind") : p.attrName(null, "bind", !0);
9334
9439
  if (e.hasAttribute(A)) {
9335
- const T = J.read(e, A);
9440
+ const T = Z.read(e, A);
9336
9441
  if (T) {
9337
- const L = J.queryAll(T, A);
9442
+ const L = Z.queryAll(T, A);
9338
9443
  L.length > 0 ? (r.bindFragments = [], L.forEach((Y) => {
9339
- const Z = D.get(Y);
9340
- Z && r.bindFragments.push(Z);
9444
+ const Q = I.get(Y);
9445
+ Q && r.bindFragments.push(Q);
9341
9446
  })) : m.error(
9342
9447
  "Haori",
9343
9448
  `Bind element not found: ${T} (${A})`
9344
9449
  );
9345
9450
  }
9346
9451
  }
9347
- const I = p.attrName(t, "bind-arg"), C = p.attrName(null, "arg", !0), q = p.attrName(null, "bind-arg", !0);
9348
- t ? e.hasAttribute(I) && (r.bindArg = e.getRawAttribute(I)) : e.hasAttribute(C) ? r.bindArg = e.getRawAttribute(
9349
- C
9350
- ) : e.hasAttribute(q) && (r.bindArg = e.getRawAttribute(q));
9351
- const N = t ? p.attrName(t, "bind-params") : p.attrName(null, "bind-params", !0);
9352
- if (e.hasAttribute(N)) {
9353
- const T = e.getRawAttribute(N);
9452
+ const D = p.attrName(t, "bind-arg"), N = p.attrName(null, "arg", !0), B = p.attrName(null, "bind-arg", !0);
9453
+ t ? e.hasAttribute(D) && (r.bindArg = e.getRawAttribute(D)) : e.hasAttribute(N) ? r.bindArg = e.getRawAttribute(
9454
+ N
9455
+ ) : e.hasAttribute(B) && (r.bindArg = e.getRawAttribute(B));
9456
+ const F = t ? p.attrName(t, "bind-params") : p.attrName(null, "bind-params", !0);
9457
+ if (e.hasAttribute(F)) {
9458
+ const T = e.getRawAttribute(F);
9354
9459
  r.bindParams = T.split("&").map((L) => L.trim());
9355
9460
  }
9356
9461
  const j = t ? p.attrName(t, "bind-append") : p.attrName(null, "bind-append", !0);
@@ -9358,8 +9463,8 @@ ${L}
9358
9463
  const T = e.getRawAttribute(j);
9359
9464
  r.bindAppendParams = T.split("&").map((L) => L.trim()).filter(Boolean);
9360
9465
  }
9361
- const X = t ? p.attrName(t, "bind-merge") : p.attrName(null, "bind-merge", !0);
9362
- e.hasAttribute(X) && (r.bindMerge = !0);
9466
+ const J = t ? p.attrName(t, "bind-merge") : p.attrName(null, "bind-merge", !0);
9467
+ e.hasAttribute(J) && (r.bindMerge = !0);
9363
9468
  const _ = t ? p.attrName(t, "bind-transform") : p.attrName(null, "bind-transform", !0);
9364
9469
  e.hasAttribute(_) && (r.bindTransform = e.getRawAttribute(_));
9365
9470
  const P = t ? p.attrName(t, "copy-params") : null;
@@ -9369,32 +9474,32 @@ ${L}
9369
9474
  }
9370
9475
  if (t) {
9371
9476
  if (e.hasAttribute(p.attrName(t, "adjust"))) {
9372
- const U = J.read(
9477
+ const W = Z.read(
9373
9478
  e,
9374
9479
  p.attrName(t, "adjust")
9375
9480
  );
9376
- if (U) {
9377
- const K = J.queryAll(
9378
- U,
9481
+ if (W) {
9482
+ const z = Z.queryAll(
9483
+ W,
9379
9484
  p.attrName(t, "adjust")
9380
9485
  );
9381
- K.length > 0 ? (r.adjustFragments = [], K.forEach((te) => {
9382
- const Q = D.get(te);
9383
- Q && r.adjustFragments.push(Q);
9486
+ z.length > 0 ? (r.adjustFragments = [], z.forEach((X) => {
9487
+ const Re = I.get(X);
9488
+ Re && r.adjustFragments.push(Re);
9384
9489
  })) : m.error(
9385
9490
  "Haori",
9386
- `Adjust element not found: ${U} (${p.attrName(t, "adjust")})`
9491
+ `Adjust element not found: ${W} (${p.attrName(t, "adjust")})`
9387
9492
  );
9388
9493
  }
9389
9494
  if (e.hasAttribute(p.attrName(t, "adjust-value"))) {
9390
- const K = e.getRawAttribute(
9495
+ const z = e.getRawAttribute(
9391
9496
  p.attrName(t, "adjust-value")
9392
- ), te = Number(K);
9393
- isNaN(te) || (r.adjustValue = te);
9497
+ ), X = Number(z);
9498
+ isNaN(X) || (r.adjustValue = X);
9394
9499
  }
9395
9500
  }
9396
9501
  if (e.hasAttribute(p.attrName(t, "row-add")) && (r.rowAdd = !0), e.hasAttribute(p.attrName(t, "row-remove")) && (r.rowRemove = !0), e.hasAttribute(p.attrName(t, "row-prev")) && (r.rowMovePrev = !0), e.hasAttribute(p.attrName(t, "row-next")) && (r.rowMoveNext = !0), e.hasAttribute(`${l.prefix}${t}-after-run`)) {
9397
- const U = e.getRawAttribute(
9502
+ const W = e.getRawAttribute(
9398
9503
  `${l.prefix}${t}-after-run`
9399
9504
  );
9400
9505
  try {
@@ -9402,11 +9507,11 @@ ${L}
9402
9507
  "response",
9403
9508
  `
9404
9509
  "use strict";
9405
- ${U}
9510
+ ${W}
9406
9511
  `
9407
9512
  );
9408
- } catch (K) {
9409
- m.error("Haori", `Invalid after script: ${K}`);
9513
+ } catch (z) {
9514
+ m.error("Haori", `Invalid after script: ${z}`);
9410
9515
  }
9411
9516
  }
9412
9517
  if (e.hasAttribute(p.attrName(t, "dialog")) && (r.dialogMessage = p.unescapeNewlines(
@@ -9423,45 +9528,51 @@ ${U}
9423
9528
  p.attrName(t, "toast")
9424
9529
  ), r.toastLevel = p.readToastLevel(
9425
9530
  e,
9531
+ r,
9532
+ "toast-level",
9426
9533
  p.attrName(t, "toast-level")
9427
9534
  )), t !== "poll") {
9428
- const U = p.attrName(t, "error-toast");
9429
- e.hasAttribute(U) && (r.errorToastMessage = p.readLateAttribute(
9535
+ const W = p.attrName(t, "error-toast");
9536
+ e.hasAttribute(W) && (r.errorToastMessage = p.readLateAttribute(
9430
9537
  e,
9431
9538
  r,
9432
9539
  "error-toast",
9433
- U
9540
+ W
9434
9541
  ), r.errorToastLevel = p.readToastLevel(
9435
9542
  e,
9543
+ r,
9544
+ "error-toast-level",
9436
9545
  p.attrName(t, "error-toast-level")
9437
9546
  ));
9438
- const K = p.attrName(t, "error-status");
9439
- e.hasAttribute(K) && (r.errorStatuses = p.parseErrorStatuses(
9440
- e.getRawAttribute(K),
9441
- K
9442
- ));
9547
+ const z = p.attrName(t, "error-status");
9548
+ e.hasAttribute(z) && (r.errorStatuses = p.parseErrorStatuses(
9549
+ e.getRawAttribute(z),
9550
+ z
9551
+ )), r.errorNoMessage = e.hasAttribute(
9552
+ p.attrName(t, "error-no-message")
9553
+ );
9443
9554
  }
9444
- const T = p.attrName(t, "redirect"), L = p.attrName(t, "redirect-replace"), Y = e.hasAttribute(T), Z = e.hasAttribute(L);
9555
+ const T = p.attrName(t, "redirect"), L = p.attrName(t, "redirect-replace"), Y = e.hasAttribute(T), Q = e.hasAttribute(L);
9445
9556
  if (Y && (r.redirectUrl = p.readLateAttribute(
9446
9557
  e,
9447
9558
  r,
9448
9559
  "redirect",
9449
9560
  T
9450
- )), Z && (r.redirectReplaceUrl = p.readLateAttribute(
9561
+ )), Q && (r.redirectReplaceUrl = p.readLateAttribute(
9451
9562
  e,
9452
9563
  r,
9453
9564
  "redirect-replace",
9454
9565
  L
9455
- )), Y || Z) {
9456
- const U = p.attrName(
9566
+ )), Y || Q) {
9567
+ const W = p.attrName(
9457
9568
  t,
9458
9569
  "redirect-return-param"
9459
9570
  );
9460
- e.hasAttribute(U) && (r.redirectReturnParam = p.readLateAttribute(
9571
+ e.hasAttribute(W) && (r.redirectReturnParam = p.readLateAttribute(
9461
9572
  e,
9462
9573
  r,
9463
9574
  "redirect-return-param",
9464
- U
9575
+ W
9465
9576
  ));
9466
9577
  }
9467
9578
  if (e.hasAttribute(p.attrName(t, "scroll-error")) && (r.scrollOnError = !0), e.hasAttribute(p.attrName(t, "scroll")) && (r.scrollTarget = p.readLateAttribute(
@@ -9475,23 +9586,23 @@ ${U}
9475
9586
  "history",
9476
9587
  p.attrName(t, "history")
9477
9588
  )), e.hasAttribute(p.attrName(t, "history-data")) && (r.historyDataAttrName = p.attrName(t, "history-data")), e.hasAttribute(p.attrName(t, "history-form"))) {
9478
- const U = J.read(
9589
+ const W = Z.read(
9479
9590
  e,
9480
9591
  p.attrName(t, "history-form")
9481
9592
  );
9482
- if (U) {
9483
- const K = J.query(
9484
- U,
9593
+ if (W) {
9594
+ const z = Z.query(
9595
+ W,
9485
9596
  p.attrName(t, "history-form")
9486
9597
  );
9487
- K !== null ? r.historyFormFragment = F.getFormFragment(
9488
- D.get(K)
9598
+ z !== null ? r.historyFormFragment = k.getFormFragment(
9599
+ I.get(z)
9489
9600
  ) : m.error(
9490
9601
  "Haori",
9491
- `Form element not found: ${U} (${p.attrName(t, "history-form")})`
9602
+ `Form element not found: ${W} (${p.attrName(t, "history-form")})`
9492
9603
  );
9493
9604
  } else
9494
- r.historyFormFragment = F.getFormFragment(e);
9605
+ r.historyFormFragment = k.getFormFragment(e);
9495
9606
  }
9496
9607
  [
9497
9608
  "reset-before",
@@ -9503,109 +9614,102 @@ ${U}
9503
9614
  "close",
9504
9615
  "error-click",
9505
9616
  "error-close"
9506
- ].forEach((U) => {
9507
- if (U.startsWith("error-") && t === "poll")
9617
+ ].forEach((W) => {
9618
+ if (W.startsWith("error-") && t === "poll")
9508
9619
  return;
9509
- const K = p.attrName(t, U);
9510
- if (!e.hasAttribute(K))
9620
+ const z = p.attrName(t, W);
9621
+ if (!e.hasAttribute(z))
9511
9622
  return;
9512
- const te = J.read(e, K), Q = [];
9513
- if (te)
9514
- J.queryAll(te, K).forEach((pe) => {
9515
- const Ke = D.get(pe);
9516
- Ke && Q.push(Ke);
9517
- }), Q.length === 0 && m.error("Haori", `Element not found: ${te} (${K})`);
9518
- else if (U === "error-click")
9519
- m.error(
9520
- "Haori",
9521
- `${K} にはクリックする要素のセレクタが必要です。`
9522
- );
9523
- else if (U === "open" || U === "close" || U === "error-close") {
9524
- const le = e.getTarget().closest("dialog");
9525
- le ? Q.push(D.get(le)) : m.error("Haori", `Ancestor <dialog> not found (${K})`);
9526
- } else
9527
- Q.push(e);
9528
- if (Q.length > 0)
9529
- switch (U) {
9623
+ const X = p.resolveSelectorTargets(
9624
+ e,
9625
+ z,
9626
+ W
9627
+ );
9628
+ if (X.length > 0)
9629
+ switch (W) {
9530
9630
  case "reset-before":
9531
- r.resetBeforeFragments = Q;
9631
+ r.resetBeforeFragments = X;
9532
9632
  break;
9533
9633
  case "reset":
9534
- r.resetFragments = Q;
9634
+ r.resetFragments = X;
9535
9635
  break;
9536
9636
  case "refetch":
9537
- r.refetchFragments = Q;
9637
+ r.refetchFragments = X;
9538
9638
  break;
9539
9639
  case "click":
9540
- r.clickFragments = Q, r.clickAwait = e.hasAttribute(`${K}-await`);
9640
+ r.clickFragments = X, r.clickAwait = e.hasAttribute(`${z}-await`);
9541
9641
  break;
9542
9642
  case "copy":
9543
- r.copyFragments = Q;
9643
+ r.copyFragments = X;
9544
9644
  break;
9545
9645
  case "open":
9546
- r.openFragments = Q;
9646
+ r.openFragments = X;
9547
9647
  break;
9548
9648
  case "close":
9549
- r.closeFragments = Q;
9649
+ r.closeFragments = X;
9550
9650
  break;
9551
9651
  case "error-click":
9552
- r.errorClickFragments = Q, r.errorClickAwait = e.hasAttribute(
9553
- `${K}-await`
9652
+ r.errorClickFragments = X, r.errorClickAwait = e.hasAttribute(
9653
+ `${z}-await`
9554
9654
  );
9555
9655
  break;
9556
9656
  case "error-close":
9557
- r.errorCloseFragments = Q;
9657
+ r.errorCloseFragments = X;
9558
9658
  break;
9559
9659
  }
9560
- });
9561
- const ce = p.attrName(t, "copy-source");
9562
- if (e.hasAttribute(ce)) {
9563
- const U = J.read(e, ce);
9564
- if (U) {
9565
- const K = J.query(U, ce);
9566
- if (K !== null) {
9567
- const te = D.get(K);
9568
- te ? r.copySourceFragment = te : m.error(
9660
+ }), t !== "poll" && (r.errorStatusActions = p.readErrorStatusActions(
9661
+ e,
9662
+ r,
9663
+ t
9664
+ ));
9665
+ const oe = p.attrName(t, "copy-source");
9666
+ if (e.hasAttribute(oe)) {
9667
+ const W = Z.read(e, oe);
9668
+ if (W) {
9669
+ const z = Z.query(W, oe);
9670
+ if (z !== null) {
9671
+ const X = I.get(z);
9672
+ X ? r.copySourceFragment = X : m.error(
9569
9673
  "Haori",
9570
- `Element is not managed by Haori: ${U} (${ce})`
9674
+ `Element is not managed by Haori: ${W} (${oe})`
9571
9675
  );
9572
9676
  } else
9573
9677
  m.error(
9574
9678
  "Haori",
9575
- `Element not found: ${U} (${ce})`
9679
+ `Element not found: ${W} (${oe})`
9576
9680
  );
9577
9681
  } else
9578
9682
  r.copySourceFragment = e;
9579
9683
  }
9580
9684
  }
9581
9685
  if (!t && (e.hasAttribute(p.attrName(null, "data", !0)) && (r.dataAttrName = p.attrName(null, "data", !0)), e.hasAttribute(p.attrName(null, "form", !0)))) {
9582
- const T = J.read(
9686
+ const T = Z.read(
9583
9687
  e,
9584
9688
  p.attrName(null, "form", !0)
9585
9689
  );
9586
9690
  if (T) {
9587
- const L = J.query(
9691
+ const L = Z.query(
9588
9692
  T,
9589
9693
  p.attrName(null, "form", !0)
9590
9694
  );
9591
- L !== null ? r.formFragment = F.getFormFragment(
9592
- D.get(L)
9695
+ L !== null ? r.formFragment = k.getFormFragment(
9696
+ I.get(L)
9593
9697
  ) : m.error(
9594
9698
  "Haori",
9595
9699
  `Form element not found: ${T} (${p.attrName(null, "fetch-form", !0)})`
9596
9700
  );
9597
9701
  } else
9598
- r.formFragment = F.getFormFragment(e);
9599
- }
9600
- const ae = t ? p.attrName(t, "fetch-state") : p.attrName(null, "state", !0);
9601
- if (e.hasAttribute(ae)) {
9602
- const T = J.read(e, ae), L = [];
9603
- T ? (J.queryAll(T, ae).forEach((Z) => {
9604
- const he = D.get(Z);
9605
- he && L.push(he);
9702
+ r.formFragment = k.getFormFragment(e);
9703
+ }
9704
+ const se = t ? p.attrName(t, "fetch-state") : p.attrName(null, "state", !0);
9705
+ if (e.hasAttribute(se)) {
9706
+ const T = Z.read(e, se), L = [];
9707
+ T ? (Z.queryAll(T, se).forEach((Q) => {
9708
+ const de = I.get(Q);
9709
+ de && L.push(de);
9606
9710
  }), L.length === 0 && m.error(
9607
9711
  "Haori",
9608
- `Element not found: ${T} (${ae})`
9712
+ `Element not found: ${T} (${se})`
9609
9713
  )) : L.push(e), L.length > 0 && (r.fetchStateFragments = L);
9610
9714
  }
9611
9715
  const G = t ? p.attrName(t, "store-clear") : p.attrName(null, "store-clear", !0);
@@ -9620,10 +9724,10 @@ ${U}
9620
9724
  r.storeClearKey = L;
9621
9725
  const Y = e.getRawAttribute(
9622
9726
  `${G}-type`
9623
- ), Z = Y === null ? "session" : Y.trim();
9624
- Z === "local" || Z === "session" ? r.storeClearKind = Z : (m.warn(
9727
+ ), Q = Y === null ? "session" : Y.trim();
9728
+ Q === "local" || Q === "session" ? r.storeClearKind = Q : (m.warn(
9625
9729
  "Haori",
9626
- `${G}-type は session または local を指定してください(session として扱います): ${Z}`
9730
+ `${G}-type は session または local を指定してください(session として扱います): ${Q}`
9627
9731
  ), r.storeClearKind = "session");
9628
9732
  }
9629
9733
  }
@@ -9737,8 +9841,8 @@ ${U}
9737
9841
  return this.skipped = !0, !1;
9738
9842
  if (this.options.formFragment && this.validate(this.options.formFragment) === !1)
9739
9843
  return !1;
9740
- if (!this.options.formFragment && this.options.targetFragment && F.warnUnvalidatedCustomValidity(
9741
- F.getFormFragment(this.options.targetFragment),
9844
+ if (!this.options.formFragment && this.options.targetFragment && k.warnUnvalidatedCustomValidity(
9845
+ k.getFormFragment(this.options.targetFragment),
9742
9846
  `${l.prefix}${this.eventType ?? "fetch"}-form が解決できません`
9743
9847
  ), !this.evaluateExecutionCondition())
9744
9848
  return this.skipped = !0, !1;
@@ -9758,7 +9862,7 @@ ${U}
9758
9862
  return !1;
9759
9863
  this.options.resetBeforeFragments && this.options.resetBeforeFragments.length > 0 && (await Promise.all(
9760
9864
  this.options.resetBeforeFragments.map(
9761
- (g) => F.reset(g, this.operationSequence)
9865
+ (g) => k.reset(g, this.operationSequence)
9762
9866
  )
9763
9867
  ), this.captureHistorySnapshots());
9764
9868
  const r = this.prepareFetchRequest();
@@ -9778,40 +9882,40 @@ ${U}
9778
9882
  }
9779
9883
  const c = Object.keys(i).length > 0;
9780
9884
  if (n) {
9781
- const g = (s?.method || "GET").toUpperCase(), E = !a && o && r.transportMode === "query-get" && Ht(s) && !He(g) ? r.baseUrl ?? n : n, A = Ut(
9885
+ const g = (s?.method || "GET").toUpperCase(), E = !a && o && r.transportMode === "query-get" && Ut(s) && !He(g) ? r.baseUrl ?? n : n, A = Vt(
9782
9886
  E,
9783
9887
  s
9784
9888
  );
9785
9889
  n = A.url;
9786
- const I = { ...A.options }, C = A.normalized ? A.requestedMethod : r.requestedMethod, q = A.effectiveMethod, N = r.transportMode === "query-get" || A.normalized, j = A.queryString ?? r.queryString;
9787
- if (N && m.info("Haori demo fetch normalization", {
9890
+ const D = { ...A.options }, N = A.normalized ? A.requestedMethod : r.requestedMethod, B = A.effectiveMethod, F = r.transportMode === "query-get" || A.normalized, j = A.queryString ?? r.queryString;
9891
+ if (F && m.info("Haori demo fetch normalization", {
9788
9892
  runtime: l.runtime,
9789
- requestedMethod: C,
9790
- effectiveMethod: q,
9893
+ requestedMethod: N,
9894
+ effectiveMethod: B,
9791
9895
  transportMode: "query-get",
9792
9896
  url: n,
9793
9897
  payload: c ? i : void 0,
9794
9898
  queryString: j
9795
9899
  }), this.options.targetFragment && n) {
9796
- const X = performance.now(), _ = {
9900
+ const J = performance.now(), _ = {
9797
9901
  runtime: l.runtime,
9798
- requestedMethod: C,
9799
- effectiveMethod: q,
9800
- transportMode: N ? "query-get" : "http",
9801
- ...N ? { queryString: j } : {}
9902
+ requestedMethod: N,
9903
+ effectiveMethod: B,
9904
+ transportMode: F ? "query-get" : "http",
9905
+ ...F ? { queryString: j } : {}
9802
9906
  };
9803
- return B.fetchStart(
9907
+ return H.fetchStart(
9804
9908
  this.options.targetFragment.getTarget(),
9805
9909
  n,
9806
- I,
9910
+ D,
9807
9911
  c ? i : void 0,
9808
9912
  _
9809
- ), await this.injectFetchState("loading"), await p.invokeFetch(n, I).then((P) => this.handleFetchResult(
9913
+ ), await this.injectFetchState("loading"), await p.invokeFetch(n, D).then((P) => this.handleFetchResult(
9810
9914
  P,
9811
9915
  n || void 0,
9812
- X
9916
+ J
9813
9917
  )).catch(async (P) => {
9814
- throw n && B.fetchError(
9918
+ throw n && H.fetchError(
9815
9919
  this.options.targetFragment.getTarget(),
9816
9920
  n,
9817
9921
  P
@@ -9822,35 +9926,35 @@ ${U}
9822
9926
  ), await this.runErrorActions(null), P;
9823
9927
  });
9824
9928
  }
9825
- return await fetch(n, I).then((X) => this.handleFetchResult(X, n || void 0));
9929
+ return await fetch(n, D).then((J) => this.handleFetchResult(J, n || void 0));
9826
9930
  }
9827
9931
  if ((!this.options.bindFragments || this.options.bindFragments.length === 0) && this.options.formFragment && c) {
9828
9932
  const g = this.options.formFragment, y = g.getTarget(), E = /* @__PURE__ */ new Set();
9829
9933
  e && e.appliedDisabledAttribute && this.options.targetFragment && E.add(this.options.targetFragment);
9830
- const A = g.getRawBindingData(), I = Ue(i), C = g.getAttribute(`${l.prefix}form-arg`);
9831
- let q;
9832
- if (C) {
9833
- q = { ...A ?? {} };
9834
- const N = String(C), j = F.resolveAncestorArgOwner(g, N);
9835
- q[N] = F.mergeCollectedValues(
9836
- (j ? j.value : q[N]) ?? null,
9837
- I
9934
+ const A = g.getRawBindingData(), D = Ue(i), N = g.getAttribute(`${l.prefix}form-arg`);
9935
+ let B;
9936
+ if (N) {
9937
+ B = { ...A ?? {} };
9938
+ const F = String(N), j = k.resolveAncestorArgOwner(g, F);
9939
+ B[F] = k.mergeCollectedValues(
9940
+ (j ? j.value : B[F]) ?? null,
9941
+ D
9838
9942
  );
9839
9943
  } else
9840
- q = F.mergeCollectedValues(
9944
+ B = k.mergeCollectedValues(
9841
9945
  A,
9842
- I,
9843
- F.ancestorBaseResolver(g)
9946
+ D,
9947
+ k.ancestorBaseResolver(g)
9844
9948
  );
9845
- await $.setBindingData(y, q, {
9949
+ await $.setBindingData(y, B, {
9846
9950
  skipFragments: E,
9847
9951
  kind: "nonSupply",
9848
9952
  sequence: this.operationSequence,
9849
- editedPaths: F.collectEditedPaths(
9953
+ editedPaths: k.collectEditedPaths(
9850
9954
  g,
9851
9955
  this.operationSequence,
9852
- C ? String(C) : "",
9853
- I
9956
+ N ? String(N) : "",
9957
+ D
9854
9958
  )
9855
9959
  });
9856
9960
  }
@@ -10020,7 +10124,7 @@ ${U}
10020
10124
  break;
10021
10125
  await t(s), this.downloadReceivedBytes += s.byteLength, this.dropTotalBytesIfExceeded();
10022
10126
  const a = Date.now();
10023
- a - r >= Pt && (r = a, await this.injectFetchState("loading"));
10127
+ a - r >= Ct && (r = a, await this.injectFetchState("loading"));
10024
10128
  }
10025
10129
  } catch (n) {
10026
10130
  return m.error("Haori", `応答をファイルとして読み取れませんでした: ${n}`), !1;
@@ -10094,7 +10198,7 @@ ${U}
10094
10198
  `保存先のフォルダを確かめられなかったため、今までどおり保存します: ${c}`
10095
10199
  ), "fallback";
10096
10200
  }
10097
- if (s && !await ge().confirm(
10201
+ if (s && !await fe().confirm(
10098
10202
  `${n} は既にあります。上書きしますか?`
10099
10203
  ))
10100
10204
  return "cancelled";
@@ -10178,8 +10282,8 @@ ${U}
10178
10282
  * @returns 表示の完了 Promise
10179
10283
  */
10180
10284
  async showDownloadFailure() {
10181
- const e = this.options.formFragment ?? (this.options.targetFragment ? F.getFormFragment(this.options.targetFragment) || this.options.targetFragment : null), t = e ? e.getTarget() : document.body, r = ge();
10182
- await r.clearMessages(t), await r.addErrorMessage(t, Ze);
10285
+ const e = this.options.formFragment ?? (this.options.targetFragment ? k.getFormFragment(this.options.targetFragment) || this.options.targetFragment : null), t = e ? e.getTarget() : document.body, r = fe();
10286
+ await r.clearMessages(t), await r.addErrorMessage(t, Je);
10183
10287
  }
10184
10288
  /**
10185
10289
  * 保存するファイル名を決めます。
@@ -10262,20 +10366,29 @@ ${U}
10262
10366
  * フェッチ後の処理を実行します。
10263
10367
  */
10264
10368
  async handleFetchResult(e, t, r) {
10265
- const i = ge();
10266
- if (!e.ok)
10267
- return gt(e.status) || (this.options.targetFragment && t && B.fetchError(
10369
+ const i = fe();
10370
+ if (!e.ok) {
10371
+ if (pt(e.status))
10372
+ return !1;
10373
+ this.options.targetFragment && t && H.fetchError(
10268
10374
  this.options.targetFragment.getTarget(),
10269
10375
  t,
10270
10376
  new Error(`${e.status} ${e.statusText}`),
10271
10377
  e.status,
10272
10378
  r
10273
- ), await this.handleFetchError(e), await this.injectFetchState(
10379
+ );
10380
+ const E = await this.handleFetchError(
10381
+ e,
10382
+ this.selectErrorActions(e.status)?.noMessage !== !0
10383
+ );
10384
+ return await this.injectFetchState(
10274
10385
  "error",
10275
10386
  e.status,
10276
- e.statusText || null
10277
- ), await this.runErrorActions(e.status)), !1;
10278
- if (this.options.targetFragment && t && r && B.fetchEnd(
10387
+ e.statusText || null,
10388
+ E
10389
+ ), await this.runErrorActions(e.status), !1;
10390
+ }
10391
+ if (this.options.targetFragment && t && r && H.fetchEnd(
10279
10392
  this.options.targetFragment.getTarget(),
10280
10393
  t,
10281
10394
  e.status,
@@ -10296,13 +10409,13 @@ ${U}
10296
10409
  return await this.showDownloadFailure(), await this.injectFetchState(
10297
10410
  "error",
10298
10411
  e.status,
10299
- Ze
10412
+ Je
10300
10413
  ), !1;
10301
10414
  }
10302
10415
  const n = [];
10303
10416
  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(
10304
10417
  this.options.resetFragments.map(
10305
- (E) => F.reset(E, this.operationSequence)
10418
+ (E) => k.reset(E, this.operationSequence)
10306
10419
  )
10307
10420
  ), await this.copy();
10308
10421
  const s = [];
@@ -10331,12 +10444,18 @@ ${U}
10331
10444
  const c = p.normalizeAttributeText(
10332
10445
  this.resolveLateAttribute("toast", this.options.toastMessage)
10333
10446
  );
10334
- c && await i.toast(c, this.options.toastLevel ?? "info"), this.clearStore(), this.pushHistory();
10447
+ if (c) {
10448
+ const E = p.toToastLevel(
10449
+ this.resolveLateAttribute("toast-level", this.options.toastLevel)
10450
+ );
10451
+ await i.toast(c, E ?? "info");
10452
+ }
10453
+ this.clearStore(), this.pushHistory();
10335
10454
  const u = this.resolveLateAttribute(
10336
10455
  "scroll",
10337
10456
  this.options.scrollTarget
10338
10457
  );
10339
- u && J.query(
10458
+ u && Z.query(
10340
10459
  u,
10341
10460
  p.attrName(this.eventType, "scroll"),
10342
10461
  document
@@ -10360,12 +10479,12 @@ ${U}
10360
10479
  this.options.redirectReturnParam
10361
10480
  );
10362
10481
  if (A) {
10363
- const C = new URLSearchParams(window.location.search).get(A);
10364
- if (C !== null) {
10365
- const q = C.trim();
10366
- mt.isSafeLocalPath(q) ? E = q : m.warn(
10482
+ const N = new URLSearchParams(window.location.search).get(A);
10483
+ if (N !== null) {
10484
+ const B = N.trim();
10485
+ gt.isSafeLocalPath(B) ? E = B : m.warn(
10367
10486
  "Haori",
10368
- `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${C}`
10487
+ `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${N}`
10369
10488
  );
10370
10489
  }
10371
10490
  }
@@ -10428,25 +10547,62 @@ ${U}
10428
10547
  * @returns 実行完了の Promise
10429
10548
  */
10430
10549
  async runErrorActions(e) {
10431
- const t = this.options.errorStatuses;
10432
- if (t !== void 0 && (e === null || !t.includes(e)) || await this.clickTargets(
10433
- this.options.errorClickFragments,
10434
- this.options.errorClickAwait === !0,
10435
- "error-click-await"
10550
+ const t = this.selectErrorActions(e);
10551
+ if (!t || await this.clickTargets(
10552
+ t.clickFragments,
10553
+ t.clickAwait,
10554
+ `${t.key}-click-await`
10436
10555
  ))
10437
10556
  return;
10438
- const i = ge(), n = [];
10439
- this.options.errorCloseFragments?.forEach((a) => {
10557
+ const i = fe(), n = [];
10558
+ t.closeFragments?.forEach((a) => {
10440
10559
  const o = a.getTarget();
10441
10560
  o instanceof HTMLElement ? n.push(i.closeDialog(o)) : m.error("Haori", "Element is not an HTML element: ", o);
10442
10561
  }), await Promise.all(n);
10443
10562
  const s = p.normalizeAttributeText(
10444
- this.resolveLateAttribute("error-toast", this.options.errorToastMessage)
10445
- );
10446
- s && await i.toast(
10447
- s,
10448
- this.options.errorToastLevel ?? "info"
10563
+ this.resolveLateAttribute(`${t.key}-toast`, t.toastMessage)
10449
10564
  );
10565
+ if (s) {
10566
+ const a = p.toToastLevel(
10567
+ this.resolveLateAttribute(
10568
+ `${t.key}-toast-level`,
10569
+ t.toastLevel
10570
+ )
10571
+ );
10572
+ await i.toast(s, a ?? "info");
10573
+ }
10574
+ }
10575
+ /**
10576
+ * 失敗に使う失敗時のアクションの組を選びます。
10577
+ *
10578
+ * 失敗したステータスの組があればその組を、無ければ `data-{event}-error-status`
10579
+ * の絞り込みに当たる場合に限りステータスの付かない組を返します(仕様「失敗時の
10580
+ * アクション」の「ステータスごとの組には、`-error-status` が効きません」)。
10581
+ *
10582
+ * @param status HTTP ステータス。通信の例外では null
10583
+ * @returns 使う組。実行しない場合は null
10584
+ */
10585
+ selectErrorActions(e) {
10586
+ const t = e === null ? void 0 : this.options.errorStatusActions?.get(e);
10587
+ return t || (this.appliesErrorActions(e) ? {
10588
+ key: "error",
10589
+ clickFragments: this.options.errorClickFragments ?? null,
10590
+ clickAwait: this.options.errorClickAwait === !0,
10591
+ closeFragments: this.options.errorCloseFragments ?? null,
10592
+ toastMessage: this.options.errorToastMessage ?? null,
10593
+ toastLevel: this.options.errorToastLevel ?? null,
10594
+ noMessage: this.options.errorNoMessage === !0
10595
+ } : null);
10596
+ }
10597
+ /**
10598
+ * 失敗時のアクションを実行する失敗かどうかを判定します。
10599
+ *
10600
+ * @param status HTTP ステータス。通信の例外では null
10601
+ * @returns `data-{event}-error-status` の宣言に当たる場合(宣言が無い場合を含む)は true
10602
+ */
10603
+ appliesErrorActions(e) {
10604
+ const t = this.options.errorStatuses;
10605
+ return t === void 0 || e !== null && t.includes(e);
10450
10606
  }
10451
10607
  /**
10452
10608
  * bind より後で使うアクション属性を、使用直前に評価し直します。
@@ -10465,7 +10621,7 @@ ${U}
10465
10621
  if (!i || !n || !n.hasAttribute(i.attributeName))
10466
10622
  return r;
10467
10623
  const s = n.getAttributeEvaluation(i.attributeName);
10468
- return s === null ? r : s.hasUnresolvedReference && !i.hasUnresolvedReference ? (W.isEnabled() && m.warn(
10624
+ return s === null ? r : s.hasUnresolvedReference && !i.hasUnresolvedReference ? (q.isEnabled() && m.warn(
10469
10625
  "Haori",
10470
10626
  `${i.attributeName} の参照が手続きの途中で解決できなくなったため、手続き開始時の値を使います`
10471
10627
  ), r) : s.value ?? null;
@@ -10495,7 +10651,7 @@ ${U}
10495
10651
  g != null && (Array.isArray(g) ? (o.searchParams.delete(d), g.forEach((y) => o.searchParams.append(d, String(y)))) : typeof g == "object" ? o.searchParams.set(d, JSON.stringify(g)) : o.searchParams.set(d, String(g)));
10496
10652
  };
10497
10653
  n && c(r), s && c(i), history.pushState(
10498
- { [Mt]: !0 },
10654
+ { [$t]: !0 },
10499
10655
  "",
10500
10656
  o.toString()
10501
10657
  ), $.refreshUrlParams();
@@ -10505,69 +10661,80 @@ ${U}
10505
10661
  }
10506
10662
  /**
10507
10663
  * フェッチエラー応答のメッセージを適切な要素へ伝播します。
10508
- */
10509
- async handleFetchError(e) {
10510
- let t = null;
10511
- this.options.formFragment ? t = this.options.formFragment : this.options.targetFragment && (t = F.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
10512
- const r = t ? t.getTarget() : document.body;
10513
- await ge().clearMessages(r);
10514
- const i = async (a) => {
10515
- const o = t ? t.getTarget() : document.body;
10516
- await ge().addErrorMessage(o, a);
10517
- }, n = () => {
10664
+ *
10665
+ * 表示しない場合も、既存メッセージのクリアと本文の解析は行います。
10666
+ *
10667
+ * @param response エラー応答
10668
+ * @param showMessages 本文のメッセージを表示するかどうか
10669
+ * @returns 本文から取り出した文言を、表示する順に改行で連結した文字列
10670
+ * (`_fetch.responseMessage`)。取り出せない場合は null
10671
+ */
10672
+ async handleFetchError(e, t) {
10673
+ let r = null;
10674
+ this.options.formFragment ? r = this.options.formFragment : this.options.targetFragment && (r = k.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
10675
+ const i = r ? r.getTarget() : document.body;
10676
+ await fe().clearMessages(i);
10677
+ const n = async (u) => {
10678
+ const d = r ? r.getTarget() : document.body;
10679
+ await fe().addErrorMessage(d, u);
10680
+ }, s = () => {
10518
10681
  if (!this.options.scrollOnError)
10519
10682
  return;
10520
- const a = t ? t.getTarget() : document.body;
10521
- (a.getAttribute("data-message-level") === "error" ? a : a.parentElement?.getAttribute("data-message-level") === "error" ? a.parentElement : a.querySelector('[data-message-level="error"]'))?.scrollIntoView({ behavior: "smooth", block: "nearest" });
10683
+ const u = r ? r.getTarget() : document.body;
10684
+ (u.getAttribute("data-message-level") === "error" ? u : u.parentElement?.getAttribute("data-message-level") === "error" ? u.parentElement : u.querySelector('[data-message-level="error"]'))?.scrollIntoView({ behavior: "smooth", block: "nearest" });
10685
+ }, a = async (u) => {
10686
+ if (t) {
10687
+ u.length === 0 && await n(`${e.status} ${e.statusText}`);
10688
+ for (const d of u)
10689
+ d.key && r ? await k.addErrorMessage(r, d.key, d.message) : await n(d.message);
10690
+ s();
10691
+ }
10692
+ return u.length === 0 ? null : u.map((d) => d.message).join(`
10693
+ `);
10522
10694
  };
10523
10695
  if ((e.headers.get("Content-Type") || "").includes("application/json"))
10524
10696
  try {
10525
- const a = await e.json(), o = [];
10526
- if (Array.isArray(a)) {
10527
- const c = /* @__PURE__ */ new Map(), u = [];
10528
- for (const d of a)
10529
- if (d && typeof d == "object" && !Array.isArray(d)) {
10530
- const g = d.key, y = d.message, E = typeof g == "string" && g.length > 0 ? g : null, A = typeof y == "string" ? y : y != null ? String(y) : "";
10531
- if (A.length === 0)
10697
+ const u = await e.json(), d = [];
10698
+ if (Array.isArray(u)) {
10699
+ const g = /* @__PURE__ */ new Map(), y = [];
10700
+ for (const E of u)
10701
+ if (E && typeof E == "object" && !Array.isArray(E)) {
10702
+ const A = E.key, D = E.message, N = typeof A == "string" && A.length > 0 ? A : null, B = typeof D == "string" ? D : D != null ? String(D) : "";
10703
+ if (B.length === 0)
10532
10704
  continue;
10533
- if (E !== null) {
10534
- const I = c.get(E) ?? [];
10535
- I.push(A), c.set(E, I);
10705
+ if (N !== null) {
10706
+ const F = g.get(N) ?? [];
10707
+ F.push(B), g.set(N, F);
10536
10708
  } else
10537
- u.push(A);
10538
- } else typeof d == "string" && d.length > 0 && u.push(d);
10539
- for (const [d, g] of c)
10540
- o.push({ key: d, message: g.join(`
10709
+ y.push(B);
10710
+ } else typeof E == "string" && E.length > 0 && y.push(E);
10711
+ for (const [E, A] of g)
10712
+ d.push({ key: E, message: A.join(`
10541
10713
  `) });
10542
- for (const d of u)
10543
- o.push({ message: d });
10544
- } else if (a && typeof a == "object") {
10545
- if (typeof a.message == "string" && o.push({ message: a.message }), Array.isArray(a.messages))
10546
- for (const c of a.messages)
10547
- typeof c == "string" && o.push({ message: c });
10548
- if (a.errors && typeof a.errors == "object")
10549
- for (const [c, u] of Object.entries(a.errors))
10550
- Array.isArray(u) ? o.push({ key: c, message: u.join(`
10551
- `) }) : typeof u == "string" ? o.push({ key: c, message: u }) : u != null && o.push({ key: c, message: String(u) });
10552
- if (o.length === 0)
10553
- for (const [c, u] of Object.entries(a))
10554
- c === "message" || c === "messages" || c === "errors" || (Array.isArray(u) ? o.push({ key: c, message: u.join(`
10555
- `) }) : typeof u == "string" && o.push({ key: c, message: u }));
10714
+ for (const E of y)
10715
+ d.push({ message: E });
10716
+ } else if (u && typeof u == "object") {
10717
+ if (typeof u.message == "string" && d.push({ message: u.message }), Array.isArray(u.messages))
10718
+ for (const g of u.messages)
10719
+ typeof g == "string" && d.push({ message: g });
10720
+ if (u.errors && typeof u.errors == "object")
10721
+ for (const [g, y] of Object.entries(u.errors))
10722
+ Array.isArray(y) ? d.push({ key: g, message: y.join(`
10723
+ `) }) : typeof y == "string" ? d.push({ key: g, message: y }) : y != null && d.push({ key: g, message: String(y) });
10724
+ if (d.length === 0)
10725
+ for (const [g, y] of Object.entries(u))
10726
+ g === "message" || g === "messages" || g === "errors" || (Array.isArray(y) ? d.push({ key: g, message: y.join(`
10727
+ `) }) : typeof y == "string" && d.push({ key: g, message: y }));
10556
10728
  }
10557
- if (o.length === 0)
10558
- return await i(`${e.status} ${e.statusText}`), n(), !1;
10559
- for (const c of o)
10560
- c.key && t ? await F.addErrorMessage(t, c.key, c.message) : await i(c.message);
10561
- return n(), !1;
10729
+ return await a(d);
10562
10730
  } catch {
10563
10731
  }
10732
+ let c = "";
10564
10733
  try {
10565
- const a = await e.text();
10566
- a && a.trim().length > 0 ? await i(a.trim()) : await i(`${e.status} ${e.statusText}`);
10734
+ c = (await e.text()).trim();
10567
10735
  } catch {
10568
- await i(`${e.status} ${e.statusText}`);
10569
10736
  }
10570
- return n(), !1;
10737
+ return await a(c.length > 0 ? [{ message: c }] : []);
10571
10738
  }
10572
10739
  /**
10573
10740
  * 対象のフラグメント以下の入力要素に対してバリデーションを実行します。
@@ -10578,11 +10745,11 @@ ${U}
10578
10745
  */
10579
10746
  validate(e) {
10580
10747
  if (this.options.valid !== !0)
10581
- return F.warnUnvalidatedCustomValidity(
10748
+ return k.warnUnvalidatedCustomValidity(
10582
10749
  e,
10583
10750
  `${l.prefix}${this.eventType ?? "fetch"}-validate の指定がありません`
10584
10751
  ), !0;
10585
- F.applyCustomValidity(e);
10752
+ k.applyCustomValidity(e);
10586
10753
  const t = this.findFirstInvalid(e);
10587
10754
  if (t === null)
10588
10755
  return !0;
@@ -10673,14 +10840,14 @@ ${U}
10673
10840
  const r = this.options.targetFragment;
10674
10841
  if (!r)
10675
10842
  return !0;
10676
- const i = this.options.conditionAttributeName ?? `${l.prefix}if`, n = F.buildConditionScope(
10843
+ const i = this.options.conditionAttributeName ?? `${l.prefix}if`, n = k.buildConditionScope(
10677
10844
  r,
10678
10845
  this.options.formFragment ?? null
10679
- ), s = ne.evaluateDetailed(t, n);
10846
+ ), s = ie.evaluateDetailed(t, n);
10680
10847
  return s.unresolvedReference ? (e || m.warn(
10681
10848
  "Haori",
10682
10849
  `${i} の参照が解決できないため実行しません: ${t}`
10683
- ), !1) : s.value ? !0 : (!e && W.isEnabled() && m.warn(
10850
+ ), !1) : s.value ? !0 : (!e && q.isEnabled() && m.warn(
10684
10851
  "Haori",
10685
10852
  `${i} の条件が偽のため手続きを中断しました: ${t}`
10686
10853
  ), !1);
@@ -10721,7 +10888,7 @@ ${U}
10721
10888
  */
10722
10889
  confirm() {
10723
10890
  const e = this.options.confirmMessage;
10724
- return e == null ? Promise.resolve(!0) : ge().confirm(e);
10891
+ return e == null ? Promise.resolve(!0) : fe().confirm(e);
10725
10892
  }
10726
10893
  /**
10727
10894
  * 結果データを対象のフラグメントにバインドします。
@@ -10738,7 +10905,7 @@ ${U}
10738
10905
  let i = t ? JSON.parse(r) : r;
10739
10906
  if (this.options.bindTransform)
10740
10907
  try {
10741
- i = ne.evaluate(this.options.bindTransform, {
10908
+ i = ie.evaluate(this.options.bindTransform, {
10742
10909
  response: i
10743
10910
  });
10744
10911
  } catch (o) {
@@ -10773,11 +10940,11 @@ ${U}
10773
10940
  apply: (y) => {
10774
10941
  const E = this.resolveCurrentRowItem(o, y), A = { ...E };
10775
10942
  if (i && typeof i == "object" && !Array.isArray(i)) {
10776
- const I = E[g], C = I !== null && typeof I == "object" && !Array.isArray(I) ? I : {};
10943
+ const D = E[g], N = D !== null && typeof D == "object" && !Array.isArray(D) ? D : {};
10777
10944
  A[g] = this.mergeAppendBindingData(
10778
10945
  o,
10779
10946
  i,
10780
- C
10947
+ N
10781
10948
  );
10782
10949
  } else
10783
10950
  A[g] = i;
@@ -10870,7 +11037,7 @@ ${U}
10870
11037
  return n.push(this.applyRowWrites(a)), Promise.all(n).then(() => {
10871
11038
  const o = this.options.bindArg ?? null;
10872
11039
  this.options.bindFragments.forEach((c) => {
10873
- B.bindComplete(c.getTarget(), o);
11040
+ H.bindComplete(c.getTarget(), o);
10874
11041
  });
10875
11042
  });
10876
11043
  });
@@ -10917,7 +11084,7 @@ ${U}
10917
11084
  t,
10918
11085
  i ? 0 : r
10919
11086
  );
10920
- const n = F.getValuesEditedAfter(
11087
+ const n = k.getValuesEditedAfter(
10921
11088
  e,
10922
11089
  i ? 0 : r
10923
11090
  );
@@ -10926,9 +11093,9 @@ ${U}
10926
11093
  const s = e.getAttribute(`${l.prefix}form-arg`);
10927
11094
  if (s) {
10928
11095
  const a = String(s), o = t[a], c = o && typeof o == "object" && !Array.isArray(o) ? o : {};
10929
- return { ...t, [a]: ye(c, n) };
11096
+ return { ...t, [a]: pe(c, n) };
10930
11097
  }
10931
- return ye(t, n);
11098
+ return pe(t, n);
10932
11099
  }
10933
11100
  /**
10934
11101
  * 編集可能な行へのバインドについて、送信後の編集を要素データへ上書きし直します。
@@ -10951,11 +11118,11 @@ ${U}
10951
11118
  return t;
10952
11119
  const i = this.eventType === "poll";
10953
11120
  !i && !this.twoWayCommitBind && $.clearUserEditMarks(e, r);
10954
- const n = F.getValuesEditedAfter(
11121
+ const n = k.getValuesEditedAfter(
10955
11122
  e,
10956
11123
  i ? 0 : r
10957
11124
  );
10958
- return Object.keys(n).length === 0 ? t : ye(t, n);
11125
+ return Object.keys(n).length === 0 ? t : pe(t, n);
10959
11126
  }
10960
11127
  /**
10961
11128
  * 祖先へのバインドについて、配下の `data-form-arg` フォームで送信後に行われた
@@ -10973,14 +11140,14 @@ ${U}
10973
11140
  */
10974
11141
  reconcileAncestorArgFormEdits(e, t, r) {
10975
11142
  let i = t;
10976
- for (const { form: n, key: s } of F.collectArgForms(e)) {
11143
+ for (const { form: n, key: s } of k.collectArgForms(e)) {
10977
11144
  if (!Object.prototype.hasOwnProperty.call(i, s))
10978
11145
  continue;
10979
- const a = F.getValuesEditedAfter(n, r);
11146
+ const a = k.getValuesEditedAfter(n, r);
10980
11147
  if (Object.keys(a).length === 0)
10981
11148
  continue;
10982
11149
  const o = i[s], c = o && typeof o == "object" && !Array.isArray(o) ? o : {};
10983
- i = { ...i, [s]: ye(c, a) };
11150
+ i = { ...i, [s]: pe(c, a) };
10984
11151
  }
10985
11152
  return i;
10986
11153
  }
@@ -11056,8 +11223,8 @@ ${U}
11056
11223
  * @returns 行の入力欄の状態を反映した要素データ
11057
11224
  */
11058
11225
  resolveCurrentRowItem(e, t) {
11059
- const r = F.getValuesEditedAfter(e, 0);
11060
- return Object.keys(r).length === 0 ? t : ye(t, r);
11226
+ const r = k.getValuesEditedAfter(e, 0);
11227
+ return Object.keys(r).length === 0 ? t : pe(t, r);
11061
11228
  }
11062
11229
  /**
11063
11230
  * 行の要素データへコピーの値を反映します。
@@ -11085,9 +11252,9 @@ ${U}
11085
11252
  * @returns コピー元のデータ
11086
11253
  */
11087
11254
  resolveCopySourceData() {
11088
- return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? ke(this.options.copySourceFragment) : $.withoutReservedBindingKeys(
11255
+ return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? xe(this.options.copySourceFragment) : $.withoutReservedBindingKeys(
11089
11256
  this.options.copySourceFragment.getRawBindingData() ?? {}
11090
- ) : this.options.formFragment ? ke(this.options.formFragment) : this.options.targetFragment ? $.withoutReservedBindingKeys(
11257
+ ) : this.options.formFragment ? xe(this.options.formFragment) : this.options.targetFragment ? $.withoutReservedBindingKeys(
11091
11258
  this.options.targetFragment.getRawBindingData() ?? {}
11092
11259
  ) : {};
11093
11260
  }
@@ -11101,8 +11268,8 @@ ${U}
11101
11268
  let t = !1;
11102
11269
  const r = this.options.formFragment ?? this.options.selfValueFragment;
11103
11270
  if (r) {
11104
- const i = F.getValues(r);
11105
- Object.assign(e, i), F.carryCollectedRowIdentity(i, e);
11271
+ const i = k.getValues(r);
11272
+ Object.assign(e, i), k.carryCollectedRowIdentity(i, e);
11106
11273
  }
11107
11274
  if (this.options.data && typeof this.options.data == "object" && Object.assign(e, this.options.data), this.options.targetFragment && this.options.dataAttrName) {
11108
11275
  const i = p.resolveDataAttributeDetailed(
@@ -11155,7 +11322,7 @@ ${U}
11155
11322
  ), a = (n.method || "GET").toUpperCase(), o = l.runtime === "demo" && !He(a), c = o ? "GET" : a;
11156
11323
  if (n.method = c, Object.keys(t).length > 0 && Ie(t)) {
11157
11324
  const d = s.get("Content-Type") || "";
11158
- c !== "GET" && c !== "HEAD" && c !== "OPTIONS" && /multipart\/form-data/i.test(d) ? qt(t) && m.warn(
11325
+ c !== "GET" && c !== "HEAD" && c !== "OPTIONS" && /multipart\/form-data/i.test(d) ? Wt(t) && m.warn(
11159
11326
  "Haori",
11160
11327
  `A File value nested under ${l.prefix}form-object / ${l.prefix}form-list cannot be sent. Place file inputs at the top level of the collected form values.`
11161
11328
  ) : m.warn(
@@ -11164,7 +11331,7 @@ ${U}
11164
11331
  );
11165
11332
  }
11166
11333
  if (c === "GET" || c === "HEAD" || c === "OPTIONS")
11167
- Object.keys(t).length > 0 && (i = yt(i, t));
11334
+ Object.keys(t).length > 0 && (i = mt(i, t));
11168
11335
  else if (Object.keys(t).length > 0) {
11169
11336
  const d = s.get("Content-Type") || "";
11170
11337
  if (/multipart\/form-data/i.test(d)) {
@@ -11172,13 +11339,13 @@ ${U}
11172
11339
  const g = new FormData();
11173
11340
  for (const [y, E] of Object.entries(t))
11174
11341
  E == null ? g.append(y, "") : E instanceof Blob ? g.append(y, E) : Array.isArray(E) ? E.forEach((A) => {
11175
- A instanceof Blob ? g.append(y, A) : g.append(y, Ae(A));
11176
- }) : g.append(y, Ae(E));
11342
+ A instanceof Blob ? g.append(y, A) : g.append(y, be(A));
11343
+ }) : g.append(y, be(E));
11177
11344
  n.body = g;
11178
11345
  } else if (/application\/x-www-form-urlencoded/i.test(d)) {
11179
11346
  const g = new URLSearchParams();
11180
11347
  for (const [y, E] of Object.entries(t))
11181
- E !== void 0 && (Array.isArray(E) ? E.forEach((A) => g.append(y, Ae(A))) : g.append(y, Ae(E)));
11348
+ E !== void 0 && (Array.isArray(E) ? E.forEach((A) => g.append(y, be(A))) : g.append(y, be(E)));
11182
11349
  n.body = g;
11183
11350
  } else
11184
11351
  s.set("Content-Type", "application/json"), n.body = JSON.stringify(t);
@@ -11195,7 +11362,7 @@ ${U}
11195
11362
  effectiveMethod: c,
11196
11363
  queryString: u,
11197
11364
  transportMode: o ? "query-get" : "http",
11198
- signature: Wt(i, n)
11365
+ signature: jt(i, n)
11199
11366
  };
11200
11367
  }
11201
11368
  /**
@@ -11205,7 +11372,7 @@ ${U}
11205
11372
  this.options.targetFragment && this.options.historyDataAttrName ? this.historyDataSnapshot = p.resolveDataAttribute(
11206
11373
  this.options.targetFragment,
11207
11374
  this.options.historyDataAttrName
11208
- ) : this.historyDataSnapshot = void 0, this.historyFormSnapshot = this.options.historyFormFragment ? ke(this.options.historyFormFragment) : void 0;
11375
+ ) : this.historyDataSnapshot = void 0, this.historyFormSnapshot = this.options.historyFormFragment ? xe(this.options.historyFormFragment) : void 0;
11209
11376
  }
11210
11377
  /**
11211
11378
  * history-data の評価値を取得します。
@@ -11227,7 +11394,7 @@ ${U}
11227
11394
  if (this.historyFormSnapshot !== void 0)
11228
11395
  return this.historyFormSnapshot;
11229
11396
  if (this.options.historyFormFragment)
11230
- return ke(this.options.historyFormFragment);
11397
+ return xe(this.options.historyFormFragment);
11231
11398
  }
11232
11399
  /**
11233
11400
  * copy-params が指定されている場合は include / exclude を考慮して抽出します。
@@ -11296,15 +11463,15 @@ ${U}
11296
11463
  const t = this.options.targetFragment;
11297
11464
  if (!t)
11298
11465
  return m.error("Haori", "Target fragment is not specified for row operation."), null;
11299
- const r = p.attrName(this.eventType, e), i = J.read(t, r);
11466
+ const r = p.attrName(this.eventType, e), i = Z.read(t, r);
11300
11467
  if (i !== null && i.trim() !== "") {
11301
- const s = J.query(i, r, document);
11468
+ const s = Z.query(i, r, document);
11302
11469
  if (s === null)
11303
11470
  return m.error(
11304
11471
  "Haori",
11305
11472
  `Row container not found: ${i} (${r})`
11306
11473
  ), null;
11307
- const a = D.get(s);
11474
+ const a = I.get(s);
11308
11475
  return a instanceof S ? a.hasAttribute(`${l.prefix}each`) ? a : (m.error(
11309
11476
  "Haori",
11310
11477
  `Row container must have ${l.prefix}each: ${i} (${r})`
@@ -11572,7 +11739,7 @@ ${U}
11572
11739
  );
11573
11740
  continue;
11574
11741
  }
11575
- a[d] = y, o = !0, u.syncWhenUnchanged === "supply" && F.clearRowUserEditMarksForChangedKeys(u.row, y);
11742
+ a[d] = y, o = !0, u.syncWhenUnchanged === "supply" && k.clearRowUserEditMarksForChangedKeys(u.row, y);
11576
11743
  }
11577
11744
  if (!o)
11578
11745
  return;
@@ -11622,7 +11789,7 @@ ${U}
11622
11789
  * @returns 反映完了の Promise
11623
11790
  */
11624
11791
  static syncUnchangedRowValues(e, t, r) {
11625
- return r === "supply" && F.clearRowUserEditMarksForChangedKeys(e, t), F.syncRowValues(e, t);
11792
+ return r === "supply" && k.clearRowUserEditMarksForChangedKeys(e, t), k.syncRowValues(e, t);
11626
11793
  }
11627
11794
  /**
11628
11795
  * 行の要素データが同じ内容かどうかを判定します。
@@ -11837,27 +12004,29 @@ ${U}
11837
12004
  * @param status フェッチ状態('loading' | 'success' | 'error')
11838
12005
  * @param statusCode HTTP ステータスコード(無い場合は null)
11839
12006
  * @param message エラーメッセージ等(無い場合は null)
12007
+ * @param responseMessage エラー応答の本文から取り出した文言(無い場合は null)
11840
12008
  * @returns 注入完了の Promise
11841
12009
  */
11842
- async injectFetchState(e, t = null, r = null) {
11843
- const i = this.options.fetchStateFragments;
11844
- if (!i || i.length === 0)
12010
+ async injectFetchState(e, t = null, r = null, i = null) {
12011
+ const n = this.options.fetchStateFragments;
12012
+ if (!n || n.length === 0)
11845
12013
  return;
11846
- const n = {
12014
+ const s = {
11847
12015
  status: e,
11848
12016
  loading: e === "loading",
11849
12017
  success: e === "success",
11850
12018
  error: e === "error",
11851
12019
  statusCode: t,
11852
- message: r
12020
+ message: r,
12021
+ responseMessage: i
11853
12022
  };
11854
- this.options.download && (n.receivedBytes = this.downloadReceivedBytes, n.totalBytes = this.downloadTotalBytes), await Promise.all(
11855
- i.map((s) => {
11856
- const a = s.getTarget(), o = {
11857
- ...s.getRawBindingData() ?? {},
11858
- _fetch: n
12023
+ this.options.download && (s.receivedBytes = this.downloadReceivedBytes, s.totalBytes = this.downloadTotalBytes), await Promise.all(
12024
+ n.map((a) => {
12025
+ const o = a.getTarget(), c = {
12026
+ ...a.getRawBindingData() ?? {},
12027
+ _fetch: s
11859
12028
  };
11860
- return $.setBindingData(a, o, {
12029
+ return $.setBindingData(o, c, {
11861
12030
  reflectToAttribute: !1,
11862
12031
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
11863
12032
  // 解除しない)。
@@ -11869,8 +12038,8 @@ ${U}
11869
12038
  }
11870
12039
  };
11871
12040
  p.DATA_PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g, p.SINGLE_PLACEHOLDER_REGEX = /^(\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\})$/, p.RUNNING_CLICK_TARGETS = /* @__PURE__ */ new WeakSet(), p.CLICK_OUTCOMES = /* @__PURE__ */ new WeakMap(), p.validationReportGeneration = 0, p.VALIDATION_SCROLL_TIMEOUT_MS = 1e3, p.VALIDATION_SCROLL_STABLE_FRAMES = 2;
11872
- let oe = p;
11873
- class jt {
12041
+ let ae = p;
12042
+ class Kt {
11874
12043
  /**
11875
12044
  * 指定URLから HTML を取得し、body 内の HTML 文字列を返します。
11876
12045
  *
@@ -11891,7 +12060,7 @@ class jt {
11891
12060
  throw m.error("[Haori]", "Failed to fetch import source:", e, n), new Error(`Failed to fetch: ${e}`);
11892
12061
  }
11893
12062
  if (!r.ok) {
11894
- gt(r.status);
12063
+ pt(r.status);
11895
12064
  const n = `${r.status} ${r.statusText}`;
11896
12065
  throw m.error("[Haori]", "Import HTTP error:", e, n), new Error(`Failed to load ${e}: ${n}`);
11897
12066
  }
@@ -11960,7 +12129,7 @@ const f = class f {
11960
12129
  * @returns data-attr-* の内部反映なら true
11961
12130
  */
11962
12131
  static isAliasedAttributeReflection(e, t) {
11963
- const r = D.get(e);
12132
+ const r = I.get(e);
11964
12133
  return r instanceof S ? r.hasAttribute(
11965
12134
  `${l.prefix}${f.ATTRIBUTE_ALIAS_SUFFIX}${t}`
11966
12135
  ) : !1;
@@ -11992,7 +12161,7 @@ const f = class f {
11992
12161
  static reevaluateChildren(e) {
11993
12162
  const t = [];
11994
12163
  return e.getChildren().forEach((r) => {
11995
- r instanceof S ? t.push(f.evaluateAll(r)) : r instanceof se && t.push(f.evaluateText(r));
12164
+ r instanceof S ? t.push(f.evaluateAll(r)) : r instanceof ne && t.push(f.evaluateText(r));
11996
12165
  }), Promise.all(t).then(() => {
11997
12166
  });
11998
12167
  }
@@ -12063,7 +12232,7 @@ const f = class f {
12063
12232
  if (t.has(e) || !e.isInitialized())
12064
12233
  return Promise.resolve();
12065
12234
  const r = [];
12066
- return e.hasAttribute(`${l.prefix}validity`) && F.applyCustomValidity(e), e.hasAttribute(`${l.prefix}fetch`) && r.push(f.executeManagedFetch(e)), e.hasAttribute(`${l.prefix}import`) && r.push(f.executeManagedImport(e)), e.isVisible() ? (e.getChildren().forEach((i) => {
12235
+ return e.hasAttribute(`${l.prefix}validity`) && k.applyCustomValidity(e), e.hasAttribute(`${l.prefix}fetch`) && r.push(f.executeManagedFetch(e)), e.hasAttribute(`${l.prefix}import`) && r.push(f.executeManagedImport(e)), e.isVisible() ? (e.getChildren().forEach((i) => {
12067
12236
  i instanceof S && r.push(
12068
12237
  f.reevaluateReactiveSpecialAttributes(i, t)
12069
12238
  );
@@ -12083,7 +12252,7 @@ const f = class f {
12083
12252
  return i.then(() => f.executeManagedFetch(e, !0)).catch((o) => {
12084
12253
  m.error("Haori", `初期表示の取得に失敗しました: ${o}`);
12085
12254
  }), Promise.resolve();
12086
- const n = f.getReactiveFetchState(r), s = oe.resolveAutoFetchSignature(e);
12255
+ const n = f.getReactiveFetchState(r), s = ae.resolveAutoFetchSignature(e);
12087
12256
  if (n.running)
12088
12257
  return (s.hasUnresolvedReference || s.signature !== n.lastSignature) && (n.rerunRequested = !0), Promise.resolve();
12089
12258
  if (s.hasUnresolvedReference || s.signature === null)
@@ -12091,7 +12260,7 @@ const f = class f {
12091
12260
  if (n.lastSignature === s.signature)
12092
12261
  return Promise.resolve();
12093
12262
  n.lastSignature = s.signature, n.running = !0;
12094
- const a = new oe(e, null);
12263
+ const a = new ae(e, null);
12095
12264
  return a.markReentrantBind(), a.runWithResult().then(() => {
12096
12265
  }).finally(() => {
12097
12266
  if (n.running = !1, n.rerunRequested)
@@ -12116,20 +12285,20 @@ const f = class f {
12116
12285
  return Promise.resolve();
12117
12286
  r.lastUrl = n, r.running = !0;
12118
12287
  const s = performance.now();
12119
- return t.setAttribute(`${l.prefix}importing`, ""), B.importStart(t, n), jt.load(n).then((a) => {
12288
+ return t.setAttribute(`${l.prefix}importing`, ""), H.importStart(t, n), Kt.load(n).then((a) => {
12120
12289
  const o = new TextEncoder().encode(a).length;
12121
- return z.enqueue(() => {
12290
+ return K.enqueue(() => {
12122
12291
  t.innerHTML = a;
12123
12292
  }).then(() => {
12124
- t.removeAttribute(`${l.prefix}importing`), B.importEnd(t, n, o, s), f.adoptImportedChildren(e);
12293
+ t.removeAttribute(`${l.prefix}importing`), H.importEnd(t, n, o, s), f.adoptImportedChildren(e);
12125
12294
  const c = [];
12126
12295
  return e.getChildren().forEach((u) => {
12127
- u instanceof S ? c.push(f.scan(u.getTarget())) : u instanceof se && c.push(f.evaluateText(u));
12296
+ u instanceof S ? c.push(f.scan(u.getTarget())) : u instanceof ne && c.push(f.evaluateText(u));
12128
12297
  }), Promise.all(c).then(() => {
12129
12298
  });
12130
12299
  });
12131
12300
  }).catch((a) => {
12132
- t.removeAttribute(`${l.prefix}importing`), B.importError(t, n, a), m.error("[Haori]", "Failed to import HTML:", n, a);
12301
+ t.removeAttribute(`${l.prefix}importing`), H.importError(t, n, a), m.error("[Haori]", "Failed to import HTML:", n, a);
12133
12302
  }).finally(() => {
12134
12303
  if (r.running = !1, r.rerunRequested)
12135
12304
  return r.rerunRequested = !1, f.executeManagedImport(e);
@@ -12152,7 +12321,7 @@ const f = class f {
12152
12321
  e.getChildren().filter((r) => r.getTarget().parentNode !== t).forEach((r) => {
12153
12322
  r.remove(!1);
12154
12323
  }), t.childNodes.forEach((r) => {
12155
- const i = D.get(r);
12324
+ const i = I.get(r);
12156
12325
  i !== null && i.getParent() !== e && e.pushChild(i);
12157
12326
  });
12158
12327
  }
@@ -12177,14 +12346,14 @@ const f = class f {
12177
12346
  * @returns Promise (スキャンが完了したときに解決される)
12178
12347
  */
12179
12348
  static scanElement(e, t) {
12180
- const r = D.get(e);
12349
+ const r = I.get(e);
12181
12350
  if (!r)
12182
12351
  return Promise.resolve();
12183
12352
  const i = f.initializeElementFragment(r, !1).then(
12184
- () => F.restoreInitialValues(e)
12353
+ () => k.restoreInitialValues(e)
12185
12354
  ), n = f.initialValueRestore;
12186
12355
  return f.initialValueRestore = i, i.then(() => {
12187
- f.initialValueRestore = n, t && re.applySubtree(e);
12356
+ f.initialValueRestore = n, t && te.applySubtree(e);
12188
12357
  });
12189
12358
  }
12190
12359
  /**
@@ -12205,7 +12374,7 @@ const f = class f {
12205
12374
  const r = e.getTarget();
12206
12375
  return S.retryUnappliedValueWrites(r, t).then(
12207
12376
  () => {
12208
- re.applySubtree(r);
12377
+ te.applySubtree(r);
12209
12378
  }
12210
12379
  );
12211
12380
  }
@@ -12218,7 +12387,7 @@ const f = class f {
12218
12387
  */
12219
12388
  static initializeFreshEachRow(e) {
12220
12389
  return f.initializeElementFragment(e, !0).then(() => {
12221
- f.needsScheduledEvaluateAll(e) && f.scheduleEvaluateAll(e), re.applySubtree(e.getTarget());
12390
+ f.needsScheduledEvaluateAll(e) && f.scheduleEvaluateAll(e), te.applySubtree(e.getTarget());
12222
12391
  });
12223
12392
  }
12224
12393
  /**
@@ -12236,7 +12405,7 @@ const f = class f {
12236
12405
  }
12237
12406
  const r = [];
12238
12407
  return e.getChildren().forEach((i) => {
12239
- i instanceof S ? r.push(f.initializeElementFragment(i, t)) : i instanceof se && r.push(f.evaluateText(i));
12408
+ i instanceof S ? r.push(f.initializeElementFragment(i, t)) : i instanceof ne && r.push(f.evaluateText(i));
12240
12409
  }), Promise.all(r).then(() => {
12241
12410
  f.refreshDerivedSubtreeSignature(e);
12242
12411
  });
@@ -12292,7 +12461,7 @@ const f = class f {
12292
12461
  e.getRawAttribute(n)
12293
12462
  ))), r.add(n));
12294
12463
  }
12295
- return t.then(() => (e.markInitialized(), F.prepareFormName(e)));
12464
+ return t.then(() => (e.markInitialized(), k.prepareFormName(e)));
12296
12465
  }
12297
12466
  /**
12298
12467
  * 子孫初期化をスキップすべきかどうかを返します。
@@ -12319,7 +12488,7 @@ const f = class f {
12319
12488
  * @returns Promise (DOM操作が完了したときに解決される)
12320
12489
  */
12321
12490
  static setAttribute(e, t, r, i = !1, n) {
12322
- const s = D.get(e), a = f.getAliasedAttributeName(t);
12491
+ const s = I.get(e), a = f.getAliasedAttributeName(t);
12323
12492
  if (a !== null)
12324
12493
  return r === null ? s.removeAliasedAttribute(t, a) : s.setAliasedAttribute(
12325
12494
  t,
@@ -12392,10 +12561,10 @@ const f = class f {
12392
12561
  break;
12393
12562
  case `${l.prefix}validity`:
12394
12563
  case `${l.prefix}validity-message`:
12395
- return r !== null && F.applyCustomValidity(s), Promise.all(o).then(() => {
12564
+ return r !== null && k.applyCustomValidity(s), Promise.all(o).then(() => {
12396
12565
  });
12397
12566
  case `${l.prefix}url-param`: {
12398
- const g = s.getAttribute(`${l.prefix}url-arg`), y = mt.readParams();
12567
+ const g = s.getAttribute(`${l.prefix}url-arg`), y = gt.readParams();
12399
12568
  g === null && s.hasAttribute(`${l.prefix}store`) && m.warn(
12400
12569
  "Haori",
12401
12570
  `${l.prefix}url-param を ${l.prefix}url-arg なしで ${l.prefix}store と併用すると復元した値が消えます(${l.prefix}url-arg を指定してください)。`
@@ -12452,7 +12621,7 @@ const f = class f {
12452
12621
  * @returns Promise (DOM操作が完了したときに解決される)
12453
12622
  */
12454
12623
  static setBindingData(e, t, r = {}) {
12455
- const i = D.get(e), n = r.skipFragments ?? /* @__PURE__ */ new Set(), s = r.reentrant ?? !1, a = r.reflectToAttribute ?? !0, o = r.kind ?? "supply", c = r.sequence ?? S.nextOperationSequence(), u = {
12624
+ const i = I.get(e), n = r.skipFragments ?? /* @__PURE__ */ new Set(), s = r.reentrant ?? !1, a = r.reflectToAttribute ?? !0, o = r.kind ?? "supply", c = r.sequence ?? S.nextOperationSequence(), u = {
12456
12625
  sequence: c,
12457
12626
  kind: o,
12458
12627
  ...r.editedPaths === void 0 ? {} : { editedPaths: r.editedPaths }
@@ -12461,34 +12630,34 @@ const f = class f {
12461
12630
  const g = S.currentSequence(), y = i.getRawBindingData();
12462
12631
  d && (r.clearUserEdits ?? !0) && f.clearUserEditMarks(i, c);
12463
12632
  const E = a ? f.resolveByPathAuthority(i, y, t, u) : t;
12464
- i.setBindingData(E), a && (B.bindChange(e, y, E, "manual"), Fe.mirror(i));
12633
+ i.setBindingData(E), a && (H.bindChange(e, y, E, "manual"), Fe.mirror(i));
12465
12634
  const A = () => {
12466
12635
  i.markBindingWorkStart();
12467
- const I = i.getRawBindingData() ?? E;
12468
- let C = a ? i.setAttribute(
12636
+ const D = i.getRawBindingData() ?? E;
12637
+ let N = a ? i.setAttribute(
12469
12638
  `${l.prefix}bind`,
12470
- JSON.stringify(f.withoutReservedBindingKeys(I))
12639
+ JSON.stringify(f.withoutReservedBindingKeys(D))
12471
12640
  ) : Promise.resolve();
12472
- return e.tagName === "FORM" && (C = C.then(() => {
12641
+ return e.tagName === "FORM" && (N = N.then(() => {
12473
12642
  if (i.wasResetAfter(g))
12474
12643
  return;
12475
- const q = i.getRawBindingData() ?? E;
12476
- return F.syncValues(
12644
+ const B = i.getRawBindingData() ?? E;
12645
+ return k.syncValues(
12477
12646
  i,
12478
- F.resolveSyncValues(i, q),
12647
+ k.resolveSyncValues(i, B),
12479
12648
  !1,
12480
12649
  u
12481
12650
  );
12482
- })), C = C.then(
12483
- () => F.syncAncestorArgForms(i, g, u, y)
12484
- ), C = C.then(() => f.evaluateAll(i, n)), C = C.then(
12651
+ })), N = N.then(
12652
+ () => k.syncAncestorArgForms(i, g, u, y)
12653
+ ), N = N.then(() => f.evaluateAll(i, n)), N = N.then(
12485
12654
  () => S.retryUnappliedValueWrites(e, g)
12486
- ), C = C.then(
12655
+ ), N = N.then(
12487
12656
  () => f.reevaluateReactiveSpecialAttributes(i, n)
12488
- ), C.then(
12657
+ ), N.then(
12489
12658
  () => i.markBindingWorkEnd(),
12490
- (q) => {
12491
- throw i.markBindingWorkEnd(), q;
12659
+ (B) => {
12660
+ throw i.markBindingWorkEnd(), B;
12492
12661
  }
12493
12662
  );
12494
12663
  };
@@ -12558,14 +12727,14 @@ const f = class f {
12558
12727
  ...Object.keys(d)
12559
12728
  ]);
12560
12729
  for (const A of E) {
12561
- const I = n === "" ? A : `${n}.${A}`, C = f.mergePathAuthority(
12730
+ const D = n === "" ? A : `${n}.${A}`, N = f.mergePathAuthority(
12562
12731
  e,
12563
12732
  Object.prototype.hasOwnProperty.call(u, A) ? u[A] : f.ABSENT_PATH,
12564
12733
  Object.prototype.hasOwnProperty.call(d, A) ? d[A] : f.ABSENT_PATH,
12565
12734
  i,
12566
- I
12735
+ D
12567
12736
  );
12568
- C !== f.ABSENT_PATH && (g[A] = C), C !== (Object.prototype.hasOwnProperty.call(d, A) ? d[A] : f.ABSENT_PATH) && (y = !0);
12737
+ N !== f.ABSENT_PATH && (g[A] = N), N !== (Object.prototype.hasOwnProperty.call(d, A) ? d[A] : f.ABSENT_PATH) && (y = !0);
12569
12738
  }
12570
12739
  return y ? g : d;
12571
12740
  }
@@ -12734,7 +12903,7 @@ const f = class f {
12734
12903
  * `resolved: true` のときは解決済みスコープ(常にオブジェクト)。
12735
12904
  */
12736
12905
  static getBindingData(e, t = {}) {
12737
- const r = D.get(e);
12906
+ const r = I.get(e);
12738
12907
  return r instanceof S ? t.resolved ? r.getBindingData() : r.getRawBindingData() : null;
12739
12908
  }
12740
12909
  /**
@@ -12754,7 +12923,7 @@ const f = class f {
12754
12923
  */
12755
12924
  static dumpScope(e) {
12756
12925
  const t = f.collectScope(e);
12757
- return W.isEnabled() && m.info("[Haori]", "scope dump for", e, t), t;
12926
+ return q.isEnabled() && m.info("[Haori]", "scope dump for", e, t), t;
12758
12927
  }
12759
12928
  /**
12760
12929
  * スコープの解決結果と由来を収集します。
@@ -12767,7 +12936,7 @@ const f = class f {
12767
12936
  * @return 解決済みスコープと各キーの由来情報
12768
12937
  */
12769
12938
  static collectScope(e) {
12770
- const t = D.get(e);
12939
+ const t = I.get(e);
12771
12940
  if (!t)
12772
12941
  return { resolved: {}, sources: {} };
12773
12942
  const r = t.getBindingData(), i = {}, n = (c) => {
@@ -12816,16 +12985,16 @@ const f = class f {
12816
12985
  * @returns 追加したノードの走査(評価)の Promise。走査しない場合は解決済みの Promise
12817
12986
  */
12818
12987
  static addNode(e, t) {
12819
- const r = D.get(e);
12988
+ const r = I.get(e);
12820
12989
  if (r.isSkipMutationNode(t))
12821
12990
  return Promise.resolve();
12822
- const i = D.get(t.nextSibling), n = D.get(t);
12991
+ const i = I.get(t.nextSibling), n = I.get(t);
12823
12992
  if (n) {
12824
12993
  if (n.getParent() === r)
12825
12994
  return Promise.resolve();
12826
12995
  if (r.insertBefore(n, i), n instanceof S)
12827
12996
  return f.scan(n.getTarget());
12828
- if (n instanceof se)
12997
+ if (n instanceof ne)
12829
12998
  return f.evaluateText(n);
12830
12999
  }
12831
13000
  return Promise.resolve();
@@ -12836,7 +13005,7 @@ const f = class f {
12836
13005
  * @param node 削除するノード
12837
13006
  */
12838
13007
  static removeNode(e) {
12839
- const t = D.get(e);
13008
+ const t = I.get(e);
12840
13009
  if (t) {
12841
13010
  const r = t.getParent();
12842
13011
  if (r && r.isSkipMutationNode(e))
@@ -12851,7 +13020,7 @@ const f = class f {
12851
13020
  * @param text 新しいテキスト
12852
13021
  */
12853
13022
  static changeText(e, t) {
12854
- const r = D.get(e);
13023
+ const r = I.get(e);
12855
13024
  r && r.setContent(t);
12856
13025
  }
12857
13026
  /**
@@ -12863,27 +13032,27 @@ const f = class f {
12863
13032
  * @returns Promise (DOM操作が完了したときに解決される)
12864
13033
  */
12865
13034
  static changeValue(e, t) {
12866
- const r = D.get(e);
13035
+ const r = I.get(e);
12867
13036
  if (r.getValue() === t)
12868
13037
  return Promise.resolve();
12869
13038
  const i = [];
12870
13039
  i.push(r.setValue(t));
12871
13040
  const n = f.getFormFragment(r);
12872
13041
  if (n) {
12873
- const s = F.getValues(n), a = n.getAttribute(`${l.prefix}form-arg`), o = n.getRawBindingData();
13042
+ const s = k.getValues(n), a = n.getAttribute(`${l.prefix}form-arg`), o = n.getRawBindingData();
12874
13043
  let c;
12875
13044
  if (a) {
12876
13045
  c = { ...o ?? {} };
12877
- const u = String(a), d = F.resolveAncestorArgOwner(n, u);
12878
- c[u] = F.mergeCollectedValues(
13046
+ const u = String(a), d = k.resolveAncestorArgOwner(n, u);
13047
+ c[u] = k.mergeCollectedValues(
12879
13048
  (d ? d.value : c[u]) ?? null,
12880
13049
  s
12881
13050
  );
12882
13051
  } else
12883
- c = F.mergeCollectedValues(
13052
+ c = k.mergeCollectedValues(
12884
13053
  o,
12885
13054
  s,
12886
- F.ancestorBaseResolver(n)
13055
+ k.ancestorBaseResolver(n)
12887
13056
  );
12888
13057
  i.push(
12889
13058
  // 値の設定に伴うコミットなので、値の供給ではない更新として扱う(権威を
@@ -12971,7 +13140,7 @@ const f = class f {
12971
13140
  if (f.canSkipUnchangedNestedEach(A))
12972
13141
  return;
12973
13142
  E.push(f.evaluateAll(A, t));
12974
- } else A instanceof se && E.push(f.evaluateText(A));
13143
+ } else A instanceof ne && E.push(f.evaluateText(A));
12975
13144
  }), Promise.all(E).then(() => {
12976
13145
  });
12977
13146
  }).then(() => {
@@ -12994,7 +13163,7 @@ const f = class f {
12994
13163
  const i = e.getRawDerivedBindingData(), n = typeof r == "string" ? r.trim() : "";
12995
13164
  if (!t || n === "")
12996
13165
  return i === null ? Promise.resolve(!1) : (e.setDerivedBindingData(null), Promise.resolve(!0));
12997
- const s = ne.evaluateDetailed(
13166
+ const s = ie.evaluateDetailed(
12998
13167
  t,
12999
13168
  e.getBindingData()
13000
13169
  );
@@ -13041,7 +13210,7 @@ const f = class f {
13041
13210
  const t = e.getRawAttribute(`${l.prefix}if`);
13042
13211
  if (typeof t != "string" || t.indexOf("{{") >= 0)
13043
13212
  return;
13044
- if (ne.hasCompileFailure(t)) {
13213
+ if (ie.hasCompileFailure(t)) {
13045
13214
  m.warn(
13046
13215
  "[Haori]",
13047
13216
  "data-if is hidden because the expression could not be compiled (see the preceding compile error):",
@@ -13117,7 +13286,7 @@ const f = class f {
13117
13286
  static evaluateEachFixedChildren(e) {
13118
13287
  const t = [];
13119
13288
  return e.getChildren().forEach((r) => {
13120
- r instanceof S ? f.isEachFixedChild(r) && t.push(f.evaluateAll(r)) : r instanceof se && t.push(f.evaluateText(r));
13289
+ r instanceof S ? f.isEachFixedChild(r) && t.push(f.evaluateAll(r)) : r instanceof ne && t.push(f.evaluateText(r));
13121
13290
  }), Promise.all(t).then(() => {
13122
13291
  });
13123
13292
  }
@@ -13153,9 +13322,9 @@ const f = class f {
13153
13322
  static evaluateIf(e) {
13154
13323
  const t = [], r = e.getAttribute(`${l.prefix}if`);
13155
13324
  if (f.isHiddenIfCondition(r))
13156
- W.isEnabled() && e.isVisible() && f.logFalsyIfDiagnostics(e), t.push(
13325
+ q.isEnabled() && e.isVisible() && f.logFalsyIfDiagnostics(e), t.push(
13157
13326
  e.hide().then(() => {
13158
- B.hide(e.getTarget());
13327
+ H.hide(e.getTarget());
13159
13328
  })
13160
13329
  );
13161
13330
  else {
@@ -13170,10 +13339,10 @@ const f = class f {
13170
13339
  () => f.reevaluateReactiveSpecialAttributes(o)
13171
13340
  )
13172
13341
  ) : s.push(f.scanElement(o.getTarget(), !1));
13173
- } else o instanceof se && s.push(f.evaluateText(o));
13342
+ } else o instanceof ne && s.push(f.evaluateText(o));
13174
13343
  }), t.push(
13175
13344
  e.show().then(() => {
13176
- B.show(e.getTarget()), i || (f.triggerLoadOnShow(e), re.refreshSubtree(e.getTarget(), !1));
13345
+ H.show(e.getTarget()), i || (f.triggerLoadOnShow(e), te.refreshSubtree(e.getTarget(), !1));
13177
13346
  })
13178
13347
  ), t.push(
13179
13348
  Promise.all(s).then(() => {
@@ -13196,7 +13365,7 @@ const f = class f {
13196
13365
  */
13197
13366
  static triggerLoadOnShow(e) {
13198
13367
  const t = `${l.prefix}load-`;
13199
- e.getTarget().getAttributeNames().some((i) => i.startsWith(t)) && new oe(e, "load").run().catch((i) => {
13368
+ e.getTarget().getAttributeNames().some((i) => i.startsWith(t)) && new ae(e, "load").run().catch((i) => {
13200
13369
  m.error("[Haori]", "data-load procedure error (on show):", i);
13201
13370
  });
13202
13371
  }
@@ -13224,7 +13393,7 @@ const f = class f {
13224
13393
  * @return 差分更新(再実行を含む)の完了 Promise
13225
13394
  */
13226
13395
  static evaluateEach(e) {
13227
- if (W.isEnabled() && ne.recordRowScopeIdentifiers([
13396
+ if (q.isEnabled() && ie.recordRowScopeIdentifiers([
13228
13397
  f.getRowScopeName(e, "each-arg"),
13229
13398
  f.getRowScopeName(e, "each-index")
13230
13399
  ]), e.isMounted() || f.syncMountedState(e), !e.isVisible() || !e.isMounted())
@@ -13274,7 +13443,7 @@ const f = class f {
13274
13443
  t.rerunRequested = !1, await f.performEachUpdate(e);
13275
13444
  while (t.rerunRequested);
13276
13445
  const i = e.getTarget();
13277
- i.setAttribute(`${l.prefix}each-done`, ""), re.refreshSubtree(i, !1), f.runEachRenderedScript(i);
13446
+ i.setAttribute(`${l.prefix}each-done`, ""), te.refreshSubtree(i, !1), f.runEachRenderedScript(i);
13278
13447
  } finally {
13279
13448
  t.running = !1, t.settled = null;
13280
13449
  }
@@ -13411,10 +13580,10 @@ ${r}
13411
13580
  (c) => !c.hasAttribute(`${l.prefix}each-before`) && !c.hasAttribute(`${l.prefix}each-after`)
13412
13581
  ).forEach((c) => {
13413
13582
  if (!s) {
13414
- const d = D.get(c);
13583
+ const d = I.get(c);
13415
13584
  d instanceof S && (r = d.clone(), f.markFreshInitializationSkippable(r), e.setTemplate(r), s = !0);
13416
13585
  }
13417
- const u = D.get(c);
13586
+ const u = I.get(c);
13418
13587
  u instanceof S && e.getChildren().includes(u) && (e.removeChild(u), u.setMounted(!1)), c.parentNode && c.parentNode.removeChild(c);
13419
13588
  });
13420
13589
  }
@@ -13555,7 +13724,7 @@ ${r}
13555
13724
  if (i instanceof S) {
13556
13725
  if (!f.isRowLocalSubtree(i, r))
13557
13726
  return !1;
13558
- } else if (i instanceof se) {
13727
+ } else if (i instanceof ne) {
13559
13728
  const n = i.getRawText();
13560
13729
  if (n.includes("{{") && !f.areExpressionsRowLocal(
13561
13730
  f.extractInterpolations(n),
@@ -13579,7 +13748,7 @@ ${r}
13579
13748
  const i = r.trim();
13580
13749
  if (i === "")
13581
13750
  continue;
13582
- const n = ne.getFreeIdentifiers(i);
13751
+ const n = ie.getFreeIdentifiers(i);
13583
13752
  if (n.length === 0 || n.some((s) => !t.has(s)))
13584
13753
  return !1;
13585
13754
  }
@@ -13655,7 +13824,7 @@ ${r}
13655
13824
  const e = `${l.prefix}url-param`, r = Array.from(
13656
13825
  document.querySelectorAll(`[${e}]`)
13657
13826
  ).map((i) => {
13658
- const n = D.peek(i);
13827
+ const n = I.peek(i);
13659
13828
  return n instanceof S ? f.setAttribute(
13660
13829
  i,
13661
13830
  e,
@@ -13711,7 +13880,7 @@ ${r}
13711
13880
  * @returns プロファイル
13712
13881
  */
13713
13882
  static getOrCreateDerivedSubtreeProfile(e) {
13714
- if (!W.isEnabled() || !e.hasAttribute(`${l.prefix}derive`))
13883
+ if (!q.isEnabled() || !e.hasAttribute(`${l.prefix}derive`))
13715
13884
  return null;
13716
13885
  const t = f.DERIVE_SUBTREE_PROFILES.get(e);
13717
13886
  if (t)
@@ -13828,7 +13997,7 @@ ${r}
13828
13997
  const n = e.getRawAttribute(i);
13829
13998
  return typeof n == "string" && n.includes("{{");
13830
13999
  }) ? !0 : e.getChildren().some(
13831
- (i) => i instanceof se && i.hasDynamicContent()
14000
+ (i) => i instanceof ne && i.hasDynamicContent()
13832
14001
  );
13833
14002
  }
13834
14003
  /**
@@ -13838,7 +14007,7 @@ ${r}
13838
14007
  * @returns subtree 全体を省略可能なら true
13839
14008
  */
13840
14009
  static markFreshInitializationSkippable(e) {
13841
- const t = e.getAttributeNames().some((n) => f.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof S ? !f.markFreshInitializationSkippable(n) : n instanceof se ? n.hasDynamicContent() : !1), i = !t && !r;
14010
+ const t = e.getAttributeNames().some((n) => f.isFreshInitializationDynamicAttribute(e, n)), r = e.getChildren().some((n) => n instanceof S ? !f.markFreshInitializationSkippable(n) : n instanceof ne ? n.hasDynamicContent() : !1), i = !t && !r;
13842
14011
  return e.setFreshInitializationSkippable(i), i;
13843
14012
  }
13844
14013
  /**
@@ -13871,52 +14040,52 @@ ${r}
13871
14040
  let i = e.getAttribute(`${l.prefix}each-index`);
13872
14041
  i && (i = String(i));
13873
14042
  const n = e.getAttribute(`${l.prefix}each-key`), s = e.getAttribute(`${l.prefix}each-arg`), a = t.map(
13874
- (N, j) => f.createListKey(N, n ? String(n) : null, j)
14043
+ (F, j) => f.createListKey(F, n ? String(n) : null, j)
13875
14044
  ), o = new Set(a), c = /* @__PURE__ */ new Map();
13876
- a.forEach((N) => {
13877
- c.set(N, (c.get(N) ?? 0) + 1);
14045
+ a.forEach((F) => {
14046
+ c.set(F, (c.get(F) ?? 0) + 1);
13878
14047
  }), n && o.size !== a.length && f.warnDuplicateEachKey(String(n));
13879
14048
  const u = [];
13880
- let d = e.getChildren().filter((N) => N instanceof S).filter(
13881
- (N) => !N.hasAttribute(`${l.prefix}each-before`) && !N.hasAttribute(`${l.prefix}each-after`)
14049
+ let d = e.getChildren().filter((F) => F instanceof S).filter(
14050
+ (F) => !F.hasAttribute(`${l.prefix}each-before`) && !F.hasAttribute(`${l.prefix}each-after`)
13882
14051
  );
13883
- const g = d.map((N) => N.getListKey()), y = /* @__PURE__ */ new Set();
13884
- d = d.filter((N, j) => {
13885
- const X = String(N.getListKey()), _ = c.get(X) ?? 0;
14052
+ const g = d.map((F) => F.getListKey()), y = /* @__PURE__ */ new Set();
14053
+ d = d.filter((F, j) => {
14054
+ const J = String(F.getListKey()), _ = c.get(J) ?? 0;
13886
14055
  if (_ === 0) {
13887
- y.add(N);
13888
- const P = N.getListKey();
13889
- return P !== null && B.rowRemove(N.getTarget(), P, j), u.push(N.remove()), !1;
14056
+ y.add(F);
14057
+ const P = F.getListKey();
14058
+ return P !== null && H.rowRemove(F.getTarget(), P, j), u.push(F.remove()), !1;
13890
14059
  }
13891
- return c.set(X, _ - 1), !0;
14060
+ return c.set(J, _ - 1), !0;
13892
14061
  });
13893
- const E = d.map((N) => N.getListKey()), A = /* @__PURE__ */ new Map();
13894
- d.forEach((N) => {
13895
- const j = N.getListKey();
14062
+ const E = d.map((F) => F.getListKey()), A = /* @__PURE__ */ new Map();
14063
+ d.forEach((F) => {
14064
+ const j = F.getListKey();
13896
14065
  if (j === null)
13897
14066
  return;
13898
- const X = A.get(j);
13899
- X ? X.push(N) : A.set(j, [N]);
14067
+ const J = A.get(j);
14068
+ J ? J.push(F) : A.set(j, [F]);
13900
14069
  });
13901
- const I = e.getChildElementFragments().filter((N) => !y.has(N)), C = I.filter(
13902
- (N) => N.hasAttribute(`${l.prefix}each-before`)
14070
+ const D = e.getChildElementFragments().filter((F) => !y.has(F)), N = D.filter(
14071
+ (F) => F.hasAttribute(`${l.prefix}each-before`)
13903
14072
  ).length;
13904
- let q = Promise.resolve();
13905
- return a.forEach((N, j) => {
13906
- const X = t[j], _ = j;
14073
+ let B = Promise.resolve();
14074
+ return a.forEach((F, j) => {
14075
+ const J = t[j], _ = j;
13907
14076
  let P;
13908
- const ae = A.get(N)?.shift();
13909
- if (ae) {
13910
- P = ae;
13911
- const G = C + j;
13912
- q = q.then(
14077
+ const se = A.get(F)?.shift();
14078
+ if (se) {
14079
+ P = se;
14080
+ const G = N + j;
14081
+ B = B.then(
13913
14082
  () => f.updateRowFragment(
13914
14083
  P,
13915
- X,
14084
+ J,
13916
14085
  i,
13917
14086
  _,
13918
14087
  s ? String(s) : null,
13919
- N
14088
+ F
13920
14089
  ).then(
13921
14090
  (T) => (
13922
14091
  // 再利用行も新しい並び順の位置へ移動する。移動しないと、配列を並べ替え
@@ -13925,17 +14094,17 @@ ${r}
13925
14094
  f.repositionEachRow(
13926
14095
  e,
13927
14096
  P,
13928
- I,
14097
+ D,
13929
14098
  G
13930
14099
  ).then((L) => {
13931
- if (L !== null && B.rowMove(
14100
+ if (L !== null && H.rowMove(
13932
14101
  P.getTarget(),
13933
- N,
13934
- L - C,
14102
+ F,
14103
+ L - N,
13935
14104
  j
13936
14105
  ), !(!T && f.isRowLocalEachTemplate(e)))
13937
14106
  return f.evaluateAll(P).then(
13938
- () => f.applyRowFormValues(e, P, X)
14107
+ () => f.applyRowFormValues(e, P, J)
13939
14108
  );
13940
14109
  })
13941
14110
  )
@@ -13943,40 +14112,40 @@ ${r}
13943
14112
  );
13944
14113
  } else {
13945
14114
  P = r.clone();
13946
- const G = C + j;
13947
- q = q.then(
14115
+ const G = N + j;
14116
+ B = B.then(
13948
14117
  () => f.updateRowFragment(
13949
14118
  P,
13950
- X,
14119
+ J,
13951
14120
  i,
13952
14121
  _,
13953
14122
  s ? String(s) : null,
13954
- N
14123
+ F
13955
14124
  ).then(() => {
13956
- const T = I[G] ?? null;
14125
+ const T = D[G] ?? null;
13957
14126
  return e.insertBefore(P, T).then(() => {
13958
- I.splice(G, 0, P);
13959
- }).then(() => f.initializeFreshEachRow(P)).then(() => f.applyRowFormValues(e, P, X)).then(() => {
13960
- B.rowAdd(P.getTarget(), N, _, X);
14127
+ D.splice(G, 0, P);
14128
+ }).then(() => f.initializeFreshEachRow(P)).then(() => f.applyRowFormValues(e, P, J)).then(() => {
14129
+ H.rowAdd(P.getTarget(), F, _, J);
13961
14130
  });
13962
14131
  })
13963
14132
  );
13964
14133
  }
13965
- }), Promise.all(u).then(() => q).then(() => {
13966
- const N = a.filter(
14134
+ }), Promise.all(u).then(() => B).then(() => {
14135
+ const F = a.filter(
13967
14136
  (G) => G !== null
13968
14137
  ), j = E.filter(
13969
14138
  (G) => G !== null
13970
- ), X = new Set(j), _ = N.filter((G) => !X.has(G)), ae = g.filter(
14139
+ ), J = new Set(j), _ = F.filter((G) => !J.has(G)), se = g.filter(
13971
14140
  (G) => G !== null
13972
14141
  ).filter(
13973
14142
  (G) => !o.has(G)
13974
14143
  );
13975
- B.eachUpdate(
14144
+ H.eachUpdate(
13976
14145
  e.getTarget(),
13977
14146
  _,
13978
- ae,
13979
- N
14147
+ se,
14148
+ F
13980
14149
  );
13981
14150
  });
13982
14151
  }
@@ -14027,7 +14196,7 @@ ${r}
14027
14196
  * @returns 戻り値はありません。
14028
14197
  */
14029
14198
  static warnDuplicateEachKey(e) {
14030
- !W.isEnabled() || f.WARNED_DUPLICATE_EACH_KEYS.has(e) || (f.WARNED_DUPLICATE_EACH_KEYS.add(e), m.warn(
14199
+ !q.isEnabled() || f.WARNED_DUPLICATE_EACH_KEYS.has(e) || (f.WARNED_DUPLICATE_EACH_KEYS.add(e), m.warn(
14031
14200
  "[Haori]",
14032
14201
  `${l.prefix}each-key="${e}" の値が配列の中で重複しています。行は出現順で対応付けますが、キーによる行の識別はできません。`
14033
14202
  ));
@@ -14079,7 +14248,7 @@ ${r}
14079
14248
  * @returns 反映完了の Promise
14080
14249
  */
14081
14250
  static applyRowFormValues(e, t, r) {
14082
- return !e.hasAttribute(`${l.prefix}form-list`) || !F.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : F.syncRowValues(t, r);
14251
+ return !e.hasAttribute(`${l.prefix}form-list`) || !k.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : k.syncRowValues(t, r);
14083
14252
  }
14084
14253
  /**
14085
14254
  * リスト比較用のキーを生成します。
@@ -14268,7 +14437,7 @@ f.ATTRIBUTE_ALIAS_SUFFIX = "attr-", f.PRIORITY_ATTRIBUTE_SUFFIXES = [
14268
14437
  "enhance-new"
14269
14438
  ]), 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");
14270
14439
  let $ = f;
14271
- const Re = class Re {
14440
+ const we = class we {
14272
14441
  /**
14273
14442
  * コンストラクタ。
14274
14443
  *
@@ -14276,10 +14445,10 @@ const Re = class Re {
14276
14445
  */
14277
14446
  constructor(e = document) {
14278
14447
  this.customEventHandlers = /* @__PURE__ */ new Map(), this.builtinListenersAdded = !1, this.deferred = !1, this.deferredProcedures = [], this.onClick = (t) => this.delegate(t, "click"), this.onReset = (t) => {
14279
- if (t.defaultPrevented || F.isResettingInternally())
14448
+ if (t.defaultPrevented || k.isResettingInternally())
14280
14449
  return;
14281
14450
  const r = t.target;
14282
- r instanceof HTMLElement && setTimeout(() => re.refreshSubtree(r), 0);
14451
+ r instanceof HTMLElement && setTimeout(() => te.refreshSubtree(r), 0);
14283
14452
  }, this.onChange = (t) => this.delegate(t, "change"), this.onInput = (t) => this.delegate(t, "input"), this.onLoadCapture = (t) => this.delegate(t, "load"), this.onWindowLoad = () => {
14284
14453
  if (this.deferred) {
14285
14454
  this.deferredProcedures.push(() => this.runWindowLoadProcedure());
@@ -14288,7 +14457,7 @@ const Re = class Re {
14288
14457
  this.runWindowLoadProcedure();
14289
14458
  }, this.onPopstate = (t) => {
14290
14459
  const r = t.state;
14291
- if (!r || r[Re.HISTORY_STATE_KEY] !== !0) {
14460
+ if (!r || r[we.HISTORY_STATE_KEY] !== !0) {
14292
14461
  $.refreshUrlParams();
14293
14462
  return;
14294
14463
  }
@@ -14301,8 +14470,8 @@ const Re = class Re {
14301
14470
  * @returns 戻り値はない。
14302
14471
  */
14303
14472
  runWindowLoadProcedure() {
14304
- const e = document.documentElement, t = D.get(e);
14305
- t && new oe(t, "load").run();
14473
+ const e = document.documentElement, t = I.get(e);
14474
+ t && new ae(t, "load").run();
14306
14475
  }
14307
14476
  /**
14308
14477
  * イベントリスナーの登録を開始します。
@@ -14396,7 +14565,7 @@ const Re = class Re {
14396
14565
  subscribeCustomEvent(e) {
14397
14566
  if (e === null || e === "")
14398
14567
  return;
14399
- if (Re.BUILTIN_EVENT_NAMES.has(e)) {
14568
+ if (we.BUILTIN_EVENT_NAMES.has(e)) {
14400
14569
  m.warn(
14401
14570
  "[Haori]",
14402
14571
  `data-on="${e}" は組み込みイベントです。data-${e}-* を使用してください(data-on はカスタムイベント専用)。`
@@ -14425,8 +14594,8 @@ const Re = class Re {
14425
14594
  this.root.querySelectorAll(`[${this.onAttributeName}]`).forEach((i) => {
14426
14595
  if (i.getAttribute(this.onAttributeName) !== e)
14427
14596
  return;
14428
- const n = D.get(i);
14429
- n instanceof S && new oe(n, "on", t).run().catch((s) => {
14597
+ const n = I.get(i);
14598
+ n instanceof S && new ae(n, "on", t).run().catch((s) => {
14430
14599
  m.error("[Haori]", "Procedure execution error:", s);
14431
14600
  });
14432
14601
  });
@@ -14489,16 +14658,16 @@ const Re = class Re {
14489
14658
  * @returns 戻り値はない。
14490
14659
  */
14491
14660
  runProcedureFor(e, t, r) {
14492
- const i = D.get(e);
14661
+ const i = I.get(e);
14493
14662
  if (!i)
14494
14663
  return;
14495
14664
  (t === "change" || t === "input") && this.syncUserEdit(e, t === "change");
14496
14665
  const n = () => {
14497
- const s = new oe(i, t, r).runWithOutcome().catch((a) => (m.error("[Haori]", "Procedure execution error:", a), "failure"));
14666
+ const s = new ae(i, t, r).runWithOutcome().catch((a) => (m.error("[Haori]", "Procedure execution error:", a), "failure"));
14498
14667
  if (t === "click") {
14499
- oe.recordClickOutcome(e, s);
14668
+ ae.recordClickOutcome(e, s);
14500
14669
  const a = r.target;
14501
- a instanceof HTMLElement && a !== e && oe.recordClickOutcome(a, s);
14670
+ a instanceof HTMLElement && a !== e && ae.recordClickOutcome(a, s);
14502
14671
  }
14503
14672
  };
14504
14673
  if (t === "click" && e.hasAttribute(`${l.prefix}click-defer`)) {
@@ -14549,7 +14718,7 @@ const Re = class Re {
14549
14718
  * @returns 戻り値はない。
14550
14719
  */
14551
14720
  markUserEditOnly(e) {
14552
- const t = D.get(e);
14721
+ const t = I.get(e);
14553
14722
  t instanceof S && t.markUserEdit();
14554
14723
  }
14555
14724
  /**
@@ -14565,13 +14734,13 @@ const Re = class Re {
14565
14734
  * @returns 戻り値はない。
14566
14735
  */
14567
14736
  syncUserEdit(e, t) {
14568
- const r = D.get(e);
14737
+ const r = I.get(e);
14569
14738
  if (r instanceof S && (r.syncValue(), t ? r.markUserEditOnChange() : r.markUserEdit(), e instanceof HTMLInputElement && e.type === "radio" && e.name)) {
14570
14739
  const i = document.getElementsByName(e.name);
14571
14740
  for (const n of Array.from(i)) {
14572
14741
  if (n === e || !(n instanceof HTMLInputElement) || n.type !== "radio" || n.form !== e.form)
14573
14742
  continue;
14574
- const s = D.get(n);
14743
+ const s = I.get(n);
14575
14744
  s instanceof S && (s.syncValue(), s.markUserEdit());
14576
14745
  }
14577
14746
  }
@@ -14619,13 +14788,13 @@ const Re = class Re {
14619
14788
  return null;
14620
14789
  }
14621
14790
  };
14622
- Re.HISTORY_STATE_KEY = "__haoriHistoryState__", Re.BUILTIN_EVENT_NAMES = /* @__PURE__ */ new Set([
14791
+ we.HISTORY_STATE_KEY = "__haoriHistoryState__", we.BUILTIN_EVENT_NAMES = /* @__PURE__ */ new Set([
14623
14792
  "click",
14624
14793
  "change",
14625
14794
  "input",
14626
14795
  "load"
14627
14796
  ]);
14628
- let Ve = Re;
14797
+ let Ve = we;
14629
14798
  const V = class V {
14630
14799
  /**
14631
14800
  * ノードが現在の Window に属する HTMLElement かどうかを判定します。
@@ -14664,7 +14833,7 @@ const V = class V {
14664
14833
  * @returns 戻り値はありません。
14665
14834
  */
14666
14835
  static syncElement(e) {
14667
- const t = V.registrations.get(e), r = D.get(e);
14836
+ const t = V.registrations.get(e), r = I.get(e);
14668
14837
  if (!r || !V.shouldObserve(r)) {
14669
14838
  t && (t.observer.disconnect(), V.registrations.delete(e));
14670
14839
  return;
@@ -14725,7 +14894,7 @@ const V = class V {
14725
14894
  static runProcedure(e, t) {
14726
14895
  t.pending = !1, t.running = !0;
14727
14896
  let r = !1;
14728
- new oe(t.fragment, "intersect").runWithResult().then((i) => {
14897
+ new ae(t.fragment, "intersect").runWithResult().then((i) => {
14729
14898
  r = i;
14730
14899
  }).catch((i) => {
14731
14900
  m.error("[Haori]", "Intersect procedure execution error:", i);
@@ -14795,7 +14964,7 @@ const V = class V {
14795
14964
  const r = e.getAttribute(t);
14796
14965
  if (typeof r != "string" || r.trim() === "")
14797
14966
  return null;
14798
- const i = J.query(r, t, document);
14967
+ const i = Z.query(r, t, document);
14799
14968
  return V.isHtmlElement(i) ? i : (m.error("[Haori]", `Intersect root element not found: ${r}`), null);
14800
14969
  }
14801
14970
  static resolveRootMargin(e) {
@@ -14823,7 +14992,7 @@ V.CONFIG_KEYS = /* @__PURE__ */ new Set([
14823
14992
  "disabled",
14824
14993
  "once"
14825
14994
  ]), V.registrations = /* @__PURE__ */ new Map();
14826
- let ve = V;
14995
+ let Ee = V;
14827
14996
  const v = class v {
14828
14997
  /**
14829
14998
  * 指定ノードとその子孫を走査し、`data-poll-*` の監視状態を同期します。
@@ -14849,7 +15018,7 @@ const v = class v {
14849
15018
  const t = v.registrations.get(e);
14850
15019
  if (!t && !v.hasPollAttribute(e))
14851
15020
  return;
14852
- const r = D.get(e);
15021
+ const r = I.get(e);
14853
15022
  if (!(r instanceof S) || !v.shouldObserve(r)) {
14854
15023
  t && v.teardown(e, t);
14855
15024
  return;
@@ -15012,7 +15181,7 @@ const v = class v {
15012
15181
  t.fetching = !0, t.count += 1;
15013
15182
  let i = !1;
15014
15183
  try {
15015
- i = await new oe(
15184
+ i = await new ae(
15016
15185
  t.fragment,
15017
15186
  "poll"
15018
15187
  ).runWithResult();
@@ -15058,7 +15227,7 @@ const v = class v {
15058
15227
  */
15059
15228
  static async handleTimeout(e) {
15060
15229
  const t = v.registrations.get(e);
15061
- !t || t.stopped || (t.timeoutTimerId = null, t.timedOut = !0, e.isConnected && B.pollTimeout(
15230
+ !t || t.stopped || (t.timeoutTimerId = null, t.timedOut = !0, e.isConnected && H.pollTimeout(
15062
15231
  e,
15063
15232
  t.count,
15064
15233
  v.elapsed(t)
@@ -15078,7 +15247,7 @@ const v = class v {
15078
15247
  v.registrations.delete(e);
15079
15248
  return;
15080
15249
  }
15081
- await v.injectState(t), e.isConnected && B.pollStop(
15250
+ await v.injectState(t), e.isConnected && H.pollStop(
15082
15251
  e,
15083
15252
  r,
15084
15253
  t.count,
@@ -15191,7 +15360,7 @@ const v = class v {
15191
15360
  const i = r.getAttribute(t);
15192
15361
  if (typeof i != "string" || i.trim() === "")
15193
15362
  return r.getTarget().isConnected ? [r] : [];
15194
- const n = J.queryAll(
15363
+ const n = Z.queryAll(
15195
15364
  i,
15196
15365
  t,
15197
15366
  document
@@ -15202,7 +15371,7 @@ const v = class v {
15202
15371
  return n.forEach((a) => {
15203
15372
  if (!a.isConnected)
15204
15373
  return;
15205
- const o = D.get(a);
15374
+ const o = I.get(a);
15206
15375
  o instanceof S && s.push(o);
15207
15376
  }), s;
15208
15377
  }
@@ -15350,9 +15519,9 @@ v.CONFIG_KEYS = /* @__PURE__ */ new Set([
15350
15519
  "disabled",
15351
15520
  "state"
15352
15521
  ]), v.DEFAULT_INTERVAL_MS = 5e3, v.MIN_INTERVAL_MS = 100, v.registrations = /* @__PURE__ */ new Map(), v.visibilityListener = null;
15353
- let we = v;
15354
- const Kt = "0.55.0";
15355
- function zt(b) {
15522
+ let Ae = v;
15523
+ const zt = "0.57.0";
15524
+ function Gt(b) {
15356
15525
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => b()) : Promise.resolve().then(b);
15357
15526
  }
15358
15527
  const O = class O {
@@ -15385,7 +15554,7 @@ const O = class O {
15385
15554
  * @param element 対象要素
15386
15555
  */
15387
15556
  static syncElement(e) {
15388
- const t = O.registrations.get(e), r = D.get(e);
15557
+ const t = O.registrations.get(e), r = I.get(e);
15389
15558
  if (!(r instanceof S) || !O.shouldObserve(r)) {
15390
15559
  t && (t.observer.disconnect(), O.registrations.delete(e));
15391
15560
  return;
@@ -15490,7 +15659,7 @@ const O = class O {
15490
15659
  const r = e.getAttribute(t);
15491
15660
  if (typeof r != "string" || r.trim() === "")
15492
15661
  return null;
15493
- const i = J.query(r, t, document);
15662
+ const i = Z.query(r, t, document);
15494
15663
  return O.isHtmlElement(i) ? i : (m.error("[Haori]", `Visible range root element not found: ${r}`), null);
15495
15664
  }
15496
15665
  /**
@@ -15534,7 +15703,7 @@ const O = class O {
15534
15703
  * @param registration 対象の登録
15535
15704
  */
15536
15705
  static scheduleCompute(e) {
15537
- e.scheduled || (e.scheduled = !0, zt(() => {
15706
+ e.scheduled || (e.scheduled = !0, Gt(() => {
15538
15707
  e.scheduled = !1;
15539
15708
  const t = e.fragment.getTarget();
15540
15709
  O.registrations.get(t) === e && O.computeAndPublish(e);
@@ -15631,28 +15800,28 @@ const O = class O {
15631
15800
  }
15632
15801
  };
15633
15802
  O.THRESHOLD = 0, O.DEFAULT_ROOT_MARGIN = "0px", O.registrations = /* @__PURE__ */ new Map();
15634
- let be = O;
15635
- const H = class H {
15803
+ let ge = O;
15804
+ const U = class U {
15636
15805
  /**
15637
15806
  * 既存の MutationObserver をすべて停止します。
15638
15807
  */
15639
15808
  static disconnectMutationObservers() {
15640
- H._mutationObservers.forEach((e) => {
15809
+ U._mutationObservers.forEach((e) => {
15641
15810
  e.disconnect();
15642
- }), H._mutationObservers.length = 0;
15811
+ }), U._mutationObservers.length = 0;
15643
15812
  }
15644
15813
  /**
15645
15814
  * 初期化メソッド。
15646
15815
  * ドキュメントのheadとbodyを監視対象として設定します。
15647
15816
  */
15648
15817
  static async init() {
15649
- if (H._initialized)
15818
+ if (U._initialized)
15650
15819
  return;
15651
- H._initialized = !0, H.disconnectMutationObservers(), S.setPendingMutationFlusher(() => {
15652
- H.flushPendingMutations();
15820
+ U._initialized = !0, U.disconnectMutationObservers(), S.setPendingMutationFlusher(() => {
15821
+ U.flushPendingMutations();
15653
15822
  });
15654
15823
  const e = new Ve();
15655
- H._dispatcher = e, e.startDeferred(), H._initialIntakes = [];
15824
+ U._dispatcher = e, e.startDeferred(), U._initialIntakes = [];
15656
15825
  try {
15657
15826
  const t = await Promise.allSettled([
15658
15827
  $.scan(document.head),
@@ -15666,11 +15835,11 @@ const H = class H {
15666
15835
  "[Haori]",
15667
15836
  "Failed to build body fragment:",
15668
15837
  i.reason
15669
- ), await H.waitInitialIntakes(), await z.wait(), document.body.setAttribute("data-haori-ready", ""), H.observe(document.head), H.observe(document.body), ve.syncTree(document.body), we.syncTree(document.body), be.syncTree(document.body);
15838
+ ), await U.waitInitialIntakes(), await K.wait(), document.body.setAttribute("data-haori-ready", ""), U.observe(document.head), U.observe(document.body), Ee.syncTree(document.body), Ae.syncTree(document.body), ge.syncTree(document.body);
15670
15839
  } finally {
15671
- H._initialIntakes = null, e.release();
15840
+ U._initialIntakes = null, e.release();
15672
15841
  }
15673
- B.ready(Kt);
15842
+ H.ready(zt);
15674
15843
  }
15675
15844
  /**
15676
15845
  * 稼働中の EventDispatcher を返します。
@@ -15679,7 +15848,7 @@ const H = class H {
15679
15848
  * @returns 稼働中の EventDispatcher。未初期化の場合は null。
15680
15849
  */
15681
15850
  static getDispatcher() {
15682
- return H._dispatcher;
15851
+ return U._dispatcher;
15683
15852
  }
15684
15853
  /**
15685
15854
  * 初期化の途中で取り込んだ DOM 変更の処理を、すべて待ちます。
@@ -15692,7 +15861,7 @@ const H = class H {
15692
15861
  * @returns 待機完了の Promise
15693
15862
  */
15694
15863
  static async waitInitialIntakes() {
15695
- const e = H._initialIntakes;
15864
+ const e = U._initialIntakes;
15696
15865
  for (; e !== null && e.length > 0; )
15697
15866
  await Promise.allSettled(e.splice(0));
15698
15867
  }
@@ -15712,7 +15881,7 @@ const H = class H {
15712
15881
  * @returns 戻り値はありません。
15713
15882
  */
15714
15883
  static captureMutations(e) {
15715
- if (H._mutationObservers.length > 0) {
15884
+ if (U._mutationObservers.length > 0) {
15716
15885
  e();
15717
15886
  return;
15718
15887
  }
@@ -15727,8 +15896,8 @@ const H = class H {
15727
15896
  try {
15728
15897
  e();
15729
15898
  } finally {
15730
- const r = t.takeRecords().map((i) => H.toCapturedRecord(i));
15731
- t.disconnect(), H.processMutations(r);
15899
+ const r = t.takeRecords().map((i) => U.toCapturedRecord(i));
15900
+ t.disconnect(), U.processMutations(r);
15732
15901
  }
15733
15902
  }
15734
15903
  /**
@@ -15753,7 +15922,7 @@ const H = class H {
15753
15922
  type: e.type,
15754
15923
  target: e.target,
15755
15924
  addedNodes: Array.from(e.addedNodes).filter(
15756
- (t) => !H.hasKnownDescendant(t)
15925
+ (t) => !U.hasKnownDescendant(t)
15757
15926
  ),
15758
15927
  removedNodes: []
15759
15928
  };
@@ -15817,14 +15986,14 @@ const H = class H {
15817
15986
  */
15818
15987
  static observe(e) {
15819
15988
  const t = new MutationObserver((r) => {
15820
- H.processMutations(r);
15989
+ U.processMutations(r);
15821
15990
  });
15822
15991
  t.observe(e, {
15823
15992
  childList: !0,
15824
15993
  subtree: !0,
15825
15994
  attributes: !0,
15826
15995
  characterData: !0
15827
- }), H._mutationObservers.push(t);
15996
+ }), U._mutationObservers.push(t);
15828
15997
  }
15829
15998
  /**
15830
15999
  * 保留中の DOM 変更を同期的に引き取って処理へ載せます。
@@ -15847,15 +16016,15 @@ const H = class H {
15847
16016
  * @returns 戻り値はありません。
15848
16017
  */
15849
16018
  static flushPendingMutations() {
15850
- for (const e of H._mutationObservers) {
16019
+ for (const e of U._mutationObservers) {
15851
16020
  const t = e.takeRecords();
15852
16021
  if (t.length === 0)
15853
16022
  continue;
15854
- const r = t.filter(H.isBindAttributeRecord), i = t.filter(
15855
- (n) => !H.isBindAttributeRecord(n)
16023
+ const r = t.filter(U.isBindAttributeRecord), i = t.filter(
16024
+ (n) => !U.isBindAttributeRecord(n)
15856
16025
  );
15857
- r.length > 0 && H.processMutations(r, S.nextSequence()), i.length > 0 && Promise.resolve().then(() => {
15858
- H.processMutations(i);
16026
+ r.length > 0 && U.processMutations(r, S.nextSequence()), i.length > 0 && Promise.resolve().then(() => {
16027
+ U.processMutations(i);
15859
16028
  });
15860
16029
  }
15861
16030
  }
@@ -15879,12 +16048,12 @@ const H = class H {
15879
16048
  static processMutations(e, t) {
15880
16049
  for (const r of e)
15881
16050
  try {
15882
- if (H.isExternallyManaged(r.target))
16051
+ if (U.isExternallyManaged(r.target))
15883
16052
  continue;
15884
16053
  switch (r.type) {
15885
16054
  case "attributes": {
15886
16055
  const i = r.target;
15887
- if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(me) && (r.attributeName === "disabled" || r.attributeName === me))
16056
+ if (r.attributeName && i.hasAttribute("data-haori-click-lock") && (r.attributeName === "disabled" || r.attributeName === "data-haori-click-lock") || r.attributeName && i.hasAttribute(he) && (r.attributeName === "disabled" || r.attributeName === he))
15888
16057
  break;
15889
16058
  if (r.attributeName && (r.attributeName === `${l.prefix}if-false` || r.attributeName === "style" && i.hasAttribute(`${l.prefix}if-false`))) {
15890
16059
  r.attributeName === "style" && S.reassertHiddenDisplay(i);
@@ -15899,18 +16068,18 @@ const H = class H {
15899
16068
  !0,
15900
16069
  t
15901
16070
  );
15902
- H._initialIntakes?.push(n), ve.syncElement(i), we.syncElement(i), be.syncElement(i);
16071
+ U._initialIntakes?.push(n), Ee.syncElement(i), Ae.syncElement(i), ge.syncElement(i);
15903
16072
  break;
15904
16073
  }
15905
16074
  case "childList": {
15906
16075
  Array.from(r.removedNodes).forEach((i) => {
15907
- H.isStaleExternalRemoval(r, i) || (ve.cleanupTree(i), we.cleanupTree(i), be.cleanupTree(i), $.removeNode(i));
16076
+ U.isStaleExternalRemoval(r, i) || (Ee.cleanupTree(i), Ae.cleanupTree(i), ge.cleanupTree(i), $.removeNode(i));
15908
16077
  }), Array.from(r.addedNodes).forEach((i) => {
15909
16078
  if (!(i.parentElement instanceof Element))
15910
16079
  return;
15911
16080
  const n = $.addNode(i.parentElement, i);
15912
- H._initialIntakes?.push(n), ve.syncTree(i), we.syncTree(i), be.syncTree(i);
15913
- }), r.target instanceof Element && be.syncElement(r.target);
16081
+ U._initialIntakes?.push(n), Ee.syncTree(i), Ae.syncTree(i), ge.syncTree(i);
16082
+ }), r.target instanceof Element && ge.syncElement(r.target);
15914
16083
  break;
15915
16084
  }
15916
16085
  case "characterData": {
@@ -15930,23 +16099,23 @@ const H = class H {
15930
16099
  }
15931
16100
  }
15932
16101
  };
15933
- H._initialized = !1, H._mutationObservers = [], H._dispatcher = null, H._initialIntakes = null;
15934
- let Ne = H;
15935
- re.setMutationCapture((b) => Ne.captureMutations(b));
15936
- document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", Ne.init) : Ne.init();
15937
- const Gt = () => Te.waitForRenders(), Yt = Te.enhancers;
16102
+ U._initialized = !1, U._mutationObservers = [], U._dispatcher = null, U._initialIntakes = null;
16103
+ let ke = U;
16104
+ te.setMutationCapture((b) => ke.captureMutations(b));
16105
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", ke.init) : ke.init();
16106
+ const Yt = () => Se.waitForRenders(), Xt = Se.enhancers;
15938
16107
  export {
15939
16108
  $ as Core,
15940
- re as Enhance,
16109
+ te as Enhance,
15941
16110
  l as Env,
15942
- F as Form,
15943
- D as Fragment,
15944
- Te as Haori,
16111
+ k as Form,
16112
+ I as Fragment,
16113
+ Se as Haori,
15945
16114
  m as Log,
15946
- z as Queue,
15947
- Te as default,
15948
- Yt as enhancers,
15949
- Kt as version,
15950
- Gt as waitForRenders
16115
+ K as Queue,
16116
+ Se as default,
16117
+ Xt as enhancers,
16118
+ zt as version,
16119
+ Yt as waitForRenders
15951
16120
  };
15952
16121
  //# sourceMappingURL=haori.es.js.map