bank20baht-ui 0.4.2 → 0.4.3

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.
@@ -1,13 +1,13 @@
1
- import { nothing as h, html as n, svg as L } from "lit";
2
- import { property as l, customElement as b, state as y, query as It } from "lit/decorators.js";
3
- import { B as g, b as he, h as S, a as Y } from "./base-CajA2aCO.js";
1
+ import { nothing as h, html as l, svg as N } from "lit";
2
+ import { property as n, customElement as b, state as y, query as Mt } from "lit/decorators.js";
3
+ import { B as g, b as he, h as T, a as X } from "./base-CajA2aCO.js";
4
4
  import { t as m } from "./i18n-BcPL9_Jh.js";
5
5
  import { n as $e, k as Nt, o as ds, i as zt, p as us, d as ae, a as rs, m as Ae, v as Le, c as bs, g as fs, l as ms } from "./display-DQRcvsn7.js";
6
6
  import { repeat as Ce } from "lit/directives/repeat.js";
7
7
  import { html as se, unsafeStatic as os } from "lit/static-html.js";
8
8
  import { c as vs, r as W } from "./baht-toast-CD1WrOYr.js";
9
9
  import { live as lt } from "lit/directives/live.js";
10
- import { ifDefined as N } from "lit/directives/if-defined.js";
10
+ import { ifDefined as q } from "lit/directives/if-defined.js";
11
11
  import $s from "flatpickr";
12
12
  var ys = Object.defineProperty, gs = Object.getOwnPropertyDescriptor, ce = (t, e, i, a) => {
13
13
  for (var s = a > 1 ? void 0 : a ? gs(e, i) : e, r = t.length - 1, o; r >= 0; r--)
@@ -23,24 +23,24 @@ let Vt = class extends g {
23
23
  }
24
24
  render() {
25
25
  const t = this.tone === "neutral" ? "" : ` baht-badge--${this.tone}`;
26
- return n`<span class="baht-badge${t}">
27
- ${this.showDot ? n`<span class="baht-badge-dot" aria-hidden="true"></span>` : h}${this.label}
26
+ return l`<span class="baht-badge${t}">
27
+ ${this.showDot ? l`<span class="baht-badge-dot" aria-hidden="true"></span>` : h}${this.label}
28
28
  </span>`;
29
29
  }
30
30
  };
31
31
  ce([
32
- l()
32
+ n()
33
33
  ], Vt.prototype, "tone", 2);
34
34
  ce([
35
- l()
35
+ n()
36
36
  ], Vt.prototype, "label", 2);
37
37
  ce([
38
- l({ attribute: !1 })
38
+ n({ attribute: !1 })
39
39
  ], Vt.prototype, "dot", 2);
40
40
  Vt = ce([
41
41
  b("baht-badge")
42
42
  ], Vt);
43
- var ws = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, Me = (t, e, i, a) => {
43
+ var ws = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, Ie = (t, e, i, a) => {
44
44
  for (var s = a > 1 ? void 0 : a ? xs(e, i) : e, r = t.length - 1, o; r >= 0; r--)
45
45
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
46
46
  return a && s && ws(e, i, s), s;
@@ -54,16 +54,16 @@ let ie = class extends g {
54
54
  t && he(this, t);
55
55
  }
56
56
  render() {
57
- return this.variant === "block" ? n`<pre class="baht-code baht-code--block" tabindex="0">${this.code}</pre>` : n`<code class="baht-code">${this.code}</code>`;
57
+ return this.variant === "block" ? l`<pre class="baht-code baht-code--block" tabindex="0">${this.code}</pre>` : l`<code class="baht-code">${this.code}</code>`;
58
58
  }
59
59
  };
60
- Me([
61
- l()
60
+ Ie([
61
+ n()
62
62
  ], ie.prototype, "variant", 2);
63
- Me([
64
- l()
63
+ Ie([
64
+ n()
65
65
  ], ie.prototype, "code", 2);
66
- ie = Me([
66
+ ie = Ie([
67
67
  b("baht-code")
68
68
  ], ie);
69
69
  var _s = Object.defineProperty, ks = Object.getOwnPropertyDescriptor, gt = (t, e, i, a) => {
@@ -107,15 +107,15 @@ let ht = class extends g {
107
107
  }
108
108
  render() {
109
109
  if (this.variant === "cursor")
110
- return n`<nav class="baht-pagination baht-pagination--cursor" aria-label="Pagination">
110
+ return l`<nav class="baht-pagination baht-pagination--cursor" aria-label="Pagination">
111
111
  <button type="button" ?disabled=${!this.hasPrev} @click=${() => this.goCursor("prev")}><span aria-hidden="true">« </span>Prev</button>
112
112
  <button type="button" ?disabled=${!this.hasNext} @click=${() => this.goCursor("next")}>Next<span aria-hidden="true"> »</span></button>
113
113
  </nav>`;
114
114
  const t = this.page <= 1, e = this.page >= this.totalPages;
115
- return n`<nav class="baht-pagination" aria-label="Pagination">
115
+ return l`<nav class="baht-pagination" aria-label="Pagination">
116
116
  <button type="button" aria-label="Previous page" ?disabled=${t} @click=${() => this.go(this.page - 1)}><span aria-hidden="true">«</span></button>
117
- ${this.variant === "compact" ? n`<span class="baht-pagination-label">Page ${this.page} of ${this.totalPages}</span>` : this.pageItems.map(
118
- (i) => i === null ? n`<span class="baht-pagination-ellipsis" aria-hidden="true">…</span>` : n`<button
117
+ ${this.variant === "compact" ? l`<span class="baht-pagination-label">Page ${this.page} of ${this.totalPages}</span>` : this.pageItems.map(
118
+ (i) => i === null ? l`<span class="baht-pagination-ellipsis" aria-hidden="true">…</span>` : l`<button
119
119
  type="button"
120
120
  aria-current=${i === this.page ? "page" : h}
121
121
  aria-label="Page ${i}"
@@ -127,22 +127,22 @@ let ht = class extends g {
127
127
  }
128
128
  };
129
129
  gt([
130
- l({ type: Number })
130
+ n({ type: Number })
131
131
  ], ht.prototype, "page", 2);
132
132
  gt([
133
- l({ type: Number, attribute: "total-pages" })
133
+ n({ type: Number, attribute: "total-pages" })
134
134
  ], ht.prototype, "totalPages", 2);
135
135
  gt([
136
- l()
136
+ n()
137
137
  ], ht.prototype, "variant", 2);
138
138
  gt([
139
- l({ type: Number })
139
+ n({ type: Number })
140
140
  ], ht.prototype, "siblings", 2);
141
141
  gt([
142
- l({ type: Boolean, attribute: "has-next" })
142
+ n({ type: Boolean, attribute: "has-next" })
143
143
  ], ht.prototype, "hasNext", 2);
144
144
  gt([
145
- l({ type: Boolean, attribute: "has-prev" })
145
+ n({ type: Boolean, attribute: "has-prev" })
146
146
  ], ht.prototype, "hasPrev", 2);
147
147
  ht = gt([
148
148
  b("baht-pagination")
@@ -178,7 +178,7 @@ let k = class extends g {
178
178
  r != null && r.contains(s) ? t.shiftKey && s === i ? (a.focus(), t.preventDefault()) : !t.shiftKey && s === a && (i.focus(), t.preventDefault()) : (i.focus(), t.preventDefault());
179
179
  }
180
180
  disconnectedCallback() {
181
- super.disconnectedCallback(), S() && document.removeEventListener("keydown", this.onPickerKeydown);
181
+ super.disconnectedCallback(), T() && document.removeEventListener("keydown", this.onPickerKeydown);
182
182
  }
183
183
  willUpdate(t) {
184
184
  t.has("visibleColumns") && !t.has("columns") && (this.pickedColumns = null);
@@ -251,7 +251,7 @@ let k = class extends g {
251
251
  }
252
252
  // ---- picker -----------------------------------------------------------
253
253
  openPicker() {
254
- this.draftColumns = this.columnKeys.slice(), this.pickAvail = [], this.pickSel = [], this.pickerOpen = !0, this.pickerPreviousFocus = document.activeElement, S() && document.addEventListener("keydown", this.onPickerKeydown), this.updateComplete.then(() => {
254
+ this.draftColumns = this.columnKeys.slice(), this.pickAvail = [], this.pickSel = [], this.pickerOpen = !0, this.pickerPreviousFocus = document.activeElement, T() && document.addEventListener("keydown", this.onPickerKeydown), this.updateComplete.then(() => {
255
255
  var t;
256
256
  this.pickerOpen && ((t = this.pickerFocusables()[0]) == null || t.focus());
257
257
  });
@@ -259,7 +259,7 @@ let k = class extends g {
259
259
  closePicker() {
260
260
  var e;
261
261
  if (!this.pickerOpen) return;
262
- this.pickerOpen = !1, S() && document.removeEventListener("keydown", this.onPickerKeydown);
262
+ this.pickerOpen = !1, T() && document.removeEventListener("keydown", this.onPickerKeydown);
263
263
  const t = this.pickerPreviousFocus;
264
264
  this.pickerPreviousFocus = null, t != null && t.isConnected && ((e = t.focus) == null || e.call(t));
265
265
  }
@@ -319,27 +319,27 @@ let k = class extends g {
319
319
  }
320
320
  renderBody(t) {
321
321
  const e = t.length + (this.showIndex ? 1 : 0);
322
- return this.loading ? n`${Array.from(
322
+ return this.loading ? l`${Array.from(
323
323
  { length: this.skeletonRows },
324
- (i, a) => n`<tr>
325
- ${this.showIndex ? n`<td class="baht-table-index">${this.indexOffset + a + 1}</td>` : h}
326
- ${t.map(() => n`<td><span class="baht-skeleton" style="height:16px;"></span></td>`)}
324
+ (i, a) => l`<tr>
325
+ ${this.showIndex ? l`<td class="baht-table-index">${this.indexOffset + a + 1}</td>` : h}
326
+ ${t.map(() => l`<td><span class="baht-skeleton" style="height:16px;"></span></td>`)}
327
327
  </tr>`
328
- )}` : this.error ? n`<tr><td colspan=${e}><div class="baht-table-state baht-table-state--error" role="alert">${this.errorMessage}</div></td></tr>` : this.items.length === 0 ? n`<tr><td colspan=${e}><div class="baht-table-state">${this.emptyMessage}</div></td></tr>` : n`${this.items.map(
329
- (i, a) => n`<tr
328
+ )}` : this.error ? l`<tr><td colspan=${e}><div class="baht-table-state baht-table-state--error" role="alert">${this.errorMessage}</div></td></tr>` : this.items.length === 0 ? l`<tr><td colspan=${e}><div class="baht-table-state">${this.emptyMessage}</div></td></tr>` : l`${this.items.map(
329
+ (i, a) => l`<tr
330
330
  tabindex=${this.clickable ? "0" : h}
331
331
  @click=${() => this.emitRow(i, a)}
332
332
  @keydown=${(s) => {
333
333
  s.key !== "Enter" && s.key !== " " || (s.preventDefault(), this.emitRow(i, a));
334
334
  }}
335
335
  >
336
- ${this.showIndex ? n`<td class="baht-table-index">${this.indexOffset + a + 1}</td>` : h}
337
- ${t.map((s) => n`<td data-col=${s}>${this.cell(i, s)}</td>`)}
336
+ ${this.showIndex ? l`<td class="baht-table-index">${this.indexOffset + a + 1}</td>` : h}
337
+ ${t.map((s) => l`<td data-col=${s}>${this.cell(i, s)}</td>`)}
338
338
  </tr>`
339
339
  )}`;
340
340
  }
341
341
  renderColumnToggle() {
342
- return n`<div class="baht-table-picker">
342
+ return l`<div class="baht-table-picker">
343
343
  <button
344
344
  type="button"
345
345
  class="baht-table-picker-toggle"
@@ -356,15 +356,15 @@ let k = class extends g {
356
356
  */
357
357
  renderAvailRow(t, e) {
358
358
  const i = this.specAt(t), a = (i == null ? void 0 : i.fields) !== void 0, s = this.expanded.includes(t), r = this.draftColumns.includes(t);
359
- return n`<li class="baht-table-picker-node" style="--baht-picker-depth:${e}">
359
+ return l`<li class="baht-table-picker-node" style="--baht-picker-depth:${e}">
360
360
  <div class="baht-table-picker-row">
361
- ${a ? n`<button
361
+ ${a ? l`<button
362
362
  type="button"
363
363
  class="baht-table-picker-expand"
364
364
  aria-label=${s ? `Collapse ${i == null ? void 0 : i.label}` : `Expand ${i == null ? void 0 : i.label}`}
365
365
  aria-expanded=${s ? "true" : "false"}
366
366
  @click=${() => this.toggleExpanded(t)}
367
- >${s ? "▾" : "▸"}</button>` : n`<span class="baht-table-picker-expand baht-table-picker-expand--leaf"></span>`}
367
+ >${s ? "▾" : "▸"}</button>` : l`<span class="baht-table-picker-expand baht-table-picker-expand--leaf"></span>`}
368
368
  <button
369
369
  type="button"
370
370
  class="baht-table-picker-option"
@@ -374,14 +374,14 @@ let k = class extends g {
374
374
  @click=${() => this.toggleAvail(t)}
375
375
  >${e === 0 ? this.labelFor(t) : (i == null ? void 0 : i.label) ?? t}</button>
376
376
  </div>
377
- ${a && s ? n`<ul class="baht-table-picker-tree">
377
+ ${a && s ? l`<ul class="baht-table-picker-tree">
378
378
  ${this.childrenOf(t).map((o) => this.renderAvailRow(o, e + 1))}
379
379
  </ul>` : h}
380
380
  </li>`;
381
381
  }
382
382
  renderColumnModal() {
383
383
  const t = this.allColumnKeys, e = this.allPaths().filter((a) => !this.draftColumns.includes(a)).length, i = (a) => (s) => a(k.selectedValues(s));
384
- return n`<div
384
+ return l`<div
385
385
  class="baht-table-picker-scrim"
386
386
  @click=${(a) => a.target === a.currentTarget && this.closePicker()}
387
387
  >
@@ -407,7 +407,7 @@ let k = class extends g {
407
407
  <div class="baht-table-picker-collabel">Selected (${this.draftColumns.length})</div>
408
408
  <select multiple size="10" class="baht-table-picker-select" aria-label="Selected columns" @change=${i((a) => this.pickSel = a)}>
409
409
  ${this.draftColumns.map(
410
- (a) => n`<option value=${a} ?selected=${this.pickSel.includes(a)}>${this.labelFor(a)}</option>`
410
+ (a) => l`<option value=${a} ?selected=${this.pickSel.includes(a)}>${this.labelFor(a)}</option>`
411
411
  )}
412
412
  </select>
413
413
  </div>
@@ -424,7 +424,7 @@ let k = class extends g {
424
424
  }
425
425
  render() {
426
426
  const t = this.columnKeys;
427
- return n`<div
427
+ return l`<div
428
428
  class="baht-table-wrap"
429
429
  tabindex=${this.clickable ? h : "0"}
430
430
  aria-busy=${this.loading ? "true" : h}
@@ -434,19 +434,19 @@ let k = class extends g {
434
434
  <table class="baht-table">
435
435
  <thead>
436
436
  <tr>
437
- ${this.showIndex ? n`<th scope="col" class="baht-table-index">No.</th>` : h}
438
- ${t.map((e) => n`<th scope="col" data-col=${e}>${this.labelFor(e)}</th>`)}
437
+ ${this.showIndex ? l`<th scope="col" class="baht-table-index">No.</th>` : h}
438
+ ${t.map((e) => l`<th scope="col" data-col=${e}>${this.labelFor(e)}</th>`)}
439
439
  </tr>
440
440
  </thead>
441
441
  <tbody>${this.renderBody(t)}</tbody>
442
442
  </table>
443
- ${this.cursorMode ? n`<div class="baht-table-footer">
443
+ ${this.cursorMode ? l`<div class="baht-table-footer">
444
444
  <baht-pagination
445
445
  variant="cursor"
446
446
  ?has-next=${this.hasNext}
447
447
  ?has-prev=${this.hasPrev}
448
448
  ></baht-pagination>
449
- </div>` : this.totalPages > 1 ? n`<div class="baht-table-footer">
449
+ </div>` : this.totalPages > 1 ? l`<div class="baht-table-footer">
450
450
  <baht-pagination
451
451
  variant="compact"
452
452
  page=${this.page}
@@ -457,61 +457,61 @@ let k = class extends g {
457
457
  }
458
458
  };
459
459
  O([
460
- l({ attribute: !1 })
460
+ n({ attribute: !1 })
461
461
  ], k.prototype, "items", 2);
462
462
  O([
463
- l({ attribute: !1 })
463
+ n({ attribute: !1 })
464
464
  ], k.prototype, "columns", 2);
465
465
  O([
466
- l({ type: Boolean })
466
+ n({ type: Boolean })
467
467
  ], k.prototype, "loading", 2);
468
468
  O([
469
- l({ type: Boolean })
469
+ n({ type: Boolean })
470
470
  ], k.prototype, "error", 2);
471
471
  O([
472
- l({ attribute: "error-message" })
472
+ n({ attribute: "error-message" })
473
473
  ], k.prototype, "errorMessage", 2);
474
474
  O([
475
- l({ attribute: "empty-message" })
475
+ n({ attribute: "empty-message" })
476
476
  ], k.prototype, "emptyMessage", 2);
477
477
  O([
478
- l({ type: Boolean, attribute: "show-index" })
478
+ n({ type: Boolean, attribute: "show-index" })
479
479
  ], k.prototype, "showIndex", 2);
480
480
  O([
481
- l({ type: Number, attribute: "index-offset" })
481
+ n({ type: Number, attribute: "index-offset" })
482
482
  ], k.prototype, "indexOffset", 2);
483
483
  O([
484
- l({ type: Number, attribute: "skeleton-rows" })
484
+ n({ type: Number, attribute: "skeleton-rows" })
485
485
  ], k.prototype, "skeletonRows", 2);
486
486
  O([
487
- l({ attribute: "row-key" })
487
+ n({ attribute: "row-key" })
488
488
  ], k.prototype, "rowKey", 2);
489
489
  O([
490
- l({ type: Boolean })
490
+ n({ type: Boolean })
491
491
  ], k.prototype, "clickable", 2);
492
492
  O([
493
- l({ attribute: !1 })
493
+ n({ attribute: !1 })
494
494
  ], k.prototype, "renderers", 2);
495
495
  O([
496
- l({ attribute: !1 })
496
+ n({ attribute: !1 })
497
497
  ], k.prototype, "visibleColumns", 2);
498
498
  O([
499
- l({ type: Boolean, attribute: "column-picker" })
499
+ n({ type: Boolean, attribute: "column-picker" })
500
500
  ], k.prototype, "columnPicker", 2);
501
501
  O([
502
- l({ type: Number })
502
+ n({ type: Number })
503
503
  ], k.prototype, "page", 2);
504
504
  O([
505
- l({ type: Number, attribute: "total-pages" })
505
+ n({ type: Number, attribute: "total-pages" })
506
506
  ], k.prototype, "totalPages", 2);
507
507
  O([
508
- l({ type: Boolean, attribute: "cursor-mode" })
508
+ n({ type: Boolean, attribute: "cursor-mode" })
509
509
  ], k.prototype, "cursorMode", 2);
510
510
  O([
511
- l({ type: Boolean, attribute: "has-next" })
511
+ n({ type: Boolean, attribute: "has-next" })
512
512
  ], k.prototype, "hasNext", 2);
513
513
  O([
514
- l({ type: Boolean, attribute: "has-prev" })
514
+ n({ type: Boolean, attribute: "has-prev" })
515
515
  ], k.prototype, "hasPrev", 2);
516
516
  O([
517
517
  y()
@@ -553,16 +553,16 @@ let rt = class extends g {
553
553
  );
554
554
  }
555
555
  renderRows() {
556
- return this.loading ? n`${Array.from(
556
+ return this.loading ? l`${Array.from(
557
557
  { length: this.skeletonRows },
558
- () => n`<div class="baht-list-item">
558
+ () => l`<div class="baht-list-item">
559
559
  <div class="baht-list-main">
560
560
  <span class="baht-skeleton baht-skeleton--text" style="width:40%; margin-bottom:6px;"></span>
561
561
  <span class="baht-skeleton baht-skeleton--text" style="width:65%;"></span>
562
562
  </div>
563
563
  </div>`
564
- )}` : this.error ? n`<div class="baht-list-state baht-list-state--error" role="alert">${this.errorMessage}</div>` : this.items.length === 0 ? n`<div class="baht-list-state">${this.emptyMessage}</div>` : n`${this.items.map(
565
- (t, e) => n`<div
564
+ )}` : this.error ? l`<div class="baht-list-state baht-list-state--error" role="alert">${this.errorMessage}</div>` : this.items.length === 0 ? l`<div class="baht-list-state">${this.emptyMessage}</div>` : l`${this.items.map(
565
+ (t, e) => l`<div
566
566
  class="baht-list-item"
567
567
  role="listitem"
568
568
  tabindex=${this.clickable ? "0" : h}
@@ -573,38 +573,38 @@ let rt = class extends g {
573
573
  >
574
574
  <div class="baht-list-main">
575
575
  <div class="baht-list-title">${t.title}</div>
576
- ${t.subtitle ? n`<div class="baht-list-subtitle">${t.subtitle}</div>` : h}
576
+ ${t.subtitle ? l`<div class="baht-list-subtitle">${t.subtitle}</div>` : h}
577
577
  </div>
578
- ${t.badge ? n`<baht-badge tone=${t.badgeTone ?? "neutral"} label=${t.badge}></baht-badge>` : h}
579
- ${t.meta ? n`<span class="baht-list-meta">${t.meta}</span>` : h}
578
+ ${t.badge ? l`<baht-badge tone=${t.badgeTone ?? "neutral"} label=${t.badge}></baht-badge>` : h}
579
+ ${t.meta ? l`<span class="baht-list-meta">${t.meta}</span>` : h}
580
580
  </div>`
581
581
  )}`;
582
582
  }
583
583
  render() {
584
584
  const t = !this.loading && !this.error && this.items.length > 0;
585
- return n`<div class="baht-list" role=${t ? "list" : h}>${this.renderRows()}</div>`;
585
+ return l`<div class="baht-list" role=${t ? "list" : h}>${this.renderRows()}</div>`;
586
586
  }
587
587
  };
588
588
  ut([
589
- l({ attribute: !1 })
589
+ n({ attribute: !1 })
590
590
  ], rt.prototype, "items", 2);
591
591
  ut([
592
- l({ type: Boolean })
592
+ n({ type: Boolean })
593
593
  ], rt.prototype, "loading", 2);
594
594
  ut([
595
- l({ type: Boolean })
595
+ n({ type: Boolean })
596
596
  ], rt.prototype, "error", 2);
597
597
  ut([
598
- l({ attribute: "error-message" })
598
+ n({ attribute: "error-message" })
599
599
  ], rt.prototype, "errorMessage", 2);
600
600
  ut([
601
- l({ attribute: "empty-message" })
601
+ n({ attribute: "empty-message" })
602
602
  ], rt.prototype, "emptyMessage", 2);
603
603
  ut([
604
- l({ type: Number, attribute: "skeleton-rows" })
604
+ n({ type: Number, attribute: "skeleton-rows" })
605
605
  ], rt.prototype, "skeletonRows", 2);
606
606
  ut([
607
- l({ type: Boolean })
607
+ n({ type: Boolean })
608
608
  ], rt.prototype, "clickable", 2);
609
609
  rt = ut([
610
610
  b("baht-list")
@@ -642,7 +642,7 @@ let Pt = class extends g {
642
642
  this.dismissed = !1;
643
643
  }
644
644
  render() {
645
- return n`<span
645
+ return l`<span
646
646
  class="baht-tooltip-host${this.dismissed ? " baht-tooltip-host--dismissed" : ""}"
647
647
  @keydown=${this.onKeydown}
648
648
  @mouseleave=${this.rearm}
@@ -654,13 +654,13 @@ let Pt = class extends g {
654
654
  }
655
655
  };
656
656
  Jt([
657
- l()
657
+ n()
658
658
  ], Pt.prototype, "text", 2);
659
659
  Jt([
660
- l()
660
+ n()
661
661
  ], Pt.prototype, "position", 2);
662
662
  Jt([
663
- It(".baht-tooltip-anchor")
663
+ Mt(".baht-tooltip-anchor")
664
664
  ], Pt.prototype, "anchorEl", 2);
665
665
  Jt([
666
666
  y()
@@ -668,10 +668,10 @@ Jt([
668
668
  Pt = Jt([
669
669
  b("baht-tooltip")
670
670
  ], Pt);
671
- var Is = Object.defineProperty, Ms = Object.getOwnPropertyDescriptor, Mt = (t, e, i, a) => {
672
- for (var s = a > 1 ? void 0 : a ? Ms(e, i) : e, r = t.length - 1, o; r >= 0; r--)
671
+ var Ms = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, It = (t, e, i, a) => {
672
+ for (var s = a > 1 ? void 0 : a ? Is(e, i) : e, r = t.length - 1, o; r >= 0; r--)
673
673
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
674
- return a && s && Is(e, i, s), s;
674
+ return a && s && Ms(e, i, s), s;
675
675
  };
676
676
  let mt = class extends g {
677
677
  constructor() {
@@ -692,31 +692,31 @@ let mt = class extends g {
692
692
  i.classList.add("baht-alert--leaving"), vs(i, e);
693
693
  }
694
694
  render() {
695
- return this.dismissed ? h : n`<div class="baht-alert baht-alert--${this.tone}" role="alert">
695
+ return this.dismissed ? h : l`<div class="baht-alert baht-alert--${this.tone}" role="alert">
696
696
  <div class="baht-alert-main">
697
- ${this.heading ? n`<div class="baht-alert-title">${this.heading}</div>` : h}
698
- ${this.message ? n`<div class="baht-alert-message">${this.message}</div>` : h}
697
+ ${this.heading ? l`<div class="baht-alert-title">${this.heading}</div>` : h}
698
+ ${this.message ? l`<div class="baht-alert-message">${this.message}</div>` : h}
699
699
  </div>
700
- ${this.dismissible ? n`<button type="button" class="baht-alert-dismiss" aria-label=${m("dismiss")} @click=${() => this.dismiss()}>×</button>` : h}
700
+ ${this.dismissible ? l`<button type="button" class="baht-alert-dismiss" aria-label=${m("dismiss")} @click=${() => this.dismiss()}>×</button>` : h}
701
701
  </div>`;
702
702
  }
703
703
  };
704
- Mt([
705
- l()
704
+ It([
705
+ n()
706
706
  ], mt.prototype, "tone", 2);
707
- Mt([
708
- l()
707
+ It([
708
+ n()
709
709
  ], mt.prototype, "heading", 2);
710
- Mt([
711
- l()
710
+ It([
711
+ n()
712
712
  ], mt.prototype, "message", 2);
713
- Mt([
714
- l({ type: Boolean })
713
+ It([
714
+ n({ type: Boolean })
715
715
  ], mt.prototype, "dismissible", 2);
716
- Mt([
716
+ It([
717
717
  y()
718
718
  ], mt.prototype, "dismissed", 2);
719
- mt = Mt([
719
+ mt = It([
720
720
  b("baht-alert")
721
721
  ], mt);
722
722
  var js = Object.defineProperty, Ss = Object.getOwnPropertyDescriptor, jt = (t, e, i, a) => {
@@ -753,7 +753,7 @@ let vt = class extends g {
753
753
  }
754
754
  render() {
755
755
  const t = this.hover || this.value;
756
- return n`<div
756
+ return l`<div
757
757
  class="baht-rating"
758
758
  role="radiogroup"
759
759
  aria-label=${this.label}
@@ -761,7 +761,7 @@ let vt = class extends g {
761
761
  >
762
762
  ${Array.from({ length: this.max }, (e, i) => {
763
763
  const a = i + 1, s = this.value || 1;
764
- return n`<button
764
+ return l`<button
765
765
  type="button"
766
766
  class=${a <= t ? "baht-rating--on" : ""}
767
767
  role="radio"
@@ -778,16 +778,16 @@ let vt = class extends g {
778
778
  }
779
779
  };
780
780
  jt([
781
- l({ type: Number })
781
+ n({ type: Number })
782
782
  ], vt.prototype, "value", 2);
783
783
  jt([
784
- l({ type: Number })
784
+ n({ type: Number })
785
785
  ], vt.prototype, "max", 2);
786
786
  jt([
787
- l({ type: Boolean })
787
+ n({ type: Boolean })
788
788
  ], vt.prototype, "readonly", 2);
789
789
  jt([
790
- l()
790
+ n()
791
791
  ], vt.prototype, "label", 2);
792
792
  jt([
793
793
  y()
@@ -814,8 +814,8 @@ let ot = class extends g {
814
814
  );
815
815
  }
816
816
  render() {
817
- return n`<div class="baht-range">
818
- ${this.label ? n`<label class="baht-label" for=${this.inputId}>${this.label}</label>` : h}
817
+ return l`<div class="baht-range">
818
+ ${this.label ? l`<label class="baht-label" for=${this.inputId}>${this.label}</label>` : h}
819
819
  <div class="baht-range-row">
820
820
  <input
821
821
  type="range"
@@ -828,31 +828,31 @@ let ot = class extends g {
828
828
  ?disabled=${this.disabled}
829
829
  @input=${(t) => this.onInput(t)}
830
830
  />
831
- ${this.showValue ? n`<span class="baht-range-value">${this.value}</span>` : h}
831
+ ${this.showValue ? l`<span class="baht-range-value">${this.value}</span>` : h}
832
832
  </div>
833
833
  </div>`;
834
834
  }
835
835
  };
836
836
  bt([
837
- l({ type: Number })
837
+ n({ type: Number })
838
838
  ], ot.prototype, "value", 2);
839
839
  bt([
840
- l({ type: Number })
840
+ n({ type: Number })
841
841
  ], ot.prototype, "min", 2);
842
842
  bt([
843
- l({ type: Number })
843
+ n({ type: Number })
844
844
  ], ot.prototype, "max", 2);
845
845
  bt([
846
- l({ type: Number })
846
+ n({ type: Number })
847
847
  ], ot.prototype, "step", 2);
848
848
  bt([
849
- l()
849
+ n()
850
850
  ], ot.prototype, "label", 2);
851
851
  bt([
852
- l({ type: Boolean })
852
+ n({ type: Boolean })
853
853
  ], ot.prototype, "disabled", 2);
854
854
  bt([
855
- l({ type: Boolean, attribute: "show-value" })
855
+ n({ type: Boolean, attribute: "show-value" })
856
856
  ], ot.prototype, "showValue", 2);
857
857
  ot = bt([
858
858
  b("baht-range")
@@ -929,9 +929,9 @@ let $t = class extends g {
929
929
  this.commit(), (s = this.inputs()[Math.min(i, this.length - 1)]) == null || s.focus();
930
930
  }
931
931
  render() {
932
- return n`<div class="baht-otp" role="group" aria-label=${this.label} @paste=${(t) => this.onPaste(t)}>
932
+ return l`<div class="baht-otp" role="group" aria-label=${this.label} @paste=${(t) => this.onPaste(t)}>
933
933
  ${this._chars.map(
934
- (t, e) => n`<input
934
+ (t, e) => l`<input
935
935
  type="text"
936
936
  inputmode=${this.mode === "numeric" ? "numeric" : "text"}
937
937
  maxlength="1"
@@ -947,19 +947,19 @@ let $t = class extends g {
947
947
  }
948
948
  };
949
949
  St([
950
- l({ type: Number })
950
+ n({ type: Number })
951
951
  ], $t.prototype, "length", 2);
952
952
  St([
953
- l()
953
+ n()
954
954
  ], $t.prototype, "value", 2);
955
955
  St([
956
- l({ type: Boolean })
956
+ n({ type: Boolean })
957
957
  ], $t.prototype, "disabled", 2);
958
958
  St([
959
- l()
959
+ n()
960
960
  ], $t.prototype, "mode", 2);
961
961
  St([
962
- l()
962
+ n()
963
963
  ], $t.prototype, "label", 2);
964
964
  $t = St([
965
965
  b("baht-otp")
@@ -981,9 +981,9 @@ let yt = class extends g {
981
981
  );
982
982
  }
983
983
  render() {
984
- return n`<div class="baht-filter" role="group" aria-label=${this.label}>
984
+ return l`<div class="baht-filter" role="group" aria-label=${this.label}>
985
985
  ${this.options.map(
986
- (t) => n`<button
986
+ (t) => l`<button
987
987
  type="button"
988
988
  aria-pressed=${this.selected.includes(t.key)}
989
989
  ?disabled=${this.disabled}
@@ -994,19 +994,19 @@ let yt = class extends g {
994
994
  }
995
995
  };
996
996
  Tt([
997
- l({ attribute: !1 })
997
+ n({ attribute: !1 })
998
998
  ], yt.prototype, "options", 2);
999
999
  Tt([
1000
- l({ attribute: !1 })
1000
+ n({ attribute: !1 })
1001
1001
  ], yt.prototype, "selected", 2);
1002
1002
  Tt([
1003
- l({ type: Boolean })
1003
+ n({ type: Boolean })
1004
1004
  ], yt.prototype, "multiple", 2);
1005
1005
  Tt([
1006
- l({ type: Boolean })
1006
+ n({ type: Boolean })
1007
1007
  ], yt.prototype, "disabled", 2);
1008
1008
  Tt([
1009
- l()
1009
+ n()
1010
1010
  ], yt.prototype, "label", 2);
1011
1011
  yt = Tt([
1012
1012
  b("baht-filter")
@@ -1022,7 +1022,7 @@ let Kt = class extends g {
1022
1022
  }
1023
1023
  render() {
1024
1024
  const t = this.height || (this.variant === "text" ? "1em" : "20px"), e = this.variant === "rect" ? "" : ` baht-skeleton--${this.variant}`;
1025
- return n`<span
1025
+ return l`<span
1026
1026
  class="baht-skeleton${e}"
1027
1027
  style="width:${this.width}; height:${t};"
1028
1028
  aria-hidden="true"
@@ -1030,18 +1030,18 @@ let Kt = class extends g {
1030
1030
  }
1031
1031
  };
1032
1032
  pe([
1033
- l()
1033
+ n()
1034
1034
  ], Kt.prototype, "variant", 2);
1035
1035
  pe([
1036
- l()
1036
+ n()
1037
1037
  ], Kt.prototype, "width", 2);
1038
1038
  pe([
1039
- l()
1039
+ n()
1040
1040
  ], Kt.prototype, "height", 2);
1041
1041
  Kt = pe([
1042
1042
  b("baht-skeleton")
1043
1043
  ], Kt);
1044
- var Ks = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, Yt = (t, e, i, a) => {
1044
+ var Ks = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, Xt = (t, e, i, a) => {
1045
1045
  for (var s = a > 1 ? void 0 : a ? Us(e, i) : e, r = t.length - 1, o; r >= 0; r--)
1046
1046
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
1047
1047
  return a && s && Ks(e, i, s), s;
@@ -1052,7 +1052,7 @@ let Ot = class extends g {
1052
1052
  }
1053
1053
  render() {
1054
1054
  const t = this.value == null || Number.isNaN(this.value), e = t ? 0 : Math.min(100, Math.max(0, this.value)), i = this.tone === "primary" ? "" : ` baht-progress--${this.tone}`;
1055
- return n`<div>
1055
+ return l`<div>
1056
1056
  <div
1057
1057
  class="baht-progress${i}${t ? " baht-progress--indeterminate" : ""}"
1058
1058
  role="progressbar"
@@ -1063,23 +1063,23 @@ let Ot = class extends g {
1063
1063
  >
1064
1064
  <div class="baht-progress-bar" style=${t ? h : `width:${e}%`}></div>
1065
1065
  </div>
1066
- ${this.showLabel && !t ? n`<div class="baht-progress-label">${e}%</div>` : h}
1066
+ ${this.showLabel && !t ? l`<div class="baht-progress-label">${e}%</div>` : h}
1067
1067
  </div>`;
1068
1068
  }
1069
1069
  };
1070
- Yt([
1071
- l({ type: Number })
1070
+ Xt([
1071
+ n({ type: Number })
1072
1072
  ], Ot.prototype, "value", 2);
1073
- Yt([
1074
- l()
1073
+ Xt([
1074
+ n()
1075
1075
  ], Ot.prototype, "tone", 2);
1076
- Yt([
1077
- l({ type: Boolean, attribute: "show-label" })
1076
+ Xt([
1077
+ n({ type: Boolean, attribute: "show-label" })
1078
1078
  ], Ot.prototype, "showLabel", 2);
1079
- Yt([
1080
- l()
1079
+ Xt([
1080
+ n()
1081
1081
  ], Ot.prototype, "label", 2);
1082
- Ot = Yt([
1082
+ Ot = Xt([
1083
1083
  b("baht-progress")
1084
1084
  ], Ot);
1085
1085
  var Hs = Object.defineProperty, Gs = Object.getOwnPropertyDescriptor, je = (t, e, i, a) => {
@@ -1093,19 +1093,19 @@ let re = class extends g {
1093
1093
  }
1094
1094
  render() {
1095
1095
  const t = this.size === "md" ? "" : ` baht-spinner--${this.size}`;
1096
- return n`<span class="baht-spinner${t}" role="status" aria-label=${this.label}></span>`;
1096
+ return l`<span class="baht-spinner${t}" role="status" aria-label=${this.label}></span>`;
1097
1097
  }
1098
1098
  };
1099
1099
  je([
1100
- l()
1100
+ n()
1101
1101
  ], re.prototype, "size", 2);
1102
1102
  je([
1103
- l()
1103
+ n()
1104
1104
  ], re.prototype, "label", 2);
1105
1105
  re = je([
1106
1106
  b("baht-spinner")
1107
1107
  ], re);
1108
- var Ws = Object.defineProperty, Js = Object.getOwnPropertyDescriptor, Xt = (t, e, i, a) => {
1108
+ var Ws = Object.defineProperty, Js = Object.getOwnPropertyDescriptor, Yt = (t, e, i, a) => {
1109
1109
  for (var s = a > 1 ? void 0 : a ? Js(e, i) : e, r = t.length - 1, o; r >= 0; r--)
1110
1110
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
1111
1111
  return a && s && Ws(e, i, s), s;
@@ -1118,32 +1118,32 @@ let Ct = class extends g {
1118
1118
  he(this, this.bodyEl);
1119
1119
  }
1120
1120
  render() {
1121
- return n`<div class="baht-card${this.hero ? " baht-card--hero" : ""}">
1122
- ${this.heading ? n`<div class="baht-card-title">${this.heading}</div>` : h}
1123
- ${this.subtitle ? n`<div class="baht-card-subtitle">${this.subtitle}</div>` : h}
1121
+ return l`<div class="baht-card${this.hero ? " baht-card--hero" : ""}">
1122
+ ${this.heading ? l`<div class="baht-card-title">${this.heading}</div>` : h}
1123
+ ${this.subtitle ? l`<div class="baht-card-subtitle">${this.subtitle}</div>` : h}
1124
1124
  <div class="baht-card-body"></div>
1125
1125
  </div>`;
1126
1126
  }
1127
1127
  };
1128
- Xt([
1129
- l()
1128
+ Yt([
1129
+ n()
1130
1130
  ], Ct.prototype, "heading", 2);
1131
- Xt([
1132
- l()
1131
+ Yt([
1132
+ n()
1133
1133
  ], Ct.prototype, "subtitle", 2);
1134
- Xt([
1135
- l({ type: Boolean })
1134
+ Yt([
1135
+ n({ type: Boolean })
1136
1136
  ], Ct.prototype, "hero", 2);
1137
- Xt([
1138
- It(".baht-card-body")
1137
+ Yt([
1138
+ Mt(".baht-card-body")
1139
1139
  ], Ct.prototype, "bodyEl", 2);
1140
- Ct = Xt([
1140
+ Ct = Yt([
1141
1141
  b("baht-card")
1142
1142
  ], Ct);
1143
- var Ys = Object.defineProperty, Xs = Object.getOwnPropertyDescriptor, de = (t, e, i, a) => {
1144
- for (var s = a > 1 ? void 0 : a ? Xs(e, i) : e, r = t.length - 1, o; r >= 0; r--)
1143
+ var Xs = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, de = (t, e, i, a) => {
1144
+ for (var s = a > 1 ? void 0 : a ? Ys(e, i) : e, r = t.length - 1, o; r >= 0; r--)
1145
1145
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
1146
- return a && s && Ys(e, i, s), s;
1146
+ return a && s && Xs(e, i, s), s;
1147
1147
  };
1148
1148
  let Ut = class extends g {
1149
1149
  constructor() {
@@ -1153,20 +1153,20 @@ let Ut = class extends g {
1153
1153
  he(this, this.bodyEl);
1154
1154
  }
1155
1155
  render() {
1156
- return n`<fieldset class="baht-fieldset" ?disabled=${this.disabled}>
1157
- ${this.legend ? n`<legend>${this.legend}</legend>` : h}
1156
+ return l`<fieldset class="baht-fieldset" ?disabled=${this.disabled}>
1157
+ ${this.legend ? l`<legend>${this.legend}</legend>` : h}
1158
1158
  <div class="baht-fieldset-body"></div>
1159
1159
  </fieldset>`;
1160
1160
  }
1161
1161
  };
1162
1162
  de([
1163
- l()
1163
+ n()
1164
1164
  ], Ut.prototype, "legend", 2);
1165
1165
  de([
1166
- l({ type: Boolean })
1166
+ n({ type: Boolean })
1167
1167
  ], Ut.prototype, "disabled", 2);
1168
1168
  de([
1169
- It(".baht-fieldset-body")
1169
+ Mt(".baht-fieldset-body")
1170
1170
  ], Ut.prototype, "bodyEl", 2);
1171
1171
  Ut = de([
1172
1172
  b("baht-fieldset")
@@ -1181,19 +1181,19 @@ let De = class extends g {
1181
1181
  super(...arguments), this.items = [];
1182
1182
  }
1183
1183
  render() {
1184
- return n`<div class="baht-timeline" role="list">
1184
+ return l`<div class="baht-timeline" role="list">
1185
1185
  ${this.items.map(
1186
- (t, e) => n`<div class="baht-timeline-item" role="listitem">
1186
+ (t, e) => l`<div class="baht-timeline-item" role="listitem">
1187
1187
  <div class="baht-timeline-rail">
1188
1188
  <span class="baht-timeline-dot${t.tone && t.tone !== "primary" ? ` baht-timeline-dot--${t.tone}` : ""}"></span>
1189
- ${e < this.items.length - 1 ? n`<span class="baht-timeline-line"></span>` : h}
1189
+ ${e < this.items.length - 1 ? l`<span class="baht-timeline-line"></span>` : h}
1190
1190
  </div>
1191
1191
  <div class="baht-timeline-main">
1192
1192
  <div class="baht-timeline-title">
1193
1193
  ${t.title}
1194
- ${t.time ? n`<span class="baht-timeline-time"> · ${t.time}</span>` : h}
1194
+ ${t.time ? l`<span class="baht-timeline-time"> · ${t.time}</span>` : h}
1195
1195
  </div>
1196
- ${t.description ? n`<div class="baht-timeline-desc">${t.description}</div>` : h}
1196
+ ${t.description ? l`<div class="baht-timeline-desc">${t.description}</div>` : h}
1197
1197
  </div>
1198
1198
  </div>`
1199
1199
  )}
@@ -1201,7 +1201,7 @@ let De = class extends g {
1201
1201
  }
1202
1202
  };
1203
1203
  ls([
1204
- l({ attribute: !1 })
1204
+ n({ attribute: !1 })
1205
1205
  ], De.prototype, "items", 2);
1206
1206
  De = ls([
1207
1207
  b("baht-timeline")
@@ -1231,10 +1231,10 @@ let Dt = class extends g {
1231
1231
  );
1232
1232
  }
1233
1233
  render() {
1234
- return n`<div class="baht-accordion">
1234
+ return l`<div class="baht-accordion">
1235
1235
  ${this.items.map((t, e) => {
1236
1236
  const i = this.openSet.has(e), a = `baht-acc-${this.uid}-t-${e}`, s = `baht-acc-${this.uid}-p-${e}`;
1237
- return n`<div class="baht-accordion-item${i ? " baht-accordion-item--open" : ""}">
1237
+ return l`<div class="baht-accordion-item${i ? " baht-accordion-item--open" : ""}">
1238
1238
  <button
1239
1239
  type="button"
1240
1240
  class="baht-accordion-trigger"
@@ -1246,17 +1246,17 @@ let Dt = class extends g {
1246
1246
  <span>${t.title}</span>
1247
1247
  <span class="baht-accordion-chevron" aria-hidden="true">▾</span>
1248
1248
  </button>
1249
- ${i ? n`<div class="baht-accordion-content" id=${s} role="region" aria-labelledby=${a}>${t.content}</div>` : h}
1249
+ ${i ? l`<div class="baht-accordion-content" id=${s} role="region" aria-labelledby=${a}>${t.content}</div>` : h}
1250
1250
  </div>`;
1251
1251
  })}
1252
1252
  </div>`;
1253
1253
  }
1254
1254
  };
1255
1255
  ue([
1256
- l({ attribute: !1 })
1256
+ n({ attribute: !1 })
1257
1257
  ], Dt.prototype, "items", 2);
1258
1258
  ue([
1259
- l({ type: Boolean })
1259
+ n({ type: Boolean })
1260
1260
  ], Dt.prototype, "multiple", 2);
1261
1261
  ue([
1262
1262
  y()
@@ -1274,25 +1274,25 @@ let Ft = class extends g {
1274
1274
  super(...arguments), this.href = "", this.label = "", this.external = !1, this.externalHint = "opens in new tab";
1275
1275
  }
1276
1276
  render() {
1277
- return n`<a
1277
+ return l`<a
1278
1278
  class="baht-link"
1279
1279
  href=${this.href || h}
1280
1280
  target=${this.external ? "_blank" : h}
1281
1281
  rel=${this.external ? "noopener noreferrer" : h}
1282
- >${this.label}${this.external ? n` <span class="baht-link-external" aria-hidden="true">↗</span><span class="baht-visually-hidden"> (${this.externalHint})</span>` : h}</a>`;
1282
+ >${this.label}${this.external ? l` <span class="baht-link-external" aria-hidden="true">↗</span><span class="baht-visually-hidden"> (${this.externalHint})</span>` : h}</a>`;
1283
1283
  }
1284
1284
  };
1285
1285
  Zt([
1286
- l()
1286
+ n()
1287
1287
  ], Ft.prototype, "href", 2);
1288
1288
  Zt([
1289
- l()
1289
+ n()
1290
1290
  ], Ft.prototype, "label", 2);
1291
1291
  Zt([
1292
- l({ type: Boolean })
1292
+ n({ type: Boolean })
1293
1293
  ], Ft.prototype, "external", 2);
1294
1294
  Zt([
1295
- l({ attribute: "external-hint" })
1295
+ n({ attribute: "external-hint" })
1296
1296
  ], Ft.prototype, "externalHint", 2);
1297
1297
  Ft = Zt([
1298
1298
  b("baht-link")
@@ -1313,10 +1313,10 @@ let oe = class extends g {
1313
1313
  }
1314
1314
  render() {
1315
1315
  const t = this.items.length - 1;
1316
- return n`<nav class="baht-breadcrumbs" aria-label="Breadcrumb">
1316
+ return l`<nav class="baht-breadcrumbs" aria-label="Breadcrumb">
1317
1317
  ${this.items.map((e, i) => {
1318
- const a = i < t ? n`<span class="baht-breadcrumbs-sep" aria-hidden="true">${this.separator}</span>` : h;
1319
- return i === t ? n`<span class="baht-breadcrumbs-current" aria-current="page">${e.label}</span>${a}` : e.href ? n`<a class="baht-link" href=${e.href}>${e.label}</a>${a}` : n`<a
1318
+ const a = i < t ? l`<span class="baht-breadcrumbs-sep" aria-hidden="true">${this.separator}</span>` : h;
1319
+ return i === t ? l`<span class="baht-breadcrumbs-current" aria-current="page">${e.label}</span>${a}` : e.href ? l`<a class="baht-link" href=${e.href}>${e.label}</a>${a}` : l`<a
1320
1320
  class="baht-link"
1321
1321
  href="#"
1322
1322
  @click=${(s) => {
@@ -1328,10 +1328,10 @@ let oe = class extends g {
1328
1328
  }
1329
1329
  };
1330
1330
  Se([
1331
- l({ attribute: !1 })
1331
+ n({ attribute: !1 })
1332
1332
  ], oe.prototype, "items", 2);
1333
1333
  Se([
1334
- l()
1334
+ n()
1335
1335
  ], oe.prototype, "separator", 2);
1336
1336
  oe = Se([
1337
1337
  b("baht-breadcrumbs")
@@ -1341,16 +1341,16 @@ var oa = Object.getOwnPropertyDescriptor, la = (t, e, i, a) => {
1341
1341
  (o = t[r]) && (s = o(s) || s);
1342
1342
  return s;
1343
1343
  };
1344
- let Ne = class extends Y {
1344
+ let Ne = class extends X {
1345
1345
  renderControl() {
1346
- return n`<input
1346
+ return l`<input
1347
1347
  class="baht-control baht-control--text"
1348
1348
  id=${this.controlId}
1349
1349
  type=${this.field.type === "email" ? "email" : this.field.type === "password" ? "password" : "text"}
1350
1350
  .value=${lt(this.shownValue == null ? "" : String(this.shownValue))}
1351
- placeholder=${N(this.field.placeholder)}
1352
- maxlength=${N(this.field.max_length)}
1353
- autocomplete=${N(this.field.autocomplete)}
1351
+ placeholder=${q(this.field.placeholder)}
1352
+ maxlength=${q(this.field.max_length)}
1353
+ autocomplete=${q(this.field.autocomplete)}
1354
1354
  ?disabled=${this.disabled}
1355
1355
  ?readonly=${this.readonly}
1356
1356
  ?required=${this.required}
@@ -1368,16 +1368,16 @@ var na = Object.getOwnPropertyDescriptor, ha = (t, e, i, a) => {
1368
1368
  (o = t[r]) && (s = o(s) || s);
1369
1369
  return s;
1370
1370
  };
1371
- let qe = class extends Y {
1371
+ let qe = class extends X {
1372
1372
  renderControl() {
1373
- return n`<textarea
1373
+ return l`<textarea
1374
1374
  class="baht-control baht-control--textarea"
1375
1375
  id=${this.controlId}
1376
1376
  .value=${lt(this.shownValue == null ? "" : String(this.shownValue))}
1377
- placeholder=${N(this.field.placeholder)}
1378
- maxlength=${N(this.field.max_length)}
1377
+ placeholder=${q(this.field.placeholder)}
1378
+ maxlength=${q(this.field.max_length)}
1379
1379
  rows=${this.field.rows ?? 3}
1380
- autocomplete=${N(this.field.autocomplete)}
1380
+ autocomplete=${q(this.field.autocomplete)}
1381
1381
  ?disabled=${this.disabled}
1382
1382
  ?readonly=${this.readonly}
1383
1383
  ?required=${this.required}
@@ -1395,17 +1395,17 @@ var ca = Object.getOwnPropertyDescriptor, pa = (t, e, i, a) => {
1395
1395
  (o = t[r]) && (s = o(s) || s);
1396
1396
  return s;
1397
1397
  };
1398
- let Re = class extends Y {
1398
+ let Re = class extends X {
1399
1399
  renderControl() {
1400
- return n`<input
1400
+ return l`<input
1401
1401
  class="baht-control baht-control--number"
1402
1402
  id=${this.controlId}
1403
1403
  type="number"
1404
1404
  .value=${lt(this.shownValue == null ? "" : String(this.shownValue))}
1405
- placeholder=${N(this.field.placeholder)}
1406
- min=${N(this.field.min)}
1407
- max=${N(this.field.max)}
1408
- step=${N(this.field.step)}
1405
+ placeholder=${q(this.field.placeholder)}
1406
+ min=${q(this.field.min)}
1407
+ max=${q(this.field.max)}
1408
+ step=${q(this.field.step)}
1409
1409
  ?disabled=${this.disabled}
1410
1410
  ?readonly=${this.readonly}
1411
1411
  ?required=${this.required}
@@ -1427,14 +1427,14 @@ var da = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, Te = (t, e
1427
1427
  return a && s && da(e, i, s), s;
1428
1428
  };
1429
1429
  const ba = 500;
1430
- let le = class extends Y {
1430
+ let le = class extends X {
1431
1431
  constructor() {
1432
1432
  super(...arguments), this.open = !1, this.active = 0, this.typeBuffer = "", this.onDocMousedown = (t) => {
1433
1433
  this.contains(t.target) || this.close();
1434
1434
  };
1435
1435
  }
1436
1436
  disconnectedCallback() {
1437
- super.disconnectedCallback(), clearTimeout(this.typeTimer), S() && document.removeEventListener("mousedown", this.onDocMousedown);
1437
+ super.disconnectedCallback(), clearTimeout(this.typeTimer), T() && document.removeEventListener("mousedown", this.onDocMousedown);
1438
1438
  }
1439
1439
  get listId() {
1440
1440
  return `${this.controlId}-list`;
@@ -1469,10 +1469,10 @@ let le = class extends Y {
1469
1469
  (e = t == null ? void 0 : t.scrollIntoView) == null || e.call(t, { block: "nearest" });
1470
1470
  }
1471
1471
  openList() {
1472
- !this.interactive || this.open || (this.active = this.selectedIndex, this.open = !0, S() && document.addEventListener("mousedown", this.onDocMousedown));
1472
+ !this.interactive || this.open || (this.active = this.selectedIndex, this.open = !0, T() && document.addEventListener("mousedown", this.onDocMousedown));
1473
1473
  }
1474
1474
  close() {
1475
- this.open && (this.open = !1, S() && document.removeEventListener("mousedown", this.onDocMousedown));
1475
+ this.open && (this.open = !1, T() && document.removeEventListener("mousedown", this.onDocMousedown));
1476
1476
  }
1477
1477
  toggle() {
1478
1478
  this.open ? this.close() : this.openList();
@@ -1536,7 +1536,7 @@ let le = class extends Y {
1536
1536
  }
1537
1537
  renderControl() {
1538
1538
  const t = this.rows, e = this.selectedIndex, i = e === 0;
1539
- return n`<div class="baht-select${this.open ? " baht-select--open" : ""}">
1539
+ return l`<div class="baht-select${this.open ? " baht-select--open" : ""}">
1540
1540
  <button
1541
1541
  type="button"
1542
1542
  class="baht-control baht-control--select baht-select-trigger${i ? " baht-select-trigger--placeholder" : ""}"
@@ -1567,7 +1567,7 @@ let le = class extends Y {
1567
1567
  >
1568
1568
  ${t.map(
1569
1569
  // eslint-disable-next-line lit-a11y/click-events-have-key-events -- keyboard lives on the combobox (aria-activedescendant pattern); options are never focused
1570
- (a, s) => n`<div
1570
+ (a, s) => l`<div
1571
1571
  class="baht-listbox-option${s === this.active ? " baht-listbox-option--active" : ""}${s === 0 ? " baht-listbox-option--placeholder" : ""}"
1572
1572
  id=${this.optionId(s)}
1573
1573
  role="option"
@@ -1598,7 +1598,7 @@ var fa = Object.getOwnPropertyDescriptor, ma = (t, e, i, a) => {
1598
1598
  (o = t[r]) && (s = o(s) || s);
1599
1599
  return s;
1600
1600
  };
1601
- let ze = class extends Y {
1601
+ let ze = class extends X {
1602
1602
  get selected() {
1603
1603
  return Array.isArray(this.value) ? this.value : [];
1604
1604
  }
@@ -1607,14 +1607,14 @@ let ze = class extends Y {
1607
1607
  this.emitInput(a.filter((s) => i.includes(s)));
1608
1608
  }
1609
1609
  renderControl() {
1610
- return n`<div
1610
+ return l`<div
1611
1611
  class="baht-control baht-control--multiselect"
1612
1612
  role="group"
1613
1613
  aria-labelledby=${this.field.label ? this.labelId : h}
1614
1614
  aria-describedby=${this.describedBy}
1615
1615
  >
1616
1616
  ${(this.field.options ?? []).map(
1617
- (t) => n`<label class="baht-option">
1617
+ (t) => l`<label class="baht-option">
1618
1618
  <input
1619
1619
  type="checkbox"
1620
1620
  value=${t.key}
@@ -1636,13 +1636,13 @@ var va = Object.getOwnPropertyDescriptor, $a = (t, e, i, a) => {
1636
1636
  (o = t[r]) && (s = o(s) || s);
1637
1637
  return s;
1638
1638
  };
1639
- let Ve = class extends Y {
1639
+ let Ve = class extends X {
1640
1640
  /** Label sits beside the box, so suppress the block label. */
1641
1641
  renderLabel() {
1642
1642
  return h;
1643
1643
  }
1644
1644
  renderControl() {
1645
- return n`<label class="baht-control baht-control--checkbox baht-option">
1645
+ return l`<label class="baht-control baht-control--checkbox baht-option">
1646
1646
  <input
1647
1647
  type="checkbox"
1648
1648
  id=${this.controlId}
@@ -1654,7 +1654,7 @@ let Ve = class extends Y {
1654
1654
  @change=${(t) => this.emitInput(t.target.checked)}
1655
1655
  />
1656
1656
  <span class="baht-label"
1657
- >${this.field.label}${this.required ? n`<span class="baht-required-mark" aria-hidden="true">*</span>` : h}</span
1657
+ >${this.field.label}${this.required ? l`<span class="baht-required-mark" aria-hidden="true">*</span>` : h}</span
1658
1658
  >
1659
1659
  </label>`;
1660
1660
  }
@@ -1667,9 +1667,9 @@ var ya = Object.getOwnPropertyDescriptor, ga = (t, e, i, a) => {
1667
1667
  (o = t[r]) && (s = o(s) || s);
1668
1668
  return s;
1669
1669
  };
1670
- let Ke = class extends Y {
1670
+ let Ke = class extends X {
1671
1671
  renderControl() {
1672
- return n`<div
1672
+ return l`<div
1673
1673
  class="baht-control baht-control--radio"
1674
1674
  role="radiogroup"
1675
1675
  aria-labelledby=${this.field.label ? this.labelId : h}
@@ -1678,7 +1678,7 @@ let Ke = class extends Y {
1678
1678
  aria-describedby=${this.describedBy}
1679
1679
  >
1680
1680
  ${(this.field.options ?? []).map(
1681
- (t) => n`<label class="baht-option">
1681
+ (t) => l`<label class="baht-option">
1682
1682
  <input
1683
1683
  type="radio"
1684
1684
  name=${this.controlId}
@@ -1701,12 +1701,12 @@ var wa = Object.getOwnPropertyDescriptor, xa = (t, e, i, a) => {
1701
1701
  (o = t[r]) && (s = o(s) || s);
1702
1702
  return s;
1703
1703
  };
1704
- let Ue = class extends Y {
1704
+ let Ue = class extends X {
1705
1705
  renderLabel() {
1706
1706
  return h;
1707
1707
  }
1708
1708
  renderControl() {
1709
- return n`<label class="baht-control baht-control--toggle baht-option">
1709
+ return l`<label class="baht-control baht-control--toggle baht-option">
1710
1710
  <input
1711
1711
  type="checkbox"
1712
1712
  role="switch"
@@ -1721,7 +1721,7 @@ let Ue = class extends Y {
1721
1721
  />
1722
1722
  <span class="baht-toggle-track"><span class="baht-toggle-thumb"></span></span>
1723
1723
  <span class="baht-label"
1724
- >${this.field.label}${this.required ? n`<span class="baht-required-mark" aria-hidden="true">*</span>` : h}</span
1724
+ >${this.field.label}${this.required ? l`<span class="baht-required-mark" aria-hidden="true">*</span>` : h}</span
1725
1725
  >
1726
1726
  </label>`;
1727
1727
  }
@@ -1734,17 +1734,17 @@ var _a = Object.getOwnPropertyDescriptor, ka = (t, e, i, a) => {
1734
1734
  (o = t[r]) && (s = o(s) || s);
1735
1735
  return s;
1736
1736
  };
1737
- let He = class extends Y {
1737
+ let He = class extends X {
1738
1738
  constructor() {
1739
1739
  super(...arguments), this.lastEmitted = null;
1740
1740
  }
1741
1741
  renderControl() {
1742
- return n`<input
1742
+ return l`<input
1743
1743
  class="baht-control baht-control--date"
1744
1744
  id=${this.controlId}
1745
1745
  type="text"
1746
1746
  autocomplete="off"
1747
- placeholder=${N(this.field.placeholder)}
1747
+ placeholder=${q(this.field.placeholder)}
1748
1748
  ?disabled=${this.disabled}
1749
1749
  ?readonly=${this.readonly}
1750
1750
  ?required=${this.required}
@@ -1901,18 +1901,18 @@ var Pa = Object.defineProperty, Oa = Object.getOwnPropertyDescriptor, Qt = (t, e
1901
1901
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
1902
1902
  return a && s && Pa(e, i, s), s;
1903
1903
  };
1904
- function Ye(t) {
1904
+ function Xe(t) {
1905
1905
  return t !== null && typeof t == "object" && typeof t.url == "string";
1906
1906
  }
1907
1907
  function ge(t) {
1908
1908
  return t >= 1024 * 1024 ? `${(t / 1024 / 1024).toFixed(1)} MB` : t >= 1024 ? `${Math.round(t / 1024)} KB` : `${t} B`;
1909
1909
  }
1910
- let Et = class extends Y {
1910
+ let Et = class extends X {
1911
1911
  constructor() {
1912
1912
  super(...arguments), this.uploadingCount = 0, this.uploadError = null, this.rejectedNames = [];
1913
1913
  }
1914
1914
  get refs() {
1915
- return Array.isArray(this.value) ? this.value.filter(Ye) : Ye(this.value) ? [this.value] : [];
1915
+ return Array.isArray(this.value) ? this.value.filter(Xe) : Xe(this.value) ? [this.value] : [];
1916
1916
  }
1917
1917
  emitRefs(t) {
1918
1918
  this.emitInput(this.field.multiple ? t : t[0] ?? null);
@@ -1958,7 +1958,7 @@ let Et = class extends Y {
1958
1958
  t ? "baht-dropzone--disabled" : "",
1959
1959
  this.invalid === "true" ? "baht-dropzone--invalid" : ""
1960
1960
  ].filter(Boolean).join(" ");
1961
- return n`<div
1961
+ return l`<div
1962
1962
  class=${i}
1963
1963
  @dragover=${(a) => {
1964
1964
  t || (a.preventDefault(), a.currentTarget.classList.add("baht-dropzone--over"));
@@ -1973,7 +1973,7 @@ let Et = class extends Y {
1973
1973
  class="baht-control baht-control--file baht-dropzone-input"
1974
1974
  id=${this.controlId}
1975
1975
  type="file"
1976
- accept=${N(this.field.accept)}
1976
+ accept=${q(this.field.accept)}
1977
1977
  ?multiple=${this.field.multiple}
1978
1978
  ?disabled=${t}
1979
1979
  ?required=${this.required}
@@ -1988,26 +1988,26 @@ let Et = class extends Y {
1988
1988
  >
1989
1989
  <span class="baht-dropzone-or">${m("orDropHere")}</span>
1990
1990
  </span>
1991
- ${e ? n`<span class="baht-dropzone-hint">${e}</span>` : h}
1991
+ ${e ? l`<span class="baht-dropzone-hint">${e}</span>` : h}
1992
1992
  </div>
1993
- ${this.uploadingCount > 0 ? n`<p class="baht-file-status" role="status">${m("uploading")}</p>` : h}
1994
- ${this.uploadError ? n`<p class="baht-error" role="alert">${this.uploadError}</p>` : h}
1995
- ${this.rejectedNames.length > 0 ? n`<p class="baht-error baht-file-rejected" role="alert">
1993
+ ${this.uploadingCount > 0 ? l`<p class="baht-file-status" role="status">${m("uploading")}</p>` : h}
1994
+ ${this.uploadError ? l`<p class="baht-error" role="alert">${this.uploadError}</p>` : h}
1995
+ ${this.rejectedNames.length > 0 ? l`<p class="baht-error baht-file-rejected" role="alert">
1996
1996
  ${m("fileRejectedTooLarge", { names: this.rejectedNames.join(", ") })}
1997
1997
  </p>` : h}
1998
1998
  ${this.captured.map(
1999
- (a) => n`<span class="baht-file-chip">
1999
+ (a) => l`<span class="baht-file-chip">
2000
2000
  <span class="baht-file-name">${a.name}</span>
2001
2001
  <span class="baht-file-size">${ge(a.size)}</span>
2002
2002
  </span>`
2003
2003
  )}
2004
2004
  ${this.refs.map(
2005
- (a) => n`<span class="baht-file-chip">
2005
+ (a) => l`<span class="baht-file-chip">
2006
2006
  <a href=${a.url} target="_blank" rel="noreferrer"
2007
2007
  >${a.name}<span class="baht-visually-hidden"> (${m("opensInNewTab")})</span></a
2008
2008
  >
2009
2009
  <span class="baht-file-size">${ge(a.size)}</span>
2010
- ${this.disabled || this.readonly ? h : n`<button
2010
+ ${this.disabled || this.readonly ? h : l`<button
2011
2011
  type="button"
2012
2012
  class="baht-file-remove"
2013
2013
  aria-label=${m("removeFile")}
@@ -2021,7 +2021,7 @@ let Et = class extends Y {
2021
2021
  }
2022
2022
  };
2023
2023
  Qt([
2024
- l({ attribute: !1 })
2024
+ n({ attribute: !1 })
2025
2025
  ], Et.prototype, "uploader", 2);
2026
2026
  Qt([
2027
2027
  y()
@@ -2035,7 +2035,7 @@ Qt([
2035
2035
  Et = Qt([
2036
2036
  b("baht-file")
2037
2037
  ], Et);
2038
- var Ca = Object.defineProperty, Da = Object.getOwnPropertyDescriptor, I = (t, e, i, a) => {
2038
+ var Ca = Object.defineProperty, Da = Object.getOwnPropertyDescriptor, M = (t, e, i, a) => {
2039
2039
  for (var s = a > 1 ? void 0 : a ? Da(e, i) : e, r = t.length - 1, o; r >= 0; r--)
2040
2040
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
2041
2041
  return a && s && Ca(e, i, s), s;
@@ -2180,9 +2180,9 @@ let F = class extends g {
2180
2180
  this.disabled ? "baht-dropzone--disabled" : "",
2181
2181
  e ? "baht-dropzone--invalid" : ""
2182
2182
  ].filter(Boolean).join(" ");
2183
- return n`<div class="baht-field baht-field--upload">
2184
- ${this.label ? n`<label class="baht-label" for=${this.inputId}
2185
- >${this.label}${this.required ? n`<span class="baht-required-mark" aria-hidden="true">*</span>` : h}</label
2183
+ return l`<div class="baht-field baht-field--upload">
2184
+ ${this.label ? l`<label class="baht-label" for=${this.inputId}
2185
+ >${this.label}${this.required ? l`<span class="baht-required-mark" aria-hidden="true">*</span>` : h}</label
2186
2186
  >` : h}
2187
2187
  <div
2188
2188
  class=${o}
@@ -2194,12 +2194,12 @@ let F = class extends g {
2194
2194
  class="baht-dropzone-input"
2195
2195
  id=${this.inputId}
2196
2196
  type="file"
2197
- accept=${N(this.accept)}
2197
+ accept=${q(this.accept)}
2198
2198
  ?multiple=${this.multiple}
2199
2199
  ?disabled=${this.disabled}
2200
2200
  ?required=${this.required}
2201
2201
  aria-invalid=${e ? "true" : "false"}
2202
- aria-describedby=${N(r)}
2202
+ aria-describedby=${q(r)}
2203
2203
  @change=${(c) => this.onPick(c)}
2204
2204
  />
2205
2205
  <span class="baht-dropzone-icon" aria-hidden="true">${W("upload")}</span>
@@ -2209,28 +2209,28 @@ let F = class extends g {
2209
2209
  >
2210
2210
  <span class="baht-dropzone-or">${m("orDropHere")}</span>
2211
2211
  </span>
2212
- ${i ? n`<span class="baht-dropzone-hint" id=${N(a)}>${i}</span>` : h}
2212
+ ${i ? l`<span class="baht-dropzone-hint" id=${q(a)}>${i}</span>` : h}
2213
2213
  </div>
2214
2214
 
2215
- ${this.pending.length > 0 || this.urls.length > 0 ? n`<ul class="baht-upload-list" aria-live="polite" aria-busy=${t ? "true" : "false"}>
2215
+ ${this.pending.length > 0 || this.urls.length > 0 ? l`<ul class="baht-upload-list" aria-live="polite" aria-busy=${t ? "true" : "false"}>
2216
2216
  ${this.urls.map((c) => this.renderStored(c))}
2217
2217
  ${this.pending.map((c) => this.renderPending(c))}
2218
2218
  </ul>` : h}
2219
- ${this.rejectedNames.length > 0 ? n`<p class="baht-error" role="alert">
2219
+ ${this.rejectedNames.length > 0 ? l`<p class="baht-error" role="alert">
2220
2220
  ${m("fileRejectedTooLarge", { names: this.rejectedNames.join(", ") })}
2221
2221
  </p>` : h}
2222
- ${this.error ? n`<p class="baht-error" id=${N(s)} role="alert">${this.error}</p>` : h}
2222
+ ${this.error ? l`<p class="baht-error" id=${q(s)} role="alert">${this.error}</p>` : h}
2223
2223
  </div>`;
2224
2224
  }
2225
2225
  renderStored(t) {
2226
2226
  const e = this.fileFor(t);
2227
- return n`<li class="baht-file-chip baht-file-chip--done">
2227
+ return l`<li class="baht-file-chip baht-file-chip--done">
2228
2228
  <span class="baht-file-chip-icon" aria-hidden="true">${W("check")}</span>
2229
2229
  <a class="baht-file-name" href=${t} target="_blank" rel="noreferrer"
2230
2230
  >${e.name}<span class="baht-visually-hidden"> (${m("opensInNewTab")})</span></a
2231
2231
  >
2232
- ${e.size > 0 ? n`<span class="baht-file-size">${we(e.size)}</span>` : h}
2233
- ${this.disabled ? h : n`<button
2232
+ ${e.size > 0 ? l`<span class="baht-file-size">${we(e.size)}</span>` : h}
2233
+ ${this.disabled ? h : l`<button
2234
2234
  type="button"
2235
2235
  class="baht-file-remove"
2236
2236
  aria-label=${m("removeFile")}
@@ -2242,10 +2242,10 @@ let F = class extends g {
2242
2242
  </li>`;
2243
2243
  }
2244
2244
  renderPending(t) {
2245
- return n`<li class="baht-file-chip ${t.error ? "baht-file-chip--error" : "baht-file-chip--busy"}">
2245
+ return l`<li class="baht-file-chip ${t.error ? "baht-file-chip--error" : "baht-file-chip--busy"}">
2246
2246
  <span class="baht-file-name">${t.file.name}</span>
2247
2247
  <span class="baht-file-size">${we(t.file.size)}</span>
2248
- ${t.error ? n`<span class="baht-file-status baht-file-status--error" role="alert">${t.error}</span>
2248
+ ${t.error ? l`<span class="baht-file-status baht-file-status--error" role="alert">${t.error}</span>
2249
2249
  <button type="button" class="baht-upload-retry" @click=${() => this.retry(t)}>
2250
2250
  ${m("retry")}
2251
2251
  </button>
@@ -2257,7 +2257,7 @@ let F = class extends g {
2257
2257
  @click=${() => this.dismiss(t)}
2258
2258
  >
2259
2259
  ${W("close")}
2260
- </button>` : n`<span
2260
+ </button>` : l`<span
2261
2261
  class="baht-upload-bar"
2262
2262
  role="progressbar"
2263
2263
  aria-label=${m("uploading")}
@@ -2269,77 +2269,77 @@ let F = class extends g {
2269
2269
  </li>`;
2270
2270
  }
2271
2271
  };
2272
- I([
2273
- l()
2272
+ M([
2273
+ n()
2274
2274
  ], F.prototype, "url", 2);
2275
- I([
2276
- l()
2275
+ M([
2276
+ n()
2277
2277
  ], F.prototype, "method", 2);
2278
- I([
2279
- l({ attribute: "field-name" })
2278
+ M([
2279
+ n({ attribute: "field-name" })
2280
2280
  ], F.prototype, "fieldName", 2);
2281
- I([
2282
- l({ attribute: "response-key" })
2281
+ M([
2282
+ n({ attribute: "response-key" })
2283
2283
  ], F.prototype, "responseKey", 2);
2284
- I([
2285
- l({ attribute: !1 })
2284
+ M([
2285
+ n({ attribute: !1 })
2286
2286
  ], F.prototype, "headers", 2);
2287
- I([
2288
- l({ type: Boolean, attribute: "with-credentials" })
2287
+ M([
2288
+ n({ type: Boolean, attribute: "with-credentials" })
2289
2289
  ], F.prototype, "withCredentials", 2);
2290
- I([
2291
- l({ attribute: !1 })
2290
+ M([
2291
+ n({ attribute: !1 })
2292
2292
  ], F.prototype, "value", 2);
2293
- I([
2294
- l()
2293
+ M([
2294
+ n()
2295
2295
  ], F.prototype, "label", 2);
2296
- I([
2297
- l()
2296
+ M([
2297
+ n()
2298
2298
  ], F.prototype, "hint", 2);
2299
- I([
2300
- l()
2299
+ M([
2300
+ n()
2301
2301
  ], F.prototype, "accept", 2);
2302
- I([
2303
- l({ type: Boolean })
2302
+ M([
2303
+ n({ type: Boolean })
2304
2304
  ], F.prototype, "multiple", 2);
2305
- I([
2306
- l({ type: Number, attribute: "max-size" })
2305
+ M([
2306
+ n({ type: Number, attribute: "max-size" })
2307
2307
  ], F.prototype, "maxSize", 2);
2308
- I([
2309
- l({ type: Boolean })
2308
+ M([
2309
+ n({ type: Boolean })
2310
2310
  ], F.prototype, "disabled", 2);
2311
- I([
2312
- l({ type: Boolean })
2311
+ M([
2312
+ n({ type: Boolean })
2313
2313
  ], F.prototype, "required", 2);
2314
- I([
2315
- l()
2314
+ M([
2315
+ n()
2316
2316
  ], F.prototype, "error", 2);
2317
- I([
2317
+ M([
2318
2318
  y()
2319
2319
  ], F.prototype, "pending", 2);
2320
- I([
2320
+ M([
2321
2321
  y()
2322
2322
  ], F.prototype, "rejectedNames", 2);
2323
- I([
2323
+ M([
2324
2324
  y()
2325
2325
  ], F.prototype, "dragging", 2);
2326
- F = I([
2326
+ F = M([
2327
2327
  b("baht-upload")
2328
2328
  ], F);
2329
- var Ia = Object.defineProperty, Ma = Object.getOwnPropertyDescriptor, ns = (t, e, i, a) => {
2330
- for (var s = a > 1 ? void 0 : a ? Ma(e, i) : e, r = t.length - 1, o; r >= 0; r--)
2329
+ var Ma = Object.defineProperty, Ia = Object.getOwnPropertyDescriptor, ns = (t, e, i, a) => {
2330
+ for (var s = a > 1 ? void 0 : a ? Ia(e, i) : e, r = t.length - 1, o; r >= 0; r--)
2331
2331
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
2332
- return a && s && Ia(e, i, s), s;
2332
+ return a && s && Ma(e, i, s), s;
2333
2333
  };
2334
2334
  let Fe = class extends g {
2335
2335
  render() {
2336
2336
  if (!this.field) return h;
2337
2337
  const t = this.field.variant ?? "body";
2338
- return n`<div class="baht-text baht-text--${t}">${this.field.text ?? this.field.label ?? ""}</div>`;
2338
+ return l`<div class="baht-text baht-text--${t}">${this.field.text ?? this.field.label ?? ""}</div>`;
2339
2339
  }
2340
2340
  };
2341
2341
  ns([
2342
- l({ attribute: !1 })
2342
+ n({ attribute: !1 })
2343
2343
  ], Fe.prototype, "field", 2);
2344
2344
  Fe = ns([
2345
2345
  b("baht-text")
@@ -2351,13 +2351,13 @@ var ja = Object.defineProperty, Sa = Object.getOwnPropertyDescriptor, hs = (t, e
2351
2351
  };
2352
2352
  let Ee = class extends g {
2353
2353
  render() {
2354
- return this.field ? n`<div class="baht-section">
2354
+ return this.field ? l`<div class="baht-section">
2355
2355
  <span class="baht-section-label">${this.field.text ?? this.field.label ?? ""}</span>
2356
2356
  </div>` : h;
2357
2357
  }
2358
2358
  };
2359
2359
  hs([
2360
- l({ attribute: !1 })
2360
+ n({ attribute: !1 })
2361
2361
  ], Ee.prototype, "field", 2);
2362
2362
  Ee = hs([
2363
2363
  b("baht-section")
@@ -2372,23 +2372,23 @@ let Ht = class extends g {
2372
2372
  super(...arguments), this.total = 0, this.label = "", this.color = "";
2373
2373
  }
2374
2374
  render() {
2375
- return n`<div class="baht-stat-chart">
2375
+ return l`<div class="baht-stat-chart">
2376
2376
  <div
2377
2377
  class="baht-stat-chart-total"
2378
2378
  style=${this.color ? `color:${this.color}` : h}
2379
2379
  >${this.total.toLocaleString("en-US")}</div>
2380
- ${this.label ? n`<div class="baht-stat-chart-label">${this.label}</div>` : h}
2380
+ ${this.label ? l`<div class="baht-stat-chart-label">${this.label}</div>` : h}
2381
2381
  </div>`;
2382
2382
  }
2383
2383
  };
2384
2384
  be([
2385
- l({ type: Number })
2385
+ n({ type: Number })
2386
2386
  ], Ht.prototype, "total", 2);
2387
2387
  be([
2388
- l()
2388
+ n()
2389
2389
  ], Ht.prototype, "label", 2);
2390
2390
  be([
2391
- l()
2391
+ n()
2392
2392
  ], Ht.prototype, "color", 2);
2393
2393
  Ht = be([
2394
2394
  b("baht-stat-chart")
@@ -2402,7 +2402,7 @@ const Na = 10;
2402
2402
  function ft(t, e) {
2403
2403
  return e && t === 0 ? e : `var(--baht-chart-${t % Na + 1})`;
2404
2404
  }
2405
- function Xe(t, e = 5) {
2405
+ function Ye(t, e = 5) {
2406
2406
  return `var(--baht-chart-seq-${Math.min(e - 1, Math.max(0, t)) + 1})`;
2407
2407
  }
2408
2408
  function Rt(t, e = "number", i = "THB") {
@@ -2445,20 +2445,20 @@ function qa(t, e, i = "Other") {
2445
2445
  return [...a, { label: i, count: s }];
2446
2446
  }
2447
2447
  function fe(t, e, i, a = "View as table") {
2448
- return n`<details class="baht-chart-table">
2448
+ return l`<details class="baht-chart-table">
2449
2449
  <summary>${a}</summary>
2450
2450
  <table>
2451
2451
  <caption>${t}</caption>
2452
2452
  <thead>
2453
2453
  <tr>
2454
- ${e.map((s) => n`<th scope="col">${s}</th>`)}
2454
+ ${e.map((s) => l`<th scope="col">${s}</th>`)}
2455
2455
  </tr>
2456
2456
  </thead>
2457
2457
  <tbody>
2458
2458
  ${i.map(
2459
- (s) => n`<tr>
2459
+ (s) => l`<tr>
2460
2460
  ${s.map(
2461
- (r, o) => o === 0 ? n`<th scope="row">${r}</th>` : n`<td class="baht-chart-num">${r}</td>`
2461
+ (r, o) => o === 0 ? l`<th scope="row">${r}</th>` : l`<td class="baht-chart-num">${r}</td>`
2462
2462
  )}
2463
2463
  </tr>`
2464
2464
  )}
@@ -2487,7 +2487,7 @@ class st extends g {
2487
2487
  }
2488
2488
  /** The single floating tooltip node; rendered by the template, never appended. */
2489
2489
  renderTooltip() {
2490
- return n`<div class="baht-chart-tooltip" role="status" aria-live="polite" hidden></div>`;
2490
+ return l`<div class="baht-chart-tooltip" role="status" aria-live="polite" hidden></div>`;
2491
2491
  }
2492
2492
  /**
2493
2493
  * Show `text` near the pointer (or, on keyboard focus, near the mark).
@@ -2518,43 +2518,43 @@ class st extends g {
2518
2518
  }
2519
2519
  /** The empty placeholder, or `nothing` when there is data. */
2520
2520
  renderEmpty() {
2521
- return n`<div class="baht-chart-empty">${this.emptyMessage}</div>`;
2521
+ return l`<div class="baht-chart-empty">${this.emptyMessage}</div>`;
2522
2522
  }
2523
2523
  /** Legend rows — only ever rendered for 2+ series (marks-and-anatomy.md). */
2524
2524
  renderLegend(e, i = "rect") {
2525
- return e.length < 2 ? h : n`<div class="baht-chart-legend">
2525
+ return e.length < 2 ? h : l`<div class="baht-chart-legend">
2526
2526
  ${e.map(
2527
- (a) => n`<div class="baht-chart-legend-row">
2527
+ (a) => l`<div class="baht-chart-legend-row">
2528
2528
  <span
2529
2529
  class="baht-chart-swatch${i === "line" ? " baht-chart-swatch--line" : ""}"
2530
2530
  style="background:${a.color}"
2531
2531
  aria-hidden="true"
2532
2532
  ></span>
2533
2533
  <span class="baht-chart-legend-label">${a.label}</span>
2534
- ${a.value ? n`<span class="baht-chart-legend-count">${a.value}</span>` : h}
2535
- ${a.share ? n`<span class="baht-chart-legend-pct">${a.share}</span>` : h}
2534
+ ${a.value ? l`<span class="baht-chart-legend-count">${a.value}</span>` : h}
2535
+ ${a.share ? l`<span class="baht-chart-legend-pct">${a.share}</span>` : h}
2536
2536
  </div>`
2537
2537
  )}
2538
2538
  </div>`;
2539
2539
  }
2540
2540
  }
2541
2541
  At([
2542
- l({ attribute: "empty-message" })
2542
+ n({ attribute: "empty-message" })
2543
2543
  ], st.prototype, "emptyMessage");
2544
2544
  At([
2545
- l({ type: Boolean, reflect: !0 })
2545
+ n({ type: Boolean, reflect: !0 })
2546
2546
  ], st.prototype, "loading");
2547
2547
  At([
2548
- l({ type: Boolean, attribute: "show-table" })
2548
+ n({ type: Boolean, attribute: "show-table" })
2549
2549
  ], st.prototype, "showTable");
2550
2550
  At([
2551
- l()
2551
+ n()
2552
2552
  ], st.prototype, "format");
2553
2553
  At([
2554
- l()
2554
+ n()
2555
2555
  ], st.prototype, "currency");
2556
2556
  At([
2557
- It(".baht-chart-tooltip")
2557
+ Mt(".baht-chart-tooltip")
2558
2558
  ], st.prototype, "tipEl");
2559
2559
  var Ra = Object.defineProperty, za = Object.getOwnPropertyDescriptor, wt = (t, e, i, a) => {
2560
2560
  for (var s = a > 1 ? void 0 : a ? za(e, i) : e, r = t.length - 1, o; r >= 0; r--)
@@ -2569,7 +2569,7 @@ let ct = class extends g {
2569
2569
  const t = (this.values ?? []).filter((x) => Number.isFinite(x));
2570
2570
  if (t.length < 2) return h;
2571
2571
  const e = Math.max(16, this.width), i = Math.max(8, this.height), a = 3, s = Math.min(...t), r = Math.max(...t), o = ne([0, t.length - 1], [a, e - a]), c = ne([s, r === s ? s + 1 : r], [i - a, a]), f = t.map((x, u) => `${o(u).toFixed(2)},${c(x).toFixed(2)}`).join(" "), $ = o(t.length - 1), w = c(t[t.length - 1]), p = this.color || "var(--baht-chart-muted)", P = this.label || `Trend of ${t.length} points`;
2572
- return n`<svg
2572
+ return l`<svg
2573
2573
  class="baht-sparkline"
2574
2574
  width=${e}
2575
2575
  height=${i}
@@ -2577,39 +2577,39 @@ let ct = class extends g {
2577
2577
  role="img"
2578
2578
  aria-label=${P}
2579
2579
  >
2580
- ${L`<polyline class="baht-sparkline-line" points=${f} fill="none" stroke=${p}/>`}
2581
- ${this.accentLast ? L`<circle class="baht-sparkline-dot" cx=${$.toFixed(2)} cy=${w.toFixed(2)} r="3"
2580
+ ${N`<polyline class="baht-sparkline-line" points=${f} fill="none" stroke=${p}/>`}
2581
+ ${this.accentLast ? N`<circle class="baht-sparkline-dot" cx=${$.toFixed(2)} cy=${w.toFixed(2)} r="3"
2582
2582
  fill="var(--baht-chart-1)"/>` : h}
2583
2583
  </svg>`;
2584
2584
  }
2585
2585
  };
2586
2586
  wt([
2587
- l({ type: Array })
2587
+ n({ type: Array })
2588
2588
  ], ct.prototype, "values", 2);
2589
2589
  wt([
2590
- l({ type: Number })
2590
+ n({ type: Number })
2591
2591
  ], ct.prototype, "width", 2);
2592
2592
  wt([
2593
- l({ type: Number })
2593
+ n({ type: Number })
2594
2594
  ], ct.prototype, "height", 2);
2595
2595
  wt([
2596
- l({ type: Boolean, attribute: "accent-last" })
2596
+ n({ type: Boolean, attribute: "accent-last" })
2597
2597
  ], ct.prototype, "accentLast", 2);
2598
2598
  wt([
2599
- l()
2599
+ n()
2600
2600
  ], ct.prototype, "color", 2);
2601
2601
  wt([
2602
- l()
2602
+ n()
2603
2603
  ], ct.prototype, "label", 2);
2604
2604
  ct = wt([
2605
2605
  b("baht-sparkline")
2606
2606
  ], ct);
2607
- var Va = Object.defineProperty, Ka = Object.getOwnPropertyDescriptor, X = (t, e, i, a) => {
2607
+ var Va = Object.defineProperty, Ka = Object.getOwnPropertyDescriptor, Y = (t, e, i, a) => {
2608
2608
  for (var s = a > 1 ? void 0 : a ? Ka(e, i) : e, r = t.length - 1, o; r >= 0; r--)
2609
2609
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
2610
2610
  return a && s && Va(e, i, s), s;
2611
2611
  };
2612
- let K = class extends g {
2612
+ let U = class extends g {
2613
2613
  constructor() {
2614
2614
  super(...arguments), this.label = "", this.value = 0, this.format = "number", this.currency = "THB", this.delta = null, this.deltaKind = "pct", this.deltaLabel = "", this.upIsGood = !0, this.trend = [], this.size = "md";
2615
2615
  }
@@ -2628,17 +2628,17 @@ let K = class extends g {
2628
2628
  }
2629
2629
  render() {
2630
2630
  const t = this.delta != null && Number.isFinite(this.delta), e = this.tone, i = (this.delta ?? 0) > 0 ? "up" : (this.delta ?? 0) < 0 ? "down" : "flat";
2631
- return n`<div class="baht-stat${this.size === "hero" ? " baht-stat--hero" : ""}">
2632
- ${this.label ? n`<div class="baht-stat-label">${this.label}</div>` : h}
2631
+ return l`<div class="baht-stat${this.size === "hero" ? " baht-stat--hero" : ""}">
2632
+ ${this.label ? l`<div class="baht-stat-label">${this.label}</div>` : h}
2633
2633
  <div class="baht-stat-value">${Rt(this.value, this.format, this.currency)}</div>
2634
- ${t ? n`<div class="baht-stat-delta baht-stat-delta--${e}">
2634
+ ${t ? l`<div class="baht-stat-delta baht-stat-delta--${e}">
2635
2635
  <span class="baht-stat-arrow" aria-hidden="true">${this.arrow}</span>
2636
2636
  <span class="baht-stat-delta-value">${this.deltaText}</span>
2637
2637
  <span class="baht-visually-hidden">${i}</span>
2638
- ${this.deltaLabel ? n`<span class="baht-stat-delta-label">${this.deltaLabel}</span>` : h}
2638
+ ${this.deltaLabel ? l`<span class="baht-stat-delta-label">${this.deltaLabel}</span>` : h}
2639
2639
  </div>` : h}
2640
- ${!t && this.deltaLabel ? n`<div class="baht-stat-caption">${this.deltaLabel}</div>` : h}
2641
- ${this.trend.length > 1 ? n`<baht-sparkline
2640
+ ${!t && this.deltaLabel ? l`<div class="baht-stat-caption">${this.deltaLabel}</div>` : h}
2641
+ ${this.trend.length > 1 ? l`<baht-sparkline
2642
2642
  class="baht-stat-trend"
2643
2643
  .values=${this.trend}
2644
2644
  label=${`${this.label || "Value"} trend, ${this.trend.length} points`}
@@ -2646,39 +2646,39 @@ let K = class extends g {
2646
2646
  </div>`;
2647
2647
  }
2648
2648
  };
2649
- X([
2650
- l()
2651
- ], K.prototype, "label", 2);
2652
- X([
2653
- l({ type: Number })
2654
- ], K.prototype, "value", 2);
2655
- X([
2656
- l()
2657
- ], K.prototype, "format", 2);
2658
- X([
2659
- l()
2660
- ], K.prototype, "currency", 2);
2661
- X([
2662
- l({ type: Number })
2663
- ], K.prototype, "delta", 2);
2664
- X([
2665
- l({ attribute: "delta-kind" })
2666
- ], K.prototype, "deltaKind", 2);
2667
- X([
2668
- l({ attribute: "delta-label" })
2669
- ], K.prototype, "deltaLabel", 2);
2670
- X([
2671
- l({ type: Boolean, attribute: "up-is-good" })
2672
- ], K.prototype, "upIsGood", 2);
2673
- X([
2674
- l({ type: Array })
2675
- ], K.prototype, "trend", 2);
2676
- X([
2677
- l()
2678
- ], K.prototype, "size", 2);
2679
- K = X([
2649
+ Y([
2650
+ n()
2651
+ ], U.prototype, "label", 2);
2652
+ Y([
2653
+ n({ type: Number })
2654
+ ], U.prototype, "value", 2);
2655
+ Y([
2656
+ n()
2657
+ ], U.prototype, "format", 2);
2658
+ Y([
2659
+ n()
2660
+ ], U.prototype, "currency", 2);
2661
+ Y([
2662
+ n({ type: Number })
2663
+ ], U.prototype, "delta", 2);
2664
+ Y([
2665
+ n({ attribute: "delta-kind" })
2666
+ ], U.prototype, "deltaKind", 2);
2667
+ Y([
2668
+ n({ attribute: "delta-label" })
2669
+ ], U.prototype, "deltaLabel", 2);
2670
+ Y([
2671
+ n({ type: Boolean, attribute: "up-is-good" })
2672
+ ], U.prototype, "upIsGood", 2);
2673
+ Y([
2674
+ n({ type: Array })
2675
+ ], U.prototype, "trend", 2);
2676
+ Y([
2677
+ n()
2678
+ ], U.prototype, "size", 2);
2679
+ U = Y([
2680
2680
  b("baht-stat")
2681
- ], K);
2681
+ ], U);
2682
2682
  var Ua = Object.defineProperty, Ha = Object.getOwnPropertyDescriptor, Lt = (t, e, i, a) => {
2683
2683
  for (var s = a > 1 ? void 0 : a ? Ha(e, i) : e, r = t.length - 1, o; r >= 0; r--)
2684
2684
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
@@ -2692,7 +2692,7 @@ let J = class extends st {
2692
2692
  render() {
2693
2693
  const t = this.hold(this.groups ?? []);
2694
2694
  if (t.length === 0)
2695
- return n`<div class=${this.rootClass("baht-donut-chart")}>${this.renderEmpty()}</div>`;
2695
+ return l`<div class=${this.rootClass("baht-donut-chart")}>${this.renderEmpty()}</div>`;
2696
2696
  const e = qa(t, Ze, this.otherLabel), i = e.reduce((p, P) => p + P.count, 0) || 1, a = this.total ?? t.reduce((p, P) => p + P.count, 0), s = J.R, r = 2 * Math.PI * s, o = e.length > 1 ? J.GAP : 0, c = t.length > Ze;
2697
2697
  let f = 0;
2698
2698
  const $ = e.map((p, P) => {
@@ -2706,11 +2706,11 @@ let J = class extends st {
2706
2706
  };
2707
2707
  return f += x, v;
2708
2708
  }), w = `${a} ${this.centerLabel}: ${$.map((p) => `${p.label || "(empty)"} ${p.count} (${Math.round(p.frac * 100)}%)`).join(", ")}`;
2709
- return n`<div class=${this.rootClass("baht-donut-chart")}>
2709
+ return l`<div class=${this.rootClass("baht-donut-chart")}>
2710
2710
  <svg width="160" height="160" viewBox="0 0 160 160" role="img" aria-label=${w}>
2711
2711
  <g transform="translate(80,80) rotate(-90)">
2712
2712
  ${$.map(
2713
- (p) => L`<circle r=${s} cx="0" cy="0" fill="none" stroke=${p.color}
2713
+ (p) => N`<circle r=${s} cx="0" cy="0" fill="none" stroke=${p.color}
2714
2714
  stroke-width="22" stroke-dasharray=${p.dash} stroke-dashoffset=${p.offset}/>`
2715
2715
  )}
2716
2716
  </g>
@@ -2719,7 +2719,7 @@ let J = class extends st {
2719
2719
  </svg>
2720
2720
  <div class="baht-chart-legend">
2721
2721
  ${$.map(
2722
- (p) => n`<div class="baht-chart-legend-row">
2722
+ (p) => l`<div class="baht-chart-legend-row">
2723
2723
  <span class="baht-chart-swatch" style="background:${p.color}" aria-hidden="true"></span>
2724
2724
  <span class="baht-chart-legend-label">${p.label || "(empty)"}</span>
2725
2725
  <span class="baht-chart-legend-count">${this.fmt(p.count)}</span>
@@ -2742,19 +2742,19 @@ let J = class extends st {
2742
2742
  J.R = 54;
2743
2743
  J.GAP = 2;
2744
2744
  Lt([
2745
- l({ attribute: !1 })
2745
+ n({ attribute: !1 })
2746
2746
  ], J.prototype, "groups", 2);
2747
2747
  Lt([
2748
- l({ type: Number })
2748
+ n({ type: Number })
2749
2749
  ], J.prototype, "total", 2);
2750
2750
  Lt([
2751
- l()
2751
+ n()
2752
2752
  ], J.prototype, "color", 2);
2753
2753
  Lt([
2754
- l({ attribute: "center-label" })
2754
+ n({ attribute: "center-label" })
2755
2755
  ], J.prototype, "centerLabel", 2);
2756
2756
  Lt([
2757
- l({ attribute: "other-label" })
2757
+ n({ attribute: "other-label" })
2758
2758
  ], J.prototype, "otherLabel", 2);
2759
2759
  J = Lt([
2760
2760
  b("baht-donut-chart")
@@ -2764,25 +2764,25 @@ var Ga = Object.defineProperty, Wa = Object.getOwnPropertyDescriptor, V = (t, e,
2764
2764
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
2765
2765
  return a && s && Ga(e, i, s), s;
2766
2766
  };
2767
- const Qe = 24, ts = 2, Ja = 56, Ya = 26;
2767
+ const Qe = 24, ts = 2, Ja = 56, Xa = 26;
2768
2768
  let z = class extends st {
2769
2769
  constructor() {
2770
2770
  super(...arguments), this.groups = [], this.series = [], this.categories = [], this.orientation = "horizontal", this.stacked = !1, this.compare = [], this.compareLabel = "Previous period", this.markers = [], this.labelValues = "ends", this.emphasis = null, this.color = "", this.label = "", this.band = 0;
2771
2771
  }
2772
2772
  connectedCallback() {
2773
- super.connectedCallback(), !(!S() || typeof ResizeObserver > "u") && (this.resizeObserver = new ResizeObserver(() => this.measure()), this.resizeObserver.observe(this));
2773
+ super.connectedCallback(), !(!T() || typeof ResizeObserver > "u") && (this.resizeObserver = new ResizeObserver(() => this.measure()), this.resizeObserver.observe(this));
2774
2774
  }
2775
2775
  disconnectedCallback() {
2776
2776
  var t;
2777
2777
  (t = this.resizeObserver) == null || t.disconnect(), this.resizeObserver = void 0, super.disconnectedCallback();
2778
2778
  }
2779
2779
  firstUpdated() {
2780
- S() && queueMicrotask(() => this.measure());
2780
+ T() && queueMicrotask(() => this.measure());
2781
2781
  }
2782
2782
  /** Host width → px per category. Never runs on the server (`hasDom` guard). */
2783
2783
  measure() {
2784
2784
  var r;
2785
- if (!S() || !this.isConnected || this.orientation !== "vertical") return;
2785
+ if (!T() || !this.isConnected || this.orientation !== "vertical") return;
2786
2786
  const t = this.columnCount;
2787
2787
  if (t === 0) return;
2788
2788
  const e = ((r = this.getBoundingClientRect) == null ? void 0 : r.call(this).width) ?? 0;
@@ -2812,7 +2812,7 @@ let z = class extends st {
2812
2812
  }
2813
2813
  render() {
2814
2814
  const t = this.hold(this.model);
2815
- return t.series.length === 0 ? n`<div class=${this.rootClass("baht-bar-chart")}>${this.renderEmpty()}</div>` : this.orientation === "vertical" ? this.renderVertical(t) : this.renderHorizontal(t);
2815
+ return t.series.length === 0 ? l`<div class=${this.rootClass("baht-bar-chart")}>${this.renderEmpty()}</div>` : this.orientation === "vertical" ? this.renderVertical(t) : this.renderHorizontal(t);
2816
2816
  }
2817
2817
  /** Largest value a bar can reach: the raw max for `groups`, a clean tick otherwise. */
2818
2818
  domainMax(t, e, i) {
@@ -2858,6 +2858,10 @@ let z = class extends st {
2858
2858
  get chartMarkers() {
2859
2859
  return (this.markers ?? []).filter((t) => !t.category);
2860
2860
  }
2861
+ /** Markers pinned to one category — they ride that row / column, not the chart. */
2862
+ categoryMarkers(t) {
2863
+ return (this.markers ?? []).filter((e) => e.category === t);
2864
+ }
2861
2865
  /** What a marker reads as: its own label, else its formatted value. */
2862
2866
  markerText(t) {
2863
2867
  return t.label ? `${t.label} ${this.fmt(t.value)}` : this.fmt(t.value);
@@ -2868,7 +2872,7 @@ let z = class extends st {
2868
2872
  */
2869
2873
  markerOverlay(t, e) {
2870
2874
  return this.markersFor(e).map(
2871
- (i) => n`<span
2875
+ (i) => l`<span
2872
2876
  class="baht-bar-chart-marker"
2873
2877
  style=${`left:${Math.min(100, i.value / t * 100).toFixed(2)}%`}
2874
2878
  aria-hidden="true"
@@ -2878,14 +2882,30 @@ let z = class extends st {
2878
2882
  /**
2879
2883
  * Marker labels, sorted along the axis and thinned so neighbours never collide:
2880
2884
  * a dropped label keeps its line, and its value still reads in the table twin.
2885
+ * Thinning is scoped to the list it is given — chart-wide markers compete with
2886
+ * each other, a row's own markers only with that row's.
2881
2887
  */
2882
- placedMarkers(t) {
2883
- const e = [], i = [...this.chartMarkers].sort((a, s) => a.value - s.value);
2884
- for (const a of i) {
2885
- const s = Math.min(100, Math.max(0, a.value / t * 100)), r = e[e.length - 1];
2886
- r && s - r.pct < 12 || e.push({ m: a, pct: s });
2888
+ place(t, e) {
2889
+ const i = [], a = [...t].sort((s, r) => s.value - r.value);
2890
+ for (const s of a) {
2891
+ const r = Math.min(100, Math.max(0, s.value / e * 100)), o = i[i.length - 1];
2892
+ o && r - o.pct < 12 || i.push({ m: s, pct: r });
2887
2893
  }
2888
- return e;
2894
+ return i;
2895
+ }
2896
+ /** Chart-wide marker labels — the strip above the rows / the end of the line. */
2897
+ placedMarkers(t) {
2898
+ return this.place(this.chartMarkers, t);
2899
+ }
2900
+ /** A row's own marker labels, drawn beside their line inside that row. */
2901
+ rowMarkerLabels(t, e) {
2902
+ return this.place(this.categoryMarkers(t), e).map(
2903
+ ({ m: i, pct: a }) => l`<span
2904
+ class="baht-bar-chart-marker-label baht-bar-chart-marker-label--row"
2905
+ style=${`left:${a.toFixed(2)}%;transform:translateX(${a > 70 ? "calc(-100% - 4px)" : "4px"})`}
2906
+ >${this.markerText(i)}</span
2907
+ >`
2908
+ );
2889
2909
  }
2890
2910
  /** Legend rows: one per series, plus the muted `compare` key when it is set. */
2891
2911
  legendEntries(t) {
@@ -2897,12 +2917,12 @@ let z = class extends st {
2897
2917
  }
2898
2918
  renderHorizontal(t) {
2899
2919
  const { series: e, categories: i, legacy: a } = t, s = e.length > 1, r = Math.max(...e.map((P) => P.values.length)), o = this.domainMax(e, this.stacked, a), c = (this.compare ?? []).length > 0, f = (this.stacked ? 1 : e.length) + (c ? 1 : 0), $ = Math.min(Qe, Math.max(6, Math.floor(48 / f))), w = Array.from({ length: r }, (P, x) => {
2900
- const u = i[x] || "(empty)", v = e.reduce((C, R) => C + (R.values[x] ?? 0), 0), D = `${u}: ${e.map((C) => `${C.name ? `${C.name} ` : ""}${this.fmt(C.values[x] ?? 0)}`).join(", ")}${c ? `, previous ${this.fmt(this.compare[x] ?? 0)}` : ""}`, G = e.map((C, R) => ({
2920
+ const u = i[x] || "(empty)", v = e.reduce((C, S) => C + (S.values[x] ?? 0), 0), D = `${u}: ${e.map((C) => `${C.name ? `${C.name} ` : ""}${this.fmt(C.values[x] ?? 0)}`).join(", ")}${c ? `, previous ${this.fmt(this.compare[x] ?? 0)}` : ""}`, K = e.map((C, S) => ({
2901
2921
  value: C.values[x] ?? 0,
2902
- color: this.colorFor(R, x, s),
2922
+ color: this.colorFor(S, x, s),
2903
2923
  name: C.name
2904
2924
  }));
2905
- return n`<div class="baht-bar-chart-row">
2925
+ return l`<div class="baht-bar-chart-row">
2906
2926
  <span class="baht-bar-chart-label" title=${u}>${u}</span>
2907
2927
  <div
2908
2928
  class="baht-bar-chart-track${this.stacked ? " baht-bar-chart-track--stacked" : ""}"
@@ -2915,44 +2935,45 @@ let z = class extends st {
2915
2935
  @blur=${() => this.hideTip()}
2916
2936
  >
2917
2937
  ${this.markerOverlay(o, u)}
2938
+ ${this.rowMarkerLabels(u, o)}
2918
2939
  <div class="baht-bar-chart-bars">
2919
- ${this.stacked ? n`<div class="baht-bar-chart-stack" style=${`height:${$}px`}>
2920
- ${G.map(
2921
- (C) => n`<div
2940
+ ${this.stacked ? l`<div class="baht-bar-chart-stack" style=${`height:${$}px`}>
2941
+ ${K.map(
2942
+ (C) => l`<div
2922
2943
  class="baht-bar-chart-bar baht-bar-chart-bar--segment"
2923
2944
  style=${`width:${Math.max(0, C.value / o * 100)}%;background:${C.color}`}
2924
2945
  ></div>`
2925
2946
  )}
2926
- </div>` : G.map(
2927
- (C) => n`<div
2947
+ </div>` : K.map(
2948
+ (C) => l`<div
2928
2949
  class="baht-bar-chart-bar"
2929
2950
  style=${`width:${Math.max(2, C.value / o * 100)}%;height:${$}px;background:${C.color}`}
2930
2951
  ></div>`
2931
2952
  )}
2932
- ${c ? n`<div
2953
+ ${c ? l`<div
2933
2954
  class="baht-bar-chart-bar baht-bar-chart-bar--compare"
2934
2955
  style=${`width:${Math.max(2, (this.compare[x] ?? 0) / o * 100)}%;height:${Math.min(8, $)}px`}
2935
2956
  ></div>` : h}
2936
2957
  </div>
2937
2958
  </div>
2938
- ${this.labelValues === "ends" ? n`<span class="baht-bar-chart-count"
2959
+ ${this.labelValues === "ends" ? l`<span class="baht-bar-chart-count"
2939
2960
  >${a ? e[0].values[x] ?? 0 : this.fmt(this.stacked ? v : e[0].values[x] ?? 0)}</span
2940
2961
  >` : h}
2941
2962
  </div>`;
2942
2963
  }), p = this.placedMarkers(o);
2943
- return n`<div class=${this.rootClass("baht-bar-chart")}>
2944
- ${p.length > 0 ? n`<div class="baht-bar-chart-row baht-bar-chart-row--markers">
2964
+ return l`<div class=${this.rootClass("baht-bar-chart")}>
2965
+ ${p.length > 0 ? l`<div class="baht-bar-chart-row baht-bar-chart-row--markers">
2945
2966
  <span class="baht-bar-chart-label"></span>
2946
2967
  <div class="baht-bar-chart-markbar">
2947
2968
  ${p.map(
2948
- ({ m: P, pct: x }) => n`<span
2969
+ ({ m: P, pct: x }) => l`<span
2949
2970
  class="baht-bar-chart-marker-label"
2950
2971
  style=${`left:${x.toFixed(2)}%;transform:translateX(${x > 88 ? "-100%" : x < 12 ? "0" : "-50%"})`}
2951
2972
  >${this.markerText(P)}</span
2952
2973
  >`
2953
2974
  )}
2954
2975
  </div>
2955
- ${this.labelValues === "ends" ? n`<span class="baht-bar-chart-count"></span>` : h}
2976
+ ${this.labelValues === "ends" ? l`<span class="baht-bar-chart-count"></span>` : h}
2956
2977
  </div>` : h}
2957
2978
  ${w}
2958
2979
  ${this.renderTooltip()}
@@ -2961,55 +2982,68 @@ let z = class extends st {
2961
2982
  </div>`;
2962
2983
  }
2963
2984
  renderVertical(t) {
2964
- const { series: e, categories: i, legacy: a } = t, s = e.length > 1, r = Math.max(...e.map((v) => v.values.length)), o = this.domainMax(e, this.stacked, a), c = Be(o, 4), f = (this.compare ?? []).length > 0, $ = (this.stacked ? 1 : e.length) + (f ? 1 : 0), w = this.band > 0 ? (this.band - ts) / $ : 48 / $, p = Math.min(Qe, Math.max(2, Math.floor(w))), P = this.band > 0 ? Math.max(1, Math.ceil(Ya / Math.max(1, this.band))) : Math.max(1, Math.ceil(r / 12)), x = this.chartMarkers.map((v) => this.markerText(v)), u = this.label || `Column chart, ${r} categories. ${i.map((v, D) => `${v} ${this.fmt(e[0].values[D] ?? 0)}`).join(", ")}${x.length ? `. Reference lines: ${x.join(", ")}` : ""}`;
2965
- return n`<div class=${this.rootClass("baht-bar-chart baht-bar-chart--vertical")}>
2985
+ const { series: e, categories: i, legacy: a } = t, s = e.length > 1, r = Math.max(...e.map((v) => v.values.length)), o = this.domainMax(e, this.stacked, a), c = Be(o, 4), f = (this.compare ?? []).length > 0, $ = (this.stacked ? 1 : e.length) + (f ? 1 : 0), w = this.band > 0 ? (this.band - ts) / $ : 48 / $, p = Math.min(Qe, Math.max(2, Math.floor(w))), P = this.band > 0 ? Math.max(1, Math.ceil(Xa / Math.max(1, this.band))) : Math.max(1, Math.ceil(r / 12)), x = (this.markers ?? []).map(
2986
+ (v) => `${this.markerText(v)}${v.category ? ` on ${v.category}` : ""}`
2987
+ ), u = this.label || `Column chart, ${r} categories. ${i.map((v, D) => `${v} ${this.fmt(e[0].values[D] ?? 0)}`).join(", ")}${x.length ? `. Reference lines: ${x.join(", ")}` : ""}`;
2988
+ return l`<div class=${this.rootClass("baht-bar-chart baht-bar-chart--vertical")}>
2966
2989
  <div class="baht-bar-chart-plot" role="img" aria-label=${u}>
2967
2990
  <div class="baht-bar-chart-yaxis" aria-hidden="true">
2968
- ${[...c].reverse().map((v) => n`<span class="baht-chart-tick-text">${this.fmt(v)}</span>`)}
2991
+ ${[...c].reverse().map((v) => l`<span class="baht-chart-tick-text">${this.fmt(v)}</span>`)}
2969
2992
  </div>
2970
2993
  <div class="baht-bar-chart-grid">
2971
2994
  ${this.chartMarkers.map(
2972
- (v) => n`<span
2995
+ (v) => l`<span
2973
2996
  class="baht-bar-chart-marker baht-bar-chart-marker--horizontal"
2974
2997
  style=${`bottom:${Math.min(100, v.value / o * 100).toFixed(2)}%`}
2975
2998
  aria-hidden="true"
2976
2999
  ></span>`
2977
3000
  )}
2978
3001
  ${this.placedMarkers(o).map(
2979
- ({ m: v, pct: D }) => n`<span
3002
+ ({ m: v, pct: D }) => l`<span
2980
3003
  class="baht-bar-chart-marker-label baht-bar-chart-marker-label--end"
2981
3004
  style=${`bottom:${D.toFixed(2)}%`}
2982
3005
  >${this.markerText(v)}</span
2983
3006
  >`
2984
3007
  )}
2985
- ${[...c].reverse().map(() => n`<span class="baht-chart-grid-rule" aria-hidden="true"></span>`)}
3008
+ ${[...c].reverse().map(() => l`<span class="baht-chart-grid-rule" aria-hidden="true"></span>`)}
2986
3009
  <div class="baht-bar-chart-columns">
2987
3010
  ${Array.from({ length: r }, (v, D) => {
2988
- const G = i[D] || "(empty)", C = `${G}: ${e.map((R) => `${R.name ? `${R.name} ` : ""}${this.fmt(R.values[D] ?? 0)}`).join(", ")}`;
2989
- return n`<div
3011
+ const K = i[D] || "(empty)", C = `${K}: ${e.map((S) => `${S.name ? `${S.name} ` : ""}${this.fmt(S.values[D] ?? 0)}`).join(", ")}`;
3012
+ return l`<div
2990
3013
  class="baht-bar-chart-column"
2991
3014
  style=${this.band > 0 ? `flex:0 0 auto;width:${this.band}px` : h}
2992
3015
  tabindex="0"
2993
3016
  role="button"
2994
3017
  aria-label=${C}
2995
- @pointermove=${(R) => this.showTip(R, C)}
3018
+ @pointermove=${(S) => this.showTip(S, C)}
2996
3019
  @pointerleave=${() => this.hideTip()}
2997
- @focus=${(R) => this.showTip(R, C)}
3020
+ @focus=${(S) => this.showTip(S, C)}
2998
3021
  @blur=${() => this.hideTip()}
2999
3022
  >
3023
+ ${this.place(this.categoryMarkers(K), o).map(
3024
+ ({ m: S, pct: d }) => l`<span
3025
+ class="baht-bar-chart-marker baht-bar-chart-marker--horizontal"
3026
+ style=${`bottom:${d.toFixed(2)}%`}
3027
+ aria-hidden="true"
3028
+ ></span>${this.band === 0 || this.band >= 40 ? l`<span
3029
+ class="baht-bar-chart-marker-label baht-bar-chart-marker-label--column"
3030
+ style=${`bottom:${d.toFixed(2)}%`}
3031
+ >${this.markerText(S)}</span
3032
+ >` : h}`
3033
+ )}
3000
3034
  <div class="baht-bar-chart-column-bars">
3001
3035
  ${e.map(
3002
- (R, d) => n`<div
3036
+ (S, d) => l`<div
3003
3037
  class="baht-bar-chart-col"
3004
- style=${`height:${Math.max(1, (R.values[D] ?? 0) / o * 100)}%;width:${p}px;background:${this.colorFor(d, D, s)}`}
3038
+ style=${`height:${Math.max(1, (S.values[D] ?? 0) / o * 100)}%;width:${p}px;background:${this.colorFor(d, D, s)}`}
3005
3039
  ></div>`
3006
3040
  )}
3007
- ${f ? n`<div
3041
+ ${f ? l`<div
3008
3042
  class="baht-bar-chart-col baht-bar-chart-col--compare"
3009
3043
  style=${`height:${Math.max(1, (this.compare[D] ?? 0) / o * 100)}%;width:${Math.min(8, p)}px`}
3010
3044
  ></div>` : h}
3011
3045
  </div>
3012
- ${D % P === 0 ? n`<span class="baht-bar-chart-xlabel">${G}</span>` : h}
3046
+ ${D % P === 0 ? l`<span class="baht-bar-chart-xlabel">${K}</span>` : h}
3013
3047
  </div>`;
3014
3048
  })}
3015
3049
  </div>
@@ -3022,40 +3056,40 @@ let z = class extends st {
3022
3056
  }
3023
3057
  };
3024
3058
  V([
3025
- l({ attribute: !1 })
3059
+ n({ attribute: !1 })
3026
3060
  ], z.prototype, "groups", 2);
3027
3061
  V([
3028
- l({ attribute: !1 })
3062
+ n({ attribute: !1 })
3029
3063
  ], z.prototype, "series", 2);
3030
3064
  V([
3031
- l({ attribute: !1 })
3065
+ n({ attribute: !1 })
3032
3066
  ], z.prototype, "categories", 2);
3033
3067
  V([
3034
- l()
3068
+ n()
3035
3069
  ], z.prototype, "orientation", 2);
3036
3070
  V([
3037
- l({ type: Boolean })
3071
+ n({ type: Boolean })
3038
3072
  ], z.prototype, "stacked", 2);
3039
3073
  V([
3040
- l({ attribute: !1 })
3074
+ n({ attribute: !1 })
3041
3075
  ], z.prototype, "compare", 2);
3042
3076
  V([
3043
- l({ attribute: "compare-label" })
3077
+ n({ attribute: "compare-label" })
3044
3078
  ], z.prototype, "compareLabel", 2);
3045
3079
  V([
3046
- l({ attribute: !1 })
3080
+ n({ attribute: !1 })
3047
3081
  ], z.prototype, "markers", 2);
3048
3082
  V([
3049
- l({ attribute: "label-values" })
3083
+ n({ attribute: "label-values" })
3050
3084
  ], z.prototype, "labelValues", 2);
3051
3085
  V([
3052
- l({ type: Number })
3086
+ n({ type: Number })
3053
3087
  ], z.prototype, "emphasis", 2);
3054
3088
  V([
3055
- l()
3089
+ n()
3056
3090
  ], z.prototype, "color", 2);
3057
3091
  V([
3058
- l()
3092
+ n()
3059
3093
  ], z.prototype, "label", 2);
3060
3094
  V([
3061
3095
  y()
@@ -3063,10 +3097,10 @@ V([
3063
3097
  z = V([
3064
3098
  b("baht-bar-chart")
3065
3099
  ], z);
3066
- var Xa = Object.defineProperty, Za = Object.getOwnPropertyDescriptor, nt = (t, e, i, a) => {
3100
+ var Ya = Object.defineProperty, Za = Object.getOwnPropertyDescriptor, nt = (t, e, i, a) => {
3067
3101
  for (var s = a > 1 ? void 0 : a ? Za(e, i) : e, r = t.length - 1, o; r >= 0; r--)
3068
3102
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
3069
- return a && s && Xa(e, i, s), s;
3103
+ return a && s && Ya(e, i, s), s;
3070
3104
  };
3071
3105
  const es = 640, xe = 260, B = { top: 14, right: 72, bottom: 30, left: 60 };
3072
3106
  let et = class extends st {
@@ -3085,65 +3119,65 @@ let et = class extends st {
3085
3119
  categories: this.categories ?? []
3086
3120
  }), { series: e, categories: i } = t;
3087
3121
  if (e.length === 0)
3088
- return n`<div class=${this.rootClass("baht-line-chart")}>${this.renderEmpty()}</div>`;
3122
+ return l`<div class=${this.rootClass("baht-line-chart")}>${this.renderEmpty()}</div>`;
3089
3123
  const a = Math.max(...e.map((d) => d.values.length)), s = e.flatMap((d) => d.values).filter((d) => Number.isFinite(d)), r = Math.max(0, ...s, ...(this.markers ?? []).map((d) => d.value)), o = Be(r, 4), c = o[o.length - 1] ?? 1, { w: f, h: $ } = this.plot, w = ne([0, Math.max(1, a - 1)], [B.left, B.left + f]), p = ne([0, c], [B.top + $, B.top]), P = Math.max(0, a - 1 - Math.max(0, this.forecast)), x = (d, _, tt) => d.slice(_, tt + 1).map((at, it) => `${it === 0 ? "M" : "L"}${w(_ + it).toFixed(2)},${p(at).toFixed(2)}`).join(" "), u = e.map((d, _) => ({
3090
3124
  i: _,
3091
3125
  name: d.name,
3092
3126
  value: d.values[d.values.length - 1] ?? 0,
3093
3127
  yPos: p(d.values[d.values.length - 1] ?? 0),
3094
3128
  color: ft(_, d.color)
3095
- })), v = [...u].sort((d, _) => d.yPos - _.yPos), D = v.some((d, _) => _ > 0 && d.yPos - v[_ - 1].yPos < 15), G = this.labelValues === "ends" && !D, C = Math.max(1, Math.ceil(a / 8)), R = this.label || `Line chart, ${e.length} series over ${a} points. ${e.map((d, _) => `${d.name}: ${this.fmt(u[_].value)} at the end`).join(". ")}`;
3096
- return n`<div class=${this.rootClass("baht-line-chart")}>
3129
+ })), v = [...u].sort((d, _) => d.yPos - _.yPos), D = v.some((d, _) => _ > 0 && d.yPos - v[_ - 1].yPos < 15), K = this.labelValues === "ends" && !D, C = Math.max(1, Math.ceil(a / 8)), S = this.label || `Line chart, ${e.length} series over ${a} points. ${e.map((d, _) => `${d.name}: ${this.fmt(u[_].value)} at the end`).join(". ")}`;
3130
+ return l`<div class=${this.rootClass("baht-line-chart")}>
3097
3131
  <svg
3098
3132
  class="baht-chart-svg"
3099
3133
  viewBox="0 0 ${es} ${xe}"
3100
3134
  preserveAspectRatio="xMidYMid meet"
3101
3135
  role="img"
3102
- aria-label=${R}
3136
+ aria-label=${S}
3103
3137
  >
3104
3138
  ${o.map(
3105
- (d) => L`
3139
+ (d) => N`
3106
3140
  <line class="baht-chart-grid-line" x1=${B.left} x2=${B.left + f}
3107
3141
  y1=${p(d).toFixed(2)} y2=${p(d).toFixed(2)}/>
3108
3142
  <text class="baht-chart-tick" x=${B.left - 8} y=${(p(d) + 4).toFixed(2)}
3109
3143
  text-anchor="end">${this.fmt(d)}</text>`
3110
3144
  )}
3111
3145
  ${this.baseline != null ? [
3112
- L`<line class="baht-chart-baseline" x1=${B.left} x2=${B.left + f}
3146
+ N`<line class="baht-chart-baseline" x1=${B.left} x2=${B.left + f}
3113
3147
  y1=${p(this.baseline).toFixed(2)} y2=${p(this.baseline).toFixed(2)}/>`
3114
3148
  ] : []}
3115
3149
  ${(this.markers ?? []).map(
3116
- (d) => L`
3150
+ (d) => N`
3117
3151
  <line class="baht-chart-marker-line" x1=${B.left} x2=${B.left + f}
3118
3152
  y1=${p(d.value).toFixed(2)} y2=${p(d.value).toFixed(2)}/>
3119
3153
  <text class="baht-chart-marker-label" x=${B.left + f} y=${(p(d.value) - 5).toFixed(2)}
3120
3154
  text-anchor="end">${d.label ?? this.fmt(d.value)}</text>`
3121
3155
  )}
3122
- ${this.area && e.length === 1 ? L`<path class="baht-chart-area" fill=${ft(0, e[0].color)}
3156
+ ${this.area && e.length === 1 ? N`<path class="baht-chart-area" fill=${ft(0, e[0].color)}
3123
3157
  d=${`${x(e[0].values, 0, a - 1)} L${w(a - 1).toFixed(2)},${p(0).toFixed(2)} L${w(0).toFixed(2)},${p(0).toFixed(2)} Z`}/>` : h}
3124
3158
  ${e.map((d, _) => {
3125
3159
  const tt = ft(_, d.color), at = [
3126
- L`<path class="baht-chart-line" d=${x(d.values, 0, P)} stroke=${tt} fill="none"/>`
3160
+ N`<path class="baht-chart-line" d=${x(d.values, 0, P)} stroke=${tt} fill="none"/>`
3127
3161
  ];
3128
3162
  return P < a - 1 && at.push(
3129
- L`<path class="baht-chart-line baht-chart-line--forecast" d=${x(d.values, P, a - 1)}
3163
+ N`<path class="baht-chart-line baht-chart-line--forecast" d=${x(d.values, P, a - 1)}
3130
3164
  stroke=${tt} fill="none"/>`
3131
3165
  ), at.push(
3132
- L`<circle class="baht-chart-end-dot" cx=${w(a - 1).toFixed(2)}
3166
+ N`<circle class="baht-chart-end-dot" cx=${w(a - 1).toFixed(2)}
3133
3167
  cy=${p(d.values[d.values.length - 1] ?? 0).toFixed(2)} r="4" fill=${tt}/>`
3134
3168
  ), at;
3135
3169
  })}
3136
- ${G ? u.map(
3137
- (d) => L`
3170
+ ${K ? u.map(
3171
+ (d) => N`
3138
3172
  <text class="baht-chart-end-label" x=${w(a - 1) + 10} y=${(d.yPos + 4).toFixed(2)}
3139
3173
  text-anchor="start">${this.fmt(d.value)}</text>`
3140
3174
  ) : h}
3141
3175
  ${i.map(
3142
- (d, _) => _ % C === 0 ? L`<text class="baht-chart-tick" x=${w(_).toFixed(2)} y=${xe - 10} text-anchor="middle">${d}</text>` : h
3176
+ (d, _) => _ % C === 0 ? N`<text class="baht-chart-tick" x=${w(_).toFixed(2)} y=${xe - 10} text-anchor="middle">${d}</text>` : h
3143
3177
  )}
3144
3178
  ${Array.from({ length: a }, (d, _) => {
3145
3179
  const tt = f / Math.max(1, a - 1), at = `${i[_] ?? `Point ${_ + 1}`}: ${e.map((it) => `${it.name} ${this.fmt(it.values[_] ?? 0)}`).join(", ")}`;
3146
- return L`<rect class="baht-chart-hit" x=${(w(_) - tt / 2).toFixed(2)} y=${B.top}
3180
+ return N`<rect class="baht-chart-hit" x=${(w(_) - tt / 2).toFixed(2)} y=${B.top}
3147
3181
  width=${Math.max(24, tt).toFixed(2)} height=${$} tabindex="0" role="button"
3148
3182
  aria-label=${at}
3149
3183
  @pointermove=${(it) => this.onHover(it, _, at)}
@@ -3151,7 +3185,7 @@ let et = class extends st {
3151
3185
  @focus=${(it) => this.onHover(it, _, at)}
3152
3186
  @blur=${() => this.onLeave()}/>`;
3153
3187
  })}
3154
- ${this.crosshairAt != null ? L`<line class="baht-chart-crosshair" x1=${w(this.crosshairAt).toFixed(2)}
3188
+ ${this.crosshairAt != null ? N`<line class="baht-chart-crosshair" x1=${w(this.crosshairAt).toFixed(2)}
3155
3189
  x2=${w(this.crosshairAt).toFixed(2)} y1=${B.top} y2=${B.top + $}/>` : h}
3156
3190
  </svg>
3157
3191
  ${this.renderTooltip()}
@@ -3177,28 +3211,28 @@ let et = class extends st {
3177
3211
  }
3178
3212
  };
3179
3213
  nt([
3180
- l({ attribute: !1 })
3214
+ n({ attribute: !1 })
3181
3215
  ], et.prototype, "series", 2);
3182
3216
  nt([
3183
- l({ attribute: !1 })
3217
+ n({ attribute: !1 })
3184
3218
  ], et.prototype, "categories", 2);
3185
3219
  nt([
3186
- l({ type: Boolean })
3220
+ n({ type: Boolean })
3187
3221
  ], et.prototype, "area", 2);
3188
3222
  nt([
3189
- l({ attribute: !1 })
3223
+ n({ attribute: !1 })
3190
3224
  ], et.prototype, "markers", 2);
3191
3225
  nt([
3192
- l({ type: Number })
3226
+ n({ type: Number })
3193
3227
  ], et.prototype, "forecast", 2);
3194
3228
  nt([
3195
- l({ type: Number })
3229
+ n({ type: Number })
3196
3230
  ], et.prototype, "baseline", 2);
3197
3231
  nt([
3198
- l({ attribute: "label-values" })
3232
+ n({ attribute: "label-values" })
3199
3233
  ], et.prototype, "labelValues", 2);
3200
3234
  nt([
3201
- l()
3235
+ n()
3202
3236
  ], et.prototype, "label", 2);
3203
3237
  et = nt([
3204
3238
  b("baht-line-chart")
@@ -3227,7 +3261,7 @@ let pt = class extends st {
3227
3261
  render() {
3228
3262
  const t = this.hold({ values: this.values ?? [], range: this.range }), e = t.range;
3229
3263
  if (!e || t.values.length === 0)
3230
- return n`<div class=${this.rootClass("baht-heatmap")}>${this.renderEmpty()}</div>`;
3264
+ return l`<div class=${this.rootClass("baht-heatmap")}>${this.renderEmpty()}</div>`;
3231
3265
  const i = new Map(t.values.map((u) => [u.date.slice(0, 10), u.value])), a = [], s = new Date(e.start), r = (e.start.getUTCDay() + 6) % 7;
3232
3266
  let o = 0;
3233
3267
  for (; +s <= +e.end; ) {
@@ -3235,7 +3269,7 @@ let pt = class extends st {
3235
3269
  a.push({ iso: u, value: i.has(u) ? i.get(u) : null, col: D, row: v }), s.setUTCDate(s.getUTCDate() + 1), o += 1;
3236
3270
  }
3237
3271
  const c = Math.max(1, ...a.map((u) => u.col + 1)), f = ss + c * qt, $ = ke + 7 * qt + 4, w = Math.max(1, ...a.map((u) => u.value ?? 0)), p = (u) => Math.min(4, Math.max(0, Math.ceil(u / w * 5) - 1)), P = a.reduce((u, v) => u + (v.value ?? 0), 0), x = this.label || `Calendar heatmap, ${a.length} days from ${Oe(e.start)} to ${Oe(e.end)}, total ${this.fmt(P)}`;
3238
- return n`<div class=${this.rootClass("baht-heatmap")}>
3272
+ return l`<div class=${this.rootClass("baht-heatmap")}>
3239
3273
  <svg
3240
3274
  class="baht-chart-svg baht-heatmap-svg"
3241
3275
  width=${f}
@@ -3246,15 +3280,15 @@ let pt = class extends st {
3246
3280
  aria-label=${x}
3247
3281
  >
3248
3282
  ${ei.map(
3249
- (u, v) => v % 2 === 0 ? L`<text class="baht-chart-tick" x="0" y=${ke + v * qt + _e / 2 + 4}>${u}</text>` : h
3283
+ (u, v) => v % 2 === 0 ? N`<text class="baht-chart-tick" x="0" y=${ke + v * qt + _e / 2 + 4}>${u}</text>` : h
3250
3284
  )}
3251
3285
  ${a.map((u) => {
3252
- const v = u.value == null ? `${u.iso}: no activity` : `${u.iso}: ${this.fmt(u.value)}`, D = u.value == null || u.value <= 0 ? "var(--baht-chart-grid)" : Xe(p(u.value));
3253
- return L`<rect class="baht-heatmap-cell" x=${ss + u.col * qt} y=${ke + u.row * qt}
3286
+ const v = u.value == null ? `${u.iso}: no activity` : `${u.iso}: ${this.fmt(u.value)}`, D = u.value == null || u.value <= 0 ? "var(--baht-chart-grid)" : Ye(p(u.value));
3287
+ return N`<rect class="baht-heatmap-cell" x=${ss + u.col * qt} y=${ke + u.row * qt}
3254
3288
  width=${_e} height=${_e} rx="3" fill=${D} tabindex="0" role="button" aria-label=${v}
3255
- @pointermove=${(G) => this.showTip(G, v)}
3289
+ @pointermove=${(K) => this.showTip(K, v)}
3256
3290
  @pointerleave=${() => this.hideTip()}
3257
- @focus=${(G) => this.showTip(G, v)}
3291
+ @focus=${(K) => this.showTip(K, v)}
3258
3292
  @blur=${() => this.hideTip()}/>`;
3259
3293
  })}
3260
3294
  </svg>
@@ -3262,9 +3296,9 @@ let pt = class extends st {
3262
3296
  <div class="baht-heatmap-scale">
3263
3297
  <span class="baht-heatmap-scale-label">${this.lessLabel}</span>
3264
3298
  ${[0, 1, 2, 3, 4].map(
3265
- (u) => n`<span
3299
+ (u) => l`<span
3266
3300
  class="baht-chart-swatch"
3267
- style=${`background:${Xe(u)}`}
3301
+ style=${`background:${Ye(u)}`}
3268
3302
  aria-hidden="true"
3269
3303
  ></span>`
3270
3304
  )}
@@ -3279,22 +3313,22 @@ let pt = class extends st {
3279
3313
  }
3280
3314
  };
3281
3315
  xt([
3282
- l({ attribute: !1 })
3316
+ n({ attribute: !1 })
3283
3317
  ], pt.prototype, "values", 2);
3284
3318
  xt([
3285
- l()
3319
+ n()
3286
3320
  ], pt.prototype, "from", 2);
3287
3321
  xt([
3288
- l()
3322
+ n()
3289
3323
  ], pt.prototype, "to", 2);
3290
3324
  xt([
3291
- l({ attribute: "less-label" })
3325
+ n({ attribute: "less-label" })
3292
3326
  ], pt.prototype, "lessLabel", 2);
3293
3327
  xt([
3294
- l({ attribute: "more-label" })
3328
+ n({ attribute: "more-label" })
3295
3329
  ], pt.prototype, "moreLabel", 2);
3296
3330
  xt([
3297
- l()
3331
+ n()
3298
3332
  ], pt.prototype, "label", 2);
3299
3333
  pt = xt([
3300
3334
  b("baht-heatmap")
@@ -3304,7 +3338,7 @@ var si = Object.defineProperty, ai = Object.getOwnPropertyDescriptor, Z = (t, e,
3304
3338
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
3305
3339
  return a && s && si(e, i, s), s;
3306
3340
  };
3307
- let U = class extends g {
3341
+ let H = class extends g {
3308
3342
  constructor() {
3309
3343
  super(...arguments), this.value = 0, this.max = 100, this.label = "", this.format = "number", this.currency = "THB", this.thresholds = { warning: 0.8, danger: 1 }, this.expected = null, this.overLabel = "Over budget", this.atLabel = "At budget", this.nearLabel = "Near limit";
3310
3344
  }
@@ -3329,11 +3363,11 @@ let U = class extends g {
3329
3363
  render() {
3330
3364
  var c;
3331
3365
  const t = this.severity, e = Math.min(100, this.fraction * 100), i = (f) => Rt(f, this.format, this.currency), a = this.expected != null && Number.isFinite(this.expected) && this.max ? Math.min(100, Math.max(0, this.expected / this.max * 100)) : null, s = `${i(this.value)} of ${i(this.max)}`, r = t === "warning" && this.fraction >= (((c = this.thresholds) == null ? void 0 : c.danger) ?? 1), o = t === "danger" ? "!" : r ? "=" : t === "warning" ? "△" : "";
3332
- return n`<div class="baht-meter baht-meter--${t}">
3366
+ return l`<div class="baht-meter baht-meter--${t}">
3333
3367
  <div class="baht-meter-head">
3334
- ${this.label ? n`<span class="baht-meter-label">${this.label}</span>` : h}
3368
+ ${this.label ? l`<span class="baht-meter-label">${this.label}</span>` : h}
3335
3369
  <span class="baht-meter-value">${s}</span>
3336
- ${this.statusText ? n`<span class="baht-meter-status"
3370
+ ${this.statusText ? l`<span class="baht-meter-status"
3337
3371
  ><span class="baht-meter-icon" aria-hidden="true">${o}</span
3338
3372
  >${this.statusText}</span
3339
3373
  >` : h}
@@ -3348,49 +3382,49 @@ let U = class extends g {
3348
3382
  aria-valuetext=${`${s}${this.statusText ? `, ${this.statusText}` : ""}`}
3349
3383
  >
3350
3384
  <div class="baht-meter-fill" style=${`width:${e.toFixed(2)}%`}></div>
3351
- ${a != null ? n`<span
3385
+ ${a != null ? l`<span
3352
3386
  class="baht-meter-expected"
3353
3387
  style=${`left:${a.toFixed(2)}%`}
3354
3388
  aria-hidden="true"
3355
3389
  ></span>` : h}
3356
3390
  </div>
3357
- ${a != null ? n`<div class="baht-meter-pace">Expected by now ${i(this.expected)}</div>` : h}
3391
+ ${a != null ? l`<div class="baht-meter-pace">Expected by now ${i(this.expected)}</div>` : h}
3358
3392
  </div>`;
3359
3393
  }
3360
3394
  };
3361
3395
  Z([
3362
- l({ type: Number })
3363
- ], U.prototype, "value", 2);
3396
+ n({ type: Number })
3397
+ ], H.prototype, "value", 2);
3364
3398
  Z([
3365
- l({ type: Number })
3366
- ], U.prototype, "max", 2);
3399
+ n({ type: Number })
3400
+ ], H.prototype, "max", 2);
3367
3401
  Z([
3368
- l()
3369
- ], U.prototype, "label", 2);
3402
+ n()
3403
+ ], H.prototype, "label", 2);
3370
3404
  Z([
3371
- l()
3372
- ], U.prototype, "format", 2);
3405
+ n()
3406
+ ], H.prototype, "format", 2);
3373
3407
  Z([
3374
- l()
3375
- ], U.prototype, "currency", 2);
3408
+ n()
3409
+ ], H.prototype, "currency", 2);
3376
3410
  Z([
3377
- l({ attribute: !1 })
3378
- ], U.prototype, "thresholds", 2);
3411
+ n({ attribute: !1 })
3412
+ ], H.prototype, "thresholds", 2);
3379
3413
  Z([
3380
- l({ type: Number })
3381
- ], U.prototype, "expected", 2);
3414
+ n({ type: Number })
3415
+ ], H.prototype, "expected", 2);
3382
3416
  Z([
3383
- l({ attribute: "over-label" })
3384
- ], U.prototype, "overLabel", 2);
3417
+ n({ attribute: "over-label" })
3418
+ ], H.prototype, "overLabel", 2);
3385
3419
  Z([
3386
- l({ attribute: "at-label" })
3387
- ], U.prototype, "atLabel", 2);
3420
+ n({ attribute: "at-label" })
3421
+ ], H.prototype, "atLabel", 2);
3388
3422
  Z([
3389
- l({ attribute: "near-label" })
3390
- ], U.prototype, "nearLabel", 2);
3391
- U = Z([
3423
+ n({ attribute: "near-label" })
3424
+ ], H.prototype, "nearLabel", 2);
3425
+ H = Z([
3392
3426
  b("baht-meter")
3393
- ], U);
3427
+ ], H);
3394
3428
  var ii = Object.defineProperty, ri = Object.getOwnPropertyDescriptor, me = (t, e, i, a) => {
3395
3429
  for (var s = a > 1 ? void 0 : a ? ri(e, i) : e, r = t.length - 1, o; r >= 0; r--)
3396
3430
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
@@ -3401,21 +3435,21 @@ let Gt = class extends g {
3401
3435
  super(...arguments), this.icon = "🗂️", this.message = "Nothing to display", this.hint = "";
3402
3436
  }
3403
3437
  render() {
3404
- return n`<div class="baht-empty-state">
3405
- ${this.icon ? n`<div class="baht-empty-state-icon" aria-hidden="true">${this.icon}</div>` : h}
3438
+ return l`<div class="baht-empty-state">
3439
+ ${this.icon ? l`<div class="baht-empty-state-icon" aria-hidden="true">${this.icon}</div>` : h}
3406
3440
  <div class="baht-empty-state-message">${this.message}</div>
3407
- ${this.hint ? n`<div class="baht-empty-state-hint">${this.hint}</div>` : h}
3441
+ ${this.hint ? l`<div class="baht-empty-state-hint">${this.hint}</div>` : h}
3408
3442
  </div>`;
3409
3443
  }
3410
3444
  };
3411
3445
  me([
3412
- l()
3446
+ n()
3413
3447
  ], Gt.prototype, "icon", 2);
3414
3448
  me([
3415
- l()
3449
+ n()
3416
3450
  ], Gt.prototype, "message", 2);
3417
3451
  me([
3418
- l()
3452
+ n()
3419
3453
  ], Gt.prototype, "hint", 2);
3420
3454
  Gt = me([
3421
3455
  b("baht-empty-state")
@@ -3433,25 +3467,25 @@ let Bt = class extends g {
3433
3467
  this.dispatchEvent(new CustomEvent("baht-retry", { bubbles: !0, composed: !0 }));
3434
3468
  }
3435
3469
  render() {
3436
- return n`<div class="baht-error-state" role="alert">
3437
- ${this.icon ? n`<div class="baht-error-state-icon" aria-hidden="true">${this.icon}</div>` : h}
3470
+ return l`<div class="baht-error-state" role="alert">
3471
+ ${this.icon ? l`<div class="baht-error-state-icon" aria-hidden="true">${this.icon}</div>` : h}
3438
3472
  <div class="baht-error-state-heading">${this.heading}</div>
3439
- ${this.message ? n`<div class="baht-error-state-message">${this.message}</div>` : h}
3440
- ${this.retryLabel ? n`<baht-button size="sm" label=${this.retryLabel} @click=${this.onRetry}></baht-button>` : h}
3473
+ ${this.message ? l`<div class="baht-error-state-message">${this.message}</div>` : h}
3474
+ ${this.retryLabel ? l`<baht-button size="sm" label=${this.retryLabel} @click=${this.onRetry}></baht-button>` : h}
3441
3475
  </div>`;
3442
3476
  }
3443
3477
  };
3444
3478
  te([
3445
- l()
3479
+ n()
3446
3480
  ], Bt.prototype, "icon", 2);
3447
3481
  te([
3448
- l()
3482
+ n()
3449
3483
  ], Bt.prototype, "heading", 2);
3450
3484
  te([
3451
- l()
3485
+ n()
3452
3486
  ], Bt.prototype, "message", 2);
3453
3487
  te([
3454
- l({ attribute: "retry-label" })
3488
+ n({ attribute: "retry-label" })
3455
3489
  ], Bt.prototype, "retryLabel", 2);
3456
3490
  Bt = te([
3457
3491
  b("baht-error-state")
@@ -3492,9 +3526,9 @@ let dt = class extends g {
3492
3526
  this.rows = [...this.rows, { k: "", v: "" }];
3493
3527
  }
3494
3528
  render() {
3495
- return n`<div class="baht-keyvalue">
3529
+ return l`<div class="baht-keyvalue">
3496
3530
  ${this.rows.map(
3497
- (t, e) => n`<div class="baht-keyvalue-row">
3531
+ (t, e) => l`<div class="baht-keyvalue-row">
3498
3532
  <input
3499
3533
  class="baht-control baht-keyvalue-key"
3500
3534
  placeholder=${this.keyPlaceholder}
@@ -3531,19 +3565,19 @@ let dt = class extends g {
3531
3565
  }
3532
3566
  };
3533
3567
  _t([
3534
- l({ attribute: !1 })
3568
+ n({ attribute: !1 })
3535
3569
  ], dt.prototype, "value", 2);
3536
3570
  _t([
3537
- l({ attribute: "key-placeholder" })
3571
+ n({ attribute: "key-placeholder" })
3538
3572
  ], dt.prototype, "keyPlaceholder", 2);
3539
3573
  _t([
3540
- l({ attribute: "value-placeholder" })
3574
+ n({ attribute: "value-placeholder" })
3541
3575
  ], dt.prototype, "valuePlaceholder", 2);
3542
3576
  _t([
3543
- l({ attribute: "add-label" })
3577
+ n({ attribute: "add-label" })
3544
3578
  ], dt.prototype, "add_label", 2);
3545
3579
  _t([
3546
- l({ type: Boolean })
3580
+ n({ type: Boolean })
3547
3581
  ], dt.prototype, "disabled", 2);
3548
3582
  _t([
3549
3583
  y()
@@ -3551,7 +3585,7 @@ _t([
3551
3585
  dt = _t([
3552
3586
  b("baht-keyvalue-editor")
3553
3587
  ], dt);
3554
- var ci = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, A = (t, e, i, a) => {
3588
+ var ci = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, L = (t, e, i, a) => {
3555
3589
  for (var s = a > 1 ? void 0 : a ? pi(e, i) : e, r = t.length - 1, o; r >= 0; r--)
3556
3590
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
3557
3591
  return a && s && ci(e, i, s), s;
@@ -3566,16 +3600,16 @@ let j = class extends g {
3566
3600
  return `baht-refpicker-list-${this.uid}`;
3567
3601
  }
3568
3602
  disconnectedCallback() {
3569
- super.disconnectedCallback(), clearTimeout(this.timer), S() && document.removeEventListener("mousedown", this.onDocMousedown);
3603
+ super.disconnectedCallback(), clearTimeout(this.timer), T() && document.removeEventListener("mousedown", this.onDocMousedown);
3570
3604
  }
3571
3605
  openLookup() {
3572
- this.disabled || this.open || (this.open = !0, this.term = "", this.activeIndex = -1, S() && document.addEventListener("mousedown", this.onDocMousedown), this.search(""), this.updateComplete.then(() => {
3606
+ this.disabled || this.open || (this.open = !0, this.term = "", this.activeIndex = -1, T() && document.addEventListener("mousedown", this.onDocMousedown), this.search(""), this.updateComplete.then(() => {
3573
3607
  var t;
3574
3608
  return (t = this.inputEl) == null ? void 0 : t.focus();
3575
3609
  }));
3576
3610
  }
3577
3611
  close() {
3578
- this.open && (this.open = !1, this.loading = !1, clearTimeout(this.timer), S() && document.removeEventListener("mousedown", this.onDocMousedown));
3612
+ this.open && (this.open = !1, this.loading = !1, clearTimeout(this.timer), T() && document.removeEventListener("mousedown", this.onDocMousedown));
3579
3613
  }
3580
3614
  search(t) {
3581
3615
  clearTimeout(this.timer), this.timer = setTimeout(async () => {
@@ -3624,7 +3658,7 @@ let j = class extends g {
3624
3658
  }
3625
3659
  render() {
3626
3660
  const t = this.open ? this.term : this.display || this.value;
3627
- return n`<div class="baht-refpicker${this.open ? " baht-refpicker--open" : ""}">
3661
+ return l`<div class="baht-refpicker${this.open ? " baht-refpicker--open" : ""}">
3628
3662
  <div class="baht-refpicker-field">
3629
3663
  <input
3630
3664
  class="baht-control baht-refpicker-input"
@@ -3644,7 +3678,7 @@ let j = class extends g {
3644
3678
  @input=${this.onInput}
3645
3679
  @keydown=${this.onKeydown}
3646
3680
  />
3647
- ${this.value && !this.disabled ? n`<button
3681
+ ${this.value && !this.disabled ? l`<button
3648
3682
  type="button"
3649
3683
  class="baht-refpicker-clear"
3650
3684
  aria-label="Clear"
@@ -3660,7 +3694,7 @@ let j = class extends g {
3660
3694
  ?disabled=${this.disabled}
3661
3695
  @click=${() => this.open ? this.close() : this.openLookup()}
3662
3696
  >${W("search")}</button>
3663
- ${this.value && this.href ? n`<a
3697
+ ${this.value && this.href ? l`<a
3664
3698
  class="baht-refpicker-open"
3665
3699
  href=${this.href}
3666
3700
  aria-label="Open record"
@@ -3674,8 +3708,8 @@ let j = class extends g {
3674
3708
  aria-busy=${this.loading ? "true" : h}
3675
3709
  ?hidden=${!this.open}
3676
3710
  >
3677
- ${this.loading ? n`<div class="baht-refpicker-note" role="option" aria-disabled="true" aria-selected="false">Searching…</div>` : this.options.length === 0 ? n`<div class="baht-refpicker-note" role="option" aria-disabled="true" aria-selected="false">No matches</div>` : this.options.map(
3678
- (e, i) => n`<button
3711
+ ${this.loading ? l`<div class="baht-refpicker-note" role="option" aria-disabled="true" aria-selected="false">Searching…</div>` : this.options.length === 0 ? l`<div class="baht-refpicker-note" role="option" aria-disabled="true" aria-selected="false">No matches</div>` : this.options.map(
3712
+ (e, i) => l`<button
3679
3713
  type="button"
3680
3714
  class="baht-refpicker-option${i === this.activeIndex ? " baht-refpicker-option--active" : ""}"
3681
3715
  id="${this.listboxId}-${i}"
@@ -3685,65 +3719,65 @@ let j = class extends g {
3685
3719
  @click=${() => this.pick(e)}
3686
3720
  >
3687
3721
  <span class="baht-refpicker-option-label">${e.label}</span>
3688
- ${e.sub ? n`<span class="baht-refpicker-option-sub">${e.sub}</span>` : h}
3722
+ ${e.sub ? l`<span class="baht-refpicker-option-sub">${e.sub}</span>` : h}
3689
3723
  </button>`
3690
3724
  )}
3691
3725
  </div>
3692
3726
  </div>`;
3693
3727
  }
3694
3728
  };
3695
- A([
3696
- l()
3729
+ L([
3730
+ n()
3697
3731
  ], j.prototype, "label", 2);
3698
- A([
3699
- l()
3732
+ L([
3733
+ n()
3700
3734
  ], j.prototype, "value", 2);
3701
- A([
3702
- l()
3735
+ L([
3736
+ n()
3703
3737
  ], j.prototype, "display", 2);
3704
- A([
3705
- l()
3738
+ L([
3739
+ n()
3706
3740
  ], j.prototype, "placeholder", 2);
3707
- A([
3708
- l({ type: Boolean })
3741
+ L([
3742
+ n({ type: Boolean })
3709
3743
  ], j.prototype, "disabled", 2);
3710
- A([
3711
- l({ type: Boolean })
3744
+ L([
3745
+ n({ type: Boolean })
3712
3746
  ], j.prototype, "invalid", 2);
3713
- A([
3714
- l()
3747
+ L([
3748
+ n()
3715
3749
  ], j.prototype, "href", 2);
3716
- A([
3717
- l({ attribute: "lookup-label" })
3750
+ L([
3751
+ n({ attribute: "lookup-label" })
3718
3752
  ], j.prototype, "lookupLabel", 2);
3719
- A([
3720
- l({ type: Number })
3753
+ L([
3754
+ n({ type: Number })
3721
3755
  ], j.prototype, "debounce", 2);
3722
- A([
3723
- l({ attribute: !1 })
3756
+ L([
3757
+ n({ attribute: !1 })
3724
3758
  ], j.prototype, "fetcher", 2);
3725
- A([
3759
+ L([
3726
3760
  y()
3727
3761
  ], j.prototype, "open", 2);
3728
- A([
3762
+ L([
3729
3763
  y()
3730
3764
  ], j.prototype, "term", 2);
3731
- A([
3765
+ L([
3732
3766
  y()
3733
3767
  ], j.prototype, "options", 2);
3734
- A([
3768
+ L([
3735
3769
  y()
3736
3770
  ], j.prototype, "loading", 2);
3737
- A([
3771
+ L([
3738
3772
  y()
3739
3773
  ], j.prototype, "activeIndex", 2);
3740
- A([
3741
- It("input")
3774
+ L([
3775
+ Mt("input")
3742
3776
  ], j.prototype, "inputEl", 2);
3743
- j = A([
3777
+ j = L([
3744
3778
  b("baht-reference-picker")
3745
3779
  ], j);
3746
- var di = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, M = (t, e, i, a) => {
3780
+ var di = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, I = (t, e, i, a) => {
3747
3781
  for (var s = a > 1 ? void 0 : a ? ui(e, i) : e, r = t.length - 1, o; r >= 0; r--)
3748
3782
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
3749
3783
  return a && s && di(e, i, s), s;
@@ -3764,7 +3798,7 @@ let E = class extends g {
3764
3798
  return `${this.listboxId}-${t}`;
3765
3799
  }
3766
3800
  disconnectedCallback() {
3767
- super.disconnectedCallback(), clearTimeout(this.timer), S() && document.removeEventListener("mousedown", this.onDocMousedown);
3801
+ super.disconnectedCallback(), clearTimeout(this.timer), T() && document.removeEventListener("mousedown", this.onDocMousedown);
3768
3802
  }
3769
3803
  willUpdate(t) {
3770
3804
  super.willUpdate(t), t.has("value") && this.timer === void 0 && (this.term = this.value);
@@ -3811,10 +3845,10 @@ let E = class extends g {
3811
3845
  this.activeIndex !== t && (this.activeIndex = t);
3812
3846
  }
3813
3847
  listen() {
3814
- S() && document.addEventListener("mousedown", this.onDocMousedown);
3848
+ T() && document.addEventListener("mousedown", this.onDocMousedown);
3815
3849
  }
3816
3850
  close() {
3817
- S() && document.removeEventListener("mousedown", this.onDocMousedown), this.open && (this.open = !1, this.activeIndex = -1);
3851
+ T() && document.removeEventListener("mousedown", this.onDocMousedown), this.open && (this.open = !1, this.activeIndex = -1);
3818
3852
  }
3819
3853
  // ---- events ------------------------------------------------------------
3820
3854
  emitChange(t, e) {
@@ -3880,7 +3914,7 @@ let E = class extends g {
3880
3914
  }
3881
3915
  render() {
3882
3916
  const t = this.open, e = !this.loading && this.results.length === 0;
3883
- return n`<div class="baht-typeahead${this.open ? " baht-typeahead--open" : ""}">
3917
+ return l`<div class="baht-typeahead${this.open ? " baht-typeahead--open" : ""}">
3884
3918
  <input
3885
3919
  class="baht-control baht-typeahead-input"
3886
3920
  id=${this.inputId}
@@ -3908,9 +3942,9 @@ let E = class extends g {
3908
3942
  aria-busy=${this.loading ? "true" : h}
3909
3943
  ?hidden=${!t}
3910
3944
  >
3911
- ${this.loading ? n`<div class="baht-listbox-note" role="option" aria-disabled="true" aria-selected="false">Searching…</div>` : e ? n`<div class="baht-listbox-note" role="option" aria-disabled="true" aria-selected="false">No matches</div>` : this.results.map(
3945
+ ${this.loading ? l`<div class="baht-listbox-note" role="option" aria-disabled="true" aria-selected="false">Searching…</div>` : e ? l`<div class="baht-listbox-note" role="option" aria-disabled="true" aria-selected="false">No matches</div>` : this.results.map(
3912
3946
  // eslint-disable-next-line lit-a11y/click-events-have-key-events -- keyboard lives on the combobox input (aria-activedescendant pattern)
3913
- (i, a) => n`<div
3947
+ (i, a) => l`<div
3914
3948
  class="baht-listbox-option${a === this.activeIndex ? " baht-listbox-option--active" : ""}"
3915
3949
  id=${this.optionId(a)}
3916
3950
  role="option"
@@ -3924,68 +3958,68 @@ let E = class extends g {
3924
3958
  }}
3925
3959
  >
3926
3960
  <span class="baht-listbox-option-label">${i.label}</span>
3927
- ${i.sub ? n`<span class="baht-listbox-option-sub">${i.sub}</span>` : h}
3961
+ ${i.sub ? l`<span class="baht-listbox-option-sub">${i.sub}</span>` : h}
3928
3962
  </div>`
3929
3963
  )}
3930
3964
  </div>
3931
3965
  </div>`;
3932
3966
  }
3933
3967
  };
3934
- M([
3935
- l()
3968
+ I([
3969
+ n()
3936
3970
  ], E.prototype, "label", 2);
3937
- M([
3938
- l()
3971
+ I([
3972
+ n()
3939
3973
  ], E.prototype, "value", 2);
3940
- M([
3941
- l()
3974
+ I([
3975
+ n()
3942
3976
  ], E.prototype, "placeholder", 2);
3943
- M([
3944
- l({ type: Boolean })
3977
+ I([
3978
+ n({ type: Boolean })
3945
3979
  ], E.prototype, "disabled", 2);
3946
- M([
3947
- l({ type: Boolean })
3980
+ I([
3981
+ n({ type: Boolean })
3948
3982
  ], E.prototype, "invalid", 2);
3949
- M([
3950
- l({ attribute: !1 })
3983
+ I([
3984
+ n({ attribute: !1 })
3951
3985
  ], E.prototype, "options", 2);
3952
- M([
3953
- l({ attribute: !1 })
3986
+ I([
3987
+ n({ attribute: !1 })
3954
3988
  ], E.prototype, "fetcher", 2);
3955
- M([
3956
- l({ type: Number })
3989
+ I([
3990
+ n({ type: Number })
3957
3991
  ], E.prototype, "debounce", 2);
3958
- M([
3959
- l({ type: Number, attribute: "min-chars" })
3992
+ I([
3993
+ n({ type: Number, attribute: "min-chars" })
3960
3994
  ], E.prototype, "minChars", 2);
3961
- M([
3962
- l({ type: Number, attribute: "max-items" })
3995
+ I([
3996
+ n({ type: Number, attribute: "max-items" })
3963
3997
  ], E.prototype, "maxItems", 2);
3964
- M([
3965
- l({ attribute: "free-text", converter: (t) => t !== "false" })
3998
+ I([
3999
+ n({ attribute: "free-text", converter: (t) => t !== "false" })
3966
4000
  ], E.prototype, "freeText", 2);
3967
- M([
3968
- l()
4001
+ I([
4002
+ n()
3969
4003
  ], E.prototype, "autocomplete", 2);
3970
- M([
4004
+ I([
3971
4005
  y()
3972
4006
  ], E.prototype, "term", 2);
3973
- M([
4007
+ I([
3974
4008
  y()
3975
4009
  ], E.prototype, "open", 2);
3976
- M([
4010
+ I([
3977
4011
  y()
3978
4012
  ], E.prototype, "results", 2);
3979
- M([
4013
+ I([
3980
4014
  y()
3981
4015
  ], E.prototype, "loading", 2);
3982
- M([
4016
+ I([
3983
4017
  y()
3984
4018
  ], E.prototype, "activeIndex", 2);
3985
- M([
3986
- It("input")
4019
+ I([
4020
+ Mt("input")
3987
4021
  ], E.prototype, "inputEl", 2);
3988
- E = M([
4022
+ E = I([
3989
4023
  b("baht-typeahead")
3990
4024
  ], E);
3991
4025
  const cs = {
@@ -4020,7 +4054,7 @@ function vi(t) {
4020
4054
  let e = as.get(t);
4021
4055
  return e || (e = os(t), as.set(t, e)), e;
4022
4056
  }
4023
- let Ie = class extends Y {
4057
+ let Me = class extends X {
4024
4058
  constructor() {
4025
4059
  super(...arguments), this.rowErrors = [];
4026
4060
  }
@@ -4049,7 +4083,7 @@ let Ie = class extends Y {
4049
4083
  /** Pending keystrokes in any row land in the array before the host reads it. */
4050
4084
  flushTyped() {
4051
4085
  var t;
4052
- if (!S()) return super.flushTyped();
4086
+ if (!T()) return super.flushTyped();
4053
4087
  for (const e of this.querySelectorAll(".baht-repeater-row > .baht-field > *"))
4054
4088
  (t = e.flushTyped) == null || t.call(e);
4055
4089
  super.flushTyped();
@@ -4072,7 +4106,7 @@ let Ie = class extends Y {
4072
4106
  const { value: f } = c.detail;
4073
4107
  this.patchRow(e, i.key, f);
4074
4108
  };
4075
- return n`<div class="baht-field ${r}" data-key=${i.key} data-type=${i.type}>
4109
+ return l`<div class="baht-field ${r}" data-key=${i.key} data-type=${i.type}>
4076
4110
  ${se`<${s}
4077
4111
  .field=${i}
4078
4112
  .value=${Object.hasOwn(t, i.key) ? t[i.key] : ae(i)}
@@ -4087,7 +4121,7 @@ let Ie = class extends Y {
4087
4121
  }
4088
4122
  renderControl() {
4089
4123
  const t = this.rows, e = !this.disabled && !this.readonly, i = this.field.max_rows !== void 0 && t.length >= this.field.max_rows;
4090
- return n`<div
4124
+ return l`<div
4091
4125
  class="baht-repeater"
4092
4126
  id=${this.controlId}
4093
4127
  role="group"
@@ -4097,7 +4131,7 @@ let Ie = class extends Y {
4097
4131
  ${Ce(
4098
4132
  t,
4099
4133
  (a, s) => s,
4100
- (a, s) => n`<div
4134
+ (a, s) => l`<div
4101
4135
  class="baht-repeater-row"
4102
4136
  data-row=${s}
4103
4137
  role="group"
@@ -4108,7 +4142,7 @@ let Ie = class extends Y {
4108
4142
  (r) => r.key,
4109
4143
  (r) => this.renderSub(a, s, r)
4110
4144
  )}
4111
- ${e ? n`<button
4145
+ ${e ? l`<button
4112
4146
  type="button"
4113
4147
  class="baht-repeater-remove"
4114
4148
  aria-label=${m("removeRowN", { n: s + 1 })}
@@ -4119,7 +4153,7 @@ let Ie = class extends Y {
4119
4153
  </button>` : h}
4120
4154
  </div>`
4121
4155
  )}
4122
- ${this.readonly ? h : n`<button
4156
+ ${this.readonly ? h : l`<button
4123
4157
  type="button"
4124
4158
  class="baht-repeater-add"
4125
4159
  ?disabled=${this.disabled || i}
@@ -4131,11 +4165,11 @@ let Ie = class extends Y {
4131
4165
  }
4132
4166
  };
4133
4167
  ps([
4134
- l({ attribute: !1 })
4135
- ], Ie.prototype, "rowErrors", 2);
4136
- Ie = ps([
4168
+ n({ attribute: !1 })
4169
+ ], Me.prototype, "rowErrors", 2);
4170
+ Me = ps([
4137
4171
  b("baht-repeater")
4138
- ], Ie);
4172
+ ], Me);
4139
4173
  var $i = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, ve = (t, e, i, a) => {
4140
4174
  for (var s = a > 1 ? void 0 : a ? yi(e, i) : e, r = t.length - 1, o; r >= 0; r--)
4141
4175
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
@@ -4147,32 +4181,32 @@ let Wt = class extends g {
4147
4181
  }
4148
4182
  render() {
4149
4183
  const t = this.variant === "sidebar";
4150
- return n`<ol
4184
+ return l`<ol
4151
4185
  class="baht-steps ${t ? "baht-steps--sidebar" : ""}"
4152
4186
  aria-label=${m("step", { current: this.current + 1, total: this.steps.length })}
4153
4187
  >
4154
4188
  ${this.steps.map((e, i) => {
4155
4189
  const a = i < this.current ? "done" : i === this.current ? "current" : "todo";
4156
- return n`<li
4190
+ return l`<li
4157
4191
  class="baht-step baht-step--${a} ${t ? "baht-step--sidebar" : ""}"
4158
4192
  aria-current=${a === "current" ? "step" : "false"}
4159
4193
  >
4160
- ${t ? h : n`<span class="baht-step-marker" aria-hidden="true">${a === "done" ? "✓" : i + 1}</span>`}
4194
+ ${t ? h : l`<span class="baht-step-marker" aria-hidden="true">${a === "done" ? "✓" : i + 1}</span>`}
4161
4195
  <span class="baht-step-label">${e}</span>
4162
- ${a === "done" ? n`<span class="baht-visually-hidden"> (${m("stepDone")})</span>` : a === "current" ? n`<span class="baht-visually-hidden"> (${m("stepCurrent")})</span>` : h}
4196
+ ${a === "done" ? l`<span class="baht-visually-hidden"> (${m("stepDone")})</span>` : a === "current" ? l`<span class="baht-visually-hidden"> (${m("stepCurrent")})</span>` : h}
4163
4197
  </li>`;
4164
4198
  })}
4165
4199
  </ol>`;
4166
4200
  }
4167
4201
  };
4168
4202
  ve([
4169
- l({ attribute: !1 })
4203
+ n({ attribute: !1 })
4170
4204
  ], Wt.prototype, "steps", 2);
4171
4205
  ve([
4172
- l({ type: Number })
4206
+ n({ type: Number })
4173
4207
  ], Wt.prototype, "current", 2);
4174
4208
  ve([
4175
- l()
4209
+ n()
4176
4210
  ], Wt.prototype, "variant", 2);
4177
4211
  Wt = ve([
4178
4212
  b("baht-steps")
@@ -4192,7 +4226,7 @@ function _i(t) {
4192
4226
  let e = is.get(t);
4193
4227
  return e || (e = os(t), is.set(t, e)), e;
4194
4228
  }
4195
- let H = class extends g {
4229
+ let G = class extends g {
4196
4230
  constructor() {
4197
4231
  super(...arguments), this.value = {}, this.registry = {}, this.options = {}, this.fieldStates = {}, this.flags = {}, this.readonly = !1, this.edits = {}, this.errors = [], this.dynamicOptions = /* @__PURE__ */ new Map(), this.optionsSnapshots = /* @__PURE__ */ new Map(), this.optionsEpoch = /* @__PURE__ */ new Map(), this.warnedViews = /* @__PURE__ */ new Set(), this.flagCache = {};
4198
4232
  }
@@ -4269,7 +4303,7 @@ let H = class extends g {
4269
4303
  /** Debounced keystrokes still in a control land in `edits` before anyone reads them. */
4270
4304
  flushTyped() {
4271
4305
  var t;
4272
- if (S())
4306
+ if (T())
4273
4307
  for (const e of this.querySelectorAll(":scope > .baht-form > .baht-field > *"))
4274
4308
  (t = e.flushTyped) == null || t.call(e);
4275
4309
  }
@@ -4378,7 +4412,7 @@ let H = class extends g {
4378
4412
  .debounce=${$}
4379
4413
  @baht-input=${w}
4380
4414
  ></${p}>`;
4381
- return n`<div
4415
+ return l`<div
4382
4416
  class="baht-field ${a} ${i.visible ? "" : "baht-field--hidden"}"
4383
4417
  data-key=${t.key}
4384
4418
  data-type=${t.type}
@@ -4398,13 +4432,13 @@ let H = class extends g {
4398
4432
  i && this.onFieldInput(i, e);
4399
4433
  }
4400
4434
  renderReadonlyField(t, e, i) {
4401
- const a = t.options_from ? this.dynamicOptions.get(t.key) ?? t.options ?? [] : t.options, s = bs(t, this.valueFor(t), a), r = s.kind === "empty" ? n`<span class="baht-readonly-value baht-readonly-value--empty">${m("emptyValue")}</span>` : s.kind === "text" ? n`<span class="baht-readonly-value">${s.text}</span>` : s.kind === "chips" ? n`<span class="baht-readonly-value baht-readonly-chips"
4402
- >${s.items.map((o) => n`<span class="baht-readonly-chip">${o}</span>`)}</span
4403
- >` : n`<div class="baht-readonly-rows">
4435
+ const a = t.options_from ? this.dynamicOptions.get(t.key) ?? t.options ?? [] : t.options, s = bs(t, this.valueFor(t), a), r = s.kind === "empty" ? l`<span class="baht-readonly-value baht-readonly-value--empty">${m("emptyValue")}</span>` : s.kind === "text" ? l`<span class="baht-readonly-value">${s.text}</span>` : s.kind === "chips" ? l`<span class="baht-readonly-value baht-readonly-chips"
4436
+ >${s.items.map((o) => l`<span class="baht-readonly-chip">${o}</span>`)}</span
4437
+ >` : l`<div class="baht-readonly-rows">
4404
4438
  ${s.rows.map(
4405
- (o) => n`<div class="baht-readonly-row">
4439
+ (o) => l`<div class="baht-readonly-row">
4406
4440
  ${o.map(
4407
- (c) => n`<span class="baht-readonly-cell"
4441
+ (c) => l`<span class="baht-readonly-cell"
4408
4442
  ><span class="baht-readonly-cell-label">${c.label}</span
4409
4443
  ><span class="baht-readonly-cell-value">${c.text}</span></span
4410
4444
  >`
@@ -4412,18 +4446,18 @@ let H = class extends g {
4412
4446
  </div>`
4413
4447
  )}
4414
4448
  </div>`;
4415
- return n`<div
4449
+ return l`<div
4416
4450
  class="baht-field ${e} baht-field--readonly ${i ? "" : "baht-field--hidden"}"
4417
4451
  data-key=${t.key}
4418
4452
  data-type=${t.type}
4419
4453
  data-testid="${this.form.form_id}.${t.key}"
4420
4454
  >
4421
- ${t.label ? n`<span class="baht-label">${t.label}</span>` : h}
4455
+ ${t.label ? l`<span class="baht-label">${t.label}</span>` : h}
4422
4456
  ${r}
4423
4457
  </div>`;
4424
4458
  }
4425
4459
  render() {
4426
- return n`<div class="baht-form ${this.readonly ? "baht-form--readonly" : ""}">
4460
+ return l`<div class="baht-form ${this.readonly ? "baht-form--readonly" : ""}">
4427
4461
  ${Ce(
4428
4462
  this.sortedFields,
4429
4463
  (t) => t.key,
@@ -4433,44 +4467,44 @@ let H = class extends g {
4433
4467
  }
4434
4468
  };
4435
4469
  Q([
4436
- l({ attribute: !1 })
4437
- ], H.prototype, "form", 2);
4470
+ n({ attribute: !1 })
4471
+ ], G.prototype, "form", 2);
4438
4472
  Q([
4439
- l({ attribute: !1 })
4440
- ], H.prototype, "value", 2);
4473
+ n({ attribute: !1 })
4474
+ ], G.prototype, "value", 2);
4441
4475
  Q([
4442
- l({ attribute: !1 })
4443
- ], H.prototype, "registry", 2);
4476
+ n({ attribute: !1 })
4477
+ ], G.prototype, "registry", 2);
4444
4478
  Q([
4445
- l({ attribute: !1 })
4446
- ], H.prototype, "options", 2);
4479
+ n({ attribute: !1 })
4480
+ ], G.prototype, "options", 2);
4447
4481
  Q([
4448
- l({ attribute: !1 })
4449
- ], H.prototype, "fieldStates", 2);
4482
+ n({ attribute: !1 })
4483
+ ], G.prototype, "fieldStates", 2);
4450
4484
  Q([
4451
- l({ type: String })
4452
- ], H.prototype, "view", 2);
4485
+ n({ type: String })
4486
+ ], G.prototype, "view", 2);
4453
4487
  Q([
4454
- l({ attribute: !1 })
4455
- ], H.prototype, "flags", 2);
4488
+ n({ attribute: !1 })
4489
+ ], G.prototype, "flags", 2);
4456
4490
  Q([
4457
- l({ type: Boolean })
4458
- ], H.prototype, "readonly", 2);
4491
+ n({ type: Boolean })
4492
+ ], G.prototype, "readonly", 2);
4459
4493
  Q([
4460
4494
  y()
4461
- ], H.prototype, "edits", 2);
4495
+ ], G.prototype, "edits", 2);
4462
4496
  Q([
4463
4497
  y()
4464
- ], H.prototype, "errors", 2);
4465
- H = Q([
4498
+ ], G.prototype, "errors", 2);
4499
+ G = Q([
4466
4500
  b("baht-form")
4467
- ], H);
4468
- var ki = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, q = (t, e, i, a) => {
4501
+ ], G);
4502
+ var ki = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, R = (t, e, i, a) => {
4469
4503
  for (var s = a > 1 ? void 0 : a ? Pi(e, i) : e, r = t.length - 1, o; r >= 0; r--)
4470
4504
  (o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
4471
4505
  return a && s && ki(e, i, s), s;
4472
4506
  };
4473
- let T = class extends g {
4507
+ let A = class extends g {
4474
4508
  constructor() {
4475
4509
  super(...arguments), this.value = {}, this.registry = {}, this.validateGate = !0, this.showBack = !0, this.flags = {}, this.showSteps = !1, this.stepsVariant = "default", this.data = {}, this.derived = null, this.current = null, this.approvalError = null, this.history = [], this.flagCache = {};
4476
4510
  }
@@ -4652,10 +4686,10 @@ let T = class extends g {
4652
4686
  renderApproval(t) {
4653
4687
  var a, s;
4654
4688
  const e = ((a = t.approval) == null ? void 0 : a.comment) ?? "optional", i = this.summary_forms(t);
4655
- return n`<div class="baht-approval">
4689
+ return l`<div class="baht-approval">
4656
4690
  <div class="baht-approval-summary">
4657
- ${i.length === 0 ? n`<p class="baht-approval-empty">${m("nothingToReview")}</p>` : i.map(
4658
- (r) => n`<section class="baht-approval-group">
4691
+ ${i.length === 0 ? l`<p class="baht-approval-empty">${m("nothingToReview")}</p>` : i.map(
4692
+ (r) => l`<section class="baht-approval-group">
4659
4693
  <h4 class="baht-approval-group-title">${r.form_name}</h4>
4660
4694
  <baht-form
4661
4695
  readonly
@@ -4666,7 +4700,7 @@ let T = class extends g {
4666
4700
  </section>`
4667
4701
  )}
4668
4702
  </div>
4669
- ${e !== "hidden" ? n`<label class="baht-approval-comment">
4703
+ ${e !== "hidden" ? l`<label class="baht-approval-comment">
4670
4704
  <span class="baht-approval-comment-label">
4671
4705
  ${m("comment")}${e === "required" ? m("commentRequiredSuffix") : ""}
4672
4706
  </span>
@@ -4678,15 +4712,15 @@ let T = class extends g {
4678
4712
  @input=${(r) => this.onCommentInput(t.form_name, r.target.value)}
4679
4713
  ></textarea>
4680
4714
  </label>` : h}
4681
- ${this.approvalError ? n`<p class="baht-error" role="alert">${this.approvalError}</p>` : h}
4715
+ ${this.approvalError ? l`<p class="baht-error" role="alert">${this.approvalError}</p>` : h}
4682
4716
  </div>`;
4683
4717
  }
4684
4718
  render() {
4685
4719
  var s, r;
4686
4720
  const t = this.currentForm;
4687
- if (!t) return n`<div class="baht-workflow"></div>`;
4721
+ if (!t) return l`<div class="baht-workflow"></div>`;
4688
4722
  const e = t.kind === "approval", i = this.visibleForms, a = i.findIndex((o) => o.form_name === t.form_name);
4689
- return n`<div
4723
+ return l`<div
4690
4724
  class="baht-workflow"
4691
4725
  data-step=${t.form_name}
4692
4726
  data-testid="${this.workflow.workflow_id}.${t.form_name}"
@@ -4694,12 +4728,12 @@ let T = class extends g {
4694
4728
  <div class="baht-visually-hidden" role="status">
4695
4729
  ${m("step", { current: a + 1, total: i.length })}
4696
4730
  </div>
4697
- ${this.showSteps ? n`<baht-steps
4731
+ ${this.showSteps ? l`<baht-steps
4698
4732
  .steps=${i.map((o) => o.form_name)}
4699
4733
  .current=${a}
4700
4734
  .variant=${this.stepsVariant}
4701
4735
  ></baht-steps>` : h}
4702
- ${e ? this.renderApproval(t) : n`<baht-form
4736
+ ${e ? this.renderApproval(t) : l`<baht-form
4703
4737
  .form=${t}
4704
4738
  .value=${this.data[t.form_name] ?? {}}
4705
4739
  .registry=${this.registry}
@@ -4708,13 +4742,13 @@ let T = class extends g {
4708
4742
  @baht-change=${(o) => this.onFormChange(o)}
4709
4743
  ></baht-form>`}
4710
4744
  <div class="baht-workflow-nav">
4711
- ${this.showBack && this.history.length > 0 ? n`<button type="button" class="baht-button baht-button--back"
4745
+ ${this.showBack && this.history.length > 0 ? l`<button type="button" class="baht-button baht-button--back"
4712
4746
  data-testid="${this.workflow.workflow_id}.back"
4713
4747
  @click=${() => this.back()}
4714
4748
  >
4715
4749
  ${this.backLabel ?? m("back")}
4716
4750
  </button>` : h}
4717
- ${e ? n`<button
4751
+ ${e ? l`<button
4718
4752
  type="button"
4719
4753
  class="baht-button baht-button--reject"
4720
4754
  data-testid="${this.workflow.workflow_id}.reject"
@@ -4729,7 +4763,7 @@ let T = class extends g {
4729
4763
  @click=${() => this.decide("approved")}
4730
4764
  >
4731
4765
  ${((r = t.approval) == null ? void 0 : r.approve_label) ?? m("approve")}
4732
- </button>` : n`<button type="button" class="baht-button baht-button--next"
4766
+ </button>` : l`<button type="button" class="baht-button baht-button--next"
4733
4767
  data-testid="${this.workflow.workflow_id}.next"
4734
4768
  @click=${() => this.next()}
4735
4769
  >
@@ -4739,56 +4773,56 @@ let T = class extends g {
4739
4773
  </div>`;
4740
4774
  }
4741
4775
  };
4742
- q([
4743
- l({ attribute: !1 })
4744
- ], T.prototype, "workflow", 2);
4745
- q([
4746
- l({ attribute: !1 })
4747
- ], T.prototype, "value", 2);
4748
- q([
4749
- l({ attribute: !1 })
4750
- ], T.prototype, "registry", 2);
4751
- q([
4752
- l({ type: Boolean, attribute: "validate-gate" })
4753
- ], T.prototype, "validateGate", 2);
4754
- q([
4755
- l({ attribute: "next-label" })
4756
- ], T.prototype, "nextLabel", 2);
4757
- q([
4758
- l({ attribute: "submit-label" })
4759
- ], T.prototype, "submitLabel", 2);
4760
- q([
4761
- l({ attribute: "back-label" })
4762
- ], T.prototype, "backLabel", 2);
4763
- q([
4764
- l({ type: Boolean, attribute: "show-back" })
4765
- ], T.prototype, "showBack", 2);
4766
- q([
4767
- l({ attribute: !1 })
4768
- ], T.prototype, "flags", 2);
4769
- q([
4770
- l({ type: Boolean, attribute: "show-steps" })
4771
- ], T.prototype, "showSteps", 2);
4772
- q([
4773
- l({ attribute: "steps-variant" })
4774
- ], T.prototype, "stepsVariant", 2);
4775
- q([
4776
+ R([
4777
+ n({ attribute: !1 })
4778
+ ], A.prototype, "workflow", 2);
4779
+ R([
4780
+ n({ attribute: !1 })
4781
+ ], A.prototype, "value", 2);
4782
+ R([
4783
+ n({ attribute: !1 })
4784
+ ], A.prototype, "registry", 2);
4785
+ R([
4786
+ n({ type: Boolean, attribute: "validate-gate" })
4787
+ ], A.prototype, "validateGate", 2);
4788
+ R([
4789
+ n({ attribute: "next-label" })
4790
+ ], A.prototype, "nextLabel", 2);
4791
+ R([
4792
+ n({ attribute: "submit-label" })
4793
+ ], A.prototype, "submitLabel", 2);
4794
+ R([
4795
+ n({ attribute: "back-label" })
4796
+ ], A.prototype, "backLabel", 2);
4797
+ R([
4798
+ n({ type: Boolean, attribute: "show-back" })
4799
+ ], A.prototype, "showBack", 2);
4800
+ R([
4801
+ n({ attribute: !1 })
4802
+ ], A.prototype, "flags", 2);
4803
+ R([
4804
+ n({ type: Boolean, attribute: "show-steps" })
4805
+ ], A.prototype, "showSteps", 2);
4806
+ R([
4807
+ n({ attribute: "steps-variant" })
4808
+ ], A.prototype, "stepsVariant", 2);
4809
+ R([
4776
4810
  y()
4777
- ], T.prototype, "data", 2);
4778
- q([
4811
+ ], A.prototype, "data", 2);
4812
+ R([
4779
4813
  y()
4780
- ], T.prototype, "derived", 2);
4781
- q([
4814
+ ], A.prototype, "derived", 2);
4815
+ R([
4782
4816
  y()
4783
- ], T.prototype, "current", 2);
4784
- q([
4817
+ ], A.prototype, "current", 2);
4818
+ R([
4785
4819
  y()
4786
- ], T.prototype, "approvalError", 2);
4787
- T = q([
4820
+ ], A.prototype, "approvalError", 2);
4821
+ A = R([
4788
4822
  b("baht-workflow")
4789
- ], T);
4823
+ ], A);
4790
4824
  export {
4791
- Xe as $,
4825
+ Ye as $,
4792
4826
  ht as A,
4793
4827
  Dt as B,
4794
4828
  Ot as C,
@@ -4796,13 +4830,13 @@ export {
4796
4830
  ot as E,
4797
4831
  vt as F,
4798
4832
  j as G,
4799
- Ie as H,
4833
+ Me as H,
4800
4834
  Ee as I,
4801
4835
  le as J,
4802
4836
  Kt as K,
4803
4837
  ct as L,
4804
4838
  re as M,
4805
- K as N,
4839
+ U as N,
4806
4840
  Ht as O,
4807
4841
  Wt as P,
4808
4842
  k as Q,
@@ -4813,7 +4847,7 @@ export {
4813
4847
  Pt as V,
4814
4848
  E as W,
4815
4849
  F as X,
4816
- T as Y,
4850
+ A as Y,
4817
4851
  cs as Z,
4818
4852
  ft as _,
4819
4853
  mt as a,
@@ -4836,14 +4870,14 @@ export {
4836
4870
  Ut as m,
4837
4871
  Et as n,
4838
4872
  yt as o,
4839
- H as p,
4873
+ G as p,
4840
4874
  pt as q,
4841
4875
  Ne as r,
4842
4876
  dt as s,
4843
4877
  et as t,
4844
4878
  Ft as u,
4845
4879
  rt as v,
4846
- U as w,
4880
+ H as w,
4847
4881
  ze as x,
4848
4882
  Re as y,
4849
4883
  $t as z