@vue/reactivity 3.2.36 → 3.2.39

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.
@@ -353,7 +353,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
353
353
  return;
354
354
  }
355
355
  let deps = [];
356
- if (type === "clear" /* CLEAR */) {
356
+ if (type === "clear" /* TriggerOpTypes.CLEAR */) {
357
357
  // collection being cleared
358
358
  // trigger all effects for target
359
359
  deps = [...depsMap.values()];
@@ -372,7 +372,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
372
372
  }
373
373
  // also run for iteration key on ADD | DELETE | Map.SET
374
374
  switch (type) {
375
- case "add" /* ADD */:
375
+ case "add" /* TriggerOpTypes.ADD */:
376
376
  if (!isArray(target)) {
377
377
  deps.push(depsMap.get(ITERATE_KEY));
378
378
  if (isMap(target)) {
@@ -384,7 +384,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
384
384
  deps.push(depsMap.get('length'));
385
385
  }
386
386
  break;
387
- case "delete" /* DELETE */:
387
+ case "delete" /* TriggerOpTypes.DELETE */:
388
388
  if (!isArray(target)) {
389
389
  deps.push(depsMap.get(ITERATE_KEY));
390
390
  if (isMap(target)) {
@@ -392,7 +392,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
392
392
  }
393
393
  }
394
394
  break;
395
- case "set" /* SET */:
395
+ case "set" /* TriggerOpTypes.SET */:
396
396
  if (isMap(target)) {
397
397
  deps.push(depsMap.get(ITERATE_KEY));
398
398
  }
@@ -469,7 +469,7 @@ function createArrayInstrumentations() {
469
469
  instrumentations[key] = function (...args) {
470
470
  const arr = toRaw(this);
471
471
  for (let i = 0, l = this.length; i < l; i++) {
472
- track(arr, "get" /* GET */, i + '');
472
+ track(arr, "get" /* TrackOpTypes.GET */, i + '');
473
473
  }
474
474
  // we run the method using the original args first (which may be reactive)
475
475
  const res = arr[key](...args);
@@ -494,16 +494,16 @@ function createArrayInstrumentations() {
494
494
  }
495
495
  function createGetter(isReadonly = false, shallow = false) {
496
496
  return function get(target, key, receiver) {
497
- if (key === "__v_isReactive" /* IS_REACTIVE */) {
497
+ if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
498
498
  return !isReadonly;
499
499
  }
500
- else if (key === "__v_isReadonly" /* IS_READONLY */) {
500
+ else if (key === "__v_isReadonly" /* ReactiveFlags.IS_READONLY */) {
501
501
  return isReadonly;
502
502
  }
503
- else if (key === "__v_isShallow" /* IS_SHALLOW */) {
503
+ else if (key === "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */) {
504
504
  return shallow;
505
505
  }
506
- else if (key === "__v_raw" /* RAW */ &&
506
+ else if (key === "__v_raw" /* ReactiveFlags.RAW */ &&
507
507
  receiver ===
508
508
  (isReadonly
509
509
  ? shallow
@@ -523,7 +523,7 @@ function createGetter(isReadonly = false, shallow = false) {
523
523
  return res;
524
524
  }
525
525
  if (!isReadonly) {
526
- track(target, "get" /* GET */, key);
526
+ track(target, "get" /* TrackOpTypes.GET */, key);
527
527
  }
528
528
  if (shallow) {
529
529
  return res;
@@ -549,10 +549,10 @@ function createSetter(shallow = false) {
549
549
  if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
550
550
  return false;
551
551
  }
552
- if (!shallow && !isReadonly(value)) {
553
- if (!isShallow(value)) {
554
- value = toRaw(value);
552
+ if (!shallow) {
553
+ if (!isShallow(value) && !isReadonly(value)) {
555
554
  oldValue = toRaw(oldValue);
555
+ value = toRaw(value);
556
556
  }
557
557
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
558
558
  oldValue.value = value;
@@ -566,10 +566,10 @@ function createSetter(shallow = false) {
566
566
  // don't trigger if target is something up in the prototype chain of original
567
567
  if (target === toRaw(receiver)) {
568
568
  if (!hadKey) {
569
- trigger(target, "add" /* ADD */, key, value);
569
+ trigger(target, "add" /* TriggerOpTypes.ADD */, key, value);
570
570
  }
571
571
  else if (hasChanged(value, oldValue)) {
572
- trigger(target, "set" /* SET */, key, value, oldValue);
572
+ trigger(target, "set" /* TriggerOpTypes.SET */, key, value, oldValue);
573
573
  }
574
574
  }
575
575
  return result;
@@ -580,19 +580,19 @@ function deleteProperty(target, key) {
580
580
  const oldValue = target[key];
581
581
  const result = Reflect.deleteProperty(target, key);
582
582
  if (result && hadKey) {
583
- trigger(target, "delete" /* DELETE */, key, undefined, oldValue);
583
+ trigger(target, "delete" /* TriggerOpTypes.DELETE */, key, undefined, oldValue);
584
584
  }
585
585
  return result;
586
586
  }
587
587
  function has(target, key) {
588
588
  const result = Reflect.has(target, key);
589
589
  if (!isSymbol(key) || !builtInSymbols.has(key)) {
590
- track(target, "has" /* HAS */, key);
590
+ track(target, "has" /* TrackOpTypes.HAS */, key);
591
591
  }
592
592
  return result;
593
593
  }
594
594
  function ownKeys(target) {
595
- track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY);
595
+ track(target, "iterate" /* TrackOpTypes.ITERATE */, isArray(target) ? 'length' : ITERATE_KEY);
596
596
  return Reflect.ownKeys(target);
597
597
  }
598
598
  const mutableHandlers = {
@@ -633,14 +633,14 @@ const getProto = (v) => Reflect.getPrototypeOf(v);
633
633
  function get$1(target, key, isReadonly = false, isShallow = false) {
634
634
  // #1772: readonly(reactive(Map)) should return readonly + reactive version
635
635
  // of the value
636
- target = target["__v_raw" /* RAW */];
636
+ target = target["__v_raw" /* ReactiveFlags.RAW */];
637
637
  const rawTarget = toRaw(target);
638
638
  const rawKey = toRaw(key);
639
639
  if (!isReadonly) {
640
640
  if (key !== rawKey) {
641
- track(rawTarget, "get" /* GET */, key);
641
+ track(rawTarget, "get" /* TrackOpTypes.GET */, key);
642
642
  }
643
- track(rawTarget, "get" /* GET */, rawKey);
643
+ track(rawTarget, "get" /* TrackOpTypes.GET */, rawKey);
644
644
  }
645
645
  const { has } = getProto(rawTarget);
646
646
  const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
@@ -657,22 +657,22 @@ function get$1(target, key, isReadonly = false, isShallow = false) {
657
657
  }
658
658
  }
659
659
  function has$1(key, isReadonly = false) {
660
- const target = this["__v_raw" /* RAW */];
660
+ const target = this["__v_raw" /* ReactiveFlags.RAW */];
661
661
  const rawTarget = toRaw(target);
662
662
  const rawKey = toRaw(key);
663
663
  if (!isReadonly) {
664
664
  if (key !== rawKey) {
665
- track(rawTarget, "has" /* HAS */, key);
665
+ track(rawTarget, "has" /* TrackOpTypes.HAS */, key);
666
666
  }
667
- track(rawTarget, "has" /* HAS */, rawKey);
667
+ track(rawTarget, "has" /* TrackOpTypes.HAS */, rawKey);
668
668
  }
669
669
  return key === rawKey
670
670
  ? target.has(key)
671
671
  : target.has(key) || target.has(rawKey);
672
672
  }
673
673
  function size(target, isReadonly = false) {
674
- target = target["__v_raw" /* RAW */];
675
- !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY);
674
+ target = target["__v_raw" /* ReactiveFlags.RAW */];
675
+ !isReadonly && track(toRaw(target), "iterate" /* TrackOpTypes.ITERATE */, ITERATE_KEY);
676
676
  return Reflect.get(target, 'size', target);
677
677
  }
678
678
  function add(value) {
@@ -682,7 +682,7 @@ function add(value) {
682
682
  const hadKey = proto.has.call(target, value);
683
683
  if (!hadKey) {
684
684
  target.add(value);
685
- trigger(target, "add" /* ADD */, value, value);
685
+ trigger(target, "add" /* TriggerOpTypes.ADD */, value, value);
686
686
  }
687
687
  return this;
688
688
  }
@@ -701,10 +701,10 @@ function set$1(key, value) {
701
701
  const oldValue = get.call(target, key);
702
702
  target.set(key, value);
703
703
  if (!hadKey) {
704
- trigger(target, "add" /* ADD */, key, value);
704
+ trigger(target, "add" /* TriggerOpTypes.ADD */, key, value);
705
705
  }
706
706
  else if (hasChanged(value, oldValue)) {
707
- trigger(target, "set" /* SET */, key, value, oldValue);
707
+ trigger(target, "set" /* TriggerOpTypes.SET */, key, value, oldValue);
708
708
  }
709
709
  return this;
710
710
  }
@@ -723,7 +723,7 @@ function deleteEntry(key) {
723
723
  // forward the operation before queueing reactions
724
724
  const result = target.delete(key);
725
725
  if (hadKey) {
726
- trigger(target, "delete" /* DELETE */, key, undefined, oldValue);
726
+ trigger(target, "delete" /* TriggerOpTypes.DELETE */, key, undefined, oldValue);
727
727
  }
728
728
  return result;
729
729
  }
@@ -737,17 +737,17 @@ function clear() {
737
737
  // forward the operation before queueing reactions
738
738
  const result = target.clear();
739
739
  if (hadItems) {
740
- trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget);
740
+ trigger(target, "clear" /* TriggerOpTypes.CLEAR */, undefined, undefined, oldTarget);
741
741
  }
742
742
  return result;
743
743
  }
744
744
  function createForEach(isReadonly, isShallow) {
745
745
  return function forEach(callback, thisArg) {
746
746
  const observed = this;
747
- const target = observed["__v_raw" /* RAW */];
747
+ const target = observed["__v_raw" /* ReactiveFlags.RAW */];
748
748
  const rawTarget = toRaw(target);
749
749
  const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
750
- !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY);
750
+ !isReadonly && track(rawTarget, "iterate" /* TrackOpTypes.ITERATE */, ITERATE_KEY);
751
751
  return target.forEach((value, key) => {
752
752
  // important: make sure the callback is
753
753
  // 1. invoked with the reactive map as `this` and 3rd arg
@@ -758,7 +758,7 @@ function createForEach(isReadonly, isShallow) {
758
758
  }
759
759
  function createIterableMethod(method, isReadonly, isShallow) {
760
760
  return function (...args) {
761
- const target = this["__v_raw" /* RAW */];
761
+ const target = this["__v_raw" /* ReactiveFlags.RAW */];
762
762
  const rawTarget = toRaw(target);
763
763
  const targetIsMap = isMap(rawTarget);
764
764
  const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap);
@@ -766,7 +766,7 @@ function createIterableMethod(method, isReadonly, isShallow) {
766
766
  const innerIterator = target[method](...args);
767
767
  const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
768
768
  !isReadonly &&
769
- track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
769
+ track(rawTarget, "iterate" /* TrackOpTypes.ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
770
770
  // return a wrapped iterator which returns observed versions of the
771
771
  // values emitted from the real iterator
772
772
  return {
@@ -793,7 +793,7 @@ function createReadonlyMethod(type) {
793
793
  const key = args[0] ? `on key "${args[0]}" ` : ``;
794
794
  console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));
795
795
  }
796
- return type === "delete" /* DELETE */ ? false : this;
796
+ return type === "delete" /* TriggerOpTypes.DELETE */ ? false : this;
797
797
  };
798
798
  }
799
799
  function createInstrumentations() {
@@ -835,10 +835,10 @@ function createInstrumentations() {
835
835
  has(key) {
836
836
  return has$1.call(this, key, true);
837
837
  },
838
- add: createReadonlyMethod("add" /* ADD */),
839
- set: createReadonlyMethod("set" /* SET */),
840
- delete: createReadonlyMethod("delete" /* DELETE */),
841
- clear: createReadonlyMethod("clear" /* CLEAR */),
838
+ add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
839
+ set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
840
+ delete: createReadonlyMethod("delete" /* TriggerOpTypes.DELETE */),
841
+ clear: createReadonlyMethod("clear" /* TriggerOpTypes.CLEAR */),
842
842
  forEach: createForEach(true, false)
843
843
  };
844
844
  const shallowReadonlyInstrumentations = {
@@ -851,10 +851,10 @@ function createInstrumentations() {
851
851
  has(key) {
852
852
  return has$1.call(this, key, true);
853
853
  },
854
- add: createReadonlyMethod("add" /* ADD */),
855
- set: createReadonlyMethod("set" /* SET */),
856
- delete: createReadonlyMethod("delete" /* DELETE */),
857
- clear: createReadonlyMethod("clear" /* CLEAR */),
854
+ add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
855
+ set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
856
+ delete: createReadonlyMethod("delete" /* TriggerOpTypes.DELETE */),
857
+ clear: createReadonlyMethod("clear" /* TriggerOpTypes.CLEAR */),
858
858
  forEach: createForEach(true, true)
859
859
  };
860
860
  const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator];
@@ -881,13 +881,13 @@ function createInstrumentationGetter(isReadonly, shallow) {
881
881
  ? readonlyInstrumentations
882
882
  : mutableInstrumentations;
883
883
  return (target, key, receiver) => {
884
- if (key === "__v_isReactive" /* IS_REACTIVE */) {
884
+ if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
885
885
  return !isReadonly;
886
886
  }
887
- else if (key === "__v_isReadonly" /* IS_READONLY */) {
887
+ else if (key === "__v_isReadonly" /* ReactiveFlags.IS_READONLY */) {
888
888
  return isReadonly;
889
889
  }
890
- else if (key === "__v_raw" /* RAW */) {
890
+ else if (key === "__v_raw" /* ReactiveFlags.RAW */) {
891
891
  return target;
892
892
  }
893
893
  return Reflect.get(hasOwn(instrumentations, key) && key in target
@@ -927,19 +927,19 @@ function targetTypeMap(rawType) {
927
927
  switch (rawType) {
928
928
  case 'Object':
929
929
  case 'Array':
930
- return 1 /* COMMON */;
930
+ return 1 /* TargetType.COMMON */;
931
931
  case 'Map':
932
932
  case 'Set':
933
933
  case 'WeakMap':
934
934
  case 'WeakSet':
935
- return 2 /* COLLECTION */;
935
+ return 2 /* TargetType.COLLECTION */;
936
936
  default:
937
- return 0 /* INVALID */;
937
+ return 0 /* TargetType.INVALID */;
938
938
  }
939
939
  }
940
940
  function getTargetType(value) {
941
- return value["__v_skip" /* SKIP */] || !Object.isExtensible(value)
942
- ? 0 /* INVALID */
941
+ return value["__v_skip" /* ReactiveFlags.SKIP */] || !Object.isExtensible(value)
942
+ ? 0 /* TargetType.INVALID */
943
943
  : targetTypeMap(toRawType(value));
944
944
  }
945
945
  function reactive(target) {
@@ -982,8 +982,8 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
982
982
  }
983
983
  // target is already a Proxy, return it.
984
984
  // exception: calling readonly() on a reactive object
985
- if (target["__v_raw" /* RAW */] &&
986
- !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) {
985
+ if (target["__v_raw" /* ReactiveFlags.RAW */] &&
986
+ !(isReadonly && target["__v_isReactive" /* ReactiveFlags.IS_REACTIVE */])) {
987
987
  return target;
988
988
  }
989
989
  // target already has corresponding Proxy
@@ -993,34 +993,34 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
993
993
  }
994
994
  // only specific value types can be observed.
995
995
  const targetType = getTargetType(target);
996
- if (targetType === 0 /* INVALID */) {
996
+ if (targetType === 0 /* TargetType.INVALID */) {
997
997
  return target;
998
998
  }
999
- const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers);
999
+ const proxy = new Proxy(target, targetType === 2 /* TargetType.COLLECTION */ ? collectionHandlers : baseHandlers);
1000
1000
  proxyMap.set(target, proxy);
1001
1001
  return proxy;
1002
1002
  }
1003
1003
  function isReactive(value) {
1004
1004
  if (isReadonly(value)) {
1005
- return isReactive(value["__v_raw" /* RAW */]);
1005
+ return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
1006
1006
  }
1007
- return !!(value && value["__v_isReactive" /* IS_REACTIVE */]);
1007
+ return !!(value && value["__v_isReactive" /* ReactiveFlags.IS_REACTIVE */]);
1008
1008
  }
1009
1009
  function isReadonly(value) {
1010
- return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
1010
+ return !!(value && value["__v_isReadonly" /* ReactiveFlags.IS_READONLY */]);
1011
1011
  }
1012
1012
  function isShallow(value) {
1013
- return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
1013
+ return !!(value && value["__v_isShallow" /* ReactiveFlags.IS_SHALLOW */]);
1014
1014
  }
1015
1015
  function isProxy(value) {
1016
1016
  return isReactive(value) || isReadonly(value);
1017
1017
  }
1018
1018
  function toRaw(observed) {
1019
- const raw = observed && observed["__v_raw" /* RAW */];
1019
+ const raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
1020
1020
  return raw ? toRaw(raw) : observed;
1021
1021
  }
1022
1022
  function markRaw(value) {
1023
- def(value, "__v_skip" /* SKIP */, true);
1023
+ def(value, "__v_skip" /* ReactiveFlags.SKIP */, true);
1024
1024
  return value;
1025
1025
  }
1026
1026
  const toReactive = (value) => isObject(value) ? reactive(value) : value;
@@ -1032,7 +1032,7 @@ function trackRefValue(ref) {
1032
1032
  {
1033
1033
  trackEffects(ref.dep || (ref.dep = createDep()), {
1034
1034
  target: ref,
1035
- type: "get" /* GET */,
1035
+ type: "get" /* TrackOpTypes.GET */,
1036
1036
  key: 'value'
1037
1037
  });
1038
1038
  }
@@ -1044,7 +1044,7 @@ function triggerRefValue(ref, newVal) {
1044
1044
  {
1045
1045
  triggerEffects(ref.dep, {
1046
1046
  target: ref,
1047
- type: "set" /* SET */,
1047
+ type: "set" /* TriggerOpTypes.SET */,
1048
1048
  key: 'value',
1049
1049
  newValue: newVal
1050
1050
  });
@@ -1079,10 +1079,11 @@ class RefImpl {
1079
1079
  return this._value;
1080
1080
  }
1081
1081
  set value(newVal) {
1082
- newVal = this.__v_isShallow ? newVal : toRaw(newVal);
1082
+ const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
1083
+ newVal = useDirectValue ? newVal : toRaw(newVal);
1083
1084
  if (hasChanged(newVal, this._rawValue)) {
1084
1085
  this._rawValue = newVal;
1085
- this._value = this.__v_isShallow ? newVal : toReactive(newVal);
1086
+ this._value = useDirectValue ? newVal : toReactive(newVal);
1086
1087
  triggerRefValue(this, newVal);
1087
1088
  }
1088
1089
  }
@@ -1161,11 +1162,13 @@ function toRef(object, key, defaultValue) {
1161
1162
  : new ObjectRefImpl(object, key, defaultValue);
1162
1163
  }
1163
1164
 
1165
+ var _a;
1164
1166
  class ComputedRefImpl {
1165
1167
  constructor(getter, _setter, isReadonly, isSSR) {
1166
1168
  this._setter = _setter;
1167
1169
  this.dep = undefined;
1168
1170
  this.__v_isRef = true;
1171
+ this[_a] = false;
1169
1172
  this._dirty = true;
1170
1173
  this.effect = new ReactiveEffect(getter, () => {
1171
1174
  if (!this._dirty) {
@@ -1175,7 +1178,7 @@ class ComputedRefImpl {
1175
1178
  });
1176
1179
  this.effect.computed = this;
1177
1180
  this.effect.active = this._cacheable = !isSSR;
1178
- this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
1181
+ this["__v_isReadonly" /* ReactiveFlags.IS_READONLY */] = isReadonly;
1179
1182
  }
1180
1183
  get value() {
1181
1184
  // the computed ref may get wrapped by other proxies e.g. readonly() #3376
@@ -1191,6 +1194,7 @@ class ComputedRefImpl {
1191
1194
  this._setter(newValue);
1192
1195
  }
1193
1196
  }
1197
+ _a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
1194
1198
  function computed(getterOrOptions, debugOptions, isSSR = false) {
1195
1199
  let getter;
1196
1200
  let setter;
@@ -1214,7 +1218,7 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
1214
1218
  return cRef;
1215
1219
  }
1216
1220
 
1217
- var _a;
1221
+ var _a$1;
1218
1222
  const tick = /*#__PURE__*/ Promise.resolve();
1219
1223
  const queue = [];
1220
1224
  let queued = false;
@@ -1237,7 +1241,7 @@ class DeferredComputedRefImpl {
1237
1241
  this.dep = undefined;
1238
1242
  this._dirty = true;
1239
1243
  this.__v_isRef = true;
1240
- this[_a] = true;
1244
+ this[_a$1] = true;
1241
1245
  let compareTarget;
1242
1246
  let hasCompareTarget = false;
1243
1247
  let scheduled = false;
@@ -1284,7 +1288,7 @@ class DeferredComputedRefImpl {
1284
1288
  return toRaw(this)._get();
1285
1289
  }
1286
1290
  }
1287
- _a = "__v_isReadonly" /* IS_READONLY */;
1291
+ _a$1 = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
1288
1292
  function deferredComputed(getter) {
1289
1293
  return new DeferredComputedRefImpl(getter);
1290
1294
  }
@@ -1 +1 @@
1
- function t(t,e){const n=Object.create(null),s=t.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const e=()=>{},n=Object.assign,s=Object.prototype.hasOwnProperty,i=(t,e)=>s.call(t,e),r=Array.isArray,c=t=>"[object Map]"===l(t),o=t=>"symbol"==typeof t,u=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),a=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,f=(t,e)=>!Object.is(t,e);let _;class p{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&_&&(this.parent=_,this.index=(_.scopes||(_.scopes=[])).push(this)-1)}run(t){if(this.active){const e=_;try{return _=this,t()}finally{_=e}}}on(){_=this}off(){_=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.active=!1}}}function d(t){return new p(t)}function v(t,e=_){e&&e.active&&e.effects.push(t)}function g(){return _}function y(t){_&&_.cleanups.push(t)}const w=t=>{const e=new Set(t);return e.w=0,e.n=0,e},b=t=>(t.w&k)>0,R=t=>(t.n&k)>0,S=new WeakMap;let m=0,k=1;let j;const O=Symbol(""),x=Symbol("");class E{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,v(this,n)}run(){if(!this.active)return this.fn();let t=j,e=W;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=j,j=this,W=!0,k=1<<++m,m<=30?(({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=k})(this):P(this),this.fn()}finally{m<=30&&(t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const i=e[s];b(i)&&!R(i)?i.delete(t):e[n++]=i,i.w&=~k,i.n&=~k}e.length=n}})(this),k=1<<--m,j=this.parent,W=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){j===this?this.deferStop=!0:this.active&&(P(this),this.onStop&&this.onStop(),this.active=!1)}}function P(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}function M(t,e){t.effect&&(t=t.effect.fn);const s=new E(t);e&&(n(s,e),e.scope&&v(s,e.scope)),e&&e.lazy||s.run();const i=s.run.bind(s);return i.effect=s,i}function z(t){t.effect.stop()}let W=!0;const V=[];function A(){V.push(W),W=!1}function N(){V.push(W),W=!0}function I(){const t=V.pop();W=void 0===t||t}function K(t,e,n){if(W&&j){let e=S.get(t);e||S.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=w()),C(s)}}function C(t,e){let n=!1;m<=30?R(t)||(t.n|=k,n=!b(t)):n=!t.has(j),n&&(t.add(j),j.deps.push(t))}function L(t,e,n,s,i,o){const u=S.get(t);if(!u)return;let h=[];if("clear"===e)h=[...u.values()];else if("length"===n&&r(t))u.forEach(((t,e)=>{("length"===e||e>=s)&&h.push(t)}));else switch(void 0!==n&&h.push(u.get(n)),e){case"add":r(t)?a(n)&&h.push(u.get("length")):(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"delete":r(t)||(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"set":c(t)&&h.push(u.get(O))}if(1===h.length)h[0]&&q(h[0]);else{const t=[];for(const e of h)e&&t.push(...e);q(w(t))}}function q(t,e){const n=r(t)?t:[...t];for(const s of n)s.computed&&B(s);for(const s of n)s.computed||B(s)}function B(t,e){(t!==j||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const D=t("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(o)),G=X(),H=X(!1,!0),J=X(!0),Q=X(!0,!0),T=U();function U(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Ct(this);for(let e=0,i=this.length;e<i;e++)K(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(Ct)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A();const n=Ct(this)[e].apply(this,t);return I(),n}})),t}function X(t=!1,e=!1){return function(n,s,c){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&c===(t?e?xt:Ot:e?jt:kt).get(n))return n;const h=r(n);if(!t&&h&&i(T,s))return Reflect.get(T,s,c);const l=Reflect.get(n,s,c);return(o(s)?F.has(s):D(s))?l:(t||K(n,0,s),e?l:Gt(l)?h&&a(s)?l:l.value:u(l)?t?zt(l):Pt(l):l)}}function Y(t=!1){return function(e,n,s,c){let o=e[n];if(Nt(o)&&Gt(o)&&!Gt(s))return!1;if(!t&&!Nt(s)&&(It(s)||(s=Ct(s),o=Ct(o)),!r(e)&&Gt(o)&&!Gt(s)))return o.value=s,!0;const u=r(e)&&a(n)?Number(n)<e.length:i(e,n),h=Reflect.set(e,n,s,c);return e===Ct(c)&&(u?f(s,o)&&L(e,"set",n,s):L(e,"add",n,s)),h}}const Z={get:G,set:Y(),deleteProperty:function(t,e){const n=i(t,e),s=Reflect.deleteProperty(t,e);return s&&n&&L(t,"delete",e,void 0),s},has:function(t,e){const n=Reflect.has(t,e);return o(e)&&F.has(e)||K(t,0,e),n},ownKeys:function(t){return K(t,0,r(t)?"length":O),Reflect.ownKeys(t)}},$={get:J,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},tt=n({},Z,{get:H,set:Y(!0)}),et=n({},$,{get:Q}),nt=t=>t,st=t=>Reflect.getPrototypeOf(t);function it(t,e,n=!1,s=!1){const i=Ct(t=t.__v_raw),r=Ct(e);n||(e!==r&&K(i,0,e),K(i,0,r));const{has:c}=st(i),o=s?nt:n?Bt:qt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function rt(t,e=!1){const n=this.__v_raw,s=Ct(n),i=Ct(t);return e||(t!==i&&K(s,0,t),K(s,0,i)),t===i?n.has(t):n.has(t)||n.has(i)}function ct(t,e=!1){return t=t.__v_raw,!e&&K(Ct(t),0,O),Reflect.get(t,"size",t)}function ot(t){t=Ct(t);const e=Ct(this);return st(e).has.call(e,t)||(e.add(t),L(e,"add",t,t)),this}function ut(t,e){e=Ct(e);const n=Ct(this),{has:s,get:i}=st(n);let r=s.call(n,t);r||(t=Ct(t),r=s.call(n,t));const c=i.call(n,t);return n.set(t,e),r?f(e,c)&&L(n,"set",t,e):L(n,"add",t,e),this}function ht(t){const e=Ct(this),{has:n,get:s}=st(e);let i=n.call(e,t);i||(t=Ct(t),i=n.call(e,t)),s&&s.call(e,t);const r=e.delete(t);return i&&L(e,"delete",t,void 0),r}function lt(){const t=Ct(this),e=0!==t.size,n=t.clear();return e&&L(t,"clear",void 0,void 0),n}function at(t,e){return function(n,s){const i=this,r=i.__v_raw,c=Ct(r),o=e?nt:t?Bt:qt;return!t&&K(c,0,O),r.forEach(((t,e)=>n.call(s,o(t),o(e),i)))}}function ft(t,e,n){return function(...s){const i=this.__v_raw,r=Ct(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,h="keys"===t&&o,l=i[t](...s),a=n?nt:e?Bt:qt;return!e&&K(r,0,h?x:O),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[a(t[0]),a(t[1])]:a(t),done:e}},[Symbol.iterator](){return this}}}}function _t(t){return function(...e){return"delete"!==t&&this}}function pt(){const t={get(t){return it(this,t)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:lt,forEach:at(!1,!1)},e={get(t){return it(this,t,!1,!0)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:lt,forEach:at(!1,!0)},n={get(t){return it(this,t,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:at(!0,!1)},s={get(t){return it(this,t,!0,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:at(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=ft(i,!1,!1),n[i]=ft(i,!0,!1),e[i]=ft(i,!1,!0),s[i]=ft(i,!0,!0)})),[t,n,e,s]}const[dt,vt,gt,yt]=pt();function wt(t,e){const n=e?t?yt:gt:t?vt:dt;return(e,s,r)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get(i(n,s)&&s in e?n:e,s,r)}const bt={get:wt(!1,!1)},Rt={get:wt(!1,!0)},St={get:wt(!0,!1)},mt={get:wt(!0,!0)},kt=new WeakMap,jt=new WeakMap,Ot=new WeakMap,xt=new WeakMap;function Et(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>l(t).slice(8,-1))(t))}function Pt(t){return Nt(t)?t:Vt(t,!1,Z,bt,kt)}function Mt(t){return Vt(t,!1,tt,Rt,jt)}function zt(t){return Vt(t,!0,$,St,Ot)}function Wt(t){return Vt(t,!0,et,mt,xt)}function Vt(t,e,n,s,i){if(!u(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=Et(t);if(0===c)return t;const o=new Proxy(t,2===c?s:n);return i.set(t,o),o}function At(t){return Nt(t)?At(t.__v_raw):!(!t||!t.__v_isReactive)}function Nt(t){return!(!t||!t.__v_isReadonly)}function It(t){return!(!t||!t.__v_isShallow)}function Kt(t){return At(t)||Nt(t)}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}function Lt(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t}const qt=t=>u(t)?Pt(t):t,Bt=t=>u(t)?zt(t):t;function Dt(t){W&&j&&C((t=Ct(t)).dep||(t.dep=w()))}function Ft(t,e){(t=Ct(t)).dep&&q(t.dep)}function Gt(t){return!(!t||!0!==t.__v_isRef)}function Ht(t){return Qt(t,!1)}function Jt(t){return Qt(t,!0)}function Qt(t,e){return Gt(t)?t:new Tt(t,e)}class Tt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Ct(t),this._value=e?t:qt(t)}get value(){return Dt(this),this._value}set value(t){t=this.__v_isShallow?t:Ct(t),f(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:qt(t),Ft(this))}}function Ut(t){Ft(t)}function Xt(t){return Gt(t)?t.value:t}const Yt={get:(t,e,n)=>Xt(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return Gt(i)&&!Gt(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};function Zt(t){return At(t)?t:new Proxy(t,Yt)}class $t{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:n}=t((()=>Dt(this)),(()=>Ft(this)));this._get=e,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}function te(t){return new $t(t)}function ee(t){const e=r(t)?new Array(t.length):{};for(const n in t)e[n]=se(t,n);return e}class ne{constructor(t,e,n){this._object=t,this._key=e,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}}function se(t,e,n){const s=t[e];return Gt(s)?s:new ne(t,e,n)}class ie{constructor(t,e,n,s){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new E(t,(()=>{this._dirty||(this._dirty=!0,Ft(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const t=Ct(this);return Dt(t),!t._dirty&&t._cacheable||(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function re(t,n,s=!1){let i,r;const c="function"==typeof t;c?(i=t,r=e):(i=t.get,r=t.set);return new ie(i,r,c||!r,s)}var ce;const oe=Promise.resolve(),ue=[];let he=!1;const le=()=>{for(let t=0;t<ue.length;t++)ue[t]();ue.length=0,he=!1};class ae{constructor(t){let e;this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this[ce]=!0;let n=!1,s=!1;this.effect=new E(t,(t=>{if(this.dep){if(t)e=this._value,n=!0;else if(!s){const t=n?e:this._value;s=!0,n=!1,ue.push((()=>{this.effect.active&&this._get()!==t&&Ft(this),s=!1})),he||(he=!0,oe.then(le))}for(const t of this.dep)t.computed instanceof ae&&t.scheduler(!0)}this._dirty=!0})),this.effect.computed=this}_get(){return this._dirty?(this._dirty=!1,this._value=this.effect.run()):this._value}get value(){return Dt(this),Ct(this)._get()}}function fe(t){return new ae(t)}ce="__v_isReadonly";export{p as EffectScope,O as ITERATE_KEY,E as ReactiveEffect,re as computed,te as customRef,fe as deferredComputed,M as effect,d as effectScope,N as enableTracking,g as getCurrentScope,Kt as isProxy,At as isReactive,Nt as isReadonly,Gt as isRef,It as isShallow,Lt as markRaw,y as onScopeDispose,A as pauseTracking,Zt as proxyRefs,Pt as reactive,zt as readonly,Ht as ref,I as resetTracking,Mt as shallowReactive,Wt as shallowReadonly,Jt as shallowRef,z as stop,Ct as toRaw,se as toRef,ee as toRefs,K as track,L as trigger,Ut as triggerRef,Xt as unref};
1
+ function t(t,e){const n=Object.create(null),s=t.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const e=()=>{},n=Object.assign,s=Object.prototype.hasOwnProperty,i=(t,e)=>s.call(t,e),r=Array.isArray,c=t=>"[object Map]"===l(t),o=t=>"symbol"==typeof t,u=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),a=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,f=(t,e)=>!Object.is(t,e);let _;class p{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&_&&(this.parent=_,this.index=(_.scopes||(_.scopes=[])).push(this)-1)}run(t){if(this.active){const e=_;try{return _=this,t()}finally{_=e}}}on(){_=this}off(){_=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.active=!1}}}function d(t){return new p(t)}function v(t,e=_){e&&e.active&&e.effects.push(t)}function g(){return _}function y(t){_&&_.cleanups.push(t)}const w=t=>{const e=new Set(t);return e.w=0,e.n=0,e},b=t=>(t.w&k)>0,R=t=>(t.n&k)>0,m=new WeakMap;let S=0,k=1;let j;const O=Symbol(""),x=Symbol("");class E{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,v(this,n)}run(){if(!this.active)return this.fn();let t=j,e=W;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=j,j=this,W=!0,k=1<<++S,S<=30?(({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=k})(this):P(this),this.fn()}finally{S<=30&&(t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const i=e[s];b(i)&&!R(i)?i.delete(t):e[n++]=i,i.w&=~k,i.n&=~k}e.length=n}})(this),k=1<<--S,j=this.parent,W=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){j===this?this.deferStop=!0:this.active&&(P(this),this.onStop&&this.onStop(),this.active=!1)}}function P(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}function M(t,e){t.effect&&(t=t.effect.fn);const s=new E(t);e&&(n(s,e),e.scope&&v(s,e.scope)),e&&e.lazy||s.run();const i=s.run.bind(s);return i.effect=s,i}function z(t){t.effect.stop()}let W=!0;const V=[];function A(){V.push(W),W=!1}function N(){V.push(W),W=!0}function I(){const t=V.pop();W=void 0===t||t}function K(t,e,n){if(W&&j){let e=m.get(t);e||m.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=w()),C(s)}}function C(t,e){let n=!1;S<=30?R(t)||(t.n|=k,n=!b(t)):n=!t.has(j),n&&(t.add(j),j.deps.push(t))}function L(t,e,n,s,i,o){const u=m.get(t);if(!u)return;let h=[];if("clear"===e)h=[...u.values()];else if("length"===n&&r(t))u.forEach(((t,e)=>{("length"===e||e>=s)&&h.push(t)}));else switch(void 0!==n&&h.push(u.get(n)),e){case"add":r(t)?a(n)&&h.push(u.get("length")):(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"delete":r(t)||(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"set":c(t)&&h.push(u.get(O))}if(1===h.length)h[0]&&q(h[0]);else{const t=[];for(const e of h)e&&t.push(...e);q(w(t))}}function q(t,e){const n=r(t)?t:[...t];for(const s of n)s.computed&&B(s);for(const s of n)s.computed||B(s)}function B(t,e){(t!==j||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const D=t("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(o)),G=X(),H=X(!1,!0),J=X(!0),Q=X(!0,!0),T=U();function U(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Ct(this);for(let e=0,i=this.length;e<i;e++)K(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(Ct)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A();const n=Ct(this)[e].apply(this,t);return I(),n}})),t}function X(t=!1,e=!1){return function(n,s,c){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&c===(t?e?xt:Ot:e?jt:kt).get(n))return n;const h=r(n);if(!t&&h&&i(T,s))return Reflect.get(T,s,c);const l=Reflect.get(n,s,c);return(o(s)?F.has(s):D(s))?l:(t||K(n,0,s),e?l:Gt(l)?h&&a(s)?l:l.value:u(l)?t?zt(l):Pt(l):l)}}function Y(t=!1){return function(e,n,s,c){let o=e[n];if(Nt(o)&&Gt(o)&&!Gt(s))return!1;if(!t&&(It(s)||Nt(s)||(o=Ct(o),s=Ct(s)),!r(e)&&Gt(o)&&!Gt(s)))return o.value=s,!0;const u=r(e)&&a(n)?Number(n)<e.length:i(e,n),h=Reflect.set(e,n,s,c);return e===Ct(c)&&(u?f(s,o)&&L(e,"set",n,s):L(e,"add",n,s)),h}}const Z={get:G,set:Y(),deleteProperty:function(t,e){const n=i(t,e),s=Reflect.deleteProperty(t,e);return s&&n&&L(t,"delete",e,void 0),s},has:function(t,e){const n=Reflect.has(t,e);return o(e)&&F.has(e)||K(t,0,e),n},ownKeys:function(t){return K(t,0,r(t)?"length":O),Reflect.ownKeys(t)}},$={get:J,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},tt=n({},Z,{get:H,set:Y(!0)}),et=n({},$,{get:Q}),nt=t=>t,st=t=>Reflect.getPrototypeOf(t);function it(t,e,n=!1,s=!1){const i=Ct(t=t.__v_raw),r=Ct(e);n||(e!==r&&K(i,0,e),K(i,0,r));const{has:c}=st(i),o=s?nt:n?Bt:qt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function rt(t,e=!1){const n=this.__v_raw,s=Ct(n),i=Ct(t);return e||(t!==i&&K(s,0,t),K(s,0,i)),t===i?n.has(t):n.has(t)||n.has(i)}function ct(t,e=!1){return t=t.__v_raw,!e&&K(Ct(t),0,O),Reflect.get(t,"size",t)}function ot(t){t=Ct(t);const e=Ct(this);return st(e).has.call(e,t)||(e.add(t),L(e,"add",t,t)),this}function ut(t,e){e=Ct(e);const n=Ct(this),{has:s,get:i}=st(n);let r=s.call(n,t);r||(t=Ct(t),r=s.call(n,t));const c=i.call(n,t);return n.set(t,e),r?f(e,c)&&L(n,"set",t,e):L(n,"add",t,e),this}function ht(t){const e=Ct(this),{has:n,get:s}=st(e);let i=n.call(e,t);i||(t=Ct(t),i=n.call(e,t)),s&&s.call(e,t);const r=e.delete(t);return i&&L(e,"delete",t,void 0),r}function lt(){const t=Ct(this),e=0!==t.size,n=t.clear();return e&&L(t,"clear",void 0,void 0),n}function at(t,e){return function(n,s){const i=this,r=i.__v_raw,c=Ct(r),o=e?nt:t?Bt:qt;return!t&&K(c,0,O),r.forEach(((t,e)=>n.call(s,o(t),o(e),i)))}}function ft(t,e,n){return function(...s){const i=this.__v_raw,r=Ct(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,h="keys"===t&&o,l=i[t](...s),a=n?nt:e?Bt:qt;return!e&&K(r,0,h?x:O),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[a(t[0]),a(t[1])]:a(t),done:e}},[Symbol.iterator](){return this}}}}function _t(t){return function(...e){return"delete"!==t&&this}}function pt(){const t={get(t){return it(this,t)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:lt,forEach:at(!1,!1)},e={get(t){return it(this,t,!1,!0)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:lt,forEach:at(!1,!0)},n={get(t){return it(this,t,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:at(!0,!1)},s={get(t){return it(this,t,!0,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:at(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=ft(i,!1,!1),n[i]=ft(i,!0,!1),e[i]=ft(i,!1,!0),s[i]=ft(i,!0,!0)})),[t,n,e,s]}const[dt,vt,gt,yt]=pt();function wt(t,e){const n=e?t?yt:gt:t?vt:dt;return(e,s,r)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get(i(n,s)&&s in e?n:e,s,r)}const bt={get:wt(!1,!1)},Rt={get:wt(!1,!0)},mt={get:wt(!0,!1)},St={get:wt(!0,!0)},kt=new WeakMap,jt=new WeakMap,Ot=new WeakMap,xt=new WeakMap;function Et(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>l(t).slice(8,-1))(t))}function Pt(t){return Nt(t)?t:Vt(t,!1,Z,bt,kt)}function Mt(t){return Vt(t,!1,tt,Rt,jt)}function zt(t){return Vt(t,!0,$,mt,Ot)}function Wt(t){return Vt(t,!0,et,St,xt)}function Vt(t,e,n,s,i){if(!u(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=Et(t);if(0===c)return t;const o=new Proxy(t,2===c?s:n);return i.set(t,o),o}function At(t){return Nt(t)?At(t.__v_raw):!(!t||!t.__v_isReactive)}function Nt(t){return!(!t||!t.__v_isReadonly)}function It(t){return!(!t||!t.__v_isShallow)}function Kt(t){return At(t)||Nt(t)}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}function Lt(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t}const qt=t=>u(t)?Pt(t):t,Bt=t=>u(t)?zt(t):t;function Dt(t){W&&j&&C((t=Ct(t)).dep||(t.dep=w()))}function Ft(t,e){(t=Ct(t)).dep&&q(t.dep)}function Gt(t){return!(!t||!0!==t.__v_isRef)}function Ht(t){return Qt(t,!1)}function Jt(t){return Qt(t,!0)}function Qt(t,e){return Gt(t)?t:new Tt(t,e)}class Tt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Ct(t),this._value=e?t:qt(t)}get value(){return Dt(this),this._value}set value(t){const e=this.__v_isShallow||It(t)||Nt(t);t=e?t:Ct(t),f(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:qt(t),Ft(this))}}function Ut(t){Ft(t)}function Xt(t){return Gt(t)?t.value:t}const Yt={get:(t,e,n)=>Xt(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return Gt(i)&&!Gt(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};function Zt(t){return At(t)?t:new Proxy(t,Yt)}class $t{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:n}=t((()=>Dt(this)),(()=>Ft(this)));this._get=e,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}function te(t){return new $t(t)}function ee(t){const e=r(t)?new Array(t.length):{};for(const n in t)e[n]=se(t,n);return e}class ne{constructor(t,e,n){this._object=t,this._key=e,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}}function se(t,e,n){const s=t[e];return Gt(s)?s:new ne(t,e,n)}var ie,re;class ce{constructor(t,e,n,s){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this[ie]=!1,this._dirty=!0,this.effect=new E(t,(()=>{this._dirty||(this._dirty=!0,Ft(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const t=Ct(this);return Dt(t),!t._dirty&&t._cacheable||(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function oe(t,n,s=!1){let i,r;const c="function"==typeof t;c?(i=t,r=e):(i=t.get,r=t.set);return new ce(i,r,c||!r,s)}ie="__v_isReadonly";const ue=Promise.resolve(),he=[];let le=!1;const ae=()=>{for(let t=0;t<he.length;t++)he[t]();he.length=0,le=!1};class fe{constructor(t){let e;this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this[re]=!0;let n=!1,s=!1;this.effect=new E(t,(t=>{if(this.dep){if(t)e=this._value,n=!0;else if(!s){const t=n?e:this._value;s=!0,n=!1,he.push((()=>{this.effect.active&&this._get()!==t&&Ft(this),s=!1})),le||(le=!0,ue.then(ae))}for(const t of this.dep)t.computed instanceof fe&&t.scheduler(!0)}this._dirty=!0})),this.effect.computed=this}_get(){return this._dirty?(this._dirty=!1,this._value=this.effect.run()):this._value}get value(){return Dt(this),Ct(this)._get()}}function _e(t){return new fe(t)}re="__v_isReadonly";export{p as EffectScope,O as ITERATE_KEY,E as ReactiveEffect,oe as computed,te as customRef,_e as deferredComputed,M as effect,d as effectScope,N as enableTracking,g as getCurrentScope,Kt as isProxy,At as isReactive,Nt as isReadonly,Gt as isRef,It as isShallow,Lt as markRaw,y as onScopeDispose,A as pauseTracking,Zt as proxyRefs,Pt as reactive,zt as readonly,Ht as ref,I as resetTracking,Mt as shallowReactive,Wt as shallowReadonly,Jt as shallowRef,z as stop,Ct as toRaw,se as toRef,ee as toRefs,K as track,L as trigger,Ut as triggerRef,Xt as unref};