@neuralytics/alpine-ds 0.4.0 → 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/dist/index.mjs CHANGED
@@ -1,515 +1,515 @@
1
- import { defineComponent as W, ref as E, shallowRef as Fe, onMounted as Ae, watch as Oe, onUnmounted as De, h as Y, nextTick as Me, computed as q, createBlock as me, openBlock as F, unref as M, normalizeClass as ye, createElementBlock as Z, createCommentVNode as ee, toDisplayString as Ne } from "vue";
2
- import { tv as be } from "tailwind-variants";
3
- const ve = {
1
+ import { defineComponent as lt, ref as B, shallowRef as Ze, onMounted as Je, watch as ve, onUnmounted as tn, h as Zt, nextTick as en, useTemplateRef as Nt, onBeforeUnmount as Se, createBlock as gt, openBlock as z, Teleport as nn, createElementBlock as mt, createCommentVNode as yt, normalizeStyle as Jt, renderSlot as $t, useId as on, computed as bt, Fragment as sn, createElementVNode as it, createVNode as Te, withKeys as rn, unref as k, withCtx as wt, toDisplayString as Oe, mergeProps as Ae } from "vue";
2
+ import { tv as Ie } from "tailwind-variants";
3
+ const Ce = {
4
4
  loader: "line-md:loading-twotone-loop"
5
- }, Xt = ["xs", "sm", "md", "lg", "xl", "2xl"], xe = /^[a-z0-9]+(-[a-z0-9]+)*$/, R = (e, t, o, s = "") => {
6
- const n = e.split(":");
7
- if (e.slice(0, 1) === "@") {
8
- if (n.length < 2 || n.length > 3) return null;
9
- s = n.shift().slice(1);
10
- }
11
- if (n.length > 3 || !n.length) return null;
12
- if (n.length > 1) {
13
- const l = n.pop(), a = n.pop(), c = {
14
- provider: n.length > 0 ? n[0] : s,
5
+ }, hi = ["xs", "sm", "md", "lg", "xl", "2xl"], Re = /^[a-z0-9]+(-[a-z0-9]+)*$/, Ot = (t, e, n, o = "") => {
6
+ const i = t.split(":");
7
+ if (t.slice(0, 1) === "@") {
8
+ if (i.length < 2 || i.length > 3) return null;
9
+ o = i.shift().slice(1);
10
+ }
11
+ if (i.length > 3 || !i.length) return null;
12
+ if (i.length > 1) {
13
+ const c = i.pop(), a = i.pop(), l = {
14
+ provider: i.length > 0 ? i[0] : o,
15
15
  prefix: a,
16
- name: l
16
+ name: c
17
17
  };
18
- return t && !A(c) ? null : c;
18
+ return e && !dt(l) ? null : l;
19
19
  }
20
- const i = n[0], r = i.split("-");
20
+ const s = i[0], r = s.split("-");
21
21
  if (r.length > 1) {
22
- const l = {
23
- provider: s,
22
+ const c = {
23
+ provider: o,
24
24
  prefix: r.shift(),
25
25
  name: r.join("-")
26
26
  };
27
- return t && !A(l) ? null : l;
27
+ return e && !dt(c) ? null : c;
28
28
  }
29
- if (o && s === "") {
30
- const l = {
31
- provider: s,
29
+ if (n && o === "") {
30
+ const c = {
31
+ provider: o,
32
32
  prefix: "",
33
- name: i
33
+ name: s
34
34
  };
35
- return t && !A(l, o) ? null : l;
35
+ return e && !dt(c, n) ? null : c;
36
36
  }
37
37
  return null;
38
- }, A = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
39
- function Re(e, t) {
40
- const o = e.icons, s = e.aliases || /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
41
- function i(r) {
42
- if (o[r]) return n[r] = [];
43
- if (!(r in n)) {
44
- n[r] = null;
45
- const l = s[r] && s[r].parent, a = l && i(l);
46
- a && (n[r] = [l].concat(a));
38
+ }, dt = (t, e) => t ? !!((e && t.prefix === "" || t.prefix) && t.name) : !1;
39
+ function cn(t, e) {
40
+ const n = t.icons, o = t.aliases || /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ Object.create(null);
41
+ function s(r) {
42
+ if (n[r]) return i[r] = [];
43
+ if (!(r in i)) {
44
+ i[r] = null;
45
+ const c = o[r] && o[r].parent, a = c && s(c);
46
+ a && (i[r] = [c].concat(a));
47
47
  }
48
- return n[r];
48
+ return i[r];
49
49
  }
50
- return Object.keys(o).concat(Object.keys(s)).forEach(i), n;
50
+ return Object.keys(n).concat(Object.keys(o)).forEach(s), i;
51
51
  }
52
- const we = Object.freeze({
52
+ const Ee = Object.freeze({
53
53
  left: 0,
54
54
  top: 0,
55
55
  width: 16,
56
56
  height: 16
57
- }), N = Object.freeze({
57
+ }), xt = Object.freeze({
58
58
  rotate: 0,
59
59
  vFlip: !1,
60
60
  hFlip: !1
61
- }), z = Object.freeze({
62
- ...we,
63
- ...N
64
- }), Q = Object.freeze({
65
- ...z,
61
+ }), At = Object.freeze({
62
+ ...Ee,
63
+ ...xt
64
+ }), _t = Object.freeze({
65
+ ...At,
66
66
  body: "",
67
67
  hidden: !1
68
68
  });
69
- function ze(e, t) {
70
- const o = {};
71
- !e.hFlip != !t.hFlip && (o.hFlip = !0), !e.vFlip != !t.vFlip && (o.vFlip = !0);
72
- const s = ((e.rotate || 0) + (t.rotate || 0)) % 4;
73
- return s && (o.rotate = s), o;
74
- }
75
- function te(e, t) {
76
- const o = ze(e, t);
77
- for (const s in Q) s in N ? s in e && !(s in o) && (o[s] = N[s]) : s in t ? o[s] = t[s] : s in e && (o[s] = e[s]);
78
- return o;
69
+ function ln(t, e) {
70
+ const n = {};
71
+ !t.hFlip != !e.hFlip && (n.hFlip = !0), !t.vFlip != !e.vFlip && (n.vFlip = !0);
72
+ const o = ((t.rotate || 0) + (e.rotate || 0)) % 4;
73
+ return o && (n.rotate = o), n;
79
74
  }
80
- function Be(e, t, o) {
81
- const s = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null);
82
- let i = {};
83
- function r(l) {
84
- i = te(s[l] || n[l], i);
75
+ function te(t, e) {
76
+ const n = ln(t, e);
77
+ for (const o in _t) o in xt ? o in t && !(o in n) && (n[o] = xt[o]) : o in e ? n[o] = e[o] : o in t && (n[o] = t[o]);
78
+ return n;
79
+ }
80
+ function an(t, e, n) {
81
+ const o = t.icons, i = t.aliases || /* @__PURE__ */ Object.create(null);
82
+ let s = {};
83
+ function r(c) {
84
+ s = te(o[c] || i[c], s);
85
85
  }
86
- return r(t), o.forEach(r), te(e, i);
86
+ return r(e), n.forEach(r), te(t, s);
87
87
  }
88
- function Ie(e, t) {
89
- const o = [];
90
- if (typeof e != "object" || typeof e.icons != "object") return o;
91
- e.not_found instanceof Array && e.not_found.forEach((n) => {
92
- t(n, null), o.push(n);
88
+ function Le(t, e) {
89
+ const n = [];
90
+ if (typeof t != "object" || typeof t.icons != "object") return n;
91
+ t.not_found instanceof Array && t.not_found.forEach((i) => {
92
+ e(i, null), n.push(i);
93
93
  });
94
- const s = Re(e);
95
- for (const n in s) {
96
- const i = s[n];
97
- i && (t(n, Be(e, n, i)), o.push(n));
94
+ const o = cn(t);
95
+ for (const i in o) {
96
+ const s = o[i];
97
+ s && (e(i, an(t, i, s)), n.push(i));
98
98
  }
99
- return o;
99
+ return n;
100
100
  }
101
- const $e = {
101
+ const fn = {
102
102
  provider: "",
103
103
  aliases: {},
104
104
  not_found: {},
105
- ...we
105
+ ...Ee
106
106
  };
107
- function $(e, t) {
108
- for (const o in t) if (o in e && typeof e[o] != typeof t[o]) return !1;
107
+ function Pt(t, e) {
108
+ for (const n in e) if (n in t && typeof t[n] != typeof e[n]) return !1;
109
109
  return !0;
110
110
  }
111
- function Se(e) {
112
- if (typeof e != "object" || e === null) return null;
113
- const t = e;
114
- if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !$(e, $e)) return null;
115
- const o = t.icons;
116
- for (const n in o) {
117
- const i = o[n];
118
- if (!n || typeof i.body != "string" || !$(i, Q)) return null;
111
+ function Pe(t) {
112
+ if (typeof t != "object" || t === null) return null;
113
+ const e = t;
114
+ if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !Pt(t, fn)) return null;
115
+ const n = e.icons;
116
+ for (const i in n) {
117
+ const s = n[i];
118
+ if (!i || typeof s.body != "string" || !Pt(s, _t)) return null;
119
119
  }
120
- const s = t.aliases || /* @__PURE__ */ Object.create(null);
121
- for (const n in s) {
122
- const i = s[n], r = i.parent;
123
- if (!n || typeof r != "string" || !o[r] && !s[r] || !$(i, Q)) return null;
120
+ const o = e.aliases || /* @__PURE__ */ Object.create(null);
121
+ for (const i in o) {
122
+ const s = o[i], r = s.parent;
123
+ if (!i || typeof r != "string" || !n[r] && !o[r] || !Pt(s, _t)) return null;
124
124
  }
125
- return t;
125
+ return e;
126
126
  }
127
- const ne = /* @__PURE__ */ Object.create(null);
128
- function _e(e, t) {
127
+ const ee = /* @__PURE__ */ Object.create(null);
128
+ function un(t, e) {
129
129
  return {
130
- provider: e,
131
- prefix: t,
130
+ provider: t,
131
+ prefix: e,
132
132
  icons: /* @__PURE__ */ Object.create(null),
133
133
  missing: /* @__PURE__ */ new Set()
134
134
  };
135
135
  }
136
- function k(e, t) {
137
- const o = ne[e] || (ne[e] = /* @__PURE__ */ Object.create(null));
138
- return o[t] || (o[t] = _e(e, t));
136
+ function K(t, e) {
137
+ const n = ee[t] || (ee[t] = /* @__PURE__ */ Object.create(null));
138
+ return n[e] || (n[e] = un(t, e));
139
139
  }
140
- function ke(e, t) {
141
- return Se(t) ? Ie(t, (o, s) => {
142
- s ? e.icons[o] = s : e.missing.add(o);
140
+ function ke(t, e) {
141
+ return Pe(e) ? Le(e, (n, o) => {
142
+ o ? t.icons[n] = o : t.missing.add(n);
143
143
  }) : [];
144
144
  }
145
- function He(e, t, o) {
145
+ function dn(t, e, n) {
146
146
  try {
147
- if (typeof o.body == "string")
148
- return e.icons[t] = { ...o }, !0;
147
+ if (typeof n.body == "string")
148
+ return t.icons[e] = { ...n }, !0;
149
149
  } catch {
150
150
  }
151
151
  return !1;
152
152
  }
153
- let C = !1;
154
- function Le(e) {
155
- return typeof e == "boolean" && (C = e), C;
153
+ let st = !1;
154
+ function De(t) {
155
+ return typeof t == "boolean" && (st = t), st;
156
156
  }
157
- function qe(e) {
158
- const t = typeof e == "string" ? R(e, !0, C) : e;
159
- if (t) {
160
- const o = k(t.provider, t.prefix), s = t.name;
161
- return o.icons[s] || (o.missing.has(s) ? null : void 0);
157
+ function pn(t) {
158
+ const e = typeof t == "string" ? Ot(t, !0, st) : t;
159
+ if (e) {
160
+ const n = K(e.provider, e.prefix), o = e.name;
161
+ return n.icons[o] || (n.missing.has(o) ? null : void 0);
162
162
  }
163
163
  }
164
- function Qe(e, t) {
165
- const o = R(e, !0, C);
166
- if (!o) return !1;
167
- const s = k(o.provider, o.prefix);
168
- return t ? He(s, o.name, t) : (s.missing.add(o.name), !0);
164
+ function hn(t, e) {
165
+ const n = Ot(t, !0, st);
166
+ if (!n) return !1;
167
+ const o = K(n.provider, n.prefix);
168
+ return e ? dn(o, n.name, e) : (o.missing.add(n.name), !0);
169
169
  }
170
- function Ue(e, t) {
171
- if (typeof e != "object") return !1;
172
- if (typeof t != "string" && (t = e.provider || ""), C && !t && !e.prefix) {
173
- let n = !1;
174
- return Se(e) && (e.prefix = "", Ie(e, (i, r) => {
175
- Qe(i, r) && (n = !0);
176
- })), n;
170
+ function gn(t, e) {
171
+ if (typeof t != "object") return !1;
172
+ if (typeof e != "string" && (e = t.provider || ""), st && !e && !t.prefix) {
173
+ let i = !1;
174
+ return Pe(t) && (t.prefix = "", Le(t, (s, r) => {
175
+ hn(s, r) && (i = !0);
176
+ })), i;
177
177
  }
178
- const o = e.prefix;
179
- if (!A({
180
- prefix: o,
178
+ const n = t.prefix;
179
+ if (!dt({
180
+ prefix: n,
181
181
  name: "a"
182
182
  })) return !1;
183
- const s = k(t, o);
184
- return !!ke(s, e);
183
+ const o = K(e, n);
184
+ return !!ke(o, t);
185
185
  }
186
- const Te = Object.freeze({
186
+ const Fe = Object.freeze({
187
187
  width: null,
188
188
  height: null
189
- }), Pe = Object.freeze({
190
- ...Te,
191
- ...N
192
- }), Ve = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Ge = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
193
- function oe(e, t, o) {
194
- if (t === 1) return e;
195
- if (o = o || 100, typeof e == "number") return Math.ceil(e * t * o) / o;
196
- if (typeof e != "string") return e;
197
- const s = e.split(Ve);
198
- if (s === null || !s.length) return e;
199
- const n = [];
200
- let i = s.shift(), r = Ge.test(i);
189
+ }), Me = Object.freeze({
190
+ ...Fe,
191
+ ...xt
192
+ }), mn = /(-?[0-9.]*[0-9]+[0-9.]*)/g, yn = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
193
+ function ne(t, e, n) {
194
+ if (e === 1) return t;
195
+ if (n = n || 100, typeof t == "number") return Math.ceil(t * e * n) / n;
196
+ if (typeof t != "string") return t;
197
+ const o = t.split(mn);
198
+ if (o === null || !o.length) return t;
199
+ const i = [];
200
+ let s = o.shift(), r = yn.test(s);
201
201
  for (; ; ) {
202
202
  if (r) {
203
- const l = parseFloat(i);
204
- isNaN(l) ? n.push(i) : n.push(Math.ceil(l * t * o) / o);
205
- } else n.push(i);
206
- if (i = s.shift(), i === void 0) return n.join("");
203
+ const c = parseFloat(s);
204
+ isNaN(c) ? i.push(s) : i.push(Math.ceil(c * e * n) / n);
205
+ } else i.push(s);
206
+ if (s = o.shift(), s === void 0) return i.join("");
207
207
  r = !r;
208
208
  }
209
209
  }
210
- function We(e, t = "defs") {
211
- let o = "";
212
- const s = e.indexOf("<" + t);
213
- for (; s >= 0; ) {
214
- const n = e.indexOf(">", s), i = e.indexOf("</" + t);
215
- if (n === -1 || i === -1) break;
216
- const r = e.indexOf(">", i);
210
+ function bn(t, e = "defs") {
211
+ let n = "";
212
+ const o = t.indexOf("<" + e);
213
+ for (; o >= 0; ) {
214
+ const i = t.indexOf(">", o), s = t.indexOf("</" + e);
215
+ if (i === -1 || s === -1) break;
216
+ const r = t.indexOf(">", s);
217
217
  if (r === -1) break;
218
- o += e.slice(n + 1, i).trim(), e = e.slice(0, s).trim() + e.slice(r + 1);
218
+ n += t.slice(i + 1, s).trim(), t = t.slice(0, o).trim() + t.slice(r + 1);
219
219
  }
220
220
  return {
221
- defs: o,
222
- content: e
221
+ defs: n,
222
+ content: t
223
223
  };
224
224
  }
225
- function Ke(e, t) {
226
- return e ? "<defs>" + e + "</defs>" + t : t;
225
+ function wn(t, e) {
226
+ return t ? "<defs>" + t + "</defs>" + e : e;
227
227
  }
228
- function Xe(e, t, o) {
229
- const s = We(e);
230
- return Ke(s.defs, t + s.content + o);
228
+ function xn(t, e, n) {
229
+ const o = bn(t);
230
+ return wn(o.defs, e + o.content + n);
231
231
  }
232
- const Je = (e) => e === "unset" || e === "undefined" || e === "none";
233
- function Ye(e, t) {
234
- const o = {
235
- ...z,
236
- ...e
237
- }, s = {
238
- ...Pe,
232
+ const vn = (t) => t === "unset" || t === "undefined" || t === "none";
233
+ function Sn(t, e) {
234
+ const n = {
235
+ ...At,
239
236
  ...t
240
- }, n = {
241
- left: o.left,
242
- top: o.top,
243
- width: o.width,
244
- height: o.height
237
+ }, o = {
238
+ ...Me,
239
+ ...e
240
+ }, i = {
241
+ left: n.left,
242
+ top: n.top,
243
+ width: n.width,
244
+ height: n.height
245
245
  };
246
- let i = o.body;
247
- [o, s].forEach((g) => {
248
- const d = [], w = g.hFlip, I = g.vFlip;
249
- let x = g.rotate;
250
- w ? I ? x += 2 : (d.push("translate(" + (n.width + n.left).toString() + " " + (0 - n.top).toString() + ")"), d.push("scale(-1 1)"), n.top = n.left = 0) : I && (d.push("translate(" + (0 - n.left).toString() + " " + (n.height + n.top).toString() + ")"), d.push("scale(1 -1)"), n.top = n.left = 0);
251
- let b;
246
+ let s = n.body;
247
+ [n, o].forEach((m) => {
248
+ const g = [], y = m.hFlip, w = m.vFlip;
249
+ let x = m.rotate;
250
+ y ? w ? x += 2 : (g.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), g.push("scale(-1 1)"), i.top = i.left = 0) : w && (g.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), g.push("scale(1 -1)"), i.top = i.left = 0);
251
+ let v;
252
252
  switch (x < 0 && (x -= Math.floor(x / 4) * 4), x = x % 4, x) {
253
253
  case 1:
254
- b = n.height / 2 + n.top, d.unshift("rotate(90 " + b.toString() + " " + b.toString() + ")");
254
+ v = i.height / 2 + i.top, g.unshift("rotate(90 " + v.toString() + " " + v.toString() + ")");
255
255
  break;
256
256
  case 2:
257
- d.unshift("rotate(180 " + (n.width / 2 + n.left).toString() + " " + (n.height / 2 + n.top).toString() + ")");
257
+ g.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
258
258
  break;
259
259
  case 3:
260
- b = n.width / 2 + n.left, d.unshift("rotate(-90 " + b.toString() + " " + b.toString() + ")");
260
+ v = i.width / 2 + i.left, g.unshift("rotate(-90 " + v.toString() + " " + v.toString() + ")");
261
261
  }
262
- x % 2 === 1 && (n.left !== n.top && (b = n.left, n.left = n.top, n.top = b), n.width !== n.height && (b = n.width, n.width = n.height, n.height = b)), d.length && (i = Xe(i, '<g transform="' + d.join(" ") + '">', "</g>"));
262
+ x % 2 === 1 && (i.left !== i.top && (v = i.left, i.left = i.top, i.top = v), i.width !== i.height && (v = i.width, i.width = i.height, i.height = v)), g.length && (s = xn(s, '<g transform="' + g.join(" ") + '">', "</g>"));
263
263
  });
264
- const r = s.width, l = s.height, a = n.width, c = n.height;
265
- let u, f;
266
- r === null ? (f = l === null ? "1em" : l === "auto" ? c : l, u = oe(f, a / c)) : (u = r === "auto" ? a : r, f = l === null ? oe(u, c / a) : l === "auto" ? c : l);
267
- const h = {}, m = (g, d) => {
268
- Je(d) || (h[g] = d.toString());
264
+ const r = o.width, c = o.height, a = i.width, l = i.height;
265
+ let f, u;
266
+ r === null ? (u = c === null ? "1em" : c === "auto" ? l : c, f = ne(u, a / l)) : (f = r === "auto" ? a : r, u = c === null ? ne(f, l / a) : c === "auto" ? l : c);
267
+ const p = {}, d = (m, g) => {
268
+ vn(g) || (p[m] = g.toString());
269
269
  };
270
- m("width", u), m("height", f);
271
- const y = [
272
- n.left,
273
- n.top,
270
+ d("width", f), d("height", u);
271
+ const h = [
272
+ i.left,
273
+ i.top,
274
274
  a,
275
- c
275
+ l
276
276
  ];
277
- return h.viewBox = y.join(" "), {
278
- attributes: h,
279
- viewBox: y,
280
- body: i
277
+ return p.viewBox = h.join(" "), {
278
+ attributes: p,
279
+ viewBox: h,
280
+ body: s
281
281
  };
282
282
  }
283
- const Ze = /\sid="(\S+)"/g, se = /* @__PURE__ */ new Map();
284
- function et(e) {
285
- e = e.replace(/[0-9]+$/, "") || "a";
286
- const t = se.get(e) || 0;
287
- return se.set(e, t + 1), t ? `${e}${t}` : e;
283
+ const Tn = /\sid="(\S+)"/g, oe = /* @__PURE__ */ new Map();
284
+ function On(t) {
285
+ t = t.replace(/[0-9]+$/, "") || "a";
286
+ const e = oe.get(t) || 0;
287
+ return oe.set(t, e + 1), e ? `${t}${e}` : t;
288
288
  }
289
- function tt(e) {
290
- const t = [];
291
- let o;
292
- for (; o = Ze.exec(e); ) t.push(o[1]);
293
- if (!t.length) return e;
294
- const s = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
295
- return t.forEach((n) => {
296
- const i = et(n), r = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
297
- e = e.replace(new RegExp('([#;"])(' + r + ')([")]|\\.[a-z])', "g"), "$1" + i + s + "$3");
298
- }), e = e.replace(new RegExp(s, "g"), ""), e;
299
- }
300
- const U = /* @__PURE__ */ Object.create(null);
301
- function nt(e, t) {
302
- U[e] = t;
303
- }
304
- function V(e) {
305
- return U[e] || U[""];
306
- }
307
- function K(e) {
308
- let t;
309
- if (typeof e.resources == "string") t = [e.resources];
310
- else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
289
+ function An(t) {
290
+ const e = [];
291
+ let n;
292
+ for (; n = Tn.exec(t); ) e.push(n[1]);
293
+ if (!e.length) return t;
294
+ const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
295
+ return e.forEach((i) => {
296
+ const s = On(i), r = i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
297
+ t = t.replace(new RegExp('([#;"])(' + r + ')([")]|\\.[a-z])', "g"), "$1" + s + o + "$3");
298
+ }), t = t.replace(new RegExp(o, "g"), ""), t;
299
+ }
300
+ const jt = /* @__PURE__ */ Object.create(null);
301
+ function In(t, e) {
302
+ jt[t] = e;
303
+ }
304
+ function Bt(t) {
305
+ return jt[t] || jt[""];
306
+ }
307
+ function Ht(t) {
308
+ let e;
309
+ if (typeof t.resources == "string") e = [t.resources];
310
+ else if (e = t.resources, !(e instanceof Array) || !e.length) return null;
311
311
  return {
312
- resources: t,
313
- path: e.path || "/",
314
- maxURL: e.maxURL || 500,
315
- rotate: e.rotate || 750,
316
- timeout: e.timeout || 5e3,
317
- random: e.random === !0,
318
- index: e.index || 0,
319
- dataAfterTimeout: e.dataAfterTimeout !== !1
312
+ resources: e,
313
+ path: t.path || "/",
314
+ maxURL: t.maxURL || 500,
315
+ rotate: t.rotate || 750,
316
+ timeout: t.timeout || 5e3,
317
+ random: t.random === !0,
318
+ index: t.index || 0,
319
+ dataAfterTimeout: t.dataAfterTimeout !== !1
320
320
  };
321
321
  }
322
- const X = /* @__PURE__ */ Object.create(null), T = ["https://api.simplesvg.com", "https://api.unisvg.com"], O = [];
323
- for (; T.length > 0; ) T.length === 1 || Math.random() > 0.5 ? O.push(T.shift()) : O.push(T.pop());
324
- X[""] = K({ resources: ["https://api.iconify.design"].concat(O) });
325
- function ot(e, t) {
326
- const o = K(t);
327
- return o === null ? !1 : (X[e] = o, !0);
322
+ const Ut = /* @__PURE__ */ Object.create(null), nt = ["https://api.simplesvg.com", "https://api.unisvg.com"], pt = [];
323
+ for (; nt.length > 0; ) nt.length === 1 || Math.random() > 0.5 ? pt.push(nt.shift()) : pt.push(nt.pop());
324
+ Ut[""] = Ht({ resources: ["https://api.iconify.design"].concat(pt) });
325
+ function Cn(t, e) {
326
+ const n = Ht(e);
327
+ return n === null ? !1 : (Ut[t] = n, !0);
328
328
  }
329
- function J(e) {
330
- return X[e];
329
+ function qt(t) {
330
+ return Ut[t];
331
331
  }
332
- const st = () => {
333
- let e;
332
+ const Rn = () => {
333
+ let t;
334
334
  try {
335
- if (e = fetch, typeof e == "function") return e;
335
+ if (t = fetch, typeof t == "function") return t;
336
336
  } catch {
337
337
  }
338
338
  };
339
- let ie = st();
340
- function it(e, t) {
341
- const o = J(e);
342
- if (!o) return 0;
343
- let s;
344
- if (!o.maxURL) s = 0;
339
+ let ie = Rn();
340
+ function En(t, e) {
341
+ const n = qt(t);
342
+ if (!n) return 0;
343
+ let o;
344
+ if (!n.maxURL) o = 0;
345
345
  else {
346
- let n = 0;
347
- o.resources.forEach((r) => {
348
- n = Math.max(n, r.length);
346
+ let i = 0;
347
+ n.resources.forEach((r) => {
348
+ i = Math.max(i, r.length);
349
349
  });
350
- const i = t + ".json?icons=";
351
- s = o.maxURL - n - o.path.length - i.length;
350
+ const s = e + ".json?icons=";
351
+ o = n.maxURL - i - n.path.length - s.length;
352
352
  }
353
- return s;
353
+ return o;
354
354
  }
355
- function rt(e) {
356
- return e === 404;
355
+ function Ln(t) {
356
+ return t === 404;
357
357
  }
358
- const ct = (e, t, o) => {
359
- const s = [], n = it(e, t), i = "icons";
358
+ const Pn = (t, e, n) => {
359
+ const o = [], i = En(t, e), s = "icons";
360
360
  let r = {
361
- type: i,
362
- provider: e,
363
- prefix: t,
361
+ type: s,
362
+ provider: t,
363
+ prefix: e,
364
364
  icons: []
365
- }, l = 0;
366
- return o.forEach((a, c) => {
367
- l += a.length + 1, l >= n && c > 0 && (s.push(r), r = {
368
- type: i,
369
- provider: e,
370
- prefix: t,
365
+ }, c = 0;
366
+ return n.forEach((a, l) => {
367
+ c += a.length + 1, c >= i && l > 0 && (o.push(r), r = {
368
+ type: s,
369
+ provider: t,
370
+ prefix: e,
371
371
  icons: []
372
- }, l = a.length), r.icons.push(a);
373
- }), s.push(r), s;
372
+ }, c = a.length), r.icons.push(a);
373
+ }), o.push(r), o;
374
374
  };
375
- function lt(e) {
376
- if (typeof e == "string") {
377
- const t = J(e);
378
- if (t) return t.path;
375
+ function kn(t) {
376
+ if (typeof t == "string") {
377
+ const e = qt(t);
378
+ if (e) return e.path;
379
379
  }
380
380
  return "/";
381
381
  }
382
- const at = (e, t, o) => {
382
+ const Dn = (t, e, n) => {
383
383
  if (!ie) {
384
- o("abort", 424);
384
+ n("abort", 424);
385
385
  return;
386
386
  }
387
- let s = lt(t.provider);
388
- switch (t.type) {
387
+ let o = kn(e.provider);
388
+ switch (e.type) {
389
389
  case "icons": {
390
- const i = t.prefix, r = t.icons.join(","), l = new URLSearchParams({ icons: r });
391
- s += i + ".json?" + l.toString();
390
+ const s = e.prefix, r = e.icons.join(","), c = new URLSearchParams({ icons: r });
391
+ o += s + ".json?" + c.toString();
392
392
  break;
393
393
  }
394
394
  case "custom": {
395
- const i = t.uri;
396
- s += i.slice(0, 1) === "/" ? i.slice(1) : i;
395
+ const s = e.uri;
396
+ o += s.slice(0, 1) === "/" ? s.slice(1) : s;
397
397
  break;
398
398
  }
399
399
  default:
400
- o("abort", 400);
400
+ n("abort", 400);
401
401
  return;
402
402
  }
403
- let n = 503;
404
- ie(e + s).then((i) => {
405
- const r = i.status;
403
+ let i = 503;
404
+ ie(t + o).then((s) => {
405
+ const r = s.status;
406
406
  if (r !== 200) {
407
407
  setTimeout(() => {
408
- o(rt(r) ? "abort" : "next", r);
408
+ n(Ln(r) ? "abort" : "next", r);
409
409
  });
410
410
  return;
411
411
  }
412
- return n = 501, i.json();
413
- }).then((i) => {
414
- if (typeof i != "object" || i === null) {
412
+ return i = 501, s.json();
413
+ }).then((s) => {
414
+ if (typeof s != "object" || s === null) {
415
415
  setTimeout(() => {
416
- i === 404 ? o("abort", i) : o("next", n);
416
+ s === 404 ? n("abort", s) : n("next", i);
417
417
  });
418
418
  return;
419
419
  }
420
420
  setTimeout(() => {
421
- o("success", i);
421
+ n("success", s);
422
422
  });
423
423
  }).catch(() => {
424
- o("next", n);
424
+ n("next", i);
425
425
  });
426
- }, ut = {
427
- prepare: ct,
428
- send: at
426
+ }, Fn = {
427
+ prepare: Pn,
428
+ send: Dn
429
429
  };
430
- function Ce(e, t) {
431
- e.forEach((o) => {
432
- const s = o.loaderCallbacks;
433
- s && (o.loaderCallbacks = s.filter((n) => n.id !== t));
430
+ function Ne(t, e) {
431
+ t.forEach((n) => {
432
+ const o = n.loaderCallbacks;
433
+ o && (n.loaderCallbacks = o.filter((i) => i.id !== e));
434
434
  });
435
435
  }
436
- function ft(e) {
437
- e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
438
- e.pendingCallbacksFlag = !1;
439
- const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
440
- if (!t.length) return;
441
- let o = !1;
442
- const s = e.provider, n = e.prefix;
443
- t.forEach((i) => {
444
- const r = i.icons, l = r.pending.length;
436
+ function Mn(t) {
437
+ t.pendingCallbacksFlag || (t.pendingCallbacksFlag = !0, setTimeout(() => {
438
+ t.pendingCallbacksFlag = !1;
439
+ const e = t.loaderCallbacks ? t.loaderCallbacks.slice(0) : [];
440
+ if (!e.length) return;
441
+ let n = !1;
442
+ const o = t.provider, i = t.prefix;
443
+ e.forEach((s) => {
444
+ const r = s.icons, c = r.pending.length;
445
445
  r.pending = r.pending.filter((a) => {
446
- if (a.prefix !== n) return !0;
447
- const c = a.name;
448
- if (e.icons[c]) r.loaded.push({
449
- provider: s,
450
- prefix: n,
451
- name: c
446
+ if (a.prefix !== i) return !0;
447
+ const l = a.name;
448
+ if (t.icons[l]) r.loaded.push({
449
+ provider: o,
450
+ prefix: i,
451
+ name: l
452
452
  });
453
- else if (e.missing.has(c)) r.missing.push({
454
- provider: s,
455
- prefix: n,
456
- name: c
453
+ else if (t.missing.has(l)) r.missing.push({
454
+ provider: o,
455
+ prefix: i,
456
+ name: l
457
457
  });
458
458
  else
459
- return o = !0, !0;
459
+ return n = !0, !0;
460
460
  return !1;
461
- }), r.pending.length !== l && (o || Ce([e], i.id), i.callback(r.loaded.slice(0), r.missing.slice(0), r.pending.slice(0), i.abort));
461
+ }), r.pending.length !== c && (n || Ne([t], s.id), s.callback(r.loaded.slice(0), r.missing.slice(0), r.pending.slice(0), s.abort));
462
462
  });
463
463
  }));
464
464
  }
465
- let dt = 0;
466
- function ht(e, t, o) {
467
- const s = dt++, n = Ce.bind(null, o, s);
468
- if (!t.pending.length) return n;
469
- const i = {
470
- id: s,
471
- icons: t,
472
- callback: e,
473
- abort: n
465
+ let Nn = 0;
466
+ function $n(t, e, n) {
467
+ const o = Nn++, i = Ne.bind(null, n, o);
468
+ if (!e.pending.length) return i;
469
+ const s = {
470
+ id: o,
471
+ icons: e,
472
+ callback: t,
473
+ abort: i
474
474
  };
475
- return o.forEach((r) => {
476
- (r.loaderCallbacks || (r.loaderCallbacks = [])).push(i);
477
- }), n;
475
+ return n.forEach((r) => {
476
+ (r.loaderCallbacks || (r.loaderCallbacks = [])).push(s);
477
+ }), i;
478
478
  }
479
- function pt(e) {
480
- const t = {
479
+ function _n(t) {
480
+ const e = {
481
481
  loaded: [],
482
482
  missing: [],
483
483
  pending: []
484
- }, o = /* @__PURE__ */ Object.create(null);
485
- e.sort((n, i) => n.provider !== i.provider ? n.provider.localeCompare(i.provider) : n.prefix !== i.prefix ? n.prefix.localeCompare(i.prefix) : n.name.localeCompare(i.name));
486
- let s = {
484
+ }, n = /* @__PURE__ */ Object.create(null);
485
+ t.sort((i, s) => i.provider !== s.provider ? i.provider.localeCompare(s.provider) : i.prefix !== s.prefix ? i.prefix.localeCompare(s.prefix) : i.name.localeCompare(s.name));
486
+ let o = {
487
487
  provider: "",
488
488
  prefix: "",
489
489
  name: ""
490
490
  };
491
- return e.forEach((n) => {
492
- if (s.name === n.name && s.prefix === n.prefix && s.provider === n.provider) return;
493
- s = n;
494
- const i = n.provider, r = n.prefix, l = n.name, a = o[i] || (o[i] = /* @__PURE__ */ Object.create(null)), c = a[r] || (a[r] = k(i, r));
495
- let u;
496
- l in c.icons ? u = t.loaded : r === "" || c.missing.has(l) ? u = t.missing : u = t.pending;
497
- const f = {
498
- provider: i,
491
+ return t.forEach((i) => {
492
+ if (o.name === i.name && o.prefix === i.prefix && o.provider === i.provider) return;
493
+ o = i;
494
+ const s = i.provider, r = i.prefix, c = i.name, a = n[s] || (n[s] = /* @__PURE__ */ Object.create(null)), l = a[r] || (a[r] = K(s, r));
495
+ let f;
496
+ c in l.icons ? f = e.loaded : r === "" || l.missing.has(c) ? f = e.missing : f = e.pending;
497
+ const u = {
498
+ provider: s,
499
499
  prefix: r,
500
- name: l
500
+ name: c
501
501
  };
502
- u.push(f);
503
- }), t;
502
+ f.push(u);
503
+ }), e;
504
504
  }
505
- function gt(e, t = !0, o = !1) {
506
- const s = [];
507
- return e.forEach((n) => {
508
- const i = typeof n == "string" ? R(n, t, o) : n;
509
- i && s.push(i);
510
- }), s;
505
+ function jn(t, e = !0, n = !1) {
506
+ const o = [];
507
+ return t.forEach((i) => {
508
+ const s = typeof i == "string" ? Ot(i, e, n) : i;
509
+ s && o.push(s);
510
+ }), o;
511
511
  }
512
- const mt = {
512
+ const Bn = {
513
513
  resources: [],
514
514
  index: 0,
515
515
  timeout: 2e3,
@@ -517,370 +517,370 @@ const mt = {
517
517
  random: !1,
518
518
  dataAfterTimeout: !1
519
519
  };
520
- function yt(e, t, o, s) {
521
- const n = e.resources.length, i = e.random ? Math.floor(Math.random() * n) : e.index;
520
+ function zn(t, e, n, o) {
521
+ const i = t.resources.length, s = t.random ? Math.floor(Math.random() * i) : t.index;
522
522
  let r;
523
- if (e.random) {
524
- let p = e.resources.slice(0);
525
- for (r = []; p.length > 1; ) {
526
- const v = Math.floor(Math.random() * p.length);
527
- r.push(p[v]), p = p.slice(0, v).concat(p.slice(v + 1));
523
+ if (t.random) {
524
+ let b = t.resources.slice(0);
525
+ for (r = []; b.length > 1; ) {
526
+ const T = Math.floor(Math.random() * b.length);
527
+ r.push(b[T]), b = b.slice(0, T).concat(b.slice(T + 1));
528
528
  }
529
- r = r.concat(p);
530
- } else r = e.resources.slice(i).concat(e.resources.slice(0, i));
531
- const l = Date.now();
532
- let a = "pending", c = 0, u, f = null, h = [], m = [];
533
- typeof s == "function" && m.push(s);
534
- function y() {
535
- f && (clearTimeout(f), f = null);
529
+ r = r.concat(b);
530
+ } else r = t.resources.slice(s).concat(t.resources.slice(0, s));
531
+ const c = Date.now();
532
+ let a = "pending", l = 0, f, u = null, p = [], d = [];
533
+ typeof o == "function" && d.push(o);
534
+ function h() {
535
+ u && (clearTimeout(u), u = null);
536
536
  }
537
- function g() {
538
- a === "pending" && (a = "aborted"), y(), h.forEach((p) => {
539
- p.status === "pending" && (p.status = "aborted");
540
- }), h = [];
537
+ function m() {
538
+ a === "pending" && (a = "aborted"), h(), p.forEach((b) => {
539
+ b.status === "pending" && (b.status = "aborted");
540
+ }), p = [];
541
541
  }
542
- function d(p, v) {
543
- v && (m = []), typeof p == "function" && m.push(p);
542
+ function g(b, T) {
543
+ T && (d = []), typeof b == "function" && d.push(b);
544
544
  }
545
- function w() {
545
+ function y() {
546
546
  return {
547
- startTime: l,
548
- payload: t,
547
+ startTime: c,
548
+ payload: e,
549
549
  status: a,
550
- queriesSent: c,
551
- queriesPending: h.length,
552
- subscribe: d,
553
- abort: g
550
+ queriesSent: l,
551
+ queriesPending: p.length,
552
+ subscribe: g,
553
+ abort: m
554
554
  };
555
555
  }
556
- function I() {
557
- a = "failed", m.forEach((p) => {
558
- p(void 0, u);
556
+ function w() {
557
+ a = "failed", d.forEach((b) => {
558
+ b(void 0, f);
559
559
  });
560
560
  }
561
561
  function x() {
562
- h.forEach((p) => {
563
- p.status === "pending" && (p.status = "aborted");
564
- }), h = [];
562
+ p.forEach((b) => {
563
+ b.status === "pending" && (b.status = "aborted");
564
+ }), p = [];
565
565
  }
566
- function b(p, v, L) {
567
- const j = v !== "success";
568
- switch (h = h.filter((S) => S !== p), a) {
566
+ function v(b, T, I) {
567
+ const A = T !== "success";
568
+ switch (p = p.filter((S) => S !== b), a) {
569
569
  case "pending":
570
570
  break;
571
571
  case "failed":
572
- if (j || !e.dataAfterTimeout) return;
572
+ if (A || !t.dataAfterTimeout) return;
573
573
  break;
574
574
  default:
575
575
  return;
576
576
  }
577
- if (v === "abort") {
578
- u = L, I();
577
+ if (T === "abort") {
578
+ f = I, w();
579
579
  return;
580
580
  }
581
- if (j) {
582
- u = L, h.length || (r.length ? B() : I());
581
+ if (A) {
582
+ f = I, p.length || (r.length ? O() : w());
583
583
  return;
584
584
  }
585
- if (y(), x(), !e.random) {
586
- const S = e.resources.indexOf(p.resource);
587
- S !== -1 && S !== e.index && (e.index = S);
585
+ if (h(), x(), !t.random) {
586
+ const S = t.resources.indexOf(b.resource);
587
+ S !== -1 && S !== t.index && (t.index = S);
588
588
  }
589
- a = "completed", m.forEach((S) => {
590
- S(L);
589
+ a = "completed", d.forEach((S) => {
590
+ S(I);
591
591
  });
592
592
  }
593
- function B() {
593
+ function O() {
594
594
  if (a !== "pending") return;
595
- y();
596
- const p = r.shift();
597
- if (p === void 0) {
598
- if (h.length) {
599
- f = setTimeout(() => {
600
- y(), a === "pending" && (x(), I());
601
- }, e.timeout);
595
+ h();
596
+ const b = r.shift();
597
+ if (b === void 0) {
598
+ if (p.length) {
599
+ u = setTimeout(() => {
600
+ h(), a === "pending" && (x(), w());
601
+ }, t.timeout);
602
602
  return;
603
603
  }
604
- I();
604
+ w();
605
605
  return;
606
606
  }
607
- const v = {
607
+ const T = {
608
608
  status: "pending",
609
- resource: p,
610
- callback: (L, j) => {
611
- b(v, L, j);
609
+ resource: b,
610
+ callback: (I, A) => {
611
+ v(T, I, A);
612
612
  }
613
613
  };
614
- h.push(v), c++, f = setTimeout(B, e.rotate), o(p, t, v.callback);
614
+ p.push(T), l++, u = setTimeout(O, t.rotate), n(b, e, T.callback);
615
615
  }
616
- return setTimeout(B), w;
616
+ return setTimeout(O), y;
617
617
  }
618
- function je(e) {
619
- const t = {
620
- ...mt,
621
- ...e
618
+ function $e(t) {
619
+ const e = {
620
+ ...Bn,
621
+ ...t
622
622
  };
623
- let o = [];
624
- function s() {
625
- o = o.filter((r) => r().status === "pending");
623
+ let n = [];
624
+ function o() {
625
+ n = n.filter((r) => r().status === "pending");
626
626
  }
627
- function n(r, l, a) {
628
- const c = yt(t, r, l, (u, f) => {
629
- s(), a && a(u, f);
627
+ function i(r, c, a) {
628
+ const l = zn(e, r, c, (f, u) => {
629
+ o(), a && a(f, u);
630
630
  });
631
- return o.push(c), c;
631
+ return n.push(l), l;
632
632
  }
633
- function i(r) {
634
- return o.find((l) => r(l)) || null;
633
+ function s(r) {
634
+ return n.find((c) => r(c)) || null;
635
635
  }
636
636
  return {
637
- query: n,
638
- find: i,
637
+ query: i,
638
+ find: s,
639
639
  setIndex: (r) => {
640
- t.index = r;
640
+ e.index = r;
641
641
  },
642
- getIndex: () => t.index,
643
- cleanup: s
642
+ getIndex: () => e.index,
643
+ cleanup: o
644
644
  };
645
645
  }
646
- function re() {
646
+ function se() {
647
647
  }
648
- const _ = /* @__PURE__ */ Object.create(null);
649
- function bt(e) {
650
- if (!_[e]) {
651
- const t = J(e);
652
- if (!t) return;
653
- const o = {
654
- config: t,
655
- redundancy: je(t)
648
+ const kt = /* @__PURE__ */ Object.create(null);
649
+ function Wn(t) {
650
+ if (!kt[t]) {
651
+ const e = qt(t);
652
+ if (!e) return;
653
+ const n = {
654
+ config: e,
655
+ redundancy: $e(e)
656
656
  };
657
- _[e] = o;
658
- }
659
- return _[e];
660
- }
661
- function vt(e, t, o) {
662
- let s, n;
663
- if (typeof e == "string") {
664
- const i = V(e);
665
- if (!i)
666
- return o(void 0, 424), re;
667
- n = i.send;
668
- const r = bt(e);
669
- r && (s = r.redundancy);
657
+ kt[t] = n;
658
+ }
659
+ return kt[t];
660
+ }
661
+ function Vn(t, e, n) {
662
+ let o, i;
663
+ if (typeof t == "string") {
664
+ const s = Bt(t);
665
+ if (!s)
666
+ return n(void 0, 424), se;
667
+ i = s.send;
668
+ const r = Wn(t);
669
+ r && (o = r.redundancy);
670
670
  } else {
671
- const i = K(e);
672
- if (i) {
673
- s = je(i);
674
- const r = e.resources ? e.resources[0] : "", l = V(r);
675
- l && (n = l.send);
671
+ const s = Ht(t);
672
+ if (s) {
673
+ o = $e(s);
674
+ const r = t.resources ? t.resources[0] : "", c = Bt(r);
675
+ c && (i = c.send);
676
676
  }
677
677
  }
678
- return !s || !n ? (o(void 0, 424), re) : s.query(t, n, o)().abort;
678
+ return !o || !i ? (n(void 0, 424), se) : o.query(e, i, n)().abort;
679
679
  }
680
- function ce() {
680
+ function re() {
681
681
  }
682
- function xt(e) {
683
- e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
684
- e.iconsLoaderFlag = !1, ft(e);
682
+ function Hn(t) {
683
+ t.iconsLoaderFlag || (t.iconsLoaderFlag = !0, setTimeout(() => {
684
+ t.iconsLoaderFlag = !1, Mn(t);
685
685
  }));
686
686
  }
687
- function wt(e) {
688
- const t = [], o = [];
689
- return e.forEach((s) => {
690
- (s.match(xe) ? t : o).push(s);
687
+ function Un(t) {
688
+ const e = [], n = [];
689
+ return t.forEach((o) => {
690
+ (o.match(Re) ? e : n).push(o);
691
691
  }), {
692
- valid: t,
693
- invalid: o
692
+ valid: e,
693
+ invalid: n
694
694
  };
695
695
  }
696
- function P(e, t, o) {
697
- function s() {
698
- const n = e.pendingIcons;
699
- t.forEach((i) => {
700
- n && n.delete(i), e.icons[i] || e.missing.add(i);
696
+ function ot(t, e, n) {
697
+ function o() {
698
+ const i = t.pendingIcons;
699
+ e.forEach((s) => {
700
+ i && i.delete(s), t.icons[s] || t.missing.add(s);
701
701
  });
702
702
  }
703
- if (o && typeof o == "object") try {
704
- if (!ke(e, o).length) {
705
- s();
703
+ if (n && typeof n == "object") try {
704
+ if (!ke(t, n).length) {
705
+ o();
706
706
  return;
707
707
  }
708
- } catch (n) {
709
- console.error(n);
708
+ } catch (i) {
709
+ console.error(i);
710
710
  }
711
- s(), xt(e);
711
+ o(), Hn(t);
712
712
  }
713
- function le(e, t) {
714
- e instanceof Promise ? e.then((o) => {
715
- t(o);
713
+ function ce(t, e) {
714
+ t instanceof Promise ? t.then((n) => {
715
+ e(n);
716
716
  }).catch(() => {
717
- t(null);
718
- }) : t(e);
719
- }
720
- function It(e, t) {
721
- e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
722
- e.iconsQueueFlag = !1;
723
- const { provider: o, prefix: s } = e, n = e.iconsToLoad;
724
- if (delete e.iconsToLoad, !n || !n.length) return;
725
- const i = e.loadIcon;
726
- if (e.loadIcons && (n.length > 1 || !i)) {
727
- le(e.loadIcons(n, s, o), (c) => {
728
- P(e, n, c);
717
+ e(null);
718
+ }) : e(t);
719
+ }
720
+ function qn(t, e) {
721
+ t.iconsToLoad ? t.iconsToLoad = t.iconsToLoad.concat(e).sort() : t.iconsToLoad = e, t.iconsQueueFlag || (t.iconsQueueFlag = !0, setTimeout(() => {
722
+ t.iconsQueueFlag = !1;
723
+ const { provider: n, prefix: o } = t, i = t.iconsToLoad;
724
+ if (delete t.iconsToLoad, !i || !i.length) return;
725
+ const s = t.loadIcon;
726
+ if (t.loadIcons && (i.length > 1 || !s)) {
727
+ ce(t.loadIcons(i, o, n), (l) => {
728
+ ot(t, i, l);
729
729
  });
730
730
  return;
731
731
  }
732
- if (i) {
733
- n.forEach((c) => {
734
- le(i(c, s, o), (u) => {
735
- P(e, [c], u ? {
736
- prefix: s,
737
- icons: { [c]: u }
732
+ if (s) {
733
+ i.forEach((l) => {
734
+ ce(s(l, o, n), (f) => {
735
+ ot(t, [l], f ? {
736
+ prefix: o,
737
+ icons: { [l]: f }
738
738
  } : null);
739
739
  });
740
740
  });
741
741
  return;
742
742
  }
743
- const { valid: r, invalid: l } = wt(n);
744
- if (l.length && P(e, l, null), !r.length) return;
745
- const a = s.match(xe) ? V(o) : null;
743
+ const { valid: r, invalid: c } = Un(i);
744
+ if (c.length && ot(t, c, null), !r.length) return;
745
+ const a = o.match(Re) ? Bt(n) : null;
746
746
  if (!a) {
747
- P(e, r, null);
747
+ ot(t, r, null);
748
748
  return;
749
749
  }
750
- a.prepare(o, s, r).forEach((c) => {
751
- vt(o, c, (u) => {
752
- P(e, c.icons, u);
750
+ a.prepare(n, o, r).forEach((l) => {
751
+ Vn(n, l, (f) => {
752
+ ot(t, l.icons, f);
753
753
  });
754
754
  });
755
755
  }));
756
756
  }
757
- const St = (e, t) => {
758
- const o = gt(e, !0, Le()), s = pt(o);
759
- if (!s.pending.length) {
757
+ const Xn = (t, e) => {
758
+ const n = jn(t, !0, De()), o = _n(n);
759
+ if (!o.pending.length) {
760
760
  let a = !0;
761
- return t && setTimeout(() => {
762
- a && t(s.loaded, s.missing, s.pending, ce);
761
+ return e && setTimeout(() => {
762
+ a && e(o.loaded, o.missing, o.pending, re);
763
763
  }), () => {
764
764
  a = !1;
765
765
  };
766
766
  }
767
- const n = /* @__PURE__ */ Object.create(null), i = [];
768
- let r, l;
769
- return s.pending.forEach((a) => {
770
- const { provider: c, prefix: u } = a;
771
- if (u === l && c === r) return;
772
- r = c, l = u, i.push(k(c, u));
773
- const f = n[c] || (n[c] = /* @__PURE__ */ Object.create(null));
774
- f[u] || (f[u] = []);
775
- }), s.pending.forEach((a) => {
776
- const { provider: c, prefix: u, name: f } = a, h = k(c, u), m = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
777
- m.has(f) || (m.add(f), n[c][u].push(f));
778
- }), i.forEach((a) => {
779
- const c = n[a.provider][a.prefix];
780
- c.length && It(a, c);
781
- }), t ? ht(t, s, i) : ce;
767
+ const i = /* @__PURE__ */ Object.create(null), s = [];
768
+ let r, c;
769
+ return o.pending.forEach((a) => {
770
+ const { provider: l, prefix: f } = a;
771
+ if (f === c && l === r) return;
772
+ r = l, c = f, s.push(K(l, f));
773
+ const u = i[l] || (i[l] = /* @__PURE__ */ Object.create(null));
774
+ u[f] || (u[f] = []);
775
+ }), o.pending.forEach((a) => {
776
+ const { provider: l, prefix: f, name: u } = a, p = K(l, f), d = p.pendingIcons || (p.pendingIcons = /* @__PURE__ */ new Set());
777
+ d.has(u) || (d.add(u), i[l][f].push(u));
778
+ }), s.forEach((a) => {
779
+ const l = i[a.provider][a.prefix];
780
+ l.length && qn(a, l);
781
+ }), e ? $n(e, o, s) : re;
782
782
  };
783
- function kt(e, t) {
784
- const o = { ...e };
785
- for (const s in t) {
786
- const n = t[s], i = typeof n;
787
- s in Te ? (n === null || n && (i === "string" || i === "number")) && (o[s] = n) : i === typeof o[s] && (o[s] = s === "rotate" ? n % 4 : n);
783
+ function Gn(t, e) {
784
+ const n = { ...t };
785
+ for (const o in e) {
786
+ const i = e[o], s = typeof i;
787
+ o in Fe ? (i === null || i && (s === "string" || s === "number")) && (n[o] = i) : s === typeof n[o] && (n[o] = o === "rotate" ? i % 4 : i);
788
788
  }
789
- return o;
789
+ return n;
790
790
  }
791
- const Lt = /[\s,]+/;
792
- function Tt(e, t) {
793
- t.split(Lt).forEach((o) => {
794
- switch (o.trim()) {
791
+ const Qn = /[\s,]+/;
792
+ function Kn(t, e) {
793
+ e.split(Qn).forEach((n) => {
794
+ switch (n.trim()) {
795
795
  case "horizontal":
796
- e.hFlip = !0;
796
+ t.hFlip = !0;
797
797
  break;
798
798
  case "vertical":
799
- e.vFlip = !0;
799
+ t.vFlip = !0;
800
800
  }
801
801
  });
802
802
  }
803
- function Pt(e, t = 0) {
804
- const o = e.replace(/^-?[0-9.]*/, "");
805
- function s(n) {
806
- for (; n < 0; ) n += 4;
807
- return n % 4;
808
- }
809
- if (o === "") {
810
- const n = parseInt(e);
811
- return isNaN(n) ? 0 : s(n);
812
- } else if (o !== e) {
813
- let n = 0;
814
- switch (o) {
803
+ function Yn(t, e = 0) {
804
+ const n = t.replace(/^-?[0-9.]*/, "");
805
+ function o(i) {
806
+ for (; i < 0; ) i += 4;
807
+ return i % 4;
808
+ }
809
+ if (n === "") {
810
+ const i = parseInt(t);
811
+ return isNaN(i) ? 0 : o(i);
812
+ } else if (n !== t) {
813
+ let i = 0;
814
+ switch (n) {
815
815
  case "%":
816
- n = 25;
816
+ i = 25;
817
817
  break;
818
818
  case "deg":
819
- n = 90;
819
+ i = 90;
820
820
  }
821
- if (n) {
822
- let i = parseFloat(e.slice(0, e.length - o.length));
823
- return isNaN(i) ? 0 : (i = i / n, i % 1 === 0 ? s(i) : 0);
821
+ if (i) {
822
+ let s = parseFloat(t.slice(0, t.length - n.length));
823
+ return isNaN(s) ? 0 : (s = s / i, s % 1 === 0 ? o(s) : 0);
824
824
  }
825
825
  }
826
- return t;
826
+ return e;
827
827
  }
828
- function Ct(e, t) {
829
- let o = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
830
- for (const s in t) o += " " + s + '="' + t[s] + '"';
831
- return '<svg xmlns="http://www.w3.org/2000/svg"' + o + ">" + e + "</svg>";
828
+ function Zn(t, e) {
829
+ let n = t.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
830
+ for (const o in e) n += " " + o + '="' + e[o] + '"';
831
+ return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + t + "</svg>";
832
832
  }
833
- function jt(e) {
834
- return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ").replace(/:/g, "%3A").replace(/\//g, "%2F");
833
+ function Jn(t) {
834
+ return t.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ").replace(/:/g, "%3A").replace(/\//g, "%2F");
835
835
  }
836
- function Et(e) {
837
- return "data:image/svg+xml," + jt(e);
836
+ function to(t) {
837
+ return "data:image/svg+xml," + Jn(t);
838
838
  }
839
- function Ft(e) {
840
- return 'url("' + Et(e) + '")';
839
+ function eo(t) {
840
+ return 'url("' + to(t) + '")';
841
841
  }
842
- const ae = {
843
- ...Pe,
842
+ const le = {
843
+ ...Me,
844
844
  inline: !1
845
- }, At = {
845
+ }, no = {
846
846
  xmlns: "http://www.w3.org/2000/svg",
847
847
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
848
848
  "aria-hidden": !0,
849
849
  role: "img"
850
- }, Ot = {
850
+ }, oo = {
851
851
  display: "inline-block"
852
- }, G = {
852
+ }, zt = {
853
853
  backgroundColor: "currentColor"
854
- }, Ee = {
854
+ }, _e = {
855
855
  backgroundColor: "transparent"
856
- }, ue = {
856
+ }, ae = {
857
857
  Image: "var(--svg)",
858
858
  Repeat: "no-repeat",
859
859
  Size: "100% 100%"
860
860
  }, fe = {
861
- webkitMask: G,
862
- mask: G,
863
- background: Ee
861
+ webkitMask: zt,
862
+ mask: zt,
863
+ background: _e
864
864
  };
865
- for (const e in fe) {
866
- const t = fe[e];
867
- for (const o in ue)
868
- t[e + o] = ue[o];
869
- }
870
- const D = {};
871
- ["horizontal", "vertical"].forEach((e) => {
872
- const t = e.slice(0, 1) + "Flip";
873
- D[e + "-flip"] = t, D[e.slice(0, 1) + "-flip"] = t, D[e + "Flip"] = t;
865
+ for (const t in fe) {
866
+ const e = fe[t];
867
+ for (const n in ae)
868
+ e[t + n] = ae[n];
869
+ }
870
+ const ht = {};
871
+ ["horizontal", "vertical"].forEach((t) => {
872
+ const e = t.slice(0, 1) + "Flip";
873
+ ht[t + "-flip"] = e, ht[t.slice(0, 1) + "-flip"] = e, ht[t + "Flip"] = e;
874
874
  });
875
- function de(e) {
876
- return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
877
- }
878
- const he = (e, t) => {
879
- const o = kt(ae, t), s = { ...At }, n = t.mode || "svg", i = {}, r = t.style, l = typeof r == "object" && !(r instanceof Array) ? r : {};
880
- for (let g in t) {
881
- const d = t[g];
882
- if (d !== void 0)
883
- switch (g) {
875
+ function ue(t) {
876
+ return t + (t.match(/^[-0-9.]+$/) ? "px" : "");
877
+ }
878
+ const de = (t, e) => {
879
+ const n = Gn(le, e), o = { ...no }, i = e.mode || "svg", s = {}, r = e.style, c = typeof r == "object" && !(r instanceof Array) ? r : {};
880
+ for (let m in e) {
881
+ const g = e[m];
882
+ if (g !== void 0)
883
+ switch (m) {
884
884
  // Properties to ignore
885
885
  case "icon":
886
886
  case "style":
@@ -893,7 +893,7 @@ const he = (e, t) => {
893
893
  case "inline":
894
894
  case "hFlip":
895
895
  case "vFlip":
896
- o[g] = d === !0 || d === "true" || d === 1;
896
+ n[m] = g === !0 || g === "true" || g === 1;
897
897
  break;
898
898
  // Flip as string: 'horizontal,vertical'
899
899
  // Handled after this loop, see below.
@@ -901,136 +901,136 @@ const he = (e, t) => {
901
901
  break;
902
902
  // Color: override style
903
903
  case "color":
904
- i.color = d;
904
+ s.color = g;
905
905
  break;
906
906
  // Rotation as string
907
907
  case "rotate":
908
- typeof d == "string" ? o[g] = Pt(d) : typeof d == "number" && (o[g] = d);
908
+ typeof g == "string" ? n[m] = Yn(g) : typeof g == "number" && (n[m] = g);
909
909
  break;
910
910
  // Remove aria-hidden
911
911
  case "ariaHidden":
912
912
  case "aria-hidden":
913
- d !== !0 && d !== "true" && delete s["aria-hidden"];
913
+ g !== !0 && g !== "true" && delete o["aria-hidden"];
914
914
  break;
915
915
  default: {
916
- const w = D[g];
917
- w ? (d === !0 || d === "true" || d === 1) && (o[w] = !0) : ae[g] === void 0 && (s[g] = d);
916
+ const y = ht[m];
917
+ y ? (g === !0 || g === "true" || g === 1) && (n[y] = !0) : le[m] === void 0 && (o[m] = g);
918
918
  }
919
919
  }
920
920
  }
921
- typeof t.flip == "string" && Tt(o, t.flip);
922
- const a = Ye(e, o), c = a.attributes;
923
- if (o.inline && (i.verticalAlign = "-0.125em"), n === "svg")
924
- return s.style = {
925
- ...i,
926
- ...l
927
- }, Object.assign(s, c), s.innerHTML = tt(a.body), Y("svg", s);
928
- const { body: u, width: f, height: h } = e, m = n === "mask" || (n === "bg" ? !1 : u.indexOf("currentColor") !== -1), y = Ct(u, {
929
- ...c,
930
- width: f + "",
931
- height: h + ""
921
+ typeof e.flip == "string" && Kn(n, e.flip);
922
+ const a = Sn(t, n), l = a.attributes;
923
+ if (n.inline && (s.verticalAlign = "-0.125em"), i === "svg")
924
+ return o.style = {
925
+ ...s,
926
+ ...c
927
+ }, Object.assign(o, l), o.innerHTML = An(a.body), Zt("svg", o);
928
+ const { body: f, width: u, height: p } = t, d = i === "mask" || (i === "bg" ? !1 : f.indexOf("currentColor") !== -1), h = Zn(f, {
929
+ ...l,
930
+ width: u + "",
931
+ height: p + ""
932
932
  });
933
- return s.style = {
934
- ...i,
935
- "--svg": Ft(y),
936
- width: de(c.width),
937
- height: de(c.height),
938
- ...Ot,
939
- ...m ? G : Ee,
940
- ...l
941
- }, Y("span", s);
933
+ return o.style = {
934
+ ...s,
935
+ "--svg": eo(h),
936
+ width: ue(l.width),
937
+ height: ue(l.height),
938
+ ...oo,
939
+ ...d ? zt : _e,
940
+ ...c
941
+ }, Zt("span", o);
942
942
  };
943
- Le(!0);
944
- nt("", ut);
943
+ De(!0);
944
+ In("", Fn);
945
945
  if (typeof document < "u" && typeof window < "u") {
946
- const e = window;
947
- if (e.IconifyPreload !== void 0) {
948
- const t = e.IconifyPreload, o = "Invalid IconifyPreload syntax.";
949
- typeof t == "object" && t !== null && (t instanceof Array ? t : [t]).forEach((s) => {
946
+ const t = window;
947
+ if (t.IconifyPreload !== void 0) {
948
+ const e = t.IconifyPreload, n = "Invalid IconifyPreload syntax.";
949
+ typeof e == "object" && e !== null && (e instanceof Array ? e : [e]).forEach((o) => {
950
950
  try {
951
951
  // Check if item is an object and not null/array
952
- (typeof s != "object" || s === null || s instanceof Array || // Check for 'icons' and 'prefix'
953
- typeof s.icons != "object" || typeof s.prefix != "string" || // Add icon set
954
- !Ue(s)) && console.error(o);
952
+ (typeof o != "object" || o === null || o instanceof Array || // Check for 'icons' and 'prefix'
953
+ typeof o.icons != "object" || typeof o.prefix != "string" || // Add icon set
954
+ !gn(o)) && console.error(n);
955
955
  } catch {
956
- console.error(o);
956
+ console.error(n);
957
957
  }
958
958
  });
959
959
  }
960
- if (e.IconifyProviders !== void 0) {
961
- const t = e.IconifyProviders;
962
- if (typeof t == "object" && t !== null)
963
- for (let o in t) {
964
- const s = "IconifyProviders[" + o + "] is invalid.";
960
+ if (t.IconifyProviders !== void 0) {
961
+ const e = t.IconifyProviders;
962
+ if (typeof e == "object" && e !== null)
963
+ for (let n in e) {
964
+ const o = "IconifyProviders[" + n + "] is invalid.";
965
965
  try {
966
- const n = t[o];
967
- if (typeof n != "object" || !n || n.resources === void 0)
966
+ const i = e[n];
967
+ if (typeof i != "object" || !i || i.resources === void 0)
968
968
  continue;
969
- ot(o, n) || console.error(s);
969
+ Cn(n, i) || console.error(o);
970
970
  } catch {
971
- console.error(s);
971
+ console.error(o);
972
972
  }
973
973
  }
974
974
  }
975
975
  }
976
- const Dt = {
977
- ...z,
976
+ const io = {
977
+ ...At,
978
978
  body: ""
979
- }, Mt = W((e, { emit: t }) => {
980
- const o = E(null);
981
- function s() {
982
- o.value && (o.value.abort?.(), o.value = null);
983
- }
984
- const n = E(!!e.ssr), i = E(""), r = Fe(null);
985
- function l() {
986
- const c = e.icon;
987
- if (typeof c == "object" && c !== null && typeof c.body == "string")
988
- return i.value = "", {
989
- data: c
979
+ }, so = lt((t, { emit: e }) => {
980
+ const n = B(null);
981
+ function o() {
982
+ n.value && (n.value.abort?.(), n.value = null);
983
+ }
984
+ const i = B(!!t.ssr), s = B(""), r = Ze(null);
985
+ function c() {
986
+ const l = t.icon;
987
+ if (typeof l == "object" && l !== null && typeof l.body == "string")
988
+ return s.value = "", {
989
+ data: l
990
990
  };
991
- let u;
992
- if (typeof c != "string" || (u = R(c, !1, !0)) === null)
991
+ let f;
992
+ if (typeof l != "string" || (f = Ot(l, !1, !0)) === null)
993
993
  return null;
994
- let f = qe(u);
995
- if (!f) {
996
- const y = o.value;
997
- return (!y || y.name !== c) && (f === null ? o.value = {
998
- name: c
999
- } : o.value = {
1000
- name: c,
1001
- abort: St([u], a)
994
+ let u = pn(f);
995
+ if (!u) {
996
+ const h = n.value;
997
+ return (!h || h.name !== l) && (u === null ? n.value = {
998
+ name: l
999
+ } : n.value = {
1000
+ name: l,
1001
+ abort: Xn([f], a)
1002
1002
  }), null;
1003
1003
  }
1004
- s(), i.value !== c && (i.value = c, Me(() => {
1005
- t("load", c);
1004
+ o(), s.value !== l && (s.value = l, en(() => {
1005
+ e("load", l);
1006
1006
  }));
1007
- const h = e.customise;
1008
- if (h) {
1009
- f = Object.assign({}, f);
1010
- const y = h(f.body, u.name, u.prefix, u.provider);
1011
- typeof y == "string" && (f.body = y);
1007
+ const p = t.customise;
1008
+ if (p) {
1009
+ u = Object.assign({}, u);
1010
+ const h = p(u.body, f.name, f.prefix, f.provider);
1011
+ typeof h == "string" && (u.body = h);
1012
1012
  }
1013
- const m = ["iconify"];
1014
- return u.prefix !== "" && m.push("iconify--" + u.prefix), u.provider !== "" && m.push("iconify--" + u.provider), { data: f, classes: m };
1013
+ const d = ["iconify"];
1014
+ return f.prefix !== "" && d.push("iconify--" + f.prefix), f.provider !== "" && d.push("iconify--" + f.provider), { data: u, classes: d };
1015
1015
  }
1016
1016
  function a() {
1017
- const c = l();
1018
- c ? c.data !== r.value?.data && (r.value = c) : r.value = null;
1019
- }
1020
- return n.value ? a() : Ae(() => {
1021
- n.value = !0, a();
1022
- }), Oe(() => e.icon, a), De(s), () => {
1023
- const c = r.value;
1024
- if (!c)
1025
- return he(Dt, e);
1026
- let u = e;
1027
- return c.classes && (u = {
1028
- ...e,
1029
- class: c.classes.join(" ")
1030
- }), he({
1031
- ...z,
1032
- ...c.data
1033
- }, u);
1017
+ const l = c();
1018
+ l ? l.data !== r.value?.data && (r.value = l) : r.value = null;
1019
+ }
1020
+ return i.value ? a() : Je(() => {
1021
+ i.value = !0, a();
1022
+ }), ve(() => t.icon, a), tn(o), () => {
1023
+ const l = r.value;
1024
+ if (!l)
1025
+ return de(io, t);
1026
+ let f = t;
1027
+ return l.classes && (f = {
1028
+ ...t,
1029
+ class: l.classes.join(" ")
1030
+ }), de({
1031
+ ...At,
1032
+ ...l.data
1033
+ }, f);
1034
1034
  };
1035
1035
  }, {
1036
1036
  props: {
@@ -1058,23 +1058,1144 @@ const Dt = {
1058
1058
  title: { type: String }
1059
1059
  },
1060
1060
  emits: ["load"]
1061
- }), pe = ["mdi:", "line-md:"];
1062
- function Nt(e) {
1063
- e.filter((t) => !!t).forEach((t) => {
1064
- pe.some((o) => t.startsWith(o)) || console.warn(`[AlpineIcon] "${t}" is not from an allowed collection (${pe.join(", ")}).`);
1061
+ }), je = {
1062
+ default: 1e3,
1063
+ tooltip: 5e3
1064
+ }, Y = Math.min, q = Math.max, vt = Math.round, ut = Math.floor, N = (t) => ({
1065
+ x: t,
1066
+ y: t
1067
+ }), ro = {
1068
+ left: "right",
1069
+ right: "left",
1070
+ bottom: "top",
1071
+ top: "bottom"
1072
+ };
1073
+ function Be(t, e, n) {
1074
+ return q(t, Y(e, n));
1075
+ }
1076
+ function at(t, e) {
1077
+ return typeof t == "function" ? t(e) : t;
1078
+ }
1079
+ function Z(t) {
1080
+ return t.split("-")[0];
1081
+ }
1082
+ function ft(t) {
1083
+ return t.split("-")[1];
1084
+ }
1085
+ function ze(t) {
1086
+ return t === "x" ? "y" : "x";
1087
+ }
1088
+ function Xt(t) {
1089
+ return t === "y" ? "height" : "width";
1090
+ }
1091
+ function j(t) {
1092
+ const e = t[0];
1093
+ return e === "t" || e === "b" ? "y" : "x";
1094
+ }
1095
+ function Gt(t) {
1096
+ return ze(j(t));
1097
+ }
1098
+ function co(t, e, n) {
1099
+ n === void 0 && (n = !1);
1100
+ const o = ft(t), i = Gt(t), s = Xt(i);
1101
+ let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
1102
+ return e.reference[s] > e.floating[s] && (r = St(r)), [r, St(r)];
1103
+ }
1104
+ function lo(t) {
1105
+ const e = St(t);
1106
+ return [Wt(t), e, Wt(e)];
1107
+ }
1108
+ function Wt(t) {
1109
+ return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
1110
+ }
1111
+ const pe = ["left", "right"], he = ["right", "left"], ao = ["top", "bottom"], fo = ["bottom", "top"];
1112
+ function uo(t, e, n) {
1113
+ switch (t) {
1114
+ case "top":
1115
+ case "bottom":
1116
+ return n ? e ? he : pe : e ? pe : he;
1117
+ case "left":
1118
+ case "right":
1119
+ return e ? ao : fo;
1120
+ default:
1121
+ return [];
1122
+ }
1123
+ }
1124
+ function po(t, e, n, o) {
1125
+ const i = ft(t);
1126
+ let s = uo(Z(t), n === "start", o);
1127
+ return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(Wt)))), s;
1128
+ }
1129
+ function St(t) {
1130
+ const e = Z(t);
1131
+ return ro[e] + t.slice(e.length);
1132
+ }
1133
+ function ho(t) {
1134
+ var e, n, o, i;
1135
+ return {
1136
+ top: (e = t.top) != null ? e : 0,
1137
+ right: (n = t.right) != null ? n : 0,
1138
+ bottom: (o = t.bottom) != null ? o : 0,
1139
+ left: (i = t.left) != null ? i : 0
1140
+ };
1141
+ }
1142
+ function We(t) {
1143
+ return typeof t != "number" ? ho(t) : {
1144
+ top: t,
1145
+ right: t,
1146
+ bottom: t,
1147
+ left: t
1148
+ };
1149
+ }
1150
+ function Tt(t) {
1151
+ const {
1152
+ x: e,
1153
+ y: n,
1154
+ width: o,
1155
+ height: i
1156
+ } = t;
1157
+ return {
1158
+ width: o,
1159
+ height: i,
1160
+ top: n,
1161
+ left: e,
1162
+ right: e + o,
1163
+ bottom: n + i,
1164
+ x: e,
1165
+ y: n
1166
+ };
1167
+ }
1168
+ function ge(t, e, n) {
1169
+ let {
1170
+ reference: o,
1171
+ floating: i
1172
+ } = t;
1173
+ const s = j(e), r = Gt(e), c = Xt(r), a = Z(e), l = s === "y", f = o.x + o.width / 2 - i.width / 2, u = o.y + o.height / 2 - i.height / 2, p = o[c] / 2 - i[c] / 2;
1174
+ let d;
1175
+ switch (a) {
1176
+ case "top":
1177
+ d = {
1178
+ x: f,
1179
+ y: o.y - i.height
1180
+ };
1181
+ break;
1182
+ case "bottom":
1183
+ d = {
1184
+ x: f,
1185
+ y: o.y + o.height
1186
+ };
1187
+ break;
1188
+ case "right":
1189
+ d = {
1190
+ x: o.x + o.width,
1191
+ y: u
1192
+ };
1193
+ break;
1194
+ case "left":
1195
+ d = {
1196
+ x: o.x - i.width,
1197
+ y: u
1198
+ };
1199
+ break;
1200
+ default:
1201
+ d = {
1202
+ x: o.x,
1203
+ y: o.y
1204
+ };
1205
+ }
1206
+ const h = ft(e);
1207
+ return h && (d[r] += p * (h === "end" ? 1 : -1) * (n && l ? -1 : 1)), d;
1208
+ }
1209
+ async function go(t, e) {
1210
+ var n;
1211
+ e === void 0 && (e = {});
1212
+ const {
1213
+ x: o,
1214
+ y: i,
1215
+ platform: s,
1216
+ rects: r,
1217
+ elements: c,
1218
+ strategy: a
1219
+ } = t, {
1220
+ boundary: l = "clippingAncestors",
1221
+ rootBoundary: f = "viewport",
1222
+ elementContext: u = "floating",
1223
+ altBoundary: p = !1,
1224
+ padding: d = 0
1225
+ } = at(e, t), h = We(d), g = c[p ? u === "floating" ? "reference" : "floating" : u], y = Tt(await s.getClippingRect({
1226
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(g))) == null || n ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
1227
+ boundary: l,
1228
+ rootBoundary: f,
1229
+ strategy: a
1230
+ })), w = u === "floating" ? {
1231
+ x: o,
1232
+ y: i,
1233
+ width: r.floating.width,
1234
+ height: r.floating.height
1235
+ } : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), v = await (s.isElement == null ? void 0 : s.isElement(x)) && await (s.getScale == null ? void 0 : s.getScale(x)) || {
1236
+ x: 1,
1237
+ y: 1
1238
+ }, O = Tt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
1239
+ elements: c,
1240
+ rect: w,
1241
+ offsetParent: x,
1242
+ strategy: a
1243
+ }) : w);
1244
+ return {
1245
+ top: (y.top - O.top + h.top) / v.y,
1246
+ bottom: (O.bottom - y.bottom + h.bottom) / v.y,
1247
+ left: (y.left - O.left + h.left) / v.x,
1248
+ right: (O.right - y.right + h.right) / v.x
1249
+ };
1250
+ }
1251
+ const mo = 50, yo = async (t, e, n) => {
1252
+ const {
1253
+ placement: o = "bottom",
1254
+ strategy: i = "absolute",
1255
+ middleware: s = [],
1256
+ platform: r
1257
+ } = n, c = r.detectOverflow ? r : {
1258
+ ...r,
1259
+ detectOverflow: go
1260
+ }, a = await (r.isRTL == null ? void 0 : r.isRTL(e));
1261
+ let l = await r.getElementRects({
1262
+ reference: t,
1263
+ floating: e,
1264
+ strategy: i
1265
+ }), {
1266
+ x: f,
1267
+ y: u
1268
+ } = ge(l, o, a), p = o, d = 0;
1269
+ const h = {};
1270
+ for (let m = 0; m < s.length; m++) {
1271
+ const g = s[m];
1272
+ if (!g)
1273
+ continue;
1274
+ const {
1275
+ name: y,
1276
+ fn: w
1277
+ } = g, {
1278
+ x,
1279
+ y: v,
1280
+ data: O,
1281
+ reset: b
1282
+ } = await w({
1283
+ x: f,
1284
+ y: u,
1285
+ initialPlacement: o,
1286
+ placement: p,
1287
+ strategy: i,
1288
+ middlewareData: h,
1289
+ rects: l,
1290
+ platform: c,
1291
+ elements: {
1292
+ reference: t,
1293
+ floating: e
1294
+ }
1295
+ });
1296
+ f = x ?? f, u = v ?? u, h[y] = {
1297
+ ...h[y],
1298
+ ...O
1299
+ }, b && d < mo && (d++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (l = b.rects === !0 ? await r.getElementRects({
1300
+ reference: t,
1301
+ floating: e,
1302
+ strategy: i
1303
+ }) : b.rects), {
1304
+ x: f,
1305
+ y: u
1306
+ } = ge(l, p, a)), m = -1);
1307
+ }
1308
+ return {
1309
+ x: f,
1310
+ y: u,
1311
+ placement: p,
1312
+ strategy: i,
1313
+ middlewareData: h
1314
+ };
1315
+ }, bo = (t) => ({
1316
+ name: "arrow",
1317
+ options: t,
1318
+ async fn(e) {
1319
+ const {
1320
+ x: n,
1321
+ y: o,
1322
+ placement: i,
1323
+ rects: s,
1324
+ platform: r,
1325
+ elements: c,
1326
+ middlewareData: a
1327
+ } = e, {
1328
+ element: l,
1329
+ padding: f = 0
1330
+ } = at(t, e) || {};
1331
+ if (l == null)
1332
+ return {};
1333
+ const u = We(f), p = {
1334
+ x: n,
1335
+ y: o
1336
+ }, d = Gt(i), h = Xt(d), m = await r.getDimensions(l), g = d === "y", y = g ? "top" : "left", w = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", v = s.reference[h] + s.reference[d] - p[d] - s.floating[h], O = p[d] - s.reference[d], b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l));
1337
+ let T = b ? b[x] : 0;
1338
+ (!T || !await (r.isElement == null ? void 0 : r.isElement(b))) && (T = c.floating[x] || s.floating[h]);
1339
+ const I = v / 2 - O / 2, A = T / 2 - m[h] / 2 - 1, S = Y(u[y], A), tt = Y(u[w], A), et = T - m[h] - tt, P = T / 2 - m[h] / 2 + I, E = Be(S, P, et), V = !a.arrow && ft(i) != null && P !== E && s.reference[h] / 2 - (P < S ? S : tt) - m[h] / 2 < 0, M = V ? P < S ? P - S : P - et : 0;
1340
+ return {
1341
+ [d]: p[d] + M,
1342
+ data: {
1343
+ [d]: E,
1344
+ centerOffset: P - E - M,
1345
+ ...V && {
1346
+ alignmentOffset: M
1347
+ }
1348
+ },
1349
+ reset: V
1350
+ };
1351
+ }
1352
+ }), wo = function(t) {
1353
+ return t === void 0 && (t = {}), {
1354
+ name: "flip",
1355
+ options: t,
1356
+ async fn(e) {
1357
+ var n, o;
1358
+ const {
1359
+ placement: i,
1360
+ middlewareData: s,
1361
+ rects: r,
1362
+ initialPlacement: c,
1363
+ platform: a,
1364
+ elements: l
1365
+ } = e, {
1366
+ mainAxis: f = !0,
1367
+ crossAxis: u = !0,
1368
+ fallbackPlacements: p,
1369
+ fallbackStrategy: d = "bestFit",
1370
+ fallbackAxisSideDirection: h = "none",
1371
+ flipAlignment: m = !0,
1372
+ ...g
1373
+ } = at(t, e);
1374
+ if ((n = s.arrow) != null && n.alignmentOffset)
1375
+ return {};
1376
+ const y = Z(i), w = j(c), x = Z(c) === c, v = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), O = p || (x || !m ? [St(c)] : lo(c)), b = h !== "none";
1377
+ !p && b && O.push(...po(c, m, h, v));
1378
+ const T = [c, ...O], I = await a.detectOverflow(e, g), A = [];
1379
+ let S = ((o = s.flip) == null ? void 0 : o.overflows) || [];
1380
+ if (f && A.push(I[y]), u) {
1381
+ const E = co(i, r, v);
1382
+ A.push(I[E[0]], I[E[1]]);
1383
+ }
1384
+ if (S = [...S, {
1385
+ placement: i,
1386
+ overflows: A
1387
+ }], !A.every((E) => E <= 0)) {
1388
+ var tt, et;
1389
+ const E = (((tt = s.flip) == null ? void 0 : tt.index) || 0) + 1, V = T[E];
1390
+ if (V && (!(u === "alignment" ? w !== j(V) : !1) || // We leave the current main axis only if every placement on that axis
1391
+ // overflows the main axis.
1392
+ S.every((L) => j(L.placement) === w ? L.overflows[0] > 0 : !0)))
1393
+ return {
1394
+ data: {
1395
+ index: E,
1396
+ overflows: S
1397
+ },
1398
+ reset: {
1399
+ placement: V
1400
+ }
1401
+ };
1402
+ let M = (et = S.filter((H) => H.overflows[0] <= 0).sort((H, L) => H.overflows[1] - L.overflows[1])[0]) == null ? void 0 : et.placement;
1403
+ if (!M)
1404
+ switch (d) {
1405
+ case "bestFit": {
1406
+ var P;
1407
+ const H = (P = S.filter((L) => {
1408
+ if (b) {
1409
+ const _ = j(L.placement);
1410
+ return _ === w || // Create a bias to the `y` side axis due to horizontal
1411
+ // reading directions favoring greater width.
1412
+ _ === "y";
1413
+ }
1414
+ return !0;
1415
+ }).map((L) => [L.placement, L.overflows.filter((_) => _ > 0).reduce((_, Ye) => _ + Ye, 0)]).sort((L, _) => L[1] - _[1])[0]) == null ? void 0 : P[0];
1416
+ H && (M = H);
1417
+ break;
1418
+ }
1419
+ case "initialPlacement":
1420
+ M = c;
1421
+ break;
1422
+ }
1423
+ if (i !== M)
1424
+ return {
1425
+ reset: {
1426
+ placement: M
1427
+ }
1428
+ };
1429
+ }
1430
+ return {};
1431
+ }
1432
+ };
1433
+ }, xo = /* @__PURE__ */ new Set(["left", "top"]);
1434
+ async function vo(t, e) {
1435
+ const {
1436
+ placement: n,
1437
+ platform: o,
1438
+ elements: i
1439
+ } = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = Z(n), c = ft(n), a = j(n) === "y", l = xo.has(r) ? -1 : 1, f = s && a ? -1 : 1, u = at(e, t);
1440
+ let {
1441
+ mainAxis: p,
1442
+ crossAxis: d,
1443
+ alignmentAxis: h
1444
+ } = typeof u == "number" ? {
1445
+ mainAxis: u,
1446
+ crossAxis: 0,
1447
+ alignmentAxis: null
1448
+ } : {
1449
+ mainAxis: u.mainAxis || 0,
1450
+ crossAxis: u.crossAxis || 0,
1451
+ alignmentAxis: u.alignmentAxis
1452
+ };
1453
+ return c && typeof h == "number" && (d = c === "end" ? h * -1 : h), a ? {
1454
+ x: d * f,
1455
+ y: p * l
1456
+ } : {
1457
+ x: p * l,
1458
+ y: d * f
1459
+ };
1460
+ }
1461
+ const So = function(t) {
1462
+ return t === void 0 && (t = 0), {
1463
+ name: "offset",
1464
+ options: t,
1465
+ async fn(e) {
1466
+ var n, o;
1467
+ const {
1468
+ x: i,
1469
+ y: s,
1470
+ placement: r,
1471
+ middlewareData: c
1472
+ } = e, a = await vo(e, t);
1473
+ return r === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
1474
+ x: i + a.x,
1475
+ y: s + a.y,
1476
+ data: {
1477
+ ...a,
1478
+ placement: r
1479
+ }
1480
+ };
1481
+ }
1482
+ };
1483
+ }, To = function(t) {
1484
+ return t === void 0 && (t = {}), {
1485
+ name: "shift",
1486
+ options: t,
1487
+ async fn(e) {
1488
+ const {
1489
+ x: n,
1490
+ y: o,
1491
+ placement: i,
1492
+ platform: s
1493
+ } = e, {
1494
+ mainAxis: r = !0,
1495
+ crossAxis: c = !1,
1496
+ limiter: a = {
1497
+ fn: (w) => {
1498
+ let {
1499
+ x,
1500
+ y: v
1501
+ } = w;
1502
+ return {
1503
+ x,
1504
+ y: v
1505
+ };
1506
+ }
1507
+ },
1508
+ ...l
1509
+ } = at(t, e), f = {
1510
+ x: n,
1511
+ y: o
1512
+ }, u = await s.detectOverflow(e, l), p = j(i), d = ze(p);
1513
+ let h = f[d], m = f[p];
1514
+ const g = (w, x) => Be(x + u[w === "y" ? "top" : "left"], x, x - u[w === "y" ? "bottom" : "right"]);
1515
+ r && (h = g(d, h)), c && (m = g(p, m));
1516
+ const y = a.fn({
1517
+ ...e,
1518
+ [d]: h,
1519
+ [p]: m
1520
+ });
1521
+ return {
1522
+ ...y,
1523
+ data: {
1524
+ x: y.x - n,
1525
+ y: y.y - o,
1526
+ enabled: {
1527
+ [d]: r,
1528
+ [p]: c
1529
+ }
1530
+ }
1531
+ };
1532
+ }
1533
+ };
1534
+ };
1535
+ function It() {
1536
+ return typeof window < "u";
1537
+ }
1538
+ function J(t) {
1539
+ return Ve(t) ? (t.nodeName || "").toLowerCase() : "#document";
1540
+ }
1541
+ function C(t) {
1542
+ var e;
1543
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
1544
+ }
1545
+ function $(t) {
1546
+ var e;
1547
+ return (e = (Ve(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
1548
+ }
1549
+ function Ve(t) {
1550
+ return It() ? t instanceof Node || t instanceof C(t).Node : !1;
1551
+ }
1552
+ function D(t) {
1553
+ return It() ? t instanceof Element || t instanceof C(t).Element : !1;
1554
+ }
1555
+ function W(t) {
1556
+ return It() ? t instanceof HTMLElement || t instanceof C(t).HTMLElement : !1;
1557
+ }
1558
+ function me(t) {
1559
+ return !It() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof C(t).ShadowRoot;
1560
+ }
1561
+ function Ct(t) {
1562
+ const {
1563
+ overflow: e,
1564
+ overflowX: n,
1565
+ overflowY: o,
1566
+ display: i
1567
+ } = F(t);
1568
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && i !== "inline" && i !== "contents";
1569
+ }
1570
+ function Oo(t) {
1571
+ return /^(table|td|th)$/.test(J(t));
1572
+ }
1573
+ function Rt(t) {
1574
+ try {
1575
+ if (t.matches(":popover-open"))
1576
+ return !0;
1577
+ } catch {
1578
+ }
1579
+ try {
1580
+ return t.matches(":modal");
1581
+ } catch {
1582
+ return !1;
1583
+ }
1584
+ }
1585
+ const Ao = /transform|translate|scale|rotate|perspective|filter/, Io = /paint|layout|strict|content/, U = (t) => !!t && t !== "none";
1586
+ let Dt;
1587
+ function Qt(t) {
1588
+ const e = D(t) ? F(t) : t;
1589
+ return U(e.transform) || U(e.translate) || U(e.scale) || U(e.rotate) || U(e.perspective) || !Kt() && (U(e.backdropFilter) || U(e.filter)) || Ao.test(e.willChange || "") || Io.test(e.contain || "");
1590
+ }
1591
+ function Co(t) {
1592
+ let e = X(t);
1593
+ for (; W(e) && !rt(e); ) {
1594
+ if (Qt(e))
1595
+ return e;
1596
+ if (Rt(e))
1597
+ return null;
1598
+ e = X(e);
1599
+ }
1600
+ return null;
1601
+ }
1602
+ function Kt() {
1603
+ return Dt == null && (Dt = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Dt;
1604
+ }
1605
+ function rt(t) {
1606
+ return /^(html|body|#document)$/.test(J(t));
1607
+ }
1608
+ function F(t) {
1609
+ return C(t).getComputedStyle(t);
1610
+ }
1611
+ function Et(t) {
1612
+ return D(t) ? {
1613
+ scrollLeft: t.scrollLeft,
1614
+ scrollTop: t.scrollTop
1615
+ } : {
1616
+ scrollLeft: t.scrollX,
1617
+ scrollTop: t.scrollY
1618
+ };
1619
+ }
1620
+ function X(t) {
1621
+ if (J(t) === "html")
1622
+ return t;
1623
+ const e = (
1624
+ // Step into the shadow DOM of the parent of a slotted node.
1625
+ t.assignedSlot || // DOM Element detected.
1626
+ t.parentNode || // ShadowRoot detected.
1627
+ me(t) && t.host || // Fallback.
1628
+ $(t)
1629
+ );
1630
+ return me(e) ? e.host : e;
1631
+ }
1632
+ function He(t) {
1633
+ const e = X(t);
1634
+ return rt(e) ? (t.ownerDocument || t).body : W(e) && Ct(e) ? e : He(e);
1635
+ }
1636
+ function ct(t, e, n) {
1637
+ var o;
1638
+ e === void 0 && (e = []), n === void 0 && (n = !0);
1639
+ const i = He(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = C(i);
1640
+ if (s) {
1641
+ const c = Vt(r);
1642
+ return e.concat(r, r.visualViewport || [], Ct(i) ? i : [], c && n ? ct(c) : []);
1643
+ } else
1644
+ return e.concat(i, ct(i, [], n));
1645
+ }
1646
+ function Vt(t) {
1647
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
1648
+ }
1649
+ function Ue(t) {
1650
+ const e = F(t);
1651
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
1652
+ const i = W(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, c = vt(n) !== s || vt(o) !== r;
1653
+ return c && (n = s, o = r), {
1654
+ width: n,
1655
+ height: o,
1656
+ $: c
1657
+ };
1658
+ }
1659
+ function Yt(t) {
1660
+ return D(t) ? t : t.contextElement;
1661
+ }
1662
+ function Q(t) {
1663
+ const e = Yt(t);
1664
+ if (!W(e))
1665
+ return N(1);
1666
+ const n = e.getBoundingClientRect(), {
1667
+ width: o,
1668
+ height: i,
1669
+ $: s
1670
+ } = Ue(e);
1671
+ let r = (s ? vt(n.width) : n.width) / o, c = (s ? vt(n.height) : n.height) / i;
1672
+ return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
1673
+ x: r,
1674
+ y: c
1675
+ };
1676
+ }
1677
+ const Ro = /* @__PURE__ */ N(0);
1678
+ function qe(t) {
1679
+ const e = C(t);
1680
+ return !Kt() || !e.visualViewport ? Ro : {
1681
+ x: e.visualViewport.offsetLeft,
1682
+ y: e.visualViewport.offsetTop
1683
+ };
1684
+ }
1685
+ function Eo(t, e, n) {
1686
+ return e === void 0 && (e = !1), !!n && e && n === C(t);
1687
+ }
1688
+ function G(t, e, n, o) {
1689
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
1690
+ const i = t.getBoundingClientRect(), s = Yt(t);
1691
+ let r = N(1);
1692
+ e && (o ? D(o) && (r = Q(o)) : r = Q(t));
1693
+ const c = Eo(s, n, o) ? qe(s) : N(0);
1694
+ let a = (i.left + c.x) / r.x, l = (i.top + c.y) / r.y, f = i.width / r.x, u = i.height / r.y;
1695
+ if (s && o) {
1696
+ const p = C(s), d = D(o) ? C(o) : o;
1697
+ let h = p, m = Vt(h);
1698
+ for (; m && d !== h; ) {
1699
+ const g = Q(m), y = m.getBoundingClientRect(), w = F(m), x = y.left + (m.clientLeft + parseFloat(w.paddingLeft)) * g.x, v = y.top + (m.clientTop + parseFloat(w.paddingTop)) * g.y;
1700
+ a *= g.x, l *= g.y, f *= g.x, u *= g.y, a += x, l += v, h = C(m), m = Vt(h);
1701
+ }
1702
+ }
1703
+ return Tt({
1704
+ width: f,
1705
+ height: u,
1706
+ x: a,
1707
+ y: l
1065
1708
  });
1066
1709
  }
1067
- const Rt = /* @__PURE__ */ W({
1710
+ function Lt(t, e) {
1711
+ const n = Et(t).scrollLeft;
1712
+ return e ? e.left + n : G($(t)).left + n;
1713
+ }
1714
+ function Xe(t, e) {
1715
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - Lt(t, n), i = n.top + e.scrollTop;
1716
+ return {
1717
+ x: o,
1718
+ y: i
1719
+ };
1720
+ }
1721
+ function Lo(t) {
1722
+ let {
1723
+ elements: e,
1724
+ rect: n,
1725
+ offsetParent: o,
1726
+ strategy: i
1727
+ } = t;
1728
+ const s = i === "fixed", r = $(o), c = e ? Rt(e.floating) : !1;
1729
+ if (o === r || c && s)
1730
+ return n;
1731
+ let a = {
1732
+ scrollLeft: 0,
1733
+ scrollTop: 0
1734
+ }, l = N(1);
1735
+ const f = N(0), u = W(o);
1736
+ if ((u || !s) && ((J(o) !== "body" || Ct(r)) && (a = Et(o)), u)) {
1737
+ const d = G(o);
1738
+ l = Q(o), f.x = d.x + o.clientLeft, f.y = d.y + o.clientTop;
1739
+ }
1740
+ const p = r && !u && !s ? Xe(r, a) : N(0);
1741
+ return {
1742
+ width: n.width * l.x,
1743
+ height: n.height * l.y,
1744
+ x: n.x * l.x - a.scrollLeft * l.x + f.x + p.x,
1745
+ y: n.y * l.y - a.scrollTop * l.y + f.y + p.y
1746
+ };
1747
+ }
1748
+ function Po(t) {
1749
+ return t.getClientRects ? Array.from(t.getClientRects()) : [];
1750
+ }
1751
+ function ko(t) {
1752
+ const e = Et(t), n = t.ownerDocument.body, o = q(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), i = q(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
1753
+ let s = -e.scrollLeft + Lt(t);
1754
+ const r = -e.scrollTop;
1755
+ return F(n).direction === "rtl" && (s += q(t.clientWidth, n.clientWidth) - o), {
1756
+ width: o,
1757
+ height: i,
1758
+ x: s,
1759
+ y: r
1760
+ };
1761
+ }
1762
+ const Do = 25;
1763
+ function Fo(t, e, n) {
1764
+ n === void 0 && (n = "viewport");
1765
+ const o = n === "layoutViewport", i = C(t), s = $(t), r = i.visualViewport;
1766
+ let c = s.clientWidth, a = s.clientHeight, l = 0, f = 0;
1767
+ if (r) {
1768
+ const p = !Kt() || e === "fixed";
1769
+ o ? p || (l = -r.offsetLeft, f = -r.offsetTop) : (c = r.width, a = r.height, p && (l = r.offsetLeft, f = r.offsetTop));
1770
+ }
1771
+ if (Lt(s) <= 0) {
1772
+ const p = s.ownerDocument, d = p.body, h = getComputedStyle(d), m = p.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, g = Math.abs(s.clientWidth - d.clientWidth - m), y = getComputedStyle(s).scrollbarGutter === "stable both-edges" ? g / 2 : g;
1773
+ y <= Do && (c -= y);
1774
+ }
1775
+ return {
1776
+ width: c,
1777
+ height: a,
1778
+ x: l,
1779
+ y: f
1780
+ };
1781
+ }
1782
+ function Mo(t, e) {
1783
+ const n = G(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = Q(t), r = t.clientWidth * s.x, c = t.clientHeight * s.y, a = i * s.x, l = o * s.y;
1784
+ return {
1785
+ width: r,
1786
+ height: c,
1787
+ x: a,
1788
+ y: l
1789
+ };
1790
+ }
1791
+ function ye(t, e, n) {
1792
+ let o;
1793
+ if (e === "viewport" || e === "layoutViewport")
1794
+ o = Fo(t, n, e);
1795
+ else if (e === "document")
1796
+ o = ko($(t));
1797
+ else if (D(e))
1798
+ o = Mo(e, n);
1799
+ else {
1800
+ const i = qe(t);
1801
+ o = {
1802
+ x: e.x - i.x,
1803
+ y: e.y - i.y,
1804
+ width: e.width,
1805
+ height: e.height
1806
+ };
1807
+ }
1808
+ return Tt(o);
1809
+ }
1810
+ function No(t, e) {
1811
+ const n = e.get(t);
1812
+ if (n)
1813
+ return n;
1814
+ let o = ct(t, [], !1).filter((c) => D(c) && J(c) !== "body"), i = null;
1815
+ const s = F(t).position === "fixed";
1816
+ let r = s ? X(t) : t;
1817
+ for (; D(r) && !rt(r); ) {
1818
+ const c = F(r), a = Qt(r), l = i ? i.position : s ? "fixed" : "";
1819
+ !a && (l === "fixed" || l === "absolute" && c.position === "static") ? o = o.filter((u) => u !== r) : i = c, r = X(r);
1820
+ }
1821
+ return e.set(t, o), o;
1822
+ }
1823
+ function $o(t) {
1824
+ let {
1825
+ element: e,
1826
+ boundary: n,
1827
+ rootBoundary: o,
1828
+ strategy: i
1829
+ } = t;
1830
+ const r = [...n === "clippingAncestors" ? Rt(e) ? [] : No(e, this._c) : [].concat(n), o], c = ye(e, r[0], i);
1831
+ let a = c.top, l = c.right, f = c.bottom, u = c.left;
1832
+ for (let p = 1; p < r.length; p++) {
1833
+ const d = ye(e, r[p], i);
1834
+ a = q(d.top, a), l = Y(d.right, l), f = Y(d.bottom, f), u = q(d.left, u);
1835
+ }
1836
+ return {
1837
+ width: l - u,
1838
+ height: f - a,
1839
+ x: u,
1840
+ y: a
1841
+ };
1842
+ }
1843
+ function _o(t) {
1844
+ const {
1845
+ width: e,
1846
+ height: n
1847
+ } = Ue(t);
1848
+ return {
1849
+ width: e,
1850
+ height: n
1851
+ };
1852
+ }
1853
+ function jo(t, e, n) {
1854
+ const o = W(e), i = $(e), s = n === "fixed", r = G(t, !0, s, e);
1855
+ let c = {
1856
+ scrollLeft: 0,
1857
+ scrollTop: 0
1858
+ };
1859
+ const a = N(0);
1860
+ if ((o || !s) && ((J(e) !== "body" || Ct(i)) && (c = Et(e)), o)) {
1861
+ const p = G(e, !0, s, e);
1862
+ a.x = p.x + e.clientLeft, a.y = p.y + e.clientTop;
1863
+ }
1864
+ !o && i && (a.x = Lt(i));
1865
+ const l = i && !o && !s ? Xe(i, c) : N(0), f = r.left + c.scrollLeft - a.x - l.x, u = r.top + c.scrollTop - a.y - l.y;
1866
+ return {
1867
+ x: f,
1868
+ y: u,
1869
+ width: r.width,
1870
+ height: r.height
1871
+ };
1872
+ }
1873
+ function Ft(t) {
1874
+ return F(t).position === "static";
1875
+ }
1876
+ function be(t, e) {
1877
+ if (!W(t) || F(t).position === "fixed")
1878
+ return null;
1879
+ if (e)
1880
+ return e(t);
1881
+ let n = t.offsetParent;
1882
+ return $(t) === n && (n = n.ownerDocument.body), n;
1883
+ }
1884
+ function Ge(t, e) {
1885
+ const n = C(t);
1886
+ if (Rt(t))
1887
+ return n;
1888
+ if (!W(t)) {
1889
+ let i = X(t);
1890
+ for (; i && !rt(i); ) {
1891
+ if (D(i) && !Ft(i))
1892
+ return i;
1893
+ i = X(i);
1894
+ }
1895
+ return n;
1896
+ }
1897
+ let o = be(t, e);
1898
+ for (; o && Oo(o) && Ft(o); )
1899
+ o = be(o, e);
1900
+ return o && rt(o) && Ft(o) && !Qt(o) ? n : o || Co(t) || n;
1901
+ }
1902
+ const Bo = async function(t) {
1903
+ const e = this.getOffsetParent || Ge, n = this.getDimensions, o = await n(t.floating);
1904
+ return {
1905
+ reference: jo(t.reference, await e(t.floating), t.strategy),
1906
+ floating: {
1907
+ x: 0,
1908
+ y: 0,
1909
+ width: o.width,
1910
+ height: o.height
1911
+ }
1912
+ };
1913
+ };
1914
+ function zo(t) {
1915
+ return F(t).direction === "rtl";
1916
+ }
1917
+ const Wo = {
1918
+ convertOffsetParentRelativeRectToViewportRelativeRect: Lo,
1919
+ getDocumentElement: $,
1920
+ getClippingRect: $o,
1921
+ getOffsetParent: Ge,
1922
+ getElementRects: Bo,
1923
+ getClientRects: Po,
1924
+ getDimensions: _o,
1925
+ getScale: Q,
1926
+ isElement: D,
1927
+ isRTL: zo
1928
+ };
1929
+ function Qe(t, e) {
1930
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1931
+ }
1932
+ function Vo(t, e, n) {
1933
+ let o = null, i;
1934
+ const s = $(t);
1935
+ function r() {
1936
+ var f;
1937
+ clearTimeout(i), (f = o) == null || f.disconnect(), o = null;
1938
+ }
1939
+ function c(f, u) {
1940
+ f === void 0 && (f = !1), u === void 0 && (u = 1), r();
1941
+ const p = t.getBoundingClientRect(), {
1942
+ left: d,
1943
+ top: h,
1944
+ width: m,
1945
+ height: g
1946
+ } = p;
1947
+ if (f || e(), !m || !g)
1948
+ return;
1949
+ const y = ut(h), w = ut(s.clientWidth - (d + m)), x = ut(s.clientHeight - (h + g)), v = ut(d), b = {
1950
+ rootMargin: -y + "px " + -w + "px " + -x + "px " + -v + "px",
1951
+ threshold: q(0, Y(1, u)) || 1
1952
+ };
1953
+ let T = !0;
1954
+ function I(A) {
1955
+ const S = A[0].intersectionRatio;
1956
+ if (!Qe(p, t.getBoundingClientRect()))
1957
+ return c();
1958
+ if (S !== u) {
1959
+ if (!T)
1960
+ return c();
1961
+ S ? c(!1, S) : i = setTimeout(() => {
1962
+ c(!1, 1e-7);
1963
+ }, 1e3);
1964
+ }
1965
+ T = !1;
1966
+ }
1967
+ try {
1968
+ o = new IntersectionObserver(I, {
1969
+ ...b,
1970
+ // Handle <iframe>s
1971
+ root: s.ownerDocument
1972
+ });
1973
+ } catch {
1974
+ o = new IntersectionObserver(I, b);
1975
+ }
1976
+ o.observe(t);
1977
+ }
1978
+ const a = C(t), l = () => c(n);
1979
+ return a.addEventListener("resize", l), c(!0), () => {
1980
+ a.removeEventListener("resize", l), r();
1981
+ };
1982
+ }
1983
+ function Ho(t, e, n, o) {
1984
+ o === void 0 && (o = {});
1985
+ const {
1986
+ ancestorScroll: i = !0,
1987
+ ancestorResize: s = !0,
1988
+ elementResize: r = typeof ResizeObserver == "function",
1989
+ layoutShift: c = typeof IntersectionObserver == "function",
1990
+ animationFrame: a = !1
1991
+ } = o, l = Yt(t), f = i || s ? [...l ? ct(l) : [], ...e ? ct(e) : []] : [];
1992
+ f.forEach((y) => {
1993
+ i && y.addEventListener("scroll", n), s && y.addEventListener("resize", n);
1994
+ });
1995
+ const u = l && c ? Vo(l, n, s) : null;
1996
+ let p = -1, d = null;
1997
+ r && (d = new ResizeObserver((y) => {
1998
+ let [w] = y;
1999
+ w && w.target === l && d && e && (d.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
2000
+ var x;
2001
+ (x = d) == null || x.observe(e);
2002
+ })), n();
2003
+ }), l && !a && d.observe(l), e && d.observe(e));
2004
+ let h, m = a ? G(t) : null;
2005
+ a && g();
2006
+ function g() {
2007
+ const y = G(t);
2008
+ m && !Qe(m, y) && n(), m = y, h = requestAnimationFrame(g);
2009
+ }
2010
+ return n(), () => {
2011
+ var y;
2012
+ f.forEach((w) => {
2013
+ i && w.removeEventListener("scroll", n), s && w.removeEventListener("resize", n);
2014
+ }), u?.(), (y = d) == null || y.disconnect(), d = null, a && cancelAnimationFrame(h);
2015
+ };
2016
+ }
2017
+ const Uo = So, qo = To, Xo = wo, Go = bo, Qo = (t, e, n) => {
2018
+ const o = /* @__PURE__ */ new Map(), i = n ?? {}, s = {
2019
+ ...Wo,
2020
+ ...i.platform,
2021
+ _c: o
2022
+ };
2023
+ return yo(t, e, {
2024
+ ...i,
2025
+ platform: s
2026
+ });
2027
+ }, R = {
2028
+ Top: "top",
2029
+ Right: "right",
2030
+ Bottom: "bottom",
2031
+ Left: "left"
2032
+ }, Ko = 8, Yo = 8, Zo = 8, Jo = /* @__PURE__ */ lt({
2033
+ name: "FloatingLayer",
2034
+ __name: "FloatingLayer",
2035
+ props: {
2036
+ referenceElement: {},
2037
+ isOpen: { type: Boolean },
2038
+ placement: { default: R.Top },
2039
+ zIndex: { default: je.default }
2040
+ },
2041
+ setup(t) {
2042
+ const e = t, n = {
2043
+ [R.Top]: R.Bottom,
2044
+ [R.Right]: R.Left,
2045
+ [R.Bottom]: R.Top,
2046
+ [R.Left]: R.Right
2047
+ }, o = Nt("floatingElement"), i = Nt("arrowElement"), s = B({ top: "0px", left: "0px" }), r = B({}), c = B(e.placement);
2048
+ let a = null;
2049
+ async function l() {
2050
+ if (!e.referenceElement || !o.value)
2051
+ return;
2052
+ const u = [Uo(Ko), Xo({ fallbackAxisSideDirection: "start" }), qo({ padding: Yo })];
2053
+ i.value && u.push(Go({ element: i.value, padding: Zo }));
2054
+ const { x: p, y: d, placement: h, middlewareData: m } = await Qo(e.referenceElement, o.value, {
2055
+ placement: e.placement,
2056
+ strategy: "fixed",
2057
+ middleware: u
2058
+ });
2059
+ s.value = { top: `${d}px`, left: `${p}px` };
2060
+ const g = h;
2061
+ if (c.value = g, m.arrow && i.value) {
2062
+ const y = n[g], w = y === R.Top || y === R.Bottom ? i.value.offsetHeight : i.value.offsetWidth;
2063
+ r.value = {
2064
+ left: m.arrow.x != null ? `${m.arrow.x}px` : "",
2065
+ top: m.arrow.y != null ? `${m.arrow.y}px` : "",
2066
+ // Pulls the arrow half its own thickness past the static side so it sits flush against the floating content's edge.
2067
+ [y]: `${-w / 2}px`
2068
+ };
2069
+ }
2070
+ }
2071
+ function f() {
2072
+ a?.(), a = null;
2073
+ }
2074
+ return ve(
2075
+ () => [e.referenceElement, e.isOpen, o.value],
2076
+ ([u, p, d]) => {
2077
+ f(), u && p && d && (a = Ho(u, d, l));
2078
+ },
2079
+ { immediate: !0 }
2080
+ ), Se(f), (u, p) => (z(), gt(nn, { to: "body" }, [
2081
+ e.isOpen ? (z(), mt("div", {
2082
+ key: 0,
2083
+ ref_key: "floatingElement",
2084
+ ref: o,
2085
+ class: "fixed",
2086
+ style: Jt({ zIndex: e.zIndex, ...s.value })
2087
+ }, [
2088
+ $t(u.$slots, "default", { placement: c.value }),
2089
+ u.$slots.arrow ? (z(), mt("div", {
2090
+ key: 0,
2091
+ ref_key: "arrowElement",
2092
+ ref: i,
2093
+ class: "absolute",
2094
+ style: Jt(r.value)
2095
+ }, [
2096
+ $t(u.$slots, "arrow")
2097
+ ], 4)) : yt("", !0)
2098
+ ], 4)) : yt("", !0)
2099
+ ]));
2100
+ }
2101
+ }), ti = ["aria-describedby"], ei = ["id"], ni = { class: "whitespace-pre-wrap text-sm text-white" }, Ke = /* @__PURE__ */ lt({
2102
+ name: "AlpineTooltip",
2103
+ __name: "Tooltip",
2104
+ props: {
2105
+ label: {},
2106
+ placement: { default: R.Top },
2107
+ openDelay: { default: 0 },
2108
+ isDisabled: { type: Boolean, default: !1 }
2109
+ },
2110
+ setup(t) {
2111
+ const e = t, n = on(), o = Nt("triggerWrapper");
2112
+ function i(d) {
2113
+ let h = d;
2114
+ for (; h && getComputedStyle(h).display === "contents"; )
2115
+ h = h.firstElementChild;
2116
+ return h;
2117
+ }
2118
+ const s = bt(() => {
2119
+ const d = i(o.value?.firstElementChild ?? null);
2120
+ return d ? {
2121
+ getBoundingClientRect: () => d.getBoundingClientRect(),
2122
+ contextElement: d
2123
+ } : null;
2124
+ }), r = B(!1);
2125
+ let c = null;
2126
+ function a() {
2127
+ c !== null && (clearTimeout(c), c = null);
2128
+ }
2129
+ function l() {
2130
+ e.isDisabled || e.label && (a(), c = setTimeout(() => {
2131
+ r.value = !0;
2132
+ }, e.openDelay));
2133
+ }
2134
+ function f() {
2135
+ a(), r.value = !1;
2136
+ }
2137
+ function u(d) {
2138
+ o.value?.contains(d.relatedTarget) || l();
2139
+ }
2140
+ function p(d) {
2141
+ o.value?.contains(d.relatedTarget) || f();
2142
+ }
2143
+ return Se(a), (d, h) => (z(), mt(sn, null, [
2144
+ it("div", {
2145
+ ref_key: "triggerWrapper",
2146
+ ref: o,
2147
+ class: "contents",
2148
+ "aria-describedby": r.value ? k(n) : void 0,
2149
+ onMouseover: u,
2150
+ onMouseout: p,
2151
+ onFocusin: l,
2152
+ onFocusout: f,
2153
+ onKeydown: rn(f, ["esc"])
2154
+ }, [
2155
+ $t(d.$slots, "default")
2156
+ ], 40, ti),
2157
+ Te(k(Jo), {
2158
+ "reference-element": s.value,
2159
+ "is-open": r.value,
2160
+ placement: e.placement,
2161
+ "z-index": k(je).tooltip
2162
+ }, {
2163
+ arrow: wt(() => [...h[0] || (h[0] = [
2164
+ it("div", { class: "size-2 rotate-45 bg-gray-900" }, null, -1)
2165
+ ])]),
2166
+ default: wt(() => [
2167
+ it("div", {
2168
+ id: k(n),
2169
+ role: "tooltip",
2170
+ class: "max-w-xs rounded-lg bg-gray-900 px-3 py-2 shadow-lg"
2171
+ }, [
2172
+ it("span", ni, Oe(e.label), 1)
2173
+ ], 8, ei)
2174
+ ]),
2175
+ _: 1
2176
+ }, 8, ["reference-element", "is-open", "placement", "z-index"])
2177
+ ], 64));
2178
+ }
2179
+ }), we = ["mdi:", "line-md:"];
2180
+ function oi(t) {
2181
+ t.filter((e) => !!e).forEach((e) => {
2182
+ we.some((n) => e.startsWith(n)) || console.warn(`[AlpineIcon] "${e}" is not from an allowed collection (${we.join(", ")}).`);
2183
+ });
2184
+ }
2185
+ const ii = /* @__PURE__ */ lt({
1068
2186
  name: "AlpineIcon",
2187
+ inheritAttrs: !1,
1069
2188
  __name: "Icon",
1070
2189
  props: {
1071
2190
  icon: {},
1072
2191
  hoverIcon: {},
1073
2192
  size: { default: "md" },
1074
- isLoading: { type: Boolean, default: !1 }
2193
+ isLoading: { type: Boolean, default: !1 },
2194
+ tooltip: {},
2195
+ tooltipPosition: { default: "top" }
1075
2196
  },
1076
- setup(e) {
1077
- const t = e, o = be({
2197
+ setup(t) {
2198
+ const e = t, n = Ie({
1078
2199
  variants: {
1079
2200
  size: {
1080
2201
  xs: "size-3",
@@ -1086,16 +2207,24 @@ const Rt = /* @__PURE__ */ W({
1086
2207
  }
1087
2208
  }
1088
2209
  });
1089
- Nt([t.icon, t.hoverIcon]);
1090
- const s = E(!1), n = q(() => t.isLoading ? ve.loader : t.hoverIcon && s.value ? t.hoverIcon : t.icon);
1091
- return (i, r) => (F(), me(M(Mt), {
1092
- icon: n.value,
1093
- class: ye(M(o)({ size: e.size })),
1094
- onMouseover: r[0] || (r[0] = (l) => s.value = !0),
1095
- onMouseleave: r[1] || (r[1] = (l) => s.value = !1)
1096
- }, null, 8, ["icon", "class"]));
1097
- }
1098
- }), zt = be({
2210
+ oi([e.icon, e.hoverIcon]);
2211
+ const o = B(!1), i = bt(() => e.isLoading ? Ce.loader : e.hoverIcon && o.value ? e.hoverIcon : e.icon);
2212
+ return (s, r) => (z(), gt(k(Ke), {
2213
+ label: t.tooltip,
2214
+ placement: t.tooltipPosition
2215
+ }, {
2216
+ default: wt(() => [
2217
+ Te(k(so), Ae(s.$attrs, {
2218
+ icon: i.value,
2219
+ class: k(n)({ size: t.size }),
2220
+ onMouseover: r[0] || (r[0] = (c) => o.value = !0),
2221
+ onMouseleave: r[1] || (r[1] = (c) => o.value = !1)
2222
+ }), null, 16, ["icon", "class"])
2223
+ ]),
2224
+ _: 1
2225
+ }, 8, ["label", "placement"]));
2226
+ }
2227
+ }), si = Ie({
1099
2228
  base: "rounded-lg flex items-center justify-center gap-2 font-medium transition-all max-w-full border",
1100
2229
  variants: {
1101
2230
  iconPosition: {
@@ -1208,65 +2337,77 @@ const Rt = /* @__PURE__ */ W({
1208
2337
  class: "cursor-pointer"
1209
2338
  }
1210
2339
  ]
1211
- }), Bt = ["primary", "secondary", "invisible"], $t = ["left", "right"], _t = ["button", "submit", "reset"], Ht = ["type", "aria-label", "disabled"], qt = {
2340
+ }), ri = ["type", "aria-label", "disabled"], ci = {
1212
2341
  key: 1,
1213
2342
  class: "min-w-0 truncate"
1214
- }, Jt = /* @__PURE__ */ W({
2343
+ }, gi = /* @__PURE__ */ lt({
1215
2344
  name: "AlpineButton",
2345
+ inheritAttrs: !1,
1216
2346
  __name: "Button",
1217
2347
  props: {
1218
2348
  label: {},
1219
2349
  icon: { default: null },
1220
- design: { default: Bt[0] },
2350
+ design: { default: "primary" },
1221
2351
  isLoading: { type: Boolean, default: !1 },
1222
2352
  isDisabled: { type: Boolean, default: !1 },
1223
2353
  isDanger: { type: Boolean, default: !1 },
1224
- iconPosition: { default: $t[0] },
1225
- type: { default: _t[0] }
2354
+ iconPosition: { default: "left" },
2355
+ type: { default: "button" },
2356
+ disabledTooltip: { default: void 0 },
2357
+ tooltipPosition: { default: "top" }
1226
2358
  },
1227
- setup(e) {
1228
- const t = e, o = q(() => t.isLoading ? ve.loader : t.icon), s = q(() => !t.icon && !t.label ? "-" : t.label);
1229
- return (n, i) => (F(), Z("button", {
1230
- type: t.type,
1231
- "aria-label": t.label ?? t.icon ?? "Button without label or icon",
1232
- class: ye(M(zt)({
1233
- design: t.design,
1234
- iconPosition: t.iconPosition,
1235
- isLoading: t.isLoading,
1236
- isDisabled: t.isDisabled,
1237
- isDanger: t.isDanger,
1238
- hasLabel: !!s.value
1239
- })),
1240
- disabled: t.isDisabled || t.isLoading
1241
- }, [
1242
- o.value ? (F(), me(M(Rt), {
1243
- key: 0,
1244
- "aria-hidden": !0,
1245
- icon: o.value,
1246
- class: "shrink-0"
1247
- }, null, 8, ["icon"])) : ee("", !0),
1248
- s.value ? (F(), Z("span", qt, Ne(s.value), 1)) : ee("", !0)
1249
- ], 10, Ht));
2359
+ setup(t) {
2360
+ const e = t, n = bt(() => e.isLoading ? Ce.loader : e.icon), o = bt(() => !e.icon && !e.label ? "-" : e.label);
2361
+ return (i, s) => (z(), gt(k(Ke), {
2362
+ label: t.disabledTooltip,
2363
+ "is-disabled": !e.isDisabled,
2364
+ placement: t.tooltipPosition
2365
+ }, {
2366
+ default: wt(() => [
2367
+ it("button", Ae(i.$attrs, {
2368
+ type: e.type,
2369
+ "aria-label": e.label ?? e.icon ?? "Button without label or icon",
2370
+ class: k(si)({
2371
+ design: e.design,
2372
+ iconPosition: e.iconPosition,
2373
+ isLoading: e.isLoading,
2374
+ isDisabled: e.isDisabled,
2375
+ isDanger: e.isDanger,
2376
+ hasLabel: !!o.value
2377
+ }),
2378
+ disabled: e.isDisabled || e.isLoading
2379
+ }), [
2380
+ n.value ? (z(), gt(k(ii), {
2381
+ key: 0,
2382
+ "aria-hidden": !0,
2383
+ icon: n.value,
2384
+ class: "shrink-0"
2385
+ }, null, 8, ["icon"])) : yt("", !0),
2386
+ o.value ? (z(), mt("span", ci, Oe(o.value), 1)) : yt("", !0)
2387
+ ], 16, ri)
2388
+ ]),
2389
+ _: 1
2390
+ }, 8, ["label", "is-disabled", "placement"]));
1250
2391
  }
1251
2392
  });
1252
- function Qt(e) {
1253
- const t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
1254
- return t ? {
1255
- r: Number.parseInt(t[1], 16),
1256
- g: Number.parseInt(t[2], 16),
1257
- b: Number.parseInt(t[3], 16)
2393
+ function li(t) {
2394
+ const e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
2395
+ return e ? {
2396
+ r: Number.parseInt(e[1], 16),
2397
+ g: Number.parseInt(e[2], 16),
2398
+ b: Number.parseInt(e[3], 16)
1258
2399
  } : { r: 0, g: 0, b: 0 };
1259
2400
  }
1260
- function H(e) {
1261
- const t = e / 255;
1262
- return t <= 0.04045 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
2401
+ function Mt(t) {
2402
+ const e = t / 255;
2403
+ return e <= 0.04045 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
1263
2404
  }
1264
- function Ut(e) {
1265
- const { r: t, g: o, b: s } = Qt(e), n = H(t), i = H(o), r = H(s), l = 0.4122214708 * n + 0.5363325363 * i + 0.0514459929 * r, a = 0.2119034982 * n + 0.6806995451 * i + 0.1073969566 * r, c = 0.0883024619 * n + 0.2817188376 * i + 0.6299787005 * r, u = Math.cbrt(l), f = Math.cbrt(a), h = Math.cbrt(c), m = 0.2104542553 * u + 0.793617785 * f - 0.0040720468 * h, y = 1.9779984951 * u - 2.428592205 * f + 0.4505937099 * h, g = 0.0259040371 * u + 0.7827717662 * f - 0.808675766 * h, d = Math.sqrt(y * y + g * g);
1266
- let w = Math.atan2(g, y) * 180 / Math.PI;
1267
- return w < 0 && (w += 360), { lightness: m, chroma: d, hue: w };
2405
+ function ai(t) {
2406
+ const { r: e, g: n, b: o } = li(t), i = Mt(e), s = Mt(n), r = Mt(o), c = 0.4122214708 * i + 0.5363325363 * s + 0.0514459929 * r, a = 0.2119034982 * i + 0.6806995451 * s + 0.1073969566 * r, l = 0.0883024619 * i + 0.2817188376 * s + 0.6299787005 * r, f = Math.cbrt(c), u = Math.cbrt(a), p = Math.cbrt(l), d = 0.2104542553 * f + 0.793617785 * u - 0.0040720468 * p, h = 1.9779984951 * f - 2.428592205 * u + 0.4505937099 * p, m = 0.0259040371 * f + 0.7827717662 * u - 0.808675766 * p, g = Math.sqrt(h * h + m * m);
2407
+ let y = Math.atan2(m, h) * 180 / Math.PI;
2408
+ return y < 0 && (y += 360), { lightness: d, chroma: g, hue: y };
1268
2409
  }
1269
- const ge = {
2410
+ const xe = {
1270
2411
  50: 1.4208,
1271
2412
  100: 1.3779,
1272
2413
  200: 1.314,
@@ -1277,7 +2418,7 @@ const ge = {
1277
2418
  700: 0.754,
1278
2419
  800: 0.6501,
1279
2420
  900: 0.5749
1280
- }, Vt = {
2421
+ }, fi = {
1281
2422
  50: 0.0549,
1282
2423
  100: 0.135,
1283
2424
  200: 0.262,
@@ -1289,27 +2430,28 @@ const ge = {
1289
2430
  800: 0.747,
1290
2431
  900: 0.595
1291
2432
  };
1292
- function Gt(e) {
1293
- const { lightness: t, chroma: o, hue: s } = Ut(e), n = {};
1294
- for (const i of Object.keys(ge)) {
1295
- const r = Math.min(1, Math.max(0, t * ge[i])), l = Math.max(0, o * Vt[i]);
1296
- n[`--color-accent-${i}`] = `oklch(${(r * 100).toFixed(1)}% ${l.toFixed(3)} ${s.toFixed(1)})`;
2433
+ function ui(t) {
2434
+ const { lightness: e, chroma: n, hue: o } = ai(t), i = {};
2435
+ for (const s of Object.keys(xe)) {
2436
+ const r = Math.min(1, Math.max(0, e * xe[s])), c = Math.max(0, n * fi[s]);
2437
+ i[`--color-accent-${s}`] = `oklch(${(r * 100).toFixed(1)}% ${c.toFixed(3)} ${o.toFixed(1)})`;
1297
2438
  }
1298
- return n;
2439
+ return i;
1299
2440
  }
1300
- function Yt(e) {
1301
- const t = Gt(e), o = document.documentElement;
1302
- for (const [s, n] of Object.entries(t))
1303
- o.style.setProperty(s, n);
2441
+ function mi(t) {
2442
+ const e = ui(t), n = document.documentElement;
2443
+ for (const [o, i] of Object.entries(e))
2444
+ n.style.setProperty(o, i);
1304
2445
  }
1305
- function Zt(e) {
1306
- document.documentElement.style.setProperty("--button-text-color", e);
2446
+ function yi(t) {
2447
+ document.documentElement.style.setProperty("--button-text-color", t);
1307
2448
  }
1308
2449
  export {
1309
- Jt as AlpineButton,
1310
- Rt as AlpineIcon,
1311
- Gt as generateAccentScale,
1312
- Xt as iconSizes,
1313
- Yt as setAccentColorTheme,
1314
- Zt as setButtonTextColor
2450
+ gi as AlpineButton,
2451
+ ii as AlpineIcon,
2452
+ Ke as AlpineTooltip,
2453
+ ui as generateAccentScale,
2454
+ hi as iconSizes,
2455
+ mi as setAccentColorTheme,
2456
+ yi as setButtonTextColor
1315
2457
  };