@htmlbricks/hb-sidebar-cards-navigator 0.71.35 → 0.71.36

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.md CHANGED
@@ -1,35 +1,195 @@
1
- ## `hb-sidebar-cards-navigator` — sidebar cards navigator
1
+ # hb-sidebar-cards-navigator
2
2
 
3
- **Category:** layout
4
- **Tags:** layout, navigation
3
+ **Category:** layout · **Tags:** layout, navigation
5
4
 
6
- ### What it does
5
+ ## Overview
7
6
 
8
- Stacked sidebar navigator: picks an active panel from JSON `panels` (main or first without parent), shows `hb-navbar` with back when `parentPanelId` exists, then cards of rows rendered as `hb-sidenav-button`. Emits `itemClick` with panel, card and row context; rows can switch panels via `switchToPanelId`.
7
+ `hb-sidebar-cards-navigator` is a stacked sidebar layout that drives navigation from a JSON `panels` tree. It resolves one **active panel**, renders a compact **`hb-navbar`** header for that panel, then lists each card’s rows as **`hb-sidenav-button`** entries. Row clicks emit a single **`itemClick`** custom event with full context (panel, card, row). Rows may optionally change the active panel via **`switchToPanelId`**.
9
8
 
10
- ### Custom element
9
+ Nested **`hb-navbar`** and **`hb-sidenav-button`** are registered at runtime (same package version as this component). Bootstrap Icons are loaded from jsDelivr in the component head for row icons.
10
+
11
+ ## Active panel resolution
12
+
13
+ The visible panel is chosen in this order:
14
+
15
+ 1. If an internal **`switchToPanelId`** state is set (after a row with `switchToPanelId` was clicked), the panel whose **`id`** matches that value is shown.
16
+ 2. Otherwise the first panel with **`main: true`** is used.
17
+ 3. If none is marked `main`, the first panel **without** **`parentPanelId`** is used.
18
+
19
+ If no panel matches, nothing is rendered inside the host.
20
+
21
+ ## UI behavior
22
+
23
+ - **`hb-navbar`**: **`companybrandname`** is bound to the active panel’s **`title`**. The **`nav-switcher`** slot shows a **list** icon for root-level panels and a **back** arrow when **`parentPanelId`** is set. **`navmenuswitch`** switches the active panel to **`parentPanelId`** when a parent exists (back navigation).
24
+ - **Cards**: For each card on the active panel, if **`rows`** is non-empty, each row becomes one **`hb-sidenav-button`** with **`navlink`** serialized from the row (`text`, `key`, optional `bootstrapIcon`, optional `badge`).
25
+ - **Empty cards**: Cards with no rows or an empty **`rows`** array are skipped (no placeholder block).
26
+
27
+ ## Custom element
11
28
 
12
29
  `hb-sidebar-cards-navigator`
13
30
 
14
- ### Attributes (snake_case; use string values in HTML)
31
+ ## Attributes (snake_case; string values from HTML)
32
+
33
+ Web component attributes are strings. Pass structured data as a **JSON string** on **`panels`**.
34
+
35
+ | Attribute | Required | Description |
36
+ |-----------|----------|-------------|
37
+ | **`id`** | No | Host identifier; echoed on emitted **`itemClick`** detail when set. |
38
+ | **`style`** | No | Standard inline host styles (string). |
39
+ | **`panels`** | No | JSON string representing **`Panel[]`** (see data model below). If the runtime value is a string, the component parses it with **`JSON.parse`**; invalid JSON is logged and parsing is skipped. |
40
+
41
+ ### Boolean and numbers in JSON
42
+
43
+ Inside the **`panels`** JSON, use normal JSON booleans and numbers (e.g. **`"main": true`**). Those rules apply to the JSON payload, not to HTML boolean attributes on this tag.
44
+
45
+ ## Data model (`panels` JSON)
46
+
47
+ Types live in **`types/webcomponent.type.d.ts`**. Shapes below match authoring / TypeScript names; serialize the whole array as one string for the **`panels`** attribute.
48
+
49
+ ### `Panel`
50
+
51
+ | Field | Type | Notes |
52
+ |-------|------|--------|
53
+ | **`id`** | string | Panel identifier; used with **`switchToPanelId`** and hierarchy. |
54
+ | **`title`** | string (optional) | Shown in **`hb-navbar`**. |
55
+ | **`icon`** | string (optional) | Available on the type; not read directly by this host’s markup. |
56
+ | **`sort`** | number (optional) | Available on nested card types; not used for panel ordering in the current template. |
57
+ | **`parentPanelId`** | string (optional) | If set, navbar shows back and **`navmenuswitch`** returns to this parent panel id. |
58
+ | **`main`** | boolean (optional) | When **`true`**, this panel is preferred when no **`switchToPanelId`** override is active. |
59
+ | **`cards`** | array | List of **`CardNavigator`** objects. |
60
+
61
+ ### `CardNavigator` (card under a panel)
62
+
63
+ | Field | Type | Notes |
64
+ |-------|------|--------|
65
+ | **`id`** | string | Card id; used when resolving clicks. |
66
+ | **`title`** | string (optional) | Card-level metadata (not rendered as a separate heading in the current template). |
67
+ | **`icon`** | string (optional) | Metadata. |
68
+ | **`sort`** | number (optional) | Metadata. |
69
+ | **`rows`** | **`CardRow[]`** | Rows rendered as **`hb-sidenav-button`** instances. |
70
+
71
+ ### `CardRow`
72
+
73
+ | Field | Type | Notes |
74
+ |-------|------|--------|
75
+ | **`key`** | string | Stable row id; matched on click. |
76
+ | **`text`** | string | Primary label (passed to **`hb-sidenav-button`** **`navlink`**). |
77
+ | **`bootstrapIcon`** | string (optional) | Bootstrap Icons name without the **`bi-`** prefix (e.g. **`house-door`**). |
78
+ | **`badge`** | object (optional) | **`text`**, optional **`class`**, **`classcolor`** — forwarded to **`navlink`**. |
79
+ | **`subtext`** | string (optional) | On the type for richer payloads; **not** forwarded to **`navlink`** in the current implementation. |
80
+ | **`value`** | string, number, or boolean (optional) | Available in **`itemClick`** detail’s **`row`**; not sent to **`navlink`**. |
81
+ | **`selected`** | boolean (optional) | Available on **`row`** in **`itemClick`**; not sent to **`navlink`**. |
82
+ | **`type`** | **`"switch"` \| `"range"` \| `"radio"` \| `"checkbox"` \| `"button"`** (optional) | Available on **`row`** in **`itemClick`**; not sent to **`navlink`**. |
83
+ | **`switchToPanelId`** | string (optional) | After **`itemClick`**, the navigator switches the active panel to this **`id`**. |
84
+
85
+ ## Events
86
+
87
+ ### `itemClick`
15
88
 
16
- - `id`, `style` (optional): strings.
17
- - `panels` (optional): JSON string — `Panel[]` (`id`, optional `title`, `parentPanelId`, `cards` with `rows` of `CardRow`: `key`, `text`, optional `bootstrapIcon`, `switchToPanelId`, `type`, `badge`, etc.).
89
+ Fired when the user activates a row (via **`hb-sidenav-button`** **`pageChange`**). **`event.detail`** matches **`CardRowSelected`**:
18
90
 
19
- ### Events
91
+ | Field | Meaning |
92
+ |-------|---------|
93
+ | **`id`** | Host **`id`** prop value (may be empty). |
94
+ | **`panel`** | Active panel fields **without** the **`cards`** array (plain object clone). |
95
+ | **`card`** | Selected card fields **without** the **`rows`** array. |
96
+ | **`row`** | The full **`CardRow`** that was clicked. |
20
97
 
21
- - `itemClick`: detail matches selected row context (panel, card, row, `id`) as built in `component.wc.svelte` see types `CardRowSelected` in `webcomponent.type.d.ts`.
98
+ If **`row.switchToPanelId`** is set, the internal active panel updates after the event is dispatched.
22
99
 
23
- ### Usage notes
100
+ ## Styling (Bulma)
24
101
 
25
- - **Slots:** none.
26
- - **CSS parts:** `testpart`.
27
- - Type file lists a nested `event.itemClick` shape; the element dispatches the event name `itemClick` at the top level.
102
+ The component uses Bulma layout utilities and theme variables. Prefer **`--bulma-*`** on **`body`**, **`:root`**, or a parent that pierces into shadow DOM only if your bundler setup allows; otherwise set variables on elements that apply to this tree per your integration.
28
103
 
29
- ### Minimal HTML example
104
+ Documented variables (see **`extra/docs.ts`** / **`styleSetup`**):
105
+
106
+ | Variable | Role |
107
+ |----------|------|
108
+ | **`--bulma-block-spacing`** | Vertical gap between stacked groups of rows. |
109
+ | **`--bulma-text`** | Default text (rows, navbar). |
110
+ | **`--bulma-text-strong`** | Strong headings (titles). |
111
+ | **`--bulma-link`** | Interactive accents from nested navigation components. |
112
+ | **`--bulma-scheme-main`** | Surfaces behind stacks. |
113
+
114
+ Reference: [Bulma CSS variables](https://bulma.io/documentation/features/css-variables/).
115
+
116
+ ## Slots and CSS parts
117
+
118
+ - **Slots:** none on this host.
119
+ - **`::part`:** none declared for this host; nested **`hb-*`** children may expose their own documented parts.
120
+
121
+ ## Dependencies
122
+
123
+ Declared in **`extra/docs.ts`**:
124
+
125
+ - **`hb-navbar`** (which depends on **`hb-dropdown-simple`**)
126
+ - **`hb-sidenav-button`**
127
+
128
+ Ensure these custom elements are defined (for example via **`@htmlbricks/hb-bundle`** or the matching standalone packages) before using this navigator.
129
+
130
+ ## Examples
131
+
132
+ ### Minimal single panel
30
133
 
31
134
  ```html
32
135
  <hb-sidebar-cards-navigator
33
- panels='[{"id":"1","title":"Home","cards":[{"id":"c1","rows":[{"key":"a","text":"Item","bootstrapIcon":"house-door"}]}]}]'
136
+ panels='[{"id":"home","title":"Home","cards":[{"id":"menu","rows":[{"key":"dash","text":"Dashboard","bootstrapIcon":"speedometer2"}]}]}]'
34
137
  ></hb-sidebar-cards-navigator>
35
138
  ```
139
+
140
+ ### Main panel, child panel with back, and panel switch from a row
141
+
142
+ ```html
143
+ <hb-sidebar-cards-navigator
144
+ id="app-nav"
145
+ panels='[
146
+ {
147
+ "id": "root",
148
+ "main": true,
149
+ "title": "Overview",
150
+ "cards": [
151
+ {
152
+ "id": "account",
153
+ "title": "Account",
154
+ "rows": [
155
+ { "key": "profile", "text": "Profile", "bootstrapIcon": "person" },
156
+ {
157
+ "key": "advanced",
158
+ "text": "Advanced",
159
+ "bootstrapIcon": "gear",
160
+ "switchToPanelId": "advanced-panel"
161
+ }
162
+ ]
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "id": "advanced-panel",
168
+ "parentPanelId": "root",
169
+ "title": "Advanced",
170
+ "cards": [
171
+ {
172
+ "id": "opts",
173
+ "rows": [
174
+ { "key": "security", "text": "Security", "bootstrapIcon": "shield-lock" }
175
+ ]
176
+ }
177
+ ]
178
+ }
179
+ ]'
180
+ ></hb-sidebar-cards-navigator>
181
+ ```
182
+
183
+ ### Listening from JavaScript
184
+
185
+ ```js
186
+ const el = document.querySelector("hb-sidebar-cards-navigator");
187
+ el.addEventListener("itemClick", (e) => {
188
+ const { panel, card, row, id } = e.detail;
189
+ console.log(panel.id, card.id, row.key, id);
190
+ });
191
+ ```
192
+
193
+ ## TypeScript
194
+
195
+ Authoring types for this package: **`types/webcomponent.type.d.ts`** — **`Component`**, **`Panel`**, **`CardNavigator`**, **`CardRow`**, **`CardRowSelected`**, and **`Events`** (including **`itemClick`** detail typing for Svelte / wrappers).
package/main.iife.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var t={},n=Symbol(),r=`http://www.w3.org/1999/xhtml`,i=Array.isArray,a=Array.prototype.indexOf,o=Array.prototype.includes,s=Array.from,c=Object.keys,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyDescriptors,f=Object.prototype,p=Array.prototype,m=Object.getPrototypeOf,h=Object.isExtensible,g=()=>{};function _(e){for(var t=0;t<e.length;t++)e[t]()}function v(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var y=1024,b=2048,x=4096,S=8192,ee=16384,C=32768,te=1<<25,ne=65536,re=1<<18,ie=1<<19,ae=1<<20,oe=1<<25,se=65536,ce=1<<21,le=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`legacy props`),pe=Symbol(``),w=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},me=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function he(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function ge(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function _e(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ve(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function ye(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function be(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function xe(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Se(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ce(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function we(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Te(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ee(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function De(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Oe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function E(e){T=e}var D;function O(e){if(e===null)throw De(),t;return D=e}function ke(){return O(B(D))}function Ae(e){if(T){if(B(D)!==null)throw De(),t;D=e}}function je(e=1){if(T){for(var t=e,n=D;t--;)n=B(n);D=n}}function Me(e=!0){for(var t=0,n=D;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=B(n);e&&n.remove(),n=i}}function Ne(e){if(!e||e.nodeType!==8)throw De(),t;return e.data}function Pe(e){return e===this.v}function Fe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ie(e){return!Fe(e,this.v)}var Le=!1,Re=!1,k=null;function ze(e){k=e}function Be(e,t=!1,n){k={p:k,i:!1,c:null,e:null,s:e,x:null,r:q,l:Re&&!t?{s:null,u:null,$:[]}:null}}function Ve(e){var t=k,n=t.e;if(n!==null){t.e=null;for(var r of n)un(r)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,e??{}}function He(){return!Re||k!==null&&k.l===null}var Ue=[];function We(){var e=Ue;Ue=[],_(e)}function A(e){if(Ue.length===0&&!tt){var t=Ue;queueMicrotask(()=>{t===Ue&&We()})}Ue.push(e)}function Ge(){for(;Ue.length>0;)We()}function Ke(e){var t=q;if(t===null)return W.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;j(e,t)}function j(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var qe=~(b|x|y);function M(e,t){e.f=e.f&qe|t}function Je(e){e.f&512||e.deps===null?M(e,y):M(e,x)}function Ye(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=se,Ye(t.deps))}function Xe(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),Ye(e.deps),M(e,y)}var Ze=!1,Qe=!1;function $e(e){var t=Qe;try{return Qe=!1,[e(),Qe]}finally{Qe=t}}var N=new Set,P=null,F=null,et=null,tt=!1,nt=!1,rt=null,it=null,at=0,ot=1,st=class e{id=ot++;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=new Map;#r=new Map;#i=null;#a=[];#o=new Set;#s=new Set;#c=new Map;is_fork=!1;#l=!1;#u=new Set;#d(){return this.is_fork||this.#r.size>0}#f(){for(let n of this.#u)for(let r of n.#r.keys()){for(var e=!1,t=r;t.parent!==null;){if(this.#c.has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}skip_effect(e){this.#c.has(e)||this.#c.set(e,{d:[],m:[]})}unskip_effect(e){var t=this.#c.get(e);if(t){this.#c.delete(e);for(var n of t.d)M(n,b),this.schedule(n);for(n of t.m)M(n,x),this.schedule(n)}}#p(){if(at++>1e3&&(N.delete(this),lt()),!this.#d()){for(let e of this.#o)this.#s.delete(e),M(e,b),this.schedule(e);for(let e of this.#s)M(e,x),this.schedule(e)}let t=this.#a;this.#a=[],this.apply();var n=rt=[],r=[],i=it=[];for(let e of t)try{this.#m(e,n,r)}catch(t){throw ht(e),t}if(P=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(rt=null,it=null,this.#d()||this.#f()){this.#h(r),this.#h(n);for(let[e,t]of this.#c)mt(e,t)}else{this.#n.size===0&&N.delete(this),this.#o.clear(),this.#s.clear();for(let e of this.#e)e(this);this.#e.clear(),ut(r),ut(n),this.#i?.resolve()}var o=P;if(this.#a.length>0){let e=o??=this;e.#a.push(...this.#a.filter(t=>!e.#a.includes(t)))}o!==null&&(N.add(o),o.#p()),N.has(this)||this.#g()}#m(e,t,n){e.f^=y;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#c.has(r))&&r.fn!==null){a?r.f^=y:i&4?t.push(r):Le&&i&16777224?n.push(r):zn(r)&&(i&16&&this.#s.add(r),Wn(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#h(e){for(var t=0;t<e.length;t+=1)Xe(e[t],this.#o,this.#s)}capture(e,t,r=!1){t!==n&&!this.previous.has(e)&&this.previous.set(e,t),e.f&8388608||(this.current.set(e,[e.v,r]),F?.set(e,e.v))}activate(){P=this}deactivate(){P=null,F=null}flush(){try{nt=!0,P=this,this.#p()}finally{at=0,et=null,rt=null,it=null,nt=!1,P=null,F=null,Ft.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear(),N.delete(this)}#g(){for(let c of N){var e=c.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(c.current.has(r)){var n=c.current.get(r)[0];if(e&&i!==n)c.current.set(r,[i,a]);else continue}t.push(r)}var r=[...c.current.keys()].filter(e=>!this.current.has(e));if(r.length===0)e&&c.discard();else if(t.length>0){c.activate();var i=new Set,a=new Map;for(var o of t)dt(o,r,i,a);if(c.#a.length>0){c.apply();for(var s of c.#a)c.#m(s,[],[]);c.#a=[]}c.deactivate()}}for(let e of N)e.#u.has(this)&&(e.#u.delete(this),e.#u.size===0&&!e.#d()&&(e.activate(),e.#p()))}increment(e,t){let n=this.#n.get(t)??0;if(this.#n.set(t,n+1),e){let e=this.#r.get(t)??0;this.#r.set(t,e+1)}}decrement(e,t,n){let r=this.#n.get(t)??0;if(r===1?this.#n.delete(t):this.#n.set(t,r-1),e){let e=this.#r.get(t)??0;e===1?this.#r.delete(t):this.#r.set(t,e-1)}this.#l||n||(this.#l=!0,A(()=>{this.#l=!1,this.flush()}))}transfer_effects(e,t){for(let t of e)this.#o.add(t);for(let e of t)this.#s.add(e);e.clear(),t.clear()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=v()).promise}static ensure(){if(P===null){let t=P=new e;nt||(N.add(P),tt||A(()=>{P===t&&t.flush()}))}return P}apply(){if(!Le||!this.is_fork&&N.size===1){F=null;return}F=new Map;for(let[e,[t]]of this.current)F.set(e,t);for(let n of N)if(!(n===this||n.is_fork)){var e=!1,t=!1;if(n.id<this.id)for(let[r,[,i]]of n.current)i||(e||=this.current.has(r),t||=!this.current.has(r));if(e&&t)this.#u.add(n);else for(let[e,t]of n.previous)F.has(e)||F.set(e,t)}}schedule(e){if(et=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(rt!==null&&t===q&&(Le||(W===null||!(W.f&2))&&!Ze))return;if(n&96){if(!(n&1024))return;t.f^=y}}this.#a.push(t)}};function ct(e){var t=tt;tt=!0;try{var n;for(e&&(P!==null&&!P.is_fork&&P.flush(),n=e());;){if(Ge(),P===null)return n;P.flush()}}finally{tt=t}}function lt(){try{be()}catch(e){j(e,et)}}var I=null;function ut(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&zn(r)&&(I=new Set,Wn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Sn(r),I?.size>0)){Ft.clear();for(let e of I){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)I.has(n)&&(I.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Wn(n)}}I.clear()}}I=null}}function dt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?dt(i,t,n,r):e&4194320&&!(e&2048)&&ft(i,t,r)&&(M(i,b),pt(i))}}function ft(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(o.call(t,r))return!0;if(r.f&2&&ft(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function pt(e){P.schedule(e)}function mt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),M(e,y);for(var n=e.first;n!==null;)mt(n,t),n=n.next}}function ht(e){M(e,y);for(var t=e.first;t!==null;)ht(t),t=t.next}function gt(e){let t=0,n=Lt(0),r;return()=>{sn()&&($(n),hn(()=>(t===0&&(r=qn(()=>e(()=>Vt(n)))),t+=1,()=>{A(()=>{--t,t===0&&(r?.(),r=void 0,Vt(n))})})))}}var _t=ne|ie;function vt(e,t,n,r){new yt(e,t,n,r)}var yt=class{parent;is_pending=!1;transform_error;#e;#t=T?D:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=gt(()=>(this.#m=Lt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=q;t.b=this,t.f|=128,n(e)},this.parent=q.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=_n(()=>{if(T){let e=this.#t;ke();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},_t),T&&(this.#e=D)}#g(){try{this.#a=H(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=H(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=H(()=>e(this.#e)),A(()=>{var e=this.#c=document.createDocumentFragment(),t=z();e.append(t),this.#a=this.#x(()=>H(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Cn(this.#o,()=>{this.#o=null}),this.#b(P))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=H(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Dn(this.#a,e);let t=this.#n.pending;this.#o=H(()=>t(this.#e))}else this.#b(P)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Xe(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=q,n=W,r=k;J(this.#i),K(this.#i),ze(this.#i.ctx);try{return st.ensure(),e()}catch(e){return Ke(e),null}finally{J(t),K(n),ze(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Cn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,A(()=>{this.#d=!1,this.#m&&zt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),$(this.#m)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(!t&&!n)throw e;this.#a&&=(U(this.#a),null),this.#o&&=(U(this.#o),null),this.#s&&=(U(this.#s),null),T&&(O(this.#t),je(),O(Me()));var r=!1,i=!1;let a=()=>{if(r){Oe();return}r=!0,i&&Ee(),this.#s!==null&&Cn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){j(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return H(()=>{var t=q;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return j(e,this.#i.parent),null}}))};A(()=>{var t;try{t=this.transform_error(e)}catch(e){j(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>j(e,this.#i&&this.#i.parent)):o(t)})}};function bt(e,t,n,r){let i=He()?wt:Dt;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=q,s=xt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){o.f&16384||j(e,o)}St()}if(n.length===0){c.then(()=>l(t.map(i)));return}var u=Ct();function d(){Promise.all(n.map(e=>Tt(e))).then(e=>l([...t.map(i),...e])).catch(e=>j(e,o)).finally(()=>u())}c?c.then(()=>{s(),d(),St()}):d()}function xt(){var e=q,t=W,n=k,r=P;return function(i=!0){J(e),K(t),ze(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function St(e=!0){J(null),K(null),ze(null),e&&P?.deactivate()}function Ct(){var e=q,t=e.b,n=P,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function wt(e){var t=2|b,r=W!==null&&W.f&2?W:null;return q!==null&&(q.f|=ie),{ctx:k,deps:null,effects:null,equals:Pe,f:t,fn:e,reactions:null,rv:0,v:n,wv:0,parent:r??q,ac:null}}function Tt(e,t,r){let i=q;i===null&&he();var a=void 0,o=Lt(n),s=!W,c=new Map;return mn(()=>{var t=q,n=v();a=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(St)}catch(e){n.reject(e),St()}var r=P;if(s){if(t.f&32768)var l=Ct();if(i.b.is_rendered())c.get(r)?.reject(w),c.delete(r);else{for(let e of c.values())e.reject(w);c.clear()}c.set(r,n)}let u=(e,n=void 0)=>{if(l&&l(n===w),!(n===w||t.f&16384)){if(r.activate(),n)o.f|=ue,zt(o,n);else{o.f&8388608&&(o.f^=ue),zt(o,e);for(let[e,t]of c){if(c.delete(e),e===r)break;t.reject(w)}}r.deactivate()}};n.promise.then(u,e=>u(null,e||`unknown`))}),cn(()=>{for(let e of c.values())e.reject(w)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function Et(e){let t=wt(e);return Le||Mn(t),t}function Dt(e){let t=wt(e);return t.equals=Ie,t}function Ot(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)U(t[n])}}function kt(e){for(var t=e.parent;t!==null;){if(!(t.f&2))return t.f&16384?null:t;t=t.parent}return null}function At(e){var t,n=q;J(kt(e));try{e.f&=~se,Ot(e),t=Vn(e)}finally{J(n)}return t}function jt(e){var t=e.v,n=At(e);if(!e.equals(n)&&(e.wv=Rn(),(!P?.is_fork||e.deps===null)&&(e.v=n,P?.capture(e,t,!0),e.deps===null))){M(e,y);return}An||(F===null?Je(e):(sn()||P?.is_fork)&&F.set(e,n))}function Mt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(w),t.teardown=g,t.ac=null,Un(t,0),yn(t))}function Nt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&Wn(t)}var Pt=new Set,Ft=new Map,It=!1;function Lt(e,t){return{f:0,v:e,reactions:null,equals:Pe,rv:0,wv:0}}function L(e,t){let n=Lt(e,t);return Mn(n),n}function Rt(e,t=!1,n=!0){let r=Lt(e);return t||(r.equals=Ie),Re&&n&&k!==null&&k.l!==null&&(k.l.s??=[]).push(r),r}function R(e,t,n=!1){return W!==null&&(!G||W.f&131072)&&He()&&W.f&4325394&&(Y===null||!o.call(Y,e))&&Te(),zt(e,n?Ut(t):t,it)}function zt(e,t,n=null){if(!e.equals(t)){var r=e.v;An?Ft.set(e,t):Ft.set(e,r),e.v=t;var i=st.ensure();if(i.capture(e,r),e.f&2){let t=e;e.f&2048&&At(t),F===null&&Je(t)}e.wv=Rn(),Ht(e,b,n),He()&&q!==null&&q.f&1024&&!(q.f&96)&&(Q===null?Nn([e]):Q.push(e)),!i.is_fork&&Pt.size>0&&!It&&Bt()}return t}function Bt(){It=!1;for(let e of Pt)e.f&1024&&M(e,x),zn(e)&&Wn(e);Pt.clear()}function Vt(e){R(e,e.v+1)}function Ht(e,t,n){var r=e.reactions;if(r!==null)for(var i=He(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===q)){var l=(c&b)===0;if(l&&M(s,t),c&2){var u=s;F?.delete(u),c&65536||(c&512&&(s.f|=se),Ht(u,x,n))}else if(l){var d=s;c&16&&I!==null&&I.add(d),n===null?pt(d):n.push(d)}}}}function Ut(e){if(typeof e!=`object`||!e||de in e)return e;let t=m(e);if(t!==f&&t!==p)return e;var r=new Map,a=i(e),o=L(0),s=null,c=In,l=e=>{if(In===c)return e();var t=W,n=In;K(null),Ln(c);var r=e();return K(t),Ln(n),r};return a&&r.set(`length`,L(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Ce();var i=r.get(t);return i===void 0?l(()=>{var e=L(n.value,s);return r.set(t,e),e}):R(i,n.value,!0),!0},deleteProperty(e,t){var i=r.get(t);if(i===void 0){if(t in e){let e=l(()=>L(n,s));r.set(t,e),Vt(o)}}else R(i,n),Vt(o);return!0},get(t,i,a){if(i===de)return e;var o=r.get(i),c=i in t;if(o===void 0&&(!c||u(t,i)?.writable)&&(o=l(()=>L(Ut(c?t[i]:n),s)),r.set(i,o)),o!==void 0){var d=$(o);return d===n?void 0:d}return Reflect.get(t,i,a)},getOwnPropertyDescriptor(e,t){var i=Reflect.getOwnPropertyDescriptor(e,t);if(i&&`value`in i){var a=r.get(t);a&&(i.value=$(a))}else if(i===void 0){var o=r.get(t),s=o?.v;if(o!==void 0&&s!==n)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return i},has(e,t){if(t===de)return!0;var i=r.get(t),a=i!==void 0&&i.v!==n||Reflect.has(e,t);return(i!==void 0||q!==null&&(!a||u(e,t)?.writable))&&(i===void 0&&(i=l(()=>L(a?Ut(e[t]):n,s)),r.set(t,i)),$(i)===n)?!1:a},set(e,t,i,c){var d=r.get(t),f=t in e;if(a&&t===`length`)for(var p=i;p<d.v;p+=1){var m=r.get(p+``);m===void 0?p in e&&(m=l(()=>L(n,s)),r.set(p+``,m)):R(m,n)}if(d===void 0)(!f||u(e,t)?.writable)&&(d=l(()=>L(void 0,s)),R(d,Ut(i)),r.set(t,d));else{f=d.v!==n;var h=l(()=>Ut(i));R(d,h)}var g=Reflect.getOwnPropertyDescriptor(e,t);if(g?.set&&g.set.call(c,i),!f){if(a&&typeof t==`string`){var _=r.get(`length`),v=Number(t);Number.isInteger(v)&&v>=_.v&&R(_,v+1)}Vt(o)}return!0},ownKeys(e){$(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==n});for(var[i,a]of r)a.v!==n&&!(i in e)&&t.push(i);return t},setPrototypeOf(){we()}})}var Wt,Gt,Kt,qt;function Jt(){if(Wt===void 0){Wt=window,Gt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Kt=u(t,`firstChild`).get,qt=u(t,`nextSibling`).get,h(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),h(n)&&(n.__t=void 0)}}function z(e=``){return document.createTextNode(e)}function Yt(e){return Kt.call(e)}function B(e){return qt.call(e)}function Xt(e,t){if(!T)return Yt(e);var n=Yt(D);if(n===null)n=D.appendChild(z());else if(t&&n.nodeType!==3){var r=z();return n?.before(r),O(r),r}return t&&nn(n),O(n),n}function Zt(e,t=!1){if(!T){var n=Yt(e);return n instanceof Comment&&n.data===``?B(n):n}if(t){if(D?.nodeType!==3){var r=z();return D?.before(r),O(r),r}nn(D)}return D}function Qt(e,t=1,n=!1){let r=T?D:e;for(var i;t--;)i=r,r=B(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=z();return r===null?i?.after(a):r.before(a),O(a),a}nn(r)}return O(r),r}function $t(e){e.textContent=``}function en(){return!Le||I!==null?!1:(q.f&C)!==0}function tn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function nn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function rn(e){var t=W,n=q;K(null),J(null);try{return e()}finally{K(t),J(n)}}function an(e){q===null&&(W===null&&ye(e),ve()),An&&_e(e)}function on(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function V(e,t){var n=q;n!==null&&n.f&8192&&(e|=S);var r={ctx:k,deps:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if(e&4)rt===null?st.ensure().schedule(r):rt.push(r);else if(t!==null){try{Wn(r)}catch(e){throw U(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ne))}if(i!==null&&(i.parent=n,n!==null&&on(i,n),W!==null&&W.f&2&&!(e&64))){var a=W;(a.effects??=[]).push(i)}return r}function sn(){return W!==null&&!G}function cn(e){let t=V(8,null);return M(t,y),t.teardown=e,t}function ln(e){an(`$effect`);var t=q.f;if(!W&&t&32&&!(t&32768)){var n=k;(n.e??=[]).push(e)}else return un(e)}function un(e){return V(4|ae,e)}function dn(e){st.ensure();let t=V(64|ie,e);return()=>{U(t)}}function fn(e){st.ensure();let t=V(64|ie,e);return(e={})=>new Promise(n=>{e.outro?Cn(t,()=>{U(t),n(void 0)}):(U(t),n(void 0))})}function pn(e){return V(4,e)}function mn(e){return V(le|ie,e)}function hn(e,t=0){return V(8|t,e)}function gn(e,t=[],n=[],r=[]){bt(r,t,n,t=>{V(8,()=>e(...t.map($)))})}function _n(e,t=0){return V(16|t,e)}function H(e){return V(32|ie,e)}function vn(e){var t=e.teardown;if(t!==null){let e=An,n=W;jn(!0),K(null);try{t.call(null)}finally{jn(e),K(n)}}}function yn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&rn(()=>{e.abort(w)});var r=n.next;n.f&64?n.parent=null:U(n,t),n=r}}function bn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||U(t),t=n}}function U(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(xn(e.nodes.start,e.nodes.end),n=!0),M(e,te),yn(e,t&&!n),Un(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();vn(e),e.f^=te,e.f|=ee;var i=e.parent;i!==null&&i.first!==null&&Sn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function xn(e,t){for(;e!==null;){var n=e===t?null:B(e);e.remove(),e=n}}function Sn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Cn(e,t,n=!0){var r=[];wn(e,r,!0);var i=()=>{n&&U(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function wn(e,t,n){if(!(e.f&8192)){e.f^=S;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next,o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;wn(i,t,o?n:!1),i=a}}}function Tn(e){En(e,!0)}function En(e,t){if(e.f&8192){e.f^=S,e.f&1024||(M(e,b),st.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;En(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Dn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:B(n);t.append(n),n=i}}var On=null,kn=!1,An=!1;function jn(e){An=e}var W=null,G=!1;function K(e){W=e}var q=null;function J(e){q=e}var Y=null;function Mn(e){W!==null&&(!Le||W.f&2)&&(Y===null?Y=[e]:Y.push(e))}var X=null,Z=0,Q=null;function Nn(e){Q=e}var Pn=1,Fn=0,In=Fn;function Ln(e){In=e}function Rn(){return++Pn}function zn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~se),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(zn(a)&&jt(a),a.wv>e.wv)return!0}t&512&&F===null&&M(e,y)}return!1}function Bn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!Le&&Y!==null&&o.call(Y,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Bn(a,t,!1):t===a&&(n?M(a,b):a.f&1024&&M(a,x),pt(a))}}function Vn(e){var t=X,n=Z,r=Q,i=W,a=Y,o=k,s=G,c=In,l=e.f;X=null,Z=0,Q=null,W=l&96?null:e,Y=null,ze(e.ctx),G=!1,In=++Fn,e.ac!==null&&(rn(()=>{e.ac.abort(w)}),e.ac=null);try{e.f|=ce;var u=e.fn,d=u();e.f|=C;var f=e.deps,p=P?.is_fork;if(X!==null){var m;if(p||Un(e,Z),f!==null&&Z>0)for(f.length=Z+X.length,m=0;m<X.length;m++)f[Z+m]=X[m];else e.deps=f=X;if(sn()&&e.f&512)for(m=Z;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Z<f.length&&(Un(e,Z),f.length=Z);if(He()&&Q!==null&&!G&&f!==null&&!(e.f&6146))for(m=0;m<Q.length;m++)Bn(Q[m],e);if(i!==null&&i!==e){if(Fn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Fn;if(t!==null)for(let e of t)e.rv=Fn;Q!==null&&(r===null?r=Q:r.push(...Q))}return e.f&8388608&&(e.f^=ue),d}catch(e){return Ke(e)}finally{e.f^=ce,X=t,Z=n,Q=r,W=i,Y=a,ze(o),G=s,In=c}}function Hn(e,t){let n=t.reactions;if(n!==null){var r=a.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(X===null||!o.call(X,t))){var s=t;s.f&512&&(s.f^=512,s.f&=~se),Je(s),Mt(s),Un(s,0)}}function Un(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Hn(e,n[r])}function Wn(e){var t=e.f;if(!(t&16384)){M(e,y);var n=q,r=kn;q=e,kn=!0;try{t&16777232?bn(e):yn(e),vn(e);var i=Vn(e);e.teardown=typeof i==`function`?i:null,e.wv=Pn}finally{kn=r,q=n}}}function $(e){var t=(e.f&2)!=0;if(On?.add(e),W!==null&&!G&&!(q!==null&&q.f&16384)&&(Y===null||!o.call(Y,e))){var n=W.deps;if(W.f&2097152)e.rv<Fn&&(e.rv=Fn,X===null&&n!==null&&n[Z]===e?Z++:X===null?X=[e]:X.push(e));else{(W.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[W]:o.call(r,W)||r.push(W)}}if(An&&Ft.has(e))return Ft.get(e);if(t){var i=e;if(An){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Kn(i))&&(a=At(i)),Ft.set(i,a),a}var s=(i.f&512)==0&&!G&&W!==null&&(kn||(W.f&512)!=0),c=(i.f&C)===0;zn(i)&&(s&&(i.f|=512),jt(i)),s&&!c&&(Nt(i),Gn(i))}if(F?.has(e))return F.get(e);if(e.f&8388608)throw e.v;return e.v}function Gn(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Nt(t),Gn(t))}function Kn(e){if(e.v===n)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Ft.has(t)||t.f&2&&Kn(t))return!0;return!1}function qn(e){var t=G;try{return G=!0,e()}finally{G=t}}var Jn=Symbol(`events`),Yn=new Set,Xn=new Set;function Zn(e,t,n,r={}){function i(e){if(r.capture||er.call(t,e),!e.cancelBubble)return rn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?A(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Qn(e,t,n,r,i){var a={capture:r,passive:i},o=Zn(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&cn(()=>{t.removeEventListener(e,o,a)})}var $n=null;function er(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;$n=e;var o=0,s=$n===e&&e[Jn];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[Jn]=t;return}var u=i.indexOf(t);if(u===-1)return;c<=u&&(o=c)}if(a=i[o]||e.target,a!==t){l(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=W,f=q;K(null),J(null);try{for(var p,m=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var g=a[Jn]?.[r];g!=null&&(!a.disabled||e.target===a)&&g.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble||h===t||h===null)break;a=h}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Jn]=t,delete e.currentTarget,K(d),J(f)}}}var tr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function nr(e){return tr?.createHTML(e)??e}function rr(e){var t=tn(`template`);return t.innerHTML=nr(e.replaceAll(`<!>`,`<!---->`)),t.content}function ir(e,t){var n=q;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function ar(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(T)return ir(D,null),D;i===void 0&&(i=rr(a?e:`<!>`+e),n||(i=Yt(i)));var t=r||Gt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Yt(t),s=t.lastChild;ir(o,s)}else ir(t,t);return t}}function or(){if(T)return ir(D,null),D;var e=document.createDocumentFragment(),t=document.createComment(``),n=z();return e.append(t,n),ir(t,n),e}function sr(e,t){if(T){var n=q;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=D),ke();return}e!==null&&e.before(t)}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var cr=[`touchstart`,`touchmove`];function lr(e){return cr.includes(e)}function ur(e,t){return pr(e,t)}function dr(e,n){Jt(),n.intro=n.intro??!1;let r=n.target,i=T,a=D;try{for(var o=Yt(r);o&&(o.nodeType!==8||o.data!==`[`);)o=B(o);if(!o)throw t;E(!0),O(o);let i=pr(e,{...n,anchor:o});return E(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
2
2
  `).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==t&&console.warn(`Failed to hydrate: `,i),n.recover===!1&&xe(),Jt(),$t(r),E(!1),ur(e,n)}finally{E(i),O(a)}}var fr=new Map;function pr(e,{target:n,anchor:r,props:i={},events:a,context:o,intro:c=!0,transformError:l}){Jt();var u=void 0,d=fn(()=>{var c=r??n.appendChild(z());vt(c,{pending:()=>{}},n=>{Be({});var r=k;if(o&&(r.c=o),a&&(i.$$events=a),T&&ir(n,null),u=e(n,i)||{},T&&(q.nodes.end=D,D===null||D.nodeType!==8||D.data!==`]`))throw De(),t;Ve()},l);var d=new Set,f=e=>{for(var t=0;t<e.length;t++){var r=e[t];if(!d.has(r)){d.add(r);var i=lr(r);for(let e of[n,document]){var a=fr.get(e);a===void 0&&(a=new Map,fr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,er,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(s(Yn)),Xn.add(f),()=>{for(var e of d)for(let r of[n,document]){var t=fr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,er),t.delete(e),t.size===0&&fr.delete(r)):t.set(e,i)}Xn.delete(f),c!==r&&c.parentNode?.removeChild(c)}});return mr.set(u,d),u}var mr=new WeakMap;function hr(e,t){let n=mr.get(e);return n?(mr.delete(e),n(t)):Promise.resolve()}var gr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Tn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(U(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Dn(r,t),t.append(z()),this.#n.set(e,{effect:r,fragment:t})}else U(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Cn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(U(n.effect),this.#n.delete(e))};ensure(e,t){var n=P,r=en();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=z();i.append(a),this.#n.set(e,{effect:H(()=>t(a)),fragment:i})}else this.#t.set(e,H(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else T&&(this.anchor=D),this.#a(n)}};function _r(e,t,n=!1){var r;T&&(r=D,ke());var i=new gr(e),a=n?ne:0;function o(e,t){if(T){var n=Ne(r);if(e!==parseInt(n.substring(1))){var a=Me();O(a),i.anchor=a,E(!1),i.ensure(e,t),E(!0);return}}i.ensure(e,t)}_n(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function vr(e,t,n){for(var r=[],i=t.length,a,o=t.length,c=0;c<i;c++){let n=t[c];Cn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;yr(e,s(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var l=r.length===0&&n!==null;if(l){var u=n,d=u.parentNode;$t(d),d.append(u),e.items.clear()}yr(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function yr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=oe,Dn(a,document.createDocumentFragment())):U(t[i],n)}}var br;function xr(e,t,n,r,a,o=null){var c=e,l=new Map;if(t&4){var u=e;c=T?O(Yt(u)):u.appendChild(z())}T&&ke();var d=null,f=Dt(()=>{var e=n();return i(e)?e:e==null?[]:s(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Cr(v,p,c,t,r),d!==null&&(p.length===0?d.f&33554432?(d.f^=oe,Tr(d,null,c)):Tn(d):Cn(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:_n(()=>{p=$(f);var e=p.length;let i=!1;T&&Ne(c)===`[!`!=(e===0)&&(c=Me(),O(c),E(!1),i=!0);for(var s=new Set,u=P,v=en(),y=0;y<e;y+=1){T&&D.nodeType===8&&D.data===`]`&&(c=D,i=!0,E(!1));var b=p[y],x=r(b,y),S=h?null:l.get(x);S?(S.v&&zt(S.v,b),S.i&&zt(S.i,y),v&&u.unskip_effect(S.e)):(S=wr(l,h?c:br??=z(),b,x,y,a,t,n),h||(S.e.f|=oe),l.set(x,S)),s.add(x)}if(e===0&&o&&!d&&(h?d=H(()=>o(c)):(d=H(()=>o(br??=z())),d.f|=oe)),e>s.size&&ge(``,``,``),T&&e>0&&O(Me()),!h)if(m.set(u,s),v){for(let[e,t]of l)s.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);i&&E(!0),$(f)}),flags:t,items:l,pending:m,outrogroups:null,fallback:d};h=!1,T&&(c=D)}function Sr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Cr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,c=e.items,l=Sr(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(a)for(v=0;v<o;v+=1)h=t[v],g=i(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<o;v+=1){if(h=t[v],g=i(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Tn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=oe,_===l)Tr(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Er(e,d,_),Er(e,_,y),Tr(_,y,n),d=_,p=[],m=[],l=Sr(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Tr(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Er(e,S.prev,ee.next),Er(e,d,S),Er(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Tr(_,l,n),Er(e,_.prev,_.next),Er(e,_,d===null?e.effect.first:d.next),Er(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Sr(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Sr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(yr(e,s(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var C=[];if(u!==void 0)for(_ of u)_.f&8192||C.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&C.push(l),l=Sr(l.next);var te=C.length;if(te>0){var ne=r&4&&o===0?n:null;if(a){for(v=0;v<te;v+=1)C[v].nodes?.a?.measure();for(v=0;v<te;v+=1)C[v].nodes?.a?.fix()}vr(e,C,ne)}}a&&A(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function wr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Lt(n):Rt(n,!1,!1):null,l=o&2?Lt(i):null;return{v:c,i:l,e:H(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Tr(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=B(r);if(a.before(r),r===i)return;r=o}}function Er(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Dr(e,t){let n=null,r=T;var i;if(T){n=D;for(var a=Yt(document.head);a!==null&&(a.nodeType!==8||a.data!==e);)a=B(a);if(a===null)E(!1);else{var o=B(a);a.remove(),O(o)}}T||(i=document.head.appendChild(z()));try{_n(()=>t(i),re|ie)}finally{r&&(E(!0),O(n))}}function Or(e,t){pn(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=tn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var kr=[...`
3
- \r\f\xA0\v`];function Ar(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||kr.includes(r[o-1]))&&(s===r.length||kr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function jr(e,t,n,r,i,a){var o=e.__className;if(T||o!==n||o===void 0){var s=Ar(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}var Mr=Symbol(`is custom element`),Nr=Symbol(`is html`),Pr=me?`link`:`LINK`;function Fr(e,t,n,r){var i=Lr(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Pr)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&zr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ir(e,t,n){var r=W,i=q;let a=T;T&&E(!1),K(null),J(null);try{t!==`style`&&(Rr.has(e.getAttribute(`is`)||e.nodeName)||!customElements||customElements.get(e.getAttribute(`is`)||e.nodeName.toLowerCase())?zr(e).includes(t):n&&typeof n==`object`)?e[t]=n:Fr(e,t,n==null?n:String(n))}finally{K(r),J(i),a&&E(!0)}}function Lr(e){return e.__attributes??={[Mr]:e.nodeName.includes(`-`),[Nr]:e.namespaceURI===r}}var Rr=new Map;function zr(e){var t=e.getAttribute(`is`)||e.nodeName,n=Rr.get(t);if(n)return n;Rr.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=d(i),r)r[o].set&&n.push(o);i=m(i)}return n}function Br(e,t,n,r){var i=!Re||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?qn(r):r),s);let d;if(a){var f=de in e||fe in e;d=u(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,m=!1;a?[p,m]=$e(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=l(),d&&(i&&Se(t),d(p)));var h=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return h;if(d){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||m)&&d(t?h():e),e):h()})}var _=!1,v=(n&1?wt:Dt)(()=>(_=!1,h()));a&&$(v);var y=q;return(function(e,t){if(arguments.length>0){let n=t?$(v):i&&a?Ut(e):e;return R(v,n),_=!0,s!==void 0&&(s=n),e}return An&&_||y.f&16384?v.v:$(v)})}function Vr(e){return new Hr(e)}var Hr=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Rt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return $(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===fe?!0:($(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return R(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?dr:ur)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Le&&(!e?.props?.$$host||e.sync===!1)&&ct(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||l(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{hr(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},Ur;typeof HTMLElement==`function`&&(Ur=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=tn(`slot`);e!==`default`&&(n.name=e),sr(t,n)}}let t={},n=Gr(this);for(let r of this.$$s)r in n&&(r===`default`&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=Wr(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=Vr({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=dn(()=>{hn(()=>{this.$$r=!0;for(let e of c(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=Wr(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Wr(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return c(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Wr(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function Gr(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function Kr(e,t,n,r,i,a){let o=class extends Ur{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return c(t).map(e=>(t[e].attribute||e).toLowerCase())}};return c(t).forEach(e=>{l(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=Wr(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(u(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{l(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var qr={name:`@htmlbricks/svelte-webcomponent`,private:!0,version:`0.71.35`,type:`module`,scripts:{dev:`vite --open`,build:`vite build`,"publish:wc":`node publish.ts`,"build:wc":`node build.ts`,"watch:wc":`node watch.ts`,preview:`vite preview`,check:`svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json`,"release:patch":`npm version patch && git push && git push --tags && npm run build:wc && npm run publish:wc`,"release:minor":`npm version minor && git push && git push --tags && npm run build:wc && npm run publish:wc`,"release:major":`npm version major && git push && git push --tags && npm run build:wc && npm run publish:wc`},devDependencies:{"@google-pay/button-element":`^3.2.1`,"@paypal/paypal-js":`^9.5.0`,"@sveltejs/vite-plugin-svelte":`^7.0.0`,"@tsconfig/svelte":`^5.0.8`,"@types/debounce":`^1.2.4`,"@types/node":`^24.10.1`,"@types/rgb-hex":`^3.0.0`,"chart.js":`^4.5.1`,"date-holidays":`^3.26.12`,dayjs:`^1.11.20`,"hls.js":`^1.6.15`,"html5-joystick-new":`^0.0.6`,ol:`^10.8.0`,"perfect-freehand":`^1.2.3`,prettier:`^3.8.1`,"rollup-plugin-terser":`^7.0.2`,"sass-embedded":`^1.98.0`,"simple-serverless-auth-client":`^0.0.6`,"simple-webrtc-element":`^0.0.1`,"simple-webrtc-element-whep":`^0.2.3`,"style-to-object":`^1.0.14`,svelte:`^5.55.0`,"svelte-check":`^4.4.5`,terser:`^5.46.1`,"ts-json-schema-generator":`^2.9.0`,typescript:`^6.0.2`,vite:`^8.0.3`},dependencies:{"@floating-ui/dom":`^1.7.6`,"@popperjs/core":`^2.11.8`,debounce:`^3.0.0`,"html-colors":`^0.0.6`,marked:`^17.0.5`,raphael:`^2.3.0`,"rgb-hex":`^4.1.0`,"wc-js-utils":`^0.5.4`}};function Jr(e){let t=e?.repoName.split(`/`)?.[1]||e?.repoName;if(!t)throw Error(`wrong componentPath `+e?.repoName);if(!e?.version)throw Error(`wrong version `+e?.version);let n=e?.iifePath||`main.iife.js`;if(!document.getElementById(t+`-script`)&&!customElements?.get?.(t)&&!window?.customElements?.get?.(t))try{let r=document.createElement(`script`);if(r.id=t+`-script`,r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes(`localhost:6006`)){let e=t.split(`-`)[0];r.src=`http://localhost:6006/webcomponents/${t.replace(e+`-`,``)}/${n}`}document.head.appendChild(r)}catch(e){console.warn(e)}}var Yr=ar(`<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-1l0lk50"/>`),Xr=ar(`<hb-sidenav-button></hb-sidenav-button>`,2),Zr=ar(`<div class="is-flex is-flex-direction-column is-gap-1 svelte-1l0lk50"></div>`),Qr=ar(`<div class="hb-sidebar-cards-stack svelte-1l0lk50"><hb-navbar><i slot="nav-switcher"></i></hb-navbar> <!></div>`,2),$r={hash:`svelte-1l0lk50`,code:`@charset "UTF-8";
3
+ \r\f\xA0\v`];function Ar(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||kr.includes(r[o-1]))&&(s===r.length||kr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function jr(e,t,n,r,i,a){var o=e.__className;if(T||o!==n||o===void 0){var s=Ar(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}var Mr=Symbol(`is custom element`),Nr=Symbol(`is html`),Pr=me?`link`:`LINK`;function Fr(e,t,n,r){var i=Lr(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Pr)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&zr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ir(e,t,n){var r=W,i=q;let a=T;T&&E(!1),K(null),J(null);try{t!==`style`&&(Rr.has(e.getAttribute(`is`)||e.nodeName)||!customElements||customElements.get(e.getAttribute(`is`)||e.nodeName.toLowerCase())?zr(e).includes(t):n&&typeof n==`object`)?e[t]=n:Fr(e,t,n==null?n:String(n))}finally{K(r),J(i),a&&E(!0)}}function Lr(e){return e.__attributes??={[Mr]:e.nodeName.includes(`-`),[Nr]:e.namespaceURI===r}}var Rr=new Map;function zr(e){var t=e.getAttribute(`is`)||e.nodeName,n=Rr.get(t);if(n)return n;Rr.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=d(i),r)r[o].set&&n.push(o);i=m(i)}return n}function Br(e,t,n,r){var i=!Re||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?qn(r):r),s);let d;if(a){var f=de in e||fe in e;d=u(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,m=!1;a?[p,m]=$e(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=l(),d&&(i&&Se(t),d(p)));var h=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return h;if(d){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||m)&&d(t?h():e),e):h()})}var _=!1,v=(n&1?wt:Dt)(()=>(_=!1,h()));a&&$(v);var y=q;return(function(e,t){if(arguments.length>0){let n=t?$(v):i&&a?Ut(e):e;return R(v,n),_=!0,s!==void 0&&(s=n),e}return An&&_||y.f&16384?v.v:$(v)})}function Vr(e){return new Hr(e)}var Hr=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Rt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return $(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===fe?!0:($(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return R(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?dr:ur)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Le&&(!e?.props?.$$host||e.sync===!1)&&ct(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||l(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{hr(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},Ur;typeof HTMLElement==`function`&&(Ur=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=tn(`slot`);e!==`default`&&(n.name=e),sr(t,n)}}let t={},n=Gr(this);for(let r of this.$$s)r in n&&(r===`default`&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=Wr(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=Vr({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=dn(()=>{hn(()=>{this.$$r=!0;for(let e of c(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=Wr(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Wr(e,n,this.$$p_d,`toProp`),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return c(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Wr(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`toAttribute`)switch(i){case`Object`:case`Array`:return t==null?null:JSON.stringify(t);case`Boolean`:return t?``:null;case`Number`:return t??null;default:return t}else switch(i){case`Object`:case`Array`:return t&&JSON.parse(t);case`Boolean`:return t;case`Number`:return t==null?t:+t;default:return t}}function Gr(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function Kr(e,t,n,r,i,a){let o=class extends Ur{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return c(t).map(e=>(t[e].attribute||e).toLowerCase())}};return c(t).forEach(e=>{l(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=Wr(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(u(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{l(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var qr={name:`@htmlbricks/svelte-webcomponent`,private:!0,version:`0.71.36`,type:`module`,scripts:{dev:`vite --open`,build:`vite build`,"publish:wc":`node publish.ts`,"build:wc":`node build.ts`,"watch:wc":`node watch.ts`,preview:`vite preview`,check:`svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json`,"release:patch":`npm version patch && git push && git push --tags && npm run build:wc && npm run publish:wc`,"release:minor":`npm version minor && git push && git push --tags && npm run build:wc && npm run publish:wc`,"release:major":`npm version major && git push && git push --tags && npm run build:wc && npm run publish:wc`},devDependencies:{"@google-pay/button-element":`^3.2.1`,"@paypal/paypal-js":`^9.5.0`,"@sveltejs/vite-plugin-svelte":`^7.0.0`,"@tsconfig/svelte":`^5.0.8`,"@types/debounce":`^1.2.4`,"@types/node":`^24.10.1`,"@types/rgb-hex":`^3.0.0`,"chart.js":`^4.5.1`,"date-holidays":`^3.26.12`,dayjs:`^1.11.20`,"hls.js":`^1.6.15`,"html5-joystick-new":`^0.0.6`,ol:`^10.8.0`,"perfect-freehand":`^1.2.3`,prettier:`^3.8.1`,"rollup-plugin-terser":`^7.0.2`,"sass-embedded":`^1.98.0`,"simple-serverless-auth-client":`^0.0.6`,"simple-webrtc-element":`^0.0.1`,"simple-webrtc-element-whep":`^0.2.3`,"style-to-object":`^1.0.14`,svelte:`^5.55.0`,"svelte-check":`^4.4.5`,terser:`^5.46.1`,"ts-json-schema-generator":`^2.9.0`,typescript:`^6.0.2`,vite:`^8.0.3`},dependencies:{"@floating-ui/dom":`^1.7.6`,"@popperjs/core":`^2.11.8`,debounce:`^3.0.0`,"html-colors":`^0.0.6`,marked:`^17.0.5`,raphael:`^2.3.0`,"rgb-hex":`^4.1.0`,"wc-js-utils":`^0.5.4`}};function Jr(e){let t=e?.repoName.split(`/`)?.[1]||e?.repoName;if(!t)throw Error(`wrong componentPath `+e?.repoName);if(!e?.version)throw Error(`wrong version `+e?.version);let n=e?.iifePath||`main.iife.js`;if(!document.getElementById(t+`-script`)&&!customElements?.get?.(t)&&!window?.customElements?.get?.(t))try{let r=document.createElement(`script`);if(r.id=t+`-script`,r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes(`localhost:6006`)){let e=t.split(`-`)[0];r.src=`http://localhost:6006/webcomponents/${t.replace(e+`-`,``)}/${n}`}document.head.appendChild(r)}catch(e){console.warn(e)}}var Yr=ar(`<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css" class="svelte-1l0lk50"/>`),Xr=ar(`<hb-sidenav-button></hb-sidenav-button>`,2),Zr=ar(`<div class="is-flex is-flex-direction-column is-gap-1 svelte-1l0lk50"></div>`),Qr=ar(`<div class="hb-sidebar-cards-stack svelte-1l0lk50"><hb-navbar><i slot="nav-switcher"></i></hb-navbar> <!></div>`,2),$r={hash:`svelte-1l0lk50`,code:`@charset "UTF-8";
4
4
  @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");
5
5
  /*!
6
6
  * Bulma 1.x (Sass) for hb-sidebar-cards-navigator — flex/spacing helpers for stacked nav rows.