pinia-plugin-persist-state 0.0.0-alpha.1

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.
@@ -0,0 +1,2814 @@
1
+ import "pinia";
2
+ class ln {
3
+ _storage;
4
+ constructor(t) {
5
+ this._storage = t === "localStorage" ? localStorage : sessionStorage;
6
+ }
7
+ clear() {
8
+ this._storage.clear();
9
+ }
10
+ async getItem(t) {
11
+ return new Promise((n, s) => {
12
+ const r = this._storage.getItem(t.toString());
13
+ n(r ? JSON.parse(r) : void 0);
14
+ });
15
+ }
16
+ removeItem(t) {
17
+ this._storage.removeItem(t.toString());
18
+ }
19
+ removeItems(t) {
20
+ for (let n = 0; n < this._storage.length; n++) {
21
+ const s = this._storage.key(n);
22
+ s && (!t || !t.includes(s)) && this._storage.removeItem(s);
23
+ }
24
+ }
25
+ setItem(t, n) {
26
+ this._storage.setItem(n, JSON.stringify(t));
27
+ }
28
+ }
29
+ class un {
30
+ _console;
31
+ _createInstance;
32
+ _name;
33
+ _pluginOptions;
34
+ _storeInstance;
35
+ _resetStoreCallback;
36
+ _storeOnActionSubscription;
37
+ _storeMutationSubscription;
38
+ _subscriptions;
39
+ pluginCreated;
40
+ get console() {
41
+ return this._console ?? console;
42
+ }
43
+ get name() {
44
+ return this._name;
45
+ }
46
+ get pluginOptions() {
47
+ return this._pluginOptions ?? {};
48
+ }
49
+ set pluginOptions(t) {
50
+ this._pluginOptions = t;
51
+ }
52
+ get resetStoreCallback() {
53
+ return this._resetStoreCallback;
54
+ }
55
+ get storeOnActionSubscription() {
56
+ return this._storeOnActionSubscription;
57
+ }
58
+ get storeMutationSubscription() {
59
+ return this._storeMutationSubscription;
60
+ }
61
+ get subscriptions() {
62
+ return this._subscriptions;
63
+ }
64
+ set subscriptions(t) {
65
+ this._subscriptions = t;
66
+ }
67
+ constructor(t, n, s) {
68
+ this._name = t, this._createInstance = n, s && (this._console = s);
69
+ }
70
+ invoke({ store: t, options: n }, s) {
71
+ this._storeInstance = this._createInstance(t, { ...n, ...this.pluginOptions }, s, this.console), this._storeInstance && (this._subscriptions = this._storeInstance.getSubscriptions(), this._storeMutationSubscription = this._storeInstance.storeSubscribe, this._storeOnActionSubscription = this._storeInstance.onAction, this.pluginCreated && this.pluginCreated(t));
72
+ }
73
+ }
74
+ class fn {
75
+ _console;
76
+ _debug = !1;
77
+ get console() {
78
+ return this._console ?? console;
79
+ }
80
+ set console(t) {
81
+ this._console = t;
82
+ }
83
+ get debug() {
84
+ return this._debug;
85
+ }
86
+ set debug(t) {
87
+ this._debug = t;
88
+ }
89
+ constructor(t, n) {
90
+ this._debug = t, n && (this._console = n);
91
+ }
92
+ debugLog(...t) {
93
+ this._debug && (Array.isArray(t) && (t[0] = `${this._className} - ${t[0]}`), this.console.log(...t));
94
+ }
95
+ logError(...t) {
96
+ this.console.error(...t);
97
+ }
98
+ }
99
+ const pn = "pinia-plugin-subscription", hn = (e, t = "white") => `background-color: ${e}; color: ${t}; padding: 1px; margin-right: 5px; font-size: 12px`;
100
+ function dn(e, t) {
101
+ if (!e)
102
+ throw new Error("Style instructions are required");
103
+ console.log(
104
+ "%c%s",
105
+ e,
106
+ t.shift(),
107
+ ...t
108
+ );
109
+ }
110
+ class _n {
111
+ _bgColor = "#ffec73";
112
+ _color = "green";
113
+ _icon = "🍍⚡";
114
+ _errorBgColor = "#d24545";
115
+ _errorColor = "white";
116
+ _errorIcon = "🍍⚠️";
117
+ _styles = {
118
+ error: { bgColor: this._errorBgColor, color: this._errorColor, icon: this._errorIcon },
119
+ info: { bgColor: this._bgColor, color: this._color, icon: this._icon }
120
+ };
121
+ formatMessage(t, n) {
122
+ return ` [${n} ${pn}] - ${t} `;
123
+ }
124
+ generateStyle(t) {
125
+ return hn(t.bgColor, t.color);
126
+ }
127
+ getStyleDefinition(t) {
128
+ return this._styles[t ?? "info"];
129
+ }
130
+ log(...t) {
131
+ this.useLog(
132
+ this.getStyleDefinition(),
133
+ t
134
+ );
135
+ }
136
+ error(...t) {
137
+ this.useLog(
138
+ this.getStyleDefinition("error"),
139
+ t
140
+ );
141
+ }
142
+ rebuildArgs(t, n) {
143
+ if (typeof t == "string")
144
+ return [this.formatMessage(t, n)];
145
+ if (Array.isArray(t))
146
+ return [this.formatMessage(t.shift(), n), ...t ?? []];
147
+ }
148
+ useLog(t, n) {
149
+ dn(
150
+ this.generateStyle(t),
151
+ this.rebuildArgs(n, t.icon)
152
+ );
153
+ }
154
+ }
155
+ const gn = /* @__PURE__ */ new Set(["_", "$"]);
156
+ function yn(e) {
157
+ return gn.has(e[0]);
158
+ }
159
+ function W(e) {
160
+ return e ? Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : typeof e == "string" ? e.trim() === "" : !1 : !(typeof e == "boolean" || typeof e == "number");
161
+ }
162
+ // @__NO_SIDE_EFFECTS__
163
+ function mn(e) {
164
+ const t = /* @__PURE__ */ Object.create(null);
165
+ for (const n of e.split(",")) t[n] = 1;
166
+ return (n) => n in t;
167
+ }
168
+ const Ae = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
169
+ process.env.NODE_ENV !== "production" && Object.freeze([]);
170
+ const bn = () => {
171
+ }, Sn = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
172
+ (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Z = Object.assign, vn = Object.prototype.hasOwnProperty, Me = (e, t) => vn.call(e, t), g = Array.isArray, ee = (e) => _t(e) === "[object Map]", T = (e) => typeof e == "function", C = (e) => typeof e == "string", ce = (e) => typeof e == "symbol", y = (e) => e !== null && typeof e == "object", wn = Object.prototype.toString, _t = (e) => wn.call(e), gt = (e) => _t(e).slice(8, -1), we = (e) => C(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, En = (e) => {
173
+ const t = /* @__PURE__ */ Object.create(null);
174
+ return ((n) => t[n] || (t[n] = e(n)));
175
+ }, Nn = En((e) => e.charAt(0).toUpperCase() + e.slice(1)), ze = (e, t) => !Object.is(e, t);
176
+ let ot;
177
+ const Ee = () => ot || (ot = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
178
+ function Be(e) {
179
+ if (g(e)) {
180
+ const t = {};
181
+ for (let n = 0; n < e.length; n++) {
182
+ const s = e[n], r = C(s) ? Cn(s) : Be(s);
183
+ if (r)
184
+ for (const o in r)
185
+ t[o] = r[o];
186
+ }
187
+ return t;
188
+ } else if (C(e) || y(e))
189
+ return e;
190
+ }
191
+ const On = /;(?![^(]*\))/g, Vn = /:([^]+)/, kn = /\/\*[^]*?\*\//g;
192
+ function Cn(e) {
193
+ const t = {};
194
+ return e.replace(kn, "").split(On).forEach((n) => {
195
+ if (n) {
196
+ const s = n.split(Vn);
197
+ s.length > 1 && (t[s[0].trim()] = s[1].trim());
198
+ }
199
+ }), t;
200
+ }
201
+ function We(e) {
202
+ let t = "";
203
+ if (C(e))
204
+ t = e;
205
+ else if (g(e))
206
+ for (let n = 0; n < e.length; n++) {
207
+ const s = We(e[n]);
208
+ s && (t += s + " ");
209
+ }
210
+ else if (y(e))
211
+ for (const n in e)
212
+ e[n] && (t += n + " ");
213
+ return t.trim();
214
+ }
215
+ function G(e, ...t) {
216
+ console.warn(`[Vue warn] ${e}`, ...t);
217
+ }
218
+ let yt = 0, Ve;
219
+ function Je() {
220
+ yt++;
221
+ }
222
+ function Ye() {
223
+ if (--yt > 0)
224
+ return;
225
+ let e;
226
+ for (; Ve; ) {
227
+ let t = Ve;
228
+ for (Ve = void 0; t; ) {
229
+ const n = t.next;
230
+ if (t.next = void 0, t.flags &= -9, t.flags & 1)
231
+ try {
232
+ t.trigger();
233
+ } catch (s) {
234
+ e || (e = s);
235
+ }
236
+ t = n;
237
+ }
238
+ }
239
+ if (e) throw e;
240
+ }
241
+ class xn {
242
+ // TODO isolatedDeclarations "__v_skip"
243
+ constructor(t) {
244
+ this.computed = t, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, this.__v_skip = !0, process.env.NODE_ENV !== "production" && (this.subsHead = void 0);
245
+ }
246
+ track(t) {
247
+ }
248
+ trigger(t) {
249
+ this.version++, this.notify(t);
250
+ }
251
+ notify(t) {
252
+ Je();
253
+ try {
254
+ if (process.env.NODE_ENV !== "production")
255
+ for (let n = this.subsHead; n; n = n.nextSub)
256
+ n.sub.onTrigger && !(n.sub.flags & 8) && n.sub.onTrigger(
257
+ Z(
258
+ {
259
+ effect: n.sub
260
+ },
261
+ t
262
+ )
263
+ );
264
+ for (let n = this.subs; n; n = n.prevSub)
265
+ n.sub.notify() && n.sub.dep.notify();
266
+ } finally {
267
+ Ye();
268
+ }
269
+ }
270
+ }
271
+ const mt = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ Symbol(
272
+ process.env.NODE_ENV !== "production" ? "Object iterate" : ""
273
+ ), it = /* @__PURE__ */ Symbol(
274
+ process.env.NODE_ENV !== "production" ? "Map keys iterate" : ""
275
+ ), ct = /* @__PURE__ */ Symbol(
276
+ process.env.NODE_ENV !== "production" ? "Array iterate" : ""
277
+ );
278
+ function P(e, t, n, s, r, o) {
279
+ const i = mt.get(e);
280
+ if (!i)
281
+ return;
282
+ const c = (l) => {
283
+ l && (process.env.NODE_ENV !== "production" ? l.trigger({
284
+ target: e,
285
+ type: t,
286
+ key: n,
287
+ newValue: s,
288
+ oldValue: r,
289
+ oldTarget: o
290
+ }) : l.trigger());
291
+ };
292
+ if (Je(), t === "clear")
293
+ i.forEach(c);
294
+ else {
295
+ const l = g(e), f = l && we(n);
296
+ if (l && n === "length") {
297
+ const h = Number(s);
298
+ i.forEach((a, u) => {
299
+ (u === "length" || u === ct || !ce(u) && u >= h) && c(a);
300
+ });
301
+ } else
302
+ switch ((n !== void 0 || i.has(void 0)) && c(i.get(n)), f && c(i.get(ct)), t) {
303
+ case "add":
304
+ l ? f && c(i.get("length")) : (c(i.get(ke)), ee(e) && c(i.get(it)));
305
+ break;
306
+ case "delete":
307
+ l || (c(i.get(ke)), ee(e) && c(i.get(it)));
308
+ break;
309
+ case "set":
310
+ ee(e) && c(i.get(ke));
311
+ break;
312
+ }
313
+ }
314
+ Ye();
315
+ }
316
+ function Rn(e, t) {
317
+ const n = mt.get(e);
318
+ return n && n.get(t);
319
+ }
320
+ function q(e) {
321
+ const t = p(e);
322
+ return t === e || v(e) ? t : t.map(x);
323
+ }
324
+ function Ge(e) {
325
+ return e = p(e), e;
326
+ }
327
+ function R(e, t) {
328
+ return E(e) ? Qe(e) ? ne(x(t)) : ne(t) : x(t);
329
+ }
330
+ const In = {
331
+ __proto__: null,
332
+ [Symbol.iterator]() {
333
+ return Ce(this, Symbol.iterator, (e) => R(this, e));
334
+ },
335
+ concat(...e) {
336
+ return q(this).concat(
337
+ ...e.map((t) => g(t) ? q(t) : t)
338
+ );
339
+ },
340
+ entries() {
341
+ return Ce(this, "entries", (e) => (e[1] = R(this, e[1]), e));
342
+ },
343
+ every(e, t) {
344
+ return O(this, "every", e, t, void 0, arguments);
345
+ },
346
+ filter(e, t) {
347
+ return O(
348
+ this,
349
+ "filter",
350
+ e,
351
+ t,
352
+ (n) => n.map((s) => R(this, s)),
353
+ arguments
354
+ );
355
+ },
356
+ find(e, t) {
357
+ return O(
358
+ this,
359
+ "find",
360
+ e,
361
+ t,
362
+ (n) => R(this, n),
363
+ arguments
364
+ );
365
+ },
366
+ findIndex(e, t) {
367
+ return O(this, "findIndex", e, t, void 0, arguments);
368
+ },
369
+ findLast(e, t) {
370
+ return O(
371
+ this,
372
+ "findLast",
373
+ e,
374
+ t,
375
+ (n) => R(this, n),
376
+ arguments
377
+ );
378
+ },
379
+ findLastIndex(e, t) {
380
+ return O(this, "findLastIndex", e, t, void 0, arguments);
381
+ },
382
+ // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
383
+ forEach(e, t) {
384
+ return O(this, "forEach", e, t, void 0, arguments);
385
+ },
386
+ includes(...e) {
387
+ return xe(this, "includes", e);
388
+ },
389
+ indexOf(...e) {
390
+ return xe(this, "indexOf", e);
391
+ },
392
+ join(e) {
393
+ return q(this).join(e);
394
+ },
395
+ // keys() iterator only reads `length`, no optimization required
396
+ lastIndexOf(...e) {
397
+ return xe(this, "lastIndexOf", e);
398
+ },
399
+ map(e, t) {
400
+ return O(this, "map", e, t, void 0, arguments);
401
+ },
402
+ pop() {
403
+ return X(this, "pop");
404
+ },
405
+ push(...e) {
406
+ return X(this, "push", e);
407
+ },
408
+ reduce(e, ...t) {
409
+ return at(this, "reduce", e, t);
410
+ },
411
+ reduceRight(e, ...t) {
412
+ return at(this, "reduceRight", e, t);
413
+ },
414
+ shift() {
415
+ return X(this, "shift");
416
+ },
417
+ // slice could use ARRAY_ITERATE but also seems to beg for range tracking
418
+ some(e, t) {
419
+ return O(this, "some", e, t, void 0, arguments);
420
+ },
421
+ splice(...e) {
422
+ return X(this, "splice", e);
423
+ },
424
+ toReversed() {
425
+ return q(this).toReversed();
426
+ },
427
+ toSorted(e) {
428
+ return q(this).toSorted(e);
429
+ },
430
+ toSpliced(...e) {
431
+ return q(this).toSpliced(...e);
432
+ },
433
+ unshift(...e) {
434
+ return X(this, "unshift", e);
435
+ },
436
+ values() {
437
+ return Ce(this, "values", (e) => R(this, e));
438
+ }
439
+ };
440
+ function Ce(e, t, n) {
441
+ const s = Ge(e), r = s[t]();
442
+ return s !== e && !v(e) && (r._next = r.next, r.next = () => {
443
+ const o = r._next();
444
+ return o.done || (o.value = n(o.value)), o;
445
+ }), r;
446
+ }
447
+ const Dn = Array.prototype;
448
+ function O(e, t, n, s, r, o) {
449
+ const i = Ge(e), c = i !== e && !v(e), l = i[t];
450
+ if (l !== Dn[t]) {
451
+ const a = l.apply(e, o);
452
+ return c ? x(a) : a;
453
+ }
454
+ let f = n;
455
+ i !== e && (c ? f = function(a, u) {
456
+ return n.call(this, R(e, a), u, e);
457
+ } : n.length > 2 && (f = function(a, u) {
458
+ return n.call(this, a, u, e);
459
+ }));
460
+ const h = l.call(i, f, s);
461
+ return c && r ? r(h) : h;
462
+ }
463
+ function at(e, t, n, s) {
464
+ const r = Ge(e);
465
+ let o = n;
466
+ return r !== e && (v(e) ? n.length > 3 && (o = function(i, c, l) {
467
+ return n.call(this, i, c, l, e);
468
+ }) : o = function(i, c, l) {
469
+ return n.call(this, i, R(e, c), l, e);
470
+ }), r[t](o, ...s);
471
+ }
472
+ function xe(e, t, n) {
473
+ const s = p(e), r = s[t](...n);
474
+ return (r === -1 || r === !1) && te(n[0]) ? (n[0] = p(n[0]), s[t](...n)) : r;
475
+ }
476
+ function X(e, t, n = []) {
477
+ Je();
478
+ const s = p(e)[t].apply(e, n);
479
+ return Ye(), s;
480
+ }
481
+ const Pn = /* @__PURE__ */ mn("__proto__,__v_isRef,__isVue"), bt = new Set(
482
+ /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(ce)
483
+ );
484
+ function jn(e) {
485
+ return ce(e) || (e = String(e)), p(this).hasOwnProperty(e);
486
+ }
487
+ class St {
488
+ constructor(t = !1, n = !1) {
489
+ this._isReadonly = t, this._isShallow = n;
490
+ }
491
+ get(t, n, s) {
492
+ if (n === "__v_skip") return t.__v_skip;
493
+ const r = this._isReadonly, o = this._isShallow;
494
+ if (n === "__v_isReactive")
495
+ return !r;
496
+ if (n === "__v_isReadonly")
497
+ return r;
498
+ if (n === "__v_isShallow")
499
+ return o;
500
+ if (n === "__v_raw")
501
+ return s === (r ? o ? Un : Et : o ? Ln : wt).get(t) || // receiver is not the reactive proxy, but has the same prototype
502
+ // this means the receiver is a user proxy of the reactive proxy
503
+ Object.getPrototypeOf(t) === Object.getPrototypeOf(s) ? t : void 0;
504
+ const i = g(t);
505
+ if (!r) {
506
+ let l;
507
+ if (i && (l = In[n]))
508
+ return l;
509
+ if (n === "hasOwnProperty")
510
+ return jn;
511
+ }
512
+ const c = Reflect.get(
513
+ t,
514
+ n,
515
+ // if this is a proxy wrapping a ref, return methods using the raw ref
516
+ // as receiver so that we don't have to call `toRaw` on the ref in all
517
+ // its class methods
518
+ m(t) ? t : s
519
+ );
520
+ if ((ce(n) ? bt.has(n) : Pn(n)) || o)
521
+ return c;
522
+ if (m(c)) {
523
+ const l = i && we(n) ? c : c.value;
524
+ return r && y(l) ? Fe(l) : l;
525
+ }
526
+ return y(c) ? r ? Fe(c) : Nt(c) : c;
527
+ }
528
+ }
529
+ class $n extends St {
530
+ constructor(t = !1) {
531
+ super(!1, t);
532
+ }
533
+ set(t, n, s, r) {
534
+ let o = t[n];
535
+ const i = g(t) && we(n);
536
+ if (!this._isShallow) {
537
+ const f = E(o);
538
+ if (!v(s) && !E(s) && (o = p(o), s = p(s)), !i && m(o) && !m(s))
539
+ return f ? (process.env.NODE_ENV !== "production" && G(
540
+ `Set operation on key "${String(n)}" failed: target is readonly.`,
541
+ t[n]
542
+ ), !0) : (o.value = s, !0);
543
+ }
544
+ const c = i ? Number(n) < t.length : Me(t, n), l = Reflect.set(
545
+ t,
546
+ n,
547
+ s,
548
+ m(t) ? t : r
549
+ );
550
+ return t === p(r) && (c ? ze(s, o) && P(t, "set", n, s, o) : P(t, "add", n, s)), l;
551
+ }
552
+ deleteProperty(t, n) {
553
+ const s = Me(t, n), r = t[n], o = Reflect.deleteProperty(t, n);
554
+ return o && s && P(t, "delete", n, void 0, r), o;
555
+ }
556
+ has(t, n) {
557
+ const s = Reflect.has(t, n);
558
+ return !ce(n) || bt.has(n), s;
559
+ }
560
+ ownKeys(t) {
561
+ return Reflect.ownKeys(t);
562
+ }
563
+ }
564
+ class Tn extends St {
565
+ constructor(t = !1) {
566
+ super(!0, t);
567
+ }
568
+ set(t, n) {
569
+ return process.env.NODE_ENV !== "production" && G(
570
+ `Set operation on key "${String(n)}" failed: target is readonly.`,
571
+ t
572
+ ), !0;
573
+ }
574
+ deleteProperty(t, n) {
575
+ return process.env.NODE_ENV !== "production" && G(
576
+ `Delete operation on key "${String(n)}" failed: target is readonly.`,
577
+ t
578
+ ), !0;
579
+ }
580
+ }
581
+ const An = /* @__PURE__ */ new $n(), Mn = /* @__PURE__ */ new Tn(), ae = (e) => Reflect.getPrototypeOf(e);
582
+ function Fn(e, t, n) {
583
+ return function(...s) {
584
+ const r = this.__v_raw, o = p(r), i = ee(o), c = e === "entries" || e === Symbol.iterator && i, l = r[e](...s), f = t ? ne : x;
585
+ return {
586
+ // iterator protocol
587
+ next() {
588
+ const { value: h, done: a } = l.next();
589
+ return a ? { value: h, done: a } : {
590
+ value: c ? [f(h[0]), f(h[1])] : f(h),
591
+ done: a
592
+ };
593
+ },
594
+ // iterable protocol
595
+ [Symbol.iterator]() {
596
+ return this;
597
+ }
598
+ };
599
+ };
600
+ }
601
+ function le(e) {
602
+ return function(...t) {
603
+ if (process.env.NODE_ENV !== "production") {
604
+ const n = t[0] ? `on key "${t[0]}" ` : "";
605
+ G(
606
+ `${Nn(e)} operation ${n}failed: target is readonly.`,
607
+ p(this)
608
+ );
609
+ }
610
+ return e === "delete" ? !1 : e === "clear" ? void 0 : this;
611
+ };
612
+ }
613
+ function Kn(e, t) {
614
+ const n = {
615
+ get(s) {
616
+ const r = this.__v_raw, o = p(r), i = p(s), { has: c } = ae(o), l = e ? ne : x;
617
+ if (c.call(o, s))
618
+ return l(r.get(s));
619
+ if (c.call(o, i))
620
+ return l(r.get(i));
621
+ r !== o && r.get(s);
622
+ },
623
+ get size() {
624
+ const s = this.__v_raw;
625
+ return !e && p(s), s.size;
626
+ },
627
+ has(s) {
628
+ const r = this.__v_raw;
629
+ p(r);
630
+ const o = p(s);
631
+ return s === o ? r.has(s) : r.has(s) || r.has(o);
632
+ },
633
+ forEach(s, r) {
634
+ const o = this, i = o.__v_raw;
635
+ p(i);
636
+ const c = e ? ne : x;
637
+ return i.forEach((l, f) => s.call(r, c(l), c(f), o));
638
+ }
639
+ };
640
+ return Z(
641
+ n,
642
+ e ? {
643
+ add: le("add"),
644
+ set: le("set"),
645
+ delete: le("delete"),
646
+ clear: le("clear")
647
+ } : {
648
+ add(s) {
649
+ !v(s) && !E(s) && (s = p(s));
650
+ const r = p(this);
651
+ return ae(r).has.call(r, s) || (r.add(s), P(r, "add", s, s)), this;
652
+ },
653
+ set(s, r) {
654
+ !v(r) && !E(r) && (r = p(r));
655
+ const o = p(this), { has: i, get: c } = ae(o);
656
+ let l = i.call(o, s);
657
+ l ? process.env.NODE_ENV !== "production" && lt(o, i, s) : (s = p(s), l = i.call(o, s));
658
+ const f = c.call(o, s);
659
+ return o.set(s, r), l ? ze(r, f) && P(o, "set", s, r, f) : P(o, "add", s, r), this;
660
+ },
661
+ delete(s) {
662
+ const r = p(this), { has: o, get: i } = ae(r);
663
+ let c = o.call(r, s);
664
+ c ? process.env.NODE_ENV !== "production" && lt(r, o, s) : (s = p(s), c = o.call(r, s));
665
+ const l = i ? i.call(r, s) : void 0, f = r.delete(s);
666
+ return c && P(r, "delete", s, void 0, l), f;
667
+ },
668
+ clear() {
669
+ const s = p(this), r = s.size !== 0, o = process.env.NODE_ENV !== "production" ? ee(s) ? new Map(s) : new Set(s) : void 0, i = s.clear();
670
+ return r && P(
671
+ s,
672
+ "clear",
673
+ void 0,
674
+ void 0,
675
+ o
676
+ ), i;
677
+ }
678
+ }
679
+ ), [
680
+ "keys",
681
+ "values",
682
+ "entries",
683
+ Symbol.iterator
684
+ ].forEach((s) => {
685
+ n[s] = Fn(s, e);
686
+ }), n;
687
+ }
688
+ function vt(e, t) {
689
+ const n = Kn(e);
690
+ return (s, r, o) => r === "__v_isReactive" ? !e : r === "__v_isReadonly" ? e : r === "__v_raw" ? s : Reflect.get(
691
+ Me(n, r) && r in s ? n : s,
692
+ r,
693
+ o
694
+ );
695
+ }
696
+ const Hn = {
697
+ get: /* @__PURE__ */ vt(!1)
698
+ }, qn = {
699
+ get: /* @__PURE__ */ vt(!0)
700
+ };
701
+ function lt(e, t, n) {
702
+ const s = p(n);
703
+ if (s !== n && t.call(e, s)) {
704
+ const r = gt(e);
705
+ G(
706
+ `Reactive ${r} contains both the raw and reactive versions of the same object${r === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
707
+ );
708
+ }
709
+ }
710
+ const wt = /* @__PURE__ */ new WeakMap(), Ln = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap();
711
+ function zn(e) {
712
+ switch (e) {
713
+ case "Object":
714
+ case "Array":
715
+ return 1;
716
+ case "Map":
717
+ case "Set":
718
+ case "WeakMap":
719
+ case "WeakSet":
720
+ return 2;
721
+ default:
722
+ return 0;
723
+ }
724
+ }
725
+ function Bn(e) {
726
+ return e.__v_skip || !Object.isExtensible(e) ? 0 : zn(gt(e));
727
+ }
728
+ function Nt(e) {
729
+ return E(e) ? e : Ot(
730
+ e,
731
+ !1,
732
+ An,
733
+ Hn,
734
+ wt
735
+ );
736
+ }
737
+ function Fe(e) {
738
+ return Ot(
739
+ e,
740
+ !0,
741
+ Mn,
742
+ qn,
743
+ Et
744
+ );
745
+ }
746
+ function Ot(e, t, n, s, r) {
747
+ if (!y(e))
748
+ return process.env.NODE_ENV !== "production" && G(
749
+ `value cannot be made ${t ? "readonly" : "reactive"}: ${String(
750
+ e
751
+ )}`
752
+ ), e;
753
+ if (e.__v_raw && !(t && e.__v_isReactive))
754
+ return e;
755
+ const o = Bn(e);
756
+ if (o === 0)
757
+ return e;
758
+ const i = r.get(e);
759
+ if (i)
760
+ return i;
761
+ const c = new Proxy(
762
+ e,
763
+ o === 2 ? s : n
764
+ );
765
+ return r.set(e, c), c;
766
+ }
767
+ function Qe(e) {
768
+ return E(e) ? Qe(e.__v_raw) : !!(e && e.__v_isReactive);
769
+ }
770
+ function E(e) {
771
+ return !!(e && e.__v_isReadonly);
772
+ }
773
+ function v(e) {
774
+ return !!(e && e.__v_isShallow);
775
+ }
776
+ function te(e) {
777
+ return e ? !!e.__v_raw : !1;
778
+ }
779
+ function p(e) {
780
+ const t = e && e.__v_raw;
781
+ return t ? p(t) : e;
782
+ }
783
+ const x = (e) => y(e) ? Nt(e) : e, ne = (e) => y(e) ? Fe(e) : e;
784
+ function m(e) {
785
+ return e ? e.__v_isRef === !0 : !1;
786
+ }
787
+ function Vt(e) {
788
+ return Wn(e, !1);
789
+ }
790
+ function Wn(e, t) {
791
+ return m(e) ? e : new Jn(e, t);
792
+ }
793
+ class Jn {
794
+ constructor(t, n) {
795
+ this.dep = new xn(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = n ? t : p(t), this._value = n ? t : x(t), this.__v_isShallow = n;
796
+ }
797
+ get value() {
798
+ return process.env.NODE_ENV !== "production" ? this.dep.track({
799
+ target: this,
800
+ type: "get",
801
+ key: "value"
802
+ }) : this.dep.track(), this._value;
803
+ }
804
+ set value(t) {
805
+ const n = this._rawValue, s = this.__v_isShallow || v(t) || E(t);
806
+ t = s ? t : p(t), ze(t, n) && (this._rawValue = t, this._value = s ? t : x(t), process.env.NODE_ENV !== "production" ? this.dep.trigger({
807
+ target: this,
808
+ type: "set",
809
+ key: "value",
810
+ newValue: t,
811
+ oldValue: n
812
+ }) : this.dep.trigger());
813
+ }
814
+ }
815
+ function Yn(e) {
816
+ return m(e) ? e.value : e;
817
+ }
818
+ class Gn {
819
+ constructor(t, n, s) {
820
+ this._object = t, this._key = n, this._defaultValue = s, this.__v_isRef = !0, this._value = void 0, this._raw = p(t);
821
+ let r = !0, o = t;
822
+ if (!g(t) || !we(String(n)))
823
+ do
824
+ r = !te(o) || v(o);
825
+ while (r && (o = o.__v_raw));
826
+ this._shallow = r;
827
+ }
828
+ get value() {
829
+ let t = this._object[this._key];
830
+ return this._shallow && (t = Yn(t)), this._value = t === void 0 ? this._defaultValue : t;
831
+ }
832
+ set value(t) {
833
+ if (this._shallow && m(this._raw[this._key])) {
834
+ const n = this._object[this._key];
835
+ if (m(n)) {
836
+ n.value = t;
837
+ return;
838
+ }
839
+ }
840
+ this._object[this._key] = t;
841
+ }
842
+ get dep() {
843
+ return Rn(this._raw, this._key);
844
+ }
845
+ }
846
+ class Qn {
847
+ constructor(t) {
848
+ this._getter = t, this.__v_isRef = !0, this.__v_isReadonly = !0, this._value = void 0;
849
+ }
850
+ get value() {
851
+ return this._value = this._getter();
852
+ }
853
+ }
854
+ function Zn(e, t, n) {
855
+ return m(e) ? e : T(e) ? new Qn(e) : y(e) && arguments.length > 1 ? Xn(e, t, n) : Vt(e);
856
+ }
857
+ function Xn(e, t, n) {
858
+ return new Gn(e, t, n);
859
+ }
860
+ const M = [];
861
+ function es(e) {
862
+ M.push(e);
863
+ }
864
+ function ts() {
865
+ M.pop();
866
+ }
867
+ let Re = !1;
868
+ function se(e, ...t) {
869
+ if (Re) return;
870
+ Re = !0;
871
+ const n = M.length ? M[M.length - 1].component : null, s = n && n.appContext.config.warnHandler, r = ns();
872
+ if (s)
873
+ Ze(
874
+ s,
875
+ n,
876
+ 11,
877
+ [
878
+ // eslint-disable-next-line no-restricted-syntax
879
+ e + t.map((o) => {
880
+ var i, c;
881
+ return (c = (i = o.toString) == null ? void 0 : i.call(o)) != null ? c : JSON.stringify(o);
882
+ }).join(""),
883
+ n && n.proxy,
884
+ r.map(
885
+ ({ vnode: o }) => `at <${Kt(n, o.type)}>`
886
+ ).join(`
887
+ `),
888
+ r
889
+ ]
890
+ );
891
+ else {
892
+ const o = [`[Vue warn]: ${e}`, ...t];
893
+ r.length && o.push(`
894
+ `, ...ss(r)), console.warn(...o);
895
+ }
896
+ Re = !1;
897
+ }
898
+ function ns() {
899
+ let e = M[M.length - 1];
900
+ if (!e)
901
+ return [];
902
+ const t = [];
903
+ for (; e; ) {
904
+ const n = t[0];
905
+ n && n.vnode === e ? n.recurseCount++ : t.push({
906
+ vnode: e,
907
+ recurseCount: 0
908
+ });
909
+ const s = e.component && e.component.parent;
910
+ e = s && s.vnode;
911
+ }
912
+ return t;
913
+ }
914
+ function ss(e) {
915
+ const t = [];
916
+ return e.forEach((n, s) => {
917
+ t.push(...s === 0 ? [] : [`
918
+ `], ...rs(n));
919
+ }), t;
920
+ }
921
+ function rs({ vnode: e, recurseCount: t }) {
922
+ const n = t > 0 ? `... (${t} recursive calls)` : "", s = e.component ? e.component.parent == null : !1, r = ` at <${Kt(
923
+ e.component,
924
+ e.type,
925
+ s
926
+ )}`, o = ">" + n;
927
+ return e.props ? [r, ...os(e.props), o] : [r + o];
928
+ }
929
+ function os(e) {
930
+ const t = [], n = Object.keys(e);
931
+ return n.slice(0, 3).forEach((s) => {
932
+ t.push(...kt(s, e[s]));
933
+ }), n.length > 3 && t.push(" ..."), t;
934
+ }
935
+ function kt(e, t, n) {
936
+ return C(t) ? (t = JSON.stringify(t), n ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? n ? t : [`${e}=${t}`] : m(t) ? (t = kt(e, p(t.value), !0), n ? t : [`${e}=Ref<`, t, ">"]) : T(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = p(t), n ? t : [`${e}=`, t]);
937
+ }
938
+ const Ct = {
939
+ sp: "serverPrefetch hook",
940
+ bc: "beforeCreate hook",
941
+ c: "created hook",
942
+ bm: "beforeMount hook",
943
+ m: "mounted hook",
944
+ bu: "beforeUpdate hook",
945
+ u: "updated",
946
+ bum: "beforeUnmount hook",
947
+ um: "unmounted hook",
948
+ a: "activated hook",
949
+ da: "deactivated hook",
950
+ ec: "errorCaptured hook",
951
+ rtc: "renderTracked hook",
952
+ rtg: "renderTriggered hook",
953
+ 0: "setup function",
954
+ 1: "render function",
955
+ 2: "watcher getter",
956
+ 3: "watcher callback",
957
+ 4: "watcher cleanup function",
958
+ 5: "native event handler",
959
+ 6: "component event handler",
960
+ 7: "vnode hook",
961
+ 8: "directive hook",
962
+ 9: "transition hook",
963
+ 10: "app errorHandler",
964
+ 11: "app warnHandler",
965
+ 12: "ref function",
966
+ 13: "async component loader",
967
+ 14: "scheduler flush",
968
+ 15: "component update",
969
+ 16: "app unmount cleanup function"
970
+ };
971
+ function Ze(e, t, n, s) {
972
+ try {
973
+ return s ? e(...s) : e();
974
+ } catch (r) {
975
+ xt(r, t, n);
976
+ }
977
+ }
978
+ function xt(e, t, n, s = !0) {
979
+ const r = t ? t.vnode : null, { errorHandler: o, throwUnhandledErrorInProduction: i } = t && t.appContext.config || Ae;
980
+ if (t) {
981
+ let c = t.parent;
982
+ const l = t.proxy, f = process.env.NODE_ENV !== "production" ? Ct[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
983
+ for (; c; ) {
984
+ const h = c.ec;
985
+ if (h) {
986
+ for (let a = 0; a < h.length; a++)
987
+ if (h[a](e, l, f) === !1)
988
+ return;
989
+ }
990
+ c = c.parent;
991
+ }
992
+ if (o) {
993
+ Ze(o, null, 10, [
994
+ e,
995
+ l,
996
+ f
997
+ ]);
998
+ return;
999
+ }
1000
+ }
1001
+ is(e, n, r, s, i);
1002
+ }
1003
+ function is(e, t, n, s = !0, r = !1) {
1004
+ if (process.env.NODE_ENV !== "production") {
1005
+ const o = Ct[t];
1006
+ if (n && es(n), se(`Unhandled error${o ? ` during execution of ${o}` : ""}`), n && ts(), s)
1007
+ throw e;
1008
+ console.error(e);
1009
+ } else {
1010
+ if (r)
1011
+ throw e;
1012
+ console.error(e);
1013
+ }
1014
+ }
1015
+ const b = [];
1016
+ let V = -1;
1017
+ const J = [];
1018
+ let I = null, U = 0;
1019
+ const cs = /* @__PURE__ */ Promise.resolve();
1020
+ let Ke = null;
1021
+ const as = 100;
1022
+ function ls(e) {
1023
+ let t = V + 1, n = b.length;
1024
+ for (; t < n; ) {
1025
+ const s = t + n >>> 1, r = b[s], o = re(r);
1026
+ o < e || o === e && r.flags & 2 ? t = s + 1 : n = s;
1027
+ }
1028
+ return t;
1029
+ }
1030
+ function us(e) {
1031
+ if (!(e.flags & 1)) {
1032
+ const t = re(e), n = b[b.length - 1];
1033
+ !n || // fast path when the job id is larger than the tail
1034
+ !(e.flags & 2) && t >= re(n) ? b.push(e) : b.splice(ls(t), 0, e), e.flags |= 1, Rt();
1035
+ }
1036
+ }
1037
+ function Rt() {
1038
+ Ke || (Ke = cs.then(It));
1039
+ }
1040
+ function fs(e) {
1041
+ g(e) ? J.push(...e) : I && e.id === -1 ? I.splice(U + 1, 0, e) : e.flags & 1 || (J.push(e), e.flags |= 1), Rt();
1042
+ }
1043
+ function ps(e) {
1044
+ if (J.length) {
1045
+ const t = [...new Set(J)].sort(
1046
+ (n, s) => re(n) - re(s)
1047
+ );
1048
+ if (J.length = 0, I) {
1049
+ I.push(...t);
1050
+ return;
1051
+ }
1052
+ for (I = t, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), U = 0; U < I.length; U++) {
1053
+ const n = I[U];
1054
+ process.env.NODE_ENV !== "production" && Dt(e, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
1055
+ }
1056
+ I = null, U = 0;
1057
+ }
1058
+ }
1059
+ const re = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
1060
+ function It(e) {
1061
+ process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
1062
+ const t = process.env.NODE_ENV !== "production" ? (n) => Dt(e, n) : bn;
1063
+ try {
1064
+ for (V = 0; V < b.length; V++) {
1065
+ const n = b[V];
1066
+ if (n && !(n.flags & 8)) {
1067
+ if (process.env.NODE_ENV !== "production" && t(n))
1068
+ continue;
1069
+ n.flags & 4 && (n.flags &= -2), Ze(
1070
+ n,
1071
+ n.i,
1072
+ n.i ? 15 : 14
1073
+ ), n.flags & 4 || (n.flags &= -2);
1074
+ }
1075
+ }
1076
+ } finally {
1077
+ for (; V < b.length; V++) {
1078
+ const n = b[V];
1079
+ n && (n.flags &= -2);
1080
+ }
1081
+ V = -1, b.length = 0, ps(e), Ke = null, (b.length || J.length) && It(e);
1082
+ }
1083
+ }
1084
+ function Dt(e, t) {
1085
+ const n = e.get(t) || 0;
1086
+ if (n > as) {
1087
+ const s = t.i, r = s && Ft(s.type);
1088
+ return xt(
1089
+ `Maximum recursive updates exceeded${r ? ` in component <${r}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
1090
+ null,
1091
+ 10
1092
+ ), !0;
1093
+ }
1094
+ return e.set(t, n + 1), !1;
1095
+ }
1096
+ const Ie = /* @__PURE__ */ new Map();
1097
+ process.env.NODE_ENV !== "production" && (Ee().__VUE_HMR_RUNTIME__ = {
1098
+ createRecord: De(hs),
1099
+ rerender: De(ds),
1100
+ reload: De(_s)
1101
+ });
1102
+ const he = /* @__PURE__ */ new Map();
1103
+ function hs(e, t) {
1104
+ return he.has(e) ? !1 : (he.set(e, {
1105
+ initialDef: de(t),
1106
+ instances: /* @__PURE__ */ new Set()
1107
+ }), !0);
1108
+ }
1109
+ function de(e) {
1110
+ return Ht(e) ? e.__vccOpts : e;
1111
+ }
1112
+ function ds(e, t) {
1113
+ const n = he.get(e);
1114
+ n && (n.initialDef.render = t, [...n.instances].forEach((s) => {
1115
+ t && (s.render = t, de(s.type).render = t), s.renderCache = [], s.job.flags & 8 || s.update();
1116
+ }));
1117
+ }
1118
+ function _s(e, t) {
1119
+ const n = he.get(e);
1120
+ if (!n) return;
1121
+ t = de(t), ut(n.initialDef, t);
1122
+ const s = [...n.instances];
1123
+ for (let r = 0; r < s.length; r++) {
1124
+ const o = s[r], i = de(o.type);
1125
+ let c = Ie.get(i);
1126
+ c || (i !== n.initialDef && ut(i, t), Ie.set(i, c = /* @__PURE__ */ new Set())), c.add(o), o.appContext.propsCache.delete(o.type), o.appContext.emitsCache.delete(o.type), o.appContext.optionsCache.delete(o.type), o.ceReload ? (c.add(o), o.ceReload(t.styles), c.delete(o)) : o.parent ? us(() => {
1127
+ o.job.flags & 8 || (o.parent.update(), c.delete(o));
1128
+ }) : o.appContext.reload ? o.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
1129
+ "[HMR] Root or manually mounted instance modified. Full reload required."
1130
+ ), o.root.ce && o !== o.root && o.root.ce._removeChildStyle(i);
1131
+ }
1132
+ fs(() => {
1133
+ Ie.clear();
1134
+ });
1135
+ }
1136
+ function ut(e, t) {
1137
+ Z(e, t);
1138
+ for (const n in e)
1139
+ n !== "__file" && !(n in t) && delete e[n];
1140
+ }
1141
+ function De(e) {
1142
+ return (t, n) => {
1143
+ try {
1144
+ return e(t, n);
1145
+ } catch (s) {
1146
+ console.error(s), console.warn(
1147
+ "[HMR] Something went wrong during Vue component hot-reload. Full reload required."
1148
+ );
1149
+ }
1150
+ };
1151
+ }
1152
+ let _e = null, gs = null;
1153
+ const ys = (e) => e.__isTeleport;
1154
+ function Pt(e, t) {
1155
+ e.shapeFlag & 6 && e.component ? (e.transition = t, Pt(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
1156
+ }
1157
+ Ee().requestIdleCallback;
1158
+ Ee().cancelIdleCallback;
1159
+ const ms = /* @__PURE__ */ Symbol.for("v-ndc");
1160
+ process.env.NODE_ENV;
1161
+ const bs = {}, jt = (e) => Object.getPrototypeOf(e) === bs, Ss = (e) => e.__isSuspense, $t = /* @__PURE__ */ Symbol.for("v-fgt"), vs = /* @__PURE__ */ Symbol.for("v-txt"), ws = /* @__PURE__ */ Symbol.for("v-cmt");
1162
+ function Es(e) {
1163
+ return e ? e.__v_isVNode === !0 : !1;
1164
+ }
1165
+ const Ns = (...e) => At(
1166
+ ...e
1167
+ ), Tt = ({ key: e }) => e ?? null, fe = ({
1168
+ ref: e,
1169
+ ref_key: t,
1170
+ ref_for: n
1171
+ }) => (typeof e == "number" && (e = "" + e), e != null ? C(e) || m(e) || T(e) ? { i: _e, r: e, k: t, f: !!n } : e : null);
1172
+ function Os(e, t = null, n = null, s = 0, r = null, o = e === $t ? 0 : 1, i = !1, c = !1) {
1173
+ const l = {
1174
+ __v_isVNode: !0,
1175
+ __v_skip: !0,
1176
+ type: e,
1177
+ props: t,
1178
+ key: t && Tt(t),
1179
+ ref: t && fe(t),
1180
+ scopeId: gs,
1181
+ slotScopeIds: null,
1182
+ children: n,
1183
+ component: null,
1184
+ suspense: null,
1185
+ ssContent: null,
1186
+ ssFallback: null,
1187
+ dirs: null,
1188
+ transition: null,
1189
+ el: null,
1190
+ anchor: null,
1191
+ target: null,
1192
+ targetStart: null,
1193
+ targetAnchor: null,
1194
+ staticCount: 0,
1195
+ shapeFlag: o,
1196
+ patchFlag: s,
1197
+ dynamicProps: r,
1198
+ dynamicChildren: null,
1199
+ appContext: null,
1200
+ ctx: _e
1201
+ };
1202
+ return c ? (Xe(l, n), o & 128 && e.normalize(l)) : n && (l.shapeFlag |= C(n) ? 8 : 16), process.env.NODE_ENV !== "production" && l.key !== l.key && se("VNode created with invalid key (NaN). VNode type:", l.type), l;
1203
+ }
1204
+ const Vs = process.env.NODE_ENV !== "production" ? Ns : At;
1205
+ function At(e, t = null, n = null, s = 0, r = null, o = !1) {
1206
+ if ((!e || e === ms) && (process.env.NODE_ENV !== "production" && !e && se(`Invalid vnode type when creating vnode: ${e}.`), e = ws), Es(e)) {
1207
+ const c = ge(
1208
+ e,
1209
+ t,
1210
+ !0
1211
+ /* mergeRef: true */
1212
+ );
1213
+ return n && Xe(c, n), c.patchFlag = -2, c;
1214
+ }
1215
+ if (Ht(e) && (e = e.__vccOpts), t) {
1216
+ t = ks(t);
1217
+ let { class: c, style: l } = t;
1218
+ c && !C(c) && (t.class = We(c)), y(l) && (te(l) && !g(l) && (l = Z({}, l)), t.style = Be(l));
1219
+ }
1220
+ const i = C(e) ? 1 : Ss(e) ? 128 : ys(e) ? 64 : y(e) ? 4 : T(e) ? 2 : 0;
1221
+ return process.env.NODE_ENV !== "production" && i & 4 && te(e) && (e = p(e), se(
1222
+ "Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
1223
+ `
1224
+ Component that was made reactive: `,
1225
+ e
1226
+ )), Os(
1227
+ e,
1228
+ t,
1229
+ n,
1230
+ s,
1231
+ r,
1232
+ i,
1233
+ o,
1234
+ !0
1235
+ );
1236
+ }
1237
+ function ks(e) {
1238
+ return e ? te(e) || jt(e) ? Z({}, e) : e : null;
1239
+ }
1240
+ function ge(e, t, n = !1, s = !1) {
1241
+ const { props: r, ref: o, patchFlag: i, children: c, transition: l } = e, f = t ? xs(r || {}, t) : r, h = {
1242
+ __v_isVNode: !0,
1243
+ __v_skip: !0,
1244
+ type: e.type,
1245
+ props: f,
1246
+ key: f && Tt(f),
1247
+ ref: t && t.ref ? (
1248
+ // #2078 in the case of <component :is="vnode" ref="extra"/>
1249
+ // if the vnode itself already has a ref, cloneVNode will need to merge
1250
+ // the refs so the single vnode can be set on multiple refs
1251
+ n && o ? g(o) ? o.concat(fe(t)) : [o, fe(t)] : fe(t)
1252
+ ) : o,
1253
+ scopeId: e.scopeId,
1254
+ slotScopeIds: e.slotScopeIds,
1255
+ children: process.env.NODE_ENV !== "production" && i === -1 && g(c) ? c.map(Mt) : c,
1256
+ target: e.target,
1257
+ targetStart: e.targetStart,
1258
+ targetAnchor: e.targetAnchor,
1259
+ staticCount: e.staticCount,
1260
+ shapeFlag: e.shapeFlag,
1261
+ // if the vnode is cloned with extra props, we can no longer assume its
1262
+ // existing patch flag to be reliable and need to add the FULL_PROPS flag.
1263
+ // note: preserve flag for fragments since they use the flag for children
1264
+ // fast paths only.
1265
+ patchFlag: t && e.type !== $t ? i === -1 ? 16 : i | 16 : i,
1266
+ dynamicProps: e.dynamicProps,
1267
+ dynamicChildren: e.dynamicChildren,
1268
+ appContext: e.appContext,
1269
+ dirs: e.dirs,
1270
+ transition: l,
1271
+ // These should technically only be non-null on mounted VNodes. However,
1272
+ // they *should* be copied for kept-alive vnodes. So we just always copy
1273
+ // them since them being non-null during a mount doesn't affect the logic as
1274
+ // they will simply be overwritten.
1275
+ component: e.component,
1276
+ suspense: e.suspense,
1277
+ ssContent: e.ssContent && ge(e.ssContent),
1278
+ ssFallback: e.ssFallback && ge(e.ssFallback),
1279
+ placeholder: e.placeholder,
1280
+ el: e.el,
1281
+ anchor: e.anchor,
1282
+ ctx: e.ctx,
1283
+ ce: e.ce
1284
+ };
1285
+ return l && s && Pt(
1286
+ h,
1287
+ l.clone(h)
1288
+ ), h;
1289
+ }
1290
+ function Mt(e) {
1291
+ const t = ge(e);
1292
+ return g(e.children) && (t.children = e.children.map(Mt)), t;
1293
+ }
1294
+ function Cs(e = " ", t = 0) {
1295
+ return Vs(vs, null, e, t);
1296
+ }
1297
+ function Xe(e, t) {
1298
+ let n = 0;
1299
+ const { shapeFlag: s } = e;
1300
+ if (t == null)
1301
+ t = null;
1302
+ else if (g(t))
1303
+ n = 16;
1304
+ else if (typeof t == "object")
1305
+ if (s & 65) {
1306
+ const r = t.default;
1307
+ r && (r._c && (r._d = !1), Xe(e, r()), r._c && (r._d = !0));
1308
+ return;
1309
+ } else
1310
+ n = 32, !t._ && !jt(t) && (t._ctx = _e);
1311
+ else T(t) ? (t = { default: t, _ctx: _e }, n = 32) : (t = String(t), s & 64 ? (n = 16, t = [Cs(t)]) : n = 8);
1312
+ e.children = t, e.shapeFlag |= n;
1313
+ }
1314
+ function xs(...e) {
1315
+ const t = {};
1316
+ for (let n = 0; n < e.length; n++) {
1317
+ const s = e[n];
1318
+ for (const r in s)
1319
+ if (r === "class")
1320
+ t.class !== s.class && (t.class = We([t.class, s.class]));
1321
+ else if (r === "style")
1322
+ t.style = Be([t.style, s.style]);
1323
+ else if (Sn(r)) {
1324
+ const o = t[r], i = s[r];
1325
+ i && o !== i && !(g(o) && o.includes(i)) && (t[r] = o ? [].concat(o, i) : i);
1326
+ } else r !== "" && (t[r] = s[r]);
1327
+ }
1328
+ return t;
1329
+ }
1330
+ {
1331
+ const e = Ee(), t = (n, s) => {
1332
+ let r;
1333
+ return (r = e[n]) || (r = e[n] = []), r.push(s), (o) => {
1334
+ r.length > 1 ? r.forEach((i) => i(o)) : r[0](o);
1335
+ };
1336
+ };
1337
+ t(
1338
+ "__VUE_INSTANCE_SETTERS__",
1339
+ (n) => n
1340
+ ), t(
1341
+ "__VUE_SSR_SETTERS__",
1342
+ (n) => n
1343
+ );
1344
+ }
1345
+ process.env.NODE_ENV;
1346
+ const Rs = /(?:^|[-_])\w/g, Is = (e) => e.replace(Rs, (t) => t.toUpperCase()).replace(/[-_]/g, "");
1347
+ function Ft(e, t = !0) {
1348
+ return T(e) ? e.displayName || e.name : e.name || t && e.__name;
1349
+ }
1350
+ function Kt(e, t, n = !1) {
1351
+ let s = Ft(t);
1352
+ if (!s && t.__file) {
1353
+ const r = t.__file.match(/([^/\\]+)\.\w+$/);
1354
+ r && (s = r[1]);
1355
+ }
1356
+ if (!s && e) {
1357
+ const r = (o) => {
1358
+ for (const i in o)
1359
+ if (o[i] === t)
1360
+ return i;
1361
+ };
1362
+ s = r(e.components) || e.parent && r(
1363
+ e.parent.type.components
1364
+ ) || r(e.appContext.components);
1365
+ }
1366
+ return s ? Is(s) : n ? "App" : "Anonymous";
1367
+ }
1368
+ function Ht(e) {
1369
+ return T(e) && "__vccOpts" in e;
1370
+ }
1371
+ function Ds() {
1372
+ if (process.env.NODE_ENV === "production" || typeof window > "u")
1373
+ return;
1374
+ const e = { style: "color:#3ba776" }, t = { style: "color:#1677ff" }, n = { style: "color:#f5222d" }, s = { style: "color:#eb2f96" }, r = {
1375
+ __vue_custom_formatter: !0,
1376
+ header(a) {
1377
+ if (!y(a))
1378
+ return null;
1379
+ if (a.__isVue)
1380
+ return ["div", e, "VueInstance"];
1381
+ if (m(a)) {
1382
+ const u = a.value;
1383
+ return [
1384
+ "div",
1385
+ {},
1386
+ ["span", e, h(a)],
1387
+ "<",
1388
+ c(u),
1389
+ ">"
1390
+ ];
1391
+ } else {
1392
+ if (Qe(a))
1393
+ return [
1394
+ "div",
1395
+ {},
1396
+ ["span", e, v(a) ? "ShallowReactive" : "Reactive"],
1397
+ "<",
1398
+ c(a),
1399
+ `>${E(a) ? " (readonly)" : ""}`
1400
+ ];
1401
+ if (E(a))
1402
+ return [
1403
+ "div",
1404
+ {},
1405
+ ["span", e, v(a) ? "ShallowReadonly" : "Readonly"],
1406
+ "<",
1407
+ c(a),
1408
+ ">"
1409
+ ];
1410
+ }
1411
+ return null;
1412
+ },
1413
+ hasBody(a) {
1414
+ return a && a.__isVue;
1415
+ },
1416
+ body(a) {
1417
+ if (a && a.__isVue)
1418
+ return [
1419
+ "div",
1420
+ {},
1421
+ ...o(a.$)
1422
+ ];
1423
+ }
1424
+ };
1425
+ function o(a) {
1426
+ const u = [];
1427
+ a.type.props && a.props && u.push(i("props", p(a.props))), a.setupState !== Ae && u.push(i("setup", a.setupState)), a.data !== Ae && u.push(i("data", p(a.data)));
1428
+ const d = l(a, "computed");
1429
+ d && u.push(i("computed", d));
1430
+ const _ = l(a, "inject");
1431
+ return _ && u.push(i("injected", _)), u.push([
1432
+ "div",
1433
+ {},
1434
+ [
1435
+ "span",
1436
+ {
1437
+ style: s.style + ";opacity:0.66"
1438
+ },
1439
+ "$ (internal): "
1440
+ ],
1441
+ ["object", { object: a }]
1442
+ ]), u;
1443
+ }
1444
+ function i(a, u) {
1445
+ return u = Z({}, u), Object.keys(u).length ? [
1446
+ "div",
1447
+ { style: "line-height:1.25em;margin-bottom:0.6em" },
1448
+ [
1449
+ "div",
1450
+ {
1451
+ style: "color:#476582"
1452
+ },
1453
+ a
1454
+ ],
1455
+ [
1456
+ "div",
1457
+ {
1458
+ style: "padding-left:1.25em"
1459
+ },
1460
+ ...Object.keys(u).map((d) => [
1461
+ "div",
1462
+ {},
1463
+ ["span", s, d + ": "],
1464
+ c(u[d], !1)
1465
+ ])
1466
+ ]
1467
+ ] : ["span", {}];
1468
+ }
1469
+ function c(a, u = !0) {
1470
+ return typeof a == "number" ? ["span", t, a] : typeof a == "string" ? ["span", n, JSON.stringify(a)] : typeof a == "boolean" ? ["span", s, a] : y(a) ? ["object", { object: u ? p(a) : a }] : ["span", n, String(a)];
1471
+ }
1472
+ function l(a, u) {
1473
+ const d = a.type;
1474
+ if (T(d))
1475
+ return;
1476
+ const _ = {};
1477
+ for (const w in a.ctx)
1478
+ f(d, w, u) && (_[w] = a.ctx[w]);
1479
+ return _;
1480
+ }
1481
+ function f(a, u, d) {
1482
+ const _ = a[d];
1483
+ if (g(_) && _.includes(u) || y(_) && u in _ || a.extends && f(a.extends, u, d) || a.mixins && a.mixins.some((w) => f(w, u, d)))
1484
+ return !0;
1485
+ }
1486
+ function h(a) {
1487
+ return v(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
1488
+ }
1489
+ window.devtoolsFormatters ? window.devtoolsFormatters.push(r) : window.devtoolsFormatters = [r];
1490
+ }
1491
+ process.env.NODE_ENV;
1492
+ process.env.NODE_ENV;
1493
+ process.env.NODE_ENV;
1494
+ function Ps() {
1495
+ Ds();
1496
+ }
1497
+ process.env.NODE_ENV !== "production" && Ps();
1498
+ class js extends fn {
1499
+ _className = "Store";
1500
+ _onAction;
1501
+ _options;
1502
+ _store;
1503
+ _subscriptions = {};
1504
+ _storeSubscribe;
1505
+ static _requiredKeys;
1506
+ get onAction() {
1507
+ if (this._onAction)
1508
+ return () => ({
1509
+ store: this.store,
1510
+ callback: this._onAction
1511
+ });
1512
+ }
1513
+ set onAction(t) {
1514
+ this._onAction = t;
1515
+ }
1516
+ get options() {
1517
+ return this._options;
1518
+ }
1519
+ get state() {
1520
+ return this._store.$state;
1521
+ }
1522
+ set state(t) {
1523
+ this._store.$state = t;
1524
+ }
1525
+ get store() {
1526
+ return this._store;
1527
+ }
1528
+ get storeSubscribe() {
1529
+ if (this._storeSubscribe)
1530
+ return () => ({
1531
+ store: this.store,
1532
+ callback: this._storeSubscribe
1533
+ });
1534
+ }
1535
+ set storeSubscribe(t) {
1536
+ this._storeSubscribe = t;
1537
+ }
1538
+ constructor(t, n, s = !1, r) {
1539
+ super(s, r), this._options = n.storeOptions, this._store = t;
1540
+ }
1541
+ /**
1542
+ * Add property to state
1543
+ * @param name
1544
+ * @param value
1545
+ */
1546
+ addToState(t, n) {
1547
+ this.isOptionApi() || n?.value || (n = Vt(n)), this.state[t] = n, this.store[t] = Zn(this.state, t);
1548
+ }
1549
+ addSubscription(t, n, s) {
1550
+ this._subscriptions[t] = { subscription: n, subscriptionOptions: s };
1551
+ }
1552
+ /**
1553
+ * Create and return a class instance
1554
+ * @param store
1555
+ * @param options
1556
+ * @param debug
1557
+ * @returns
1558
+ */
1559
+ static customizeStore(t, n, s = !1, r) {
1560
+ if (s && r && r.log(`Store - customizeStore() - ${t.$id}`, n), n.storeOptions && this.hasRequiredKeys(n.storeOptions))
1561
+ return new this(t, n, s, r);
1562
+ }
1563
+ hasDeniedFirstChar(t) {
1564
+ return yn(t[0]);
1565
+ }
1566
+ static hasRequiredKeys(t) {
1567
+ return this._requiredKeys === void 0 || this._requiredKeys?.every((n) => !!t[n]);
1568
+ }
1569
+ getOption(t) {
1570
+ return this.options && this.options[t];
1571
+ }
1572
+ getStatePropertyValue(t) {
1573
+ return this.getValue(this.state[t]);
1574
+ }
1575
+ getSubscriptions() {
1576
+ if (!W(this._subscriptions))
1577
+ return this._subscriptions;
1578
+ }
1579
+ getValue(t) {
1580
+ return t?.__v_isRef ? t.value : t;
1581
+ }
1582
+ isOptionApi() {
1583
+ return this.store._isOptionsAPI;
1584
+ }
1585
+ stateHas(t) {
1586
+ return this.state.hasOwnProperty(t);
1587
+ }
1588
+ storeHas(t) {
1589
+ return this.store.hasOwnProperty(t);
1590
+ }
1591
+ }
1592
+ const qt = "pinia-plugin-persist-state";
1593
+ class $s extends _n {
1594
+ _pluginName = qt;
1595
+ }
1596
+ const A = new $s();
1597
+ let ft = class {
1598
+ _db;
1599
+ _localStorageVersionKey = "IDBVersion";
1600
+ _name = "persistStore";
1601
+ _objectStore;
1602
+ _objectStoreOptions;
1603
+ _objectStoreName;
1604
+ _transactionMode = "readwrite";
1605
+ _version;
1606
+ constructor(t, n, s) {
1607
+ this._objectStoreName = t, this._version = this.getStoredVersionNumber(), n && (this._objectStoreOptions = n), s && (this._transactionMode = s);
1608
+ }
1609
+ clear() {
1610
+ const t = () => {
1611
+ if (this._objectStore) {
1612
+ const n = this._objectStore.clear();
1613
+ this.requestEventsHandler(n, {
1614
+ error: () => this.onError(n.error)
1615
+ });
1616
+ }
1617
+ };
1618
+ this.open({ success: t });
1619
+ }
1620
+ createObjectStore() {
1621
+ this._db && !this._db.objectStoreNames.contains(this._objectStoreName) && this._db.createObjectStore(this._objectStoreName, this._objectStoreOptions);
1622
+ }
1623
+ deleteObjectStore() {
1624
+ const t = () => {
1625
+ this._db?.deleteObjectStore(this._objectStoreName);
1626
+ };
1627
+ this.open({ success: t });
1628
+ }
1629
+ async getItem(t) {
1630
+ return new Promise((n) => {
1631
+ const s = () => {
1632
+ if (this._objectStore) {
1633
+ const r = this._objectStore.get(t);
1634
+ this.requestEventsHandler(r, {
1635
+ error: () => this.onError(
1636
+ r.error,
1637
+ () => n(void 0)
1638
+ ),
1639
+ success: () => n(r.result)
1640
+ });
1641
+ }
1642
+ };
1643
+ this.open({ success: s });
1644
+ });
1645
+ }
1646
+ async getObjectStoreItem(t, n) {
1647
+ return new Promise((s) => {
1648
+ const r = () => {
1649
+ if (this._objectStore) {
1650
+ const i = this._objectStore.index(t).get(n);
1651
+ this.requestEventsHandler(i, {
1652
+ error: () => s(void 0),
1653
+ success: () => s(i.result)
1654
+ });
1655
+ }
1656
+ };
1657
+ this.open({ success: r });
1658
+ });
1659
+ }
1660
+ getStoredVersionNumber() {
1661
+ if (!localStorage)
1662
+ return 1;
1663
+ const t = localStorage.getItem(this._localStorageVersionKey);
1664
+ return t ? parseInt(t) : 1;
1665
+ }
1666
+ handleDeleteRequest(t, n) {
1667
+ t.onerror = () => A.error(`IndexedDB - Item "${n}" remove`, t.error);
1668
+ }
1669
+ onError(t, n) {
1670
+ n && n(t);
1671
+ }
1672
+ open(t) {
1673
+ const n = indexedDB.open(this._name, this._version), s = () => {
1674
+ this._db = n.result;
1675
+ }, r = (i) => {
1676
+ try {
1677
+ if (s(), !this._db) return;
1678
+ const c = this._db.transaction(this._objectStoreName, this._transactionMode);
1679
+ c.onerror = () => this.onError(c.error), this._objectStore = c.objectStore(this._objectStoreName), this._objectStore && i();
1680
+ } catch (c) {
1681
+ A.error("indexedDB - transaction error", [c]);
1682
+ }
1683
+ };
1684
+ if (t?.success) {
1685
+ const i = t.success;
1686
+ t.success = () => r(i);
1687
+ }
1688
+ if (t?.upgrade) {
1689
+ const i = t.upgrade.bind(this);
1690
+ t.upgrade = () => {
1691
+ s(), i();
1692
+ };
1693
+ }
1694
+ const o = () => {
1695
+ const i = (c) => {
1696
+ if (c?.name === "VersionError") {
1697
+ this._version++, this.saveVersion(), this.open(t);
1698
+ return;
1699
+ }
1700
+ t?.error && t.error(c);
1701
+ };
1702
+ this.onError(n.error, i);
1703
+ };
1704
+ return t && this.openRequestEventsHandler(n, { ...t, error: o }), n;
1705
+ }
1706
+ openRequestEventsHandler(t, n) {
1707
+ this.requestEventsHandler(t, n), n.upgrade && (t.onupgradeneeded = n.upgrade);
1708
+ }
1709
+ removeItem(t) {
1710
+ const n = () => {
1711
+ if (this._objectStore) {
1712
+ const s = this._objectStore.delete(t);
1713
+ this.handleDeleteRequest(s, t);
1714
+ }
1715
+ };
1716
+ this.open({ success: n });
1717
+ }
1718
+ removeItems(t) {
1719
+ const n = () => {
1720
+ if (this._objectStore) {
1721
+ const s = this._objectStore.getAllKeys(), r = () => {
1722
+ s.result.forEach((c) => {
1723
+ if (this._objectStore && (!t || !t.includes(c))) {
1724
+ const l = this._objectStore.delete(c);
1725
+ this.handleDeleteRequest(l, c);
1726
+ }
1727
+ });
1728
+ }, o = () => A.error("IndexedDB - removeItems", [s.error]);
1729
+ this.requestEventsHandler(s, { error: o, success: r });
1730
+ }
1731
+ };
1732
+ this.open({ success: n });
1733
+ }
1734
+ requestEventsHandler(t, n) {
1735
+ const { error: s, success: r } = n;
1736
+ s && (t.onerror = s), r && (t.onsuccess = r);
1737
+ }
1738
+ saveVersion() {
1739
+ localStorage && localStorage.setItem(this._localStorageVersionKey, this._version.toString());
1740
+ }
1741
+ setItem(t, n) {
1742
+ const s = () => {
1743
+ if (this._objectStore) {
1744
+ const o = this._objectStore.add(t);
1745
+ if (n) {
1746
+ const i = () => {
1747
+ n.forEach((l) => {
1748
+ this._objectStore?.createIndex(l, l, { unique: !0 }), A.log(`"${l}" index created`);
1749
+ });
1750
+ }, c = () => this.onError(o.error);
1751
+ this.requestEventsHandler(o, { error: c, success: i });
1752
+ }
1753
+ }
1754
+ }, r = this.createObjectStore;
1755
+ this.open({ success: s, upgrade: r });
1756
+ }
1757
+ updateItem(t) {
1758
+ const n = () => {
1759
+ if (this._objectStore) {
1760
+ const s = this._objectStore.put(t);
1761
+ s.onerror = () => A.error("update item", [s.error, t]);
1762
+ }
1763
+ };
1764
+ this.open({ success: n });
1765
+ }
1766
+ };
1767
+ class Lt {
1768
+ _db;
1769
+ _db_options;
1770
+ get dbName() {
1771
+ return this._db_options.name;
1772
+ }
1773
+ constructor(t) {
1774
+ if (!t)
1775
+ throw new Error("DbOptions is required");
1776
+ this._db_options = t, this._db = this.defineDb();
1777
+ }
1778
+ defineDb() {
1779
+ const { keyPath: t, name: n } = this._db_options;
1780
+ return n === "localStorage" || n === "sessionStorage" ? new ln(n) : new ft(n, { keyPath: t });
1781
+ }
1782
+ getItem(t) {
1783
+ return new Promise((n, s) => {
1784
+ try {
1785
+ return this._db.getItem(t).then((r) => n(r));
1786
+ } catch (r) {
1787
+ s(r);
1788
+ }
1789
+ });
1790
+ }
1791
+ removeItem(t) {
1792
+ this._db.removeItem(t);
1793
+ }
1794
+ setItem(t, n) {
1795
+ if (console.log("Persister - setItem", [t, n, this._db]), this._db instanceof ft)
1796
+ try {
1797
+ this._db.getItem(t).then((s) => {
1798
+ s ? this._db.updateItem(s) : this._db.setItem({ storeName: t, ...n });
1799
+ });
1800
+ } catch (s) {
1801
+ A.error("Persister - setItem Error", s), this._db.setItem({ storename: t, ...n });
1802
+ }
1803
+ else
1804
+ this._db.setItem(n, t);
1805
+ }
1806
+ }
1807
+ class Ts {
1808
+ _store = /* @__PURE__ */ new Map();
1809
+ clear() {
1810
+ this._store.clear();
1811
+ }
1812
+ keyToString(t) {
1813
+ return typeof t == "number" ? t.toString() : t;
1814
+ }
1815
+ async getItem(t) {
1816
+ return this._store.get(this.keyToString(t));
1817
+ }
1818
+ removeItem(t) {
1819
+ this._store.delete(this.keyToString(t));
1820
+ }
1821
+ removeItems(t) {
1822
+ if (t)
1823
+ for (const n of this._store.keys())
1824
+ t.includes(n) || this._store.delete(n);
1825
+ else
1826
+ this._store.clear();
1827
+ }
1828
+ setItem(t, n) {
1829
+ this._store.set(n, t);
1830
+ }
1831
+ }
1832
+ let L = {};
1833
+ const As = {
1834
+ clear: () => L = {},
1835
+ getItem: async (e) => new Promise((t) => t(L[e])),
1836
+ removeItem: (e) => delete L[e],
1837
+ removeItems: (e) => e ? e.forEach((t) => delete L[t]) : L = {},
1838
+ setItem: (e, t) => {
1839
+ L[t] = e;
1840
+ }
1841
+ };
1842
+ class Ms extends Lt {
1843
+ defineDb() {
1844
+ return this.dbName === "localStorage" || this.dbName === "sessionStorage" ? As : new Ts();
1845
+ }
1846
+ }
1847
+ class oe {
1848
+ _encoder = new TextEncoder();
1849
+ _key;
1850
+ _materialKey;
1851
+ static DECRYPT = "decrypt";
1852
+ static ENCRYPT = "encrypt";
1853
+ constructor(t) {
1854
+ this._key = t;
1855
+ }
1856
+ async getKey(t) {
1857
+ return await crypto.subtle.deriveKey(
1858
+ {
1859
+ name: "PBKDF2",
1860
+ salt: this._encoder.encode("salt"),
1861
+ iterations: 1e5,
1862
+ hash: "SHA-256"
1863
+ },
1864
+ this._materialKey,
1865
+ { name: "AES-GCM", length: 256 },
1866
+ !1,
1867
+ [t]
1868
+ );
1869
+ }
1870
+ async setKeyMaterial(t) {
1871
+ this._materialKey = await crypto.subtle.importKey(
1872
+ "raw",
1873
+ this._encoder.encode(t),
1874
+ { name: "PBKDF2" },
1875
+ !1,
1876
+ ["deriveKey"]
1877
+ );
1878
+ }
1879
+ /**
1880
+ * Decrypt string passed in parameter
1881
+ * @param {string} item - encrypted string
1882
+ * @returns {string} decrypted item
1883
+ */
1884
+ async decrypt(t) {
1885
+ const [n, s] = t.split(":"), r = await crypto.subtle.decrypt(
1886
+ {
1887
+ name: "AES-GCM",
1888
+ iv: Uint8Array.from(atob(n), (o) => o.charCodeAt(0))
1889
+ },
1890
+ await this.getKey(oe.DECRYPT),
1891
+ Uint8Array.from(atob(s), (o) => o.charCodeAt(0))
1892
+ );
1893
+ return new TextDecoder().decode(r);
1894
+ }
1895
+ /**
1896
+ * Encrypt string passed in parameter
1897
+ * @param {string} item
1898
+ * @returns {Promise<string>} encrypted item
1899
+ */
1900
+ async encrypt(t) {
1901
+ const n = crypto.getRandomValues(new Uint8Array(12)), s = await crypto.subtle.encrypt(
1902
+ {
1903
+ name: "AES-GCM",
1904
+ iv: n
1905
+ },
1906
+ await this.getKey(oe.ENCRYPT),
1907
+ this._encoder.encode(t)
1908
+ );
1909
+ return btoa(String.fromCharCode(...new Uint8Array(n))) + ":" + btoa(String.fromCharCode(...new Uint8Array(s)));
1910
+ }
1911
+ async init() {
1912
+ this._materialKey || await this.setKeyMaterial(this._key);
1913
+ }
1914
+ }
1915
+ const He = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
1916
+ process.env.NODE_ENV !== "production" && Object.freeze([]);
1917
+ const Ut = () => {
1918
+ }, Fs = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
1919
+ (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Ne = Object.assign, N = Array.isArray, H = (e) => typeof e == "function", $ = (e) => typeof e == "string", Ks = (e) => typeof e == "symbol", F = (e) => e !== null && typeof e == "object";
1920
+ let pt;
1921
+ const Oe = () => pt || (pt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
1922
+ function et(e) {
1923
+ if (N(e)) {
1924
+ const t = {};
1925
+ for (let n = 0; n < e.length; n++) {
1926
+ const s = e[n], r = $(s) ? Us(s) : et(s);
1927
+ if (r)
1928
+ for (const o in r)
1929
+ t[o] = r[o];
1930
+ }
1931
+ return t;
1932
+ } else if ($(e) || F(e))
1933
+ return e;
1934
+ }
1935
+ const Hs = /;(?![^(]*\))/g, qs = /:([^]+)/, Ls = /\/\*[^]*?\*\//g;
1936
+ function Us(e) {
1937
+ const t = {};
1938
+ return e.replace(Ls, "").split(Hs).forEach((n) => {
1939
+ if (n) {
1940
+ const s = n.split(qs);
1941
+ s.length > 1 && (t[s[0].trim()] = s[1].trim());
1942
+ }
1943
+ }), t;
1944
+ }
1945
+ function tt(e) {
1946
+ let t = "";
1947
+ if ($(e))
1948
+ t = e;
1949
+ else if (N(e))
1950
+ for (let n = 0; n < e.length; n++) {
1951
+ const s = tt(e[n]);
1952
+ s && (t += s + " ");
1953
+ }
1954
+ else if (F(e))
1955
+ for (const n in e)
1956
+ e[n] && (t += n + " ");
1957
+ return t.trim();
1958
+ }
1959
+ process.env.NODE_ENV;
1960
+ process.env.NODE_ENV;
1961
+ process.env.NODE_ENV;
1962
+ new Set(
1963
+ /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Ks)
1964
+ );
1965
+ function zt(e) {
1966
+ return qe(e) ? zt(e.__v_raw) : !!(e && e.__v_isReactive);
1967
+ }
1968
+ function qe(e) {
1969
+ return !!(e && e.__v_isReadonly);
1970
+ }
1971
+ function Pe(e) {
1972
+ return !!(e && e.__v_isShallow);
1973
+ }
1974
+ function Le(e) {
1975
+ return e ? !!e.__v_raw : !1;
1976
+ }
1977
+ function j(e) {
1978
+ const t = e && e.__v_raw;
1979
+ return t ? j(t) : e;
1980
+ }
1981
+ function nt(e) {
1982
+ return e ? e.__v_isRef === !0 : !1;
1983
+ }
1984
+ const K = [];
1985
+ function zs(e) {
1986
+ K.push(e);
1987
+ }
1988
+ function Bs() {
1989
+ K.pop();
1990
+ }
1991
+ let je = !1;
1992
+ function Q(e, ...t) {
1993
+ if (je) return;
1994
+ je = !0;
1995
+ const n = K.length ? K[K.length - 1].component : null, s = n && n.appContext.config.warnHandler, r = Ws();
1996
+ if (s)
1997
+ st(
1998
+ s,
1999
+ n,
2000
+ 11,
2001
+ [
2002
+ // eslint-disable-next-line no-restricted-syntax
2003
+ e + t.map((o) => {
2004
+ var i, c;
2005
+ return (c = (i = o.toString) == null ? void 0 : i.call(o)) != null ? c : JSON.stringify(o);
2006
+ }).join(""),
2007
+ n && n.proxy,
2008
+ r.map(
2009
+ ({ vnode: o }) => `at <${cn(n, o.type)}>`
2010
+ ).join(`
2011
+ `),
2012
+ r
2013
+ ]
2014
+ );
2015
+ else {
2016
+ const o = [`[Vue warn]: ${e}`, ...t];
2017
+ r.length && o.push(`
2018
+ `, ...Js(r)), console.warn(...o);
2019
+ }
2020
+ je = !1;
2021
+ }
2022
+ function Ws() {
2023
+ let e = K[K.length - 1];
2024
+ if (!e)
2025
+ return [];
2026
+ const t = [];
2027
+ for (; e; ) {
2028
+ const n = t[0];
2029
+ n && n.vnode === e ? n.recurseCount++ : t.push({
2030
+ vnode: e,
2031
+ recurseCount: 0
2032
+ });
2033
+ const s = e.component && e.component.parent;
2034
+ e = s && s.vnode;
2035
+ }
2036
+ return t;
2037
+ }
2038
+ function Js(e) {
2039
+ const t = [];
2040
+ return e.forEach((n, s) => {
2041
+ t.push(...s === 0 ? [] : [`
2042
+ `], ...Ys(n));
2043
+ }), t;
2044
+ }
2045
+ function Ys({ vnode: e, recurseCount: t }) {
2046
+ const n = t > 0 ? `... (${t} recursive calls)` : "", s = e.component ? e.component.parent == null : !1, r = ` at <${cn(
2047
+ e.component,
2048
+ e.type,
2049
+ s
2050
+ )}`, o = ">" + n;
2051
+ return e.props ? [r, ...Gs(e.props), o] : [r + o];
2052
+ }
2053
+ function Gs(e) {
2054
+ const t = [], n = Object.keys(e);
2055
+ return n.slice(0, 3).forEach((s) => {
2056
+ t.push(...Bt(s, e[s]));
2057
+ }), n.length > 3 && t.push(" ..."), t;
2058
+ }
2059
+ function Bt(e, t, n) {
2060
+ return $(t) ? (t = JSON.stringify(t), n ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? n ? t : [`${e}=${t}`] : nt(t) ? (t = Bt(e, j(t.value), !0), n ? t : [`${e}=Ref<`, t, ">"]) : H(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = j(t), n ? t : [`${e}=`, t]);
2061
+ }
2062
+ const Wt = {
2063
+ sp: "serverPrefetch hook",
2064
+ bc: "beforeCreate hook",
2065
+ c: "created hook",
2066
+ bm: "beforeMount hook",
2067
+ m: "mounted hook",
2068
+ bu: "beforeUpdate hook",
2069
+ u: "updated",
2070
+ bum: "beforeUnmount hook",
2071
+ um: "unmounted hook",
2072
+ a: "activated hook",
2073
+ da: "deactivated hook",
2074
+ ec: "errorCaptured hook",
2075
+ rtc: "renderTracked hook",
2076
+ rtg: "renderTriggered hook",
2077
+ 0: "setup function",
2078
+ 1: "render function",
2079
+ 2: "watcher getter",
2080
+ 3: "watcher callback",
2081
+ 4: "watcher cleanup function",
2082
+ 5: "native event handler",
2083
+ 6: "component event handler",
2084
+ 7: "vnode hook",
2085
+ 8: "directive hook",
2086
+ 9: "transition hook",
2087
+ 10: "app errorHandler",
2088
+ 11: "app warnHandler",
2089
+ 12: "ref function",
2090
+ 13: "async component loader",
2091
+ 14: "scheduler flush",
2092
+ 15: "component update",
2093
+ 16: "app unmount cleanup function"
2094
+ };
2095
+ function st(e, t, n, s) {
2096
+ try {
2097
+ return s ? e(...s) : e();
2098
+ } catch (r) {
2099
+ Jt(r, t, n);
2100
+ }
2101
+ }
2102
+ function Jt(e, t, n, s = !0) {
2103
+ const r = t ? t.vnode : null, { errorHandler: o, throwUnhandledErrorInProduction: i } = t && t.appContext.config || He;
2104
+ if (t) {
2105
+ let c = t.parent;
2106
+ const l = t.proxy, f = process.env.NODE_ENV !== "production" ? Wt[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
2107
+ for (; c; ) {
2108
+ const h = c.ec;
2109
+ if (h) {
2110
+ for (let a = 0; a < h.length; a++)
2111
+ if (h[a](e, l, f) === !1)
2112
+ return;
2113
+ }
2114
+ c = c.parent;
2115
+ }
2116
+ if (o) {
2117
+ st(o, null, 10, [
2118
+ e,
2119
+ l,
2120
+ f
2121
+ ]);
2122
+ return;
2123
+ }
2124
+ }
2125
+ Qs(e, n, r, s, i);
2126
+ }
2127
+ function Qs(e, t, n, s = !0, r = !1) {
2128
+ if (process.env.NODE_ENV !== "production") {
2129
+ const o = Wt[t];
2130
+ if (n && zs(n), Q(`Unhandled error${o ? ` during execution of ${o}` : ""}`), n && Bs(), s)
2131
+ throw e;
2132
+ console.error(e);
2133
+ } else {
2134
+ if (r)
2135
+ throw e;
2136
+ console.error(e);
2137
+ }
2138
+ }
2139
+ const S = [];
2140
+ let k = -1;
2141
+ const Y = [];
2142
+ let D = null, z = 0;
2143
+ const Zs = /* @__PURE__ */ Promise.resolve();
2144
+ let Ue = null;
2145
+ const Xs = 100;
2146
+ function er(e) {
2147
+ let t = k + 1, n = S.length;
2148
+ for (; t < n; ) {
2149
+ const s = t + n >>> 1, r = S[s], o = ie(r);
2150
+ o < e || o === e && r.flags & 2 ? t = s + 1 : n = s;
2151
+ }
2152
+ return t;
2153
+ }
2154
+ function tr(e) {
2155
+ if (!(e.flags & 1)) {
2156
+ const t = ie(e), n = S[S.length - 1];
2157
+ !n || // fast path when the job id is larger than the tail
2158
+ !(e.flags & 2) && t >= ie(n) ? S.push(e) : S.splice(er(t), 0, e), e.flags |= 1, Yt();
2159
+ }
2160
+ }
2161
+ function Yt() {
2162
+ Ue || (Ue = Zs.then(Gt));
2163
+ }
2164
+ function nr(e) {
2165
+ N(e) ? Y.push(...e) : D && e.id === -1 ? D.splice(z + 1, 0, e) : e.flags & 1 || (Y.push(e), e.flags |= 1), Yt();
2166
+ }
2167
+ function sr(e) {
2168
+ if (Y.length) {
2169
+ const t = [...new Set(Y)].sort(
2170
+ (n, s) => ie(n) - ie(s)
2171
+ );
2172
+ if (Y.length = 0, D) {
2173
+ D.push(...t);
2174
+ return;
2175
+ }
2176
+ for (D = t, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), z = 0; z < D.length; z++) {
2177
+ const n = D[z];
2178
+ process.env.NODE_ENV !== "production" && Qt(e, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
2179
+ }
2180
+ D = null, z = 0;
2181
+ }
2182
+ }
2183
+ const ie = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
2184
+ function Gt(e) {
2185
+ process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
2186
+ const t = process.env.NODE_ENV !== "production" ? (n) => Qt(e, n) : Ut;
2187
+ try {
2188
+ for (k = 0; k < S.length; k++) {
2189
+ const n = S[k];
2190
+ if (n && !(n.flags & 8)) {
2191
+ if (process.env.NODE_ENV !== "production" && t(n))
2192
+ continue;
2193
+ n.flags & 4 && (n.flags &= -2), st(
2194
+ n,
2195
+ n.i,
2196
+ n.i ? 15 : 14
2197
+ ), n.flags & 4 || (n.flags &= -2);
2198
+ }
2199
+ }
2200
+ } finally {
2201
+ for (; k < S.length; k++) {
2202
+ const n = S[k];
2203
+ n && (n.flags &= -2);
2204
+ }
2205
+ k = -1, S.length = 0, sr(e), Ue = null, (S.length || Y.length) && Gt(e);
2206
+ }
2207
+ }
2208
+ function Qt(e, t) {
2209
+ const n = e.get(t) || 0;
2210
+ if (n > Xs) {
2211
+ const s = t.i, r = s && on(s.type);
2212
+ return Jt(
2213
+ `Maximum recursive updates exceeded${r ? ` in component <${r}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
2214
+ null,
2215
+ 10
2216
+ ), !0;
2217
+ }
2218
+ return e.set(t, n + 1), !1;
2219
+ }
2220
+ const $e = /* @__PURE__ */ new Map();
2221
+ process.env.NODE_ENV !== "production" && (Oe().__VUE_HMR_RUNTIME__ = {
2222
+ createRecord: Te(rr),
2223
+ rerender: Te(or),
2224
+ reload: Te(ir)
2225
+ });
2226
+ const ye = /* @__PURE__ */ new Map();
2227
+ function rr(e, t) {
2228
+ return ye.has(e) ? !1 : (ye.set(e, {
2229
+ initialDef: me(t),
2230
+ instances: /* @__PURE__ */ new Set()
2231
+ }), !0);
2232
+ }
2233
+ function me(e) {
2234
+ return an(e) ? e.__vccOpts : e;
2235
+ }
2236
+ function or(e, t) {
2237
+ const n = ye.get(e);
2238
+ n && (n.initialDef.render = t, [...n.instances].forEach((s) => {
2239
+ t && (s.render = t, me(s.type).render = t), s.renderCache = [], s.job.flags & 8 || s.update();
2240
+ }));
2241
+ }
2242
+ function ir(e, t) {
2243
+ const n = ye.get(e);
2244
+ if (!n) return;
2245
+ t = me(t), ht(n.initialDef, t);
2246
+ const s = [...n.instances];
2247
+ for (let r = 0; r < s.length; r++) {
2248
+ const o = s[r], i = me(o.type);
2249
+ let c = $e.get(i);
2250
+ c || (i !== n.initialDef && ht(i, t), $e.set(i, c = /* @__PURE__ */ new Set())), c.add(o), o.appContext.propsCache.delete(o.type), o.appContext.emitsCache.delete(o.type), o.appContext.optionsCache.delete(o.type), o.ceReload ? (c.add(o), o.ceReload(t.styles), c.delete(o)) : o.parent ? tr(() => {
2251
+ o.job.flags & 8 || (o.parent.update(), c.delete(o));
2252
+ }) : o.appContext.reload ? o.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
2253
+ "[HMR] Root or manually mounted instance modified. Full reload required."
2254
+ ), o.root.ce && o !== o.root && o.root.ce._removeChildStyle(i);
2255
+ }
2256
+ nr(() => {
2257
+ $e.clear();
2258
+ });
2259
+ }
2260
+ function ht(e, t) {
2261
+ Ne(e, t);
2262
+ for (const n in e)
2263
+ n !== "__file" && !(n in t) && delete e[n];
2264
+ }
2265
+ function Te(e) {
2266
+ return (t, n) => {
2267
+ try {
2268
+ return e(t, n);
2269
+ } catch (s) {
2270
+ console.error(s), console.warn(
2271
+ "[HMR] Something went wrong during Vue component hot-reload. Full reload required."
2272
+ );
2273
+ }
2274
+ };
2275
+ }
2276
+ let B, ue = [];
2277
+ function Zt(e, t) {
2278
+ var n, s;
2279
+ B = e, B ? (B.enabled = !0, ue.forEach(({ event: r, args: o }) => B.emit(r, ...o)), ue = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
2280
+ window.HTMLElement && // also exclude jsdom
2281
+ // eslint-disable-next-line no-restricted-syntax
2282
+ !((s = (n = window.navigator) == null ? void 0 : n.userAgent) != null && s.includes("jsdom")) ? ((t.__VUE_DEVTOOLS_HOOK_REPLAY__ = t.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((o) => {
2283
+ Zt(o, t);
2284
+ }), setTimeout(() => {
2285
+ B || (t.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, ue = []);
2286
+ }, 3e3)) : ue = [];
2287
+ }
2288
+ let be = null, cr = null;
2289
+ const ar = (e) => e.__isTeleport;
2290
+ function Xt(e, t) {
2291
+ e.shapeFlag & 6 && e.component ? (e.transition = t, Xt(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
2292
+ }
2293
+ Oe().requestIdleCallback;
2294
+ Oe().cancelIdleCallback;
2295
+ const lr = /* @__PURE__ */ Symbol.for("v-ndc"), ur = {};
2296
+ process.env.NODE_ENV !== "production" && (ur.ownKeys = (e) => (Q(
2297
+ "Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
2298
+ ), Reflect.ownKeys(e)));
2299
+ const fr = {}, en = (e) => Object.getPrototypeOf(e) === fr, pr = (e) => e.__isSuspense, tn = /* @__PURE__ */ Symbol.for("v-fgt"), hr = /* @__PURE__ */ Symbol.for("v-txt"), dr = /* @__PURE__ */ Symbol.for("v-cmt");
2300
+ function _r(e) {
2301
+ return e ? e.__v_isVNode === !0 : !1;
2302
+ }
2303
+ const gr = (...e) => sn(
2304
+ ...e
2305
+ ), nn = ({ key: e }) => e ?? null, pe = ({
2306
+ ref: e,
2307
+ ref_key: t,
2308
+ ref_for: n
2309
+ }) => (typeof e == "number" && (e = "" + e), e != null ? $(e) || nt(e) || H(e) ? { i: be, r: e, k: t, f: !!n } : e : null);
2310
+ function yr(e, t = null, n = null, s = 0, r = null, o = e === tn ? 0 : 1, i = !1, c = !1) {
2311
+ const l = {
2312
+ __v_isVNode: !0,
2313
+ __v_skip: !0,
2314
+ type: e,
2315
+ props: t,
2316
+ key: t && nn(t),
2317
+ ref: t && pe(t),
2318
+ scopeId: cr,
2319
+ slotScopeIds: null,
2320
+ children: n,
2321
+ component: null,
2322
+ suspense: null,
2323
+ ssContent: null,
2324
+ ssFallback: null,
2325
+ dirs: null,
2326
+ transition: null,
2327
+ el: null,
2328
+ anchor: null,
2329
+ target: null,
2330
+ targetStart: null,
2331
+ targetAnchor: null,
2332
+ staticCount: 0,
2333
+ shapeFlag: o,
2334
+ patchFlag: s,
2335
+ dynamicProps: r,
2336
+ dynamicChildren: null,
2337
+ appContext: null,
2338
+ ctx: be
2339
+ };
2340
+ return c ? (rt(l, n), o & 128 && e.normalize(l)) : n && (l.shapeFlag |= $(n) ? 8 : 16), process.env.NODE_ENV !== "production" && l.key !== l.key && Q("VNode created with invalid key (NaN). VNode type:", l.type), l;
2341
+ }
2342
+ const mr = process.env.NODE_ENV !== "production" ? gr : sn;
2343
+ function sn(e, t = null, n = null, s = 0, r = null, o = !1) {
2344
+ if ((!e || e === lr) && (process.env.NODE_ENV !== "production" && !e && Q(`Invalid vnode type when creating vnode: ${e}.`), e = dr), _r(e)) {
2345
+ const c = Se(
2346
+ e,
2347
+ t,
2348
+ !0
2349
+ /* mergeRef: true */
2350
+ );
2351
+ return n && rt(c, n), c.patchFlag = -2, c;
2352
+ }
2353
+ if (an(e) && (e = e.__vccOpts), t) {
2354
+ t = br(t);
2355
+ let { class: c, style: l } = t;
2356
+ c && !$(c) && (t.class = tt(c)), F(l) && (Le(l) && !N(l) && (l = Ne({}, l)), t.style = et(l));
2357
+ }
2358
+ const i = $(e) ? 1 : pr(e) ? 128 : ar(e) ? 64 : F(e) ? 4 : H(e) ? 2 : 0;
2359
+ return process.env.NODE_ENV !== "production" && i & 4 && Le(e) && (e = j(e), Q(
2360
+ "Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
2361
+ `
2362
+ Component that was made reactive: `,
2363
+ e
2364
+ )), yr(
2365
+ e,
2366
+ t,
2367
+ n,
2368
+ s,
2369
+ r,
2370
+ i,
2371
+ o,
2372
+ !0
2373
+ );
2374
+ }
2375
+ function br(e) {
2376
+ return e ? Le(e) || en(e) ? Ne({}, e) : e : null;
2377
+ }
2378
+ function Se(e, t, n = !1, s = !1) {
2379
+ const { props: r, ref: o, patchFlag: i, children: c, transition: l } = e, f = t ? vr(r || {}, t) : r, h = {
2380
+ __v_isVNode: !0,
2381
+ __v_skip: !0,
2382
+ type: e.type,
2383
+ props: f,
2384
+ key: f && nn(f),
2385
+ ref: t && t.ref ? (
2386
+ // #2078 in the case of <component :is="vnode" ref="extra"/>
2387
+ // if the vnode itself already has a ref, cloneVNode will need to merge
2388
+ // the refs so the single vnode can be set on multiple refs
2389
+ n && o ? N(o) ? o.concat(pe(t)) : [o, pe(t)] : pe(t)
2390
+ ) : o,
2391
+ scopeId: e.scopeId,
2392
+ slotScopeIds: e.slotScopeIds,
2393
+ children: process.env.NODE_ENV !== "production" && i === -1 && N(c) ? c.map(rn) : c,
2394
+ target: e.target,
2395
+ targetStart: e.targetStart,
2396
+ targetAnchor: e.targetAnchor,
2397
+ staticCount: e.staticCount,
2398
+ shapeFlag: e.shapeFlag,
2399
+ // if the vnode is cloned with extra props, we can no longer assume its
2400
+ // existing patch flag to be reliable and need to add the FULL_PROPS flag.
2401
+ // note: preserve flag for fragments since they use the flag for children
2402
+ // fast paths only.
2403
+ patchFlag: t && e.type !== tn ? i === -1 ? 16 : i | 16 : i,
2404
+ dynamicProps: e.dynamicProps,
2405
+ dynamicChildren: e.dynamicChildren,
2406
+ appContext: e.appContext,
2407
+ dirs: e.dirs,
2408
+ transition: l,
2409
+ // These should technically only be non-null on mounted VNodes. However,
2410
+ // they *should* be copied for kept-alive vnodes. So we just always copy
2411
+ // them since them being non-null during a mount doesn't affect the logic as
2412
+ // they will simply be overwritten.
2413
+ component: e.component,
2414
+ suspense: e.suspense,
2415
+ ssContent: e.ssContent && Se(e.ssContent),
2416
+ ssFallback: e.ssFallback && Se(e.ssFallback),
2417
+ placeholder: e.placeholder,
2418
+ el: e.el,
2419
+ anchor: e.anchor,
2420
+ ctx: e.ctx,
2421
+ ce: e.ce
2422
+ };
2423
+ return l && s && Xt(
2424
+ h,
2425
+ l.clone(h)
2426
+ ), h;
2427
+ }
2428
+ function rn(e) {
2429
+ const t = Se(e);
2430
+ return N(e.children) && (t.children = e.children.map(rn)), t;
2431
+ }
2432
+ function Sr(e = " ", t = 0) {
2433
+ return mr(hr, null, e, t);
2434
+ }
2435
+ function rt(e, t) {
2436
+ let n = 0;
2437
+ const { shapeFlag: s } = e;
2438
+ if (t == null)
2439
+ t = null;
2440
+ else if (N(t))
2441
+ n = 16;
2442
+ else if (typeof t == "object")
2443
+ if (s & 65) {
2444
+ const r = t.default;
2445
+ r && (r._c && (r._d = !1), rt(e, r()), r._c && (r._d = !0));
2446
+ return;
2447
+ } else
2448
+ n = 32, !t._ && !en(t) && (t._ctx = be);
2449
+ else H(t) ? (t = { default: t, _ctx: be }, n = 32) : (t = String(t), s & 64 ? (n = 16, t = [Sr(t)]) : n = 8);
2450
+ e.children = t, e.shapeFlag |= n;
2451
+ }
2452
+ function vr(...e) {
2453
+ const t = {};
2454
+ for (let n = 0; n < e.length; n++) {
2455
+ const s = e[n];
2456
+ for (const r in s)
2457
+ if (r === "class")
2458
+ t.class !== s.class && (t.class = tt([t.class, s.class]));
2459
+ else if (r === "style")
2460
+ t.style = et([t.style, s.style]);
2461
+ else if (Fs(r)) {
2462
+ const o = t[r], i = s[r];
2463
+ i && o !== i && !(N(o) && o.includes(i)) && (t[r] = o ? [].concat(o, i) : i);
2464
+ } else r !== "" && (t[r] = s[r]);
2465
+ }
2466
+ return t;
2467
+ }
2468
+ {
2469
+ const e = Oe(), t = (n, s) => {
2470
+ let r;
2471
+ return (r = e[n]) || (r = e[n] = []), r.push(s), (o) => {
2472
+ r.length > 1 ? r.forEach((i) => i(o)) : r[0](o);
2473
+ };
2474
+ };
2475
+ t(
2476
+ "__VUE_INSTANCE_SETTERS__",
2477
+ (n) => n
2478
+ ), t(
2479
+ "__VUE_SSR_SETTERS__",
2480
+ (n) => n
2481
+ );
2482
+ }
2483
+ process.env.NODE_ENV;
2484
+ const wr = /(?:^|[-_])\w/g, Er = (e) => e.replace(wr, (t) => t.toUpperCase()).replace(/[-_]/g, "");
2485
+ function on(e, t = !0) {
2486
+ return H(e) ? e.displayName || e.name : e.name || t && e.__name;
2487
+ }
2488
+ function cn(e, t, n = !1) {
2489
+ let s = on(t);
2490
+ if (!s && t.__file) {
2491
+ const r = t.__file.match(/([^/\\]+)\.\w+$/);
2492
+ r && (s = r[1]);
2493
+ }
2494
+ if (!s && e) {
2495
+ const r = (o) => {
2496
+ for (const i in o)
2497
+ if (o[i] === t)
2498
+ return i;
2499
+ };
2500
+ s = r(e.components) || e.parent && r(
2501
+ e.parent.type.components
2502
+ ) || r(e.appContext.components);
2503
+ }
2504
+ return s ? Er(s) : n ? "App" : "Anonymous";
2505
+ }
2506
+ function an(e) {
2507
+ return H(e) && "__vccOpts" in e;
2508
+ }
2509
+ function Nr() {
2510
+ if (process.env.NODE_ENV === "production" || typeof window > "u")
2511
+ return;
2512
+ const e = { style: "color:#3ba776" }, t = { style: "color:#1677ff" }, n = { style: "color:#f5222d" }, s = { style: "color:#eb2f96" }, r = {
2513
+ __vue_custom_formatter: !0,
2514
+ header(a) {
2515
+ if (!F(a))
2516
+ return null;
2517
+ if (a.__isVue)
2518
+ return ["div", e, "VueInstance"];
2519
+ if (nt(a)) {
2520
+ const u = a.value;
2521
+ return [
2522
+ "div",
2523
+ {},
2524
+ ["span", e, h(a)],
2525
+ "<",
2526
+ c(u),
2527
+ ">"
2528
+ ];
2529
+ } else {
2530
+ if (zt(a))
2531
+ return [
2532
+ "div",
2533
+ {},
2534
+ ["span", e, Pe(a) ? "ShallowReactive" : "Reactive"],
2535
+ "<",
2536
+ c(a),
2537
+ `>${qe(a) ? " (readonly)" : ""}`
2538
+ ];
2539
+ if (qe(a))
2540
+ return [
2541
+ "div",
2542
+ {},
2543
+ ["span", e, Pe(a) ? "ShallowReadonly" : "Readonly"],
2544
+ "<",
2545
+ c(a),
2546
+ ">"
2547
+ ];
2548
+ }
2549
+ return null;
2550
+ },
2551
+ hasBody(a) {
2552
+ return a && a.__isVue;
2553
+ },
2554
+ body(a) {
2555
+ if (a && a.__isVue)
2556
+ return [
2557
+ "div",
2558
+ {},
2559
+ ...o(a.$)
2560
+ ];
2561
+ }
2562
+ };
2563
+ function o(a) {
2564
+ const u = [];
2565
+ a.type.props && a.props && u.push(i("props", j(a.props))), a.setupState !== He && u.push(i("setup", a.setupState)), a.data !== He && u.push(i("data", j(a.data)));
2566
+ const d = l(a, "computed");
2567
+ d && u.push(i("computed", d));
2568
+ const _ = l(a, "inject");
2569
+ return _ && u.push(i("injected", _)), u.push([
2570
+ "div",
2571
+ {},
2572
+ [
2573
+ "span",
2574
+ {
2575
+ style: s.style + ";opacity:0.66"
2576
+ },
2577
+ "$ (internal): "
2578
+ ],
2579
+ ["object", { object: a }]
2580
+ ]), u;
2581
+ }
2582
+ function i(a, u) {
2583
+ return u = Ne({}, u), Object.keys(u).length ? [
2584
+ "div",
2585
+ { style: "line-height:1.25em;margin-bottom:0.6em" },
2586
+ [
2587
+ "div",
2588
+ {
2589
+ style: "color:#476582"
2590
+ },
2591
+ a
2592
+ ],
2593
+ [
2594
+ "div",
2595
+ {
2596
+ style: "padding-left:1.25em"
2597
+ },
2598
+ ...Object.keys(u).map((d) => [
2599
+ "div",
2600
+ {},
2601
+ ["span", s, d + ": "],
2602
+ c(u[d], !1)
2603
+ ])
2604
+ ]
2605
+ ] : ["span", {}];
2606
+ }
2607
+ function c(a, u = !0) {
2608
+ return typeof a == "number" ? ["span", t, a] : typeof a == "string" ? ["span", n, JSON.stringify(a)] : typeof a == "boolean" ? ["span", s, a] : F(a) ? ["object", { object: u ? j(a) : a }] : ["span", n, String(a)];
2609
+ }
2610
+ function l(a, u) {
2611
+ const d = a.type;
2612
+ if (H(d))
2613
+ return;
2614
+ const _ = {};
2615
+ for (const w in a.ctx)
2616
+ f(d, w, u) && (_[w] = a.ctx[w]);
2617
+ return _;
2618
+ }
2619
+ function f(a, u, d) {
2620
+ const _ = a[d];
2621
+ if (N(_) && _.includes(u) || F(_) && u in _ || a.extends && f(a.extends, u, d) || a.mixins && a.mixins.some((w) => f(w, u, d)))
2622
+ return !0;
2623
+ }
2624
+ function h(a) {
2625
+ return Pe(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
2626
+ }
2627
+ window.devtoolsFormatters ? window.devtoolsFormatters.push(r) : window.devtoolsFormatters = [r];
2628
+ }
2629
+ process.env.NODE_ENV;
2630
+ process.env.NODE_ENV;
2631
+ process.env.NODE_ENV;
2632
+ function Or() {
2633
+ Nr();
2634
+ }
2635
+ process.env.NODE_ENV !== "production" && Or();
2636
+ const Vr = [
2637
+ "@context",
2638
+ "activeLink",
2639
+ "computed",
2640
+ "dep",
2641
+ "excludedKeys",
2642
+ "fn",
2643
+ "isEncrypted",
2644
+ "isLoading",
2645
+ "subs",
2646
+ "version"
2647
+ ];
2648
+ class dt extends js {
2649
+ _className = "StorePersister";
2650
+ _crypt;
2651
+ _excludedKeys;
2652
+ _persister;
2653
+ _propertiesToEncrypt;
2654
+ _watchedStore;
2655
+ // Local fallback options when base Store does not expose `options` (read-only getter)
2656
+ _localOptions;
2657
+ get effectiveOptions() {
2658
+ return this.options ?? this._localOptions ?? {};
2659
+ }
2660
+ constructor(t, n, s, r) {
2661
+ super(t, n, s, r);
2662
+ const { crypt: o, persister: i, watchedStore: c } = n;
2663
+ this.options || (this._localOptions = {
2664
+ excludedKeys: [],
2665
+ persistedPropertiesToEncrypt: [],
2666
+ isEncrypted: !1,
2667
+ watchMutation: !1,
2668
+ ...n
2669
+ }), this._excludedKeys = this.initExcludedKeys(), this._persister = i, this._propertiesToEncrypt = new Set(this.getPropertiesToEncrypt()), this._watchedStore = c, o && (this._crypt = o, this.options && (this.options.isEncrypted = !1)), this.augmentStore(), this.remember(), this.debugLog("StorePersister constructor", [
2670
+ this.toBeWatched(),
2671
+ c,
2672
+ i,
2673
+ this.options,
2674
+ t,
2675
+ n
2676
+ ]), this.toBeWatched() && (this._watchedStore.add(this.store.$id), this.storeSubscribe = this.storeSubscription.bind(this));
2677
+ }
2678
+ augmentStore() {
2679
+ const t = this.effectiveOptions, { isEncrypted: n, persistedPropertiesToEncrypt: s, watchMutation: r } = typeof t == "object" ? t : {};
2680
+ n === void 0 && (t.isEncrypted = !1), s === void 0 && (t.persistedPropertiesToEncrypt = []), r === void 0 && (t.watchMutation = !1), this.stateHas("isLoading") || this.addToState("isLoading", !1), this.store.persistState = async () => await this.persist(), this.store.remember = async () => await this.remember(), this.store.removePersistedState = () => this._persister.removeItem(this.store.$id), this.store.watch = this.watch, this.store.stopWatch = this.stopWatch;
2681
+ }
2682
+ async cryptProperty(t, n, s = !1) {
2683
+ return s ? await t.decrypt(n) : await t.encrypt(n);
2684
+ }
2685
+ async cryptState(t, n = !1) {
2686
+ return await new Promise(async (s) => {
2687
+ const r = this._crypt, o = this.getPropertiesToEncrypt(), i = this.isEncrypted();
2688
+ if (this.debugLog(`cryptState - ${this.store.$id} ${n ? "decrypt" : "crypt"}`, [
2689
+ "can",
2690
+ this._propertiesToEncrypt.size > 0 && i === n && !!r,
2691
+ r,
2692
+ t
2693
+ ]), this._propertiesToEncrypt.size > 0 && r) {
2694
+ const c = {};
2695
+ for (const l of o) {
2696
+ const f = this.getValue(t[l]);
2697
+ f && (c[l] = await this.cryptProperty(r, f, n));
2698
+ }
2699
+ this.debugLog(`cryptState - ${this.store.$id}`, [
2700
+ "encryptedState",
2701
+ c
2702
+ ]), W(c) || (t = { ...t, ...c }, this.options && (this.options.isEncrypted = !n));
2703
+ }
2704
+ s(t);
2705
+ });
2706
+ }
2707
+ isEncrypted() {
2708
+ return this.effectiveOptions.isEncrypted;
2709
+ }
2710
+ getPropertiesToEncrypt() {
2711
+ return this.effectiveOptions?.persistedPropertiesToEncrypt ?? [];
2712
+ }
2713
+ async getPersistedState(t = !0) {
2714
+ const n = this.store.$id;
2715
+ try {
2716
+ let s = await this._persister.getItem(n);
2717
+ return t && this.toBeCrypted() && s && (await this._crypt?.init(), s = await this.cryptState(s, !0)), this.debugLog(`getPersistedState ${n}`, [s, this.state]), s;
2718
+ } catch (s) {
2719
+ console.log("getPersistedState Error", [n, s]);
2720
+ }
2721
+ }
2722
+ async getStateToPersist() {
2723
+ const t = this._excludedKeys, n = this.state, s = this._propertiesToEncrypt.size > 0, r = this._crypt;
2724
+ s && await r.init();
2725
+ const o = {};
2726
+ for (const i of Object.keys(n))
2727
+ if (!this.hasDeniedFirstChar(i[0]) && !t.has(i)) {
2728
+ const c = n[i];
2729
+ W(c) || (s && this._propertiesToEncrypt.has(i) ? o[i] = await this.cryptProperty(r, c, !1) : o[i] = j(c));
2730
+ }
2731
+ return o;
2732
+ }
2733
+ getWatchMutation() {
2734
+ return this.effectiveOptions.watchMutation;
2735
+ }
2736
+ initExcludedKeys() {
2737
+ return /* @__PURE__ */ new Set([
2738
+ ...Vr,
2739
+ ...this.effectiveOptions.excludedKeys ?? []
2740
+ ]);
2741
+ }
2742
+ async persist() {
2743
+ const t = await this.getStateToPersist();
2744
+ this.debugLog(`persist() ${this.store.$id} - stateToPersist:`, t), W(t) || this._persister.setItem(this.store.$id, t);
2745
+ }
2746
+ propertyShouldBePersisted(t) {
2747
+ return !this._excludedKeys.has(t);
2748
+ }
2749
+ async remember() {
2750
+ return this.state.isLoading = !0, new Promise(async (t) => {
2751
+ let n = await this.getPersistedState();
2752
+ return n && !W(n) && this.store.$patch(n), this.state.isLoading = !1, t(!0);
2753
+ });
2754
+ }
2755
+ stopWatch() {
2756
+ this.effectiveOptions?.watchMutation && (this.options ? this.options.watchMutation = !1 : this._localOptions.watchMutation = !1, this._watchedStore.delete(this.store.$id));
2757
+ }
2758
+ storeSubscription(t) {
2759
+ this.debugLog(`store.$subscribe ${this.store.$id}`, [
2760
+ t.type !== "patch object",
2761
+ this.getWatchMutation(),
2762
+ t,
2763
+ this.state,
2764
+ this.store
2765
+ ]), t.type !== "patch object" && this.getWatchMutation() && this.persist().then(() => {
2766
+ this.store.mutationCallback && this.store.mutationCallback(this.state, t);
2767
+ });
2768
+ }
2769
+ toBeCrypted() {
2770
+ return !!(this._crypt && this.getPropertiesToEncrypt());
2771
+ }
2772
+ toBeWatched() {
2773
+ return !this._watchedStore.has(this.store.$id);
2774
+ }
2775
+ watch() {
2776
+ this.toBeWatched() && (this.options ? this.options.watchMutation = !0 : this._localOptions.watchMutation = !0, this.storeSubscribe = this.storeSubscription.bind(this));
2777
+ }
2778
+ }
2779
+ class kr extends un {
2780
+ constructor() {
2781
+ super(
2782
+ qt,
2783
+ dt.customizeStore.bind(dt),
2784
+ A
2785
+ );
2786
+ }
2787
+ }
2788
+ const ve = new kr();
2789
+ function Ir(e, t) {
2790
+ return ve.pluginOptions = Cr(e, t), ve;
2791
+ }
2792
+ function Cr(e, t) {
2793
+ let n, s;
2794
+ const r = /* @__PURE__ */ new Set();
2795
+ try {
2796
+ if (window)
2797
+ return !W(e) && e && (n = new Lt({ name: e, keyPath: "storeName" })), t && (s = new oe(t)), { persister: n, crypt: s, watchedStore: r };
2798
+ } catch {
2799
+ }
2800
+ return { persister: n, crypt: s, watchedStore: r };
2801
+ }
2802
+ function Dr(e, t) {
2803
+ let n;
2804
+ return t && (n = new oe(t)), ve.pluginOptions = {
2805
+ persister: new Ms({ name: e }),
2806
+ crypt: n,
2807
+ watchedStore: /* @__PURE__ */ new Set()
2808
+ }, ve;
2809
+ }
2810
+ export {
2811
+ Ms as PersisterMock,
2812
+ Ir as createPersistStatePlugin,
2813
+ Dr as createPluginMock
2814
+ };