haori-bootstrap 0.3.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ja.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Haori.js Bootstrap は、Haori.js 向けの Bootstrap ベース UI 拡張ライブラリです。
4
4
 
5
- Version: 0.3.2
5
+ Version: 0.5.0
6
6
 
7
7
  ## 概要
8
8
 
@@ -41,9 +41,9 @@ npm install haori-bootstrap
41
41
  rel="stylesheet"
42
42
  href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css"
43
43
  />
44
- <script src="https://cdn.jsdelivr.net/npm/haori@0.1.5/dist/haori.iife.js"></script>
44
+ <script src="https://cdn.jsdelivr.net/npm/haori@0.19.0/dist/haori.iife.js"></script>
45
45
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"></script>
46
- <script src="https://cdn.jsdelivr.net/npm/haori-bootstrap@0.3.2/dist/haori-bootstrap.iife.js"></script>
46
+ <script src="https://cdn.jsdelivr.net/npm/haori-bootstrap@0.5.0/dist/haori-bootstrap.iife.js"></script>
47
47
  ```
48
48
 
49
49
  IIFE 版は、window.Haori と window.bootstrap が利用可能な場合に自動で有効化されます。
@@ -115,6 +115,53 @@ install({
115
115
  - message 中の `\n` は改行へ正規化され、dialog、confirm、toast で複数行表示されます。
116
116
  - data-click-* の解釈とイベント実行は Haori.js / Procedure 側が担当します。
117
117
 
118
+ ## collapse 開閉状態の永続化
119
+
120
+ Bootstrap collapse 要素に `data-haori-persist="キー名"` を付与すると、開閉状態を sessionStorage に保存し、ページ再訪時に復元します。
121
+
122
+ ```html
123
+ <button data-bs-toggle="collapse" data-bs-target="#sideMenu">メニュー</button>
124
+ <div class="collapse" id="sideMenu" data-haori-persist="side-menu">
125
+ ...
126
+ </div>
127
+ ```
128
+
129
+ - `shown.bs.collapse` / `hidden.bs.collapse` を監視して `shown` / `hidden` を保存します。
130
+ - `install()` 時に既存要素を復元し、`data-import` などで後から挿入されたフラグメントにも `MutationObserver` で復元を適用します。
131
+ - 復元時は紐づくトグル要素(`data-bs-toggle="collapse"` で `data-bs-target` / `href` が当該 collapse を指すもの)の `aria-expanded` と `collapsed` クラスも同期します。トグル同期には collapse 要素の `id` が必要です。
132
+ - 保存キーごとに状態を区別します。同一キーを複数要素に付けると状態を共有します。
133
+ - ストレージが使えない環境(プライベートモード等)では黙って無効化し、例外は送出しません。
134
+ - `uninstall()` で監視を解除します。
135
+
136
+ ## e2e 向け安定セレクタ
137
+
138
+ `dialog` / `confirm` / `toast` が描画する要素には、文言・ロケールに依存しない安定した識別属性を付与しています。Playwright などの e2e テストでは、表示文言やボタン名ではなくこれらの属性でセレクタを組むことを推奨します(文言変更やロケール差で壊れません)。
139
+
140
+ | 要素 | 属性 | 値 |
141
+ | ---- | ---- | ---- |
142
+ | トーストルート | `data-haori-toast` | `"true"` |
143
+ | トーストのレベル | `data-haori-toast-level` | `"success"` \| `"warning"` \| `"error"` \| `"info"` |
144
+ | トーストの閉じるボタン | `data-haori-toast-dismiss` | `"true"` |
145
+ | トーストコンテナ | `data-haori-toast-container` | `"true"` |
146
+ | 情報ダイアログのルート | `data-haori-dialog` | `"true"` |
147
+ | 情報ダイアログの OK ボタン | `data-haori-dialog-ok` | `"true"` |
148
+ | 確認ダイアログのルート | `data-haori-confirm` | `"true"` |
149
+ | 確認ダイアログの OK ボタン | `data-haori-confirm-ok` | `"true"` |
150
+ | 確認ダイアログのキャンセルボタン | `data-haori-confirm-cancel` | `"true"` |
151
+ | ダイアログのタイトル | `data-haori-dialog-title` | `"true"` |
152
+ | 管理対象メッセージのコンテナ | `data-haori-message-container` | `"true"` |
153
+
154
+ ```ts
155
+ // 例: 文言に依存せず確認ダイアログを操作する
156
+ await page.locator('[data-haori-confirm-ok="true"]').click();
157
+
158
+ // 例: トーストのレベルを検証する
159
+ await expect(page.locator('[data-haori-toast="true"]').last())
160
+ .toHaveAttribute('data-haori-toast-level', 'success');
161
+ ```
162
+
163
+ > 上記属性は安定した公開契約として維持します。情報ダイアログ (`data-haori-dialog`) と確認ダイアログ (`data-haori-confirm`) はルート属性で区別できます。
164
+
118
165
  ## Build & Publish
119
166
 
120
167
  ローカル確認手順:
@@ -139,12 +186,12 @@ push 後に、そのタグから GitHub Release を published にします。公
139
186
  次回 patch リリースの例:
140
187
 
141
188
  ```bash
142
- # version が 0.3.3 になる
189
+ # version が 0.5.1 になる
143
190
  npm version patch
144
191
  git push origin main --follow-tags
145
192
  ```
146
193
 
147
- その後、push 済みタグの GitHub Release を作成して published にします。例として次回は `0.3.3` タグになります。
194
+ その後、push 済みタグの GitHub Release を作成して published にします。例として次回は `0.5.1` タグになります。
148
195
 
149
196
  自動公開:
150
197
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Haori.js Bootstrap is a Bootstrap-based UI extension library for Haori.js.
4
4
 
5
- Version: 0.3.2
5
+ Version: 0.5.0
6
6
 
7
7
  ## Overview
8
8
 
@@ -41,9 +41,9 @@ Load dependencies in this order for browser direct loading:
41
41
  rel="stylesheet"
42
42
  href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css"
43
43
  />
44
- <script src="https://cdn.jsdelivr.net/npm/haori@0.1.5/dist/haori.iife.js"></script>
44
+ <script src="https://cdn.jsdelivr.net/npm/haori@0.19.0/dist/haori.iife.js"></script>
45
45
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"></script>
46
- <script src="https://cdn.jsdelivr.net/npm/haori-bootstrap@0.3.2/dist/haori-bootstrap.iife.js"></script>
46
+ <script src="https://cdn.jsdelivr.net/npm/haori-bootstrap@0.5.0/dist/haori-bootstrap.iife.js"></script>
47
47
  ```
48
48
 
49
49
  The IIFE build auto-enables when both window.Haori and window.bootstrap are available.
@@ -115,6 +115,53 @@ Existing Procedure flows can keep using data-click-* and data-click-*-message at
115
115
  - Literal `\n` sequences are normalized to line breaks for dialog, confirm, and toast.
116
116
  - Haori.js and Procedure remain responsible for interpreting data-click-* attributes and dispatching static method calls.
117
117
 
118
+ ## Persisting collapse state
119
+
120
+ Add `data-haori-persist="key"` to a Bootstrap collapse element to persist its open/closed state in `sessionStorage` and restore it on the next visit.
121
+
122
+ ```html
123
+ <button data-bs-toggle="collapse" data-bs-target="#sideMenu">Menu</button>
124
+ <div class="collapse" id="sideMenu" data-haori-persist="side-menu">
125
+ ...
126
+ </div>
127
+ ```
128
+
129
+ - Listens to `shown.bs.collapse` / `hidden.bs.collapse` and stores `shown` / `hidden`.
130
+ - `install()` restores existing elements and applies restoration to fragments inserted later (e.g. via `data-import`) through a `MutationObserver`.
131
+ - On restore it also syncs the associated toggles (`data-bs-toggle="collapse"` whose `data-bs-target` / `href` points to the collapse) — their `aria-expanded` and `collapsed` class. Toggle syncing requires the collapse element to have an `id`.
132
+ - State is keyed by the attribute value; reusing a key across elements shares their state.
133
+ - When storage is unavailable (e.g. private mode) the feature silently disables itself and never throws.
134
+ - `uninstall()` removes the listeners and observer.
135
+
136
+ ## Stable selectors for e2e
137
+
138
+ The elements rendered by `dialog` / `confirm` / `toast` carry stable identifier attributes that do not depend on wording or locale. In e2e tests (e.g. Playwright), prefer building selectors from these attributes instead of visible text or button names — they survive copy changes and localization.
139
+
140
+ | Element | Attribute | Value |
141
+ | ---- | ---- | ---- |
142
+ | Toast root | `data-haori-toast` | `"true"` |
143
+ | Toast level | `data-haori-toast-level` | `"success"` \| `"warning"` \| `"error"` \| `"info"` |
144
+ | Toast dismiss button | `data-haori-toast-dismiss` | `"true"` |
145
+ | Toast container | `data-haori-toast-container` | `"true"` |
146
+ | Info dialog root | `data-haori-dialog` | `"true"` |
147
+ | Info dialog OK button | `data-haori-dialog-ok` | `"true"` |
148
+ | Confirm dialog root | `data-haori-confirm` | `"true"` |
149
+ | Confirm dialog OK button | `data-haori-confirm-ok` | `"true"` |
150
+ | Confirm dialog cancel button | `data-haori-confirm-cancel` | `"true"` |
151
+ | Dialog title | `data-haori-dialog-title` | `"true"` |
152
+ | Managed message container | `data-haori-message-container` | `"true"` |
153
+
154
+ ```ts
155
+ // Operate the confirm dialog without depending on wording
156
+ await page.locator('[data-haori-confirm-ok="true"]').click();
157
+
158
+ // Assert the toast level
159
+ await expect(page.locator('[data-haori-toast="true"]').last())
160
+ .toHaveAttribute('data-haori-toast-level', 'success');
161
+ ```
162
+
163
+ > These attributes are maintained as a stable public contract. Info dialogs (`data-haori-dialog`) and confirm dialogs (`data-haori-confirm`) are distinguished by their root attribute.
164
+
118
165
  ## Build & Publish
119
166
 
120
167
  Local verification:
@@ -136,15 +183,15 @@ git push origin main --follow-tags
136
183
 
137
184
  After pushing, publish a GitHub Release from the generated version tag. The release workflow then publishes the package and uploads `dist.zip` automatically.
138
185
 
139
- Example next patch release after `0.3.2`:
186
+ Example next patch release after `0.5.0`:
140
187
 
141
188
  ```bash
142
- # version becomes 0.3.3
189
+ # version becomes 0.5.1
143
190
  npm version patch
144
191
  git push origin main --follow-tags
145
192
  ```
146
193
 
147
- Create and publish the GitHub Release for the pushed tag such as `0.3.3`.
194
+ Create and publish the GitHub Release for the pushed tag such as `0.5.1`.
148
195
 
149
196
  Release automation:
150
197
 
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @fileoverview Bootstrap collapse の開閉状態を sessionStorage へ永続化する。
3
+ *
4
+ * `data-haori-persist="キー名"` を collapse 要素(`.collapse`)に付与すると、
5
+ * `shown.bs.collapse` / `hidden.bs.collapse` を監視して開閉状態を保存し、ページ再訪時や
6
+ * `data-import` で後から挿入されたフラグメントにも保存済みの状態を復元する。
7
+ *
8
+ * Haori 本体の式サンドボックスはストレージ操作を禁止しているため、ストレージを使う
9
+ * 永続化は Bootstrap 連携の責務として本パッケージ側に置く。
10
+ */
11
+ /**
12
+ * collapse 永続化を有効化する。多重呼び出しは無視する。
13
+ *
14
+ * body が未生成の場合は DOMContentLoaded を待ってから初期化する。
15
+ *
16
+ * @param doc 対象 document。既定は現在の document。
17
+ * @return 戻り値はない。
18
+ */
19
+ export declare function setupCollapsePersistence(doc?: Document): void;
20
+ /**
21
+ * collapse 永続化を無効化し、監視を解除する。
22
+ *
23
+ * @param doc 対象 document。既定は setup 時の document。
24
+ * @return 戻り値はない。
25
+ */
26
+ export declare function teardownCollapsePersistence(doc?: Document): void;
@@ -1,3 +1,3 @@
1
- var HaoriBootstrap=(function(p){"use strict";function F(e){return typeof e=="function"}function O(e){return F(e?.Modal)?e?.Modal:void 0}function z(e){return F(e?.Toast)?e?.Toast:void 0}function k(e){return!!O(e)}function de(e){return!!z(e)}function L(e,t,o){const n=O(o);if(n)return typeof n.getOrCreateInstance=="function"?n.getOrCreateInstance(e,t):new n(e,t)}function fe(e,t,o){const n=z(o);if(n)return typeof n.getOrCreateInstance=="function"?n.getOrCreateInstance(e,t):new n(e,t)}const me="data-haori-bootstrap-dialog",w="data-haori-bootstrap-action",be="data-haori-bootstrap-dialog-title";let pe=0;function W(){return{backdrop:"static",keyboard:!1}}function G(e,t){if(t.dialogContainerSelector){const o=e.querySelector(t.dialogContainerSelector);if(o)return o}return e.body}function V(e,t,o,n){const r=e.createElement("div");r.className="modal fade",r.tabIndex=-1,r.setAttribute(me,"true"),r.setAttribute("aria-hidden","true");const i=e.createElement("div");i.className="modal-dialog modal-dialog-centered";const c=e.createElement("div");if(c.className="modal-content",n){const u=`haori-dialog-title-${++pe}`,A=e.createElement("div");A.className="modal-header";const N=e.createElement("h5");N.className="modal-title",N.id=u,N.setAttribute(be,"true"),N.textContent=n,A.appendChild(N),c.appendChild(A),r.setAttribute("aria-labelledby",u)}const a=e.createElement("div");a.className="modal-body";const d=e.createElement("p");d.className="mb-0",d.style.whiteSpace="pre-line",d.textContent=t,a.appendChild(d);const l=e.createElement("div");if(l.className="modal-footer",o){const u=e.createElement("button");u.type="button",u.className="btn btn-secondary",u.setAttribute(w,"cancel"),u.textContent="Cancel",l.appendChild(u)}const b=e.createElement("button");return b.type="button",b.className="btn btn-primary",b.setAttribute(w,"ok"),b.textContent="OK",l.appendChild(b),c.append(a,l),i.appendChild(c),r.appendChild(i),r}function he(e,t){const o=globalThis.document,n=V(o,e,!1,t.dialogTitle);G(o,t).appendChild(n);const r=L(n,W(),t.bootstrap);return r?new Promise((i,c)=>{const a=()=>{n.removeEventListener("hidden.bs.modal",d),n.remove(),r.dispose?.(),i()},d=()=>{a()};n.querySelector(`[${w}="ok"]`)?.addEventListener("click",()=>{r.hide()},{once:!0}),n.addEventListener("hidden.bs.modal",d,{once:!0});try{r.show()}catch(b){n.removeEventListener("hidden.bs.modal",d),n.remove(),r.dispose?.(),c(b)}}):(n.remove(),Promise.reject(new Error("Bootstrap Modal is unavailable.")))}function Ee(e,t){const o=globalThis.document,n=V(o,e,!0,t.dialogTitle);G(o,t).appendChild(n);const r=L(n,W(),t.bootstrap);return r?new Promise((i,c)=>{let a=!1;const d=()=>{n.removeEventListener("hidden.bs.modal",l),n.remove(),r.dispose?.(),i(a)},l=()=>{d()},b=n.querySelector(`[${w}="ok"]`),u=n.querySelector(`[${w}="cancel"]`);b?.addEventListener("click",()=>{a=!0,r.hide()},{once:!0}),u?.addEventListener("click",()=>{a=!1,r.hide()},{once:!0}),n.addEventListener("hidden.bs.modal",l,{once:!0});try{r.show()}catch(A){n.removeEventListener("hidden.bs.modal",l),n.remove(),r.dispose?.(),c(A)}}):(n.remove(),Promise.reject(new Error("Bootstrap Modal is unavailable.")))}const h="data-haori-bootstrap-owned",m="data-haori-bootstrap-message-container",C="data-haori-bootstrap-invalid-target",S="data-haori-bootstrap-valid-target";function M(e){return e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")}function E(e){return e instanceof HTMLInputElement&&e.type==="radio"}function y(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement}function H(e){return Array.from(e.children).find(t=>t instanceof HTMLElement&&t.getAttribute(m)==="true")}function j(e,t){const o=e.createElement("div");return o.setAttribute(h,"true"),o.textContent=t,o}function K(e){return H(e)}function I(e){if(e.name){const t=e.form??e.ownerDocument,o=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e.name):e.name.replace(/(["\\])/g,"\\$1"),n=Array.from(t.querySelectorAll(`input[type="radio"][name="${o}"]`));if(n.length>0)return n}return[e]}function ve(e){const[t,...o]=e;if(!t)return;let n=t;for(;n;){if(o.every(r=>n?.contains(r)))return n;n=n.parentElement}}function x(e){const o=I(e).map(n=>n.closest(".form-check")).filter(n=>n instanceof HTMLElement);if(o.length>1){const n=ve(o);if(n&&!o.includes(n))return n}return B(e)}function B(e){const t=e.closest(".form-check");return t instanceof HTMLElement?t:void 0}function J(e){const t=e.nextElementSibling;if(t instanceof HTMLElement&&t.getAttribute(m)==="true")return t;const o=document.createElement("div");return o.className="invalid-feedback d-block",o.setAttribute(h,"true"),o.setAttribute(m,"true"),e.insertAdjacentElement("afterend",o),o}function Te(e){const t=E(e)?x(e):B(e);if(!t)return J(e);const o=H(t);if(o)return o;const n=document.createElement("div");return n.className="invalid-feedback d-block",n.setAttribute(h,"true"),n.setAttribute(m,"true"),t.appendChild(n),n}function Ae(e){const t=K(e);if(t)return t;const o=document.createElement("div");return o.className="alert alert-danger",o.setAttribute("role","alert"),o.setAttribute(h,"true"),o.setAttribute(m,"true"),e.insertAdjacentElement("afterbegin",o),o}function v(e){e.getAttribute(C)==="true"&&(e.classList.remove("is-invalid"),e.removeAttribute(C))}function T(e){e.getAttribute(S)==="true"&&(e.classList.remove("is-valid"),e.removeAttribute(S))}function Q(e){switch(e){case"success":return"alert alert-success";case"warning":return"alert alert-warning";case"info":return"alert alert-info";default:return"alert alert-danger"}}function R(e){return e==="success"?"valid-feedback d-block":"invalid-feedback d-block"}function X(e){(E(e)?I(e):[e]).forEach(o=>{o.classList.add("is-invalid"),o.setAttribute(C,"true")})}function Ce(e){(E(e)?I(e):[e]).forEach(o=>{v(o)})}function Y(e,t){const o=e.nextElementSibling;if(o instanceof HTMLElement&&o.getAttribute(m)==="true")return o.className=R(t),o;const n=document.createElement("div");return n.className=R(t),n.setAttribute(h,"true"),n.setAttribute(m,"true"),e.insertAdjacentElement("afterend",n),n}function ge(e,t){const o=E(e)?x(e):B(e);if(!o)return Y(e,t);const n=H(o);if(n)return n.className=R(t),n;const r=document.createElement("div");return r.className=R(t),r.setAttribute(h,"true"),r.setAttribute(m,"true"),o.appendChild(r),r}function we(e,t){const o=K(e);if(o)return o.className=Q(t),o;const n=document.createElement("div");return n.className=Q(t),n.setAttribute("role","alert"),n.setAttribute(h,"true"),n.setAttribute(m,"true"),e.insertAdjacentElement("afterbegin",n),n}function Se(e,t){return(M(e)?Te(e):y(e)?J(e):Ae(e)).appendChild(j(document,t)),M(e)?X(e):y(e)&&(e.classList.add("is-invalid"),e.setAttribute(C,"true")),Promise.resolve()}function Me(e,t,o){if((M(e)?ge(e,o):y(e)?Y(e,o):we(e,o)).appendChild(j(document,t)),M(e)){const r=E(e)?I(e):[e];o==="success"?r.forEach(i=>{v(i),i.classList.add("is-valid"),i.setAttribute(S,"true")}):!o||o==="error"?(r.forEach(i=>T(i)),X(e)):r.forEach(i=>{T(i),v(i)})}else y(e)&&(o==="success"?(v(e),e.classList.add("is-valid"),e.setAttribute(S,"true")):!o||o==="error"?(T(e),e.classList.add("is-invalid"),e.setAttribute(C,"true")):(T(e),v(e)));return Promise.resolve()}function ye(e){if(M(e)){const r=E(e)?x(e):B(e);(r?H(r):void 0)?.remove(),Ce(e),(E(e)?I(e):[e]).forEach(a=>T(a))}else if(y(e)){const r=e.nextElementSibling;r instanceof HTMLElement&&r.getAttribute(m)==="true"&&r.remove(),v(e),T(e)}return e.querySelectorAll(`[${m}="true"]`).forEach(r=>{r.remove()}),e.querySelectorAll(`[${C}="true"]`).forEach(r=>{v(r)}),e.querySelectorAll(`[${S}="true"]`).forEach(r=>{T(r)}),Promise.resolve()}function Z(e){e.classList.contains("modal")||e.classList.add("modal"),e.tabIndex<0&&(e.tabIndex=-1),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true")}function Ie(e,t){Z(e);const o=L(e,void 0,t.bootstrap);return o?(o.show(),Promise.resolve()):Promise.reject(new Error("Bootstrap Modal is unavailable."))}function Ne(e,t){Z(e);const o=L(e,void 0,t.bootstrap);return o?(o.hide(),Promise.resolve()):Promise.reject(new Error("Bootstrap Modal is unavailable."))}const ee="data-haori-bootstrap-toast-container",ke="data-haori-bootstrap-toast",Le="data-haori-bootstrap-toast-accent",He="data-haori-bootstrap-toast-dismiss",te={"top-start":"top-0 start-0","top-center":"top-0 start-50 translate-middle-x","top-end":"top-0 end-0","bottom-start":"bottom-0 start-0","bottom-center":"bottom-0 start-50 translate-middle-x","bottom-end":"bottom-0 end-0"};function Be(e){switch(e){case"success":return{accentClassName:"bg-success"};case"warning":return{accentClassName:"bg-warning"};case"error":return{accentClassName:"bg-danger"};default:return{accentClassName:"bg-info"}}}function Re(e,t){if(t.toastContainerSelector){const o=e.querySelector(t.toastContainerSelector);if(o)return o}return e.body}function Pe(e,t){const o=Re(e,t),n=te[t.toastPosition??"bottom-end"],r=o.querySelector(`[${ee}="true"]`);if(r){const c=Object.values(te).flatMap(a=>a.split(" "));return r.classList.remove(...c),r.classList.add(...n.split(" ")),r}const i=e.createElement("div");return i.className=`toast-container position-fixed ${n} p-3`,i.setAttribute(ee,"true"),o.appendChild(i),i}function De(e,t,o){const n=globalThis.document,r=Be(t),i=n.createElement("div");i.className="toast border bg-body text-body shadow-sm",i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),i.setAttribute(ke,"true");const c=n.createElement("div");c.className="d-flex align-items-stretch";const a=n.createElement("div");a.className=`flex-shrink-0 rounded-start ${r.accentClassName}`,a.style.width="0.375rem",a.setAttribute(Le,"true");const d=n.createElement("div");d.className="toast-body",d.style.whiteSpace="pre-line",d.textContent=e;const l=n.createElement("button");l.type="button",l.className="btn-close me-2 m-auto flex-shrink-0",l.setAttribute("aria-label","Close"),l.setAttribute(He,"true"),c.appendChild(a),c.appendChild(d),c.appendChild(l),i.appendChild(c),Pe(n,o).appendChild(i);const b=o.toastDelay!==void 0?{delay:o.toastDelay}:void 0,u=fe(i,b,o.bootstrap);if(!u)return i.remove(),Promise.reject(new Error("Bootstrap Toast is unavailable."));l.addEventListener("click",()=>{u.hide?.()}),i.addEventListener("hidden.bs.toast",()=>{i.remove(),u.dispose?.()},{once:!0});try{return u.show(),Promise.resolve()}catch(A){return i.remove(),u.dispose?.(),Promise.reject(A)}}let f={options:{fallbackToNative:!0}};function g(e){return e.replace(/\\n/g,`
2
- `)}function oe(){return globalThis.window}function $(e){return Promise.resolve(e).then(()=>{})}function P(e){const t=f.originalHaori?.[e];return typeof t=="function"?t:void 0}function D(e){console.warn(`[haori-bootstrap] ${e} skipped because Bootstrap support is unavailable.`)}function ne(e){const t=g(e),o=P("dialog");if(o)return $(o(t));const n=oe();return f.options.fallbackToNative&&typeof n?.alert=="function"?(n.alert(t),Promise.resolve()):(D("dialog"),Promise.resolve())}function re(e){const t=g(e),o=P("confirm");if(o)return Promise.resolve(o(t)).then(r=>!!r);const n=oe();return f.options.fallbackToNative&&typeof n?.confirm=="function"?Promise.resolve(n.confirm(t)):(D("confirm"),Promise.resolve(!1))}function ie(e,t){const o=g(e),n=P("toast");return n?$(n(o,t)):(D("toast"),Promise.resolve())}function _(e,t){const o=P(e);return o?$(o(t)):(D(e),Promise.resolve())}function _e(e){f=e}class se{static dialog(t){const o=g(t);return k(f.options.bootstrap)?he(o,f.options).catch(()=>ne(o)):ne(o)}static confirm(t){const o=g(t);return k(f.options.bootstrap)?Ee(o,f.options).catch(()=>re(o)):re(o)}static toast(t,o){const n=g(t);return de(f.options.bootstrap)?De(n,o,f.options).catch(()=>ie(n,o)):ie(n,o)}static openDialog(t){return k(f.options.bootstrap)?Ie(t,f.options).catch(()=>_("openDialog",t)):_("openDialog",t)}static closeDialog(t){return k(f.options.bootstrap)?Ne(t,f.options).catch(()=>_("closeDialog",t)):_("closeDialog",t)}static addErrorMessage(t,o){return Se(t,o)}static addMessage(t,o,n){return Me(t,o,n)}static clearMessages(t){return ye(t)}}const q={fallbackToNative:!0},ae=new Set(["dialog","confirm","toast","openDialog","closeDialog","addErrorMessage","addMessage","clearMessages"]);function xe(e){const t=se;return new Proxy(e,{get(o,n,r){return typeof n=="string"&&ae.has(n)?t[n]:Reflect.get(o,n,r)},has(o,n){return typeof n=="string"&&ae.has(n)?!0:Reflect.has(o,n)}})}const s={installed:!1,options:q};function U(){return globalThis.window}function $e(e,t){return{bootstrap:e.bootstrap??t?.bootstrap,fallbackToNative:e.fallbackToNative??q.fallbackToNative,runtime:e.runtime??s.options.runtime??t?.Haori?.runtime,toastContainerSelector:e.toastContainerSelector??s.options.toastContainerSelector,dialogContainerSelector:e.dialogContainerSelector??s.options.dialogContainerSelector,dialogTitle:e.dialogTitle??s.options.dialogTitle,toastPosition:e.toastPosition??s.options.toastPosition,toastDelay:e.toastDelay??s.options.toastDelay}}function ce(e=U()){return!!(e?.Haori&&e.bootstrap)}function le(e={}){const t=U();if(!t?.Haori)throw new Error("window.Haori is required before calling install().");if(s.originalHaori||(s.originalHaori=t.Haori,s.originalRuntime=t.Haori.runtime),s.options=$e(e,t),s.options.runtime){const o=s.originalHaori??t.Haori;typeof o.setRuntime=="function"?o.setRuntime(s.options.runtime):console.warn("[haori-bootstrap] Haori.setRuntime が利用できません。runtime 設定は無視されます。")}_e({originalHaori:s.originalHaori,options:s.options}),t.Haori=xe(s.originalHaori),s.installed=!0}function qe(){const e=U();if(!e||!s.originalHaori)return;const t=s.originalHaori;typeof t.setRuntime=="function"?t.setRuntime(s.originalRuntime):t.runtime=s.originalRuntime,e.Haori=s.originalHaori,s.installed=!1,s.originalHaori=void 0,s.originalRuntime=void 0,s.options=q}function Ue(){return s.installed}const ue="__haoriJsBootstrapAutoEnabled__";function Fe(){return globalThis.window}function Oe(e){return!!e[ue]}function ze(e){e[ue]=!0}function We(){const e=Fe();if(!(!e||Oe(e))){if(!ce(e)){console.warn("[haori-bootstrap] Auto-enable skipped because window.Haori or window.bootstrap is missing.");return}try{le({bootstrap:e.bootstrap}),ze(e)}catch(t){console.warn("[haori-bootstrap] Auto-enable failed.",t)}}}We();const Ge="0.3.2";return p.BootstrapHaori=se,p.hasAutoEnablePrerequisites=ce,p.install=le,p.isInstalled=Ue,p.uninstall=qe,p.version=Ge,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),p})({});
1
+ var HaoriBootstrap=(function(h){"use strict";function W(e){return typeof e=="function"}function G(e){return W(e?.Modal)?e?.Modal:void 0}function V(e){return W(e?.Toast)?e?.Toast:void 0}function L(e){return!!G(e)}function Se(e){return!!V(e)}function N(e,t,n){const o=G(n);if(o)return typeof o.getOrCreateInstance=="function"?o.getOrCreateInstance(e,t):new o(e,t)}function ye(e,t,n){const o=V(n);if(o)return typeof o.getOrCreateInstance=="function"?o.getOrCreateInstance(e,t):new o(e,t)}const Ie="data-haori-dialog",Me="data-haori-confirm",Le="data-haori-dialog-title",K="data-haori-dialog-ok",j="data-haori-confirm-ok",J="data-haori-confirm-cancel";let Ne=0;function X(){return{backdrop:"static",keyboard:!1}}function Q(e,t){if(t.dialogContainerSelector){const n=e.querySelector(t.dialogContainerSelector);if(n)return n}return e.body}function Y(e,t,n,o){const r=e.createElement("div");r.className="modal fade",r.tabIndex=-1,r.setAttribute(n?Me:Ie,"true"),r.setAttribute("aria-hidden","true");const i=e.createElement("div");i.className="modal-dialog modal-dialog-centered";const c=e.createElement("div");if(c.className="modal-content",o){const u=`haori-dialog-title-${++Ne}`,A=e.createElement("div");A.className="modal-header";const M=e.createElement("h5");M.className="modal-title",M.id=u,M.setAttribute(Le,"true"),M.textContent=o,A.appendChild(M),c.appendChild(A),r.setAttribute("aria-labelledby",u)}const a=e.createElement("div");a.className="modal-body";const d=e.createElement("p");d.className="mb-0",d.style.whiteSpace="pre-line",d.textContent=t,a.appendChild(d);const l=e.createElement("div");if(l.className="modal-footer",n){const u=e.createElement("button");u.type="button",u.className="btn btn-secondary",u.setAttribute(J,"true"),u.textContent="Cancel",l.appendChild(u)}const b=e.createElement("button");return b.type="button",b.className="btn btn-primary",b.setAttribute(n?j:K,"true"),b.textContent="OK",l.appendChild(b),c.append(a,l),i.appendChild(c),r.appendChild(i),r}function He(e,t){const n=globalThis.document,o=Y(n,e,!1,t.dialogTitle);Q(n,t).appendChild(o);const r=N(o,X(),t.bootstrap);return r?new Promise((i,c)=>{const a=()=>{o.removeEventListener("hidden.bs.modal",d),o.remove(),r.dispose?.(),i()},d=()=>{a()};o.querySelector(`[${K}]`)?.addEventListener("click",()=>{r.hide()},{once:!0}),o.addEventListener("hidden.bs.modal",d,{once:!0});try{r.show()}catch(b){o.removeEventListener("hidden.bs.modal",d),o.remove(),r.dispose?.(),c(b)}}):(o.remove(),Promise.reject(new Error("Bootstrap Modal is unavailable.")))}function ke(e,t){const n=globalThis.document,o=Y(n,e,!0,t.dialogTitle);Q(n,t).appendChild(o);const r=N(o,X(),t.bootstrap);return r?new Promise((i,c)=>{let a=!1;const d=()=>{o.removeEventListener("hidden.bs.modal",l),o.remove(),r.dispose?.(),i(a)},l=()=>{d()},b=o.querySelector(`[${j}]`),u=o.querySelector(`[${J}]`);b?.addEventListener("click",()=>{a=!0,r.hide()},{once:!0}),u?.addEventListener("click",()=>{a=!1,r.hide()},{once:!0}),o.addEventListener("hidden.bs.modal",l,{once:!0});try{r.show()}catch(A){o.removeEventListener("hidden.bs.modal",l),o.remove(),r.dispose?.(),c(A)}}):(o.remove(),Promise.reject(new Error("Bootstrap Modal is unavailable.")))}const p="data-haori-owned",m="data-haori-message-container",g="data-haori-invalid-target",w="data-haori-valid-target";function S(e){return e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")}function E(e){return e instanceof HTMLInputElement&&e.type==="radio"}function y(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement}function H(e){return Array.from(e.children).find(t=>t instanceof HTMLElement&&t.getAttribute(m)==="true")}function Z(e,t){const n=e.createElement("div");return n.setAttribute(p,"true"),n.textContent=t,n}function ee(e){return H(e)}function I(e){if(e.name){const t=e.form??e.ownerDocument,n=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e.name):e.name.replace(/(["\\])/g,"\\$1"),o=Array.from(t.querySelectorAll(`input[type="radio"][name="${n}"]`));if(o.length>0)return o}return[e]}function Be(e){const[t,...n]=e;if(!t)return;let o=t;for(;o;){if(n.every(r=>o?.contains(r)))return o;o=o.parentElement}}function $(e){const n=I(e).map(o=>o.closest(".form-check")).filter(o=>o instanceof HTMLElement);if(n.length>1){const o=Be(n);if(o&&!n.includes(o))return o}return k(e)}function k(e){const t=e.closest(".form-check");return t instanceof HTMLElement?t:void 0}function te(e){const t=e.nextElementSibling;if(t instanceof HTMLElement&&t.getAttribute(m)==="true")return t;const n=document.createElement("div");return n.className="invalid-feedback d-block",n.setAttribute(p,"true"),n.setAttribute(m,"true"),e.insertAdjacentElement("afterend",n),n}function Re(e){const t=E(e)?$(e):k(e);if(!t)return te(e);const n=H(t);if(n)return n;const o=document.createElement("div");return o.className="invalid-feedback d-block",o.setAttribute(p,"true"),o.setAttribute(m,"true"),t.appendChild(o),o}function _e(e){const t=ee(e);if(t)return t;const n=document.createElement("div");return n.className="alert alert-danger",n.setAttribute("role","alert"),n.setAttribute(p,"true"),n.setAttribute(m,"true"),e.insertAdjacentElement("afterbegin",n),n}function v(e){e.getAttribute(g)==="true"&&(e.classList.remove("is-invalid"),e.removeAttribute(g))}function T(e){e.getAttribute(w)==="true"&&(e.classList.remove("is-valid"),e.removeAttribute(w))}function ne(e){switch(e){case"success":return"alert alert-success";case"warning":return"alert alert-warning";case"info":return"alert alert-info";default:return"alert alert-danger"}}function B(e){return e==="success"?"valid-feedback d-block":"invalid-feedback d-block"}function oe(e){(E(e)?I(e):[e]).forEach(n=>{n.classList.add("is-invalid"),n.setAttribute(g,"true")})}function Pe(e){(E(e)?I(e):[e]).forEach(n=>{v(n)})}function re(e,t){const n=e.nextElementSibling;if(n instanceof HTMLElement&&n.getAttribute(m)==="true")return n.className=B(t),n;const o=document.createElement("div");return o.className=B(t),o.setAttribute(p,"true"),o.setAttribute(m,"true"),e.insertAdjacentElement("afterend",o),o}function De(e,t){const n=E(e)?$(e):k(e);if(!n)return re(e,t);const o=H(n);if(o)return o.className=B(t),o;const r=document.createElement("div");return r.className=B(t),r.setAttribute(p,"true"),r.setAttribute(m,"true"),n.appendChild(r),r}function xe(e,t){const n=ee(e);if(n)return n.className=ne(t),n;const o=document.createElement("div");return o.className=ne(t),o.setAttribute("role","alert"),o.setAttribute(p,"true"),o.setAttribute(m,"true"),e.insertAdjacentElement("afterbegin",o),o}function Oe(e,t){return(S(e)?Re(e):y(e)?te(e):_e(e)).appendChild(Z(document,t)),S(e)?oe(e):y(e)&&(e.classList.add("is-invalid"),e.setAttribute(g,"true")),Promise.resolve()}function $e(e,t,n){if((S(e)?De(e,n):y(e)?re(e,n):xe(e,n)).appendChild(Z(document,t)),S(e)){const r=E(e)?I(e):[e];n==="success"?r.forEach(i=>{v(i),i.classList.add("is-valid"),i.setAttribute(w,"true")}):!n||n==="error"?(r.forEach(i=>T(i)),oe(e)):r.forEach(i=>{T(i),v(i)})}else y(e)&&(n==="success"?(v(e),e.classList.add("is-valid"),e.setAttribute(w,"true")):!n||n==="error"?(T(e),e.classList.add("is-invalid"),e.setAttribute(g,"true")):(T(e),v(e)));return Promise.resolve()}function Ue(e){if(S(e)){const r=E(e)?$(e):k(e);(r?H(r):void 0)?.remove(),Pe(e),(E(e)?I(e):[e]).forEach(a=>T(a))}else if(y(e)){const r=e.nextElementSibling;r instanceof HTMLElement&&r.getAttribute(m)==="true"&&r.remove(),v(e),T(e)}return e.querySelectorAll(`[${m}="true"]`).forEach(r=>{r.remove()}),e.querySelectorAll(`[${g}="true"]`).forEach(r=>{v(r)}),e.querySelectorAll(`[${w}="true"]`).forEach(r=>{T(r)}),Promise.resolve()}function ie(e){e.classList.contains("modal")||e.classList.add("modal"),e.tabIndex<0&&(e.tabIndex=-1),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true")}function qe(e,t){ie(e);const n=N(e,void 0,t.bootstrap);return n?(n.show(),Promise.resolve()):Promise.reject(new Error("Bootstrap Modal is unavailable."))}function Fe(e,t){ie(e);const n=N(e,void 0,t.bootstrap);return n?(n.hide(),Promise.resolve()):Promise.reject(new Error("Bootstrap Modal is unavailable."))}const se="data-haori-toast-container",ze="data-haori-toast",We="data-haori-toast-level",Ge="data-haori-toast-accent",Ve="data-haori-toast-dismiss",ae={"top-start":"top-0 start-0","top-center":"top-0 start-50 translate-middle-x","top-end":"top-0 end-0","bottom-start":"bottom-0 start-0","bottom-center":"bottom-0 start-50 translate-middle-x","bottom-end":"bottom-0 end-0"};function Ke(e){switch(e){case"success":return{accentClassName:"bg-success",level:"success"};case"warning":return{accentClassName:"bg-warning",level:"warning"};case"error":return{accentClassName:"bg-danger",level:"error"};default:return{accentClassName:"bg-info",level:"info"}}}function je(e,t){if(t.toastContainerSelector){const n=e.querySelector(t.toastContainerSelector);if(n)return n}return e.body}function Je(e,t){const n=je(e,t),o=ae[t.toastPosition??"bottom-end"],r=n.querySelector(`[${se}="true"]`);if(r){const c=Object.values(ae).flatMap(a=>a.split(" "));return r.classList.remove(...c),r.classList.add(...o.split(" ")),r}const i=e.createElement("div");return i.className=`toast-container position-fixed ${o} p-3`,i.setAttribute(se,"true"),n.appendChild(i),i}function Xe(e,t,n){const o=globalThis.document,r=Ke(t),i=o.createElement("div");i.className="toast border bg-body text-body shadow-sm",i.setAttribute("role","status"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),i.setAttribute(ze,"true"),i.setAttribute(We,r.level);const c=o.createElement("div");c.className="d-flex align-items-stretch";const a=o.createElement("div");a.className=`flex-shrink-0 rounded-start ${r.accentClassName}`,a.style.width="0.375rem",a.setAttribute(Ge,"true");const d=o.createElement("div");d.className="toast-body",d.style.whiteSpace="pre-line",d.textContent=e;const l=o.createElement("button");l.type="button",l.className="btn-close me-2 m-auto flex-shrink-0",l.setAttribute("aria-label","Close"),l.setAttribute(Ve,"true"),c.appendChild(a),c.appendChild(d),c.appendChild(l),i.appendChild(c),Je(o,n).appendChild(i);const b=n.toastDelay!==void 0?{delay:n.toastDelay}:void 0,u=ye(i,b,n.bootstrap);if(!u)return i.remove(),Promise.reject(new Error("Bootstrap Toast is unavailable."));l.addEventListener("click",()=>{u.hide?.()}),i.addEventListener("hidden.bs.toast",()=>{i.remove(),u.dispose?.()},{once:!0});try{return u.show(),Promise.resolve()}catch(A){return i.remove(),u.dispose?.(),Promise.reject(A)}}let f={options:{fallbackToNative:!0}};function C(e){return e.replace(/\\n/g,`
2
+ `)}function ce(){return globalThis.window}function U(e){return Promise.resolve(e).then(()=>{})}function R(e){const t=f.originalHaori?.[e];return typeof t=="function"?t:void 0}function _(e){console.warn(`[haori-bootstrap] ${e} skipped because Bootstrap support is unavailable.`)}function le(e){const t=C(e),n=R("dialog");if(n)return U(n(t));const o=ce();return f.options.fallbackToNative&&typeof o?.alert=="function"?(o.alert(t),Promise.resolve()):(_("dialog"),Promise.resolve())}function ue(e){const t=C(e),n=R("confirm");if(n)return Promise.resolve(n(t)).then(r=>!!r);const o=ce();return f.options.fallbackToNative&&typeof o?.confirm=="function"?Promise.resolve(o.confirm(t)):(_("confirm"),Promise.resolve(!1))}function de(e,t){const n=C(e),o=R("toast");return o?U(o(n,t)):(_("toast"),Promise.resolve())}function P(e,t){const n=R(e);return n?U(n(t)):(_(e),Promise.resolve())}function Qe(e){f=e}class fe{static dialog(t){const n=C(t);return L(f.options.bootstrap)?He(n,f.options).catch(()=>le(n)):le(n)}static confirm(t){const n=C(t);return L(f.options.bootstrap)?ke(n,f.options).catch(()=>ue(n)):ue(n)}static toast(t,n){const o=C(t);return Se(f.options.bootstrap)?Xe(o,n,f.options).catch(()=>de(o,n)):de(o,n)}static openDialog(t){return L(f.options.bootstrap)?qe(t,f.options).catch(()=>P("openDialog",t)):P("openDialog",t)}static closeDialog(t){return L(f.options.bootstrap)?Fe(t,f.options).catch(()=>P("closeDialog",t)):P("closeDialog",t)}static addErrorMessage(t,n){return Oe(t,n)}static addMessage(t,n,o){return $e(t,n,o)}static clearMessages(t){return Ue(t)}}const Ye="haori-bootstrap:collapse:",D="data-haori-persist";let x=!1,O,q;function me(e){return Ye+e}function Ze(e){try{const t=window.sessionStorage.getItem(me(e));return t==="shown"||t==="hidden"?t:void 0}catch{return}}function et(e,t){try{window.sessionStorage.setItem(me(e),t)}catch{}}function be(e,t){const n=e.id,o=[`[data-bs-toggle="collapse"][data-bs-target="#${n}"]`];if(n&&o.push(`[data-bs-toggle="collapse"][href="#${n}"]`),!n)return;e.ownerDocument.querySelectorAll(o.join(",")).forEach(i=>{i.setAttribute("aria-expanded",t?"true":"false"),i.classList.toggle("collapsed",!t)})}function he(e){const t=e.getAttribute(D);if(!t)return;const n=Ze(t);if(!n)return;const o=e.classList.contains("show");n==="shown"&&!o?(e.classList.add("show"),be(e,!0)):n==="hidden"&&o&&(e.classList.remove("show"),be(e,!1))}function pe(e){e instanceof HTMLElement&&e.hasAttribute(D)&&he(e),e.querySelectorAll(`[${D}]`).forEach(he)}function Ee(e,t){const n=e.target;if(!(n instanceof HTMLElement))return;const o=n.getAttribute(D);o&&et(o,t)}const ve=e=>Ee(e,"shown"),Te=e=>Ee(e,"hidden");function tt(e=document){if(x)return;x=!0,q=e,e.addEventListener("shown.bs.collapse",ve),e.addEventListener("hidden.bs.collapse",Te);const t=()=>{pe(e),O=new MutationObserver(n=>{for(const o of n)o.addedNodes.forEach(r=>{r instanceof HTMLElement&&pe(r)})}),e.body&&O.observe(e.body,{childList:!0,subtree:!0})};e.body?t():e.addEventListener("DOMContentLoaded",t,{once:!0})}function nt(e=q??document){x&&(x=!1,e.removeEventListener("shown.bs.collapse",ve),e.removeEventListener("hidden.bs.collapse",Te),O?.disconnect(),O=void 0,q=void 0)}const F={fallbackToNative:!0},Ae=new Set(["dialog","confirm","toast","openDialog","closeDialog","addErrorMessage","addMessage","clearMessages"]);function ot(e){const t=fe;return new Proxy(e,{get(n,o,r){return typeof o=="string"&&Ae.has(o)?t[o]:Reflect.get(n,o,r)},has(n,o){return typeof o=="string"&&Ae.has(o)?!0:Reflect.has(n,o)}})}const s={installed:!1,options:F};function z(){return globalThis.window}function rt(e,t){return{bootstrap:e.bootstrap??t?.bootstrap,fallbackToNative:e.fallbackToNative??F.fallbackToNative,runtime:e.runtime??s.options.runtime??t?.Haori?.runtime,toastContainerSelector:e.toastContainerSelector??s.options.toastContainerSelector,dialogContainerSelector:e.dialogContainerSelector??s.options.dialogContainerSelector,dialogTitle:e.dialogTitle??s.options.dialogTitle,toastPosition:e.toastPosition??s.options.toastPosition,toastDelay:e.toastDelay??s.options.toastDelay}}function ge(e=z()){return!!(e?.Haori&&e.bootstrap)}function Ce(e={}){const t=z();if(!t?.Haori)throw new Error("window.Haori is required before calling install().");if(s.originalHaori||(s.originalHaori=t.Haori,s.originalRuntime=t.Haori.runtime),s.options=rt(e,t),s.options.runtime){const n=s.originalHaori??t.Haori;typeof n.setRuntime=="function"?n.setRuntime(s.options.runtime):console.warn("[haori-bootstrap] Haori.setRuntime が利用できません。runtime 設定は無視されます。")}Qe({originalHaori:s.originalHaori,options:s.options}),t.Haori=ot(s.originalHaori),tt(),s.installed=!0}function it(){const e=z();if(!e||!s.originalHaori)return;const t=s.originalHaori;typeof t.setRuntime=="function"?t.setRuntime(s.originalRuntime):t.runtime=s.originalRuntime,e.Haori=s.originalHaori,nt(),s.installed=!1,s.originalHaori=void 0,s.originalRuntime=void 0,s.options=F}function st(){return s.installed}const we="__haoriJsBootstrapAutoEnabled__";function at(){return globalThis.window}function ct(e){return!!e[we]}function lt(e){e[we]=!0}function ut(){const e=at();if(!(!e||ct(e))){if(!ge(e)){console.warn("[haori-bootstrap] Auto-enable skipped because window.Haori or window.bootstrap is missing.");return}try{Ce({bootstrap:e.bootstrap}),lt(e)}catch(t){console.warn("[haori-bootstrap] Auto-enable failed.",t)}}}ut();const dt="0.5.0";return h.BootstrapHaori=fe,h.hasAutoEnablePrerequisites=ge,h.install=Ce,h.isInstalled=st,h.uninstall=it,h.version=dt,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),h})({});
3
3
  //# sourceMappingURL=haori-bootstrap.iife.js.map