@ddict/popup 1.0.8 → 1.0.9

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/popup.es.js CHANGED
@@ -1,103 +1,151 @@
1
- import { computed as _, unref as R, shallowRef as an, watch as j, triggerRef as rt, onScopeDispose as Ye, ref as S, onUnmounted as St, inject as Ce, watchEffect as le, onMounted as de, cloneVNode as Ot, h as Oe, Fragment as X, defineComponent as se, provide as Qe, reactive as Et, nextTick as Q, toRaw as K, openBlock as P, createElementBlock as V, createElementVNode as I, mergeModels as un, useModel as cn, createBlock as xe, withCtx as Pe, createVNode as H, renderList as ge, normalizeClass as it, toDisplayString as ne, effectScope as It, markRaw as ae, hasInjectionContext as dn, getCurrentInstance as $t, isRef as be, isReactive as Ze, toRef as Be, getCurrentScope as Ct, toRefs as at, createCommentVNode as ue, withModifiers as fn, withDirectives as Xe, vModelCheckbox as vn, createTextVNode as pn, vModelText as Tt } from "vue";
2
- function _e(e, o, t) {
3
- let n = t.initialDeps ?? [], l;
1
+ import { openBlock as S, createElementBlock as $, createElementVNode as g, computed as w, unref as P, shallowRef as cn, watch as j, triggerRef as it, onScopeDispose as Ze, ref as E, onUnmounted as St, inject as Te, watchEffect as ie, onMounted as pe, cloneVNode as Et, h as Oe, Fragment as G, defineComponent as ae, provide as et, reactive as Ot, nextTick as te, toRaw as Y, mergeModels as dn, useModel as fn, createBlock as Z, withCtx as ke, createVNode as z, renderList as le, normalizeClass as ye, toDisplayString as ee, effectScope as $t, markRaw as de, hasInjectionContext as pn, getCurrentInstance as It, isRef as xe, isReactive as tt, toRef as We, getCurrentScope as Ct, toRefs as at, createCommentVNode as X, withModifiers as vn, createTextVNode as hn, withDirectives as Tt, vModelText as Pt, pushScopeId as mn, popScopeId as gn } from "vue";
2
+ const bn = "/assets/icons/logo.svg", _n = "/assets/icons/book-one.svg", yn = "/assets/icons/arrow-full-screen.svg", xn = "/assets/icons/setting.svg", wn = { class: "flex justify-between" }, Sn = /* @__PURE__ */ g("div", { class: "flex flex-row" }, [
3
+ /* @__PURE__ */ g("img", {
4
+ src: bn,
5
+ alt: "Vue logo",
6
+ class: "w-24"
7
+ })
8
+ ], -1), En = { class: "flex" }, On = /* @__PURE__ */ g("img", {
9
+ src: _n,
10
+ alt: "Reader",
11
+ class: "w-7"
12
+ }, null, -1), $n = [
13
+ On
14
+ ], In = /* @__PURE__ */ g("img", {
15
+ src: yn,
16
+ alt: "Full screen",
17
+ class: "w-7"
18
+ }, null, -1), Cn = [
19
+ In
20
+ ], Tn = /* @__PURE__ */ g("img", {
21
+ src: xn,
22
+ alt: "Setting",
23
+ class: "w-7"
24
+ }, null, -1), Pn = [
25
+ Tn
26
+ ], kn = {
27
+ __name: "Header",
28
+ emits: ["settings", "fullScreen", "reader"],
29
+ setup(e, { emit: o }) {
30
+ const t = o;
31
+ return (n, s) => (S(), $("div", wn, [
32
+ Sn,
33
+ g("div", En, [
34
+ g("button", {
35
+ class: "btn btn-ghost btn-circle",
36
+ onClick: s[0] || (s[0] = (r) => t("reader"))
37
+ }, $n),
38
+ g("button", {
39
+ class: "btn btn-ghost btn-circle",
40
+ onClick: s[1] || (s[1] = (r) => t("fullScreen"))
41
+ }, Cn),
42
+ g("button", {
43
+ class: "btn btn-ghost btn-circle",
44
+ onClick: s[2] || (s[2] = (r) => t("settings"))
45
+ }, Pn)
46
+ ])
47
+ ]));
48
+ }
49
+ };
50
+ function we(e, o, t) {
51
+ let n = t.initialDeps ?? [], s;
4
52
  return () => {
5
- var r, i, s, a;
53
+ var r, i, l, a;
6
54
  let u;
7
55
  t.key && ((r = t.debug) != null && r.call(t)) && (u = Date.now());
8
- const v = e();
9
- if (!(v.length !== n.length || v.some((m, w) => n[w] !== m)))
10
- return l;
11
- n = v;
12
- let b;
13
- if (t.key && ((i = t.debug) != null && i.call(t)) && (b = Date.now()), l = o(...v), t.key && ((s = t.debug) != null && s.call(t))) {
14
- const m = Math.round((Date.now() - u) * 100) / 100, w = Math.round((Date.now() - b) * 100) / 100, $ = w / 16, M = (E, O) => {
15
- for (E = String(E); E.length < O; )
16
- E = " " + E;
17
- return E;
56
+ const p = e();
57
+ if (!(p.length !== n.length || p.some((m, v) => n[v] !== m)))
58
+ return s;
59
+ n = p;
60
+ let h;
61
+ if (t.key && ((i = t.debug) != null && i.call(t)) && (h = Date.now()), s = o(...p), t.key && ((l = t.debug) != null && l.call(t))) {
62
+ const m = Math.round((Date.now() - u) * 100) / 100, v = Math.round((Date.now() - h) * 100) / 100, I = v / 16, V = (T, C) => {
63
+ for (T = String(T); T.length < C; )
64
+ T = " " + T;
65
+ return T;
18
66
  };
19
67
  console.info(
20
- `%c⏱ ${M(w, 5)} /${M(m, 5)} ms`,
68
+ `%c⏱ ${V(v, 5)} /${V(m, 5)} ms`,
21
69
  `
22
70
  font-size: .6rem;
23
71
  font-weight: bold;
24
72
  color: hsl(${Math.max(
25
73
  0,
26
- Math.min(120 - 120 * $, 120)
74
+ Math.min(120 - 120 * I, 120)
27
75
  )}deg 100% 31%);`,
28
76
  t == null ? void 0 : t.key
29
77
  );
30
78
  }
31
- return (a = t == null ? void 0 : t.onChange) == null || a.call(t, l), l;
79
+ return (a = t == null ? void 0 : t.onChange) == null || a.call(t, s), s;
32
80
  };
33
81
  }
34
- function Ue(e, o) {
82
+ function Ge(e, o) {
35
83
  if (e === void 0)
36
84
  throw new Error("Unexpected undefined");
37
85
  return e;
38
86
  }
39
- const hn = (e, o) => Math.abs(e - o) < 1, mn = (e, o, t) => {
87
+ const Rn = (e, o) => Math.abs(e - o) < 1, Nn = (e, o, t) => {
40
88
  let n;
41
- return function(...l) {
42
- e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, l), t);
89
+ return function(...s) {
90
+ e.clearTimeout(n), n = e.setTimeout(() => o.apply(this, s), t);
43
91
  };
44
- }, gn = (e) => e, bn = (e) => {
92
+ }, Dn = (e) => e, Ln = (e) => {
45
93
  const o = Math.max(e.startIndex - e.overscan, 0), t = Math.min(e.endIndex + e.overscan, e.count - 1), n = [];
46
- for (let l = o; l <= t; l++)
47
- n.push(l);
94
+ for (let s = o; s <= t; s++)
95
+ n.push(s);
48
96
  return n;
49
- }, yn = (e, o) => {
97
+ }, Vn = (e, o) => {
50
98
  const t = e.scrollElement;
51
99
  if (!t)
52
100
  return;
53
101
  const n = e.targetWindow;
54
102
  if (!n)
55
103
  return;
56
- const l = (i) => {
57
- const { width: s, height: a } = i;
58
- o({ width: Math.round(s), height: Math.round(a) });
104
+ const s = (i) => {
105
+ const { width: l, height: a } = i;
106
+ o({ width: Math.round(l), height: Math.round(a) });
59
107
  };
60
- if (l(t.getBoundingClientRect()), !n.ResizeObserver)
108
+ if (s(t.getBoundingClientRect()), !n.ResizeObserver)
61
109
  return () => {
62
110
  };
63
111
  const r = new n.ResizeObserver((i) => {
64
- const s = i[0];
65
- if (s != null && s.borderBoxSize) {
66
- const a = s.borderBoxSize[0];
112
+ const l = i[0];
113
+ if (l != null && l.borderBoxSize) {
114
+ const a = l.borderBoxSize[0];
67
115
  if (a) {
68
- l({ width: a.inlineSize, height: a.blockSize });
116
+ s({ width: a.inlineSize, height: a.blockSize });
69
117
  return;
70
118
  }
71
119
  }
72
- l(t.getBoundingClientRect());
120
+ s(t.getBoundingClientRect());
73
121
  });
74
122
  return r.observe(t, { box: "border-box" }), () => {
75
123
  r.unobserve(t);
76
124
  };
77
125
  }, ut = {
78
126
  passive: !0
79
- }, _n = typeof window > "u" ? !0 : "onscrollend" in window, wn = (e, o) => {
127
+ }, An = typeof window > "u" ? !0 : "onscrollend" in window, Mn = (e, o) => {
80
128
  const t = e.scrollElement;
81
129
  if (!t)
82
130
  return;
83
131
  const n = e.targetWindow;
84
132
  if (!n)
85
133
  return;
86
- let l = 0;
87
- const r = _n ? () => {
88
- } : mn(
134
+ let s = 0;
135
+ const r = An ? () => {
136
+ } : Nn(
89
137
  n,
90
138
  () => {
91
- o(l, !1);
139
+ o(s, !1);
92
140
  },
93
141
  e.options.isScrollingResetDelay
94
142
  ), i = (u) => () => {
95
- l = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), o(l, u);
96
- }, s = i(!0), a = i(!1);
97
- return a(), t.addEventListener("scroll", s, ut), t.addEventListener("scrollend", a, ut), () => {
98
- t.removeEventListener("scroll", s), t.removeEventListener("scrollend", a);
143
+ s = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), o(s, u);
144
+ }, l = i(!0), a = i(!1);
145
+ return a(), t.addEventListener("scroll", l, ut), t.addEventListener("scrollend", a, ut), () => {
146
+ t.removeEventListener("scroll", l), t.removeEventListener("scrollend", a);
99
147
  };
100
- }, xn = (e, o, t) => {
148
+ }, jn = (e, o, t) => {
101
149
  if (o != null && o.borderBoxSize) {
102
150
  const n = o.borderBoxSize[0];
103
151
  if (n)
@@ -108,43 +156,43 @@ const hn = (e, o) => Math.abs(e - o) < 1, mn = (e, o, t) => {
108
156
  return Math.round(
109
157
  e.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
110
158
  );
111
- }, Sn = (e, {
159
+ }, Fn = (e, {
112
160
  adjustments: o = 0,
113
161
  behavior: t
114
162
  }, n) => {
115
- var l, r;
163
+ var s, r;
116
164
  const i = e + o;
117
- (r = (l = n.scrollElement) == null ? void 0 : l.scrollTo) == null || r.call(l, {
165
+ (r = (s = n.scrollElement) == null ? void 0 : s.scrollTo) == null || r.call(s, {
118
166
  [n.options.horizontal ? "left" : "top"]: i,
119
167
  behavior: t
120
168
  });
121
169
  };
122
- class On {
170
+ class Bn {
123
171
  constructor(o) {
124
172
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
125
173
  let t = null;
126
- const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((l) => {
127
- l.forEach((r) => {
174
+ const n = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((s) => {
175
+ s.forEach((r) => {
128
176
  this._measureElement(r.target, r);
129
177
  });
130
178
  }));
131
179
  return {
132
180
  disconnect: () => {
133
- var l;
134
- return (l = n()) == null ? void 0 : l.disconnect();
181
+ var s;
182
+ return (s = n()) == null ? void 0 : s.disconnect();
135
183
  },
136
- observe: (l) => {
184
+ observe: (s) => {
137
185
  var r;
138
- return (r = n()) == null ? void 0 : r.observe(l, { box: "border-box" });
186
+ return (r = n()) == null ? void 0 : r.observe(s, { box: "border-box" });
139
187
  },
140
- unobserve: (l) => {
188
+ unobserve: (s) => {
141
189
  var r;
142
- return (r = n()) == null ? void 0 : r.unobserve(l);
190
+ return (r = n()) == null ? void 0 : r.unobserve(s);
143
191
  }
144
192
  };
145
193
  })(), this.range = null, this.setOptions = (t) => {
146
- Object.entries(t).forEach(([n, l]) => {
147
- typeof l > "u" && delete t[n];
194
+ Object.entries(t).forEach(([n, s]) => {
195
+ typeof s > "u" && delete t[n];
148
196
  }), this.options = {
149
197
  debug: !1,
150
198
  initialOffset: 0,
@@ -154,11 +202,11 @@ class On {
154
202
  scrollPaddingStart: 0,
155
203
  scrollPaddingEnd: 0,
156
204
  horizontal: !1,
157
- getItemKey: gn,
158
- rangeExtractor: bn,
205
+ getItemKey: Dn,
206
+ rangeExtractor: Ln,
159
207
  onChange: () => {
160
208
  },
161
- measureElement: xn,
209
+ measureElement: jn,
162
210
  initialRect: { width: 0, height: 0 },
163
211
  scrollMargin: 0,
164
212
  gap: 0,
@@ -170,12 +218,12 @@ class On {
170
218
  ...t
171
219
  };
172
220
  }, this.notify = (t, n) => {
173
- var l, r;
174
- const { startIndex: i, endIndex: s } = this.range ?? {
221
+ var s, r;
222
+ const { startIndex: i, endIndex: l } = this.range ?? {
175
223
  startIndex: void 0,
176
224
  endIndex: void 0
177
225
  }, a = this.calculateRange();
178
- (t || i !== (a == null ? void 0 : a.startIndex) || s !== (a == null ? void 0 : a.endIndex)) && ((r = (l = this.options).onChange) == null || r.call(l, this, n));
226
+ (t || i !== (a == null ? void 0 : a.startIndex) || l !== (a == null ? void 0 : a.endIndex)) && ((r = (s = this.options).onChange) == null || r.call(s, this, n));
179
227
  }, this.cleanup = () => {
180
228
  this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.observer.disconnect(), this.elementsCache.clear();
181
229
  }, this._didMount = () => () => {
@@ -192,31 +240,31 @@ class On {
192
240
  adjustments: void 0,
193
241
  behavior: void 0
194
242
  }), this.unsubs.push(
195
- this.options.observeElementRect(this, (l) => {
196
- this.scrollRect = l, this.notify(!1, !1);
243
+ this.options.observeElementRect(this, (s) => {
244
+ this.scrollRect = s, this.notify(!1, !1);
197
245
  })
198
246
  ), this.unsubs.push(
199
- this.options.observeElementOffset(this, (l, r) => {
200
- this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < l ? "forward" : "backward" : null, this.scrollOffset = l;
247
+ this.options.observeElementOffset(this, (s, r) => {
248
+ this.scrollAdjustments = 0, this.scrollDirection = r ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s;
201
249
  const i = this.isScrolling;
202
250
  this.isScrolling = r, this.notify(i !== r, r);
203
251
  })
204
252
  );
205
253
  }
206
254
  }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, n) => {
207
- const l = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
255
+ const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
208
256
  for (let i = n - 1; i >= 0; i--) {
209
- const s = t[i];
210
- if (l.has(s.lane))
257
+ const l = t[i];
258
+ if (s.has(l.lane))
211
259
  continue;
212
260
  const a = r.get(
213
- s.lane
261
+ l.lane
214
262
  );
215
- if (a == null || s.end > a.end ? r.set(s.lane, s) : s.end < a.end && l.set(s.lane, !0), l.size === this.options.lanes)
263
+ if (a == null || l.end > a.end ? r.set(l.lane, l) : l.end < a.end && s.set(l.lane, !0), s.size === this.options.lanes)
216
264
  break;
217
265
  }
218
- return r.size === this.options.lanes ? Array.from(r.values()).sort((i, s) => i.end === s.end ? i.index - s.index : i.end - s.end)[0] : void 0;
219
- }, this.getMeasurementOptions = _e(
266
+ return r.size === this.options.lanes ? Array.from(r.values()).sort((i, l) => i.end === l.end ? i.index - l.index : i.end - l.end)[0] : void 0;
267
+ }, this.getMeasurementOptions = we(
220
268
  () => [
221
269
  this.options.count,
222
270
  this.options.paddingStart,
@@ -224,19 +272,19 @@ class On {
224
272
  this.options.getItemKey,
225
273
  this.options.enabled
226
274
  ],
227
- (t, n, l, r, i) => (this.pendingMeasuredCacheIndexes = [], {
275
+ (t, n, s, r, i) => (this.pendingMeasuredCacheIndexes = [], {
228
276
  count: t,
229
277
  paddingStart: n,
230
- scrollMargin: l,
278
+ scrollMargin: s,
231
279
  getItemKey: r,
232
280
  enabled: i
233
281
  }),
234
282
  {
235
283
  key: !1
236
284
  }
237
- ), this.getMeasurements = _e(
285
+ ), this.getMeasurements = we(
238
286
  () => [this.getMeasurementOptions(), this.itemSizeCache],
239
- ({ count: t, paddingStart: n, scrollMargin: l, getItemKey: r, enabled: i }, s) => {
287
+ ({ count: t, paddingStart: n, scrollMargin: s, getItemKey: r, enabled: i }, l) => {
240
288
  var a;
241
289
  if (!i)
242
290
  return this.measurementsCache = [], this.itemSizeCache.clear(), [];
@@ -245,59 +293,59 @@ class On {
245
293
  }));
246
294
  const u = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
247
295
  this.pendingMeasuredCacheIndexes = [];
248
- const v = this.measurementsCache.slice(0, u);
296
+ const p = this.measurementsCache.slice(0, u);
249
297
  for (let c = u; c < t; c++) {
250
- let b = (a = this.measurementsCache[c]) == null ? void 0 : a.measureElement;
251
- b || (b = (A) => {
252
- const g = r(c), T = this.elementsCache.get(g);
253
- if (!A) {
254
- T && (this.observer.unobserve(T), this.elementsCache.delete(g));
298
+ let h = (a = this.measurementsCache[c]) == null ? void 0 : a.measureElement;
299
+ h || (h = (M) => {
300
+ const y = r(c), R = this.elementsCache.get(y);
301
+ if (!M) {
302
+ R && (this.observer.unobserve(R), this.elementsCache.delete(y));
255
303
  return;
256
304
  }
257
- T !== A && (T && this.observer.unobserve(T), this.observer.observe(A), this.elementsCache.set(g, A)), A.isConnected && this.resizeItem(
305
+ R !== M && (R && this.observer.unobserve(R), this.observer.observe(M), this.elementsCache.set(y, M)), M.isConnected && this.resizeItem(
258
306
  c,
259
- this.options.measureElement(A, void 0, this)
307
+ this.options.measureElement(M, void 0, this)
260
308
  );
261
309
  });
262
- const m = r(c), w = this.options.lanes === 1 ? v[c - 1] : this.getFurthestMeasurement(v, c), $ = w ? w.end + this.options.gap : n + l, M = s.get(m), E = typeof M == "number" ? M : this.options.estimateSize(c), O = $ + E, D = w ? w.lane : c % this.options.lanes;
263
- v[c] = {
310
+ const m = r(c), v = this.options.lanes === 1 ? p[c - 1] : this.getFurthestMeasurement(p, c), I = v ? v.end + this.options.gap : n + s, V = l.get(m), T = typeof V == "number" ? V : this.options.estimateSize(c), C = I + T, L = v ? v.lane : c % this.options.lanes;
311
+ p[c] = {
264
312
  index: c,
265
- start: $,
266
- size: E,
267
- end: O,
313
+ start: I,
314
+ size: T,
315
+ end: C,
268
316
  key: m,
269
- lane: D,
270
- measureElement: b
317
+ lane: L,
318
+ measureElement: h
271
319
  };
272
320
  }
273
- return this.measurementsCache = v, v;
321
+ return this.measurementsCache = p, p;
274
322
  },
275
323
  {
276
324
  key: process.env.NODE_ENV !== "production" && "getMeasurements",
277
325
  debug: () => this.options.debug
278
326
  }
279
- ), this.calculateRange = _e(
327
+ ), this.calculateRange = we(
280
328
  () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
281
- (t, n, l) => this.range = t.length > 0 && n > 0 ? En({
329
+ (t, n, s) => this.range = t.length > 0 && n > 0 ? zn({
282
330
  measurements: t,
283
331
  outerSize: n,
284
- scrollOffset: l
332
+ scrollOffset: s
285
333
  }) : null,
286
334
  {
287
335
  key: process.env.NODE_ENV !== "production" && "calculateRange",
288
336
  debug: () => this.options.debug
289
337
  }
290
- ), this.getIndexes = _e(
338
+ ), this.getIndexes = we(
291
339
  () => [
292
340
  this.options.rangeExtractor,
293
341
  this.calculateRange(),
294
342
  this.options.overscan,
295
343
  this.options.count
296
344
  ],
297
- (t, n, l, r) => n === null ? [] : t({
345
+ (t, n, s, r) => n === null ? [] : t({
298
346
  startIndex: n.startIndex,
299
347
  endIndex: n.endIndex,
300
- overscan: l,
348
+ overscan: s,
301
349
  count: r
302
350
  }),
303
351
  {
@@ -305,40 +353,40 @@ class On {
305
353
  debug: () => this.options.debug
306
354
  }
307
355
  ), this.indexFromElement = (t) => {
308
- const n = this.options.indexAttribute, l = t.getAttribute(n);
309
- return l ? parseInt(l, 10) : (console.warn(
356
+ const n = this.options.indexAttribute, s = t.getAttribute(n);
357
+ return s ? parseInt(s, 10) : (console.warn(
310
358
  `Missing attribute name '${n}={index}' on measured element.`
311
359
  ), -1);
312
360
  }, this._measureElement = (t, n) => {
313
- const l = this.indexFromElement(t), r = this.getMeasurements()[l];
361
+ const s = this.indexFromElement(t), r = this.getMeasurements()[s];
314
362
  if (!r || !t.isConnected) {
315
- this.elementsCache.forEach((s, a) => {
316
- s === t && (this.observer.unobserve(t), this.elementsCache.delete(a));
363
+ this.elementsCache.forEach((l, a) => {
364
+ l === t && (this.observer.unobserve(t), this.elementsCache.delete(a));
317
365
  });
318
366
  return;
319
367
  }
320
368
  const i = this.elementsCache.get(r.key);
321
- i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(l, this.options.measureElement(t, n, this));
369
+ i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(r.key, t)), this.resizeItem(s, this.options.measureElement(t, n, this));
322
370
  }, this.resizeItem = (t, n) => {
323
- const l = this.getMeasurements()[t];
324
- if (!l)
371
+ const s = this.getMeasurements()[t];
372
+ if (!s)
325
373
  return;
326
- const r = this.itemSizeCache.get(l.key) ?? l.size, i = n - r;
327
- i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(l, i, this) : l.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", i), this._scrollToOffset(this.getScrollOffset(), {
374
+ const r = this.itemSizeCache.get(s.key) ?? s.size, i = n - r;
375
+ i !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(s, i, this) : s.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", i), this._scrollToOffset(this.getScrollOffset(), {
328
376
  adjustments: this.scrollAdjustments += i,
329
377
  behavior: void 0
330
- })), this.pendingMeasuredCacheIndexes.push(l.index), this.itemSizeCache = new Map(this.itemSizeCache.set(l.key, n)), this.notify(!0, !1));
378
+ })), this.pendingMeasuredCacheIndexes.push(s.index), this.itemSizeCache = new Map(this.itemSizeCache.set(s.key, n)), this.notify(!0, !1));
331
379
  }, this.measureElement = (t) => {
332
380
  t && this._measureElement(t, void 0);
333
- }, this.getVirtualItems = _e(
381
+ }, this.getVirtualItems = we(
334
382
  () => [this.getIndexes(), this.getMeasurements()],
335
383
  (t, n) => {
336
- const l = [];
384
+ const s = [];
337
385
  for (let r = 0, i = t.length; r < i; r++) {
338
- const s = t[r], a = n[s];
339
- l.push(a);
386
+ const l = t[r], a = n[l];
387
+ s.push(a);
340
388
  }
341
- return l;
389
+ return s;
342
390
  },
343
391
  {
344
392
  key: process.env.NODE_ENV !== "production" && "getIndexes",
@@ -347,60 +395,60 @@ class On {
347
395
  ), this.getVirtualItemForOffset = (t) => {
348
396
  const n = this.getMeasurements();
349
397
  if (n.length !== 0)
350
- return Ue(
351
- n[Pt(
398
+ return Ge(
399
+ n[kt(
352
400
  0,
353
401
  n.length - 1,
354
- (l) => Ue(n[l]).start,
402
+ (s) => Ge(n[s]).start,
355
403
  t
356
404
  )]
357
405
  );
358
406
  }, this.getOffsetForAlignment = (t, n) => {
359
- const l = this.getSize(), r = this.getScrollOffset();
360
- n === "auto" && (t <= r ? n = "start" : t >= r + l ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - l : n === "center" && (t = t - l / 2);
361
- const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - l;
407
+ const s = this.getSize(), r = this.getScrollOffset();
408
+ n === "auto" && (t <= r ? n = "start" : t >= r + s ? n = "end" : n = "start"), n === "start" ? t = t : n === "end" ? t = t - s : n === "center" && (t = t - s / 2);
409
+ const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", a = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - s;
362
410
  return Math.max(Math.min(a, t), 0);
363
411
  }, this.getOffsetForIndex = (t, n = "auto") => {
364
412
  t = Math.max(0, Math.min(t, this.options.count - 1));
365
- const l = this.getMeasurements()[t];
366
- if (!l)
413
+ const s = this.getMeasurements()[t];
414
+ if (!s)
367
415
  return;
368
416
  const r = this.getSize(), i = this.getScrollOffset();
369
417
  if (n === "auto")
370
- if (l.end >= i + r - this.options.scrollPaddingEnd)
418
+ if (s.end >= i + r - this.options.scrollPaddingEnd)
371
419
  n = "end";
372
- else if (l.start <= i + this.options.scrollPaddingStart)
420
+ else if (s.start <= i + this.options.scrollPaddingStart)
373
421
  n = "start";
374
422
  else
375
423
  return [i, n];
376
- const s = n === "end" ? l.end + this.options.scrollPaddingEnd : l.start - this.options.scrollPaddingStart;
377
- return [this.getOffsetForAlignment(s, n), n];
424
+ const l = n === "end" ? s.end + this.options.scrollPaddingEnd : s.start - this.options.scrollPaddingStart;
425
+ return [this.getOffsetForAlignment(l, n), n];
378
426
  }, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
379
427
  this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
380
- }, this.scrollToOffset = (t, { align: n = "start", behavior: l } = {}) => {
381
- this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
428
+ }, this.scrollToOffset = (t, { align: n = "start", behavior: s } = {}) => {
429
+ this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
382
430
  "The `smooth` scroll behavior is not fully supported with dynamic size."
383
431
  ), this._scrollToOffset(this.getOffsetForAlignment(t, n), {
384
432
  adjustments: void 0,
385
- behavior: l
433
+ behavior: s
386
434
  });
387
- }, this.scrollToIndex = (t, { align: n = "auto", behavior: l } = {}) => {
388
- t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), l === "smooth" && this.isDynamicMode() && console.warn(
435
+ }, this.scrollToIndex = (t, { align: n = "auto", behavior: s } = {}) => {
436
+ t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), s === "smooth" && this.isDynamicMode() && console.warn(
389
437
  "The `smooth` scroll behavior is not fully supported with dynamic size."
390
438
  );
391
439
  const r = this.getOffsetForIndex(t, n);
392
440
  if (!r) return;
393
- const [i, s] = r;
394
- this._scrollToOffset(i, { adjustments: void 0, behavior: l }), l !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
441
+ const [i, l] = r;
442
+ this._scrollToOffset(i, { adjustments: void 0, behavior: s }), s !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
395
443
  if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
396
444
  this.options.getItemKey(t)
397
445
  )) {
398
- const [u] = Ue(
399
- this.getOffsetForIndex(t, s)
446
+ const [u] = Ge(
447
+ this.getOffsetForIndex(t, l)
400
448
  );
401
- hn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: s, behavior: l });
449
+ Rn(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: l, behavior: s });
402
450
  } else
403
- this.scrollToIndex(t, { align: s, behavior: l });
451
+ this.scrollToIndex(t, { align: l, behavior: s });
404
452
  }));
405
453
  }, this.scrollBy = (t, { behavior: n } = {}) => {
406
454
  this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
@@ -412,94 +460,94 @@ class On {
412
460
  }, this.getTotalSize = () => {
413
461
  var t;
414
462
  const n = this.getMeasurements();
415
- let l;
416
- return n.length === 0 ? l = this.options.paddingStart : l = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
463
+ let s;
464
+ return n.length === 0 ? s = this.options.paddingStart : s = this.options.lanes === 1 ? ((t = n[n.length - 1]) == null ? void 0 : t.end) ?? 0 : Math.max(
417
465
  ...n.slice(-this.options.lanes).map((r) => r.end)
418
- ), l - this.options.scrollMargin + this.options.paddingEnd;
466
+ ), s - this.options.scrollMargin + this.options.paddingEnd;
419
467
  }, this._scrollToOffset = (t, {
420
468
  adjustments: n,
421
- behavior: l
469
+ behavior: s
422
470
  }) => {
423
- this.options.scrollToFn(t, { behavior: l, adjustments: n }, this);
471
+ this.options.scrollToFn(t, { behavior: s, adjustments: n }, this);
424
472
  }, this.measure = () => {
425
473
  var t, n;
426
474
  this.itemSizeCache = /* @__PURE__ */ new Map(), (n = (t = this.options).onChange) == null || n.call(t, this, !1);
427
475
  }, this.setOptions(o);
428
476
  }
429
477
  }
430
- const Pt = (e, o, t, n) => {
478
+ const kt = (e, o, t, n) => {
431
479
  for (; e <= o; ) {
432
- const l = (e + o) / 2 | 0, r = t(l);
480
+ const s = (e + o) / 2 | 0, r = t(s);
433
481
  if (r < n)
434
- e = l + 1;
482
+ e = s + 1;
435
483
  else if (r > n)
436
- o = l - 1;
484
+ o = s - 1;
437
485
  else
438
- return l;
486
+ return s;
439
487
  }
440
488
  return e > 0 ? e - 1 : 0;
441
489
  };
442
- function En({
490
+ function zn({
443
491
  measurements: e,
444
492
  outerSize: o,
445
493
  scrollOffset: t
446
494
  }) {
447
- const n = e.length - 1, r = Pt(0, n, (s) => e[s].start, t);
495
+ const n = e.length - 1, r = kt(0, n, (l) => e[l].start, t);
448
496
  let i = r;
449
497
  for (; i < n && e[i].end < t + o; )
450
498
  i++;
451
499
  return { startIndex: r, endIndex: i };
452
500
  }
453
- function In(e) {
454
- const o = new On(R(e)), t = an(o), n = o._didMount();
501
+ function Un(e) {
502
+ const o = new Bn(P(e)), t = cn(o), n = o._didMount();
455
503
  return j(
456
- () => R(e).getScrollElement(),
457
- (l) => {
458
- l && o._willUpdate();
504
+ () => P(e).getScrollElement(),
505
+ (s) => {
506
+ s && o._willUpdate();
459
507
  },
460
508
  {
461
509
  immediate: !0
462
510
  }
463
511
  ), j(
464
- () => R(e),
465
- (l) => {
512
+ () => P(e),
513
+ (s) => {
466
514
  o.setOptions({
467
- ...l,
515
+ ...s,
468
516
  onChange: (r, i) => {
469
- var s;
470
- rt(t), (s = l.onChange) == null || s.call(l, r, i);
517
+ var l;
518
+ it(t), (l = s.onChange) == null || l.call(s, r, i);
471
519
  }
472
- }), o._willUpdate(), rt(t);
520
+ }), o._willUpdate(), it(t);
473
521
  },
474
522
  {
475
523
  immediate: !0
476
524
  }
477
- ), Ye(n), t;
478
- }
479
- function $n(e) {
480
- return In(
481
- _(() => ({
482
- observeElementRect: yn,
483
- observeElementOffset: wn,
484
- scrollToFn: Sn,
485
- ...R(e)
525
+ ), Ze(n), t;
526
+ }
527
+ function Hn(e) {
528
+ return Un(
529
+ w(() => ({
530
+ observeElementRect: Vn,
531
+ observeElementOffset: Mn,
532
+ scrollToFn: Fn,
533
+ ...P(e)
486
534
  }))
487
535
  );
488
536
  }
489
- function Cn(e, o, t) {
490
- let n = S(t == null ? void 0 : t.value), l = _(() => e.value !== void 0);
491
- return [_(() => l.value ? e.value : n.value), function(r) {
492
- return l.value || (n.value = r), o == null ? void 0 : o(r);
537
+ function Wn(e, o, t) {
538
+ let n = E(t == null ? void 0 : t.value), s = w(() => e.value !== void 0);
539
+ return [w(() => s.value ? e.value : n.value), function(r) {
540
+ return s.value || (n.value = r), o == null ? void 0 : o(r);
493
541
  }];
494
542
  }
495
- function Tn(e) {
543
+ function Gn(e) {
496
544
  typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((o) => setTimeout(() => {
497
545
  throw o;
498
546
  }));
499
547
  }
500
- function Le() {
501
- let e = [], o = { addEventListener(t, n, l, r) {
502
- return t.addEventListener(n, l, r), o.add(() => t.removeEventListener(n, l, r));
548
+ function Ae() {
549
+ let e = [], o = { addEventListener(t, n, s, r) {
550
+ return t.addEventListener(n, s, r), o.add(() => t.removeEventListener(n, s, r));
503
551
  }, requestAnimationFrame(...t) {
504
552
  let n = requestAnimationFrame(...t);
505
553
  o.add(() => cancelAnimationFrame(n));
@@ -512,59 +560,59 @@ function Le() {
512
560
  o.add(() => clearTimeout(n));
513
561
  }, microTask(...t) {
514
562
  let n = { current: !0 };
515
- return Tn(() => {
563
+ return Gn(() => {
516
564
  n.current && t[0]();
517
565
  }), o.add(() => {
518
566
  n.current = !1;
519
567
  });
520
- }, style(t, n, l) {
568
+ }, style(t, n, s) {
521
569
  let r = t.style.getPropertyValue(n);
522
- return Object.assign(t.style, { [n]: l }), this.add(() => {
570
+ return Object.assign(t.style, { [n]: s }), this.add(() => {
523
571
  Object.assign(t.style, { [n]: r });
524
572
  });
525
573
  }, group(t) {
526
- let n = Le();
574
+ let n = Ae();
527
575
  return t(n), this.add(() => n.dispose());
528
576
  }, add(t) {
529
577
  return e.push(t), () => {
530
578
  let n = e.indexOf(t);
531
- if (n >= 0) for (let l of e.splice(n, 1)) l();
579
+ if (n >= 0) for (let s of e.splice(n, 1)) s();
532
580
  };
533
581
  }, dispose() {
534
582
  for (let t of e.splice(0)) t();
535
583
  } };
536
584
  return o;
537
585
  }
538
- function Pn() {
539
- let e = Le();
586
+ function qn() {
587
+ let e = Ae();
540
588
  return St(() => e.dispose()), e;
541
589
  }
542
- function Rn() {
543
- let e = Pn();
590
+ function Jn() {
591
+ let e = qn();
544
592
  return (o) => {
545
593
  e.dispose(), e.nextFrame(o);
546
594
  };
547
595
  }
548
- let kn = Symbol("headlessui.useid"), Nn = 0;
549
- function Te() {
550
- return Ce(kn, () => `${++Nn}`)();
596
+ let Kn = Symbol("headlessui.useid"), Yn = 0;
597
+ function Pe() {
598
+ return Te(Kn, () => `${++Yn}`)();
551
599
  }
552
- function k(e) {
600
+ function N(e) {
553
601
  var o;
554
602
  if (e == null || e.value == null) return null;
555
603
  let t = (o = e.value.$el) != null ? o : e.value;
556
604
  return t instanceof Node ? t : null;
557
605
  }
558
- function te(e, o, ...t) {
606
+ function se(e, o, ...t) {
559
607
  if (e in o) {
560
- let l = o[e];
561
- return typeof l == "function" ? l(...t) : l;
608
+ let s = o[e];
609
+ return typeof s == "function" ? s(...t) : s;
562
610
  }
563
- let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((l) => `"${l}"`).join(", ")}.`);
564
- throw Error.captureStackTrace && Error.captureStackTrace(n, te), n;
611
+ let n = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(o).map((s) => `"${s}"`).join(", ")}.`);
612
+ throw Error.captureStackTrace && Error.captureStackTrace(n, se), n;
565
613
  }
566
- var Vn = Object.defineProperty, Dn = (e, o, t) => o in e ? Vn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, ct = (e, o, t) => (Dn(e, typeof o != "symbol" ? o + "" : o, t), t);
567
- let Ln = class {
614
+ var Qn = Object.defineProperty, Xn = (e, o, t) => o in e ? Qn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, ct = (e, o, t) => (Xn(e, typeof o != "symbol" ? o + "" : o, t), t);
615
+ let Zn = class {
568
616
  constructor() {
569
617
  ct(this, "current", this.detect()), ct(this, "currentId", 0);
570
618
  }
@@ -586,21 +634,21 @@ let Ln = class {
586
634
  detect() {
587
635
  return typeof window > "u" || typeof document > "u" ? "server" : "client";
588
636
  }
589
- }, et = new Ln();
590
- function tt(e) {
591
- if (et.isServer) return null;
637
+ }, nt = new Zn();
638
+ function ot(e) {
639
+ if (nt.isServer) return null;
592
640
  if (e instanceof Node) return e.ownerDocument;
593
641
  if (e != null && e.hasOwnProperty("value")) {
594
- let o = k(e);
642
+ let o = N(e);
595
643
  if (o) return o.ownerDocument;
596
644
  }
597
645
  return document;
598
646
  }
599
647
  let dt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
600
- var Mn = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(Mn || {}), An = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(An || {}), jn = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(jn || {}), Rt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Rt || {});
601
- function Fn(e, o = 0) {
648
+ var eo = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(eo || {}), to = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(to || {}), no = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(no || {}), Rt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Rt || {});
649
+ function oo(e, o = 0) {
602
650
  var t;
603
- return e === ((t = tt(e)) == null ? void 0 : t.body) ? !1 : te(o, { 0() {
651
+ return e === ((t = ot(e)) == null ? void 0 : t.body) ? !1 : se(o, { 0() {
604
652
  return e.matches(dt);
605
653
  }, 1() {
606
654
  let n = e;
@@ -611,219 +659,219 @@ function Fn(e, o = 0) {
611
659
  return !1;
612
660
  } });
613
661
  }
614
- var zn = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(zn || {});
662
+ var so = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(so || {});
615
663
  typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
616
664
  e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
617
665
  }, !0), document.addEventListener("click", (e) => {
618
666
  e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
619
667
  }, !0));
620
- function Bn(e, o = (t) => t) {
668
+ function lo(e, o = (t) => t) {
621
669
  return e.slice().sort((t, n) => {
622
- let l = o(t), r = o(n);
623
- if (l === null || r === null) return 0;
624
- let i = l.compareDocumentPosition(r);
670
+ let s = o(t), r = o(n);
671
+ if (s === null || r === null) return 0;
672
+ let i = s.compareDocumentPosition(r);
625
673
  return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
626
674
  });
627
675
  }
628
- function Un() {
676
+ function ro() {
629
677
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
630
678
  }
631
- function Hn() {
679
+ function io() {
632
680
  return /Android/gi.test(window.navigator.userAgent);
633
681
  }
634
- function kt() {
635
- return Un() || Hn();
682
+ function Nt() {
683
+ return ro() || io();
636
684
  }
637
685
  function Re(e, o, t) {
638
- et.isServer || le((n) => {
686
+ nt.isServer || ie((n) => {
639
687
  document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
640
688
  });
641
689
  }
642
- function Wn(e, o, t) {
643
- et.isServer || le((n) => {
690
+ function ao(e, o, t) {
691
+ nt.isServer || ie((n) => {
644
692
  window.addEventListener(e, o, t), n(() => window.removeEventListener(e, o, t));
645
693
  });
646
694
  }
647
- function Gn(e, o, t = _(() => !0)) {
695
+ function uo(e, o, t = w(() => !0)) {
648
696
  function n(r, i) {
649
697
  if (!t.value || r.defaultPrevented) return;
650
- let s = i(r);
651
- if (s === null || !s.getRootNode().contains(s)) return;
652
- let a = function u(v) {
653
- return typeof v == "function" ? u(v()) : Array.isArray(v) || v instanceof Set ? v : [v];
698
+ let l = i(r);
699
+ if (l === null || !l.getRootNode().contains(l)) return;
700
+ let a = function u(p) {
701
+ return typeof p == "function" ? u(p()) : Array.isArray(p) || p instanceof Set ? p : [p];
654
702
  }(e);
655
703
  for (let u of a) {
656
704
  if (u === null) continue;
657
- let v = u instanceof HTMLElement ? u : k(u);
658
- if (v != null && v.contains(s) || r.composed && r.composedPath().includes(v)) return;
705
+ let p = u instanceof HTMLElement ? u : N(u);
706
+ if (p != null && p.contains(l) || r.composed && r.composedPath().includes(p)) return;
659
707
  }
660
- return !Fn(s, Rt.Loose) && s.tabIndex !== -1 && r.preventDefault(), o(r, s);
708
+ return !oo(l, Rt.Loose) && l.tabIndex !== -1 && r.preventDefault(), o(r, l);
661
709
  }
662
- let l = S(null);
710
+ let s = E(null);
663
711
  Re("pointerdown", (r) => {
664
- var i, s;
665
- t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
712
+ var i, l;
713
+ t.value && (s.value = ((l = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : l[0]) || r.target);
666
714
  }, !0), Re("mousedown", (r) => {
667
- var i, s;
668
- t.value && (l.value = ((s = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : s[0]) || r.target);
715
+ var i, l;
716
+ t.value && (s.value = ((l = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : l[0]) || r.target);
669
717
  }, !0), Re("click", (r) => {
670
- kt() || l.value && (n(r, () => l.value), l.value = null);
671
- }, !0), Re("touchend", (r) => n(r, () => r.target instanceof HTMLElement ? r.target : null), !0), Wn("blur", (r) => n(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
718
+ Nt() || s.value && (n(r, () => s.value), s.value = null);
719
+ }, !0), Re("touchend", (r) => n(r, () => r.target instanceof HTMLElement ? r.target : null), !0), ao("blur", (r) => n(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
672
720
  }
673
721
  function ft(e, o) {
674
722
  if (e) return e;
675
723
  let t = o ?? "button";
676
724
  if (typeof t == "string" && t.toLowerCase() === "button") return "button";
677
725
  }
678
- function qn(e, o) {
679
- let t = S(ft(e.value.type, e.value.as));
680
- return de(() => {
726
+ function co(e, o) {
727
+ let t = E(ft(e.value.type, e.value.as));
728
+ return pe(() => {
681
729
  t.value = ft(e.value.type, e.value.as);
682
- }), le(() => {
730
+ }), ie(() => {
683
731
  var n;
684
- t.value || k(o) && k(o) instanceof HTMLButtonElement && !((n = k(o)) != null && n.hasAttribute("type")) && (t.value = "button");
732
+ t.value || N(o) && N(o) instanceof HTMLButtonElement && !((n = N(o)) != null && n.hasAttribute("type")) && (t.value = "button");
685
733
  }), t;
686
734
  }
687
- function vt(e) {
735
+ function pt(e) {
688
736
  return [e.screenX, e.screenY];
689
737
  }
690
- function Jn() {
691
- let e = S([-1, -1]);
738
+ function fo() {
739
+ let e = E([-1, -1]);
692
740
  return { wasMoved(o) {
693
- let t = vt(o);
741
+ let t = pt(o);
694
742
  return e.value[0] === t[0] && e.value[1] === t[1] ? !1 : (e.value = t, !0);
695
743
  }, update(o) {
696
- e.value = vt(o);
744
+ e.value = pt(o);
697
745
  } };
698
746
  }
699
- function Kn({ container: e, accept: o, walk: t, enabled: n }) {
700
- le(() => {
701
- let l = e.value;
702
- if (!l || n !== void 0 && !n.value) return;
703
- let r = tt(e);
747
+ function po({ container: e, accept: o, walk: t, enabled: n }) {
748
+ ie(() => {
749
+ let s = e.value;
750
+ if (!s || n !== void 0 && !n.value) return;
751
+ let r = ot(e);
704
752
  if (!r) return;
705
- let i = Object.assign((a) => o(a), { acceptNode: o }), s = r.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, i, !1);
706
- for (; s.nextNode(); ) t(s.currentNode);
753
+ let i = Object.assign((a) => o(a), { acceptNode: o }), l = r.createTreeWalker(s, NodeFilter.SHOW_ELEMENT, i, !1);
754
+ for (; l.nextNode(); ) t(l.currentNode);
707
755
  });
708
756
  }
709
- var Ee = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ee || {}), Yn = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Yn || {});
710
- function fe({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
757
+ var $e = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))($e || {}), vo = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(vo || {});
758
+ function ve({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...s }) {
711
759
  var r;
712
- let i = Vt(n, t), s = Object.assign(l, { props: i });
713
- if (e || o & 2 && i.static) return He(s);
760
+ let i = Lt(n, t), l = Object.assign(s, { props: i });
761
+ if (e || o & 2 && i.static) return qe(l);
714
762
  if (o & 1) {
715
763
  let a = (r = i.unmount) == null || r ? 0 : 1;
716
- return te(a, { 0() {
764
+ return se(a, { 0() {
717
765
  return null;
718
766
  }, 1() {
719
- return He({ ...l, props: { ...i, hidden: !0, style: { display: "none" } } });
767
+ return qe({ ...s, props: { ...i, hidden: !0, style: { display: "none" } } });
720
768
  } });
721
769
  }
722
- return He(s);
770
+ return qe(l);
723
771
  }
724
- function He({ props: e, attrs: o, slots: t, slot: n, name: l }) {
772
+ function qe({ props: e, attrs: o, slots: t, slot: n, name: s }) {
725
773
  var r, i;
726
- let { as: s, ...a } = je(e, ["unmount", "static"]), u = (r = t.default) == null ? void 0 : r.call(t, n), v = {};
774
+ let { as: l, ...a } = Fe(e, ["unmount", "static"]), u = (r = t.default) == null ? void 0 : r.call(t, n), p = {};
727
775
  if (n) {
728
- let c = !1, b = [];
729
- for (let [m, w] of Object.entries(n)) typeof w == "boolean" && (c = !0), w === !0 && b.push(m);
730
- c && (v["data-headlessui-state"] = b.join(" "));
731
- }
732
- if (s === "template") {
733
- if (u = Nt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
734
- let [c, ...b] = u ?? [];
735
- if (!Zn(c) || b.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${l} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(a).concat(Object.keys(o)).map(($) => $.trim()).filter(($, M, E) => E.indexOf($) === M).sort(($, M) => $.localeCompare(M)).map(($) => ` - ${$}`).join(`
736
- `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map(($) => ` - ${$}`).join(`
776
+ let c = !1, h = [];
777
+ for (let [m, v] of Object.entries(n)) typeof v == "boolean" && (c = !0), v === !0 && h.push(m);
778
+ c && (p["data-headlessui-state"] = h.join(" "));
779
+ }
780
+ if (l === "template") {
781
+ if (u = Dt(u ?? []), Object.keys(a).length > 0 || Object.keys(o).length > 0) {
782
+ let [c, ...h] = u ?? [];
783
+ if (!mo(c) || h.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${s} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(a).concat(Object.keys(o)).map((I) => I.trim()).filter((I, V, T) => T.indexOf(I) === V).sort((I, V) => I.localeCompare(V)).map((I) => ` - ${I}`).join(`
784
+ `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((I) => ` - ${I}`).join(`
737
785
  `)].join(`
738
786
  `));
739
- let m = Vt((i = c.props) != null ? i : {}, a, v), w = Ot(c, m, !0);
740
- for (let $ in m) $.startsWith("on") && (w.props || (w.props = {}), w.props[$] = m[$]);
741
- return w;
787
+ let m = Lt((i = c.props) != null ? i : {}, a, p), v = Et(c, m, !0);
788
+ for (let I in m) I.startsWith("on") && (v.props || (v.props = {}), v.props[I] = m[I]);
789
+ return v;
742
790
  }
743
791
  return Array.isArray(u) && u.length === 1 ? u[0] : u;
744
792
  }
745
- return Oe(s, Object.assign({}, a, v), { default: () => u });
793
+ return Oe(l, Object.assign({}, a, p), { default: () => u });
746
794
  }
747
- function Nt(e) {
748
- return e.flatMap((o) => o.type === X ? Nt(o.children) : [o]);
795
+ function Dt(e) {
796
+ return e.flatMap((o) => o.type === G ? Dt(o.children) : [o]);
749
797
  }
750
- function Vt(...e) {
798
+ function Lt(...e) {
751
799
  if (e.length === 0) return {};
752
800
  if (e.length === 1) return e[0];
753
801
  let o = {}, t = {};
754
- for (let n of e) for (let l in n) l.startsWith("on") && typeof n[l] == "function" ? (t[l] != null || (t[l] = []), t[l].push(n[l])) : o[l] = n[l];
802
+ for (let n of e) for (let s in n) s.startsWith("on") && typeof n[s] == "function" ? (t[s] != null || (t[s] = []), t[s].push(n[s])) : o[s] = n[s];
755
803
  if (o.disabled || o["aria-disabled"]) return Object.assign(o, Object.fromEntries(Object.keys(t).map((n) => [n, void 0])));
756
- for (let n in t) Object.assign(o, { [n](l, ...r) {
804
+ for (let n in t) Object.assign(o, { [n](s, ...r) {
757
805
  let i = t[n];
758
- for (let s of i) {
759
- if (l instanceof Event && l.defaultPrevented) return;
760
- s(l, ...r);
806
+ for (let l of i) {
807
+ if (s instanceof Event && s.defaultPrevented) return;
808
+ l(s, ...r);
761
809
  }
762
810
  } });
763
811
  return o;
764
812
  }
765
- function Qn(e) {
813
+ function ho(e) {
766
814
  let o = Object.assign({}, e);
767
815
  for (let t in o) o[t] === void 0 && delete o[t];
768
816
  return o;
769
817
  }
770
- function je(e, o = []) {
818
+ function Fe(e, o = []) {
771
819
  let t = Object.assign({}, e);
772
820
  for (let n of o) n in t && delete t[n];
773
821
  return t;
774
822
  }
775
- function Zn(e) {
823
+ function mo(e) {
776
824
  return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
777
825
  }
778
- var Dt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Dt || {});
779
- let Xn = se({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
826
+ var Vt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Vt || {});
827
+ let go = ae({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: o, attrs: t }) {
780
828
  return () => {
781
829
  var n;
782
- let { features: l, ...r } = e, i = { "aria-hidden": (l & 2) === 2 ? !0 : (n = r["aria-hidden"]) != null ? n : void 0, hidden: (l & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(l & 4) === 4 && (l & 2) !== 2 && { display: "none" } } };
783
- return fe({ ourProps: i, theirProps: r, slot: {}, attrs: t, slots: o, name: "Hidden" });
830
+ let { features: s, ...r } = e, i = { "aria-hidden": (s & 2) === 2 ? !0 : (n = r["aria-hidden"]) != null ? n : void 0, hidden: (s & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(s & 4) === 4 && (s & 2) !== 2 && { display: "none" } } };
831
+ return ve({ ourProps: i, theirProps: r, slot: {}, attrs: t, slots: o, name: "Hidden" });
784
832
  };
785
- } }), Lt = Symbol("Context");
833
+ } }), At = Symbol("Context");
786
834
  var Ie = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(Ie || {});
787
- function eo() {
788
- return Ce(Lt, null);
835
+ function bo() {
836
+ return Te(At, null);
789
837
  }
790
- function to(e) {
791
- Qe(Lt, e);
838
+ function _o(e) {
839
+ et(At, e);
792
840
  }
793
841
  var W = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(W || {}), Mt = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(Mt || {});
794
- function no(e) {
842
+ function yo(e) {
795
843
  function o() {
796
844
  document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
797
845
  }
798
846
  typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", o), o());
799
847
  }
800
- let ie = [];
801
- no(() => {
848
+ let ce = [];
849
+ yo(() => {
802
850
  function e(o) {
803
- o.target instanceof HTMLElement && o.target !== document.body && ie[0] !== o.target && (ie.unshift(o.target), ie = ie.filter((t) => t != null && t.isConnected), ie.splice(10));
851
+ o.target instanceof HTMLElement && o.target !== document.body && ce[0] !== o.target && (ce.unshift(o.target), ce = ce.filter((t) => t != null && t.isConnected), ce.splice(10));
804
852
  }
805
853
  window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
806
854
  });
807
- function oo(e) {
855
+ function xo(e) {
808
856
  throw new Error("Unexpected object: " + e);
809
857
  }
810
- var B = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(B || {});
811
- function pt(e, o) {
858
+ var U = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(U || {});
859
+ function vt(e, o) {
812
860
  let t = o.resolveItems();
813
861
  if (t.length <= 0) return null;
814
- let n = o.resolveActiveIndex(), l = n ?? -1;
862
+ let n = o.resolveActiveIndex(), s = n ?? -1;
815
863
  switch (e.focus) {
816
864
  case 0: {
817
865
  for (let r = 0; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
818
866
  return n;
819
867
  }
820
868
  case 1: {
821
- l === -1 && (l = t.length);
822
- for (let r = l - 1; r >= 0; --r) if (!o.resolveDisabled(t[r], r, t)) return r;
869
+ s === -1 && (s = t.length);
870
+ for (let r = s - 1; r >= 0; --r) if (!o.resolveDisabled(t[r], r, t)) return r;
823
871
  return n;
824
872
  }
825
873
  case 2: {
826
- for (let r = l + 1; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
874
+ for (let r = s + 1; r < t.length; ++r) if (!o.resolveDisabled(t[r], r, t)) return r;
827
875
  return n;
828
876
  }
829
877
  case 3: {
@@ -837,369 +885,369 @@ function pt(e, o) {
837
885
  case 5:
838
886
  return null;
839
887
  default:
840
- oo(e);
888
+ xo(e);
841
889
  }
842
890
  }
843
- function At(e = {}, o = null, t = []) {
844
- for (let [n, l] of Object.entries(e)) Ft(t, jt(o, n), l);
891
+ function jt(e = {}, o = null, t = []) {
892
+ for (let [n, s] of Object.entries(e)) Bt(t, Ft(o, n), s);
845
893
  return t;
846
894
  }
847
- function jt(e, o) {
895
+ function Ft(e, o) {
848
896
  return e ? e + "[" + o + "]" : o;
849
897
  }
850
- function Ft(e, o, t) {
851
- if (Array.isArray(t)) for (let [n, l] of t.entries()) Ft(e, jt(o, n.toString()), l);
852
- else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) : At(t, o, e);
898
+ function Bt(e, o, t) {
899
+ if (Array.isArray(t)) for (let [n, s] of t.entries()) Bt(e, Ft(o, n.toString()), s);
900
+ else t instanceof Date ? e.push([o, t.toISOString()]) : typeof t == "boolean" ? e.push([o, t ? "1" : "0"]) : typeof t == "string" ? e.push([o, t]) : typeof t == "number" ? e.push([o, `${t}`]) : t == null ? e.push([o, ""]) : jt(t, o, e);
853
901
  }
854
- function lo(e, o) {
902
+ function wo(e, o) {
855
903
  return e === o;
856
904
  }
857
- var so = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(so || {}), ro = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(ro || {}), io = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(io || {});
905
+ var So = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(So || {}), Eo = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Eo || {}), Oo = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(Oo || {});
858
906
  let zt = Symbol("ComboboxContext");
859
- function ve(e) {
860
- let o = Ce(zt, null);
907
+ function he(e) {
908
+ let o = Te(zt, null);
861
909
  if (o === null) {
862
910
  let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
863
- throw Error.captureStackTrace && Error.captureStackTrace(t, ve), t;
911
+ throw Error.captureStackTrace && Error.captureStackTrace(t, he), t;
864
912
  }
865
913
  return o;
866
914
  }
867
- let Bt = Symbol("VirtualContext"), ao = se({ name: "VirtualProvider", setup(e, { slots: o }) {
868
- let t = ve("VirtualProvider"), n = _(() => {
869
- let s = k(t.optionsRef);
870
- if (!s) return { start: 0, end: 0 };
871
- let a = window.getComputedStyle(s);
915
+ let Ut = Symbol("VirtualContext"), $o = ae({ name: "VirtualProvider", setup(e, { slots: o }) {
916
+ let t = he("VirtualProvider"), n = w(() => {
917
+ let l = N(t.optionsRef);
918
+ if (!l) return { start: 0, end: 0 };
919
+ let a = window.getComputedStyle(l);
872
920
  return { start: parseFloat(a.paddingBlockStart || a.paddingTop), end: parseFloat(a.paddingBlockEnd || a.paddingBottom) };
873
- }), l = $n(_(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
921
+ }), s = Hn(w(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
874
922
  return 40;
875
923
  }, getScrollElement() {
876
- return k(t.optionsRef);
877
- }, overscan: 12 }))), r = _(() => {
878
- var s;
879
- return (s = t.virtual.value) == null ? void 0 : s.options;
880
- }), i = S(0);
924
+ return N(t.optionsRef);
925
+ }, overscan: 12 }))), r = w(() => {
926
+ var l;
927
+ return (l = t.virtual.value) == null ? void 0 : l.options;
928
+ }), i = E(0);
881
929
  return j([r], () => {
882
930
  i.value += 1;
883
- }), Qe(Bt, t.virtual.value ? l : null), () => [Oe("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
884
- if (s) {
931
+ }), et(Ut, t.virtual.value ? s : null), () => [Oe("div", { style: { position: "relative", width: "100%", height: `${s.value.getTotalSize()}px` }, ref: (l) => {
932
+ if (l) {
885
933
  if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
886
- t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
934
+ t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && s.value.scrollToIndex(t.activeOptionIndex.value);
887
935
  }
888
- } }, l.value.getVirtualItems().map((s) => Ot(o.default({ option: t.virtual.value.options[s.index], open: t.comboboxState.value === 0 })[0], { key: `${i.value}-${s.index}`, "data-index": s.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": s.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${s.start}px)`, overflowAnchor: "none" } })))];
889
- } }), uo = se({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(e, { slots: o, attrs: t, emit: n }) {
890
- let l = S(1), r = S(null), i = S(null), s = S(null), a = S(null), u = S({ static: !1, hold: !1 }), v = S([]), c = S(null), b = S(2), m = S(!1);
891
- function w(d = (f) => f) {
892
- let f = c.value !== null ? v.value[c.value] : null, y = d(v.value.slice()), x = y.length > 0 && y[0].dataRef.order.value !== null ? y.sort((L, G) => L.dataRef.order.value - G.dataRef.order.value) : Bn(y, (L) => k(L.dataRef.domRef)), N = f ? x.indexOf(f) : null;
893
- return N === -1 && (N = null), { options: x, activeOptionIndex: N };
894
- }
895
- let $ = _(() => e.multiple ? 1 : 0), M = _(() => e.nullable), [E, O] = Cn(_(() => e.modelValue), (d) => n("update:modelValue", d), _(() => e.defaultValue)), D = _(() => E.value === void 0 ? te($.value, { 1: [], 0: void 0 }) : E.value), A = null, g = null;
896
- function T(d) {
897
- return te($.value, { 0() {
898
- return O == null ? void 0 : O(d);
936
+ } }, s.value.getVirtualItems().map((l) => Et(o.default({ option: t.virtual.value.options[l.index], open: t.comboboxState.value === 0 })[0], { key: `${i.value}-${l.index}`, "data-index": l.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": l.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${l.start}px)`, overflowAnchor: "none" } })))];
937
+ } }), Io = ae({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(e, { slots: o, attrs: t, emit: n }) {
938
+ let s = E(1), r = E(null), i = E(null), l = E(null), a = E(null), u = E({ static: !1, hold: !1 }), p = E([]), c = E(null), h = E(2), m = E(!1);
939
+ function v(d = (f) => f) {
940
+ let f = c.value !== null ? p.value[c.value] : null, x = d(p.value.slice()), O = x.length > 0 && x[0].dataRef.order.value !== null ? x.sort((A, q) => A.dataRef.order.value - q.dataRef.order.value) : lo(x, (A) => N(A.dataRef.domRef)), D = f ? O.indexOf(f) : null;
941
+ return D === -1 && (D = null), { options: O, activeOptionIndex: D };
942
+ }
943
+ let I = w(() => e.multiple ? 1 : 0), V = w(() => e.nullable), [T, C] = Wn(w(() => e.modelValue), (d) => n("update:modelValue", d), w(() => e.defaultValue)), L = w(() => T.value === void 0 ? se(I.value, { 1: [], 0: void 0 }) : T.value), M = null, y = null;
944
+ function R(d) {
945
+ return se(I.value, { 0() {
946
+ return C == null ? void 0 : C(d);
899
947
  }, 1: () => {
900
- let f = K(p.value.value).slice(), y = K(d), x = f.findIndex((N) => p.compare(y, K(N)));
901
- return x === -1 ? f.push(y) : f.splice(x, 1), O == null ? void 0 : O(f);
948
+ let f = Y(b.value.value).slice(), x = Y(d), O = f.findIndex((D) => b.compare(x, Y(D)));
949
+ return O === -1 ? f.push(x) : f.splice(O, 1), C == null ? void 0 : C(f);
902
950
  } });
903
951
  }
904
- let h = _(() => {
952
+ let _ = w(() => {
905
953
  });
906
- j([h], ([d], [f]) => {
907
- if (p.virtual.value && d && f && c.value !== null) {
908
- let y = d.indexOf(f[c.value]);
909
- y !== -1 ? c.value = y : c.value = null;
954
+ j([_], ([d], [f]) => {
955
+ if (b.virtual.value && d && f && c.value !== null) {
956
+ let x = d.indexOf(f[c.value]);
957
+ x !== -1 ? c.value = x : c.value = null;
910
958
  }
911
959
  });
912
- let p = { comboboxState: l, value: D, mode: $, compare(d, f) {
960
+ let b = { comboboxState: s, value: L, mode: I, compare(d, f) {
913
961
  if (typeof e.by == "string") {
914
- let y = e.by;
915
- return (d == null ? void 0 : d[y]) === (f == null ? void 0 : f[y]);
962
+ let x = e.by;
963
+ return (d == null ? void 0 : d[x]) === (f == null ? void 0 : f[x]);
916
964
  }
917
- return e.by === null ? lo(d, f) : e.by(d, f);
965
+ return e.by === null ? wo(d, f) : e.by(d, f);
918
966
  }, calculateIndex(d) {
919
- return p.virtual.value ? e.by === null ? p.virtual.value.options.indexOf(d) : p.virtual.value.options.findIndex((f) => p.compare(f, d)) : v.value.findIndex((f) => p.compare(f.dataRef.value, d));
920
- }, defaultValue: _(() => e.defaultValue), nullable: M, immediate: _(() => !1), virtual: _(() => null), inputRef: i, labelRef: r, buttonRef: s, optionsRef: a, disabled: _(() => e.disabled), options: v, change(d) {
921
- O(d);
922
- }, activeOptionIndex: _(() => {
923
- if (m.value && c.value === null && (p.virtual.value ? p.virtual.value.options.length > 0 : v.value.length > 0)) {
924
- if (p.virtual.value) {
925
- let f = p.virtual.value.options.findIndex((y) => {
926
- var x;
927
- return !((x = p.virtual.value) != null && x.disabled(y));
967
+ return b.virtual.value ? e.by === null ? b.virtual.value.options.indexOf(d) : b.virtual.value.options.findIndex((f) => b.compare(f, d)) : p.value.findIndex((f) => b.compare(f.dataRef.value, d));
968
+ }, defaultValue: w(() => e.defaultValue), nullable: V, immediate: w(() => !1), virtual: w(() => null), inputRef: i, labelRef: r, buttonRef: l, optionsRef: a, disabled: w(() => e.disabled), options: p, change(d) {
969
+ C(d);
970
+ }, activeOptionIndex: w(() => {
971
+ if (m.value && c.value === null && (b.virtual.value ? b.virtual.value.options.length > 0 : p.value.length > 0)) {
972
+ if (b.virtual.value) {
973
+ let f = b.virtual.value.options.findIndex((x) => {
974
+ var O;
975
+ return !((O = b.virtual.value) != null && O.disabled(x));
928
976
  });
929
977
  if (f !== -1) return f;
930
978
  }
931
- let d = v.value.findIndex((f) => !f.dataRef.disabled);
979
+ let d = p.value.findIndex((f) => !f.dataRef.disabled);
932
980
  if (d !== -1) return d;
933
981
  }
934
982
  return c.value;
935
- }), activationTrigger: b, optionsPropsRef: u, closeCombobox() {
936
- m.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, c.value = null);
983
+ }), activationTrigger: h, optionsPropsRef: u, closeCombobox() {
984
+ m.value = !1, !e.disabled && s.value !== 1 && (s.value = 1, c.value = null);
937
985
  }, openCombobox() {
938
- if (m.value = !0, !e.disabled && l.value !== 0) {
939
- if (p.value.value) {
940
- let d = p.calculateIndex(p.value.value);
986
+ if (m.value = !0, !e.disabled && s.value !== 0) {
987
+ if (b.value.value) {
988
+ let d = b.calculateIndex(b.value.value);
941
989
  d !== -1 && (c.value = d);
942
990
  }
943
- l.value = 0;
991
+ s.value = 0;
944
992
  }
945
993
  }, setActivationTrigger(d) {
946
- b.value = d;
947
- }, goToOption(d, f, y) {
948
- m.value = !1, A !== null && cancelAnimationFrame(A), A = requestAnimationFrame(() => {
949
- if (e.disabled || a.value && !u.value.static && l.value === 1) return;
950
- if (p.virtual.value) {
951
- c.value = d === B.Specific ? f : pt({ focus: d }, { resolveItems: () => p.virtual.value.options, resolveActiveIndex: () => {
952
- var L, G;
953
- return (G = (L = p.activeOptionIndex.value) != null ? L : p.virtual.value.options.findIndex((q) => {
994
+ h.value = d;
995
+ }, goToOption(d, f, x) {
996
+ m.value = !1, M !== null && cancelAnimationFrame(M), M = requestAnimationFrame(() => {
997
+ if (e.disabled || a.value && !u.value.static && s.value === 1) return;
998
+ if (b.virtual.value) {
999
+ c.value = d === U.Specific ? f : vt({ focus: d }, { resolveItems: () => b.virtual.value.options, resolveActiveIndex: () => {
1000
+ var A, q;
1001
+ return (q = (A = b.activeOptionIndex.value) != null ? A : b.virtual.value.options.findIndex((J) => {
954
1002
  var F;
955
- return !((F = p.virtual.value) != null && F.disabled(q));
956
- })) != null ? G : null;
957
- }, resolveDisabled: (L) => p.virtual.value.disabled(L), resolveId() {
1003
+ return !((F = b.virtual.value) != null && F.disabled(J));
1004
+ })) != null ? q : null;
1005
+ }, resolveDisabled: (A) => b.virtual.value.disabled(A), resolveId() {
958
1006
  throw new Error("Function not implemented.");
959
- } }), b.value = y ?? 2;
1007
+ } }), h.value = x ?? 2;
960
1008
  return;
961
1009
  }
962
- let x = w();
963
- if (x.activeOptionIndex === null) {
964
- let L = x.options.findIndex((G) => !G.dataRef.disabled);
965
- L !== -1 && (x.activeOptionIndex = L);
1010
+ let O = v();
1011
+ if (O.activeOptionIndex === null) {
1012
+ let A = O.options.findIndex((q) => !q.dataRef.disabled);
1013
+ A !== -1 && (O.activeOptionIndex = A);
966
1014
  }
967
- let N = d === B.Specific ? f : pt({ focus: d }, { resolveItems: () => x.options, resolveActiveIndex: () => x.activeOptionIndex, resolveId: (L) => L.id, resolveDisabled: (L) => L.dataRef.disabled });
968
- c.value = N, b.value = y ?? 2, v.value = x.options;
1015
+ let D = d === U.Specific ? f : vt({ focus: d }, { resolveItems: () => O.options, resolveActiveIndex: () => O.activeOptionIndex, resolveId: (A) => A.id, resolveDisabled: (A) => A.dataRef.disabled });
1016
+ c.value = D, h.value = x ?? 2, p.value = O.options;
969
1017
  });
970
1018
  }, selectOption(d) {
971
- let f = v.value.find((x) => x.id === d);
1019
+ let f = p.value.find((O) => O.id === d);
972
1020
  if (!f) return;
973
- let { dataRef: y } = f;
974
- T(y.value);
1021
+ let { dataRef: x } = f;
1022
+ R(x.value);
975
1023
  }, selectActiveOption() {
976
- if (p.activeOptionIndex.value !== null) {
977
- if (p.virtual.value) T(p.virtual.value.options[p.activeOptionIndex.value]);
1024
+ if (b.activeOptionIndex.value !== null) {
1025
+ if (b.virtual.value) R(b.virtual.value.options[b.activeOptionIndex.value]);
978
1026
  else {
979
- let { dataRef: d } = v.value[p.activeOptionIndex.value];
980
- T(d.value);
1027
+ let { dataRef: d } = p.value[b.activeOptionIndex.value];
1028
+ R(d.value);
981
1029
  }
982
- p.goToOption(B.Specific, p.activeOptionIndex.value);
1030
+ b.goToOption(U.Specific, b.activeOptionIndex.value);
983
1031
  }
984
1032
  }, registerOption(d, f) {
985
- let y = Et({ id: d, dataRef: f });
986
- if (p.virtual.value) {
987
- v.value.push(y);
1033
+ let x = Ot({ id: d, dataRef: f });
1034
+ if (b.virtual.value) {
1035
+ p.value.push(x);
988
1036
  return;
989
1037
  }
990
- g && cancelAnimationFrame(g);
991
- let x = w((N) => (N.push(y), N));
992
- c.value === null && p.isSelected(f.value.value) && (x.activeOptionIndex = x.options.indexOf(y)), v.value = x.options, c.value = x.activeOptionIndex, b.value = 2, x.options.some((N) => !k(N.dataRef.domRef)) && (g = requestAnimationFrame(() => {
993
- let N = w();
994
- v.value = N.options, c.value = N.activeOptionIndex;
1038
+ y && cancelAnimationFrame(y);
1039
+ let O = v((D) => (D.push(x), D));
1040
+ c.value === null && b.isSelected(f.value.value) && (O.activeOptionIndex = O.options.indexOf(x)), p.value = O.options, c.value = O.activeOptionIndex, h.value = 2, O.options.some((D) => !N(D.dataRef.domRef)) && (y = requestAnimationFrame(() => {
1041
+ let D = v();
1042
+ p.value = D.options, c.value = D.activeOptionIndex;
995
1043
  }));
996
1044
  }, unregisterOption(d, f) {
997
- if (A !== null && cancelAnimationFrame(A), f && (m.value = !0), p.virtual.value) {
998
- v.value = v.value.filter((x) => x.id !== d);
1045
+ if (M !== null && cancelAnimationFrame(M), f && (m.value = !0), b.virtual.value) {
1046
+ p.value = p.value.filter((O) => O.id !== d);
999
1047
  return;
1000
1048
  }
1001
- let y = w((x) => {
1002
- let N = x.findIndex((L) => L.id === d);
1003
- return N !== -1 && x.splice(N, 1), x;
1049
+ let x = v((O) => {
1050
+ let D = O.findIndex((A) => A.id === d);
1051
+ return D !== -1 && O.splice(D, 1), O;
1004
1052
  });
1005
- v.value = y.options, c.value = y.activeOptionIndex, b.value = 2;
1053
+ p.value = x.options, c.value = x.activeOptionIndex, h.value = 2;
1006
1054
  }, isSelected(d) {
1007
- return te($.value, { 0: () => p.compare(K(p.value.value), K(d)), 1: () => K(p.value.value).some((f) => p.compare(K(f), K(d))) });
1055
+ return se(I.value, { 0: () => b.compare(Y(b.value.value), Y(d)), 1: () => Y(b.value.value).some((f) => b.compare(Y(f), Y(d))) });
1008
1056
  }, isActive(d) {
1009
- return c.value === p.calculateIndex(d);
1057
+ return c.value === b.calculateIndex(d);
1010
1058
  } };
1011
- Gn([i, s, a], () => p.closeCombobox(), _(() => l.value === 0)), Qe(zt, p), to(_(() => te(l.value, { 0: Ie.Open, 1: Ie.Closed })));
1012
- let C = _(() => {
1059
+ uo([i, l, a], () => b.closeCombobox(), w(() => s.value === 0)), et(zt, b), _o(w(() => se(s.value, { 0: Ie.Open, 1: Ie.Closed })));
1060
+ let k = w(() => {
1013
1061
  var d;
1014
- return (d = k(i)) == null ? void 0 : d.closest("form");
1062
+ return (d = N(i)) == null ? void 0 : d.closest("form");
1015
1063
  });
1016
- return de(() => {
1017
- j([C], () => {
1018
- if (!C.value || e.defaultValue === void 0) return;
1064
+ return pe(() => {
1065
+ j([k], () => {
1066
+ if (!k.value || e.defaultValue === void 0) return;
1019
1067
  function d() {
1020
- p.change(e.defaultValue);
1068
+ b.change(e.defaultValue);
1021
1069
  }
1022
- return C.value.addEventListener("reset", d), () => {
1070
+ return k.value.addEventListener("reset", d), () => {
1023
1071
  var f;
1024
- (f = C.value) == null || f.removeEventListener("reset", d);
1072
+ (f = k.value) == null || f.removeEventListener("reset", d);
1025
1073
  };
1026
1074
  }, { immediate: !0 });
1027
1075
  }), () => {
1028
- var d, f, y;
1029
- let { name: x, disabled: N, form: L, ...G } = e, q = { open: l.value === 0, disabled: N, activeIndex: p.activeOptionIndex.value, activeOption: p.activeOptionIndex.value === null ? null : p.virtual.value ? p.virtual.value.options[(d = p.activeOptionIndex.value) != null ? d : 0] : (y = (f = p.options.value[p.activeOptionIndex.value]) == null ? void 0 : f.dataRef.value) != null ? y : null, value: D.value };
1030
- return Oe(X, [...x != null && D.value != null ? At({ [x]: D.value }).map(([F, rn]) => Oe(Xn, Qn({ features: Dt.Hidden, key: F, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: L, disabled: N, name: F, value: rn }))) : [], fe({ theirProps: { ...t, ...je(G, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: q, slots: o, attrs: t, name: "Combobox" })]);
1076
+ var d, f, x;
1077
+ let { name: O, disabled: D, form: A, ...q } = e, J = { open: s.value === 0, disabled: D, activeIndex: b.activeOptionIndex.value, activeOption: b.activeOptionIndex.value === null ? null : b.virtual.value ? b.virtual.value.options[(d = b.activeOptionIndex.value) != null ? d : 0] : (x = (f = b.options.value[b.activeOptionIndex.value]) == null ? void 0 : f.dataRef.value) != null ? x : null, value: L.value };
1078
+ return Oe(G, [...O != null && L.value != null ? jt({ [O]: L.value }).map(([F, un]) => Oe(go, ho({ features: Vt.Hidden, key: F, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: A, disabled: D, name: F, value: un }))) : [], ve({ theirProps: { ...t, ...Fe(q, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: J, slots: o, attrs: t, name: "Combobox" })]);
1031
1079
  };
1032
1080
  } });
1033
- se({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
1081
+ ae({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
1034
1082
  var n;
1035
- let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Te()}`, r = ve("ComboboxLabel");
1083
+ let s = (n = e.id) != null ? n : `headlessui-combobox-label-${Pe()}`, r = he("ComboboxLabel");
1036
1084
  function i() {
1037
- var s;
1038
- (s = k(r.inputRef)) == null || s.focus({ preventScroll: !0 });
1085
+ var l;
1086
+ (l = N(r.inputRef)) == null || l.focus({ preventScroll: !0 });
1039
1087
  }
1040
1088
  return () => {
1041
- let s = { open: r.comboboxState.value === 0, disabled: r.disabled.value }, { ...a } = e, u = { id: l, ref: r.labelRef, onClick: i };
1042
- return fe({ ourProps: u, theirProps: a, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
1089
+ let l = { open: r.comboboxState.value === 0, disabled: r.disabled.value }, { ...a } = e, u = { id: s, ref: r.labelRef, onClick: i };
1090
+ return ve({ ourProps: u, theirProps: a, slot: l, attrs: o, slots: t, name: "ComboboxLabel" });
1043
1091
  };
1044
1092
  } });
1045
- let co = se({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
1046
- var l;
1047
- let r = (l = e.id) != null ? l : `headlessui-combobox-button-${Te()}`, i = ve("ComboboxButton");
1093
+ let Co = ae({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
1094
+ var s;
1095
+ let r = (s = e.id) != null ? s : `headlessui-combobox-button-${Pe()}`, i = he("ComboboxButton");
1048
1096
  n({ el: i.buttonRef, $el: i.buttonRef });
1049
- function s(v) {
1050
- i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (v.preventDefault(), i.openCombobox()), Q(() => {
1097
+ function l(p) {
1098
+ i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (p.preventDefault(), i.openCombobox()), te(() => {
1051
1099
  var c;
1052
- return (c = k(i.inputRef)) == null ? void 0 : c.focus({ preventScroll: !0 });
1100
+ return (c = N(i.inputRef)) == null ? void 0 : c.focus({ preventScroll: !0 });
1053
1101
  }));
1054
1102
  }
1055
- function a(v) {
1056
- switch (v.key) {
1103
+ function a(p) {
1104
+ switch (p.key) {
1057
1105
  case W.ArrowDown:
1058
- v.preventDefault(), v.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(), Q(() => {
1106
+ p.preventDefault(), p.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(), te(() => {
1059
1107
  var c;
1060
1108
  return (c = i.inputRef.value) == null ? void 0 : c.focus({ preventScroll: !0 });
1061
1109
  });
1062
1110
  return;
1063
1111
  case W.ArrowUp:
1064
- v.preventDefault(), v.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(), Q(() => {
1065
- i.value.value || i.goToOption(B.Last);
1066
- })), Q(() => {
1112
+ p.preventDefault(), p.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(), te(() => {
1113
+ i.value.value || i.goToOption(U.Last);
1114
+ })), te(() => {
1067
1115
  var c;
1068
1116
  return (c = i.inputRef.value) == null ? void 0 : c.focus({ preventScroll: !0 });
1069
1117
  });
1070
1118
  return;
1071
1119
  case W.Escape:
1072
1120
  if (i.comboboxState.value !== 0) return;
1073
- v.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && v.stopPropagation(), i.closeCombobox(), Q(() => {
1121
+ p.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && p.stopPropagation(), i.closeCombobox(), te(() => {
1074
1122
  var c;
1075
1123
  return (c = i.inputRef.value) == null ? void 0 : c.focus({ preventScroll: !0 });
1076
1124
  });
1077
1125
  return;
1078
1126
  }
1079
1127
  }
1080
- let u = qn(_(() => ({ as: e.as, type: o.type })), i.buttonRef);
1128
+ let u = co(w(() => ({ as: e.as, type: o.type })), i.buttonRef);
1081
1129
  return () => {
1082
- var v, c;
1083
- let b = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...m } = e, w = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (v = k(i.optionsRef)) == null ? void 0 : v.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(c = k(i.labelRef)) == null ? void 0 : c.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: s };
1084
- return fe({ ourProps: w, theirProps: m, slot: b, attrs: o, slots: t, name: "ComboboxButton" });
1130
+ var p, c;
1131
+ let h = { open: i.comboboxState.value === 0, disabled: i.disabled.value, value: i.value.value }, { ...m } = e, v = { ref: i.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (p = N(i.optionsRef)) == null ? void 0 : p.id, "aria-expanded": i.comboboxState.value === 0, "aria-labelledby": i.labelRef.value ? [(c = N(i.labelRef)) == null ? void 0 : c.id, r].join(" ") : void 0, disabled: i.disabled.value === !0 ? !0 : void 0, onKeydown: a, onClick: l };
1132
+ return ve({ ourProps: v, theirProps: m, slot: h, attrs: o, slots: t, name: "ComboboxButton" });
1085
1133
  };
1086
- } }), fo = se({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e) => !0 }, setup(e, { emit: o, attrs: t, slots: n, expose: l }) {
1134
+ } }), To = ae({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e) => !0 }, setup(e, { emit: o, attrs: t, slots: n, expose: s }) {
1087
1135
  var r;
1088
- let i = (r = e.id) != null ? r : `headlessui-combobox-input-${Te()}`, s = ve("ComboboxInput"), a = _(() => tt(k(s.inputRef))), u = { value: !1 };
1089
- l({ el: s.inputRef, $el: s.inputRef });
1090
- function v() {
1091
- s.change(null);
1092
- let g = k(s.optionsRef);
1093
- g && (g.scrollTop = 0), s.goToOption(B.Nothing);
1094
- }
1095
- let c = _(() => {
1096
- var g;
1097
- let T = s.value.value;
1098
- return k(s.inputRef) ? typeof e.displayValue < "u" && T !== void 0 ? (g = e.displayValue(T)) != null ? g : "" : typeof T == "string" ? T : "" : "";
1136
+ let i = (r = e.id) != null ? r : `headlessui-combobox-input-${Pe()}`, l = he("ComboboxInput"), a = w(() => ot(N(l.inputRef))), u = { value: !1 };
1137
+ s({ el: l.inputRef, $el: l.inputRef });
1138
+ function p() {
1139
+ l.change(null);
1140
+ let y = N(l.optionsRef);
1141
+ y && (y.scrollTop = 0), l.goToOption(U.Nothing);
1142
+ }
1143
+ let c = w(() => {
1144
+ var y;
1145
+ let R = l.value.value;
1146
+ return N(l.inputRef) ? typeof e.displayValue < "u" && R !== void 0 ? (y = e.displayValue(R)) != null ? y : "" : typeof R == "string" ? R : "" : "";
1099
1147
  });
1100
- de(() => {
1101
- j([c, s.comboboxState, a], ([g, T], [h, p]) => {
1148
+ pe(() => {
1149
+ j([c, l.comboboxState, a], ([y, R], [_, b]) => {
1102
1150
  if (u.value) return;
1103
- let C = k(s.inputRef);
1104
- C && ((p === 0 && T === 1 || g !== h) && (C.value = g), requestAnimationFrame(() => {
1151
+ let k = N(l.inputRef);
1152
+ k && ((b === 0 && R === 1 || y !== _) && (k.value = y), requestAnimationFrame(() => {
1105
1153
  var d;
1106
- if (u.value || !C || ((d = a.value) == null ? void 0 : d.activeElement) !== C) return;
1107
- let { selectionStart: f, selectionEnd: y } = C;
1108
- Math.abs((y ?? 0) - (f ?? 0)) === 0 && f === 0 && C.setSelectionRange(C.value.length, C.value.length);
1154
+ if (u.value || !k || ((d = a.value) == null ? void 0 : d.activeElement) !== k) return;
1155
+ let { selectionStart: f, selectionEnd: x } = k;
1156
+ Math.abs((x ?? 0) - (f ?? 0)) === 0 && f === 0 && k.setSelectionRange(k.value.length, k.value.length);
1109
1157
  }));
1110
- }, { immediate: !0 }), j([s.comboboxState], ([g], [T]) => {
1111
- if (g === 0 && T === 1) {
1158
+ }, { immediate: !0 }), j([l.comboboxState], ([y], [R]) => {
1159
+ if (y === 0 && R === 1) {
1112
1160
  if (u.value) return;
1113
- let h = k(s.inputRef);
1114
- if (!h) return;
1115
- let p = h.value, { selectionStart: C, selectionEnd: d, selectionDirection: f } = h;
1116
- h.value = "", h.value = p, f !== null ? h.setSelectionRange(C, d, f) : h.setSelectionRange(C, d);
1161
+ let _ = N(l.inputRef);
1162
+ if (!_) return;
1163
+ let b = _.value, { selectionStart: k, selectionEnd: d, selectionDirection: f } = _;
1164
+ _.value = "", _.value = b, f !== null ? _.setSelectionRange(k, d, f) : _.setSelectionRange(k, d);
1117
1165
  }
1118
1166
  });
1119
1167
  });
1120
- let b = S(!1);
1168
+ let h = E(!1);
1121
1169
  function m() {
1122
- b.value = !0;
1170
+ h.value = !0;
1123
1171
  }
1124
- function w() {
1125
- Le().nextFrame(() => {
1126
- b.value = !1;
1172
+ function v() {
1173
+ Ae().nextFrame(() => {
1174
+ h.value = !1;
1127
1175
  });
1128
1176
  }
1129
- let $ = Rn();
1130
- function M(g) {
1131
- switch (u.value = !0, $(() => {
1177
+ let I = Jn();
1178
+ function V(y) {
1179
+ switch (u.value = !0, I(() => {
1132
1180
  u.value = !1;
1133
- }), g.key) {
1181
+ }), y.key) {
1134
1182
  case W.Enter:
1135
- if (u.value = !1, s.comboboxState.value !== 0 || b.value) return;
1136
- if (g.preventDefault(), g.stopPropagation(), s.activeOptionIndex.value === null) {
1137
- s.closeCombobox();
1183
+ if (u.value = !1, l.comboboxState.value !== 0 || h.value) return;
1184
+ if (y.preventDefault(), y.stopPropagation(), l.activeOptionIndex.value === null) {
1185
+ l.closeCombobox();
1138
1186
  return;
1139
1187
  }
1140
- s.selectActiveOption(), s.mode.value === 0 && s.closeCombobox();
1188
+ l.selectActiveOption(), l.mode.value === 0 && l.closeCombobox();
1141
1189
  break;
1142
1190
  case W.ArrowDown:
1143
- return u.value = !1, g.preventDefault(), g.stopPropagation(), te(s.comboboxState.value, { 0: () => s.goToOption(B.Next), 1: () => s.openCombobox() });
1191
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), se(l.comboboxState.value, { 0: () => l.goToOption(U.Next), 1: () => l.openCombobox() });
1144
1192
  case W.ArrowUp:
1145
- return u.value = !1, g.preventDefault(), g.stopPropagation(), te(s.comboboxState.value, { 0: () => s.goToOption(B.Previous), 1: () => {
1146
- s.openCombobox(), Q(() => {
1147
- s.value.value || s.goToOption(B.Last);
1193
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), se(l.comboboxState.value, { 0: () => l.goToOption(U.Previous), 1: () => {
1194
+ l.openCombobox(), te(() => {
1195
+ l.value.value || l.goToOption(U.Last);
1148
1196
  });
1149
1197
  } });
1150
1198
  case W.Home:
1151
- if (g.shiftKey) break;
1152
- return u.value = !1, g.preventDefault(), g.stopPropagation(), s.goToOption(B.First);
1199
+ if (y.shiftKey) break;
1200
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), l.goToOption(U.First);
1153
1201
  case W.PageUp:
1154
- return u.value = !1, g.preventDefault(), g.stopPropagation(), s.goToOption(B.First);
1202
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), l.goToOption(U.First);
1155
1203
  case W.End:
1156
- if (g.shiftKey) break;
1157
- return u.value = !1, g.preventDefault(), g.stopPropagation(), s.goToOption(B.Last);
1204
+ if (y.shiftKey) break;
1205
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), l.goToOption(U.Last);
1158
1206
  case W.PageDown:
1159
- return u.value = !1, g.preventDefault(), g.stopPropagation(), s.goToOption(B.Last);
1207
+ return u.value = !1, y.preventDefault(), y.stopPropagation(), l.goToOption(U.Last);
1160
1208
  case W.Escape:
1161
- if (u.value = !1, s.comboboxState.value !== 0) return;
1162
- g.preventDefault(), s.optionsRef.value && !s.optionsPropsRef.value.static && g.stopPropagation(), s.nullable.value && s.mode.value === 0 && s.value.value === null && v(), s.closeCombobox();
1209
+ if (u.value = !1, l.comboboxState.value !== 0) return;
1210
+ y.preventDefault(), l.optionsRef.value && !l.optionsPropsRef.value.static && y.stopPropagation(), l.nullable.value && l.mode.value === 0 && l.value.value === null && p(), l.closeCombobox();
1163
1211
  break;
1164
1212
  case W.Tab:
1165
- if (u.value = !1, s.comboboxState.value !== 0) return;
1166
- s.mode.value === 0 && s.activationTrigger.value !== 1 && s.selectActiveOption(), s.closeCombobox();
1213
+ if (u.value = !1, l.comboboxState.value !== 0) return;
1214
+ l.mode.value === 0 && l.activationTrigger.value !== 1 && l.selectActiveOption(), l.closeCombobox();
1167
1215
  break;
1168
1216
  }
1169
1217
  }
1170
- function E(g) {
1171
- o("change", g), s.nullable.value && s.mode.value === 0 && g.target.value === "" && v(), s.openCombobox();
1218
+ function T(y) {
1219
+ o("change", y), l.nullable.value && l.mode.value === 0 && y.target.value === "" && p(), l.openCombobox();
1172
1220
  }
1173
- function O(g) {
1174
- var T, h, p;
1175
- let C = (T = g.relatedTarget) != null ? T : ie.find((d) => d !== g.currentTarget);
1176
- if (u.value = !1, !((h = k(s.optionsRef)) != null && h.contains(C)) && !((p = k(s.buttonRef)) != null && p.contains(C)) && s.comboboxState.value === 0) return g.preventDefault(), s.mode.value === 0 && (s.nullable.value && s.value.value === null ? v() : s.activationTrigger.value !== 1 && s.selectActiveOption()), s.closeCombobox();
1221
+ function C(y) {
1222
+ var R, _, b;
1223
+ let k = (R = y.relatedTarget) != null ? R : ce.find((d) => d !== y.currentTarget);
1224
+ if (u.value = !1, !((_ = N(l.optionsRef)) != null && _.contains(k)) && !((b = N(l.buttonRef)) != null && b.contains(k)) && l.comboboxState.value === 0) return y.preventDefault(), l.mode.value === 0 && (l.nullable.value && l.value.value === null ? p() : l.activationTrigger.value !== 1 && l.selectActiveOption()), l.closeCombobox();
1177
1225
  }
1178
- function D(g) {
1179
- var T, h, p;
1180
- let C = (T = g.relatedTarget) != null ? T : ie.find((d) => d !== g.currentTarget);
1181
- (h = k(s.buttonRef)) != null && h.contains(C) || (p = k(s.optionsRef)) != null && p.contains(C) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), Le().nextFrame(() => {
1182
- s.setActivationTrigger(1);
1226
+ function L(y) {
1227
+ var R, _, b;
1228
+ let k = (R = y.relatedTarget) != null ? R : ce.find((d) => d !== y.currentTarget);
1229
+ (_ = N(l.buttonRef)) != null && _.contains(k) || (b = N(l.optionsRef)) != null && b.contains(k) || l.disabled.value || l.immediate.value && l.comboboxState.value !== 0 && (l.openCombobox(), Ae().nextFrame(() => {
1230
+ l.setActivationTrigger(1);
1183
1231
  }));
1184
1232
  }
1185
- let A = _(() => {
1186
- var g, T, h, p;
1187
- return (p = (h = (T = e.defaultValue) != null ? T : s.defaultValue.value !== void 0 ? (g = e.displayValue) == null ? void 0 : g.call(e, s.defaultValue.value) : null) != null ? h : s.defaultValue.value) != null ? p : "";
1233
+ let M = w(() => {
1234
+ var y, R, _, b;
1235
+ return (b = (_ = (R = e.defaultValue) != null ? R : l.defaultValue.value !== void 0 ? (y = e.displayValue) == null ? void 0 : y.call(e, l.defaultValue.value) : null) != null ? _ : l.defaultValue.value) != null ? b : "";
1188
1236
  });
1189
1237
  return () => {
1190
- var g, T, h, p, C, d, f;
1191
- let y = { open: s.comboboxState.value === 0 }, { displayValue: x, onChange: N, ...L } = e, G = { "aria-controls": (g = s.optionsRef.value) == null ? void 0 : g.id, "aria-expanded": s.comboboxState.value === 0, "aria-activedescendant": s.activeOptionIndex.value === null ? void 0 : s.virtual.value ? (T = s.options.value.find((q) => !s.virtual.value.disabled(q.dataRef.value) && s.compare(q.dataRef.value, s.virtual.value.options[s.activeOptionIndex.value]))) == null ? void 0 : T.id : (h = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : h.id, "aria-labelledby": (d = (p = k(s.labelRef)) == null ? void 0 : p.id) != null ? d : (C = k(s.buttonRef)) == null ? void 0 : C.id, "aria-autocomplete": "list", id: i, onCompositionstart: m, onCompositionend: w, onKeydown: M, onInput: E, onFocus: D, onBlur: O, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: A.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
1192
- return fe({ ourProps: G, theirProps: L, slot: y, attrs: t, slots: n, features: Ee.RenderStrategy | Ee.Static, name: "ComboboxInput" });
1238
+ var y, R, _, b, k, d, f;
1239
+ let x = { open: l.comboboxState.value === 0 }, { displayValue: O, onChange: D, ...A } = e, q = { "aria-controls": (y = l.optionsRef.value) == null ? void 0 : y.id, "aria-expanded": l.comboboxState.value === 0, "aria-activedescendant": l.activeOptionIndex.value === null ? void 0 : l.virtual.value ? (R = l.options.value.find((J) => !l.virtual.value.disabled(J.dataRef.value) && l.compare(J.dataRef.value, l.virtual.value.options[l.activeOptionIndex.value]))) == null ? void 0 : R.id : (_ = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : _.id, "aria-labelledby": (d = (b = N(l.labelRef)) == null ? void 0 : b.id) != null ? d : (k = N(l.buttonRef)) == null ? void 0 : k.id, "aria-autocomplete": "list", id: i, onCompositionstart: m, onCompositionend: v, onKeydown: V, onInput: T, onFocus: L, onBlur: C, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: l.inputRef, defaultValue: M.value, disabled: l.disabled.value === !0 ? !0 : void 0 };
1240
+ return ve({ ourProps: q, theirProps: A, slot: x, attrs: t, slots: n, features: $e.RenderStrategy | $e.Static, name: "ComboboxInput" });
1193
1241
  };
1194
- } }), vo = se({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: o, slots: t, expose: n }) {
1195
- let l = ve("ComboboxOptions"), r = `headlessui-combobox-options-${Te()}`;
1196
- n({ el: l.optionsRef, $el: l.optionsRef }), le(() => {
1197
- l.optionsPropsRef.value.static = e.static;
1198
- }), le(() => {
1199
- l.optionsPropsRef.value.hold = e.hold;
1242
+ } }), Po = ae({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: o, slots: t, expose: n }) {
1243
+ let s = he("ComboboxOptions"), r = `headlessui-combobox-options-${Pe()}`;
1244
+ n({ el: s.optionsRef, $el: s.optionsRef }), ie(() => {
1245
+ s.optionsPropsRef.value.static = e.static;
1246
+ }), ie(() => {
1247
+ s.optionsPropsRef.value.hold = e.hold;
1200
1248
  });
1201
- let i = eo(), s = _(() => i !== null ? (i.value & Ie.Open) === Ie.Open : l.comboboxState.value === 0);
1202
- Kn({ container: _(() => k(l.optionsRef)), enabled: _(() => l.comboboxState.value === 0), accept(u) {
1249
+ let i = bo(), l = w(() => i !== null ? (i.value & Ie.Open) === Ie.Open : s.comboboxState.value === 0);
1250
+ po({ container: w(() => N(s.optionsRef)), enabled: w(() => s.comboboxState.value === 0), accept(u) {
1203
1251
  return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
1204
1252
  }, walk(u) {
1205
1253
  u.setAttribute("role", "none");
@@ -1208,75 +1256,105 @@ let co = se({ name: "ComboboxButton", props: { as: { type: [Object, String], def
1208
1256
  u.preventDefault();
1209
1257
  }
1210
1258
  return () => {
1211
- var u, v, c;
1212
- let b = { open: l.comboboxState.value === 0 }, m = { "aria-labelledby": (c = (u = k(l.labelRef)) == null ? void 0 : u.id) != null ? c : (v = k(l.buttonRef)) == null ? void 0 : v.id, id: r, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: a }, w = je(e, ["hold"]);
1213
- return fe({ ourProps: m, theirProps: w, slot: b, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Oe(ao, {}, t.default)] } : t, features: Ee.RenderStrategy | Ee.Static, visible: s.value, name: "ComboboxOptions" });
1259
+ var u, p, c;
1260
+ let h = { open: s.comboboxState.value === 0 }, m = { "aria-labelledby": (c = (u = N(s.labelRef)) == null ? void 0 : u.id) != null ? c : (p = N(s.buttonRef)) == null ? void 0 : p.id, id: r, ref: s.optionsRef, role: "listbox", "aria-multiselectable": s.mode.value === 1 ? !0 : void 0, onMousedown: a }, v = Fe(e, ["hold"]);
1261
+ return ve({ ourProps: m, theirProps: v, slot: h, attrs: o, slots: s.virtual.value && s.comboboxState.value === 0 ? { ...t, default: () => [Oe($o, {}, t.default)] } : t, features: $e.RenderStrategy | $e.Static, visible: l.value, name: "ComboboxOptions" });
1214
1262
  };
1215
- } }), po = se({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(e, { slots: o, attrs: t, expose: n }) {
1216
- let l = ve("ComboboxOption"), r = `headlessui-combobox-option-${Te()}`, i = S(null), s = _(() => e.disabled);
1263
+ } }), ko = ae({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(e, { slots: o, attrs: t, expose: n }) {
1264
+ let s = he("ComboboxOption"), r = `headlessui-combobox-option-${Pe()}`, i = E(null), l = w(() => e.disabled);
1217
1265
  n({ el: i, $el: i });
1218
- let a = _(() => {
1219
- var O;
1220
- return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((O = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : O.id) === r;
1221
- }), u = _(() => l.isSelected(e.value)), v = Ce(Bt, null), c = _(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: _(() => e.order) }));
1222
- de(() => l.registerOption(r, c)), St(() => l.unregisterOption(r, a.value)), le(() => {
1223
- let O = k(i);
1224
- O && (v == null || v.value.measureElement(O));
1225
- }), le(() => {
1226
- l.comboboxState.value === 0 && a.value && (l.virtual.value || l.activationTrigger.value !== 0 && Q(() => {
1227
- var O, D;
1228
- return (D = (O = k(i)) == null ? void 0 : O.scrollIntoView) == null ? void 0 : D.call(O, { block: "nearest" });
1266
+ let a = w(() => {
1267
+ var C;
1268
+ return s.virtual.value ? s.activeOptionIndex.value === s.calculateIndex(e.value) : s.activeOptionIndex.value === null ? !1 : ((C = s.options.value[s.activeOptionIndex.value]) == null ? void 0 : C.id) === r;
1269
+ }), u = w(() => s.isSelected(e.value)), p = Te(Ut, null), c = w(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: w(() => e.order) }));
1270
+ pe(() => s.registerOption(r, c)), St(() => s.unregisterOption(r, a.value)), ie(() => {
1271
+ let C = N(i);
1272
+ C && (p == null || p.value.measureElement(C));
1273
+ }), ie(() => {
1274
+ s.comboboxState.value === 0 && a.value && (s.virtual.value || s.activationTrigger.value !== 0 && te(() => {
1275
+ var C, L;
1276
+ return (L = (C = N(i)) == null ? void 0 : C.scrollIntoView) == null ? void 0 : L.call(C, { block: "nearest" });
1229
1277
  }));
1230
1278
  });
1231
- function b(O) {
1232
- O.preventDefault(), O.button === Mt.Left && (s.value || (l.selectOption(r), kt() || requestAnimationFrame(() => {
1233
- var D;
1234
- return (D = k(l.inputRef)) == null ? void 0 : D.focus({ preventScroll: !0 });
1235
- }), l.mode.value === 0 && l.closeCombobox()));
1279
+ function h(C) {
1280
+ C.preventDefault(), C.button === Mt.Left && (l.value || (s.selectOption(r), Nt() || requestAnimationFrame(() => {
1281
+ var L;
1282
+ return (L = N(s.inputRef)) == null ? void 0 : L.focus({ preventScroll: !0 });
1283
+ }), s.mode.value === 0 && s.closeCombobox()));
1236
1284
  }
1237
1285
  function m() {
1238
- var O;
1239
- if (e.disabled || (O = l.virtual.value) != null && O.disabled(e.value)) return l.goToOption(B.Nothing);
1240
- let D = l.calculateIndex(e.value);
1241
- l.goToOption(B.Specific, D);
1286
+ var C;
1287
+ if (e.disabled || (C = s.virtual.value) != null && C.disabled(e.value)) return s.goToOption(U.Nothing);
1288
+ let L = s.calculateIndex(e.value);
1289
+ s.goToOption(U.Specific, L);
1242
1290
  }
1243
- let w = Jn();
1244
- function $(O) {
1245
- w.update(O);
1291
+ let v = fo();
1292
+ function I(C) {
1293
+ v.update(C);
1246
1294
  }
1247
- function M(O) {
1248
- var D;
1249
- if (!w.wasMoved(O) || e.disabled || (D = l.virtual.value) != null && D.disabled(e.value) || a.value) return;
1250
- let A = l.calculateIndex(e.value);
1251
- l.goToOption(B.Specific, A, 0);
1295
+ function V(C) {
1296
+ var L;
1297
+ if (!v.wasMoved(C) || e.disabled || (L = s.virtual.value) != null && L.disabled(e.value) || a.value) return;
1298
+ let M = s.calculateIndex(e.value);
1299
+ s.goToOption(U.Specific, M, 0);
1252
1300
  }
1253
- function E(O) {
1254
- var D;
1255
- w.wasMoved(O) && (e.disabled || (D = l.virtual.value) != null && D.disabled(e.value) || a.value && (l.optionsPropsRef.value.hold || l.goToOption(B.Nothing)));
1301
+ function T(C) {
1302
+ var L;
1303
+ v.wasMoved(C) && (e.disabled || (L = s.virtual.value) != null && L.disabled(e.value) || a.value && (s.optionsPropsRef.value.hold || s.goToOption(U.Nothing)));
1256
1304
  }
1257
1305
  return () => {
1258
- let { disabled: O } = e, D = { active: a.value, selected: u.value, disabled: O }, A = { id: r, ref: i, role: "option", tabIndex: O === !0 ? void 0 : -1, "aria-disabled": O === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: b, onFocus: m, onPointerenter: $, onMouseenter: $, onPointermove: M, onMousemove: M, onPointerleave: E, onMouseleave: E }, g = je(e, ["order", "value"]);
1259
- return fe({ ourProps: A, theirProps: g, slot: D, attrs: t, slots: o, name: "ComboboxOption" });
1306
+ let { disabled: C } = e, L = { active: a.value, selected: u.value, disabled: C }, M = { id: r, ref: i, role: "option", tabIndex: C === !0 ? void 0 : -1, "aria-disabled": C === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: h, onFocus: m, onPointerenter: I, onMouseenter: I, onPointermove: V, onMousemove: V, onPointerleave: T, onMouseleave: T }, y = Fe(e, ["order", "value"]);
1307
+ return ve({ ourProps: M, theirProps: y, slot: L, attrs: t, slots: o, name: "ComboboxOption" });
1260
1308
  };
1261
1309
  } });
1262
- function ho(e, o) {
1263
- return P(), V("svg", {
1310
+ function Ro(e, o) {
1311
+ return S(), $("svg", {
1312
+ xmlns: "http://www.w3.org/2000/svg",
1313
+ viewBox: "0 0 20 20",
1314
+ fill: "currentColor",
1315
+ "aria-hidden": "true",
1316
+ "data-slot": "icon"
1317
+ }, [
1318
+ g("path", {
1319
+ "fill-rule": "evenodd",
1320
+ d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
1321
+ "clip-rule": "evenodd"
1322
+ })
1323
+ ]);
1324
+ }
1325
+ function No(e, o) {
1326
+ return S(), $("svg", {
1264
1327
  xmlns: "http://www.w3.org/2000/svg",
1265
1328
  viewBox: "0 0 20 20",
1266
1329
  fill: "currentColor",
1267
1330
  "aria-hidden": "true",
1268
1331
  "data-slot": "icon"
1269
1332
  }, [
1270
- I("path", {
1333
+ g("path", {
1271
1334
  "fill-rule": "evenodd",
1272
1335
  d: "M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z",
1273
1336
  "clip-rule": "evenodd"
1274
1337
  })
1275
1338
  ]);
1276
1339
  }
1340
+ function Do(e, o) {
1341
+ return S(), $("svg", {
1342
+ xmlns: "http://www.w3.org/2000/svg",
1343
+ viewBox: "0 0 20 20",
1344
+ fill: "currentColor",
1345
+ "aria-hidden": "true",
1346
+ "data-slot": "icon"
1347
+ }, [
1348
+ g("path", {
1349
+ "fill-rule": "evenodd",
1350
+ d: "M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",
1351
+ "clip-rule": "evenodd"
1352
+ })
1353
+ ]);
1354
+ }
1277
1355
  const ht = {
1278
1356
  __name: "Select",
1279
- props: /* @__PURE__ */ un({
1357
+ props: /* @__PURE__ */ dn({
1280
1358
  languages: {
1281
1359
  type: Object,
1282
1360
  required: !0
@@ -1287,53 +1365,54 @@ const ht = {
1287
1365
  }),
1288
1366
  emits: ["update:modelValue"],
1289
1367
  setup(e) {
1290
- const o = e, t = cn(e, "modelValue"), n = S(""), l = S(null), r = _(() => Object.entries(o.languages).filter(
1291
- ([, s]) => s.toLowerCase().includes(n.value.toLowerCase())
1292
- )), i = (s) => {
1293
- s.target.value = "", n.value = "", l.value && l.value.$el.click();
1368
+ const o = e, t = fn(e, "modelValue"), n = E(""), s = E(null), r = w(() => Object.entries(o.languages).filter(
1369
+ ([, l]) => l.toLowerCase().includes(n.value.toLowerCase())
1370
+ )), i = (l) => {
1371
+ l.target.value = "", n.value = "", s.value && s.value.$el.click();
1294
1372
  };
1295
- return (s, a) => (P(), xe(R(uo), {
1373
+ return (l, a) => (S(), Z(P(Io), {
1296
1374
  modelValue: t.value,
1297
- "onUpdate:modelValue": a[2] || (a[2] = (u) => t.value = u),
1375
+ "onUpdate:modelValue": a[3] || (a[3] = (u) => t.value = u),
1298
1376
  as: "div",
1299
1377
  class: "relative mt-1"
1300
1378
  }, {
1301
- default: Pe(() => [
1302
- H(R(fo), {
1303
- class: "w-full border border-gray-300 rounded-md py-2 pl-3 pr-10 text-sm leading-5 focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500",
1379
+ default: ke(() => [
1380
+ z(P(To), {
1381
+ class: "w-full bg-white border border-gray-300 rounded py-2.5 pl-3 pr-10 text-sm text-gray-800 font-medium focus:outline-none focus:ring-0.5 focus:ring-gray-400 focus:border-gray-400",
1304
1382
  onChange: a[0] || (a[0] = (u) => n.value = u.target.value),
1305
1383
  displayValue: (u) => e.languages[u],
1306
1384
  onFocus: a[1] || (a[1] = (u) => i(u))
1307
1385
  }, null, 8, ["displayValue"]),
1308
- H(R(co), {
1386
+ z(P(Co), {
1309
1387
  ref_key: "btnSelect",
1310
- ref: l,
1388
+ ref: s,
1311
1389
  class: "absolute inset-y-0 right-0 flex items-center pr-2"
1312
1390
  }, {
1313
- default: Pe(() => [
1314
- H(R(ho), {
1391
+ default: ke(() => [
1392
+ z(P(No), {
1315
1393
  class: "h-5 w-5 text-gray-400",
1316
- "aria-hidden": "true"
1394
+ "aria-hidden": "true",
1395
+ onClick: a[2] || (a[2] = (u) => i(u))
1317
1396
  })
1318
1397
  ]),
1319
1398
  _: 1
1320
1399
  }, 512),
1321
- H(R(vo), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50" }, {
1322
- default: Pe(() => [
1323
- (P(!0), V(X, null, ge(r.value, ([u, v]) => (P(), xe(R(po), {
1400
+ z(P(Po), { class: "absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm z-50" }, {
1401
+ default: ke(() => [
1402
+ (S(!0), $(G, null, le(r.value, ([u, p]) => (S(), Z(P(ko), {
1324
1403
  key: u,
1325
1404
  value: u
1326
1405
  }, {
1327
- default: Pe(({ active: c, selected: b }) => [
1328
- I("li", {
1329
- class: it([
1406
+ default: ke(({ active: c, selected: h }) => [
1407
+ g("li", {
1408
+ class: ye([
1330
1409
  "relative cursor-default select-none py-2 pl-3 pr-9",
1331
- c ? "bg-[#3B5695] text-white" : "text-gray-900"
1410
+ c ? "bg-[#3B5695] text-white" : "text-textCustom"
1332
1411
  ])
1333
1412
  }, [
1334
- I("span", {
1335
- class: it(["block truncate", b && "font-semibold"])
1336
- }, ne(v), 3)
1413
+ g("span", {
1414
+ class: ye(["block truncate", h && "font-semibold"])
1415
+ }, ee(p), 3)
1337
1416
  ], 2)
1338
1417
  ]),
1339
1418
  _: 2
@@ -1345,37 +1424,19 @@ const ht = {
1345
1424
  _: 1
1346
1425
  }, 8, ["modelValue"]));
1347
1426
  }
1348
- }, mo = { key: 0 }, go = /* @__PURE__ */ I("svg", {
1349
- xmlns: "http://www.w3.org/2000/svg",
1350
- class: "h-6 w-6",
1351
- fill: "none",
1352
- viewBox: "0 0 24 24",
1353
- stroke: "currentColor"
1354
- }, [
1355
- /* @__PURE__ */ I("path", {
1356
- "stroke-linecap": "round",
1357
- "stroke-linejoin": "round",
1358
- "stroke-width": "2",
1359
- d: "M13 7l5 5m0 0l-5 5m5-5H6"
1360
- })
1361
- ], -1), bo = [
1362
- go
1363
- ], yo = /* @__PURE__ */ I("svg", {
1364
- xmlns: "http://www.w3.org/2000/svg",
1365
- class: "h-6 w-6",
1366
- fill: "none",
1367
- viewBox: "0 0 24 24",
1368
- stroke: "currentColor"
1369
- }, [
1370
- /* @__PURE__ */ I("path", {
1371
- "stroke-linecap": "round",
1372
- "stroke-linejoin": "round",
1373
- "stroke-width": "2",
1374
- d: "M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"
1375
- })
1376
- ], -1), _o = [
1377
- yo
1378
- ], wo = {
1427
+ }, Ht = "/assets/icons/transfer.svg", Lo = { key: 0 }, Vo = /* @__PURE__ */ g("img", {
1428
+ src: Ht,
1429
+ alt: "swap",
1430
+ class: "w-4"
1431
+ }, null, -1), Ao = [
1432
+ Vo
1433
+ ], Mo = /* @__PURE__ */ g("img", {
1434
+ src: Ht,
1435
+ alt: "swap",
1436
+ class: "w-4"
1437
+ }, null, -1), jo = [
1438
+ Mo
1439
+ ], Fo = {
1379
1440
  __name: "SwapBtn",
1380
1441
  props: {
1381
1442
  isBidirect: {
@@ -1386,52 +1447,52 @@ const ht = {
1386
1447
  emits: ["swap"],
1387
1448
  setup(e, { emit: o }) {
1388
1449
  const t = o;
1389
- return (n, l) => e.isBidirect ? (P(), V("button", {
1450
+ return (n, s) => e.isBidirect ? (S(), $("button", {
1390
1451
  key: 1,
1391
- onClick: l[0] || (l[0] = (r) => t("swap"))
1392
- }, _o)) : (P(), V("button", mo, bo));
1452
+ onClick: s[0] || (s[0] = (r) => t("swap"))
1453
+ }, jo)) : (S(), $("button", Lo, Ao));
1393
1454
  }
1394
1455
  };
1395
- var Ut = !1;
1396
- function ke(e, o, t) {
1456
+ var Wt = !1;
1457
+ function Ne(e, o, t) {
1397
1458
  return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
1398
1459
  }
1399
- function We(e, o) {
1460
+ function Je(e, o) {
1400
1461
  if (Array.isArray(e)) {
1401
1462
  e.splice(o, 1);
1402
1463
  return;
1403
1464
  }
1404
1465
  delete e[o];
1405
1466
  }
1406
- function xo() {
1407
- return Ht().__VUE_DEVTOOLS_GLOBAL_HOOK__;
1467
+ function Bo() {
1468
+ return Gt().__VUE_DEVTOOLS_GLOBAL_HOOK__;
1408
1469
  }
1409
- function Ht() {
1470
+ function Gt() {
1410
1471
  return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
1411
1472
  }
1412
- const So = typeof Proxy == "function", Oo = "devtools-plugin:setup", Eo = "plugin:settings:set";
1413
- let pe, Ge;
1414
- function Io() {
1473
+ const zo = typeof Proxy == "function", Uo = "devtools-plugin:setup", Ho = "plugin:settings:set";
1474
+ let ge, Ke;
1475
+ function Wo() {
1415
1476
  var e;
1416
- return pe !== void 0 || (typeof window < "u" && window.performance ? (pe = !0, Ge = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (pe = !0, Ge = globalThis.perf_hooks.performance) : pe = !1), pe;
1477
+ return ge !== void 0 || (typeof window < "u" && window.performance ? (ge = !0, Ke = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ge = !0, Ke = globalThis.perf_hooks.performance) : ge = !1), ge;
1417
1478
  }
1418
- function $o() {
1419
- return Io() ? Ge.now() : Date.now();
1479
+ function Go() {
1480
+ return Wo() ? Ke.now() : Date.now();
1420
1481
  }
1421
- class Co {
1482
+ class qo {
1422
1483
  constructor(o, t) {
1423
1484
  this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = o, this.hook = t;
1424
1485
  const n = {};
1425
1486
  if (o.settings)
1426
1487
  for (const i in o.settings) {
1427
- const s = o.settings[i];
1428
- n[i] = s.defaultValue;
1488
+ const l = o.settings[i];
1489
+ n[i] = l.defaultValue;
1429
1490
  }
1430
- const l = `__vue-devtools-plugin-settings__${o.id}`;
1491
+ const s = `__vue-devtools-plugin-settings__${o.id}`;
1431
1492
  let r = Object.assign({}, n);
1432
1493
  try {
1433
- const i = localStorage.getItem(l), s = JSON.parse(i);
1434
- Object.assign(r, s);
1494
+ const i = localStorage.getItem(s), l = JSON.parse(i);
1495
+ Object.assign(r, l);
1435
1496
  } catch {
1436
1497
  }
1437
1498
  this.fallbacks = {
@@ -1440,32 +1501,32 @@ class Co {
1440
1501
  },
1441
1502
  setSettings(i) {
1442
1503
  try {
1443
- localStorage.setItem(l, JSON.stringify(i));
1504
+ localStorage.setItem(s, JSON.stringify(i));
1444
1505
  } catch {
1445
1506
  }
1446
1507
  r = i;
1447
1508
  },
1448
1509
  now() {
1449
- return $o();
1510
+ return Go();
1450
1511
  }
1451
- }, t && t.on(Eo, (i, s) => {
1452
- i === this.plugin.id && this.fallbacks.setSettings(s);
1512
+ }, t && t.on(Ho, (i, l) => {
1513
+ i === this.plugin.id && this.fallbacks.setSettings(l);
1453
1514
  }), this.proxiedOn = new Proxy({}, {
1454
- get: (i, s) => this.target ? this.target.on[s] : (...a) => {
1515
+ get: (i, l) => this.target ? this.target.on[l] : (...a) => {
1455
1516
  this.onQueue.push({
1456
- method: s,
1517
+ method: l,
1457
1518
  args: a
1458
1519
  });
1459
1520
  }
1460
1521
  }), this.proxiedTarget = new Proxy({}, {
1461
- get: (i, s) => this.target ? this.target[s] : s === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(s) ? (...a) => (this.targetQueue.push({
1462
- method: s,
1522
+ get: (i, l) => this.target ? this.target[l] : l === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(l) ? (...a) => (this.targetQueue.push({
1523
+ method: l,
1463
1524
  args: a,
1464
1525
  resolve: () => {
1465
1526
  }
1466
- }), this.fallbacks[s](...a)) : (...a) => new Promise((u) => {
1527
+ }), this.fallbacks[l](...a)) : (...a) => new Promise((u) => {
1467
1528
  this.targetQueue.push({
1468
- method: s,
1529
+ method: l,
1469
1530
  args: a,
1470
1531
  resolve: u
1471
1532
  });
@@ -1480,12 +1541,12 @@ class Co {
1480
1541
  t.resolve(await this.target[t.method](...t.args));
1481
1542
  }
1482
1543
  }
1483
- function Wt(e, o) {
1484
- const t = e, n = Ht(), l = xo(), r = So && t.enableEarlyProxy;
1485
- if (l && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r))
1486
- l.emit(Oo, e, o);
1544
+ function qt(e, o) {
1545
+ const t = e, n = Gt(), s = Bo(), r = zo && t.enableEarlyProxy;
1546
+ if (s && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !r))
1547
+ s.emit(Uo, e, o);
1487
1548
  else {
1488
- const i = r ? new Co(t, l) : null;
1549
+ const i = r ? new qo(t, s) : null;
1489
1550
  (n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
1490
1551
  pluginDescriptor: t,
1491
1552
  setupFn: o,
@@ -1498,31 +1559,31 @@ function Wt(e, o) {
1498
1559
  * (c) 2023 Eduardo San Martin Morote
1499
1560
  * @license MIT
1500
1561
  */
1501
- let we;
1502
- const $e = (e) => we = e, Gt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
1562
+ let Se;
1563
+ const Ce = (e) => Se = e, Jt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
1503
1564
  /* istanbul ignore next */
1504
1565
  Symbol()
1505
1566
  );
1506
- function ce(e) {
1567
+ function fe(e) {
1507
1568
  return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
1508
1569
  }
1509
- var Z;
1570
+ var ne;
1510
1571
  (function(e) {
1511
1572
  e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
1512
- })(Z || (Z = {}));
1513
- const Fe = typeof window < "u", Se = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Fe, mt = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
1514
- function To(e, { autoBom: o = !1 } = {}) {
1573
+ })(ne || (ne = {}));
1574
+ const Be = typeof window < "u", Ee = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Be, mt = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
1575
+ function Jo(e, { autoBom: o = !1 } = {}) {
1515
1576
  return o && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
1516
1577
  }
1517
- function nt(e, o, t) {
1578
+ function st(e, o, t) {
1518
1579
  const n = new XMLHttpRequest();
1519
1580
  n.open("GET", e), n.responseType = "blob", n.onload = function() {
1520
- Kt(n.response, o, t);
1581
+ Qt(n.response, o, t);
1521
1582
  }, n.onerror = function() {
1522
1583
  console.error("could not download file");
1523
1584
  }, n.send();
1524
1585
  }
1525
- function qt(e) {
1586
+ function Kt(e) {
1526
1587
  const o = new XMLHttpRequest();
1527
1588
  o.open("HEAD", e, !1);
1528
1589
  try {
@@ -1531,7 +1592,7 @@ function qt(e) {
1531
1592
  }
1532
1593
  return o.status >= 200 && o.status <= 299;
1533
1594
  }
1534
- function Ne(e) {
1595
+ function De(e) {
1535
1596
  try {
1536
1597
  e.dispatchEvent(new MouseEvent("click"));
1537
1598
  } catch {
@@ -1539,152 +1600,152 @@ function Ne(e) {
1539
1600
  t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
1540
1601
  }
1541
1602
  }
1542
- const Ve = typeof navigator == "object" ? navigator : { userAgent: "" }, Jt = /Macintosh/.test(Ve.userAgent) && /AppleWebKit/.test(Ve.userAgent) && !/Safari/.test(Ve.userAgent), Kt = Fe ? (
1603
+ const Le = typeof navigator == "object" ? navigator : { userAgent: "" }, Yt = /Macintosh/.test(Le.userAgent) && /AppleWebKit/.test(Le.userAgent) && !/Safari/.test(Le.userAgent), Qt = Be ? (
1543
1604
  // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
1544
- typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Jt ? Po : (
1605
+ typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Yt ? Ko : (
1545
1606
  // Use msSaveOrOpenBlob as a second approach
1546
- "msSaveOrOpenBlob" in Ve ? Ro : (
1607
+ "msSaveOrOpenBlob" in Le ? Yo : (
1547
1608
  // Fallback to using FileReader and a popup
1548
- ko
1609
+ Qo
1549
1610
  )
1550
1611
  )
1551
1612
  ) : () => {
1552
1613
  };
1553
- function Po(e, o = "download", t) {
1614
+ function Ko(e, o = "download", t) {
1554
1615
  const n = document.createElement("a");
1555
- n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? qt(n.href) ? nt(e, o, t) : (n.target = "_blank", Ne(n)) : Ne(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
1616
+ n.download = o, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Kt(n.href) ? st(e, o, t) : (n.target = "_blank", De(n)) : De(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
1556
1617
  URL.revokeObjectURL(n.href);
1557
1618
  }, 4e4), setTimeout(function() {
1558
- Ne(n);
1619
+ De(n);
1559
1620
  }, 0));
1560
1621
  }
1561
- function Ro(e, o = "download", t) {
1622
+ function Yo(e, o = "download", t) {
1562
1623
  if (typeof e == "string")
1563
- if (qt(e))
1564
- nt(e, o, t);
1624
+ if (Kt(e))
1625
+ st(e, o, t);
1565
1626
  else {
1566
1627
  const n = document.createElement("a");
1567
1628
  n.href = e, n.target = "_blank", setTimeout(function() {
1568
- Ne(n);
1629
+ De(n);
1569
1630
  });
1570
1631
  }
1571
1632
  else
1572
- navigator.msSaveOrOpenBlob(To(e, t), o);
1633
+ navigator.msSaveOrOpenBlob(Jo(e, t), o);
1573
1634
  }
1574
- function ko(e, o, t, n) {
1635
+ function Qo(e, o, t, n) {
1575
1636
  if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
1576
- return nt(e, o, t);
1577
- const l = e.type === "application/octet-stream", r = /constructor/i.test(String(mt.HTMLElement)) || "safari" in mt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
1578
- if ((i || l && r || Jt) && typeof FileReader < "u") {
1579
- const s = new FileReader();
1580
- s.onloadend = function() {
1581
- let a = s.result;
1637
+ return st(e, o, t);
1638
+ const s = e.type === "application/octet-stream", r = /constructor/i.test(String(mt.HTMLElement)) || "safari" in mt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
1639
+ if ((i || s && r || Yt) && typeof FileReader < "u") {
1640
+ const l = new FileReader();
1641
+ l.onloadend = function() {
1642
+ let a = l.result;
1582
1643
  if (typeof a != "string")
1583
1644
  throw n = null, new Error("Wrong reader.result type");
1584
1645
  a = i ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location.assign(a), n = null;
1585
- }, s.readAsDataURL(e);
1646
+ }, l.readAsDataURL(e);
1586
1647
  } else {
1587
- const s = URL.createObjectURL(e);
1588
- n ? n.location.assign(s) : location.href = s, n = null, setTimeout(function() {
1589
- URL.revokeObjectURL(s);
1648
+ const l = URL.createObjectURL(e);
1649
+ n ? n.location.assign(l) : location.href = l, n = null, setTimeout(function() {
1650
+ URL.revokeObjectURL(l);
1590
1651
  }, 4e4);
1591
1652
  }
1592
1653
  }
1593
- function z(e, o) {
1654
+ function B(e, o) {
1594
1655
  const t = "🍍 " + e;
1595
1656
  typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
1596
1657
  }
1597
- function ot(e) {
1658
+ function lt(e) {
1598
1659
  return "_a" in e && "install" in e;
1599
1660
  }
1600
- function Yt() {
1661
+ function Xt() {
1601
1662
  if (!("clipboard" in navigator))
1602
- return z("Your browser doesn't support the Clipboard API", "error"), !0;
1663
+ return B("Your browser doesn't support the Clipboard API", "error"), !0;
1603
1664
  }
1604
- function Qt(e) {
1605
- return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (z('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
1665
+ function Zt(e) {
1666
+ return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
1606
1667
  }
1607
- async function No(e) {
1608
- if (!Yt())
1668
+ async function Xo(e) {
1669
+ if (!Xt())
1609
1670
  try {
1610
- await navigator.clipboard.writeText(JSON.stringify(e.state.value)), z("Global state copied to clipboard.");
1671
+ await navigator.clipboard.writeText(JSON.stringify(e.state.value)), B("Global state copied to clipboard.");
1611
1672
  } catch (o) {
1612
- if (Qt(o))
1673
+ if (Zt(o))
1613
1674
  return;
1614
- z("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
1675
+ B("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
1615
1676
  }
1616
1677
  }
1617
- async function Vo(e) {
1618
- if (!Yt())
1678
+ async function Zo(e) {
1679
+ if (!Xt())
1619
1680
  try {
1620
- Zt(e, JSON.parse(await navigator.clipboard.readText())), z("Global state pasted from clipboard.");
1681
+ en(e, JSON.parse(await navigator.clipboard.readText())), B("Global state pasted from clipboard.");
1621
1682
  } catch (o) {
1622
- if (Qt(o))
1683
+ if (Zt(o))
1623
1684
  return;
1624
- z("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
1685
+ B("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
1625
1686
  }
1626
1687
  }
1627
- async function Do(e) {
1688
+ async function es(e) {
1628
1689
  try {
1629
- Kt(new Blob([JSON.stringify(e.state.value)], {
1690
+ Qt(new Blob([JSON.stringify(e.state.value)], {
1630
1691
  type: "text/plain;charset=utf-8"
1631
1692
  }), "pinia-state.json");
1632
1693
  } catch (o) {
1633
- z("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(o);
1694
+ B("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(o);
1634
1695
  }
1635
1696
  }
1636
- let ee;
1637
- function Lo() {
1638
- ee || (ee = document.createElement("input"), ee.type = "file", ee.accept = ".json");
1697
+ let oe;
1698
+ function ts() {
1699
+ oe || (oe = document.createElement("input"), oe.type = "file", oe.accept = ".json");
1639
1700
  function e() {
1640
1701
  return new Promise((o, t) => {
1641
- ee.onchange = async () => {
1642
- const n = ee.files;
1702
+ oe.onchange = async () => {
1703
+ const n = oe.files;
1643
1704
  if (!n)
1644
1705
  return o(null);
1645
- const l = n.item(0);
1646
- return o(l ? { text: await l.text(), file: l } : null);
1647
- }, ee.oncancel = () => o(null), ee.onerror = t, ee.click();
1706
+ const s = n.item(0);
1707
+ return o(s ? { text: await s.text(), file: s } : null);
1708
+ }, oe.oncancel = () => o(null), oe.onerror = t, oe.click();
1648
1709
  });
1649
1710
  }
1650
1711
  return e;
1651
1712
  }
1652
- async function Mo(e) {
1713
+ async function ns(e) {
1653
1714
  try {
1654
- const t = await Lo()();
1715
+ const t = await ts()();
1655
1716
  if (!t)
1656
1717
  return;
1657
- const { text: n, file: l } = t;
1658
- Zt(e, JSON.parse(n)), z(`Global state imported from "${l.name}".`);
1718
+ const { text: n, file: s } = t;
1719
+ en(e, JSON.parse(n)), B(`Global state imported from "${s.name}".`);
1659
1720
  } catch (o) {
1660
- z("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
1721
+ B("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
1661
1722
  }
1662
1723
  }
1663
- function Zt(e, o) {
1724
+ function en(e, o) {
1664
1725
  for (const t in o) {
1665
1726
  const n = e.state.value[t];
1666
1727
  n ? Object.assign(n, o[t]) : e.state.value[t] = o[t];
1667
1728
  }
1668
1729
  }
1669
- function Y(e) {
1730
+ function Q(e) {
1670
1731
  return {
1671
1732
  _custom: {
1672
1733
  display: e
1673
1734
  }
1674
1735
  };
1675
1736
  }
1676
- const Xt = "🍍 Pinia (root)", qe = "_root";
1677
- function Ao(e) {
1678
- return ot(e) ? {
1679
- id: qe,
1680
- label: Xt
1737
+ const tn = "🍍 Pinia (root)", Ye = "_root";
1738
+ function os(e) {
1739
+ return lt(e) ? {
1740
+ id: Ye,
1741
+ label: tn
1681
1742
  } : {
1682
1743
  id: e.$id,
1683
1744
  label: e.$id
1684
1745
  };
1685
1746
  }
1686
- function jo(e) {
1687
- if (ot(e)) {
1747
+ function ss(e) {
1748
+ if (lt(e)) {
1688
1749
  const t = Array.from(e._s.keys()), n = e._s;
1689
1750
  return {
1690
1751
  state: t.map((r) => ({
@@ -1697,7 +1758,7 @@ function jo(e) {
1697
1758
  return {
1698
1759
  editable: !1,
1699
1760
  key: r,
1700
- value: i._getters.reduce((s, a) => (s[a] = i[a], s), {})
1761
+ value: i._getters.reduce((l, a) => (l[a] = i[a], l), {})
1701
1762
  };
1702
1763
  })
1703
1764
  };
@@ -1719,49 +1780,49 @@ function jo(e) {
1719
1780
  value: e[t]
1720
1781
  }))), o;
1721
1782
  }
1722
- function Fo(e) {
1783
+ function ls(e) {
1723
1784
  return e ? Array.isArray(e) ? e.reduce((o, t) => (o.keys.push(t.key), o.operations.push(t.type), o.oldValue[t.key] = t.oldValue, o.newValue[t.key] = t.newValue, o), {
1724
1785
  oldValue: {},
1725
1786
  keys: [],
1726
1787
  operations: [],
1727
1788
  newValue: {}
1728
1789
  }) : {
1729
- operation: Y(e.type),
1730
- key: Y(e.key),
1790
+ operation: Q(e.type),
1791
+ key: Q(e.key),
1731
1792
  oldValue: e.oldValue,
1732
1793
  newValue: e.newValue
1733
1794
  } : {};
1734
1795
  }
1735
- function zo(e) {
1796
+ function rs(e) {
1736
1797
  switch (e) {
1737
- case Z.direct:
1798
+ case ne.direct:
1738
1799
  return "mutation";
1739
- case Z.patchFunction:
1800
+ case ne.patchFunction:
1740
1801
  return "$patch";
1741
- case Z.patchObject:
1802
+ case ne.patchObject:
1742
1803
  return "$patch";
1743
1804
  default:
1744
1805
  return "unknown";
1745
1806
  }
1746
1807
  }
1747
- let me = !0;
1748
- const De = [], re = "pinia:mutations", U = "pinia", { assign: Bo } = Object, Me = (e) => "🍍 " + e;
1749
- function Uo(e, o) {
1750
- Wt({
1808
+ let _e = !0;
1809
+ const Ve = [], ue = "pinia:mutations", H = "pinia", { assign: is } = Object, Me = (e) => "🍍 " + e;
1810
+ function as(e, o) {
1811
+ qt({
1751
1812
  id: "dev.esm.pinia",
1752
1813
  label: "Pinia 🍍",
1753
1814
  logo: "https://pinia.vuejs.org/logo.svg",
1754
1815
  packageName: "pinia",
1755
1816
  homepage: "https://pinia.vuejs.org",
1756
- componentStateTypes: De,
1817
+ componentStateTypes: Ve,
1757
1818
  app: e
1758
1819
  }, (t) => {
1759
- typeof t.now != "function" && z("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), t.addTimelineLayer({
1760
- id: re,
1820
+ typeof t.now != "function" && B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), t.addTimelineLayer({
1821
+ id: ue,
1761
1822
  label: "Pinia 🍍",
1762
1823
  color: 15064968
1763
1824
  }), t.addInspector({
1764
- id: U,
1825
+ id: H,
1765
1826
  label: "Pinia 🍍",
1766
1827
  icon: "storage",
1767
1828
  treeFilterPlaceholder: "Search stores",
@@ -1769,28 +1830,28 @@ function Uo(e, o) {
1769
1830
  {
1770
1831
  icon: "content_copy",
1771
1832
  action: () => {
1772
- No(o);
1833
+ Xo(o);
1773
1834
  },
1774
1835
  tooltip: "Serialize and copy the state"
1775
1836
  },
1776
1837
  {
1777
1838
  icon: "content_paste",
1778
1839
  action: async () => {
1779
- await Vo(o), t.sendInspectorTree(U), t.sendInspectorState(U);
1840
+ await Zo(o), t.sendInspectorTree(H), t.sendInspectorState(H);
1780
1841
  },
1781
1842
  tooltip: "Replace the state with the content of your clipboard"
1782
1843
  },
1783
1844
  {
1784
1845
  icon: "save",
1785
1846
  action: () => {
1786
- Do(o);
1847
+ es(o);
1787
1848
  },
1788
1849
  tooltip: "Save the state as a JSON file"
1789
1850
  },
1790
1851
  {
1791
1852
  icon: "folder_open",
1792
1853
  action: async () => {
1793
- await Mo(o), t.sendInspectorTree(U), t.sendInspectorState(U);
1854
+ await ns(o), t.sendInspectorTree(H), t.sendInspectorState(H);
1794
1855
  },
1795
1856
  tooltip: "Import the state from a JSON file"
1796
1857
  }
@@ -1800,44 +1861,44 @@ function Uo(e, o) {
1800
1861
  icon: "restore",
1801
1862
  tooltip: 'Reset the state (with "$reset")',
1802
1863
  action: (n) => {
1803
- const l = o._s.get(n);
1804
- l ? typeof l.$reset != "function" ? z(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), z(`Store "${n}" reset.`)) : z(`Cannot reset "${n}" store because it wasn't found.`, "warn");
1864
+ const s = o._s.get(n);
1865
+ s ? typeof s.$reset != "function" ? B(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (s.$reset(), B(`Store "${n}" reset.`)) : B(`Cannot reset "${n}" store because it wasn't found.`, "warn");
1805
1866
  }
1806
1867
  }
1807
1868
  ]
1808
- }), t.on.inspectComponent((n, l) => {
1869
+ }), t.on.inspectComponent((n, s) => {
1809
1870
  const r = n.componentInstance && n.componentInstance.proxy;
1810
1871
  if (r && r._pStores) {
1811
1872
  const i = n.componentInstance.proxy._pStores;
1812
- Object.values(i).forEach((s) => {
1873
+ Object.values(i).forEach((l) => {
1813
1874
  n.instanceData.state.push({
1814
- type: Me(s.$id),
1875
+ type: Me(l.$id),
1815
1876
  key: "state",
1816
1877
  editable: !0,
1817
- value: s._isOptionsAPI ? {
1878
+ value: l._isOptionsAPI ? {
1818
1879
  _custom: {
1819
- value: K(s.$state),
1880
+ value: Y(l.$state),
1820
1881
  actions: [
1821
1882
  {
1822
1883
  icon: "restore",
1823
1884
  tooltip: "Reset the state of this store",
1824
- action: () => s.$reset()
1885
+ action: () => l.$reset()
1825
1886
  }
1826
1887
  ]
1827
1888
  }
1828
1889
  } : (
1829
1890
  // NOTE: workaround to unwrap transferred refs
1830
- Object.keys(s.$state).reduce((a, u) => (a[u] = s.$state[u], a), {})
1891
+ Object.keys(l.$state).reduce((a, u) => (a[u] = l.$state[u], a), {})
1831
1892
  )
1832
- }), s._getters && s._getters.length && n.instanceData.state.push({
1833
- type: Me(s.$id),
1893
+ }), l._getters && l._getters.length && n.instanceData.state.push({
1894
+ type: Me(l.$id),
1834
1895
  key: "getters",
1835
1896
  editable: !1,
1836
- value: s._getters.reduce((a, u) => {
1897
+ value: l._getters.reduce((a, u) => {
1837
1898
  try {
1838
- a[u] = s[u];
1839
- } catch (v) {
1840
- a[u] = v;
1899
+ a[u] = l[u];
1900
+ } catch (p) {
1901
+ a[u] = p;
1841
1902
  }
1842
1903
  return a;
1843
1904
  }, {})
@@ -1845,48 +1906,48 @@ function Uo(e, o) {
1845
1906
  });
1846
1907
  }
1847
1908
  }), t.on.getInspectorTree((n) => {
1848
- if (n.app === e && n.inspectorId === U) {
1849
- let l = [o];
1850
- l = l.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? l.filter((r) => "$id" in r ? r.$id.toLowerCase().includes(n.filter.toLowerCase()) : Xt.toLowerCase().includes(n.filter.toLowerCase())) : l).map(Ao);
1909
+ if (n.app === e && n.inspectorId === H) {
1910
+ let s = [o];
1911
+ s = s.concat(Array.from(o._s.values())), n.rootNodes = (n.filter ? s.filter((r) => "$id" in r ? r.$id.toLowerCase().includes(n.filter.toLowerCase()) : tn.toLowerCase().includes(n.filter.toLowerCase())) : s).map(os);
1851
1912
  }
1852
1913
  }), t.on.getInspectorState((n) => {
1853
- if (n.app === e && n.inspectorId === U) {
1854
- const l = n.nodeId === qe ? o : o._s.get(n.nodeId);
1855
- if (!l)
1914
+ if (n.app === e && n.inspectorId === H) {
1915
+ const s = n.nodeId === Ye ? o : o._s.get(n.nodeId);
1916
+ if (!s)
1856
1917
  return;
1857
- l && (n.state = jo(l));
1918
+ s && (n.state = ss(s));
1858
1919
  }
1859
- }), t.on.editInspectorState((n, l) => {
1860
- if (n.app === e && n.inspectorId === U) {
1861
- const r = n.nodeId === qe ? o : o._s.get(n.nodeId);
1920
+ }), t.on.editInspectorState((n, s) => {
1921
+ if (n.app === e && n.inspectorId === H) {
1922
+ const r = n.nodeId === Ye ? o : o._s.get(n.nodeId);
1862
1923
  if (!r)
1863
- return z(`store "${n.nodeId}" not found`, "error");
1924
+ return B(`store "${n.nodeId}" not found`, "error");
1864
1925
  const { path: i } = n;
1865
- ot(r) ? i.unshift("state") : (i.length !== 1 || !r._customProperties.has(i[0]) || i[0] in r.$state) && i.unshift("$state"), me = !1, n.set(r, i, n.state.value), me = !0;
1926
+ lt(r) ? i.unshift("state") : (i.length !== 1 || !r._customProperties.has(i[0]) || i[0] in r.$state) && i.unshift("$state"), _e = !1, n.set(r, i, n.state.value), _e = !0;
1866
1927
  }
1867
1928
  }), t.on.editComponentState((n) => {
1868
1929
  if (n.type.startsWith("🍍")) {
1869
- const l = n.type.replace(/^🍍\s*/, ""), r = o._s.get(l);
1930
+ const s = n.type.replace(/^🍍\s*/, ""), r = o._s.get(s);
1870
1931
  if (!r)
1871
- return z(`store "${l}" not found`, "error");
1932
+ return B(`store "${s}" not found`, "error");
1872
1933
  const { path: i } = n;
1873
1934
  if (i[0] !== "state")
1874
- return z(`Invalid path for store "${l}":
1935
+ return B(`Invalid path for store "${s}":
1875
1936
  ${i}
1876
1937
  Only state can be modified.`);
1877
- i[0] = "$state", me = !1, n.set(r, i, n.state.value), me = !0;
1938
+ i[0] = "$state", _e = !1, n.set(r, i, n.state.value), _e = !0;
1878
1939
  }
1879
1940
  });
1880
1941
  });
1881
1942
  }
1882
- function Ho(e, o) {
1883
- De.includes(Me(o.$id)) || De.push(Me(o.$id)), Wt({
1943
+ function us(e, o) {
1944
+ Ve.includes(Me(o.$id)) || Ve.push(Me(o.$id)), qt({
1884
1945
  id: "dev.esm.pinia",
1885
1946
  label: "Pinia 🍍",
1886
1947
  logo: "https://pinia.vuejs.org/logo.svg",
1887
1948
  packageName: "pinia",
1888
1949
  homepage: "https://pinia.vuejs.org",
1889
- componentStateTypes: De,
1950
+ componentStateTypes: Ve,
1890
1951
  app: e,
1891
1952
  settings: {
1892
1953
  logStoreChanges: {
@@ -1902,81 +1963,81 @@ function Ho(e, o) {
1902
1963
  }
1903
1964
  }, (t) => {
1904
1965
  const n = typeof t.now == "function" ? t.now.bind(t) : Date.now;
1905
- o.$onAction(({ after: i, onError: s, name: a, args: u }) => {
1906
- const v = en++;
1966
+ o.$onAction(({ after: i, onError: l, name: a, args: u }) => {
1967
+ const p = nn++;
1907
1968
  t.addTimelineEvent({
1908
- layerId: re,
1969
+ layerId: ue,
1909
1970
  event: {
1910
1971
  time: n(),
1911
1972
  title: "🛫 " + a,
1912
1973
  subtitle: "start",
1913
1974
  data: {
1914
- store: Y(o.$id),
1915
- action: Y(a),
1975
+ store: Q(o.$id),
1976
+ action: Q(a),
1916
1977
  args: u
1917
1978
  },
1918
- groupId: v
1979
+ groupId: p
1919
1980
  }
1920
1981
  }), i((c) => {
1921
- oe = void 0, t.addTimelineEvent({
1922
- layerId: re,
1982
+ re = void 0, t.addTimelineEvent({
1983
+ layerId: ue,
1923
1984
  event: {
1924
1985
  time: n(),
1925
1986
  title: "🛬 " + a,
1926
1987
  subtitle: "end",
1927
1988
  data: {
1928
- store: Y(o.$id),
1929
- action: Y(a),
1989
+ store: Q(o.$id),
1990
+ action: Q(a),
1930
1991
  args: u,
1931
1992
  result: c
1932
1993
  },
1933
- groupId: v
1994
+ groupId: p
1934
1995
  }
1935
1996
  });
1936
- }), s((c) => {
1937
- oe = void 0, t.addTimelineEvent({
1938
- layerId: re,
1997
+ }), l((c) => {
1998
+ re = void 0, t.addTimelineEvent({
1999
+ layerId: ue,
1939
2000
  event: {
1940
2001
  time: n(),
1941
2002
  logType: "error",
1942
2003
  title: "💥 " + a,
1943
2004
  subtitle: "end",
1944
2005
  data: {
1945
- store: Y(o.$id),
1946
- action: Y(a),
2006
+ store: Q(o.$id),
2007
+ action: Q(a),
1947
2008
  args: u,
1948
2009
  error: c
1949
2010
  },
1950
- groupId: v
2011
+ groupId: p
1951
2012
  }
1952
2013
  });
1953
2014
  });
1954
2015
  }, !0), o._customProperties.forEach((i) => {
1955
- j(() => R(o[i]), (s, a) => {
1956
- t.notifyComponentUpdate(), t.sendInspectorState(U), me && t.addTimelineEvent({
1957
- layerId: re,
2016
+ j(() => P(o[i]), (l, a) => {
2017
+ t.notifyComponentUpdate(), t.sendInspectorState(H), _e && t.addTimelineEvent({
2018
+ layerId: ue,
1958
2019
  event: {
1959
2020
  time: n(),
1960
2021
  title: "Change",
1961
2022
  subtitle: i,
1962
2023
  data: {
1963
- newValue: s,
2024
+ newValue: l,
1964
2025
  oldValue: a
1965
2026
  },
1966
- groupId: oe
2027
+ groupId: re
1967
2028
  }
1968
2029
  });
1969
2030
  }, { deep: !0 });
1970
- }), o.$subscribe(({ events: i, type: s }, a) => {
1971
- if (t.notifyComponentUpdate(), t.sendInspectorState(U), !me)
2031
+ }), o.$subscribe(({ events: i, type: l }, a) => {
2032
+ if (t.notifyComponentUpdate(), t.sendInspectorState(H), !_e)
1972
2033
  return;
1973
2034
  const u = {
1974
2035
  time: n(),
1975
- title: zo(s),
1976
- data: Bo({ store: Y(o.$id) }, Fo(i)),
1977
- groupId: oe
2036
+ title: rs(l),
2037
+ data: is({ store: Q(o.$id) }, ls(i)),
2038
+ groupId: re
1978
2039
  };
1979
- s === Z.patchFunction ? u.subtitle = "⤵️" : s === Z.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
2040
+ l === ne.patchFunction ? u.subtitle = "⤵️" : l === ne.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
1980
2041
  _custom: {
1981
2042
  display: "DebuggerEvent",
1982
2043
  type: "object",
@@ -1984,71 +2045,71 @@ function Ho(e, o) {
1984
2045
  value: i
1985
2046
  }
1986
2047
  }), t.addTimelineEvent({
1987
- layerId: re,
2048
+ layerId: ue,
1988
2049
  event: u
1989
2050
  });
1990
2051
  }, { detached: !0, flush: "sync" });
1991
- const l = o._hotUpdate;
1992
- o._hotUpdate = ae((i) => {
1993
- l(i), t.addTimelineEvent({
1994
- layerId: re,
2052
+ const s = o._hotUpdate;
2053
+ o._hotUpdate = de((i) => {
2054
+ s(i), t.addTimelineEvent({
2055
+ layerId: ue,
1995
2056
  event: {
1996
2057
  time: n(),
1997
2058
  title: "🔥 " + o.$id,
1998
2059
  subtitle: "HMR update",
1999
2060
  data: {
2000
- store: Y(o.$id),
2001
- info: Y("HMR update")
2061
+ store: Q(o.$id),
2062
+ info: Q("HMR update")
2002
2063
  }
2003
2064
  }
2004
- }), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U);
2065
+ }), t.notifyComponentUpdate(), t.sendInspectorTree(H), t.sendInspectorState(H);
2005
2066
  });
2006
2067
  const { $dispose: r } = o;
2007
2068
  o.$dispose = () => {
2008
- r(), t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && z(`Disposed "${o.$id}" store 🗑`);
2009
- }, t.notifyComponentUpdate(), t.sendInspectorTree(U), t.sendInspectorState(U), t.getSettings().logStoreChanges && z(`"${o.$id}" store installed 🆕`);
2069
+ r(), t.notifyComponentUpdate(), t.sendInspectorTree(H), t.sendInspectorState(H), t.getSettings().logStoreChanges && B(`Disposed "${o.$id}" store 🗑`);
2070
+ }, t.notifyComponentUpdate(), t.sendInspectorTree(H), t.sendInspectorState(H), t.getSettings().logStoreChanges && B(`"${o.$id}" store installed 🆕`);
2010
2071
  });
2011
2072
  }
2012
- let en = 0, oe;
2073
+ let nn = 0, re;
2013
2074
  function gt(e, o, t) {
2014
- const n = o.reduce((l, r) => (l[r] = K(e)[r], l), {});
2015
- for (const l in n)
2016
- e[l] = function() {
2017
- const r = en, i = t ? new Proxy(e, {
2075
+ const n = o.reduce((s, r) => (s[r] = Y(e)[r], s), {});
2076
+ for (const s in n)
2077
+ e[s] = function() {
2078
+ const r = nn, i = t ? new Proxy(e, {
2018
2079
  get(...a) {
2019
- return oe = r, Reflect.get(...a);
2080
+ return re = r, Reflect.get(...a);
2020
2081
  },
2021
2082
  set(...a) {
2022
- return oe = r, Reflect.set(...a);
2083
+ return re = r, Reflect.set(...a);
2023
2084
  }
2024
2085
  }) : e;
2025
- oe = r;
2026
- const s = n[l].apply(i, arguments);
2027
- return oe = void 0, s;
2086
+ re = r;
2087
+ const l = n[s].apply(i, arguments);
2088
+ return re = void 0, l;
2028
2089
  };
2029
2090
  }
2030
- function Wo({ app: e, store: o, options: t }) {
2091
+ function cs({ app: e, store: o, options: t }) {
2031
2092
  if (o.$id.startsWith("__hot:"))
2032
2093
  return;
2033
2094
  o._isOptionsAPI = !!t.state, gt(o, Object.keys(t.actions), o._isOptionsAPI);
2034
2095
  const n = o._hotUpdate;
2035
- K(o)._hotUpdate = function(l) {
2036
- n.apply(this, arguments), gt(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
2037
- }, Ho(
2096
+ Y(o)._hotUpdate = function(s) {
2097
+ n.apply(this, arguments), gt(o, Object.keys(s._hmrPayload.actions), !!o._isOptionsAPI);
2098
+ }, us(
2038
2099
  e,
2039
2100
  // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
2040
2101
  o
2041
2102
  );
2042
2103
  }
2043
- function Go() {
2044
- const e = It(!0), o = e.run(() => S({}));
2104
+ function ds() {
2105
+ const e = $t(!0), o = e.run(() => E({}));
2045
2106
  let t = [], n = [];
2046
- const l = ae({
2107
+ const s = de({
2047
2108
  install(r) {
2048
- $e(l), l._a = r, r.provide(Gt, l), r.config.globalProperties.$pinia = l, Se && Uo(r, l), n.forEach((i) => t.push(i)), n = [];
2109
+ Ce(s), s._a = r, r.provide(Jt, s), r.config.globalProperties.$pinia = s, Ee && as(r, s), n.forEach((i) => t.push(i)), n = [];
2049
2110
  },
2050
2111
  use(r) {
2051
- return !this._a && !Ut ? n.push(r) : t.push(r), this;
2112
+ return !this._a && !Wt ? n.push(r) : t.push(r), this;
2052
2113
  },
2053
2114
  _p: t,
2054
2115
  // it's actually undefined here
@@ -2058,232 +2119,232 @@ function Go() {
2058
2119
  _s: /* @__PURE__ */ new Map(),
2059
2120
  state: o
2060
2121
  });
2061
- return Se && typeof Proxy < "u" && l.use(Wo), l;
2122
+ return Ee && typeof Proxy < "u" && s.use(cs), s;
2062
2123
  }
2063
- function tn(e, o) {
2124
+ function on(e, o) {
2064
2125
  for (const t in o) {
2065
2126
  const n = o[t];
2066
2127
  if (!(t in e))
2067
2128
  continue;
2068
- const l = e[t];
2069
- ce(l) && ce(n) && !be(n) && !Ze(n) ? e[t] = tn(l, n) : e[t] = n;
2129
+ const s = e[t];
2130
+ fe(s) && fe(n) && !xe(n) && !tt(n) ? e[t] = on(s, n) : e[t] = n;
2070
2131
  }
2071
2132
  return e;
2072
2133
  }
2073
- const nn = () => {
2134
+ const sn = () => {
2074
2135
  };
2075
- function bt(e, o, t, n = nn) {
2136
+ function bt(e, o, t, n = sn) {
2076
2137
  e.push(o);
2077
- const l = () => {
2138
+ const s = () => {
2078
2139
  const r = e.indexOf(o);
2079
2140
  r > -1 && (e.splice(r, 1), n());
2080
2141
  };
2081
- return !t && Ct() && Ye(l), l;
2142
+ return !t && Ct() && Ze(s), s;
2082
2143
  }
2083
- function he(e, ...o) {
2144
+ function be(e, ...o) {
2084
2145
  e.slice().forEach((t) => {
2085
2146
  t(...o);
2086
2147
  });
2087
2148
  }
2088
- const qo = (e) => e();
2089
- function Je(e, o) {
2149
+ const fs = (e) => e();
2150
+ function Qe(e, o) {
2090
2151
  e instanceof Map && o instanceof Map && o.forEach((t, n) => e.set(n, t)), e instanceof Set && o instanceof Set && o.forEach(e.add, e);
2091
2152
  for (const t in o) {
2092
2153
  if (!o.hasOwnProperty(t))
2093
2154
  continue;
2094
- const n = o[t], l = e[t];
2095
- ce(l) && ce(n) && e.hasOwnProperty(t) && !be(n) && !Ze(n) ? e[t] = Je(l, n) : e[t] = n;
2155
+ const n = o[t], s = e[t];
2156
+ fe(s) && fe(n) && e.hasOwnProperty(t) && !xe(n) && !tt(n) ? e[t] = Qe(s, n) : e[t] = n;
2096
2157
  }
2097
2158
  return e;
2098
2159
  }
2099
- const Jo = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
2160
+ const ps = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
2100
2161
  /* istanbul ignore next */
2101
2162
  Symbol()
2102
2163
  );
2103
- function Ko(e) {
2104
- return !ce(e) || !e.hasOwnProperty(Jo);
2164
+ function vs(e) {
2165
+ return !fe(e) || !e.hasOwnProperty(ps);
2105
2166
  }
2106
- const { assign: J } = Object;
2107
- function yt(e) {
2108
- return !!(be(e) && e.effect);
2167
+ const { assign: K } = Object;
2168
+ function _t(e) {
2169
+ return !!(xe(e) && e.effect);
2109
2170
  }
2110
- function _t(e, o, t, n) {
2111
- const { state: l, actions: r, getters: i } = o, s = t.state.value[e];
2171
+ function yt(e, o, t, n) {
2172
+ const { state: s, actions: r, getters: i } = o, l = t.state.value[e];
2112
2173
  let a;
2113
2174
  function u() {
2114
- !s && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = l ? l() : {});
2115
- const v = process.env.NODE_ENV !== "production" && n ? (
2175
+ !l && (process.env.NODE_ENV === "production" || !n) && (t.state.value[e] = s ? s() : {});
2176
+ const p = process.env.NODE_ENV !== "production" && n ? (
2116
2177
  // use ref() to unwrap refs inside state TODO: check if this is still necessary
2117
- at(S(l ? l() : {}).value)
2178
+ at(E(s ? s() : {}).value)
2118
2179
  ) : at(t.state.value[e]);
2119
- return J(v, r, Object.keys(i || {}).reduce((c, b) => (process.env.NODE_ENV !== "production" && b in v && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${e}".`), c[b] = ae(_(() => {
2120
- $e(t);
2180
+ return K(p, r, Object.keys(i || {}).reduce((c, h) => (process.env.NODE_ENV !== "production" && h in p && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${h}" in store "${e}".`), c[h] = de(w(() => {
2181
+ Ce(t);
2121
2182
  const m = t._s.get(e);
2122
- return i[b].call(m, m);
2183
+ return i[h].call(m, m);
2123
2184
  })), c), {}));
2124
2185
  }
2125
- return a = Ke(e, u, o, t, n, !0), a;
2186
+ return a = Xe(e, u, o, t, n, !0), a;
2126
2187
  }
2127
- function Ke(e, o, t = {}, n, l, r) {
2188
+ function Xe(e, o, t = {}, n, s, r) {
2128
2189
  let i;
2129
- const s = J({ actions: {} }, t);
2190
+ const l = K({ actions: {} }, t);
2130
2191
  if (process.env.NODE_ENV !== "production" && !n._e.active)
2131
2192
  throw new Error("Pinia destroyed");
2132
2193
  const a = {
2133
2194
  deep: !0
2134
2195
  // flush: 'post',
2135
2196
  };
2136
- process.env.NODE_ENV !== "production" && !Ut && (a.onTrigger = (d) => {
2137
- u ? m = d : u == !1 && !h._hotUpdating && (Array.isArray(m) ? m.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
2197
+ process.env.NODE_ENV !== "production" && !Wt && (a.onTrigger = (d) => {
2198
+ u ? m = d : u == !1 && !_._hotUpdating && (Array.isArray(m) ? m.push(d) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
2138
2199
  });
2139
- let u, v, c = [], b = [], m;
2140
- const w = n.state.value[e];
2141
- !r && !w && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
2142
- const $ = S({});
2143
- let M;
2144
- function E(d) {
2200
+ let u, p, c = [], h = [], m;
2201
+ const v = n.state.value[e];
2202
+ !r && !v && (process.env.NODE_ENV === "production" || !s) && (n.state.value[e] = {});
2203
+ const I = E({});
2204
+ let V;
2205
+ function T(d) {
2145
2206
  let f;
2146
- u = v = !1, process.env.NODE_ENV !== "production" && (m = []), typeof d == "function" ? (d(n.state.value[e]), f = {
2147
- type: Z.patchFunction,
2207
+ u = p = !1, process.env.NODE_ENV !== "production" && (m = []), typeof d == "function" ? (d(n.state.value[e]), f = {
2208
+ type: ne.patchFunction,
2148
2209
  storeId: e,
2149
2210
  events: m
2150
- }) : (Je(n.state.value[e], d), f = {
2151
- type: Z.patchObject,
2211
+ }) : (Qe(n.state.value[e], d), f = {
2212
+ type: ne.patchObject,
2152
2213
  payload: d,
2153
2214
  storeId: e,
2154
2215
  events: m
2155
2216
  });
2156
- const y = M = Symbol();
2157
- Q().then(() => {
2158
- M === y && (u = !0);
2159
- }), v = !0, he(c, f, n.state.value[e]);
2160
- }
2161
- const O = r ? function() {
2162
- const { state: f } = t, y = f ? f() : {};
2163
- this.$patch((x) => {
2164
- J(x, y);
2217
+ const x = V = Symbol();
2218
+ te().then(() => {
2219
+ V === x && (u = !0);
2220
+ }), p = !0, be(c, f, n.state.value[e]);
2221
+ }
2222
+ const C = r ? function() {
2223
+ const { state: f } = t, x = f ? f() : {};
2224
+ this.$patch((O) => {
2225
+ K(O, x);
2165
2226
  });
2166
2227
  } : (
2167
2228
  /* istanbul ignore next */
2168
2229
  process.env.NODE_ENV !== "production" ? () => {
2169
2230
  throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
2170
- } : nn
2231
+ } : sn
2171
2232
  );
2172
- function D() {
2173
- i.stop(), c = [], b = [], n._s.delete(e);
2233
+ function L() {
2234
+ i.stop(), c = [], h = [], n._s.delete(e);
2174
2235
  }
2175
- function A(d, f) {
2236
+ function M(d, f) {
2176
2237
  return function() {
2177
- $e(n);
2178
- const y = Array.from(arguments), x = [], N = [];
2179
- function L(F) {
2180
- x.push(F);
2238
+ Ce(n);
2239
+ const x = Array.from(arguments), O = [], D = [];
2240
+ function A(F) {
2241
+ O.push(F);
2181
2242
  }
2182
- function G(F) {
2183
- N.push(F);
2243
+ function q(F) {
2244
+ D.push(F);
2184
2245
  }
2185
- he(b, {
2186
- args: y,
2246
+ be(h, {
2247
+ args: x,
2187
2248
  name: d,
2188
- store: h,
2189
- after: L,
2190
- onError: G
2249
+ store: _,
2250
+ after: A,
2251
+ onError: q
2191
2252
  });
2192
- let q;
2253
+ let J;
2193
2254
  try {
2194
- q = f.apply(this && this.$id === e ? this : h, y);
2255
+ J = f.apply(this && this.$id === e ? this : _, x);
2195
2256
  } catch (F) {
2196
- throw he(N, F), F;
2257
+ throw be(D, F), F;
2197
2258
  }
2198
- return q instanceof Promise ? q.then((F) => (he(x, F), F)).catch((F) => (he(N, F), Promise.reject(F))) : (he(x, q), q);
2259
+ return J instanceof Promise ? J.then((F) => (be(O, F), F)).catch((F) => (be(D, F), Promise.reject(F))) : (be(O, J), J);
2199
2260
  };
2200
2261
  }
2201
- const g = /* @__PURE__ */ ae({
2262
+ const y = /* @__PURE__ */ de({
2202
2263
  actions: {},
2203
2264
  getters: {},
2204
2265
  state: [],
2205
- hotState: $
2206
- }), T = {
2266
+ hotState: I
2267
+ }), R = {
2207
2268
  _p: n,
2208
2269
  // _s: scope,
2209
2270
  $id: e,
2210
- $onAction: bt.bind(null, b),
2211
- $patch: E,
2212
- $reset: O,
2271
+ $onAction: bt.bind(null, h),
2272
+ $patch: T,
2273
+ $reset: C,
2213
2274
  $subscribe(d, f = {}) {
2214
- const y = bt(c, d, f.detached, () => x()), x = i.run(() => j(() => n.state.value[e], (N) => {
2215
- (f.flush === "sync" ? v : u) && d({
2275
+ const x = bt(c, d, f.detached, () => O()), O = i.run(() => j(() => n.state.value[e], (D) => {
2276
+ (f.flush === "sync" ? p : u) && d({
2216
2277
  storeId: e,
2217
- type: Z.direct,
2278
+ type: ne.direct,
2218
2279
  events: m
2219
- }, N);
2220
- }, J({}, a, f)));
2221
- return y;
2280
+ }, D);
2281
+ }, K({}, a, f)));
2282
+ return x;
2222
2283
  },
2223
- $dispose: D
2224
- }, h = Et(process.env.NODE_ENV !== "production" || Se ? J(
2284
+ $dispose: L
2285
+ }, _ = Ot(process.env.NODE_ENV !== "production" || Ee ? K(
2225
2286
  {
2226
- _hmrPayload: g,
2227
- _customProperties: ae(/* @__PURE__ */ new Set())
2287
+ _hmrPayload: y,
2288
+ _customProperties: de(/* @__PURE__ */ new Set())
2228
2289
  // devtools custom properties
2229
2290
  },
2230
- T
2291
+ R
2231
2292
  // must be added later
2232
2293
  // setupStore
2233
- ) : T);
2234
- n._s.set(e, h);
2235
- const C = (n._a && n._a.runWithContext || qo)(() => n._e.run(() => (i = It()).run(o)));
2236
- for (const d in C) {
2237
- const f = C[d];
2238
- if (be(f) && !yt(f) || Ze(f))
2239
- process.env.NODE_ENV !== "production" && l ? ke($.value, d, Be(C, d)) : r || (w && Ko(f) && (be(f) ? f.value = w[d] : Je(f, w[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && g.state.push(d);
2294
+ ) : R);
2295
+ n._s.set(e, _);
2296
+ const k = (n._a && n._a.runWithContext || fs)(() => n._e.run(() => (i = $t()).run(o)));
2297
+ for (const d in k) {
2298
+ const f = k[d];
2299
+ if (xe(f) && !_t(f) || tt(f))
2300
+ process.env.NODE_ENV !== "production" && s ? Ne(I.value, d, We(k, d)) : r || (v && vs(f) && (xe(f) ? f.value = v[d] : Qe(f, v[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && y.state.push(d);
2240
2301
  else if (typeof f == "function") {
2241
- const y = process.env.NODE_ENV !== "production" && l ? f : A(d, f);
2242
- C[d] = y, process.env.NODE_ENV !== "production" && (g.actions[d] = f), s.actions[d] = f;
2243
- } else process.env.NODE_ENV !== "production" && yt(f) && (g.getters[d] = r ? (
2302
+ const x = process.env.NODE_ENV !== "production" && s ? f : M(d, f);
2303
+ k[d] = x, process.env.NODE_ENV !== "production" && (y.actions[d] = f), l.actions[d] = f;
2304
+ } else process.env.NODE_ENV !== "production" && _t(f) && (y.getters[d] = r ? (
2244
2305
  // @ts-expect-error
2245
2306
  t.getters[d]
2246
- ) : f, Fe && (C._getters || // @ts-expect-error: same
2247
- (C._getters = ae([]))).push(d));
2307
+ ) : f, Be && (k._getters || // @ts-expect-error: same
2308
+ (k._getters = de([]))).push(d));
2248
2309
  }
2249
- if (J(h, C), J(K(h), C), Object.defineProperty(h, "$state", {
2250
- get: () => process.env.NODE_ENV !== "production" && l ? $.value : n.state.value[e],
2310
+ if (K(_, k), K(Y(_), k), Object.defineProperty(_, "$state", {
2311
+ get: () => process.env.NODE_ENV !== "production" && s ? I.value : n.state.value[e],
2251
2312
  set: (d) => {
2252
- if (process.env.NODE_ENV !== "production" && l)
2313
+ if (process.env.NODE_ENV !== "production" && s)
2253
2314
  throw new Error("cannot set hotState");
2254
- E((f) => {
2255
- J(f, d);
2315
+ T((f) => {
2316
+ K(f, d);
2256
2317
  });
2257
2318
  }
2258
- }), process.env.NODE_ENV !== "production" && (h._hotUpdate = ae((d) => {
2259
- h._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
2260
- if (f in h.$state) {
2261
- const y = d.$state[f], x = h.$state[f];
2262
- typeof y == "object" && ce(y) && ce(x) ? tn(y, x) : d.$state[f] = x;
2319
+ }), process.env.NODE_ENV !== "production" && (_._hotUpdate = de((d) => {
2320
+ _._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
2321
+ if (f in _.$state) {
2322
+ const x = d.$state[f], O = _.$state[f];
2323
+ typeof x == "object" && fe(x) && fe(O) ? on(x, O) : d.$state[f] = O;
2263
2324
  }
2264
- ke(h, f, Be(d.$state, f));
2265
- }), Object.keys(h.$state).forEach((f) => {
2266
- f in d.$state || We(h, f);
2267
- }), u = !1, v = !1, n.state.value[e] = Be(d._hmrPayload, "hotState"), v = !0, Q().then(() => {
2325
+ Ne(_, f, We(d.$state, f));
2326
+ }), Object.keys(_.$state).forEach((f) => {
2327
+ f in d.$state || Je(_, f);
2328
+ }), u = !1, p = !1, n.state.value[e] = We(d._hmrPayload, "hotState"), p = !0, te().then(() => {
2268
2329
  u = !0;
2269
2330
  });
2270
2331
  for (const f in d._hmrPayload.actions) {
2271
- const y = d[f];
2272
- ke(h, f, A(f, y));
2332
+ const x = d[f];
2333
+ Ne(_, f, M(f, x));
2273
2334
  }
2274
2335
  for (const f in d._hmrPayload.getters) {
2275
- const y = d._hmrPayload.getters[f], x = r ? (
2336
+ const x = d._hmrPayload.getters[f], O = r ? (
2276
2337
  // special handling of options api
2277
- _(() => ($e(n), y.call(h, h)))
2278
- ) : y;
2279
- ke(h, f, x);
2338
+ w(() => (Ce(n), x.call(_, _)))
2339
+ ) : x;
2340
+ Ne(_, f, O);
2280
2341
  }
2281
- Object.keys(h._hmrPayload.getters).forEach((f) => {
2282
- f in d._hmrPayload.getters || We(h, f);
2283
- }), Object.keys(h._hmrPayload.actions).forEach((f) => {
2284
- f in d._hmrPayload.actions || We(h, f);
2285
- }), h._hmrPayload = d._hmrPayload, h._getters = d._getters, h._hotUpdating = !1;
2286
- })), Se) {
2342
+ Object.keys(_._hmrPayload.getters).forEach((f) => {
2343
+ f in d._hmrPayload.getters || Je(_, f);
2344
+ }), Object.keys(_._hmrPayload.actions).forEach((f) => {
2345
+ f in d._hmrPayload.actions || Je(_, f);
2346
+ }), _._hmrPayload = d._hmrPayload, _._getters = d._getters, _._hotUpdating = !1;
2347
+ })), Ee) {
2287
2348
  const d = {
2288
2349
  writable: !0,
2289
2350
  configurable: !0,
@@ -2291,67 +2352,67 @@ function Ke(e, o, t = {}, n, l, r) {
2291
2352
  enumerable: !1
2292
2353
  };
2293
2354
  ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((f) => {
2294
- Object.defineProperty(h, f, J({ value: h[f] }, d));
2355
+ Object.defineProperty(_, f, K({ value: _[f] }, d));
2295
2356
  });
2296
2357
  }
2297
2358
  return n._p.forEach((d) => {
2298
- if (Se) {
2359
+ if (Ee) {
2299
2360
  const f = i.run(() => d({
2300
- store: h,
2361
+ store: _,
2301
2362
  app: n._a,
2302
2363
  pinia: n,
2303
- options: s
2364
+ options: l
2304
2365
  }));
2305
- Object.keys(f || {}).forEach((y) => h._customProperties.add(y)), J(h, f);
2366
+ Object.keys(f || {}).forEach((x) => _._customProperties.add(x)), K(_, f);
2306
2367
  } else
2307
- J(h, i.run(() => d({
2308
- store: h,
2368
+ K(_, i.run(() => d({
2369
+ store: _,
2309
2370
  app: n._a,
2310
2371
  pinia: n,
2311
- options: s
2372
+ options: l
2312
2373
  })));
2313
- }), process.env.NODE_ENV !== "production" && h.$state && typeof h.$state == "object" && typeof h.$state.constructor == "function" && !h.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
2374
+ }), process.env.NODE_ENV !== "production" && _.$state && typeof _.$state == "object" && typeof _.$state.constructor == "function" && !_.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
2314
2375
  state: () => new MyClass()
2315
- Found in store "${h.$id}".`), w && r && t.hydrate && t.hydrate(h.$state, w), u = !0, v = !0, h;
2376
+ Found in store "${_.$id}".`), v && r && t.hydrate && t.hydrate(_.$state, v), u = !0, p = !0, _;
2316
2377
  }
2317
- function lt(e, o, t) {
2318
- let n, l;
2378
+ function rt(e, o, t) {
2379
+ let n, s;
2319
2380
  const r = typeof o == "function";
2320
2381
  if (typeof e == "string")
2321
- n = e, l = r ? t : o;
2322
- else if (l = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
2382
+ n = e, s = r ? t : o;
2383
+ else if (s = e, n = e.id, process.env.NODE_ENV !== "production" && typeof n != "string")
2323
2384
  throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
2324
- function i(s, a) {
2325
- const u = dn();
2326
- if (s = // in test mode, ignore the argument provided as we can always retrieve a
2385
+ function i(l, a) {
2386
+ const u = pn();
2387
+ if (l = // in test mode, ignore the argument provided as we can always retrieve a
2327
2388
  // pinia instance with getActivePinia()
2328
- (process.env.NODE_ENV === "test" && we && we._testing ? null : s) || (u ? Ce(Gt, null) : null), s && $e(s), process.env.NODE_ENV !== "production" && !we)
2389
+ (process.env.NODE_ENV === "test" && Se && Se._testing ? null : l) || (u ? Te(Jt, null) : null), l && Ce(l), process.env.NODE_ENV !== "production" && !Se)
2329
2390
  throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
2330
2391
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
2331
2392
  This will fail in production.`);
2332
- s = we, s._s.has(n) || (r ? Ke(n, o, l, s) : _t(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
2333
- const v = s._s.get(n);
2393
+ l = Se, l._s.has(n) || (r ? Xe(n, o, s, l) : yt(n, s, l), process.env.NODE_ENV !== "production" && (i._pinia = l));
2394
+ const p = l._s.get(n);
2334
2395
  if (process.env.NODE_ENV !== "production" && a) {
2335
- const c = "__hot:" + n, b = r ? Ke(c, o, l, s, !0) : _t(c, J({}, l), s, !0);
2336
- a._hotUpdate(b), delete s.state.value[c], s._s.delete(c);
2396
+ const c = "__hot:" + n, h = r ? Xe(c, o, s, l, !0) : yt(c, K({}, s), l, !0);
2397
+ a._hotUpdate(h), delete l.state.value[c], l._s.delete(c);
2337
2398
  }
2338
- if (process.env.NODE_ENV !== "production" && Fe) {
2339
- const c = $t();
2399
+ if (process.env.NODE_ENV !== "production" && Be) {
2400
+ const c = It();
2340
2401
  if (c && c.proxy && // avoid adding stores that are just built for hot module replacement
2341
2402
  !a) {
2342
- const b = c.proxy, m = "_pStores" in b ? b._pStores : b._pStores = {};
2343
- m[n] = v;
2403
+ const h = c.proxy, m = "_pStores" in h ? h._pStores : h._pStores = {};
2404
+ m[n] = p;
2344
2405
  }
2345
2406
  }
2346
- return v;
2407
+ return p;
2347
2408
  }
2348
2409
  return i.$id = n, i;
2349
2410
  }
2350
- const st = lt("language", () => {
2351
- const e = S("auto"), o = S("en"), t = S({
2411
+ const ze = rt("language", () => {
2412
+ const e = E("auto"), o = E("en"), t = E({
2352
2413
  src: [],
2353
2414
  target: []
2354
- }), n = _(() => t.value.src[e.value]), l = _(() => t.value.target[o.value]);
2415
+ }), n = w(() => t.value.src[e.value]), s = w(() => t.value.target[o.value]);
2355
2416
  function r(a, u) {
2356
2417
  e.value = a == null ? void 0 : a.src, o.value = a == null ? void 0 : a.target, t.value = u;
2357
2418
  }
@@ -2360,118 +2421,110 @@ const st = lt("language", () => {
2360
2421
  const a = e.value;
2361
2422
  e.value = o.value, o.value = a;
2362
2423
  }
2363
- function s(a) {
2424
+ function l(a) {
2364
2425
  return t.value.src[a] || t.value.target[a];
2365
2426
  }
2366
- return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: r, swap: i, getLabel: s };
2367
- }), Yo = {
2427
+ return { languages: t, src: e, target: o, srcLabel: n, targetLabel: s, init: r, swap: i, getLabel: l };
2428
+ }), hs = {
2368
2429
  key: 0,
2369
- class: "flex flex-row"
2370
- }, Qo = {
2430
+ class: "flex"
2431
+ }, ms = {
2371
2432
  __name: "Selects",
2372
2433
  setup(e) {
2373
- const o = st();
2434
+ const o = ze();
2374
2435
  function t() {
2375
2436
  o.swap();
2376
2437
  }
2377
- return (n, l) => R(o).languages ? (P(), V("div", Yo, [
2378
- H(ht, {
2379
- modelValue: R(o).src,
2380
- "onUpdate:modelValue": l[0] || (l[0] = (r) => R(o).src = r),
2381
- languages: R(o).languages.src,
2438
+ return (n, s) => P(o).languages ? (S(), $("div", hs, [
2439
+ z(ht, {
2440
+ modelValue: P(o).src,
2441
+ "onUpdate:modelValue": s[0] || (s[0] = (r) => P(o).src = r),
2442
+ languages: P(o).languages.src,
2382
2443
  class: "grow"
2383
2444
  }, null, 8, ["modelValue", "languages"]),
2384
- H(wo, {
2385
- isBidirect: R(o).src !== "auto",
2386
- class: "grow-0",
2445
+ z(Fo, {
2446
+ isBidirect: P(o).src !== "auto",
2447
+ class: "grow-0 mx-3",
2387
2448
  onSwap: t
2388
2449
  }, null, 8, ["isBidirect"]),
2389
- H(ht, {
2390
- modelValue: R(o).target,
2391
- "onUpdate:modelValue": l[1] || (l[1] = (r) => R(o).target = r),
2392
- languages: R(o).languages.target,
2450
+ z(ht, {
2451
+ modelValue: P(o).target,
2452
+ "onUpdate:modelValue": s[1] || (s[1] = (r) => P(o).target = r),
2453
+ languages: P(o).languages.target,
2393
2454
  class: "grow"
2394
2455
  }, null, 8, ["modelValue", "languages"])
2395
- ])) : ue("", !0);
2456
+ ])) : X("", !0);
2396
2457
  }
2397
- }, Zo = {
2458
+ }, gs = {
2398
2459
  INPUT_MAX_LENGTH: 5e3,
2399
2460
  INPUT_DEBOUNCE: 500
2400
- }, ze = (e, o) => {
2461
+ }, Ue = (e, o) => {
2401
2462
  const t = e.__vccOpts || e;
2402
- for (const [n, l] of o)
2403
- t[n] = l;
2463
+ for (const [n, s] of o)
2464
+ t[n] = s;
2404
2465
  return t;
2405
- }, Xo = {}, el = { class: "mr-2 loading loading-dots loading-xs" };
2406
- function tl(e, o) {
2407
- return P(), V("span", el);
2408
- }
2409
- const nl = /* @__PURE__ */ ze(Xo, [["render", tl]]);
2410
- function ol(e, { volume: o = 1, playbackRate: t = 1, soundEnabled: n = !0, interrupt: l = !1, autoplay: r = !1, onload: i, ...s } = {}) {
2411
- const a = S(null), u = S(!1), v = S(null), c = S(null);
2412
- function b() {
2413
- var E;
2414
- typeof i == "function" && i.call(this), v.value = (v.value || ((E = c.value) == null ? void 0 : E.duration()) || 0) * 1e3, r === !0 && (u.value = !0);
2415
- }
2416
- return de(async () => {
2417
- const E = await import("./howler-DJIW9wc6.js").then((O) => O.h);
2418
- a.value = E.default.Howl, c.value = new a.value({
2419
- src: R(e),
2420
- volume: R(o),
2421
- rate: R(t),
2422
- onload: b,
2423
- ...s
2466
+ }, bs = {}, _s = { class: "mr-2 loading loading-dots loading-xs" };
2467
+ function ys(e, o) {
2468
+ return S(), $("span", _s);
2469
+ }
2470
+ const xs = /* @__PURE__ */ Ue(bs, [["render", ys]]), ws = "/assets/icons/volume.svg", Ss = "/assets/icons/volume-stop.svg";
2471
+ function Es(e, { volume: o = 1, playbackRate: t = 1, soundEnabled: n = !0, interrupt: s = !1, autoplay: r = !1, onload: i, ...l } = {}) {
2472
+ const a = E(null), u = E(!1), p = E(null), c = E(null);
2473
+ function h() {
2474
+ var T;
2475
+ typeof i == "function" && i.call(this), p.value = (p.value || ((T = c.value) == null ? void 0 : T.duration()) || 0) * 1e3, r === !0 && (u.value = !0);
2476
+ }
2477
+ return pe(async () => {
2478
+ const T = await import("./howler-DJIW9wc6.js").then((C) => C.h);
2479
+ a.value = T.default.Howl, c.value = new a.value({
2480
+ src: P(e),
2481
+ volume: P(o),
2482
+ rate: P(t),
2483
+ onload: h,
2484
+ ...l
2424
2485
  });
2425
2486
  }), j(
2426
2487
  () => [e],
2427
2488
  () => {
2428
2489
  a.value && a.value && c && c.value && (c.value = new a.value({
2429
- src: R(e),
2430
- volume: R(o),
2431
- rate: R(t),
2432
- onload: b,
2433
- ...s
2490
+ src: P(e),
2491
+ volume: P(o),
2492
+ rate: P(t),
2493
+ onload: h,
2494
+ ...l
2434
2495
  }));
2435
2496
  }
2436
2497
  ), j(
2437
- () => [R(o), R(t)],
2498
+ () => [P(o), P(t)],
2438
2499
  () => {
2439
- c.value && (c.value.volume(R(o)), c.value.rate(R(t)));
2500
+ c.value && (c.value.volume(P(o)), c.value.rate(P(t)));
2440
2501
  }
2441
2502
  ), {
2442
- play: (E) => {
2443
- typeof E > "u" && (E = {}), !(!c.value || !n && !E.forceSoundEnabled) && (l && c.value.stop(), E.playbackRate && c.value.rate(E.playbackRate), c.value.play(E.id), c.value.once("end", () => {
2503
+ play: (T) => {
2504
+ typeof T > "u" && (T = {}), !(!c.value || !n && !T.forceSoundEnabled) && (s && c.value.stop(), T.playbackRate && c.value.rate(T.playbackRate), c.value.play(T.id), c.value.once("end", () => {
2444
2505
  c.value && c.value && !c.value.playing() && (u.value = !1);
2445
2506
  }), u.value = !0);
2446
2507
  },
2447
2508
  sound: c,
2448
2509
  isPlaying: u,
2449
- duration: v,
2450
- pause: (E) => {
2451
- c.value && (c.value.pause(typeof E == "number" ? E : void 0), u.value = !1);
2510
+ duration: p,
2511
+ pause: (T) => {
2512
+ c.value && (c.value.pause(typeof T == "number" ? T : void 0), u.value = !1);
2452
2513
  },
2453
- stop: (E) => {
2454
- c.value && (c.value.stop(typeof E == "number" ? E : void 0), u.value = !1);
2514
+ stop: (T) => {
2515
+ c.value && (c.value.stop(typeof T == "number" ? T : void 0), u.value = !1);
2455
2516
  }
2456
2517
  };
2457
2518
  }
2458
- const ll = { class: "swap" }, sl = /* @__PURE__ */ I("svg", {
2459
- class: "swap-off fill-current h-4 w-4",
2460
- xmlns: "http://www.w3.org/2000/svg",
2461
- viewBox: "0 0 24 24"
2462
- }, [
2463
- /* @__PURE__ */ I("path", { d: "M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z" })
2464
- ], -1), rl = /* @__PURE__ */ I("svg", {
2465
- class: "swap-on fill-current h-4 w-4",
2466
- xmlns: "http://www.w3.org/2000/svg",
2467
- viewBox: "0 0 24 24"
2468
- }, [
2469
- /* @__PURE__ */ I("path", {
2470
- "fill-rule": "evenodd",
2471
- d: "M4.5 7.5a3 3 0 0 1 3-3h9a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3h-9a3 3 0 0 1-3-3v-9Z",
2472
- "clip-rule": "evenodd"
2473
- })
2474
- ], -1), il = {
2519
+ const Os = {
2520
+ key: 0,
2521
+ src: ws,
2522
+ alt: "Play"
2523
+ }, $s = {
2524
+ key: 1,
2525
+ src: Ss,
2526
+ alt: "Stop"
2527
+ }, Is = {
2475
2528
  __name: "SpeakBtn",
2476
2529
  props: {
2477
2530
  url: {
@@ -2480,59 +2533,62 @@ const ll = { class: "swap" }, sl = /* @__PURE__ */ I("svg", {
2480
2533
  }
2481
2534
  },
2482
2535
  setup(e) {
2483
- const o = e, { play: t, stop: n, isPlaying: l } = ol(o.url), r = S(!1);
2536
+ const o = e, { play: t, stop: n, isPlaying: s } = Es(o.url), r = E(!1);
2484
2537
  j(
2485
- () => l.value,
2486
- (s) => {
2487
- r.value = s;
2538
+ () => s.value,
2539
+ (l) => {
2540
+ r.value = l;
2488
2541
  }
2489
2542
  );
2490
2543
  function i() {
2491
- if (l.value) {
2544
+ if (s.value) {
2492
2545
  n();
2493
2546
  return;
2494
2547
  }
2495
2548
  t();
2496
2549
  }
2497
- return (s, a) => (P(), V("button", {
2550
+ return (l, a) => (S(), $("button", {
2498
2551
  class: "btn btn-xs btn-ghost btn-circle",
2499
- onClick: fn(i, ["prevent"])
2552
+ onClick: vn(i, ["prevent"])
2500
2553
  }, [
2501
- I("label", ll, [
2502
- Xe(I("input", {
2503
- "onUpdate:modelValue": a[0] || (a[0] = (u) => r.value = u),
2504
- type: "checkbox"
2505
- }, null, 512), [
2506
- [vn, r.value]
2507
- ]),
2508
- sl,
2509
- rl
2510
- ])
2554
+ P(s) ? (S(), $("img", $s)) : (S(), $("img", Os))
2511
2555
  ]));
2512
2556
  }
2513
- }, al = {}, ul = /* @__PURE__ */ I("svg", {
2514
- xmlns: "http://www.w3.org/2000/svg",
2515
- fill: "none",
2516
- viewBox: "0 0 24 24",
2517
- "stroke-width": "1.5",
2518
- stroke: "currentColor",
2519
- class: "w-5 h-5"
2520
- }, [
2521
- /* @__PURE__ */ I("path", {
2522
- "stroke-linecap": "round",
2523
- "stroke-linejoin": "round",
2524
- d: "m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
2525
- })
2526
- ], -1), cl = [
2527
- ul
2557
+ }, Cs = "/assets/icons/cancel.svg", Ts = {}, Ps = { class: "btn btn-xs btn-circle btn-ghost" }, ks = /* @__PURE__ */ g("img", {
2558
+ src: Cs,
2559
+ alt: "Clear",
2560
+ class: "w-4"
2561
+ }, null, -1), Rs = [
2562
+ ks
2528
2563
  ];
2529
- function dl(e, o) {
2530
- return P(), V("button", {
2531
- class: "btn btn-xs btn-ghost btn-circle p-0",
2532
- onClick: o[0] || (o[0] = (...t) => e.onClick && e.onClick(...t))
2533
- }, cl);
2564
+ function Ns(e, o) {
2565
+ return S(), $("button", Ps, Rs);
2534
2566
  }
2535
- const fl = /* @__PURE__ */ ze(al, [["render", dl]]), vl = { class: "flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center" }, pl = { class: "text-sm italic" }, hl = { key: 0 }, ml = /* @__PURE__ */ I("div", { class: "flex-grow" }, " ", -1), on = {
2567
+ const Ds = /* @__PURE__ */ Ue(Ts, [["render", Ns]]), Ls = "/assets/icons/favorite-filled.svg", Vs = "/assets/icons/favorite.svg", As = { class: "btn btn-xs btn-circle btn-ghost" }, Ms = {
2568
+ key: 0,
2569
+ src: Ls,
2570
+ alt: "Clear",
2571
+ class: "w-4"
2572
+ }, js = {
2573
+ key: 1,
2574
+ src: Vs,
2575
+ alt: "Clear",
2576
+ class: "w-4"
2577
+ }, Fs = {
2578
+ __name: "FavoriteBtn",
2579
+ props: {
2580
+ isFilled: Boolean
2581
+ },
2582
+ setup(e) {
2583
+ const o = e;
2584
+ return (t, n) => (S(), $("button", As, [
2585
+ o.isFilled ? (S(), $("img", Ms)) : (S(), $("img", js))
2586
+ ]));
2587
+ }
2588
+ }, Bs = { class: "flex flex-row rounded-t-lg bg-white border border-b-0 px-1 pr-1 pt-1 gap-1 items-center" }, zs = { class: "text-sm text-gray-600" }, Us = {
2589
+ key: 0,
2590
+ class: "italic"
2591
+ }, Hs = /* @__PURE__ */ g("div", { class: "flex-grow" }, null, -1), ln = {
2536
2592
  __name: "TranslationBtnGroup",
2537
2593
  props: {
2538
2594
  loading: {
@@ -2558,163 +2614,182 @@ const fl = /* @__PURE__ */ ze(al, [["render", dl]]), vl = { class: "flex flex-ro
2558
2614
  isClearBtn: {
2559
2615
  type: Boolean,
2560
2616
  default: !1
2617
+ },
2618
+ isFavoriteBtn: {
2619
+ type: Boolean,
2620
+ default: !1
2621
+ },
2622
+ isFavorite: {
2623
+ type: Boolean,
2624
+ default: !1
2625
+ },
2626
+ onFavorite: {
2627
+ type: Function,
2628
+ default: () => {
2629
+ }
2561
2630
  }
2562
2631
  },
2563
- emits: ["clear"],
2632
+ emits: ["clear", "favorite"],
2564
2633
  setup(e, { emit: o }) {
2565
2634
  const t = e, n = o;
2566
- return (l, r) => (P(), V("div", vl, [
2567
- t.tts ? (P(), xe(il, {
2635
+ return (s, r) => (S(), $("div", Bs, [
2636
+ t.tts ? (S(), Z(Is, {
2568
2637
  key: 0,
2569
2638
  url: t.tts
2570
- }, null, 8, ["url"])) : ue("", !0),
2571
- I("div", pl, [
2572
- pn(ne(e.srcLabel) + " ", 1),
2573
- e.phonetic ? (P(), V("span", hl, "― " + ne(t.phonetic), 1)) : ue("", !0)
2639
+ }, null, 8, ["url"])) : X("", !0),
2640
+ g("div", zs, [
2641
+ hn(ee(e.srcLabel) + " ", 1),
2642
+ e.phonetic ? (S(), $("span", Us, "- [" + ee(t.phonetic) + "]", 1)) : X("", !0)
2574
2643
  ]),
2575
- ml,
2576
- t.loading ? (P(), xe(nl, { key: 1 })) : ue("", !0),
2577
- t.src && t.isClearBtn ? (P(), xe(fl, {
2644
+ Hs,
2645
+ t.loading ? (S(), Z(xs, { key: 1 })) : X("", !0),
2646
+ t.src && t.isClearBtn ? (S(), Z(Ds, {
2578
2647
  key: 2,
2579
2648
  onClick: r[0] || (r[0] = (i) => n("clear"))
2580
- })) : ue("", !0)
2649
+ })) : X("", !0),
2650
+ t.src && t.isFavoriteBtn ? (S(), Z(Fs, {
2651
+ key: 3,
2652
+ isFilled: t.isFavorite,
2653
+ onClick: r[1] || (r[1] = (i) => n("favorite"))
2654
+ }, null, 8, ["isFilled"])) : X("", !0)
2581
2655
  ]));
2582
2656
  }
2583
- }, ye = lt("translation", () => {
2584
- const e = S(null), o = S(null), t = S({
2657
+ }, me = rt("translation", () => {
2658
+ const e = E(null), o = E(null), t = E({
2585
2659
  src: null,
2586
2660
  target: null
2587
- }), n = S(null), l = S([]), r = S([]), i = S([]), s = S({
2661
+ }), n = E(null), s = E([]), r = E([]), i = E([]), l = E([]), a = E({
2588
2662
  src: null,
2589
2663
  target: null
2590
- }), a = st(), u = _(() => a.getLabel(e.value)), v = _(() => a.getLabel(o.value));
2591
- function c(m) {
2592
- e.value = m.src, o.value = m.target, t.value = m.phonetic, n.value = m.result, l.value = m.dictionary, r.value = m.definitions, i.value = m.examples, s.value = m.tts;
2664
+ }), u = ze(), p = w(() => u.getLabel(e.value)), c = w(() => u.getLabel(o.value));
2665
+ function h(v) {
2666
+ e.value = v.src, o.value = v.target, t.value = v.phonetic, n.value = v.result, s.value = v.dictionary, r.value = v.definitions, i.value = v.synonyms, l.value = v.examples, a.value = v.tts;
2593
2667
  }
2594
- function b() {
2668
+ function m() {
2595
2669
  e.value = null, o.value = null, t.value = {
2596
2670
  src: null,
2597
2671
  target: null
2598
- }, n.value = null, l.value = [], r.value = [], i.value = [], s.value = {
2672
+ }, n.value = null, s.value = [], r.value = [], i.value = [], l.value = [], a.value = {
2599
2673
  src: null,
2600
2674
  target: null
2601
2675
  };
2602
2676
  }
2603
2677
  return {
2604
2678
  src: e,
2605
- srcLabel: u,
2679
+ srcLabel: p,
2606
2680
  target: o,
2607
- targetLabel: v,
2681
+ targetLabel: c,
2608
2682
  phonetic: t,
2609
2683
  result: n,
2610
- dictionary: l,
2684
+ dictionary: s,
2611
2685
  definitions: r,
2612
- examples: i,
2613
- tts: s,
2614
- init: c,
2615
- reset: b
2686
+ synonyms: i,
2687
+ examples: l,
2688
+ tts: a,
2689
+ init: h,
2690
+ reset: m
2616
2691
  };
2617
2692
  });
2618
- function gl(e) {
2619
- return Ct() ? (Ye(e), !0) : !1;
2693
+ function Ws(e) {
2694
+ return Ct() ? (Ze(e), !0) : !1;
2620
2695
  }
2621
- function Ae(e) {
2622
- return typeof e == "function" ? e() : R(e);
2696
+ function je(e) {
2697
+ return typeof e == "function" ? e() : P(e);
2623
2698
  }
2624
- const bl = typeof window < "u" && typeof document < "u";
2699
+ const Gs = typeof window < "u" && typeof document < "u";
2625
2700
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
2626
- const wt = () => {
2701
+ const xt = () => {
2627
2702
  };
2628
- function yl(e, o) {
2703
+ function qs(e, o) {
2629
2704
  function t(...n) {
2630
- return new Promise((l, r) => {
2631
- Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(r);
2705
+ return new Promise((s, r) => {
2706
+ Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(s).catch(r);
2632
2707
  });
2633
2708
  }
2634
2709
  return t;
2635
2710
  }
2636
- function _l(e, o = {}) {
2637
- let t, n, l = wt;
2638
- const r = (s) => {
2639
- clearTimeout(s), l(), l = wt;
2711
+ function Js(e, o = {}) {
2712
+ let t, n, s = xt;
2713
+ const r = (l) => {
2714
+ clearTimeout(l), s(), s = xt;
2640
2715
  };
2641
- return (s) => {
2642
- const a = Ae(e), u = Ae(o.maxWait);
2643
- return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(s())) : new Promise((v, c) => {
2644
- l = o.rejectOnCancel ? c : v, u && !n && (n = setTimeout(() => {
2645
- t && r(t), n = null, v(s());
2716
+ return (l) => {
2717
+ const a = je(e), u = je(o.maxWait);
2718
+ return t && r(t), a <= 0 || u !== void 0 && u <= 0 ? (n && (r(n), n = null), Promise.resolve(l())) : new Promise((p, c) => {
2719
+ s = o.rejectOnCancel ? c : p, u && !n && (n = setTimeout(() => {
2720
+ t && r(t), n = null, p(l());
2646
2721
  }, u)), t = setTimeout(() => {
2647
- n && r(n), n = null, v(s());
2722
+ n && r(n), n = null, p(l());
2648
2723
  }, a);
2649
2724
  });
2650
2725
  };
2651
2726
  }
2652
- function wl(e, o = 200, t = {}) {
2653
- return yl(
2654
- _l(o, t),
2727
+ function Ks(e, o = 200, t = {}) {
2728
+ return qs(
2729
+ Js(o, t),
2655
2730
  e
2656
2731
  );
2657
2732
  }
2658
- function xt(e) {
2733
+ function wt(e) {
2659
2734
  var o;
2660
- const t = Ae(e);
2735
+ const t = je(e);
2661
2736
  return (o = t == null ? void 0 : t.$el) != null ? o : t;
2662
2737
  }
2663
- const xl = bl ? window : void 0;
2664
- function Sl() {
2665
- const e = S(!1), o = $t();
2666
- return o && de(() => {
2738
+ const Ys = Gs ? window : void 0;
2739
+ function Qs() {
2740
+ const e = E(!1), o = It();
2741
+ return o && pe(() => {
2667
2742
  e.value = !0;
2668
2743
  }, o), e;
2669
2744
  }
2670
- function Ol(e) {
2671
- const o = Sl();
2672
- return _(() => (o.value, !!e()));
2745
+ function Xs(e) {
2746
+ const o = Qs();
2747
+ return w(() => (o.value, !!e()));
2673
2748
  }
2674
- function El(e, o, t = {}) {
2675
- const { window: n = xl, ...l } = t;
2749
+ function Zs(e, o, t = {}) {
2750
+ const { window: n = Ys, ...s } = t;
2676
2751
  let r;
2677
- const i = Ol(() => n && "ResizeObserver" in n), s = () => {
2752
+ const i = Xs(() => n && "ResizeObserver" in n), l = () => {
2678
2753
  r && (r.disconnect(), r = void 0);
2679
- }, a = _(() => Array.isArray(e) ? e.map((c) => xt(c)) : [xt(e)]), u = j(
2754
+ }, a = w(() => Array.isArray(e) ? e.map((c) => wt(c)) : [wt(e)]), u = j(
2680
2755
  a,
2681
2756
  (c) => {
2682
- if (s(), i.value && n) {
2757
+ if (l(), i.value && n) {
2683
2758
  r = new ResizeObserver(o);
2684
- for (const b of c)
2685
- b && r.observe(b, l);
2759
+ for (const h of c)
2760
+ h && r.observe(h, s);
2686
2761
  }
2687
2762
  },
2688
2763
  { immediate: !0, flush: "post" }
2689
- ), v = () => {
2690
- s(), u();
2764
+ ), p = () => {
2765
+ l(), u();
2691
2766
  };
2692
- return gl(v), {
2767
+ return Ws(p), {
2693
2768
  isSupported: i,
2694
- stop: v
2769
+ stop: p
2695
2770
  };
2696
2771
  }
2697
- function ln(e) {
2772
+ function rn(e) {
2698
2773
  var o;
2699
- const t = S(e == null ? void 0 : e.element), n = S(e == null ? void 0 : e.input), l = (o = e == null ? void 0 : e.styleProp) != null ? o : "height", r = S(1);
2774
+ const t = E(e == null ? void 0 : e.element), n = E(e == null ? void 0 : e.input), s = (o = e == null ? void 0 : e.styleProp) != null ? o : "height", r = E(1);
2700
2775
  function i() {
2701
- var s;
2776
+ var l;
2702
2777
  if (!t.value)
2703
2778
  return;
2704
2779
  let a = "";
2705
- t.value.style[l] = "1px", r.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? Ae(e.styleTarget).style[l] = `${r.value}px` : a = `${r.value}px`, t.value.style[l] = a;
2780
+ t.value.style[s] = "1px", r.value = (l = t.value) == null ? void 0 : l.scrollHeight, e != null && e.styleTarget ? je(e.styleTarget).style[s] = `${r.value}px` : a = `${r.value}px`, t.value.style[s] = a;
2706
2781
  }
2707
- return j([n, t], () => Q(i), { immediate: !0 }), j(r, () => {
2708
- var s;
2709
- return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
2710
- }), El(t, () => i()), e != null && e.watch && j(e.watch, i, { immediate: !0, deep: !0 }), {
2782
+ return j([n, t], () => te(i), { immediate: !0 }), j(r, () => {
2783
+ var l;
2784
+ return (l = e == null ? void 0 : e.onResize) == null ? void 0 : l.call(e);
2785
+ }), Zs(t, () => i()), e != null && e.watch && j(e.watch, i, { immediate: !0, deep: !0 }), {
2711
2786
  textarea: t,
2712
2787
  input: n,
2713
2788
  triggerResize: i
2714
2789
  };
2715
2790
  }
2716
- const Il = {
2717
- __name: "Input",
2791
+ const el = {
2792
+ __name: "TranslationInput",
2718
2793
  props: {
2719
2794
  text: {
2720
2795
  type: String,
@@ -2723,163 +2798,291 @@ const Il = {
2723
2798
  },
2724
2799
  emits: ["change", "clear"],
2725
2800
  setup(e, { emit: o }) {
2726
- const t = ye(), l = S(e.text), r = _(() => t.src), i = _(() => t.srcLabel), s = _(() => {
2727
- var w;
2728
- return (w = t.phonetic) == null ? void 0 : w.src;
2729
- }), a = _(() => {
2730
- var w;
2731
- return (w = t.tts) == null ? void 0 : w.src;
2732
- }), { textarea: u } = ln({ input: l, styleProp: "minHeight" }), v = o, c = wl(() => {
2733
- v("change", l.value);
2734
- }, Zo.INPUT_DEBOUNCE);
2735
- function b() {
2736
- if (!l.value) {
2801
+ const t = me(), n = e, s = E(n.text), r = w(() => t.src), i = w(() => t.srcLabel), l = w(() => {
2802
+ var v;
2803
+ return (v = t.phonetic) == null ? void 0 : v.src;
2804
+ }), a = w(() => {
2805
+ var v;
2806
+ return (v = t.tts) == null ? void 0 : v.src;
2807
+ }), { textarea: u } = rn({ input: s, styleProp: "minHeight" }), p = o, c = Ks(() => {
2808
+ p("change", s.value);
2809
+ }, gs.INPUT_DEBOUNCE);
2810
+ function h() {
2811
+ if (!s.value) {
2737
2812
  m();
2738
2813
  return;
2739
2814
  }
2740
2815
  c();
2741
2816
  }
2742
2817
  function m() {
2743
- v("clear"), l.value = "", u.value.focus();
2818
+ p("clear"), s.value = "", u.value.focus();
2744
2819
  }
2745
- return (w, $) => (P(), V(X, null, [
2746
- H(on, {
2820
+ return j(
2821
+ () => n.text,
2822
+ (v) => {
2823
+ s.value = v;
2824
+ }
2825
+ ), (v, I) => (S(), $(G, null, [
2826
+ z(ln, {
2747
2827
  src: r.value,
2748
2828
  srcLabel: i.value,
2749
2829
  tts: a.value,
2750
- phonetic: s.value,
2830
+ phonetic: l.value,
2751
2831
  isClearBtn: !0,
2752
2832
  onClear: m
2753
2833
  }, null, 8, ["src", "srcLabel", "tts", "phonetic"]),
2754
- Xe(I("textarea", {
2834
+ Tt(g("textarea", {
2755
2835
  ref_key: "textarea",
2756
2836
  ref: u,
2757
- "onUpdate:modelValue": $[0] || ($[0] = (M) => l.value = M),
2758
- class: "w-full border border-t-0 rounded-b-lg outline-none outline-0 p-3 pt-0",
2837
+ "onUpdate:modelValue": I[0] || (I[0] = (V) => s.value = V),
2838
+ class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3",
2759
2839
  autofocus: "",
2760
2840
  rows: "2",
2761
- onInput: b
2841
+ onInput: h
2762
2842
  }, null, 544), [
2763
2843
  [
2764
- Tt,
2765
- l.value,
2844
+ Pt,
2845
+ s.value,
2766
2846
  void 0,
2767
2847
  { trim: !0 }
2768
2848
  ]
2769
2849
  ])
2770
2850
  ], 64));
2771
2851
  }
2772
- }, $l = /* @__PURE__ */ ze(Il, [["__scopeId", "data-v-601b7a18"]]), sn = lt("loader", () => ({ loading: S(!1) })), Cl = {
2773
- __name: "Result",
2852
+ }, tl = /* @__PURE__ */ Ue(el, [["__scopeId", "data-v-ef4399dd"]]), nl = "/assets/icons/google-translate.svg", an = rt("loader", () => ({ loading: E(!1) })), ol = (e) => (mn("data-v-cbd6addc"), e = e(), gn(), e), sl = { class: "flex flex-col" }, ll = /* @__PURE__ */ ol(() => /* @__PURE__ */ g("div", { class: "w-full flex align-item-center justify-end" }, [
2853
+ /* @__PURE__ */ g("span", { class: "text-sm" }, "Powered by Google Translate"),
2854
+ /* @__PURE__ */ g("img", {
2855
+ src: nl,
2856
+ alt: "Google",
2857
+ class: "h-5 ml-2"
2858
+ })
2859
+ ], -1)), rl = {
2860
+ __name: "TranslationResult",
2861
+ props: {
2862
+ isFavoriteFeatureEnabled: Boolean
2863
+ },
2774
2864
  setup(e) {
2775
- const o = ye(), t = _(() => o.result), n = _(() => o.target), l = _(() => o.targetLabel), r = _(() => {
2776
- var v;
2777
- return (v = o.phonetic) == null ? void 0 : v.target;
2778
- }), i = _(() => {
2779
- var v;
2780
- return (v = o.tts) == null ? void 0 : v.target;
2781
- }), s = sn(), { textarea: a, input: u } = ln({ input: t, styleProp: "minHeight" });
2782
- return (v, c) => (P(), V(X, null, [
2783
- H(on, {
2784
- loading: R(s).loading,
2785
- src: n.value,
2786
- srcLabel: l.value,
2787
- tts: i.value,
2788
- phonetic: r.value
2789
- }, null, 8, ["loading", "src", "srcLabel", "tts", "phonetic"]),
2790
- Xe(I("textarea", {
2791
- ref_key: "textarea",
2792
- ref: a,
2793
- "onUpdate:modelValue": c[0] || (c[0] = (b) => be(u) ? u.value = b : null),
2794
- class: "w-full border border-t-0 rounded-b-lg outline-none outline-0 p-3 pt-0",
2795
- readonly: "",
2796
- rows: "2",
2797
- spellcheck: "false"
2798
- }, null, 512), [
2799
- [Tt, R(u)]
2865
+ const o = me(), t = E(!1), n = w(() => o.result), s = w(() => o.target), r = w(() => o.targetLabel), i = w(() => {
2866
+ var h;
2867
+ return (h = o.phonetic) == null ? void 0 : h.target;
2868
+ }), l = w(() => {
2869
+ var h;
2870
+ return (h = o.tts) == null ? void 0 : h.target;
2871
+ }), a = e, u = an(), { textarea: p, input: c } = rn({ input: n, styleProp: "minHeight" });
2872
+ return (h, m) => (S(), $(G, null, [
2873
+ z(ln, {
2874
+ loading: P(u).loading,
2875
+ src: s.value,
2876
+ srcLabel: r.value,
2877
+ tts: l.value,
2878
+ isFavoriteBtn: a.isFavoriteFeatureEnabled,
2879
+ isFavorite: t.value,
2880
+ phonetic: i.value,
2881
+ onFavorite: m[0] || (m[0] = (v) => t.value = !t.value)
2882
+ }, null, 8, ["loading", "src", "srcLabel", "tts", "isFavoriteBtn", "isFavorite", "phonetic"]),
2883
+ g("div", sl, [
2884
+ Tt(g("textarea", {
2885
+ ref_key: "textarea",
2886
+ ref: p,
2887
+ "onUpdate:modelValue": m[1] || (m[1] = (v) => xe(c) ? c.value = v : null),
2888
+ class: "w-full border rounded-b-md border-t-0 outline-none outline-0 px-3 pl-5 bg-white text-gray-800 font-semibold resize-none pb-3",
2889
+ readonly: "",
2890
+ rows: "2",
2891
+ spellcheck: "false"
2892
+ }, null, 512), [
2893
+ [Pt, P(c)]
2894
+ ]),
2895
+ ll
2800
2896
  ])
2801
2897
  ], 64));
2802
2898
  }
2803
- }, Tl = /* @__PURE__ */ ze(Cl, [["__scopeId", "data-v-6c3a2370"]]), Pl = { class: "card border bg-white rounded-lg" }, Rl = { class: "card-body p-4" }, kl = /* @__PURE__ */ I("h2", { class: "card-title" }, "Translations", -1), Nl = { class: "capitalize font-bold" }, Vl = { class: "list-none list-inside" }, Dl = ["onClick"], Ll = { class: "italic" }, Ml = {
2804
- __name: "Dictionary",
2899
+ }, il = /* @__PURE__ */ Ue(rl, [["__scopeId", "data-v-cbd6addc"]]), al = { class: "btn btn-sm btn-circle btn-ghost" }, He = {
2900
+ __name: "ToggleBtn",
2901
+ props: {
2902
+ isExpanded: Boolean
2903
+ },
2805
2904
  setup(e) {
2806
- const o = ye(), t = _(() => o.dictionary);
2807
- return (n, l) => (P(), V("div", Pl, [
2808
- I("div", Rl, [
2809
- kl,
2810
- I("ul", null, [
2811
- (P(!0), V(X, null, ge(t.value, (r, i) => (P(), V("li", {
2812
- key: `${r.pos}-${i}`,
2813
- class: "mb-3"
2814
- }, [
2815
- I("h5", Nl, ne(r.pos), 1),
2816
- I("ul", Vl, [
2817
- (P(!0), V(X, null, ge(r.items, (s, a) => (P(), V("li", {
2818
- key: `${s.word}-${a}`
2819
- }, [
2820
- I("span", {
2821
- class: "badge badge-neutral text-white cursor-pointer",
2822
- onClick: (u) => n.translate(s.word)
2823
- }, ne(s.word), 9, Dl),
2824
- I("small", Ll, " ― " + ne(s.reverse_translation.join(", ")), 1)
2825
- ]))), 128))
2826
- ])
2827
- ]))), 128))
2828
- ])
2905
+ const o = e;
2906
+ return (t, n) => (S(), $("button", al, [
2907
+ o.isExpanded ? (S(), Z(P(Do), {
2908
+ key: 0,
2909
+ class: "w-7 text-gray-400"
2910
+ })) : (S(), Z(P(Ro), {
2911
+ key: 1,
2912
+ class: "w-7 text-gray-400"
2913
+ }))
2914
+ ]));
2915
+ }
2916
+ }, ul = { class: "card border bg-white rounded-lg" }, cl = { class: "card-body px-4 py-2 gap-0" }, dl = { class: "flex justify-between items-center" }, fl = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), pl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, vl = { class: "list-none list-inside" }, hl = ["onClick"], ml = { class: "text-base font-normal text-gray-800 leading-4" }, gl = {
2917
+ __name: "Dictionary",
2918
+ emits: ["translate"],
2919
+ setup(e, { emit: o }) {
2920
+ const t = E(!0), n = me(), s = ze(), r = w(() => n.dictionary), i = o, l = () => {
2921
+ t.value = !t.value;
2922
+ }, a = (u) => {
2923
+ const p = n.src, c = n.target;
2924
+ s.src = c, s.target = p, i("translate", u);
2925
+ };
2926
+ return (u, p) => (S(), $("div", ul, [
2927
+ g("div", cl, [
2928
+ g("div", dl, [
2929
+ fl,
2930
+ z(He, {
2931
+ isExpanded: t.value,
2932
+ onClick: l
2933
+ }, null, 8, ["isExpanded"])
2934
+ ]),
2935
+ g("div", {
2936
+ class: ye(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
2937
+ }, [
2938
+ g("ul", null, [
2939
+ (S(!0), $(G, null, le(r.value, (c, h) => (S(), $("li", {
2940
+ key: `${c.pos}-${h}`,
2941
+ class: "mb-2"
2942
+ }, [
2943
+ g("h5", pl, ee(c.pos), 1),
2944
+ g("ul", vl, [
2945
+ (S(!0), $(G, null, le(c.items, (m, v) => (S(), $("li", {
2946
+ key: `${m.word}-${v}`
2947
+ }, [
2948
+ g("span", {
2949
+ class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
2950
+ onClick: (I) => a(m.word)
2951
+ }, ee(m.word), 9, hl),
2952
+ g("small", ml, " - " + ee(m.reverse_translation.join(", ")), 1)
2953
+ ]))), 128))
2954
+ ])
2955
+ ]))), 128))
2956
+ ])
2957
+ ], 2)
2829
2958
  ])
2830
2959
  ]));
2831
2960
  }
2832
- }, Al = { class: "card border bg-white rounded-lg" }, jl = { class: "card-body p-4" }, Fl = /* @__PURE__ */ I("h2", { class: "card-title font-bold" }, "Definitions", -1), zl = { class: "capitalize font-bold mb-0" }, Bl = { class: "list-decimal list-outside ml-5" }, Ul = /* @__PURE__ */ I("br", null, null, -1), Hl = {
2961
+ }, bl = { class: "card border bg-white rounded-lg" }, _l = { class: "card-body px-4 py-2 gap-0" }, yl = { class: "flex justify-between items-center" }, xl = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Definitions", -1), wl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Sl = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, El = /* @__PURE__ */ g("br", null, null, -1), Ol = {
2833
2962
  key: 0,
2834
2963
  class: "italic"
2835
- }, Wl = {
2964
+ }, $l = {
2836
2965
  __name: "Definition",
2837
2966
  setup(e) {
2838
- const o = ye(), t = _(() => o.definitions);
2839
- return (n, l) => (P(), V("div", Al, [
2840
- I("div", jl, [
2841
- Fl,
2842
- I("ul", null, [
2843
- (P(!0), V(X, null, ge(t.value, (r, i) => (P(), V("li", {
2844
- key: `${r.pos}-${i}`,
2845
- class: "mb-3"
2846
- }, [
2847
- I("h5", zl, ne(r.pos), 1),
2848
- I("ul", Bl, [
2849
- (P(!0), V(X, null, ge(r.items, (s, a) => (P(), V("li", {
2850
- key: `${s.gloss}-${a}`,
2851
- class: "mb-1"
2852
- }, [
2853
- I("span", null, ne(s.gloss), 1),
2854
- Ul,
2855
- s.example ? (P(), V("small", Hl, '"' + ne(s.example) + '"', 1)) : ue("", !0)
2856
- ]))), 128))
2857
- ])
2858
- ]))), 128))
2859
- ])
2967
+ const o = E(!0), t = me(), n = w(() => t.definitions), s = () => {
2968
+ o.value = !o.value;
2969
+ };
2970
+ return (r, i) => (S(), $("div", bl, [
2971
+ g("div", _l, [
2972
+ g("div", yl, [
2973
+ xl,
2974
+ z(He, {
2975
+ isExpanded: o.value,
2976
+ onClick: s
2977
+ }, null, 8, ["isExpanded"])
2978
+ ]),
2979
+ g("div", {
2980
+ class: ye(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
2981
+ }, [
2982
+ g("ul", null, [
2983
+ (S(!0), $(G, null, le(n.value, (l, a) => (S(), $("li", {
2984
+ key: `${l.pos}-${a}`,
2985
+ class: "mb-2"
2986
+ }, [
2987
+ g("h5", wl, ee(l.pos), 1),
2988
+ g("ul", Sl, [
2989
+ (S(!0), $(G, null, le(l.items, (u, p) => (S(), $("li", {
2990
+ key: `${u.gloss}-${p}`,
2991
+ class: "mb-1"
2992
+ }, [
2993
+ g("span", null, ee(u.gloss), 1),
2994
+ El,
2995
+ u.example ? (S(), $("small", Ol, '"' + ee(u.example) + '"', 1)) : X("", !0)
2996
+ ]))), 128))
2997
+ ])
2998
+ ]))), 128))
2999
+ ])
3000
+ ], 2)
2860
3001
  ])
2861
3002
  ]));
2862
3003
  }
2863
- }, Gl = { class: "card border bg-white rounded-lg" }, ql = { class: "card-body p-4" }, Jl = /* @__PURE__ */ I("h2", { class: "card-title font-bold" }, "Examples", -1), Kl = { class: "list-disc list-outside ml-5" }, Yl = ["innerHTML"], Ql = {
3004
+ }, Il = { class: "card border bg-white rounded-lg" }, Cl = { class: "card-body px-4 py-2 gap-0" }, Tl = { class: "flex justify-between items-center" }, Pl = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), kl = { class: "text-textCustom list-decimal list-outside ml-7 mt-2" }, Rl = ["innerHTML"], Nl = {
2864
3005
  __name: "Example",
2865
3006
  setup(e) {
2866
- const o = ye(), t = _(() => o.examples);
2867
- return (n, l) => (P(), V("div", Gl, [
2868
- I("div", ql, [
2869
- Jl,
2870
- I("ul", Kl, [
2871
- (P(!0), V(X, null, ge(t.value, (r, i) => (P(), V("li", {
2872
- key: `${r.definition_id}-${i}`,
2873
- innerHTML: r
2874
- }, null, 8, Yl))), 128))
2875
- ])
3007
+ const o = E(!0), t = me(), n = w(() => t.examples), s = () => {
3008
+ o.value = !o.value;
3009
+ };
3010
+ return (r, i) => (S(), $("div", Il, [
3011
+ g("div", Cl, [
3012
+ g("div", Tl, [
3013
+ Pl,
3014
+ z(He, {
3015
+ isExpanded: o.value,
3016
+ onClick: s
3017
+ }, null, 8, ["isExpanded"])
3018
+ ]),
3019
+ g("div", {
3020
+ class: ye(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
3021
+ }, [
3022
+ g("ul", kl, [
3023
+ (S(!0), $(G, null, le(n.value, (l, a) => (S(), $("li", {
3024
+ key: `${l.definition_id}-${a}`,
3025
+ innerHTML: l
3026
+ }, null, 8, Rl))), 128))
3027
+ ])
3028
+ ], 2)
3029
+ ])
3030
+ ]));
3031
+ }
3032
+ }, Dl = { class: "card border bg-white rounded-lg" }, Ll = { class: "card-body px-4 py-2 gap-0" }, Vl = { class: "flex justify-between items-center" }, Al = /* @__PURE__ */ g("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), Ml = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, jl = { class: "list-none list-inside" }, Fl = { class: "flex flex-wrap" }, Bl = ["onClick"], zl = {
3033
+ __name: "Synonyms",
3034
+ emits: ["translate"],
3035
+ setup(e, { emit: o }) {
3036
+ const t = E(!0), n = me(), s = w(() => n.synonyms), r = o, i = () => {
3037
+ t.value = !t.value;
3038
+ }, l = (a) => {
3039
+ r("translate", a);
3040
+ };
3041
+ return (a, u) => (S(), $("div", Dl, [
3042
+ g("div", Ll, [
3043
+ g("div", Vl, [
3044
+ Al,
3045
+ z(He, {
3046
+ isExpanded: t.value,
3047
+ onClick: i
3048
+ }, null, 8, ["isExpanded"])
3049
+ ]),
3050
+ g("div", {
3051
+ class: ye(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
3052
+ }, [
3053
+ g("ul", null, [
3054
+ (S(!0), $(G, null, le(s.value, (p, c) => (S(), $("li", {
3055
+ key: `${p.pos}-${c}`,
3056
+ class: "mb-2"
3057
+ }, [
3058
+ g("h5", Ml, ee(p.pos), 1),
3059
+ g("ul", jl, [
3060
+ (S(!0), $(G, null, le(p.items, (h, m) => (S(), $("li", {
3061
+ key: `${h.word}-${m}`,
3062
+ class: "mb-2"
3063
+ }, [
3064
+ g("div", Fl, [
3065
+ (S(!0), $(G, null, le(h.synonym, (v, I) => (S(), $("span", {
3066
+ key: `${v}-${I}`,
3067
+ class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
3068
+ onClick: (V) => l(v)
3069
+ }, ee(v), 9, Bl))), 128))
3070
+ ])
3071
+ ]))), 128))
3072
+ ])
3073
+ ]))), 128))
3074
+ ])
3075
+ ], 2)
2876
3076
  ])
2877
3077
  ]));
2878
3078
  }
2879
- }, Zl = { class: "p-2 bg-neutral-100" }, Xl = { class: "mt-2 grid grid-cols-1 md:grid-cols-2 gap-3" }, es = { class: "w-full" }, ts = { class: "w-full" }, ns = {
3079
+ }, Ul = { class: "bg-white min-h-screen flex flex-col" }, Hl = { class: "py-2 px-5 shadow-lg" }, Wl = { class: "px-5 flex-grow" }, Gl = { class: "flex flex-col lg:flex-row lg:gap-2" }, ql = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, Jl = /* @__PURE__ */ g("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), Kl = { class: "w-full lg:w-[calc(50%-1rem)] my-2" }, Yl = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, Ql = {
2880
3080
  key: 0,
2881
- class: "mt-3 grid grid-cols-1 md:grid-cols-3 gap-3"
2882
- }, ss = {
3081
+ class: "w-full my-4"
3082
+ }, Xl = /* @__PURE__ */ g("div", { class: "mt-auto py-5 px-5" }, [
3083
+ /* @__PURE__ */ g("span", { class: "block text-center text-gray-700" }, " The site is not affiliated with Google Translate "),
3084
+ /* @__PURE__ */ g("span", { class: "block text-center text-gray-700" }, "Since 2011")
3085
+ ], -1), tr = {
2883
3086
  __name: "Popup",
2884
3087
  props: {
2885
3088
  opt: {
@@ -2893,60 +3096,84 @@ const Il = {
2893
3096
  translation: {
2894
3097
  type: Object,
2895
3098
  default: null
3099
+ },
3100
+ isFavoriteFeatureEnabled: {
3101
+ type: Boolean,
3102
+ default: !1
2896
3103
  }
2897
3104
  },
2898
- emits: ["opt", "translate"],
3105
+ emits: ["opt", "translate", "reader", "settings", "fullscreen"],
2899
3106
  setup(e, { emit: o }) {
2900
- var b;
2901
- const t = Go(), n = ye(t), l = st(t), r = sn(t), i = e, s = o, a = S((b = i.translation) == null ? void 0 : b.text);
3107
+ var h;
3108
+ const t = ds(), n = me(t), s = ze(t), r = an(t), i = e, l = o, a = E((h = i.translation) == null ? void 0 : h.text);
2902
3109
  j(
2903
3110
  () => i.translation,
2904
3111
  (m) => {
2905
3112
  r.loading = !1, n.init(m);
2906
3113
  },
2907
3114
  { immediate: !0 }
2908
- ), j([() => i.opt, () => i.languages], ([m, w]) => {
2909
- l.init(m, w);
2910
- }), j([() => l.src, () => l.target], ([m, w]) => {
2911
- s("opt", { src: m, target: w }), a.value && c();
2912
- }), de(() => {
2913
- l.init(i.opt, i.languages);
3115
+ ), j([() => i.opt, () => i.languages], ([m, v]) => {
3116
+ s.init(m, v);
3117
+ }), j([() => s.src, () => s.target], ([m, v]) => {
3118
+ l("opt", { src: m, target: v }), a.value && c(a.value);
3119
+ }), pe(() => {
3120
+ s.init(i.opt, i.languages);
2914
3121
  });
2915
3122
  function u() {
2916
3123
  a.value = "", n.reset();
2917
3124
  }
2918
- function v(m) {
2919
- m && (a.value = m, c());
3125
+ function p(m) {
3126
+ m && c(m);
2920
3127
  }
2921
- function c() {
2922
- r.loading = !0, s("translate", {
2923
- src: l.src,
2924
- target: l.target,
2925
- text: a.value
3128
+ function c(m) {
3129
+ a.value = m, r.loading = !0, l("translate", {
3130
+ src: s.src,
3131
+ target: s.target,
3132
+ text: m
2926
3133
  });
2927
3134
  }
2928
- return (m, w) => (P(), V("div", Zl, [
2929
- H(Qo),
2930
- I("div", Xl, [
2931
- I("div", es, [
2932
- H($l, {
2933
- text: a.value,
2934
- onChange: v,
2935
- onClear: u
2936
- }, null, 8, ["text"])
3135
+ return (m, v) => (S(), $("div", Ul, [
3136
+ g("div", Hl, [
3137
+ z(kn, {
3138
+ onReader: v[0] || (v[0] = (I) => l("reader")),
3139
+ onSettings: v[1] || (v[1] = (I) => l("settings")),
3140
+ onFullScreen: v[2] || (v[2] = (I) => l("fullscreen"))
3141
+ })
3142
+ ]),
3143
+ g("div", Wl, [
3144
+ z(ms, { class: "my-4" }),
3145
+ g("div", Gl, [
3146
+ g("div", ql, [
3147
+ z(tl, {
3148
+ text: a.value,
3149
+ onChange: p,
3150
+ onClear: u
3151
+ }, null, 8, ["text"])
3152
+ ]),
3153
+ Jl,
3154
+ g("div", Kl, [
3155
+ z(il, { isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled }, null, 8, ["isFavoriteFeatureEnabled"])
3156
+ ])
3157
+ ]),
3158
+ g("div", Yl, [
3159
+ P(n).dictionary.length ? (S(), Z(gl, {
3160
+ key: 0,
3161
+ onTranslate: c
3162
+ })) : X("", !0),
3163
+ P(n).definitions.length ? (S(), Z($l, { key: 1 })) : X("", !0),
3164
+ P(n).synonyms.length ? (S(), Z(zl, {
3165
+ key: 2,
3166
+ onTranslate: c
3167
+ })) : X("", !0)
2937
3168
  ]),
2938
- I("div", ts, [
2939
- H(Tl)
2940
- ])
3169
+ P(n).examples.length ? (S(), $("div", Ql, [
3170
+ z(Nl)
3171
+ ])) : X("", !0)
2941
3172
  ]),
2942
- i.translation ? (P(), V("div", ns, [
2943
- H(Ml),
2944
- H(Wl),
2945
- H(Ql)
2946
- ])) : ue("", !0)
3173
+ Xl
2947
3174
  ]));
2948
3175
  }
2949
3176
  };
2950
3177
  export {
2951
- ss as default
3178
+ tr as default
2952
3179
  };