@samline/notify 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +121 -150
  3. package/dist/browser-notify.js +69 -0
  4. package/dist/cc-2Yt7NqMX.mjs +21 -0
  5. package/dist/cc-B6peeNak.mjs +33 -0
  6. package/dist/cc-BWuAzFJ6.js +12 -0
  7. package/dist/cc-CaBHsjUt.js +34 -0
  8. package/dist/cc-DGff5sSY.js +21 -0
  9. package/dist/cc-he3fHS3P.mjs +12 -0
  10. package/dist/notify.d.mts +44 -0
  11. package/dist/notify.d.mts.map +1 -0
  12. package/dist/notify.d.ts +44 -0
  13. package/dist/notify.d.ts.map +1 -0
  14. package/dist/notify.js +90 -0
  15. package/dist/notify.mjs +87 -0
  16. package/dist/react-notify-12s-7LOZlSBi.js +1068 -0
  17. package/dist/react-notify-12s-BjWbwTu8.mjs +1066 -0
  18. package/dist/react.d.mts +66 -0
  19. package/dist/react.d.mts.map +1 -0
  20. package/dist/react.d.ts +66 -0
  21. package/dist/react.d.ts.map +1 -0
  22. package/dist/react.js +18 -0
  23. package/dist/react.mjs +10 -0
  24. package/dist/styles.css +477 -63
  25. package/dist/svelte.d.mts +45 -0
  26. package/dist/svelte.d.mts.map +1 -0
  27. package/dist/svelte.d.ts +45 -0
  28. package/dist/svelte.d.ts.map +1 -0
  29. package/dist/svelte.js +168 -0
  30. package/dist/svelte.mjs +165 -0
  31. package/dist/vue.d.mts +103 -0
  32. package/dist/vue.d.mts.map +1 -0
  33. package/dist/vue.d.ts +103 -0
  34. package/dist/vue.d.ts.map +1 -0
  35. package/dist/vue.js +2099 -0
  36. package/dist/vue.mjs +2096 -0
  37. package/package.json +95 -57
  38. package/dist/index.cjs.js +0 -1171
  39. package/dist/index.esm.js +0 -1164
  40. package/dist/notify.umd.js +0 -1177
  41. package/docs/browser.md +0 -99
  42. package/docs/react.md +0 -275
  43. package/docs/svelte.md +0 -267
  44. package/docs/vanilla.md +0 -256
  45. package/docs/vue.md +0 -301
  46. package/rollup.config.mjs +0 -56
  47. package/samline-notify-0.1.9.tgz +0 -0
package/dist/vue.js ADDED
@@ -0,0 +1,2099 @@
1
+ Object.defineProperty(exports, '__esModule', { value: true });
2
+
3
+ var cc = require('./cc-BWuAzFJ6.js');
4
+
5
+ /**
6
+ * @vue/shared v3.5.31
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/ // @__NO_SIDE_EFFECTS__
10
+ function makeMap(str) {
11
+ const map = /* @__PURE__ */ Object.create(null);
12
+ for (const key of str.split(","))map[key] = 1;
13
+ return (val)=>val in map;
14
+ }
15
+ const EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
16
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
17
+ const NOOP = ()=>{};
18
+ const isOn = (key)=>key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
19
+ (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
20
+ const isModelListener = (key)=>key.startsWith("onUpdate:");
21
+ const extend = Object.assign;
22
+ const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
23
+ const hasOwn = (val, key)=>hasOwnProperty$1.call(val, key);
24
+ const isArray = Array.isArray;
25
+ const isMap = (val)=>toTypeString(val) === "[object Map]";
26
+ const isFunction = (val)=>typeof val === "function";
27
+ const isString = (val)=>typeof val === "string";
28
+ const isSymbol = (val)=>typeof val === "symbol";
29
+ const isObject = (val)=>val !== null && typeof val === "object";
30
+ const isPromise = (val)=>{
31
+ return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
32
+ };
33
+ const objectToString = Object.prototype.toString;
34
+ const toTypeString = (value)=>objectToString.call(value);
35
+ const toRawType = (value)=>{
36
+ return toTypeString(value).slice(8, -1);
37
+ };
38
+ const isIntegerKey = (key)=>isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
39
+ const cacheStringFunction = (fn)=>{
40
+ const cache = /* @__PURE__ */ Object.create(null);
41
+ return (str)=>{
42
+ const hit = cache[str];
43
+ return hit || (cache[str] = fn(str));
44
+ };
45
+ };
46
+ const capitalize = cacheStringFunction((str)=>{
47
+ return str.charAt(0).toUpperCase() + str.slice(1);
48
+ });
49
+ const toHandlerKey = cacheStringFunction((str)=>{
50
+ const s = str ? `on${capitalize(str)}` : ``;
51
+ return s;
52
+ });
53
+ const hasChanged = (value, oldValue)=>!Object.is(value, oldValue);
54
+ let _globalThis;
55
+ const getGlobalThis = ()=>{
56
+ return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
57
+ };
58
+ function normalizeStyle(value) {
59
+ if (isArray(value)) {
60
+ const res = {};
61
+ for(let i = 0; i < value.length; i++){
62
+ const item = value[i];
63
+ const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
64
+ if (normalized) {
65
+ for(const key in normalized){
66
+ res[key] = normalized[key];
67
+ }
68
+ }
69
+ }
70
+ return res;
71
+ } else if (isString(value) || isObject(value)) {
72
+ return value;
73
+ }
74
+ }
75
+ const listDelimiterRE = /;(?![^(]*\))/g;
76
+ const propertyDelimiterRE = /:([^]+)/;
77
+ const styleCommentRE = /\/\*[^]*?\*\//g;
78
+ function parseStringStyle(cssText) {
79
+ const ret = {};
80
+ cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item)=>{
81
+ if (item) {
82
+ const tmp = item.split(propertyDelimiterRE);
83
+ tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
84
+ }
85
+ });
86
+ return ret;
87
+ }
88
+ function normalizeClass(value) {
89
+ let res = "";
90
+ if (isString(value)) {
91
+ res = value;
92
+ } else if (isArray(value)) {
93
+ for(let i = 0; i < value.length; i++){
94
+ const normalized = normalizeClass(value[i]);
95
+ if (normalized) {
96
+ res += normalized + " ";
97
+ }
98
+ }
99
+ } else if (isObject(value)) {
100
+ for(const name in value){
101
+ if (value[name]) {
102
+ res += name + " ";
103
+ }
104
+ }
105
+ }
106
+ return res.trim();
107
+ }
108
+
109
+ function warn(msg, ...args) {
110
+ console.warn(`[Vue warn] ${msg}`, ...args);
111
+ }
112
+ let batchDepth = 0;
113
+ let batchedSub;
114
+ function startBatch() {
115
+ batchDepth++;
116
+ }
117
+ function endBatch() {
118
+ if (--batchDepth > 0) {
119
+ return;
120
+ }
121
+ let error;
122
+ while(batchedSub){
123
+ let e = batchedSub;
124
+ batchedSub = void 0;
125
+ while(e){
126
+ const next = e.next;
127
+ e.next = void 0;
128
+ e.flags &= -9;
129
+ if (e.flags & 1) {
130
+ try {
131
+ ;
132
+ e.trigger();
133
+ } catch (err) {
134
+ if (!error) error = err;
135
+ }
136
+ }
137
+ e = next;
138
+ }
139
+ }
140
+ if (error) throw error;
141
+ }
142
+ class Dep {
143
+ track(debugInfo) {
144
+ {
145
+ return;
146
+ }
147
+ }
148
+ trigger(debugInfo) {
149
+ this.version++;
150
+ this.notify(debugInfo);
151
+ }
152
+ notify(debugInfo) {
153
+ startBatch();
154
+ try {
155
+ if (!!(process.env.NODE_ENV !== "production")) {
156
+ for(let head = this.subsHead; head; head = head.nextSub){
157
+ if (head.sub.onTrigger && !(head.sub.flags & 8)) {
158
+ head.sub.onTrigger(extend({
159
+ effect: head.sub
160
+ }, debugInfo));
161
+ }
162
+ }
163
+ }
164
+ for(let link = this.subs; link; link = link.prevSub){
165
+ if (link.sub.notify()) {
166
+ ;
167
+ link.sub.dep.notify();
168
+ }
169
+ }
170
+ } finally{
171
+ endBatch();
172
+ }
173
+ }
174
+ // TODO isolatedDeclarations "__v_skip"
175
+ constructor(computed){
176
+ this.computed = computed;
177
+ this.version = 0;
178
+ /**
179
+ * Link between this dep and the current active effect
180
+ */ this.activeLink = void 0;
181
+ /**
182
+ * Doubly linked list representing the subscribing effects (tail)
183
+ */ this.subs = void 0;
184
+ /**
185
+ * For object property deps cleanup
186
+ */ this.map = void 0;
187
+ this.key = void 0;
188
+ /**
189
+ * Subscriber counter
190
+ */ this.sc = 0;
191
+ /**
192
+ * @internal
193
+ */ this.__v_skip = true;
194
+ if (!!(process.env.NODE_ENV !== "production")) {
195
+ this.subsHead = void 0;
196
+ }
197
+ }
198
+ }
199
+ const targetMap = /* @__PURE__ */ new WeakMap();
200
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? "Object iterate" : "");
201
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : "");
202
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? "Array iterate" : "");
203
+ function track(target, type, key) {
204
+ }
205
+ function trigger(target, type, key, newValue, oldValue, oldTarget) {
206
+ const depsMap = targetMap.get(target);
207
+ if (!depsMap) {
208
+ return;
209
+ }
210
+ const run = (dep)=>{
211
+ if (dep) {
212
+ if (!!(process.env.NODE_ENV !== "production")) {
213
+ dep.trigger({
214
+ target,
215
+ type,
216
+ key,
217
+ newValue,
218
+ oldValue,
219
+ oldTarget
220
+ });
221
+ } else {
222
+ dep.trigger();
223
+ }
224
+ }
225
+ };
226
+ startBatch();
227
+ if (type === "clear") {
228
+ depsMap.forEach(run);
229
+ } else {
230
+ const targetIsArray = isArray(target);
231
+ const isArrayIndex = targetIsArray && isIntegerKey(key);
232
+ if (targetIsArray && key === "length") {
233
+ const newLength = Number(newValue);
234
+ depsMap.forEach((dep, key2)=>{
235
+ if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
236
+ run(dep);
237
+ }
238
+ });
239
+ } else {
240
+ if (key !== void 0 || depsMap.has(void 0)) {
241
+ run(depsMap.get(key));
242
+ }
243
+ if (isArrayIndex) {
244
+ run(depsMap.get(ARRAY_ITERATE_KEY));
245
+ }
246
+ switch(type){
247
+ case "add":
248
+ if (!targetIsArray) {
249
+ run(depsMap.get(ITERATE_KEY));
250
+ if (isMap(target)) {
251
+ run(depsMap.get(MAP_KEY_ITERATE_KEY));
252
+ }
253
+ } else if (isArrayIndex) {
254
+ run(depsMap.get("length"));
255
+ }
256
+ break;
257
+ case "delete":
258
+ if (!targetIsArray) {
259
+ run(depsMap.get(ITERATE_KEY));
260
+ if (isMap(target)) {
261
+ run(depsMap.get(MAP_KEY_ITERATE_KEY));
262
+ }
263
+ }
264
+ break;
265
+ case "set":
266
+ if (isMap(target)) {
267
+ run(depsMap.get(ITERATE_KEY));
268
+ }
269
+ break;
270
+ }
271
+ }
272
+ }
273
+ endBatch();
274
+ }
275
+ function reactiveReadArray(array) {
276
+ const raw = toRaw(array);
277
+ if (raw === array) return raw;
278
+ return isShallow(array) ? raw : raw.map(toReactive);
279
+ }
280
+ function shallowReadArray(arr) {
281
+ track(arr = toRaw(arr));
282
+ return arr;
283
+ }
284
+ function toWrapped(target, item) {
285
+ if (isReadonly(target)) {
286
+ return isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
287
+ }
288
+ return toReactive(item);
289
+ }
290
+ const arrayInstrumentations = {
291
+ __proto__: null,
292
+ [Symbol.iterator] () {
293
+ return iterator(this, Symbol.iterator, (item)=>toWrapped(this, item));
294
+ },
295
+ concat (...args) {
296
+ return reactiveReadArray(this).concat(...args.map((x)=>isArray(x) ? reactiveReadArray(x) : x));
297
+ },
298
+ entries () {
299
+ return iterator(this, "entries", (value)=>{
300
+ value[1] = toWrapped(this, value[1]);
301
+ return value;
302
+ });
303
+ },
304
+ every (fn, thisArg) {
305
+ return apply(this, "every", fn, thisArg, void 0, arguments);
306
+ },
307
+ filter (fn, thisArg) {
308
+ return apply(this, "filter", fn, thisArg, (v)=>v.map((item)=>toWrapped(this, item)), arguments);
309
+ },
310
+ find (fn, thisArg) {
311
+ return apply(this, "find", fn, thisArg, (item)=>toWrapped(this, item), arguments);
312
+ },
313
+ findIndex (fn, thisArg) {
314
+ return apply(this, "findIndex", fn, thisArg, void 0, arguments);
315
+ },
316
+ findLast (fn, thisArg) {
317
+ return apply(this, "findLast", fn, thisArg, (item)=>toWrapped(this, item), arguments);
318
+ },
319
+ findLastIndex (fn, thisArg) {
320
+ return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
321
+ },
322
+ // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
323
+ forEach (fn, thisArg) {
324
+ return apply(this, "forEach", fn, thisArg, void 0, arguments);
325
+ },
326
+ includes (...args) {
327
+ return searchProxy(this, "includes", args);
328
+ },
329
+ indexOf (...args) {
330
+ return searchProxy(this, "indexOf", args);
331
+ },
332
+ join (separator) {
333
+ return reactiveReadArray(this).join(separator);
334
+ },
335
+ // keys() iterator only reads `length`, no optimization required
336
+ lastIndexOf (...args) {
337
+ return searchProxy(this, "lastIndexOf", args);
338
+ },
339
+ map (fn, thisArg) {
340
+ return apply(this, "map", fn, thisArg, void 0, arguments);
341
+ },
342
+ pop () {
343
+ return noTracking(this, "pop");
344
+ },
345
+ push (...args) {
346
+ return noTracking(this, "push", args);
347
+ },
348
+ reduce (fn, ...args) {
349
+ return reduce(this, "reduce", fn, args);
350
+ },
351
+ reduceRight (fn, ...args) {
352
+ return reduce(this, "reduceRight", fn, args);
353
+ },
354
+ shift () {
355
+ return noTracking(this, "shift");
356
+ },
357
+ // slice could use ARRAY_ITERATE but also seems to beg for range tracking
358
+ some (fn, thisArg) {
359
+ return apply(this, "some", fn, thisArg, void 0, arguments);
360
+ },
361
+ splice (...args) {
362
+ return noTracking(this, "splice", args);
363
+ },
364
+ toReversed () {
365
+ return reactiveReadArray(this).toReversed();
366
+ },
367
+ toSorted (comparer) {
368
+ return reactiveReadArray(this).toSorted(comparer);
369
+ },
370
+ toSpliced (...args) {
371
+ return reactiveReadArray(this).toSpliced(...args);
372
+ },
373
+ unshift (...args) {
374
+ return noTracking(this, "unshift", args);
375
+ },
376
+ values () {
377
+ return iterator(this, "values", (item)=>toWrapped(this, item));
378
+ }
379
+ };
380
+ function iterator(self, method, wrapValue) {
381
+ const arr = shallowReadArray(self);
382
+ const iter = arr[method]();
383
+ if (arr !== self && !isShallow(self)) {
384
+ iter._next = iter.next;
385
+ iter.next = ()=>{
386
+ const result = iter._next();
387
+ if (!result.done) {
388
+ result.value = wrapValue(result.value);
389
+ }
390
+ return result;
391
+ };
392
+ }
393
+ return iter;
394
+ }
395
+ const arrayProto = Array.prototype;
396
+ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
397
+ const arr = shallowReadArray(self);
398
+ const needsWrap = arr !== self && !isShallow(self);
399
+ const methodFn = arr[method];
400
+ if (methodFn !== arrayProto[method]) {
401
+ const result2 = methodFn.apply(self, args);
402
+ return needsWrap ? toReactive(result2) : result2;
403
+ }
404
+ let wrappedFn = fn;
405
+ if (arr !== self) {
406
+ if (needsWrap) {
407
+ wrappedFn = function(item, index) {
408
+ return fn.call(this, toWrapped(self, item), index, self);
409
+ };
410
+ } else if (fn.length > 2) {
411
+ wrappedFn = function(item, index) {
412
+ return fn.call(this, item, index, self);
413
+ };
414
+ }
415
+ }
416
+ const result = methodFn.call(arr, wrappedFn, thisArg);
417
+ return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
418
+ }
419
+ function reduce(self, method, fn, args) {
420
+ const arr = shallowReadArray(self);
421
+ const needsWrap = arr !== self && !isShallow(self);
422
+ let wrappedFn = fn;
423
+ let wrapInitialAccumulator = false;
424
+ if (arr !== self) {
425
+ if (needsWrap) {
426
+ wrapInitialAccumulator = args.length === 0;
427
+ wrappedFn = function(acc, item, index) {
428
+ if (wrapInitialAccumulator) {
429
+ wrapInitialAccumulator = false;
430
+ acc = toWrapped(self, acc);
431
+ }
432
+ return fn.call(this, acc, toWrapped(self, item), index, self);
433
+ };
434
+ } else if (fn.length > 3) {
435
+ wrappedFn = function(acc, item, index) {
436
+ return fn.call(this, acc, item, index, self);
437
+ };
438
+ }
439
+ }
440
+ const result = arr[method](wrappedFn, ...args);
441
+ return wrapInitialAccumulator ? toWrapped(self, result) : result;
442
+ }
443
+ function searchProxy(self, method, args) {
444
+ const arr = toRaw(self);
445
+ const res = arr[method](...args);
446
+ if ((res === -1 || res === false) && isProxy(args[0])) {
447
+ args[0] = toRaw(args[0]);
448
+ return arr[method](...args);
449
+ }
450
+ return res;
451
+ }
452
+ function noTracking(self, method, args = []) {
453
+ startBatch();
454
+ const res = toRaw(self)[method].apply(self, args);
455
+ endBatch();
456
+ return res;
457
+ }
458
+ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
459
+ const builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key)=>key !== "arguments" && key !== "caller").map((key)=>Symbol[key]).filter(isSymbol));
460
+ function hasOwnProperty(key) {
461
+ if (!isSymbol(key)) key = String(key);
462
+ const obj = toRaw(this);
463
+ return obj.hasOwnProperty(key);
464
+ }
465
+ class BaseReactiveHandler {
466
+ get(target, key, receiver) {
467
+ if (key === "__v_skip") return target["__v_skip"];
468
+ const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
469
+ if (key === "__v_isReactive") {
470
+ return !isReadonly2;
471
+ } else if (key === "__v_isReadonly") {
472
+ return isReadonly2;
473
+ } else if (key === "__v_isShallow") {
474
+ return isShallow2;
475
+ } else if (key === "__v_raw") {
476
+ if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
477
+ // this means the receiver is a user proxy of the reactive proxy
478
+ Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
479
+ return target;
480
+ }
481
+ return;
482
+ }
483
+ const targetIsArray = isArray(target);
484
+ if (!isReadonly2) {
485
+ let fn;
486
+ if (targetIsArray && (fn = arrayInstrumentations[key])) {
487
+ return fn;
488
+ }
489
+ if (key === "hasOwnProperty") {
490
+ return hasOwnProperty;
491
+ }
492
+ }
493
+ const res = Reflect.get(target, key, // if this is a proxy wrapping a ref, return methods using the raw ref
494
+ // as receiver so that we don't have to call `toRaw` on the ref in all
495
+ // its class methods
496
+ isRef(target) ? target : receiver);
497
+ if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
498
+ return res;
499
+ }
500
+ if (isShallow2) {
501
+ return res;
502
+ }
503
+ if (isRef(res)) {
504
+ const value = targetIsArray && isIntegerKey(key) ? res : res.value;
505
+ return isReadonly2 && isObject(value) ? readonly(value) : value;
506
+ }
507
+ if (isObject(res)) {
508
+ return isReadonly2 ? readonly(res) : reactive(res);
509
+ }
510
+ return res;
511
+ }
512
+ constructor(_isReadonly = false, _isShallow = false){
513
+ this._isReadonly = _isReadonly;
514
+ this._isShallow = _isShallow;
515
+ }
516
+ }
517
+ class MutableReactiveHandler extends BaseReactiveHandler {
518
+ set(target, key, value, receiver) {
519
+ let oldValue = target[key];
520
+ const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
521
+ if (!this._isShallow) {
522
+ const isOldValueReadonly = isReadonly(oldValue);
523
+ if (!isShallow(value) && !isReadonly(value)) {
524
+ oldValue = toRaw(oldValue);
525
+ value = toRaw(value);
526
+ }
527
+ if (!isArrayWithIntegerKey && isRef(oldValue) && !isRef(value)) {
528
+ if (isOldValueReadonly) {
529
+ if (!!(process.env.NODE_ENV !== "production")) {
530
+ warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
531
+ }
532
+ return true;
533
+ } else {
534
+ oldValue.value = value;
535
+ return true;
536
+ }
537
+ }
538
+ }
539
+ const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
540
+ const result = Reflect.set(target, key, value, isRef(target) ? target : receiver);
541
+ if (target === toRaw(receiver)) {
542
+ if (!hadKey) {
543
+ trigger(target, "add", key, value);
544
+ } else if (hasChanged(value, oldValue)) {
545
+ trigger(target, "set", key, value, oldValue);
546
+ }
547
+ }
548
+ return result;
549
+ }
550
+ deleteProperty(target, key) {
551
+ const hadKey = hasOwn(target, key);
552
+ const oldValue = target[key];
553
+ const result = Reflect.deleteProperty(target, key);
554
+ if (result && hadKey) {
555
+ trigger(target, "delete", key, void 0, oldValue);
556
+ }
557
+ return result;
558
+ }
559
+ has(target, key) {
560
+ const result = Reflect.has(target, key);
561
+ if (!isSymbol(key) || !builtInSymbols.has(key)) ;
562
+ return result;
563
+ }
564
+ ownKeys(target) {
565
+ return Reflect.ownKeys(target);
566
+ }
567
+ constructor(isShallow2 = false){
568
+ super(false, isShallow2);
569
+ }
570
+ }
571
+ class ReadonlyReactiveHandler extends BaseReactiveHandler {
572
+ set(target, key) {
573
+ if (!!(process.env.NODE_ENV !== "production")) {
574
+ warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
575
+ }
576
+ return true;
577
+ }
578
+ deleteProperty(target, key) {
579
+ if (!!(process.env.NODE_ENV !== "production")) {
580
+ warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
581
+ }
582
+ return true;
583
+ }
584
+ constructor(isShallow2 = false){
585
+ super(true, isShallow2);
586
+ }
587
+ }
588
+ const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
589
+ const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
590
+ const toShallow = (value)=>value;
591
+ const getProto = (v)=>Reflect.getPrototypeOf(v);
592
+ function createIterableMethod(method, isReadonly2, isShallow2) {
593
+ return function(...args) {
594
+ const target = this["__v_raw"];
595
+ const rawTarget = toRaw(target);
596
+ const targetIsMap = isMap(rawTarget);
597
+ const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
598
+ const innerIterator = target[method](...args);
599
+ const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
600
+ return extend(// inheriting all iterator properties
601
+ Object.create(innerIterator), {
602
+ // iterator protocol
603
+ next () {
604
+ const { value, done } = innerIterator.next();
605
+ return done ? {
606
+ value,
607
+ done
608
+ } : {
609
+ value: isPair ? [
610
+ wrap(value[0]),
611
+ wrap(value[1])
612
+ ] : wrap(value),
613
+ done
614
+ };
615
+ }
616
+ });
617
+ };
618
+ }
619
+ function createReadonlyMethod(type) {
620
+ return function(...args) {
621
+ if (!!(process.env.NODE_ENV !== "production")) {
622
+ const key = args[0] ? `on key "${args[0]}" ` : ``;
623
+ warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));
624
+ }
625
+ return type === "delete" ? false : type === "clear" ? void 0 : this;
626
+ };
627
+ }
628
+ function createInstrumentations(readonly, shallow) {
629
+ const instrumentations = {
630
+ get (key) {
631
+ const target = this["__v_raw"];
632
+ const rawTarget = toRaw(target);
633
+ const rawKey = toRaw(key);
634
+ const { has } = getProto(rawTarget);
635
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
636
+ if (has.call(rawTarget, key)) {
637
+ return wrap(target.get(key));
638
+ } else if (has.call(rawTarget, rawKey)) {
639
+ return wrap(target.get(rawKey));
640
+ } else if (target !== rawTarget) {
641
+ target.get(key);
642
+ }
643
+ },
644
+ get size () {
645
+ const target = this["__v_raw"];
646
+ return target.size;
647
+ },
648
+ has (key) {
649
+ const target = this["__v_raw"];
650
+ const rawKey = toRaw(key);
651
+ return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
652
+ },
653
+ forEach (callback, thisArg) {
654
+ const observed = this;
655
+ const target = observed["__v_raw"];
656
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
657
+ return target.forEach((value, key)=>{
658
+ return callback.call(thisArg, wrap(value), wrap(key), observed);
659
+ });
660
+ }
661
+ };
662
+ extend(instrumentations, readonly ? {
663
+ add: createReadonlyMethod("add"),
664
+ set: createReadonlyMethod("set"),
665
+ delete: createReadonlyMethod("delete"),
666
+ clear: createReadonlyMethod("clear")
667
+ } : {
668
+ add (value) {
669
+ const target = toRaw(this);
670
+ const proto = getProto(target);
671
+ const rawValue = toRaw(value);
672
+ const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;
673
+ const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
674
+ if (!hadKey) {
675
+ target.add(valueToAdd);
676
+ trigger(target, "add", valueToAdd, valueToAdd);
677
+ }
678
+ return this;
679
+ },
680
+ set (key, value) {
681
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
682
+ value = toRaw(value);
683
+ }
684
+ const target = toRaw(this);
685
+ const { has, get } = getProto(target);
686
+ let hadKey = has.call(target, key);
687
+ if (!hadKey) {
688
+ key = toRaw(key);
689
+ hadKey = has.call(target, key);
690
+ } else if (!!(process.env.NODE_ENV !== "production")) {
691
+ checkIdentityKeys(target, has, key);
692
+ }
693
+ const oldValue = get.call(target, key);
694
+ target.set(key, value);
695
+ if (!hadKey) {
696
+ trigger(target, "add", key, value);
697
+ } else if (hasChanged(value, oldValue)) {
698
+ trigger(target, "set", key, value, oldValue);
699
+ }
700
+ return this;
701
+ },
702
+ delete (key) {
703
+ const target = toRaw(this);
704
+ const { has, get } = getProto(target);
705
+ let hadKey = has.call(target, key);
706
+ if (!hadKey) {
707
+ key = toRaw(key);
708
+ hadKey = has.call(target, key);
709
+ } else if (!!(process.env.NODE_ENV !== "production")) {
710
+ checkIdentityKeys(target, has, key);
711
+ }
712
+ const oldValue = get ? get.call(target, key) : void 0;
713
+ const result = target.delete(key);
714
+ if (hadKey) {
715
+ trigger(target, "delete", key, void 0, oldValue);
716
+ }
717
+ return result;
718
+ },
719
+ clear () {
720
+ const target = toRaw(this);
721
+ const hadItems = target.size !== 0;
722
+ const oldTarget = !!(process.env.NODE_ENV !== "production") ? isMap(target) ? new Map(target) : new Set(target) : void 0;
723
+ const result = target.clear();
724
+ if (hadItems) {
725
+ trigger(target, "clear", void 0, void 0, oldTarget);
726
+ }
727
+ return result;
728
+ }
729
+ });
730
+ const iteratorMethods = [
731
+ "keys",
732
+ "values",
733
+ "entries",
734
+ Symbol.iterator
735
+ ];
736
+ iteratorMethods.forEach((method)=>{
737
+ instrumentations[method] = createIterableMethod(method, readonly, shallow);
738
+ });
739
+ return instrumentations;
740
+ }
741
+ function createInstrumentationGetter(isReadonly2, shallow) {
742
+ const instrumentations = createInstrumentations(isReadonly2, shallow);
743
+ return (target, key, receiver)=>{
744
+ if (key === "__v_isReactive") {
745
+ return !isReadonly2;
746
+ } else if (key === "__v_isReadonly") {
747
+ return isReadonly2;
748
+ } else if (key === "__v_raw") {
749
+ return target;
750
+ }
751
+ return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
752
+ };
753
+ }
754
+ const mutableCollectionHandlers = {
755
+ get: /* @__PURE__ */ createInstrumentationGetter(false, false)
756
+ };
757
+ const readonlyCollectionHandlers = {
758
+ get: /* @__PURE__ */ createInstrumentationGetter(true, false)
759
+ };
760
+ function checkIdentityKeys(target, has, key) {
761
+ const rawKey = toRaw(key);
762
+ if (rawKey !== key && has.call(target, rawKey)) {
763
+ const type = toRawType(target);
764
+ warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `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.`);
765
+ }
766
+ }
767
+ const reactiveMap = /* @__PURE__ */ new WeakMap();
768
+ const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
769
+ const readonlyMap = /* @__PURE__ */ new WeakMap();
770
+ const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
771
+ function targetTypeMap(rawType) {
772
+ switch(rawType){
773
+ case "Object":
774
+ case "Array":
775
+ return 1 /* COMMON */ ;
776
+ case "Map":
777
+ case "Set":
778
+ case "WeakMap":
779
+ case "WeakSet":
780
+ return 2 /* COLLECTION */ ;
781
+ default:
782
+ return 0 /* INVALID */ ;
783
+ }
784
+ }
785
+ function getTargetType(value) {
786
+ return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
787
+ }
788
+ // @__NO_SIDE_EFFECTS__
789
+ function reactive(target) {
790
+ if (/* @__PURE__ */ isReadonly(target)) {
791
+ return target;
792
+ }
793
+ return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
794
+ }
795
+ // @__NO_SIDE_EFFECTS__
796
+ function readonly(target) {
797
+ return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
798
+ }
799
+ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
800
+ if (!isObject(target)) {
801
+ if (!!(process.env.NODE_ENV !== "production")) {
802
+ warn(`value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(target)}`);
803
+ }
804
+ return target;
805
+ }
806
+ if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
807
+ return target;
808
+ }
809
+ const targetType = getTargetType(target);
810
+ if (targetType === 0 /* INVALID */ ) {
811
+ return target;
812
+ }
813
+ const existingProxy = proxyMap.get(target);
814
+ if (existingProxy) {
815
+ return existingProxy;
816
+ }
817
+ const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers);
818
+ proxyMap.set(target, proxy);
819
+ return proxy;
820
+ }
821
+ // @__NO_SIDE_EFFECTS__
822
+ function isReactive(value) {
823
+ if (/* @__PURE__ */ isReadonly(value)) {
824
+ return /* @__PURE__ */ isReactive(value["__v_raw"]);
825
+ }
826
+ return !!(value && value["__v_isReactive"]);
827
+ }
828
+ // @__NO_SIDE_EFFECTS__
829
+ function isReadonly(value) {
830
+ return !!(value && value["__v_isReadonly"]);
831
+ }
832
+ // @__NO_SIDE_EFFECTS__
833
+ function isShallow(value) {
834
+ return !!(value && value["__v_isShallow"]);
835
+ }
836
+ // @__NO_SIDE_EFFECTS__
837
+ function isProxy(value) {
838
+ return value ? !!value["__v_raw"] : false;
839
+ }
840
+ // @__NO_SIDE_EFFECTS__
841
+ function toRaw(observed) {
842
+ const raw = observed && observed["__v_raw"];
843
+ return raw ? /* @__PURE__ */ toRaw(raw) : observed;
844
+ }
845
+ const toReactive = (value)=>isObject(value) ? /* @__PURE__ */ reactive(value) : value;
846
+ const toReadonly = (value)=>isObject(value) ? /* @__PURE__ */ readonly(value) : value;
847
+ // @__NO_SIDE_EFFECTS__
848
+ function isRef(r) {
849
+ return r ? r["__v_isRef"] === true : false;
850
+ }
851
+ // @__NO_SIDE_EFFECTS__
852
+ function ref(value) {
853
+ return createRef(value, false);
854
+ }
855
+ function createRef(rawValue, shallow) {
856
+ if (/* @__PURE__ */ isRef(rawValue)) {
857
+ return rawValue;
858
+ }
859
+ return new RefImpl(rawValue, shallow);
860
+ }
861
+ class RefImpl {
862
+ get value() {
863
+ if (!!(process.env.NODE_ENV !== "production")) {
864
+ this.dep.track({
865
+ target: this,
866
+ type: "get",
867
+ key: "value"
868
+ });
869
+ } else {
870
+ this.dep.track();
871
+ }
872
+ return this._value;
873
+ }
874
+ set value(newValue) {
875
+ const oldValue = this._rawValue;
876
+ const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
877
+ newValue = useDirectValue ? newValue : toRaw(newValue);
878
+ if (hasChanged(newValue, oldValue)) {
879
+ this._rawValue = newValue;
880
+ this._value = useDirectValue ? newValue : toReactive(newValue);
881
+ if (!!(process.env.NODE_ENV !== "production")) {
882
+ this.dep.trigger({
883
+ target: this,
884
+ type: "set",
885
+ key: "value",
886
+ newValue,
887
+ oldValue
888
+ });
889
+ } else {
890
+ this.dep.trigger();
891
+ }
892
+ }
893
+ }
894
+ constructor(value, isShallow2){
895
+ this.dep = new Dep();
896
+ this["__v_isRef"] = true;
897
+ this["__v_isShallow"] = false;
898
+ this._rawValue = isShallow2 ? value : toRaw(value);
899
+ this._value = isShallow2 ? value : toReactive(value);
900
+ this["__v_isShallow"] = isShallow2;
901
+ }
902
+ }
903
+
904
+ const stack = [];
905
+ function pushWarningContext(vnode) {
906
+ stack.push(vnode);
907
+ }
908
+ function popWarningContext() {
909
+ stack.pop();
910
+ }
911
+ let isWarning = false;
912
+ function warn$1(msg, ...args) {
913
+ if (isWarning) return;
914
+ isWarning = true;
915
+ const instance = stack.length ? stack[stack.length - 1].component : null;
916
+ const appWarnHandler = instance && instance.appContext.config.warnHandler;
917
+ const trace = getComponentTrace();
918
+ if (appWarnHandler) {
919
+ callWithErrorHandling(appWarnHandler, instance, 11, [
920
+ // eslint-disable-next-line no-restricted-syntax
921
+ msg + args.map((a)=>{
922
+ var _a, _b;
923
+ return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
924
+ }).join(""),
925
+ instance && instance.proxy,
926
+ trace.map(({ vnode })=>`at <${formatComponentName(instance, vnode.type)}>`).join("\n"),
927
+ trace
928
+ ]);
929
+ } else {
930
+ const warnArgs = [
931
+ `[Vue warn]: ${msg}`,
932
+ ...args
933
+ ];
934
+ if (trace.length && // avoid spamming console during tests
935
+ true) {
936
+ warnArgs.push(`
937
+ `, ...formatTrace(trace));
938
+ }
939
+ console.warn(...warnArgs);
940
+ }
941
+ isWarning = false;
942
+ }
943
+ function getComponentTrace() {
944
+ let currentVNode = stack[stack.length - 1];
945
+ if (!currentVNode) {
946
+ return [];
947
+ }
948
+ const normalizedStack = [];
949
+ while(currentVNode){
950
+ const last = normalizedStack[0];
951
+ if (last && last.vnode === currentVNode) {
952
+ last.recurseCount++;
953
+ } else {
954
+ normalizedStack.push({
955
+ vnode: currentVNode,
956
+ recurseCount: 0
957
+ });
958
+ }
959
+ const parentInstance = currentVNode.component && currentVNode.component.parent;
960
+ currentVNode = parentInstance && parentInstance.vnode;
961
+ }
962
+ return normalizedStack;
963
+ }
964
+ function formatTrace(trace) {
965
+ const logs = [];
966
+ trace.forEach((entry, i)=>{
967
+ logs.push(...i === 0 ? [] : [
968
+ `
969
+ `
970
+ ], ...formatTraceEntry(entry));
971
+ });
972
+ return logs;
973
+ }
974
+ function formatTraceEntry({ vnode, recurseCount }) {
975
+ const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
976
+ const isRoot = vnode.component ? vnode.component.parent == null : false;
977
+ const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
978
+ const close = `>` + postfix;
979
+ return vnode.props ? [
980
+ open,
981
+ ...formatProps(vnode.props),
982
+ close
983
+ ] : [
984
+ open + close
985
+ ];
986
+ }
987
+ function formatProps(props) {
988
+ const res = [];
989
+ const keys = Object.keys(props);
990
+ keys.slice(0, 3).forEach((key)=>{
991
+ res.push(...formatProp(key, props[key]));
992
+ });
993
+ if (keys.length > 3) {
994
+ res.push(` ...`);
995
+ }
996
+ return res;
997
+ }
998
+ function formatProp(key, value, raw) {
999
+ if (isString(value)) {
1000
+ value = JSON.stringify(value);
1001
+ return raw ? value : [
1002
+ `${key}=${value}`
1003
+ ];
1004
+ } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
1005
+ return raw ? value : [
1006
+ `${key}=${value}`
1007
+ ];
1008
+ } else if (isRef(value)) {
1009
+ value = formatProp(key, toRaw(value.value), true);
1010
+ return raw ? value : [
1011
+ `${key}=Ref<`,
1012
+ value,
1013
+ `>`
1014
+ ];
1015
+ } else if (isFunction(value)) {
1016
+ return [
1017
+ `${key}=fn${value.name ? `<${value.name}>` : ``}`
1018
+ ];
1019
+ } else {
1020
+ value = toRaw(value);
1021
+ return raw ? value : [
1022
+ `${key}=`,
1023
+ value
1024
+ ];
1025
+ }
1026
+ }
1027
+ const ErrorTypeStrings$1 = {
1028
+ ["sp"]: "serverPrefetch hook",
1029
+ ["bc"]: "beforeCreate hook",
1030
+ ["c"]: "created hook",
1031
+ ["bm"]: "beforeMount hook",
1032
+ ["m"]: "mounted hook",
1033
+ ["bu"]: "beforeUpdate hook",
1034
+ ["u"]: "updated",
1035
+ ["bum"]: "beforeUnmount hook",
1036
+ ["um"]: "unmounted hook",
1037
+ ["a"]: "activated hook",
1038
+ ["da"]: "deactivated hook",
1039
+ ["ec"]: "errorCaptured hook",
1040
+ ["rtc"]: "renderTracked hook",
1041
+ ["rtg"]: "renderTriggered hook",
1042
+ [0]: "setup function",
1043
+ [1]: "render function",
1044
+ [2]: "watcher getter",
1045
+ [3]: "watcher callback",
1046
+ [4]: "watcher cleanup function",
1047
+ [5]: "native event handler",
1048
+ [6]: "component event handler",
1049
+ [7]: "vnode hook",
1050
+ [8]: "directive hook",
1051
+ [9]: "transition hook",
1052
+ [10]: "app errorHandler",
1053
+ [11]: "app warnHandler",
1054
+ [12]: "ref function",
1055
+ [13]: "async component loader",
1056
+ [14]: "scheduler flush",
1057
+ [15]: "component update",
1058
+ [16]: "app unmount cleanup function"
1059
+ };
1060
+ function callWithErrorHandling(fn, instance, type, args) {
1061
+ try {
1062
+ return args ? fn(...args) : fn();
1063
+ } catch (err) {
1064
+ handleError(err, instance, type);
1065
+ }
1066
+ }
1067
+ function callWithAsyncErrorHandling(fn, instance, type, args) {
1068
+ if (isFunction(fn)) {
1069
+ const res = callWithErrorHandling(fn, instance, type, args);
1070
+ if (res && isPromise(res)) {
1071
+ res.catch((err)=>{
1072
+ handleError(err, instance, type);
1073
+ });
1074
+ }
1075
+ return res;
1076
+ }
1077
+ if (isArray(fn)) {
1078
+ const values = [];
1079
+ for(let i = 0; i < fn.length; i++){
1080
+ values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1081
+ }
1082
+ return values;
1083
+ } else if (!!(process.env.NODE_ENV !== "production")) {
1084
+ warn$1(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`);
1085
+ }
1086
+ }
1087
+ function handleError(err, instance, type, throwInDev = true) {
1088
+ const contextVNode = instance ? instance.vnode : null;
1089
+ const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
1090
+ if (instance) {
1091
+ let cur = instance.parent;
1092
+ const exposedInstance = instance.proxy;
1093
+ const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
1094
+ while(cur){
1095
+ const errorCapturedHooks = cur.ec;
1096
+ if (errorCapturedHooks) {
1097
+ for(let i = 0; i < errorCapturedHooks.length; i++){
1098
+ if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
1099
+ return;
1100
+ }
1101
+ }
1102
+ }
1103
+ cur = cur.parent;
1104
+ }
1105
+ if (errorHandler) {
1106
+ callWithErrorHandling(errorHandler, null, 10, [
1107
+ err,
1108
+ exposedInstance,
1109
+ errorInfo
1110
+ ]);
1111
+ return;
1112
+ }
1113
+ }
1114
+ logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
1115
+ }
1116
+ function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
1117
+ if (!!(process.env.NODE_ENV !== "production")) {
1118
+ const info = ErrorTypeStrings$1[type];
1119
+ if (contextVNode) {
1120
+ pushWarningContext(contextVNode);
1121
+ }
1122
+ warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1123
+ if (contextVNode) {
1124
+ popWarningContext();
1125
+ }
1126
+ if (throwInDev) {
1127
+ throw err;
1128
+ } else {
1129
+ console.error(err);
1130
+ }
1131
+ } else if (throwInProd) {
1132
+ throw err;
1133
+ } else {
1134
+ console.error(err);
1135
+ }
1136
+ }
1137
+ const queue = [];
1138
+ let flushIndex = -1;
1139
+ const pendingPostFlushCbs = [];
1140
+ let activePostFlushCbs = null;
1141
+ let postFlushIndex = 0;
1142
+ const resolvedPromise = /* @__PURE__ */ Promise.resolve();
1143
+ let currentFlushPromise = null;
1144
+ const RECURSION_LIMIT = 100;
1145
+ function findInsertionIndex(id) {
1146
+ let start = flushIndex + 1;
1147
+ let end = queue.length;
1148
+ while(start < end){
1149
+ const middle = start + end >>> 1;
1150
+ const middleJob = queue[middle];
1151
+ const middleJobId = getId(middleJob);
1152
+ if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
1153
+ start = middle + 1;
1154
+ } else {
1155
+ end = middle;
1156
+ }
1157
+ }
1158
+ return start;
1159
+ }
1160
+ function queueJob(job) {
1161
+ if (!(job.flags & 1)) {
1162
+ const jobId = getId(job);
1163
+ const lastJob = queue[queue.length - 1];
1164
+ if (!lastJob || // fast path when the job id is larger than the tail
1165
+ !(job.flags & 2) && jobId >= getId(lastJob)) {
1166
+ queue.push(job);
1167
+ } else {
1168
+ queue.splice(findInsertionIndex(jobId), 0, job);
1169
+ }
1170
+ job.flags |= 1;
1171
+ queueFlush();
1172
+ }
1173
+ }
1174
+ function queueFlush() {
1175
+ if (!currentFlushPromise) {
1176
+ currentFlushPromise = resolvedPromise.then(flushJobs);
1177
+ }
1178
+ }
1179
+ function queuePostFlushCb(cb) {
1180
+ if (!isArray(cb)) {
1181
+ if (activePostFlushCbs && cb.id === -1) {
1182
+ activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
1183
+ } else if (!(cb.flags & 1)) {
1184
+ pendingPostFlushCbs.push(cb);
1185
+ cb.flags |= 1;
1186
+ }
1187
+ } else {
1188
+ pendingPostFlushCbs.push(...cb);
1189
+ }
1190
+ queueFlush();
1191
+ }
1192
+ function flushPostFlushCbs(seen) {
1193
+ if (pendingPostFlushCbs.length) {
1194
+ const deduped = [
1195
+ ...new Set(pendingPostFlushCbs)
1196
+ ].sort((a, b)=>getId(a) - getId(b));
1197
+ pendingPostFlushCbs.length = 0;
1198
+ if (activePostFlushCbs) {
1199
+ activePostFlushCbs.push(...deduped);
1200
+ return;
1201
+ }
1202
+ activePostFlushCbs = deduped;
1203
+ if (!!(process.env.NODE_ENV !== "production")) {
1204
+ seen = seen || /* @__PURE__ */ new Map();
1205
+ }
1206
+ for(postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++){
1207
+ const cb = activePostFlushCbs[postFlushIndex];
1208
+ if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
1209
+ continue;
1210
+ }
1211
+ if (cb.flags & 4) {
1212
+ cb.flags &= -2;
1213
+ }
1214
+ if (!(cb.flags & 8)) cb();
1215
+ cb.flags &= -2;
1216
+ }
1217
+ activePostFlushCbs = null;
1218
+ postFlushIndex = 0;
1219
+ }
1220
+ }
1221
+ const getId = (job)=>job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
1222
+ function flushJobs(seen) {
1223
+ if (!!(process.env.NODE_ENV !== "production")) {
1224
+ seen = seen || /* @__PURE__ */ new Map();
1225
+ }
1226
+ const check = !!(process.env.NODE_ENV !== "production") ? (job)=>checkRecursiveUpdates(seen, job) : NOOP;
1227
+ try {
1228
+ for(flushIndex = 0; flushIndex < queue.length; flushIndex++){
1229
+ const job = queue[flushIndex];
1230
+ if (job && !(job.flags & 8)) {
1231
+ if (!!(process.env.NODE_ENV !== "production") && check(job)) {
1232
+ continue;
1233
+ }
1234
+ if (job.flags & 4) {
1235
+ job.flags &= ~1;
1236
+ }
1237
+ callWithErrorHandling(job, job.i, job.i ? 15 : 14);
1238
+ if (!(job.flags & 4)) {
1239
+ job.flags &= ~1;
1240
+ }
1241
+ }
1242
+ }
1243
+ } finally{
1244
+ for(; flushIndex < queue.length; flushIndex++){
1245
+ const job = queue[flushIndex];
1246
+ if (job) {
1247
+ job.flags &= -2;
1248
+ }
1249
+ }
1250
+ flushIndex = -1;
1251
+ queue.length = 0;
1252
+ flushPostFlushCbs(seen);
1253
+ currentFlushPromise = null;
1254
+ if (queue.length || pendingPostFlushCbs.length) {
1255
+ flushJobs(seen);
1256
+ }
1257
+ }
1258
+ }
1259
+ function checkRecursiveUpdates(seen, fn) {
1260
+ const count = seen.get(fn) || 0;
1261
+ if (count > RECURSION_LIMIT) {
1262
+ const instance = fn.i;
1263
+ const componentName = instance && getComponentName(instance.type);
1264
+ handleError(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. 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.`, null, 10);
1265
+ return true;
1266
+ }
1267
+ seen.set(fn, count + 1);
1268
+ return false;
1269
+ }
1270
+ const hmrDirtyComponents = /* @__PURE__ */ new Map();
1271
+ if (!!(process.env.NODE_ENV !== "production")) {
1272
+ getGlobalThis().__VUE_HMR_RUNTIME__ = {
1273
+ createRecord: tryWrap(createRecord),
1274
+ rerender: tryWrap(rerender),
1275
+ reload: tryWrap(reload)
1276
+ };
1277
+ }
1278
+ const map = /* @__PURE__ */ new Map();
1279
+ function createRecord(id, initialDef) {
1280
+ if (map.has(id)) {
1281
+ return false;
1282
+ }
1283
+ map.set(id, {
1284
+ initialDef: normalizeClassComponent(initialDef),
1285
+ instances: /* @__PURE__ */ new Set()
1286
+ });
1287
+ return true;
1288
+ }
1289
+ function normalizeClassComponent(component) {
1290
+ return isClassComponent(component) ? component.__vccOpts : component;
1291
+ }
1292
+ function rerender(id, newRender) {
1293
+ const record = map.get(id);
1294
+ if (!record) {
1295
+ return;
1296
+ }
1297
+ record.initialDef.render = newRender;
1298
+ [
1299
+ ...record.instances
1300
+ ].forEach((instance)=>{
1301
+ if (newRender) {
1302
+ instance.render = newRender;
1303
+ normalizeClassComponent(instance.type).render = newRender;
1304
+ }
1305
+ instance.renderCache = [];
1306
+ if (!(instance.job.flags & 8)) {
1307
+ instance.update();
1308
+ }
1309
+ });
1310
+ }
1311
+ function reload(id, newComp) {
1312
+ const record = map.get(id);
1313
+ if (!record) return;
1314
+ newComp = normalizeClassComponent(newComp);
1315
+ updateComponentDef(record.initialDef, newComp);
1316
+ const instances = [
1317
+ ...record.instances
1318
+ ];
1319
+ for(let i = 0; i < instances.length; i++){
1320
+ const instance = instances[i];
1321
+ const oldComp = normalizeClassComponent(instance.type);
1322
+ let dirtyInstances = hmrDirtyComponents.get(oldComp);
1323
+ if (!dirtyInstances) {
1324
+ if (oldComp !== record.initialDef) {
1325
+ updateComponentDef(oldComp, newComp);
1326
+ }
1327
+ hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
1328
+ }
1329
+ dirtyInstances.add(instance);
1330
+ instance.appContext.propsCache.delete(instance.type);
1331
+ instance.appContext.emitsCache.delete(instance.type);
1332
+ instance.appContext.optionsCache.delete(instance.type);
1333
+ if (instance.ceReload) {
1334
+ dirtyInstances.add(instance);
1335
+ instance.ceReload(newComp.styles);
1336
+ dirtyInstances.delete(instance);
1337
+ } else if (instance.parent) {
1338
+ queueJob(()=>{
1339
+ if (!(instance.job.flags & 8)) {
1340
+ instance.parent.update();
1341
+ dirtyInstances.delete(instance);
1342
+ }
1343
+ });
1344
+ } else if (instance.appContext.reload) {
1345
+ instance.appContext.reload();
1346
+ } else if (typeof window !== "undefined") {
1347
+ window.location.reload();
1348
+ } else {
1349
+ console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
1350
+ }
1351
+ if (instance.root.ce && instance !== instance.root) {
1352
+ instance.root.ce._removeChildStyle(oldComp);
1353
+ }
1354
+ }
1355
+ queuePostFlushCb(()=>{
1356
+ hmrDirtyComponents.clear();
1357
+ });
1358
+ }
1359
+ function updateComponentDef(oldComp, newComp) {
1360
+ extend(oldComp, newComp);
1361
+ for(const key in oldComp){
1362
+ if (key !== "__file" && !(key in newComp)) {
1363
+ delete oldComp[key];
1364
+ }
1365
+ }
1366
+ }
1367
+ function tryWrap(fn) {
1368
+ return (id, arg)=>{
1369
+ try {
1370
+ return fn(id, arg);
1371
+ } catch (e) {
1372
+ console.error(e);
1373
+ console.warn(`[HMR] Something went wrong during Vue component hot-reload. Full reload required.`);
1374
+ }
1375
+ };
1376
+ }
1377
+ let devtools$1;
1378
+ let buffer = [];
1379
+ function setDevtoolsHook$1(hook, target) {
1380
+ var _a, _b;
1381
+ devtools$1 = hook;
1382
+ if (devtools$1) {
1383
+ devtools$1.enabled = true;
1384
+ buffer.forEach(({ event, args })=>devtools$1.emit(event, ...args));
1385
+ buffer = [];
1386
+ } else if (// handle late devtools injection - only do this if we are in an actual
1387
+ // browser environment to avoid the timer handle stalling test runner exit
1388
+ // (#4815)
1389
+ typeof window !== "undefined" && // some envs mock window but not fully
1390
+ window.HTMLElement && // also exclude jsdom
1391
+ // eslint-disable-next-line no-restricted-syntax
1392
+ !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))) {
1393
+ const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
1394
+ replay.push((newHook)=>{
1395
+ setDevtoolsHook$1(newHook, target);
1396
+ });
1397
+ setTimeout(()=>{
1398
+ if (!devtools$1) {
1399
+ target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
1400
+ buffer = [];
1401
+ }
1402
+ }, 3e3);
1403
+ } else {
1404
+ buffer = [];
1405
+ }
1406
+ }
1407
+ let currentRenderingInstance = null;
1408
+ let currentScopeId = null;
1409
+ const isTeleport = (type)=>type.__isTeleport;
1410
+ function setTransitionHooks(vnode, hooks) {
1411
+ if (vnode.shapeFlag & 6 && vnode.component) {
1412
+ vnode.transition = hooks;
1413
+ setTransitionHooks(vnode.component.subTree, hooks);
1414
+ } else if (vnode.shapeFlag & 128) {
1415
+ vnode.ssContent.transition = hooks.clone(vnode.ssContent);
1416
+ vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
1417
+ } else {
1418
+ vnode.transition = hooks;
1419
+ }
1420
+ }
1421
+ getGlobalThis().requestIdleCallback || ((cb)=>setTimeout(cb, 1));
1422
+ getGlobalThis().cancelIdleCallback || ((id)=>clearTimeout(id));
1423
+ function injectHook(type, hook, target = currentInstance, prepend = false) {
1424
+ if (target) {
1425
+ const hooks = target[type] || (target[type] = []);
1426
+ const wrappedHook = hook.__weh || (hook.__weh = (...args)=>{
1427
+ const reset = setCurrentInstance(target);
1428
+ const res = callWithAsyncErrorHandling(hook, target, type, args);
1429
+ reset();
1430
+ return res;
1431
+ });
1432
+ if (prepend) {
1433
+ hooks.unshift(wrappedHook);
1434
+ } else {
1435
+ hooks.push(wrappedHook);
1436
+ }
1437
+ return wrappedHook;
1438
+ } else if (!!(process.env.NODE_ENV !== "production")) {
1439
+ const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
1440
+ warn$1(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + ` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`);
1441
+ }
1442
+ }
1443
+ const createHook = (lifecycle)=>(hook, target = currentInstance)=>{
1444
+ if (!isInSSRComponentSetup || lifecycle === "sp") {
1445
+ injectHook(lifecycle, (...args)=>hook(...args), target);
1446
+ }
1447
+ };
1448
+ const onUnmounted = createHook("um");
1449
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
1450
+ const PublicInstanceProxyHandlers = {
1451
+ };
1452
+ if (!!(process.env.NODE_ENV !== "production") && true) {
1453
+ PublicInstanceProxyHandlers.ownKeys = (target)=>{
1454
+ warn$1(`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`);
1455
+ return Reflect.ownKeys(target);
1456
+ };
1457
+ }
1458
+ const internalObjectProto = {};
1459
+ const isInternalObject = (obj)=>Object.getPrototypeOf(obj) === internalObjectProto;
1460
+ const isSuspense = (type)=>type.__isSuspense;
1461
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
1462
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
1463
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
1464
+ function isVNode(value) {
1465
+ return value ? value.__v_isVNode === true : false;
1466
+ }
1467
+ const createVNodeWithArgsTransform = (...args)=>{
1468
+ return _createVNode(...args);
1469
+ };
1470
+ const normalizeKey = ({ key })=>key != null ? key : null;
1471
+ const normalizeRef = ({ ref, ref_key, ref_for })=>{
1472
+ if (typeof ref === "number") {
1473
+ ref = "" + ref;
1474
+ }
1475
+ return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? {
1476
+ i: currentRenderingInstance,
1477
+ r: ref,
1478
+ k: ref_key,
1479
+ f: !!ref_for
1480
+ } : ref : null;
1481
+ };
1482
+ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
1483
+ const vnode = {
1484
+ __v_isVNode: true,
1485
+ __v_skip: true,
1486
+ type,
1487
+ props,
1488
+ key: props && normalizeKey(props),
1489
+ ref: props && normalizeRef(props),
1490
+ scopeId: currentScopeId,
1491
+ slotScopeIds: null,
1492
+ children,
1493
+ component: null,
1494
+ suspense: null,
1495
+ ssContent: null,
1496
+ ssFallback: null,
1497
+ dirs: null,
1498
+ transition: null,
1499
+ el: null,
1500
+ anchor: null,
1501
+ target: null,
1502
+ targetStart: null,
1503
+ targetAnchor: null,
1504
+ staticCount: 0,
1505
+ shapeFlag,
1506
+ patchFlag,
1507
+ dynamicProps,
1508
+ dynamicChildren: null,
1509
+ appContext: null,
1510
+ ctx: currentRenderingInstance
1511
+ };
1512
+ if (needFullChildrenNormalization) {
1513
+ normalizeChildren(vnode, children);
1514
+ if (shapeFlag & 128) {
1515
+ type.normalize(vnode);
1516
+ }
1517
+ } else if (children) {
1518
+ vnode.shapeFlag |= isString(children) ? 8 : 16;
1519
+ }
1520
+ if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) {
1521
+ warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
1522
+ }
1523
+ return vnode;
1524
+ }
1525
+ const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode;
1526
+ function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
1527
+ if (!type || type === NULL_DYNAMIC_COMPONENT) {
1528
+ if (!!(process.env.NODE_ENV !== "production") && !type) {
1529
+ warn$1(`Invalid vnode type when creating vnode: ${type}.`);
1530
+ }
1531
+ type = Comment;
1532
+ }
1533
+ if (isVNode(type)) {
1534
+ const cloned = cloneVNode(type, props, true);
1535
+ if (children) {
1536
+ normalizeChildren(cloned, children);
1537
+ }
1538
+ cloned.patchFlag = -2;
1539
+ return cloned;
1540
+ }
1541
+ if (isClassComponent(type)) {
1542
+ type = type.__vccOpts;
1543
+ }
1544
+ if (props) {
1545
+ props = guardReactiveProps(props);
1546
+ let { class: klass, style } = props;
1547
+ if (klass && !isString(klass)) {
1548
+ props.class = normalizeClass(klass);
1549
+ }
1550
+ if (isObject(style)) {
1551
+ if (isProxy(style) && !isArray(style)) {
1552
+ style = extend({}, style);
1553
+ }
1554
+ props.style = normalizeStyle(style);
1555
+ }
1556
+ }
1557
+ const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
1558
+ if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) {
1559
+ type = toRaw(type);
1560
+ warn$1(`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\`.`, `
1561
+ Component that was made reactive: `, type);
1562
+ }
1563
+ return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);
1564
+ }
1565
+ function guardReactiveProps(props) {
1566
+ if (!props) return null;
1567
+ return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
1568
+ }
1569
+ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
1570
+ const { props, ref, patchFlag, children, transition } = vnode;
1571
+ const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
1572
+ const cloned = {
1573
+ __v_isVNode: true,
1574
+ __v_skip: true,
1575
+ type: vnode.type,
1576
+ props: mergedProps,
1577
+ key: mergedProps && normalizeKey(mergedProps),
1578
+ ref: extraProps && extraProps.ref ? // #2078 in the case of <component :is="vnode" ref="extra"/>
1579
+ // if the vnode itself already has a ref, cloneVNode will need to merge
1580
+ // the refs so the single vnode can be set on multiple refs
1581
+ mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [
1582
+ ref,
1583
+ normalizeRef(extraProps)
1584
+ ] : normalizeRef(extraProps) : ref,
1585
+ scopeId: vnode.scopeId,
1586
+ slotScopeIds: vnode.slotScopeIds,
1587
+ children: !!(process.env.NODE_ENV !== "production") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
1588
+ target: vnode.target,
1589
+ targetStart: vnode.targetStart,
1590
+ targetAnchor: vnode.targetAnchor,
1591
+ staticCount: vnode.staticCount,
1592
+ shapeFlag: vnode.shapeFlag,
1593
+ // if the vnode is cloned with extra props, we can no longer assume its
1594
+ // existing patch flag to be reliable and need to add the FULL_PROPS flag.
1595
+ // note: preserve flag for fragments since they use the flag for children
1596
+ // fast paths only.
1597
+ patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
1598
+ dynamicProps: vnode.dynamicProps,
1599
+ dynamicChildren: vnode.dynamicChildren,
1600
+ appContext: vnode.appContext,
1601
+ dirs: vnode.dirs,
1602
+ transition,
1603
+ // These should technically only be non-null on mounted VNodes. However,
1604
+ // they *should* be copied for kept-alive vnodes. So we just always copy
1605
+ // them since them being non-null during a mount doesn't affect the logic as
1606
+ // they will simply be overwritten.
1607
+ component: vnode.component,
1608
+ suspense: vnode.suspense,
1609
+ ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
1610
+ ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
1611
+ placeholder: vnode.placeholder,
1612
+ el: vnode.el,
1613
+ anchor: vnode.anchor,
1614
+ ctx: vnode.ctx,
1615
+ ce: vnode.ce
1616
+ };
1617
+ if (transition && cloneTransition) {
1618
+ setTransitionHooks(cloned, transition.clone(cloned));
1619
+ }
1620
+ return cloned;
1621
+ }
1622
+ function deepCloneVNode(vnode) {
1623
+ const cloned = cloneVNode(vnode);
1624
+ if (isArray(vnode.children)) {
1625
+ cloned.children = vnode.children.map(deepCloneVNode);
1626
+ }
1627
+ return cloned;
1628
+ }
1629
+ function createTextVNode(text = " ", flag = 0) {
1630
+ return createVNode(Text, null, text, flag);
1631
+ }
1632
+ function normalizeChildren(vnode, children) {
1633
+ let type = 0;
1634
+ const { shapeFlag } = vnode;
1635
+ if (children == null) {
1636
+ children = null;
1637
+ } else if (isArray(children)) {
1638
+ type = 16;
1639
+ } else if (typeof children === "object") {
1640
+ if (shapeFlag & (1 | 64)) {
1641
+ const slot = children.default;
1642
+ if (slot) {
1643
+ slot._c && (slot._d = false);
1644
+ normalizeChildren(vnode, slot());
1645
+ slot._c && (slot._d = true);
1646
+ }
1647
+ return;
1648
+ } else {
1649
+ type = 32;
1650
+ const slotFlag = children._;
1651
+ if (!slotFlag && !isInternalObject(children)) {
1652
+ children._ctx = currentRenderingInstance;
1653
+ }
1654
+ }
1655
+ } else if (isFunction(children)) {
1656
+ children = {
1657
+ default: children,
1658
+ _ctx: currentRenderingInstance
1659
+ };
1660
+ type = 32;
1661
+ } else {
1662
+ children = String(children);
1663
+ if (shapeFlag & 64) {
1664
+ type = 16;
1665
+ children = [
1666
+ createTextVNode(children)
1667
+ ];
1668
+ } else {
1669
+ type = 8;
1670
+ }
1671
+ }
1672
+ vnode.children = children;
1673
+ vnode.shapeFlag |= type;
1674
+ }
1675
+ function mergeProps(...args) {
1676
+ const ret = {};
1677
+ for(let i = 0; i < args.length; i++){
1678
+ const toMerge = args[i];
1679
+ for(const key in toMerge){
1680
+ if (key === "class") {
1681
+ if (ret.class !== toMerge.class) {
1682
+ ret.class = normalizeClass([
1683
+ ret.class,
1684
+ toMerge.class
1685
+ ]);
1686
+ }
1687
+ } else if (key === "style") {
1688
+ ret.style = normalizeStyle([
1689
+ ret.style,
1690
+ toMerge.style
1691
+ ]);
1692
+ } else if (isOn(key)) {
1693
+ const existing = ret[key];
1694
+ const incoming = toMerge[key];
1695
+ if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
1696
+ ret[key] = existing ? [].concat(existing, incoming) : incoming;
1697
+ } else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
1698
+ // the model listener.
1699
+ !isModelListener(key)) {
1700
+ ret[key] = incoming;
1701
+ }
1702
+ } else if (key !== "") {
1703
+ ret[key] = toMerge[key];
1704
+ }
1705
+ }
1706
+ }
1707
+ return ret;
1708
+ }
1709
+ let currentInstance = null;
1710
+ const getCurrentInstance = ()=>currentInstance || currentRenderingInstance;
1711
+ let internalSetCurrentInstance;
1712
+ {
1713
+ const g = getGlobalThis();
1714
+ const registerGlobalSetter = (key, setter)=>{
1715
+ let setters;
1716
+ if (!(setters = g[key])) setters = g[key] = [];
1717
+ setters.push(setter);
1718
+ return (v1)=>{
1719
+ if (setters.length > 1) setters.forEach((set)=>set(v1));
1720
+ else setters[0](v1);
1721
+ };
1722
+ };
1723
+ internalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v1)=>currentInstance = v1);
1724
+ registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v1)=>isInSSRComponentSetup = v1);
1725
+ }const setCurrentInstance = (instance)=>{
1726
+ const prev = currentInstance;
1727
+ internalSetCurrentInstance(instance);
1728
+ instance.scope.on();
1729
+ return ()=>{
1730
+ instance.scope.off();
1731
+ internalSetCurrentInstance(prev);
1732
+ };
1733
+ };
1734
+ let isInSSRComponentSetup = false;
1735
+ !!(process.env.NODE_ENV !== "production") ? {
1736
+ } : {
1737
+ };
1738
+ const classifyRE = /(?:^|[-_])\w/g;
1739
+ const classify = (str)=>str.replace(classifyRE, (c)=>c.toUpperCase()).replace(/[-_]/g, "");
1740
+ function getComponentName(Component, includeInferred = true) {
1741
+ return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
1742
+ }
1743
+ function formatComponentName(instance, Component, isRoot = false) {
1744
+ let name = getComponentName(Component);
1745
+ if (!name && Component.__file) {
1746
+ const match = Component.__file.match(/([^/\\]+)\.\w+$/);
1747
+ if (match) {
1748
+ name = match[1];
1749
+ }
1750
+ }
1751
+ if (!name && instance) {
1752
+ const inferFromRegistry = (registry)=>{
1753
+ for(const key in registry){
1754
+ if (registry[key] === Component) {
1755
+ return key;
1756
+ }
1757
+ }
1758
+ };
1759
+ name = inferFromRegistry(instance.components) || instance.parent && inferFromRegistry(instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
1760
+ }
1761
+ return name ? classify(name) : isRoot ? `App` : `Anonymous`;
1762
+ }
1763
+ function isClassComponent(value) {
1764
+ return isFunction(value) && "__vccOpts" in value;
1765
+ }
1766
+ function initCustomFormatter() {
1767
+ if (!!!(process.env.NODE_ENV !== "production") || typeof window === "undefined") {
1768
+ return;
1769
+ }
1770
+ const vueStyle = {
1771
+ style: "color:#3ba776"
1772
+ };
1773
+ const numberStyle = {
1774
+ style: "color:#1677ff"
1775
+ };
1776
+ const stringStyle = {
1777
+ style: "color:#f5222d"
1778
+ };
1779
+ const keywordStyle = {
1780
+ style: "color:#eb2f96"
1781
+ };
1782
+ const formatter = {
1783
+ __vue_custom_formatter: true,
1784
+ header (obj) {
1785
+ if (!isObject(obj)) {
1786
+ return null;
1787
+ }
1788
+ if (obj.__isVue) {
1789
+ return [
1790
+ "div",
1791
+ vueStyle,
1792
+ `VueInstance`
1793
+ ];
1794
+ } else if (isRef(obj)) {
1795
+ const value = obj.value;
1796
+ return [
1797
+ "div",
1798
+ {},
1799
+ [
1800
+ "span",
1801
+ vueStyle,
1802
+ genRefFlag(obj)
1803
+ ],
1804
+ "<",
1805
+ formatValue(value),
1806
+ `>`
1807
+ ];
1808
+ } else if (isReactive(obj)) {
1809
+ return [
1810
+ "div",
1811
+ {},
1812
+ [
1813
+ "span",
1814
+ vueStyle,
1815
+ isShallow(obj) ? "ShallowReactive" : "Reactive"
1816
+ ],
1817
+ "<",
1818
+ formatValue(obj),
1819
+ `>${isReadonly(obj) ? ` (readonly)` : ``}`
1820
+ ];
1821
+ } else if (isReadonly(obj)) {
1822
+ return [
1823
+ "div",
1824
+ {},
1825
+ [
1826
+ "span",
1827
+ vueStyle,
1828
+ isShallow(obj) ? "ShallowReadonly" : "Readonly"
1829
+ ],
1830
+ "<",
1831
+ formatValue(obj),
1832
+ ">"
1833
+ ];
1834
+ }
1835
+ return null;
1836
+ },
1837
+ hasBody (obj) {
1838
+ return obj && obj.__isVue;
1839
+ },
1840
+ body (obj) {
1841
+ if (obj && obj.__isVue) {
1842
+ return [
1843
+ "div",
1844
+ {},
1845
+ ...formatInstance(obj.$)
1846
+ ];
1847
+ }
1848
+ }
1849
+ };
1850
+ function formatInstance(instance) {
1851
+ const blocks = [];
1852
+ if (instance.type.props && instance.props) {
1853
+ blocks.push(createInstanceBlock("props", toRaw(instance.props)));
1854
+ }
1855
+ if (instance.setupState !== EMPTY_OBJ) {
1856
+ blocks.push(createInstanceBlock("setup", instance.setupState));
1857
+ }
1858
+ if (instance.data !== EMPTY_OBJ) {
1859
+ blocks.push(createInstanceBlock("data", toRaw(instance.data)));
1860
+ }
1861
+ const computed = extractKeys(instance, "computed");
1862
+ if (computed) {
1863
+ blocks.push(createInstanceBlock("computed", computed));
1864
+ }
1865
+ const injected = extractKeys(instance, "inject");
1866
+ if (injected) {
1867
+ blocks.push(createInstanceBlock("injected", injected));
1868
+ }
1869
+ blocks.push([
1870
+ "div",
1871
+ {},
1872
+ [
1873
+ "span",
1874
+ {
1875
+ style: keywordStyle.style + ";opacity:0.66"
1876
+ },
1877
+ "$ (internal): "
1878
+ ],
1879
+ [
1880
+ "object",
1881
+ {
1882
+ object: instance
1883
+ }
1884
+ ]
1885
+ ]);
1886
+ return blocks;
1887
+ }
1888
+ function createInstanceBlock(type, target) {
1889
+ target = extend({}, target);
1890
+ if (!Object.keys(target).length) {
1891
+ return [
1892
+ "span",
1893
+ {}
1894
+ ];
1895
+ }
1896
+ return [
1897
+ "div",
1898
+ {
1899
+ style: "line-height:1.25em;margin-bottom:0.6em"
1900
+ },
1901
+ [
1902
+ "div",
1903
+ {
1904
+ style: "color:#476582"
1905
+ },
1906
+ type
1907
+ ],
1908
+ [
1909
+ "div",
1910
+ {
1911
+ style: "padding-left:1.25em"
1912
+ },
1913
+ ...Object.keys(target).map((key)=>{
1914
+ return [
1915
+ "div",
1916
+ {},
1917
+ [
1918
+ "span",
1919
+ keywordStyle,
1920
+ key + ": "
1921
+ ],
1922
+ formatValue(target[key], false)
1923
+ ];
1924
+ })
1925
+ ]
1926
+ ];
1927
+ }
1928
+ function formatValue(v1, asRaw = true) {
1929
+ if (typeof v1 === "number") {
1930
+ return [
1931
+ "span",
1932
+ numberStyle,
1933
+ v1
1934
+ ];
1935
+ } else if (typeof v1 === "string") {
1936
+ return [
1937
+ "span",
1938
+ stringStyle,
1939
+ JSON.stringify(v1)
1940
+ ];
1941
+ } else if (typeof v1 === "boolean") {
1942
+ return [
1943
+ "span",
1944
+ keywordStyle,
1945
+ v1
1946
+ ];
1947
+ } else if (isObject(v1)) {
1948
+ return [
1949
+ "object",
1950
+ {
1951
+ object: asRaw ? toRaw(v1) : v1
1952
+ }
1953
+ ];
1954
+ } else {
1955
+ return [
1956
+ "span",
1957
+ stringStyle,
1958
+ String(v1)
1959
+ ];
1960
+ }
1961
+ }
1962
+ function extractKeys(instance, type) {
1963
+ const Comp = instance.type;
1964
+ if (isFunction(Comp)) {
1965
+ return;
1966
+ }
1967
+ const extracted = {};
1968
+ for(const key in instance.ctx){
1969
+ if (isKeyOfType(Comp, key, type)) {
1970
+ extracted[key] = instance.ctx[key];
1971
+ }
1972
+ }
1973
+ return extracted;
1974
+ }
1975
+ function isKeyOfType(Comp, key, type) {
1976
+ const opts = Comp[type];
1977
+ if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
1978
+ return true;
1979
+ }
1980
+ if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
1981
+ return true;
1982
+ }
1983
+ if (Comp.mixins && Comp.mixins.some((m)=>isKeyOfType(m, key, type))) {
1984
+ return true;
1985
+ }
1986
+ }
1987
+ function genRefFlag(v1) {
1988
+ if (isShallow(v1)) {
1989
+ return `ShallowRef`;
1990
+ }
1991
+ if (v1.effect) {
1992
+ return `ComputedRef`;
1993
+ }
1994
+ return `Ref`;
1995
+ }
1996
+ if (window.devtoolsFormatters) {
1997
+ window.devtoolsFormatters.push(formatter);
1998
+ } else {
1999
+ window.devtoolsFormatters = [
2000
+ formatter
2001
+ ];
2002
+ }
2003
+ }
2004
+ !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
2005
+ !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
2006
+ !!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP;
2007
+
2008
+ function initDev() {
2009
+ {
2010
+ initCustomFormatter();
2011
+ }
2012
+ }
2013
+ if (!!(process.env.NODE_ENV !== "production")) {
2014
+ initDev();
2015
+ }
2016
+
2017
+ // Notify logic (no React dependencies)
2018
+ // Provides toast management and utilities for VanillaJS, Vue, Svelte, etc.
2019
+ class NotifyCore {
2020
+ generateId() {
2021
+ return `${++this.idCounter}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
2022
+ }
2023
+ subscribe(fn) {
2024
+ this.listeners.add(fn);
2025
+ fn(this.toasts);
2026
+ return ()=>this.listeners.delete(fn);
2027
+ }
2028
+ emit() {
2029
+ for (const fn of this.listeners)fn(this.toasts);
2030
+ }
2031
+ update(fn) {
2032
+ this.toasts = fn(this.toasts);
2033
+ this.emit();
2034
+ }
2035
+ dismiss(id) {
2036
+ const item = this.toasts.find((t)=>t.id === id);
2037
+ if (!item || item.exiting) return;
2038
+ this.update((prev)=>prev.map((t)=>t.id === id ? cc._extends({}, t, {
2039
+ exiting: true
2040
+ }) : t));
2041
+ setTimeout(()=>this.update((prev)=>prev.filter((t)=>t.id !== id)), 600);
2042
+ }
2043
+ show(opts) {
2044
+ var _ref, _ref1, _opts_type;
2045
+ // Use a unique identifier based on options (e.g., the title or a generated key)
2046
+ // If not provided, use a default one
2047
+ const id = opts.title ? `notify-${opts.title}` : "notify-default";
2048
+ const prevItem = this.toasts.find((t)=>t.id === id);
2049
+ const instanceId = (_ref = prevItem == null ? void 0 : prevItem.instanceId) != null ? _ref : this.generateId();
2050
+ // Set the state correctly
2051
+ const state = (_ref1 = (_opts_type = opts.type) != null ? _opts_type : prevItem == null ? void 0 : prevItem.type) != null ? _ref1 : "success";
2052
+ const item = cc._extends({}, prevItem, opts, {
2053
+ id,
2054
+ instanceId,
2055
+ type: state
2056
+ });
2057
+ this.update((prev)=>{
2058
+ const filtered = prev.filter((t)=>t.id !== id);
2059
+ return [
2060
+ ...filtered,
2061
+ item
2062
+ ];
2063
+ });
2064
+ return id;
2065
+ }
2066
+ getToasts() {
2067
+ return this.toasts;
2068
+ }
2069
+ constructor(){
2070
+ this.toasts = [];
2071
+ this.listeners = new Set();
2072
+ this.position = "top-right";
2073
+ this.options = undefined;
2074
+ this.idCounter = 0;
2075
+ }
2076
+ }
2077
+ // Global instance for multiplatform usage
2078
+ const notifyCore = new NotifyCore();
2079
+
2080
+ // Vue wrapper for Notify
2081
+ // Provides a composable and basic component for Vue 3
2082
+ function useNotifyToasts() {
2083
+ const toasts = ref(notifyCore.getToasts());
2084
+ const unsub = notifyCore.subscribe((t)=>toasts.value = t);
2085
+ // In tests the composable can run outside a component setup function.
2086
+ // Register lifecycle cleanup only when there is an active Vue instance.
2087
+ if (getCurrentInstance()) {
2088
+ onUnmounted(unsub);
2089
+ }
2090
+ return {
2091
+ toasts
2092
+ };
2093
+ }
2094
+ function showNotifyToast(options) {
2095
+ return notifyCore.show(options);
2096
+ }
2097
+
2098
+ exports.showNotifyToast = showNotifyToast;
2099
+ exports.useNotifyToasts = useNotifyToasts;