@vue/compat 3.3.4 → 3.3.6

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.
@@ -34,7 +34,7 @@ const isString = (val) => typeof val === "string";
34
34
  const isSymbol = (val) => typeof val === "symbol";
35
35
  const isObject = (val) => val !== null && typeof val === "object";
36
36
  const isPromise = (val) => {
37
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
37
+ return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
38
38
  };
39
39
  const objectToString = Object.prototype.toString;
40
40
  const toTypeString = (value) => objectToString.call(value);
@@ -65,12 +65,13 @@ const hyphenateRE = /\B([A-Z])/g;
65
65
  const hyphenate = cacheStringFunction(
66
66
  (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
67
67
  );
68
- const capitalize = cacheStringFunction(
69
- (str) => str.charAt(0).toUpperCase() + str.slice(1)
70
- );
71
- const toHandlerKey = cacheStringFunction(
72
- (str) => str ? `on${capitalize(str)}` : ``
73
- );
68
+ const capitalize = cacheStringFunction((str) => {
69
+ return str.charAt(0).toUpperCase() + str.slice(1);
70
+ });
71
+ const toHandlerKey = cacheStringFunction((str) => {
72
+ const s = str ? `on${capitalize(str)}` : ``;
73
+ return s;
74
+ });
74
75
  const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
75
76
  const invokeArrayFns = (fns, arg) => {
76
77
  for (let i = 0; i < fns.length; i++) {
@@ -120,8 +121,8 @@ const slotFlagsText = {
120
121
  [3]: "FORWARDED"
121
122
  };
122
123
 
123
- const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
124
- const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);
124
+ const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
125
+ const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
125
126
 
126
127
  const range = 2;
127
128
  function generateCodeFrame(source, start = 0, end = source.length) {
@@ -176,9 +177,7 @@ function normalizeStyle(value) {
176
177
  }
177
178
  }
178
179
  return res;
179
- } else if (isString(value)) {
180
- return value;
181
- } else if (isObject(value)) {
180
+ } else if (isString(value) || isObject(value)) {
182
181
  return value;
183
182
  }
184
183
  }
@@ -527,7 +526,7 @@ function cleanupEffect(effect2) {
527
526
  }
528
527
  }
529
528
  function effect(fn, options) {
530
- if (fn.effect) {
529
+ if (fn.effect instanceof ReactiveEffect) {
531
530
  fn = fn.effect.fn;
532
531
  }
533
532
  const _effect = new ReactiveEffect(fn);
@@ -697,10 +696,6 @@ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`
697
696
  const builtInSymbols = new Set(
698
697
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
699
698
  );
700
- const get$1 = /* @__PURE__ */ createGetter();
701
- const shallowGet = /* @__PURE__ */ createGetter(false, true);
702
- const readonlyGet = /* @__PURE__ */ createGetter(true);
703
- const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
704
699
  const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
705
700
  function createArrayInstrumentations() {
706
701
  const instrumentations = {};
@@ -733,8 +728,13 @@ function hasOwnProperty(key) {
733
728
  track(obj, "has", key);
734
729
  return obj.hasOwnProperty(key);
735
730
  }
736
- function createGetter(isReadonly2 = false, shallow = false) {
737
- return function get2(target, key, receiver) {
731
+ class BaseReactiveHandler {
732
+ constructor(_isReadonly = false, _shallow = false) {
733
+ this._isReadonly = _isReadonly;
734
+ this._shallow = _shallow;
735
+ }
736
+ get(target, key, receiver) {
737
+ const isReadonly2 = this._isReadonly, shallow = this._shallow;
738
738
  if (key === "__v_isReactive") {
739
739
  return !isReadonly2;
740
740
  } else if (key === "__v_isReadonly") {
@@ -770,17 +770,18 @@ function createGetter(isReadonly2 = false, shallow = false) {
770
770
  return isReadonly2 ? readonly(res) : reactive(res);
771
771
  }
772
772
  return res;
773
- };
773
+ }
774
774
  }
775
- const set$1 = /* @__PURE__ */ createSetter();
776
- const shallowSet = /* @__PURE__ */ createSetter(true);
777
- function createSetter(shallow = false) {
778
- return function set2(target, key, value, receiver) {
775
+ class MutableReactiveHandler extends BaseReactiveHandler {
776
+ constructor(shallow = false) {
777
+ super(false, shallow);
778
+ }
779
+ set(target, key, value, receiver) {
779
780
  let oldValue = target[key];
780
781
  if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
781
782
  return false;
782
783
  }
783
- if (!shallow) {
784
+ if (!this._shallow) {
784
785
  if (!isShallow(value) && !isReadonly(value)) {
785
786
  oldValue = toRaw(oldValue);
786
787
  value = toRaw(value);
@@ -800,37 +801,36 @@ function createSetter(shallow = false) {
800
801
  }
801
802
  }
802
803
  return result;
803
- };
804
- }
805
- function deleteProperty(target, key) {
806
- const hadKey = hasOwn(target, key);
807
- const oldValue = target[key];
808
- const result = Reflect.deleteProperty(target, key);
809
- if (result && hadKey) {
810
- trigger(target, "delete", key, void 0, oldValue);
811
804
  }
812
- return result;
813
- }
814
- function has$1(target, key) {
815
- const result = Reflect.has(target, key);
816
- if (!isSymbol(key) || !builtInSymbols.has(key)) {
817
- track(target, "has", key);
805
+ deleteProperty(target, key) {
806
+ const hadKey = hasOwn(target, key);
807
+ const oldValue = target[key];
808
+ const result = Reflect.deleteProperty(target, key);
809
+ if (result && hadKey) {
810
+ trigger(target, "delete", key, void 0, oldValue);
811
+ }
812
+ return result;
813
+ }
814
+ has(target, key) {
815
+ const result = Reflect.has(target, key);
816
+ if (!isSymbol(key) || !builtInSymbols.has(key)) {
817
+ track(target, "has", key);
818
+ }
819
+ return result;
820
+ }
821
+ ownKeys(target) {
822
+ track(
823
+ target,
824
+ "iterate",
825
+ isArray(target) ? "length" : ITERATE_KEY
826
+ );
827
+ return Reflect.ownKeys(target);
818
828
  }
819
- return result;
820
- }
821
- function ownKeys(target) {
822
- track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
823
- return Reflect.ownKeys(target);
824
829
  }
825
- const mutableHandlers = {
826
- get: get$1,
827
- set: set$1,
828
- deleteProperty,
829
- has: has$1,
830
- ownKeys
831
- };
832
- const readonlyHandlers = {
833
- get: readonlyGet,
830
+ class ReadonlyReactiveHandler extends BaseReactiveHandler {
831
+ constructor(shallow = false) {
832
+ super(true, shallow);
833
+ }
834
834
  set(target, key) {
835
835
  if (!!(process.env.NODE_ENV !== "production")) {
836
836
  warn$1(
@@ -839,7 +839,7 @@ const readonlyHandlers = {
839
839
  );
840
840
  }
841
841
  return true;
842
- },
842
+ }
843
843
  deleteProperty(target, key) {
844
844
  if (!!(process.env.NODE_ENV !== "production")) {
845
845
  warn$1(
@@ -849,22 +849,13 @@ const readonlyHandlers = {
849
849
  }
850
850
  return true;
851
851
  }
852
- };
853
- const shallowReactiveHandlers = /* @__PURE__ */ extend(
854
- {},
855
- mutableHandlers,
856
- {
857
- get: shallowGet,
858
- set: shallowSet
859
- }
860
- );
861
- const shallowReadonlyHandlers = /* @__PURE__ */ extend(
862
- {},
863
- readonlyHandlers,
864
- {
865
- get: shallowReadonlyGet
866
- }
852
+ }
853
+ const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
854
+ const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
855
+ const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
856
+ true
867
857
  );
858
+ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
868
859
 
869
860
  const toShallow = (value) => value;
870
861
  const getProto = (v) => Reflect.getPrototypeOf(v);
@@ -873,7 +864,7 @@ function get(target, key, isReadonly = false, isShallow = false) {
873
864
  const rawTarget = toRaw(target);
874
865
  const rawKey = toRaw(key);
875
866
  if (!isReadonly) {
876
- if (key !== rawKey) {
867
+ if (hasChanged(key, rawKey)) {
877
868
  track(rawTarget, "get", key);
878
869
  }
879
870
  track(rawTarget, "get", rawKey);
@@ -893,7 +884,7 @@ function has(key, isReadonly = false) {
893
884
  const rawTarget = toRaw(target);
894
885
  const rawKey = toRaw(key);
895
886
  if (!isReadonly) {
896
- if (key !== rawKey) {
887
+ if (hasChanged(key, rawKey)) {
897
888
  track(rawTarget, "has", key);
898
889
  }
899
890
  track(rawTarget, "has", rawKey);
@@ -1427,11 +1418,7 @@ function toRef(source, key, defaultValue) {
1427
1418
  }
1428
1419
  function propertyToRef(source, key, defaultValue) {
1429
1420
  const val = source[key];
1430
- return isRef(val) ? val : new ObjectRefImpl(
1431
- source,
1432
- key,
1433
- defaultValue
1434
- );
1421
+ return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
1435
1422
  }
1436
1423
 
1437
1424
  class ComputedRefImpl {
@@ -3753,9 +3740,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3753
3740
  }
3754
3741
  if (cb) {
3755
3742
  const newValue = effect.run();
3756
- if (deep || forceTrigger || (isMultiSource ? newValue.some(
3757
- (v, i) => hasChanged(v, oldValue[i])
3758
- ) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
3743
+ if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
3759
3744
  if (cleanup) {
3760
3745
  cleanup();
3761
3746
  }
@@ -3931,6 +3916,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3931
3916
  }
3932
3917
  }
3933
3918
 
3919
+ const leaveCbKey = Symbol("_leaveCb");
3920
+ const enterCbKey$1 = Symbol("_enterCb");
3934
3921
  function useTransitionState() {
3935
3922
  const state = {
3936
3923
  isMounted: false,
@@ -4053,9 +4040,9 @@ const BaseTransitionImpl = {
4053
4040
  oldInnerChild
4054
4041
  );
4055
4042
  leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
4056
- el._leaveCb = () => {
4043
+ el[leaveCbKey] = () => {
4057
4044
  earlyRemove();
4058
- el._leaveCb = void 0;
4045
+ el[leaveCbKey] = void 0;
4059
4046
  delete enterHooks.delayedLeave;
4060
4047
  };
4061
4048
  enterHooks.delayedLeave = delayedLeave;
@@ -4129,15 +4116,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
4129
4116
  return;
4130
4117
  }
4131
4118
  }
4132
- if (el._leaveCb) {
4133
- el._leaveCb(
4119
+ if (el[leaveCbKey]) {
4120
+ el[leaveCbKey](
4134
4121
  true
4135
4122
  /* cancelled */
4136
4123
  );
4137
4124
  }
4138
4125
  const leavingVNode = leavingVNodesCache[key];
4139
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {
4140
- leavingVNode.el._leaveCb();
4126
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
4127
+ leavingVNode.el[leaveCbKey]();
4141
4128
  }
4142
4129
  callHook(hook, [el]);
4143
4130
  },
@@ -4155,7 +4142,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
4155
4142
  }
4156
4143
  }
4157
4144
  let called = false;
4158
- const done = el._enterCb = (cancelled) => {
4145
+ const done = el[enterCbKey$1] = (cancelled) => {
4159
4146
  if (called)
4160
4147
  return;
4161
4148
  called = true;
@@ -4167,7 +4154,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
4167
4154
  if (hooks.delayedLeave) {
4168
4155
  hooks.delayedLeave();
4169
4156
  }
4170
- el._enterCb = void 0;
4157
+ el[enterCbKey$1] = void 0;
4171
4158
  };
4172
4159
  if (hook) {
4173
4160
  callAsyncHook(hook, [el, done]);
@@ -4177,8 +4164,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
4177
4164
  },
4178
4165
  leave(el, remove) {
4179
4166
  const key2 = String(vnode.key);
4180
- if (el._enterCb) {
4181
- el._enterCb(
4167
+ if (el[enterCbKey$1]) {
4168
+ el[enterCbKey$1](
4182
4169
  true
4183
4170
  /* cancelled */
4184
4171
  );
@@ -4188,7 +4175,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
4188
4175
  }
4189
4176
  callHook(onBeforeLeave, [el]);
4190
4177
  let called = false;
4191
- const done = el._leaveCb = (cancelled) => {
4178
+ const done = el[leaveCbKey] = (cancelled) => {
4192
4179
  if (called)
4193
4180
  return;
4194
4181
  called = true;
@@ -4198,7 +4185,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
4198
4185
  } else {
4199
4186
  callHook(onAfterLeave, [el]);
4200
4187
  }
4201
- el._leaveCb = void 0;
4188
+ el[leaveCbKey] = void 0;
4202
4189
  if (leavingVNodesCache[key2] === vnode) {
4203
4190
  delete leavingVNodesCache[key2];
4204
4191
  }
@@ -4260,6 +4247,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4260
4247
  return ret;
4261
4248
  }
4262
4249
 
4250
+ /*! #__NO_SIDE_EFFECTS__ */
4251
+ // @__NO_SIDE_EFFECTS__
4263
4252
  function defineComponent(options, extraOptions) {
4264
4253
  return isFunction(options) ? (
4265
4254
  // #8326: extend call and options.name access are considered side-effects
@@ -4269,6 +4258,8 @@ function defineComponent(options, extraOptions) {
4269
4258
  }
4270
4259
 
4271
4260
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
4261
+ /*! #__NO_SIDE_EFFECTS__ */
4262
+ // @__NO_SIDE_EFFECTS__
4272
4263
  function defineAsyncComponent(source) {
4273
4264
  if (isFunction(source)) {
4274
4265
  source = { loader: source };
@@ -5006,7 +4997,7 @@ function defineLegacyVNodeProperties(vnode) {
5006
4997
  }
5007
4998
  }
5008
4999
 
5009
- const normalizedFunctionalComponentMap = /* @__PURE__ */ new Map();
5000
+ const normalizedFunctionalComponentMap = /* @__PURE__ */ new WeakMap();
5010
5001
  const legacySlotProxyHandlers = {
5011
5002
  get(target, key) {
5012
5003
  const slot = target[key];
@@ -5287,6 +5278,7 @@ function legacyPrependModifier(value, symbol) {
5287
5278
  function installCompatInstanceProperties(map) {
5288
5279
  const set = (target, key, val) => {
5289
5280
  target[key] = val;
5281
+ return target[key];
5290
5282
  };
5291
5283
  const del = (target, key) => {
5292
5284
  delete target[key];
@@ -5564,7 +5556,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
5564
5556
  return PublicInstanceProxyHandlers.get(target, key, target);
5565
5557
  },
5566
5558
  has(_, key) {
5567
- const has = key[0] !== "_" && !isGloballyWhitelisted(key);
5559
+ const has = key[0] !== "_" && !isGloballyAllowed(key);
5568
5560
  if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) {
5569
5561
  warn(
5570
5562
  `Property ${JSON.stringify(
@@ -6303,7 +6295,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6303
6295
  return vm;
6304
6296
  }
6305
6297
  }
6306
- Vue.version = `2.6.14-compat:${"3.3.4"}`;
6298
+ Vue.version = `2.6.14-compat:${"3.3.6"}`;
6307
6299
  Vue.config = singletonApp.config;
6308
6300
  Vue.use = (p, ...options) => {
6309
6301
  if (p && isFunction(p.install)) {
@@ -6712,12 +6704,12 @@ function createAppAPI(render, hydrate) {
6712
6704
  },
6713
6705
  set() {
6714
6706
  warn(
6715
- `app.config.unwrapInjectedRef has been deprecated. 3.3 now alawys unwraps injected refs in Options API.`
6707
+ `app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
6716
6708
  );
6717
6709
  }
6718
6710
  });
6719
6711
  }
6720
- const installedPlugins = /* @__PURE__ */ new Set();
6712
+ const installedPlugins = /* @__PURE__ */ new WeakSet();
6721
6713
  let isMounted = false;
6722
6714
  const app = context.app = {
6723
6715
  _uid: uid$1++,
@@ -6801,10 +6793,7 @@ function createAppAPI(render, hydrate) {
6801
6793
  If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
6802
6794
  );
6803
6795
  }
6804
- const vnode = createVNode(
6805
- rootComponent,
6806
- rootProps
6807
- );
6796
+ const vnode = createVNode(rootComponent, rootProps);
6808
6797
  vnode.appContext = context;
6809
6798
  if (!!(process.env.NODE_ENV !== "production")) {
6810
6799
  context.reload = () => {
@@ -7463,7 +7452,7 @@ const updateSlots = (instance, children, optimized) => {
7463
7452
  }
7464
7453
  if (needDeletionCheck) {
7465
7454
  for (const key in slots) {
7466
- if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {
7455
+ if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
7467
7456
  delete slots[key];
7468
7457
  }
7469
7458
  }
@@ -7627,8 +7616,10 @@ function createHydrationFunctions(rendererInternals) {
7627
7616
  hasMismatch = true;
7628
7617
  !!(process.env.NODE_ENV !== "production") && warn(
7629
7618
  `Hydration text mismatch:
7630
- - Client: ${JSON.stringify(node.data)}
7631
- - Server: ${JSON.stringify(vnode.children)}`
7619
+ - Server rendered: ${JSON.stringify(
7620
+ node.data
7621
+ )}
7622
+ - Client rendered: ${JSON.stringify(vnode.children)}`
7632
7623
  );
7633
7624
  node.data = vnode.children;
7634
7625
  }
@@ -7831,8 +7822,8 @@ function createHydrationFunctions(rendererInternals) {
7831
7822
  hasMismatch = true;
7832
7823
  !!(process.env.NODE_ENV !== "production") && warn(
7833
7824
  `Hydration text content mismatch in <${vnode.type}>:
7834
- - Client: ${el.textContent}
7835
- - Server: ${vnode.children}`
7825
+ - Server rendered: ${el.textContent}
7826
+ - Client rendered: ${vnode.children}`
7836
7827
  );
7837
7828
  el.textContent = vnode.children;
7838
7829
  }
@@ -9648,6 +9639,10 @@ const TeleportImpl = {
9648
9639
  internals,
9649
9640
  1
9650
9641
  );
9642
+ } else {
9643
+ if (n2.props && n1.props && n2.props.to !== n1.props.to) {
9644
+ n2.props.to = n1.props.to;
9645
+ }
9651
9646
  }
9652
9647
  } else {
9653
9648
  if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
@@ -9688,19 +9683,18 @@ const TeleportImpl = {
9688
9683
  if (target) {
9689
9684
  hostRemove(targetAnchor);
9690
9685
  }
9691
- if (doRemove || !isTeleportDisabled(props)) {
9692
- hostRemove(anchor);
9693
- if (shapeFlag & 16) {
9694
- for (let i = 0; i < children.length; i++) {
9695
- const child = children[i];
9696
- unmount(
9697
- child,
9698
- parentComponent,
9699
- parentSuspense,
9700
- true,
9701
- !!child.dynamicChildren
9702
- );
9703
- }
9686
+ doRemove && hostRemove(anchor);
9687
+ if (shapeFlag & 16) {
9688
+ const shouldRemove = doRemove || !isTeleportDisabled(props);
9689
+ for (let i = 0; i < children.length; i++) {
9690
+ const child = children[i];
9691
+ unmount(
9692
+ child,
9693
+ parentComponent,
9694
+ parentSuspense,
9695
+ shouldRemove,
9696
+ !!child.dynamicChildren
9697
+ );
9704
9698
  }
9705
9699
  }
9706
9700
  },
@@ -9784,7 +9778,7 @@ function updateCssVars(vnode) {
9784
9778
  const ctx = vnode.ctx;
9785
9779
  if (ctx && ctx.ut) {
9786
9780
  let node = vnode.children[0].el;
9787
- while (node !== vnode.targetAnchor) {
9781
+ while (node && node !== vnode.targetAnchor) {
9788
9782
  if (node.nodeType === 1)
9789
9783
  node.setAttribute("data-v-owner", ctx.uid);
9790
9784
  node = node.nextSibling;
@@ -9793,7 +9787,7 @@ function updateCssVars(vnode) {
9793
9787
  }
9794
9788
  }
9795
9789
 
9796
- const normalizedAsyncComponentMap = /* @__PURE__ */ new Map();
9790
+ const normalizedAsyncComponentMap = /* @__PURE__ */ new WeakMap();
9797
9791
  function convertLegacyAsyncComponent(comp) {
9798
9792
  if (normalizedAsyncComponentMap.has(comp)) {
9799
9793
  return normalizedAsyncComponentMap.get(comp);
@@ -10515,9 +10509,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
10515
10509
  if (__VUE_OPTIONS_API__ && !skipOptions) {
10516
10510
  setCurrentInstance(instance);
10517
10511
  pauseTracking();
10518
- applyOptions(instance);
10519
- resetTracking();
10520
- unsetCurrentInstance();
10512
+ try {
10513
+ applyOptions(instance);
10514
+ } finally {
10515
+ resetTracking();
10516
+ unsetCurrentInstance();
10517
+ }
10521
10518
  }
10522
10519
  if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
10523
10520
  if (!compile$1 && Component.template) {
@@ -10897,7 +10894,7 @@ function isMemoSame(cached, memo) {
10897
10894
  return true;
10898
10895
  }
10899
10896
 
10900
- const version = "3.3.4";
10897
+ const version = "3.3.6";
10901
10898
  const _ssrUtils = {
10902
10899
  createComponentInstance,
10903
10900
  setupComponent,
@@ -10984,934 +10981,996 @@ const nodeOps = {
10984
10981
  }
10985
10982
  };
10986
10983
 
10987
- function patchClass(el, value, isSVG) {
10988
- const transitionClasses = el._vtc;
10989
- if (transitionClasses) {
10990
- value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
10991
- }
10992
- if (value == null) {
10993
- el.removeAttribute("class");
10994
- } else if (isSVG) {
10995
- el.setAttribute("class", value);
10996
- } else {
10997
- el.className = value;
10998
- }
10984
+ const TRANSITION$1 = "transition";
10985
+ const ANIMATION = "animation";
10986
+ const vtcKey = Symbol("_vtc");
10987
+ const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
10988
+ Transition.displayName = "Transition";
10989
+ {
10990
+ Transition.__isBuiltIn = true;
10999
10991
  }
11000
-
11001
- function patchStyle(el, prev, next) {
11002
- const style = el.style;
11003
- const isCssString = isString(next);
11004
- if (next && !isCssString) {
11005
- if (prev && !isString(prev)) {
11006
- for (const key in prev) {
11007
- if (next[key] == null) {
11008
- setStyle(style, key, "");
11009
- }
11010
- }
11011
- }
11012
- for (const key in next) {
11013
- setStyle(style, key, next[key]);
11014
- }
11015
- } else {
11016
- const currentDisplay = style.display;
11017
- if (isCssString) {
11018
- if (prev !== next) {
11019
- style.cssText = next;
11020
- }
11021
- } else if (prev) {
11022
- el.removeAttribute("style");
11023
- }
11024
- if ("_vod" in el) {
11025
- style.display = currentDisplay;
11026
- }
10992
+ const DOMTransitionPropsValidators = {
10993
+ name: String,
10994
+ type: String,
10995
+ css: {
10996
+ type: Boolean,
10997
+ default: true
10998
+ },
10999
+ duration: [String, Number, Object],
11000
+ enterFromClass: String,
11001
+ enterActiveClass: String,
11002
+ enterToClass: String,
11003
+ appearFromClass: String,
11004
+ appearActiveClass: String,
11005
+ appearToClass: String,
11006
+ leaveFromClass: String,
11007
+ leaveActiveClass: String,
11008
+ leaveToClass: String
11009
+ };
11010
+ const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
11011
+ {},
11012
+ BaseTransitionPropsValidators,
11013
+ DOMTransitionPropsValidators
11014
+ );
11015
+ const callHook = (hook, args = []) => {
11016
+ if (isArray(hook)) {
11017
+ hook.forEach((h2) => h2(...args));
11018
+ } else if (hook) {
11019
+ hook(...args);
11027
11020
  }
11028
- }
11029
- const semicolonRE = /[^\\];\s*$/;
11030
- const importantRE = /\s*!important$/;
11031
- function setStyle(style, name, val) {
11032
- if (isArray(val)) {
11033
- val.forEach((v) => setStyle(style, name, v));
11034
- } else {
11035
- if (val == null)
11036
- val = "";
11037
- if (!!(process.env.NODE_ENV !== "production")) {
11038
- if (semicolonRE.test(val)) {
11039
- warn(
11040
- `Unexpected semicolon at the end of '${name}' style value: '${val}'`
11041
- );
11042
- }
11043
- }
11044
- if (name.startsWith("--")) {
11045
- style.setProperty(name, val);
11046
- } else {
11047
- const prefixed = autoPrefix(style, name);
11048
- if (importantRE.test(val)) {
11049
- style.setProperty(
11050
- hyphenate(prefixed),
11051
- val.replace(importantRE, ""),
11052
- "important"
11053
- );
11054
- } else {
11055
- style[prefixed] = val;
11056
- }
11021
+ };
11022
+ const hasExplicitCallback = (hook) => {
11023
+ return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
11024
+ };
11025
+ function resolveTransitionProps(rawProps) {
11026
+ const baseProps = {};
11027
+ for (const key in rawProps) {
11028
+ if (!(key in DOMTransitionPropsValidators)) {
11029
+ baseProps[key] = rawProps[key];
11057
11030
  }
11058
11031
  }
11059
- }
11060
- const prefixes = ["Webkit", "Moz", "ms"];
11061
- const prefixCache = {};
11062
- function autoPrefix(style, rawName) {
11063
- const cached = prefixCache[rawName];
11064
- if (cached) {
11065
- return cached;
11066
- }
11067
- let name = camelize(rawName);
11068
- if (name !== "filter" && name in style) {
11069
- return prefixCache[rawName] = name;
11070
- }
11071
- name = capitalize(name);
11072
- for (let i = 0; i < prefixes.length; i++) {
11073
- const prefixed = prefixes[i] + name;
11074
- if (prefixed in style) {
11075
- return prefixCache[rawName] = prefixed;
11076
- }
11032
+ if (rawProps.css === false) {
11033
+ return baseProps;
11077
11034
  }
11078
- return rawName;
11079
- }
11080
-
11081
- const xlinkNS = "http://www.w3.org/1999/xlink";
11082
- function patchAttr(el, key, value, isSVG, instance) {
11083
- if (isSVG && key.startsWith("xlink:")) {
11084
- if (value == null) {
11085
- el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
11086
- } else {
11087
- el.setAttributeNS(xlinkNS, key, value);
11035
+ const {
11036
+ name = "v",
11037
+ type,
11038
+ duration,
11039
+ enterFromClass = `${name}-enter-from`,
11040
+ enterActiveClass = `${name}-enter-active`,
11041
+ enterToClass = `${name}-enter-to`,
11042
+ appearFromClass = enterFromClass,
11043
+ appearActiveClass = enterActiveClass,
11044
+ appearToClass = enterToClass,
11045
+ leaveFromClass = `${name}-leave-from`,
11046
+ leaveActiveClass = `${name}-leave-active`,
11047
+ leaveToClass = `${name}-leave-to`
11048
+ } = rawProps;
11049
+ const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
11050
+ let legacyEnterFromClass;
11051
+ let legacyAppearFromClass;
11052
+ let legacyLeaveFromClass;
11053
+ if (legacyClassEnabled) {
11054
+ const toLegacyClass = (cls) => cls.replace(/-from$/, "");
11055
+ if (!rawProps.enterFromClass) {
11056
+ legacyEnterFromClass = toLegacyClass(enterFromClass);
11088
11057
  }
11089
- } else {
11090
- if (compatCoerceAttr(el, key, value, instance)) {
11091
- return;
11058
+ if (!rawProps.appearFromClass) {
11059
+ legacyAppearFromClass = toLegacyClass(appearFromClass);
11092
11060
  }
11093
- const isBoolean = isSpecialBooleanAttr(key);
11094
- if (value == null || isBoolean && !includeBooleanAttr(value)) {
11095
- el.removeAttribute(key);
11096
- } else {
11097
- el.setAttribute(key, isBoolean ? "" : value);
11061
+ if (!rawProps.leaveFromClass) {
11062
+ legacyLeaveFromClass = toLegacyClass(leaveFromClass);
11098
11063
  }
11099
11064
  }
11100
- }
11101
- const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
11102
- function compatCoerceAttr(el, key, value, instance = null) {
11103
- if (isEnumeratedAttr(key)) {
11104
- const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
11105
- if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
11106
- "ATTR_ENUMERATED_COERCION",
11107
- instance,
11108
- key,
11109
- value,
11110
- v2CoercedValue
11111
- )) {
11112
- el.setAttribute(key, v2CoercedValue);
11113
- return true;
11065
+ const durations = normalizeDuration(duration);
11066
+ const enterDuration = durations && durations[0];
11067
+ const leaveDuration = durations && durations[1];
11068
+ const {
11069
+ onBeforeEnter,
11070
+ onEnter,
11071
+ onEnterCancelled,
11072
+ onLeave,
11073
+ onLeaveCancelled,
11074
+ onBeforeAppear = onBeforeEnter,
11075
+ onAppear = onEnter,
11076
+ onAppearCancelled = onEnterCancelled
11077
+ } = baseProps;
11078
+ const finishEnter = (el, isAppear, done) => {
11079
+ removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
11080
+ removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
11081
+ done && done();
11082
+ };
11083
+ const finishLeave = (el, done) => {
11084
+ el._isLeaving = false;
11085
+ removeTransitionClass(el, leaveFromClass);
11086
+ removeTransitionClass(el, leaveToClass);
11087
+ removeTransitionClass(el, leaveActiveClass);
11088
+ done && done();
11089
+ };
11090
+ const makeEnterHook = (isAppear) => {
11091
+ return (el, done) => {
11092
+ const hook = isAppear ? onAppear : onEnter;
11093
+ const resolve = () => finishEnter(el, isAppear, done);
11094
+ callHook(hook, [el, resolve]);
11095
+ nextFrame(() => {
11096
+ removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
11097
+ if (legacyClassEnabled) {
11098
+ const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
11099
+ if (legacyClass) {
11100
+ removeTransitionClass(el, legacyClass);
11101
+ }
11102
+ }
11103
+ addTransitionClass(el, isAppear ? appearToClass : enterToClass);
11104
+ if (!hasExplicitCallback(hook)) {
11105
+ whenTransitionEnds(el, type, enterDuration, resolve);
11106
+ }
11107
+ });
11108
+ };
11109
+ };
11110
+ return extend(baseProps, {
11111
+ onBeforeEnter(el) {
11112
+ callHook(onBeforeEnter, [el]);
11113
+ addTransitionClass(el, enterFromClass);
11114
+ if (legacyClassEnabled && legacyEnterFromClass) {
11115
+ addTransitionClass(el, legacyEnterFromClass);
11116
+ }
11117
+ addTransitionClass(el, enterActiveClass);
11118
+ },
11119
+ onBeforeAppear(el) {
11120
+ callHook(onBeforeAppear, [el]);
11121
+ addTransitionClass(el, appearFromClass);
11122
+ if (legacyClassEnabled && legacyAppearFromClass) {
11123
+ addTransitionClass(el, legacyAppearFromClass);
11124
+ }
11125
+ addTransitionClass(el, appearActiveClass);
11126
+ },
11127
+ onEnter: makeEnterHook(false),
11128
+ onAppear: makeEnterHook(true),
11129
+ onLeave(el, done) {
11130
+ el._isLeaving = true;
11131
+ const resolve = () => finishLeave(el, done);
11132
+ addTransitionClass(el, leaveFromClass);
11133
+ if (legacyClassEnabled && legacyLeaveFromClass) {
11134
+ addTransitionClass(el, legacyLeaveFromClass);
11135
+ }
11136
+ forceReflow();
11137
+ addTransitionClass(el, leaveActiveClass);
11138
+ nextFrame(() => {
11139
+ if (!el._isLeaving) {
11140
+ return;
11141
+ }
11142
+ removeTransitionClass(el, leaveFromClass);
11143
+ if (legacyClassEnabled && legacyLeaveFromClass) {
11144
+ removeTransitionClass(el, legacyLeaveFromClass);
11145
+ }
11146
+ addTransitionClass(el, leaveToClass);
11147
+ if (!hasExplicitCallback(onLeave)) {
11148
+ whenTransitionEnds(el, type, leaveDuration, resolve);
11149
+ }
11150
+ });
11151
+ callHook(onLeave, [el, resolve]);
11152
+ },
11153
+ onEnterCancelled(el) {
11154
+ finishEnter(el, false);
11155
+ callHook(onEnterCancelled, [el]);
11156
+ },
11157
+ onAppearCancelled(el) {
11158
+ finishEnter(el, true);
11159
+ callHook(onAppearCancelled, [el]);
11160
+ },
11161
+ onLeaveCancelled(el) {
11162
+ finishLeave(el);
11163
+ callHook(onLeaveCancelled, [el]);
11114
11164
  }
11115
- } else if (value === false && !isSpecialBooleanAttr(key) && compatUtils.softAssertCompatEnabled(
11116
- "ATTR_FALSE_VALUE",
11117
- instance,
11118
- key
11119
- )) {
11120
- el.removeAttribute(key);
11121
- return true;
11122
- }
11123
- return false;
11165
+ });
11124
11166
  }
11125
-
11126
- function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
11127
- if (key === "innerHTML" || key === "textContent") {
11128
- if (prevChildren) {
11129
- unmountChildren(prevChildren, parentComponent, parentSuspense);
11130
- }
11131
- el[key] = value == null ? "" : value;
11132
- return;
11133
- }
11134
- const tag = el.tagName;
11135
- if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
11136
- !tag.includes("-")) {
11137
- el._value = value;
11138
- const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
11139
- const newValue = value == null ? "" : value;
11140
- if (oldValue !== newValue) {
11141
- el.value = newValue;
11142
- }
11143
- if (value == null) {
11144
- el.removeAttribute(key);
11145
- }
11146
- return;
11147
- }
11148
- let needRemove = false;
11149
- if (value === "" || value == null) {
11150
- const type = typeof el[key];
11151
- if (type === "boolean") {
11152
- value = includeBooleanAttr(value);
11153
- } else if (value == null && type === "string") {
11154
- value = "";
11155
- needRemove = true;
11156
- } else if (type === "number") {
11157
- value = 0;
11158
- needRemove = true;
11159
- }
11167
+ function normalizeDuration(duration) {
11168
+ if (duration == null) {
11169
+ return null;
11170
+ } else if (isObject(duration)) {
11171
+ return [NumberOf(duration.enter), NumberOf(duration.leave)];
11160
11172
  } else {
11161
- if (value === false && compatUtils.isCompatEnabled(
11162
- "ATTR_FALSE_VALUE",
11163
- parentComponent
11164
- )) {
11165
- const type = typeof el[key];
11166
- if (type === "string" || type === "number") {
11167
- !!(process.env.NODE_ENV !== "production") && compatUtils.warnDeprecation(
11168
- "ATTR_FALSE_VALUE",
11169
- parentComponent,
11170
- key
11171
- );
11172
- value = type === "number" ? 0 : "";
11173
- needRemove = true;
11174
- }
11175
- }
11176
- }
11177
- try {
11178
- el[key] = value;
11179
- } catch (e) {
11180
- if (!!(process.env.NODE_ENV !== "production") && !needRemove) {
11181
- warn(
11182
- `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
11183
- e
11184
- );
11185
- }
11173
+ const n = NumberOf(duration);
11174
+ return [n, n];
11186
11175
  }
11187
- needRemove && el.removeAttribute(key);
11188
11176
  }
11189
-
11190
- function addEventListener(el, event, handler, options) {
11191
- el.addEventListener(event, handler, options);
11177
+ function NumberOf(val) {
11178
+ const res = toNumber(val);
11179
+ if (!!(process.env.NODE_ENV !== "production")) {
11180
+ assertNumber(res, "<transition> explicit duration");
11181
+ }
11182
+ return res;
11192
11183
  }
11193
- function removeEventListener(el, event, handler, options) {
11194
- el.removeEventListener(event, handler, options);
11184
+ function addTransitionClass(el, cls) {
11185
+ cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
11186
+ (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
11195
11187
  }
11196
- function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
11197
- const invokers = el._vei || (el._vei = {});
11198
- const existingInvoker = invokers[rawName];
11199
- if (nextValue && existingInvoker) {
11200
- existingInvoker.value = nextValue;
11201
- } else {
11202
- const [name, options] = parseName(rawName);
11203
- if (nextValue) {
11204
- const invoker = invokers[rawName] = createInvoker(nextValue, instance);
11205
- addEventListener(el, name, invoker, options);
11206
- } else if (existingInvoker) {
11207
- removeEventListener(el, name, existingInvoker, options);
11208
- invokers[rawName] = void 0;
11188
+ function removeTransitionClass(el, cls) {
11189
+ cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
11190
+ const _vtc = el[vtcKey];
11191
+ if (_vtc) {
11192
+ _vtc.delete(cls);
11193
+ if (!_vtc.size) {
11194
+ el[vtcKey] = void 0;
11209
11195
  }
11210
11196
  }
11211
11197
  }
11212
- const optionsModifierRE = /(?:Once|Passive|Capture)$/;
11213
- function parseName(name) {
11214
- let options;
11215
- if (optionsModifierRE.test(name)) {
11216
- options = {};
11217
- let m;
11218
- while (m = name.match(optionsModifierRE)) {
11219
- name = name.slice(0, name.length - m[0].length);
11220
- options[m[0].toLowerCase()] = true;
11221
- }
11222
- }
11223
- const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
11224
- return [event, options];
11198
+ function nextFrame(cb) {
11199
+ requestAnimationFrame(() => {
11200
+ requestAnimationFrame(cb);
11201
+ });
11225
11202
  }
11226
- let cachedNow = 0;
11227
- const p = /* @__PURE__ */ Promise.resolve();
11228
- const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
11229
- function createInvoker(initialValue, instance) {
11230
- const invoker = (e) => {
11231
- if (!e._vts) {
11232
- e._vts = Date.now();
11233
- } else if (e._vts <= invoker.attached) {
11234
- return;
11203
+ let endId = 0;
11204
+ function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
11205
+ const id = el._endId = ++endId;
11206
+ const resolveIfNotStale = () => {
11207
+ if (id === el._endId) {
11208
+ resolve();
11235
11209
  }
11236
- callWithAsyncErrorHandling(
11237
- patchStopImmediatePropagation(e, invoker.value),
11238
- instance,
11239
- 5,
11240
- [e]
11241
- );
11242
11210
  };
11243
- invoker.value = initialValue;
11244
- invoker.attached = getNow();
11245
- return invoker;
11246
- }
11247
- function patchStopImmediatePropagation(e, value) {
11248
- if (isArray(value)) {
11249
- const originalStop = e.stopImmediatePropagation;
11250
- e.stopImmediatePropagation = () => {
11251
- originalStop.call(e);
11252
- e._stopped = true;
11253
- };
11254
- return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
11255
- } else {
11256
- return value;
11211
+ if (explicitTimeout) {
11212
+ return setTimeout(resolveIfNotStale, explicitTimeout);
11257
11213
  }
11258
- }
11259
-
11260
- const nativeOnRE = /^on[a-z]/;
11261
- const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
11262
- if (key === "class") {
11263
- patchClass(el, nextValue, isSVG);
11264
- } else if (key === "style") {
11265
- patchStyle(el, prevValue, nextValue);
11266
- } else if (isOn(key)) {
11267
- if (!isModelListener(key)) {
11268
- patchEvent(el, key, prevValue, nextValue, parentComponent);
11214
+ const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
11215
+ if (!type) {
11216
+ return resolve();
11217
+ }
11218
+ const endEvent = type + "end";
11219
+ let ended = 0;
11220
+ const end = () => {
11221
+ el.removeEventListener(endEvent, onEnd);
11222
+ resolveIfNotStale();
11223
+ };
11224
+ const onEnd = (e) => {
11225
+ if (e.target === el && ++ended >= propCount) {
11226
+ end();
11269
11227
  }
11270
- } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
11271
- patchDOMProp(
11272
- el,
11273
- key,
11274
- nextValue,
11275
- prevChildren,
11276
- parentComponent,
11277
- parentSuspense,
11278
- unmountChildren
11279
- );
11280
- } else {
11281
- if (key === "true-value") {
11282
- el._trueValue = nextValue;
11283
- } else if (key === "false-value") {
11284
- el._falseValue = nextValue;
11228
+ };
11229
+ setTimeout(() => {
11230
+ if (ended < propCount) {
11231
+ end();
11285
11232
  }
11286
- patchAttr(el, key, nextValue, isSVG, parentComponent);
11287
- }
11288
- };
11289
- function shouldSetAsProp(el, key, value, isSVG) {
11290
- if (isSVG) {
11291
- if (key === "innerHTML" || key === "textContent") {
11292
- return true;
11233
+ }, timeout + 1);
11234
+ el.addEventListener(endEvent, onEnd);
11235
+ }
11236
+ function getTransitionInfo(el, expectedType) {
11237
+ const styles = window.getComputedStyle(el);
11238
+ const getStyleProperties = (key) => (styles[key] || "").split(", ");
11239
+ const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
11240
+ const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
11241
+ const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
11242
+ const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
11243
+ const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
11244
+ const animationTimeout = getTimeout(animationDelays, animationDurations);
11245
+ let type = null;
11246
+ let timeout = 0;
11247
+ let propCount = 0;
11248
+ if (expectedType === TRANSITION$1) {
11249
+ if (transitionTimeout > 0) {
11250
+ type = TRANSITION$1;
11251
+ timeout = transitionTimeout;
11252
+ propCount = transitionDurations.length;
11293
11253
  }
11294
- if (key in el && nativeOnRE.test(key) && isFunction(value)) {
11295
- return true;
11254
+ } else if (expectedType === ANIMATION) {
11255
+ if (animationTimeout > 0) {
11256
+ type = ANIMATION;
11257
+ timeout = animationTimeout;
11258
+ propCount = animationDurations.length;
11296
11259
  }
11297
- return false;
11298
- }
11299
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
11300
- return false;
11260
+ } else {
11261
+ timeout = Math.max(transitionTimeout, animationTimeout);
11262
+ type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
11263
+ propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
11301
11264
  }
11302
- if (key === "form") {
11303
- return false;
11265
+ const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
11266
+ getStyleProperties(`${TRANSITION$1}Property`).toString()
11267
+ );
11268
+ return {
11269
+ type,
11270
+ timeout,
11271
+ propCount,
11272
+ hasTransform
11273
+ };
11274
+ }
11275
+ function getTimeout(delays, durations) {
11276
+ while (delays.length < durations.length) {
11277
+ delays = delays.concat(delays);
11304
11278
  }
11305
- if (key === "list" && el.tagName === "INPUT") {
11306
- return false;
11279
+ return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
11280
+ }
11281
+ function toMs(s) {
11282
+ if (s === "auto")
11283
+ return 0;
11284
+ return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
11285
+ }
11286
+ function forceReflow() {
11287
+ return document.body.offsetHeight;
11288
+ }
11289
+
11290
+ function patchClass(el, value, isSVG) {
11291
+ const transitionClasses = el[vtcKey];
11292
+ if (transitionClasses) {
11293
+ value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
11307
11294
  }
11308
- if (key === "type" && el.tagName === "TEXTAREA") {
11309
- return false;
11295
+ if (value == null) {
11296
+ el.removeAttribute("class");
11297
+ } else if (isSVG) {
11298
+ el.setAttribute("class", value);
11299
+ } else {
11300
+ el.className = value;
11310
11301
  }
11311
- if (nativeOnRE.test(key) && isString(value)) {
11312
- return false;
11302
+ }
11303
+
11304
+ const vShowOldKey = Symbol("_vod");
11305
+ const vShow = {
11306
+ beforeMount(el, { value }, { transition }) {
11307
+ el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display;
11308
+ if (transition && value) {
11309
+ transition.beforeEnter(el);
11310
+ } else {
11311
+ setDisplay(el, value);
11312
+ }
11313
+ },
11314
+ mounted(el, { value }, { transition }) {
11315
+ if (transition && value) {
11316
+ transition.enter(el);
11317
+ }
11318
+ },
11319
+ updated(el, { value, oldValue }, { transition }) {
11320
+ if (!value === !oldValue)
11321
+ return;
11322
+ if (transition) {
11323
+ if (value) {
11324
+ transition.beforeEnter(el);
11325
+ setDisplay(el, true);
11326
+ transition.enter(el);
11327
+ } else {
11328
+ transition.leave(el, () => {
11329
+ setDisplay(el, false);
11330
+ });
11331
+ }
11332
+ } else {
11333
+ setDisplay(el, value);
11334
+ }
11335
+ },
11336
+ beforeUnmount(el, { value }) {
11337
+ setDisplay(el, value);
11313
11338
  }
11314
- return key in el;
11339
+ };
11340
+ function setDisplay(el, value) {
11341
+ el.style.display = value ? el[vShowOldKey] : "none";
11342
+ }
11343
+ function initVShowForSSR() {
11344
+ vShow.getSSRProps = ({ value }) => {
11345
+ if (!value) {
11346
+ return { style: { display: "none" } };
11347
+ }
11348
+ };
11315
11349
  }
11316
11350
 
11317
- function defineCustomElement(options, hydrate2) {
11318
- const Comp = defineComponent(options);
11319
- class VueCustomElement extends VueElement {
11320
- constructor(initialProps) {
11321
- super(Comp, initialProps, hydrate2);
11351
+ function patchStyle(el, prev, next) {
11352
+ const style = el.style;
11353
+ const isCssString = isString(next);
11354
+ if (next && !isCssString) {
11355
+ if (prev && !isString(prev)) {
11356
+ for (const key in prev) {
11357
+ if (next[key] == null) {
11358
+ setStyle(style, key, "");
11359
+ }
11360
+ }
11361
+ }
11362
+ for (const key in next) {
11363
+ setStyle(style, key, next[key]);
11364
+ }
11365
+ } else {
11366
+ const currentDisplay = style.display;
11367
+ if (isCssString) {
11368
+ if (prev !== next) {
11369
+ style.cssText = next;
11370
+ }
11371
+ } else if (prev) {
11372
+ el.removeAttribute("style");
11373
+ }
11374
+ if (vShowOldKey in el) {
11375
+ style.display = currentDisplay;
11322
11376
  }
11323
11377
  }
11324
- VueCustomElement.def = Comp;
11325
- return VueCustomElement;
11326
11378
  }
11327
- const defineSSRCustomElement = (options) => {
11328
- return defineCustomElement(options, hydrate);
11329
- };
11330
- const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
11331
- };
11332
- class VueElement extends BaseClass {
11333
- constructor(_def, _props = {}, hydrate2) {
11334
- super();
11335
- this._def = _def;
11336
- this._props = _props;
11337
- /**
11338
- * @internal
11339
- */
11340
- this._instance = null;
11341
- this._connected = false;
11342
- this._resolved = false;
11343
- this._numberProps = null;
11344
- if (this.shadowRoot && hydrate2) {
11345
- hydrate2(this._createVNode(), this.shadowRoot);
11346
- } else {
11347
- if (!!(process.env.NODE_ENV !== "production") && this.shadowRoot) {
11379
+ const semicolonRE = /[^\\];\s*$/;
11380
+ const importantRE = /\s*!important$/;
11381
+ function setStyle(style, name, val) {
11382
+ if (isArray(val)) {
11383
+ val.forEach((v) => setStyle(style, name, v));
11384
+ } else {
11385
+ if (val == null)
11386
+ val = "";
11387
+ if (!!(process.env.NODE_ENV !== "production")) {
11388
+ if (semicolonRE.test(val)) {
11348
11389
  warn(
11349
- `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
11390
+ `Unexpected semicolon at the end of '${name}' style value: '${val}'`
11350
11391
  );
11351
11392
  }
11352
- this.attachShadow({ mode: "open" });
11353
- if (!this._def.__asyncLoader) {
11354
- this._resolveProps(this._def);
11393
+ }
11394
+ if (name.startsWith("--")) {
11395
+ style.setProperty(name, val);
11396
+ } else {
11397
+ const prefixed = autoPrefix(style, name);
11398
+ if (importantRE.test(val)) {
11399
+ style.setProperty(
11400
+ hyphenate(prefixed),
11401
+ val.replace(importantRE, ""),
11402
+ "important"
11403
+ );
11404
+ } else {
11405
+ style[prefixed] = val;
11355
11406
  }
11356
11407
  }
11357
11408
  }
11358
- connectedCallback() {
11359
- this._connected = true;
11360
- if (!this._instance) {
11361
- if (this._resolved) {
11362
- this._update();
11363
- } else {
11364
- this._resolveDef();
11365
- }
11366
- }
11367
- }
11368
- disconnectedCallback() {
11369
- this._connected = false;
11370
- nextTick(() => {
11371
- if (!this._connected) {
11372
- render(null, this.shadowRoot);
11373
- this._instance = null;
11374
- }
11375
- });
11409
+ }
11410
+ const prefixes = ["Webkit", "Moz", "ms"];
11411
+ const prefixCache = {};
11412
+ function autoPrefix(style, rawName) {
11413
+ const cached = prefixCache[rawName];
11414
+ if (cached) {
11415
+ return cached;
11376
11416
  }
11377
- /**
11378
- * resolve inner component definition (handle possible async component)
11379
- */
11380
- _resolveDef() {
11381
- this._resolved = true;
11382
- for (let i = 0; i < this.attributes.length; i++) {
11383
- this._setAttr(this.attributes[i].name);
11384
- }
11385
- new MutationObserver((mutations) => {
11386
- for (const m of mutations) {
11387
- this._setAttr(m.attributeName);
11388
- }
11389
- }).observe(this, { attributes: true });
11390
- const resolve = (def, isAsync = false) => {
11391
- const { props, styles } = def;
11392
- let numberProps;
11393
- if (props && !isArray(props)) {
11394
- for (const key in props) {
11395
- const opt = props[key];
11396
- if (opt === Number || opt && opt.type === Number) {
11397
- if (key in this._props) {
11398
- this._props[key] = toNumber(this._props[key]);
11399
- }
11400
- (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
11401
- }
11402
- }
11403
- }
11404
- this._numberProps = numberProps;
11405
- if (isAsync) {
11406
- this._resolveProps(def);
11407
- }
11408
- this._applyStyles(styles);
11409
- this._update();
11410
- };
11411
- const asyncDef = this._def.__asyncLoader;
11412
- if (asyncDef) {
11413
- asyncDef().then((def) => resolve(def, true));
11414
- } else {
11415
- resolve(this._def);
11416
- }
11417
+ let name = camelize(rawName);
11418
+ if (name !== "filter" && name in style) {
11419
+ return prefixCache[rawName] = name;
11417
11420
  }
11418
- _resolveProps(def) {
11419
- const { props } = def;
11420
- const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
11421
- for (const key of Object.keys(this)) {
11422
- if (key[0] !== "_" && declaredPropKeys.includes(key)) {
11423
- this._setProp(key, this[key], true, false);
11424
- }
11425
- }
11426
- for (const key of declaredPropKeys.map(camelize)) {
11427
- Object.defineProperty(this, key, {
11428
- get() {
11429
- return this._getProp(key);
11430
- },
11431
- set(val) {
11432
- this._setProp(key, val);
11433
- }
11434
- });
11421
+ name = capitalize(name);
11422
+ for (let i = 0; i < prefixes.length; i++) {
11423
+ const prefixed = prefixes[i] + name;
11424
+ if (prefixed in style) {
11425
+ return prefixCache[rawName] = prefixed;
11435
11426
  }
11436
11427
  }
11437
- _setAttr(key) {
11438
- let value = this.getAttribute(key);
11439
- const camelKey = camelize(key);
11440
- if (this._numberProps && this._numberProps[camelKey]) {
11441
- value = toNumber(value);
11428
+ return rawName;
11429
+ }
11430
+
11431
+ const xlinkNS = "http://www.w3.org/1999/xlink";
11432
+ function patchAttr(el, key, value, isSVG, instance) {
11433
+ if (isSVG && key.startsWith("xlink:")) {
11434
+ if (value == null) {
11435
+ el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
11436
+ } else {
11437
+ el.setAttributeNS(xlinkNS, key, value);
11442
11438
  }
11443
- this._setProp(camelKey, value, false);
11444
- }
11445
- /**
11446
- * @internal
11447
- */
11448
- _getProp(key) {
11449
- return this._props[key];
11450
- }
11451
- /**
11452
- * @internal
11453
- */
11454
- _setProp(key, val, shouldReflect = true, shouldUpdate = true) {
11455
- if (val !== this._props[key]) {
11456
- this._props[key] = val;
11457
- if (shouldUpdate && this._instance) {
11458
- this._update();
11459
- }
11460
- if (shouldReflect) {
11461
- if (val === true) {
11462
- this.setAttribute(hyphenate(key), "");
11463
- } else if (typeof val === "string" || typeof val === "number") {
11464
- this.setAttribute(hyphenate(key), val + "");
11465
- } else if (!val) {
11466
- this.removeAttribute(hyphenate(key));
11467
- }
11468
- }
11439
+ } else {
11440
+ if (compatCoerceAttr(el, key, value, instance)) {
11441
+ return;
11469
11442
  }
11470
- }
11471
- _update() {
11472
- render(this._createVNode(), this.shadowRoot);
11473
- }
11474
- _createVNode() {
11475
- const vnode = createVNode(this._def, extend({}, this._props));
11476
- if (!this._instance) {
11477
- vnode.ce = (instance) => {
11478
- this._instance = instance;
11479
- instance.isCE = true;
11480
- if (!!(process.env.NODE_ENV !== "production")) {
11481
- instance.ceReload = (newStyles) => {
11482
- if (this._styles) {
11483
- this._styles.forEach((s) => this.shadowRoot.removeChild(s));
11484
- this._styles.length = 0;
11485
- }
11486
- this._applyStyles(newStyles);
11487
- this._instance = null;
11488
- this._update();
11489
- };
11490
- }
11491
- const dispatch = (event, args) => {
11492
- this.dispatchEvent(
11493
- new CustomEvent(event, {
11494
- detail: args
11495
- })
11496
- );
11497
- };
11498
- instance.emit = (event, ...args) => {
11499
- dispatch(event, args);
11500
- if (hyphenate(event) !== event) {
11501
- dispatch(hyphenate(event), args);
11502
- }
11503
- };
11504
- let parent = this;
11505
- while (parent = parent && (parent.parentNode || parent.host)) {
11506
- if (parent instanceof VueElement) {
11507
- instance.parent = parent._instance;
11508
- instance.provides = parent._instance.provides;
11509
- break;
11510
- }
11511
- }
11512
- };
11443
+ const isBoolean = isSpecialBooleanAttr(key);
11444
+ if (value == null || isBoolean && !includeBooleanAttr(value)) {
11445
+ el.removeAttribute(key);
11446
+ } else {
11447
+ el.setAttribute(key, isBoolean ? "" : value);
11513
11448
  }
11514
- return vnode;
11515
11449
  }
11516
- _applyStyles(styles) {
11517
- if (styles) {
11518
- styles.forEach((css) => {
11519
- const s = document.createElement("style");
11520
- s.textContent = css;
11521
- this.shadowRoot.appendChild(s);
11522
- if (!!(process.env.NODE_ENV !== "production")) {
11523
- (this._styles || (this._styles = [])).push(s);
11524
- }
11525
- });
11450
+ }
11451
+ const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
11452
+ function compatCoerceAttr(el, key, value, instance = null) {
11453
+ if (isEnumeratedAttr(key)) {
11454
+ const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
11455
+ if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
11456
+ "ATTR_ENUMERATED_COERCION",
11457
+ instance,
11458
+ key,
11459
+ value,
11460
+ v2CoercedValue
11461
+ )) {
11462
+ el.setAttribute(key, v2CoercedValue);
11463
+ return true;
11526
11464
  }
11465
+ } else if (value === false && !isSpecialBooleanAttr(key) && compatUtils.softAssertCompatEnabled(
11466
+ "ATTR_FALSE_VALUE",
11467
+ instance,
11468
+ key
11469
+ )) {
11470
+ el.removeAttribute(key);
11471
+ return true;
11527
11472
  }
11473
+ return false;
11528
11474
  }
11529
11475
 
11530
- function useCssModule(name = "$style") {
11531
- {
11532
- const instance = getCurrentInstance();
11533
- if (!instance) {
11534
- !!(process.env.NODE_ENV !== "production") && warn(`useCssModule must be called inside setup()`);
11535
- return EMPTY_OBJ;
11476
+ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
11477
+ if (key === "innerHTML" || key === "textContent") {
11478
+ if (prevChildren) {
11479
+ unmountChildren(prevChildren, parentComponent, parentSuspense);
11536
11480
  }
11537
- const modules = instance.type.__cssModules;
11538
- if (!modules) {
11539
- !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS modules injected.`);
11540
- return EMPTY_OBJ;
11481
+ el[key] = value == null ? "" : value;
11482
+ return;
11483
+ }
11484
+ const tag = el.tagName;
11485
+ if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
11486
+ !tag.includes("-")) {
11487
+ el._value = value;
11488
+ const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
11489
+ const newValue = value == null ? "" : value;
11490
+ if (oldValue !== newValue) {
11491
+ el.value = newValue;
11541
11492
  }
11542
- const mod = modules[name];
11543
- if (!mod) {
11544
- !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS module named "${name}".`);
11545
- return EMPTY_OBJ;
11493
+ if (value == null) {
11494
+ el.removeAttribute(key);
11546
11495
  }
11547
- return mod;
11548
- }
11549
- }
11550
-
11551
- function useCssVars(getter) {
11552
- const instance = getCurrentInstance();
11553
- if (!instance) {
11554
- !!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
11555
11496
  return;
11556
11497
  }
11557
- const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
11558
- Array.from(
11559
- document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
11560
- ).forEach((node) => setVarsOnNode(node, vars));
11561
- };
11562
- const setVars = () => {
11563
- const vars = getter(instance.proxy);
11564
- setVarsOnVNode(instance.subTree, vars);
11565
- updateTeleports(vars);
11566
- };
11567
- watchPostEffect(setVars);
11568
- onMounted(() => {
11569
- const ob = new MutationObserver(setVars);
11570
- ob.observe(instance.subTree.el.parentNode, { childList: true });
11571
- onUnmounted(() => ob.disconnect());
11572
- });
11573
- }
11574
- function setVarsOnVNode(vnode, vars) {
11575
- if (vnode.shapeFlag & 128) {
11576
- const suspense = vnode.suspense;
11577
- vnode = suspense.activeBranch;
11578
- if (suspense.pendingBranch && !suspense.isHydrating) {
11579
- suspense.effects.push(() => {
11580
- setVarsOnVNode(suspense.activeBranch, vars);
11581
- });
11498
+ let needRemove = false;
11499
+ if (value === "" || value == null) {
11500
+ const type = typeof el[key];
11501
+ if (type === "boolean") {
11502
+ value = includeBooleanAttr(value);
11503
+ } else if (value == null && type === "string") {
11504
+ value = "";
11505
+ needRemove = true;
11506
+ } else if (type === "number") {
11507
+ value = 0;
11508
+ needRemove = true;
11509
+ }
11510
+ } else {
11511
+ if (value === false && compatUtils.isCompatEnabled(
11512
+ "ATTR_FALSE_VALUE",
11513
+ parentComponent
11514
+ )) {
11515
+ const type = typeof el[key];
11516
+ if (type === "string" || type === "number") {
11517
+ !!(process.env.NODE_ENV !== "production") && compatUtils.warnDeprecation(
11518
+ "ATTR_FALSE_VALUE",
11519
+ parentComponent,
11520
+ key
11521
+ );
11522
+ value = type === "number" ? 0 : "";
11523
+ needRemove = true;
11524
+ }
11582
11525
  }
11583
11526
  }
11584
- while (vnode.component) {
11585
- vnode = vnode.component.subTree;
11527
+ try {
11528
+ el[key] = value;
11529
+ } catch (e) {
11530
+ if (!!(process.env.NODE_ENV !== "production") && !needRemove) {
11531
+ warn(
11532
+ `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
11533
+ e
11534
+ );
11535
+ }
11586
11536
  }
11587
- if (vnode.shapeFlag & 1 && vnode.el) {
11588
- setVarsOnNode(vnode.el, vars);
11589
- } else if (vnode.type === Fragment) {
11590
- vnode.children.forEach((c) => setVarsOnVNode(c, vars));
11591
- } else if (vnode.type === Static) {
11592
- let { el, anchor } = vnode;
11593
- while (el) {
11594
- setVarsOnNode(el, vars);
11595
- if (el === anchor)
11596
- break;
11597
- el = el.nextSibling;
11537
+ needRemove && el.removeAttribute(key);
11538
+ }
11539
+
11540
+ function addEventListener(el, event, handler, options) {
11541
+ el.addEventListener(event, handler, options);
11542
+ }
11543
+ function removeEventListener(el, event, handler, options) {
11544
+ el.removeEventListener(event, handler, options);
11545
+ }
11546
+ const veiKey = Symbol("_vei");
11547
+ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
11548
+ const invokers = el[veiKey] || (el[veiKey] = {});
11549
+ const existingInvoker = invokers[rawName];
11550
+ if (nextValue && existingInvoker) {
11551
+ existingInvoker.value = nextValue;
11552
+ } else {
11553
+ const [name, options] = parseName(rawName);
11554
+ if (nextValue) {
11555
+ const invoker = invokers[rawName] = createInvoker(nextValue, instance);
11556
+ addEventListener(el, name, invoker, options);
11557
+ } else if (existingInvoker) {
11558
+ removeEventListener(el, name, existingInvoker, options);
11559
+ invokers[rawName] = void 0;
11598
11560
  }
11599
11561
  }
11600
11562
  }
11601
- function setVarsOnNode(el, vars) {
11602
- if (el.nodeType === 1) {
11603
- const style = el.style;
11604
- for (const key in vars) {
11605
- style.setProperty(`--${key}`, vars[key]);
11563
+ const optionsModifierRE = /(?:Once|Passive|Capture)$/;
11564
+ function parseName(name) {
11565
+ let options;
11566
+ if (optionsModifierRE.test(name)) {
11567
+ options = {};
11568
+ let m;
11569
+ while (m = name.match(optionsModifierRE)) {
11570
+ name = name.slice(0, name.length - m[0].length);
11571
+ options[m[0].toLowerCase()] = true;
11606
11572
  }
11607
11573
  }
11574
+ const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2));
11575
+ return [event, options];
11608
11576
  }
11609
-
11610
- const TRANSITION$1 = "transition";
11611
- const ANIMATION = "animation";
11612
- const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
11613
- Transition.displayName = "Transition";
11614
- {
11615
- Transition.__isBuiltIn = true;
11577
+ let cachedNow = 0;
11578
+ const p = /* @__PURE__ */ Promise.resolve();
11579
+ const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
11580
+ function createInvoker(initialValue, instance) {
11581
+ const invoker = (e) => {
11582
+ if (!e._vts) {
11583
+ e._vts = Date.now();
11584
+ } else if (e._vts <= invoker.attached) {
11585
+ return;
11586
+ }
11587
+ callWithAsyncErrorHandling(
11588
+ patchStopImmediatePropagation(e, invoker.value),
11589
+ instance,
11590
+ 5,
11591
+ [e]
11592
+ );
11593
+ };
11594
+ invoker.value = initialValue;
11595
+ invoker.attached = getNow();
11596
+ return invoker;
11616
11597
  }
11617
- const DOMTransitionPropsValidators = {
11618
- name: String,
11619
- type: String,
11620
- css: {
11621
- type: Boolean,
11622
- default: true
11623
- },
11624
- duration: [String, Number, Object],
11625
- enterFromClass: String,
11626
- enterActiveClass: String,
11627
- enterToClass: String,
11628
- appearFromClass: String,
11629
- appearActiveClass: String,
11630
- appearToClass: String,
11631
- leaveFromClass: String,
11632
- leaveActiveClass: String,
11633
- leaveToClass: String
11634
- };
11635
- const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
11636
- {},
11637
- BaseTransitionPropsValidators,
11638
- DOMTransitionPropsValidators
11639
- );
11640
- const callHook = (hook, args = []) => {
11641
- if (isArray(hook)) {
11642
- hook.forEach((h2) => h2(...args));
11643
- } else if (hook) {
11644
- hook(...args);
11598
+ function patchStopImmediatePropagation(e, value) {
11599
+ if (isArray(value)) {
11600
+ const originalStop = e.stopImmediatePropagation;
11601
+ e.stopImmediatePropagation = () => {
11602
+ originalStop.call(e);
11603
+ e._stopped = true;
11604
+ };
11605
+ return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
11606
+ } else {
11607
+ return value;
11608
+ }
11609
+ }
11610
+
11611
+ const nativeOnRE = /^on[a-z]/;
11612
+ const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
11613
+ if (key === "class") {
11614
+ patchClass(el, nextValue, isSVG);
11615
+ } else if (key === "style") {
11616
+ patchStyle(el, prevValue, nextValue);
11617
+ } else if (isOn(key)) {
11618
+ if (!isModelListener(key)) {
11619
+ patchEvent(el, key, prevValue, nextValue, parentComponent);
11620
+ }
11621
+ } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
11622
+ patchDOMProp(
11623
+ el,
11624
+ key,
11625
+ nextValue,
11626
+ prevChildren,
11627
+ parentComponent,
11628
+ parentSuspense,
11629
+ unmountChildren
11630
+ );
11631
+ } else {
11632
+ if (key === "true-value") {
11633
+ el._trueValue = nextValue;
11634
+ } else if (key === "false-value") {
11635
+ el._falseValue = nextValue;
11636
+ }
11637
+ patchAttr(el, key, nextValue, isSVG, parentComponent);
11645
11638
  }
11646
11639
  };
11647
- const hasExplicitCallback = (hook) => {
11648
- return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
11649
- };
11650
- function resolveTransitionProps(rawProps) {
11651
- const baseProps = {};
11652
- for (const key in rawProps) {
11653
- if (!(key in DOMTransitionPropsValidators)) {
11654
- baseProps[key] = rawProps[key];
11640
+ function shouldSetAsProp(el, key, value, isSVG) {
11641
+ if (isSVG) {
11642
+ if (key === "innerHTML" || key === "textContent") {
11643
+ return true;
11644
+ }
11645
+ if (key in el && nativeOnRE.test(key) && isFunction(value)) {
11646
+ return true;
11655
11647
  }
11648
+ return false;
11656
11649
  }
11657
- if (rawProps.css === false) {
11658
- return baseProps;
11650
+ if (key === "spellcheck" || key === "draggable" || key === "translate") {
11651
+ return false;
11659
11652
  }
11660
- const {
11661
- name = "v",
11662
- type,
11663
- duration,
11664
- enterFromClass = `${name}-enter-from`,
11665
- enterActiveClass = `${name}-enter-active`,
11666
- enterToClass = `${name}-enter-to`,
11667
- appearFromClass = enterFromClass,
11668
- appearActiveClass = enterActiveClass,
11669
- appearToClass = enterToClass,
11670
- leaveFromClass = `${name}-leave-from`,
11671
- leaveActiveClass = `${name}-leave-active`,
11672
- leaveToClass = `${name}-leave-to`
11673
- } = rawProps;
11674
- const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
11675
- let legacyEnterFromClass;
11676
- let legacyAppearFromClass;
11677
- let legacyLeaveFromClass;
11678
- if (legacyClassEnabled) {
11679
- const toLegacyClass = (cls) => cls.replace(/-from$/, "");
11680
- if (!rawProps.enterFromClass) {
11681
- legacyEnterFromClass = toLegacyClass(enterFromClass);
11653
+ if (key === "form") {
11654
+ return false;
11655
+ }
11656
+ if (key === "list" && el.tagName === "INPUT") {
11657
+ return false;
11658
+ }
11659
+ if (key === "type" && el.tagName === "TEXTAREA") {
11660
+ return false;
11661
+ }
11662
+ if (nativeOnRE.test(key) && isString(value)) {
11663
+ return false;
11664
+ }
11665
+ return key in el;
11666
+ }
11667
+
11668
+ /*! #__NO_SIDE_EFFECTS__ */
11669
+ // @__NO_SIDE_EFFECTS__
11670
+ function defineCustomElement(options, hydrate2) {
11671
+ const Comp = defineComponent(options);
11672
+ class VueCustomElement extends VueElement {
11673
+ constructor(initialProps) {
11674
+ super(Comp, initialProps, hydrate2);
11682
11675
  }
11683
- if (!rawProps.appearFromClass) {
11684
- legacyAppearFromClass = toLegacyClass(appearFromClass);
11676
+ }
11677
+ VueCustomElement.def = Comp;
11678
+ return VueCustomElement;
11679
+ }
11680
+ /*! #__NO_SIDE_EFFECTS__ */
11681
+ const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
11682
+ return /* @__PURE__ */ defineCustomElement(options, hydrate);
11683
+ };
11684
+ const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
11685
+ };
11686
+ class VueElement extends BaseClass {
11687
+ constructor(_def, _props = {}, hydrate2) {
11688
+ super();
11689
+ this._def = _def;
11690
+ this._props = _props;
11691
+ /**
11692
+ * @internal
11693
+ */
11694
+ this._instance = null;
11695
+ this._connected = false;
11696
+ this._resolved = false;
11697
+ this._numberProps = null;
11698
+ this._ob = null;
11699
+ if (this.shadowRoot && hydrate2) {
11700
+ hydrate2(this._createVNode(), this.shadowRoot);
11701
+ } else {
11702
+ if (!!(process.env.NODE_ENV !== "production") && this.shadowRoot) {
11703
+ warn(
11704
+ `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
11705
+ );
11706
+ }
11707
+ this.attachShadow({ mode: "open" });
11708
+ if (!this._def.__asyncLoader) {
11709
+ this._resolveProps(this._def);
11710
+ }
11685
11711
  }
11686
- if (!rawProps.leaveFromClass) {
11687
- legacyLeaveFromClass = toLegacyClass(leaveFromClass);
11712
+ }
11713
+ connectedCallback() {
11714
+ this._connected = true;
11715
+ if (!this._instance) {
11716
+ if (this._resolved) {
11717
+ this._update();
11718
+ } else {
11719
+ this._resolveDef();
11720
+ }
11688
11721
  }
11689
11722
  }
11690
- const durations = normalizeDuration(duration);
11691
- const enterDuration = durations && durations[0];
11692
- const leaveDuration = durations && durations[1];
11693
- const {
11694
- onBeforeEnter,
11695
- onEnter,
11696
- onEnterCancelled,
11697
- onLeave,
11698
- onLeaveCancelled,
11699
- onBeforeAppear = onBeforeEnter,
11700
- onAppear = onEnter,
11701
- onAppearCancelled = onEnterCancelled
11702
- } = baseProps;
11703
- const finishEnter = (el, isAppear, done) => {
11704
- removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
11705
- removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
11706
- done && done();
11707
- };
11708
- const finishLeave = (el, done) => {
11709
- el._isLeaving = false;
11710
- removeTransitionClass(el, leaveFromClass);
11711
- removeTransitionClass(el, leaveToClass);
11712
- removeTransitionClass(el, leaveActiveClass);
11713
- done && done();
11714
- };
11715
- const makeEnterHook = (isAppear) => {
11716
- return (el, done) => {
11717
- const hook = isAppear ? onAppear : onEnter;
11718
- const resolve = () => finishEnter(el, isAppear, done);
11719
- callHook(hook, [el, resolve]);
11720
- nextFrame(() => {
11721
- removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
11722
- if (legacyClassEnabled) {
11723
- const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
11724
- if (legacyClass) {
11725
- removeTransitionClass(el, legacyClass);
11723
+ disconnectedCallback() {
11724
+ this._connected = false;
11725
+ if (this._ob) {
11726
+ this._ob.disconnect();
11727
+ this._ob = null;
11728
+ }
11729
+ nextTick(() => {
11730
+ if (!this._connected) {
11731
+ render(null, this.shadowRoot);
11732
+ this._instance = null;
11733
+ }
11734
+ });
11735
+ }
11736
+ /**
11737
+ * resolve inner component definition (handle possible async component)
11738
+ */
11739
+ _resolveDef() {
11740
+ this._resolved = true;
11741
+ for (let i = 0; i < this.attributes.length; i++) {
11742
+ this._setAttr(this.attributes[i].name);
11743
+ }
11744
+ this._ob = new MutationObserver((mutations) => {
11745
+ for (const m of mutations) {
11746
+ this._setAttr(m.attributeName);
11747
+ }
11748
+ });
11749
+ this._ob.observe(this, { attributes: true });
11750
+ const resolve = (def, isAsync = false) => {
11751
+ const { props, styles } = def;
11752
+ let numberProps;
11753
+ if (props && !isArray(props)) {
11754
+ for (const key in props) {
11755
+ const opt = props[key];
11756
+ if (opt === Number || opt && opt.type === Number) {
11757
+ if (key in this._props) {
11758
+ this._props[key] = toNumber(this._props[key]);
11759
+ }
11760
+ (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
11726
11761
  }
11727
11762
  }
11728
- addTransitionClass(el, isAppear ? appearToClass : enterToClass);
11729
- if (!hasExplicitCallback(hook)) {
11730
- whenTransitionEnds(el, type, enterDuration, resolve);
11731
- }
11732
- });
11763
+ }
11764
+ this._numberProps = numberProps;
11765
+ if (isAsync) {
11766
+ this._resolveProps(def);
11767
+ }
11768
+ this._applyStyles(styles);
11769
+ this._update();
11733
11770
  };
11734
- };
11735
- return extend(baseProps, {
11736
- onBeforeEnter(el) {
11737
- callHook(onBeforeEnter, [el]);
11738
- addTransitionClass(el, enterFromClass);
11739
- if (legacyClassEnabled && legacyEnterFromClass) {
11740
- addTransitionClass(el, legacyEnterFromClass);
11771
+ const asyncDef = this._def.__asyncLoader;
11772
+ if (asyncDef) {
11773
+ asyncDef().then((def) => resolve(def, true));
11774
+ } else {
11775
+ resolve(this._def);
11776
+ }
11777
+ }
11778
+ _resolveProps(def) {
11779
+ const { props } = def;
11780
+ const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
11781
+ for (const key of Object.keys(this)) {
11782
+ if (key[0] !== "_" && declaredPropKeys.includes(key)) {
11783
+ this._setProp(key, this[key], true, false);
11741
11784
  }
11742
- addTransitionClass(el, enterActiveClass);
11743
- },
11744
- onBeforeAppear(el) {
11745
- callHook(onBeforeAppear, [el]);
11746
- addTransitionClass(el, appearFromClass);
11747
- if (legacyClassEnabled && legacyAppearFromClass) {
11748
- addTransitionClass(el, legacyAppearFromClass);
11785
+ }
11786
+ for (const key of declaredPropKeys.map(camelize)) {
11787
+ Object.defineProperty(this, key, {
11788
+ get() {
11789
+ return this._getProp(key);
11790
+ },
11791
+ set(val) {
11792
+ this._setProp(key, val);
11793
+ }
11794
+ });
11795
+ }
11796
+ }
11797
+ _setAttr(key) {
11798
+ let value = this.getAttribute(key);
11799
+ const camelKey = camelize(key);
11800
+ if (this._numberProps && this._numberProps[camelKey]) {
11801
+ value = toNumber(value);
11802
+ }
11803
+ this._setProp(camelKey, value, false);
11804
+ }
11805
+ /**
11806
+ * @internal
11807
+ */
11808
+ _getProp(key) {
11809
+ return this._props[key];
11810
+ }
11811
+ /**
11812
+ * @internal
11813
+ */
11814
+ _setProp(key, val, shouldReflect = true, shouldUpdate = true) {
11815
+ if (val !== this._props[key]) {
11816
+ this._props[key] = val;
11817
+ if (shouldUpdate && this._instance) {
11818
+ this._update();
11749
11819
  }
11750
- addTransitionClass(el, appearActiveClass);
11751
- },
11752
- onEnter: makeEnterHook(false),
11753
- onAppear: makeEnterHook(true),
11754
- onLeave(el, done) {
11755
- el._isLeaving = true;
11756
- const resolve = () => finishLeave(el, done);
11757
- addTransitionClass(el, leaveFromClass);
11758
- if (legacyClassEnabled && legacyLeaveFromClass) {
11759
- addTransitionClass(el, legacyLeaveFromClass);
11820
+ if (shouldReflect) {
11821
+ if (val === true) {
11822
+ this.setAttribute(hyphenate(key), "");
11823
+ } else if (typeof val === "string" || typeof val === "number") {
11824
+ this.setAttribute(hyphenate(key), val + "");
11825
+ } else if (!val) {
11826
+ this.removeAttribute(hyphenate(key));
11827
+ }
11760
11828
  }
11761
- forceReflow();
11762
- addTransitionClass(el, leaveActiveClass);
11763
- nextFrame(() => {
11764
- if (!el._isLeaving) {
11765
- return;
11829
+ }
11830
+ }
11831
+ _update() {
11832
+ render(this._createVNode(), this.shadowRoot);
11833
+ }
11834
+ _createVNode() {
11835
+ const vnode = createVNode(this._def, extend({}, this._props));
11836
+ if (!this._instance) {
11837
+ vnode.ce = (instance) => {
11838
+ this._instance = instance;
11839
+ instance.isCE = true;
11840
+ if (!!(process.env.NODE_ENV !== "production")) {
11841
+ instance.ceReload = (newStyles) => {
11842
+ if (this._styles) {
11843
+ this._styles.forEach((s) => this.shadowRoot.removeChild(s));
11844
+ this._styles.length = 0;
11845
+ }
11846
+ this._applyStyles(newStyles);
11847
+ this._instance = null;
11848
+ this._update();
11849
+ };
11766
11850
  }
11767
- removeTransitionClass(el, leaveFromClass);
11768
- if (legacyClassEnabled && legacyLeaveFromClass) {
11769
- removeTransitionClass(el, legacyLeaveFromClass);
11851
+ const dispatch = (event, args) => {
11852
+ this.dispatchEvent(
11853
+ new CustomEvent(event, {
11854
+ detail: args
11855
+ })
11856
+ );
11857
+ };
11858
+ instance.emit = (event, ...args) => {
11859
+ dispatch(event, args);
11860
+ if (hyphenate(event) !== event) {
11861
+ dispatch(hyphenate(event), args);
11862
+ }
11863
+ };
11864
+ let parent = this;
11865
+ while (parent = parent && (parent.parentNode || parent.host)) {
11866
+ if (parent instanceof VueElement) {
11867
+ instance.parent = parent._instance;
11868
+ instance.provides = parent._instance.provides;
11869
+ break;
11870
+ }
11770
11871
  }
11771
- addTransitionClass(el, leaveToClass);
11772
- if (!hasExplicitCallback(onLeave)) {
11773
- whenTransitionEnds(el, type, leaveDuration, resolve);
11872
+ };
11873
+ }
11874
+ return vnode;
11875
+ }
11876
+ _applyStyles(styles) {
11877
+ if (styles) {
11878
+ styles.forEach((css) => {
11879
+ const s = document.createElement("style");
11880
+ s.textContent = css;
11881
+ this.shadowRoot.appendChild(s);
11882
+ if (!!(process.env.NODE_ENV !== "production")) {
11883
+ (this._styles || (this._styles = [])).push(s);
11774
11884
  }
11775
11885
  });
11776
- callHook(onLeave, [el, resolve]);
11777
- },
11778
- onEnterCancelled(el) {
11779
- finishEnter(el, false);
11780
- callHook(onEnterCancelled, [el]);
11781
- },
11782
- onAppearCancelled(el) {
11783
- finishEnter(el, true);
11784
- callHook(onAppearCancelled, [el]);
11785
- },
11786
- onLeaveCancelled(el) {
11787
- finishLeave(el);
11788
- callHook(onLeaveCancelled, [el]);
11789
11886
  }
11790
- });
11791
- }
11792
- function normalizeDuration(duration) {
11793
- if (duration == null) {
11794
- return null;
11795
- } else if (isObject(duration)) {
11796
- return [NumberOf(duration.enter), NumberOf(duration.leave)];
11797
- } else {
11798
- const n = NumberOf(duration);
11799
- return [n, n];
11800
- }
11801
- }
11802
- function NumberOf(val) {
11803
- const res = toNumber(val);
11804
- if (!!(process.env.NODE_ENV !== "production")) {
11805
- assertNumber(res, "<transition> explicit duration");
11806
11887
  }
11807
- return res;
11808
- }
11809
- function addTransitionClass(el, cls) {
11810
- cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
11811
- (el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
11812
11888
  }
11813
- function removeTransitionClass(el, cls) {
11814
- cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
11815
- const { _vtc } = el;
11816
- if (_vtc) {
11817
- _vtc.delete(cls);
11818
- if (!_vtc.size) {
11819
- el._vtc = void 0;
11889
+
11890
+ function useCssModule(name = "$style") {
11891
+ {
11892
+ const instance = getCurrentInstance();
11893
+ if (!instance) {
11894
+ !!(process.env.NODE_ENV !== "production") && warn(`useCssModule must be called inside setup()`);
11895
+ return EMPTY_OBJ;
11820
11896
  }
11821
- }
11822
- }
11823
- function nextFrame(cb) {
11824
- requestAnimationFrame(() => {
11825
- requestAnimationFrame(cb);
11826
- });
11827
- }
11828
- let endId = 0;
11829
- function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
11830
- const id = el._endId = ++endId;
11831
- const resolveIfNotStale = () => {
11832
- if (id === el._endId) {
11833
- resolve();
11897
+ const modules = instance.type.__cssModules;
11898
+ if (!modules) {
11899
+ !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS modules injected.`);
11900
+ return EMPTY_OBJ;
11834
11901
  }
11835
- };
11836
- if (explicitTimeout) {
11837
- return setTimeout(resolveIfNotStale, explicitTimeout);
11902
+ const mod = modules[name];
11903
+ if (!mod) {
11904
+ !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS module named "${name}".`);
11905
+ return EMPTY_OBJ;
11906
+ }
11907
+ return mod;
11838
11908
  }
11839
- const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
11840
- if (!type) {
11841
- return resolve();
11909
+ }
11910
+
11911
+ function useCssVars(getter) {
11912
+ const instance = getCurrentInstance();
11913
+ if (!instance) {
11914
+ !!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`);
11915
+ return;
11842
11916
  }
11843
- const endEvent = type + "end";
11844
- let ended = 0;
11845
- const end = () => {
11846
- el.removeEventListener(endEvent, onEnd);
11847
- resolveIfNotStale();
11917
+ const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => {
11918
+ Array.from(
11919
+ document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
11920
+ ).forEach((node) => setVarsOnNode(node, vars));
11848
11921
  };
11849
- const onEnd = (e) => {
11850
- if (e.target === el && ++ended >= propCount) {
11851
- end();
11852
- }
11922
+ const setVars = () => {
11923
+ const vars = getter(instance.proxy);
11924
+ setVarsOnVNode(instance.subTree, vars);
11925
+ updateTeleports(vars);
11853
11926
  };
11854
- setTimeout(() => {
11855
- if (ended < propCount) {
11856
- end();
11857
- }
11858
- }, timeout + 1);
11859
- el.addEventListener(endEvent, onEnd);
11927
+ watchPostEffect(setVars);
11928
+ onMounted(() => {
11929
+ const ob = new MutationObserver(setVars);
11930
+ ob.observe(instance.subTree.el.parentNode, { childList: true });
11931
+ onUnmounted(() => ob.disconnect());
11932
+ });
11860
11933
  }
11861
- function getTransitionInfo(el, expectedType) {
11862
- const styles = window.getComputedStyle(el);
11863
- const getStyleProperties = (key) => (styles[key] || "").split(", ");
11864
- const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
11865
- const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
11866
- const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
11867
- const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
11868
- const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
11869
- const animationTimeout = getTimeout(animationDelays, animationDurations);
11870
- let type = null;
11871
- let timeout = 0;
11872
- let propCount = 0;
11873
- if (expectedType === TRANSITION$1) {
11874
- if (transitionTimeout > 0) {
11875
- type = TRANSITION$1;
11876
- timeout = transitionTimeout;
11877
- propCount = transitionDurations.length;
11934
+ function setVarsOnVNode(vnode, vars) {
11935
+ if (vnode.shapeFlag & 128) {
11936
+ const suspense = vnode.suspense;
11937
+ vnode = suspense.activeBranch;
11938
+ if (suspense.pendingBranch && !suspense.isHydrating) {
11939
+ suspense.effects.push(() => {
11940
+ setVarsOnVNode(suspense.activeBranch, vars);
11941
+ });
11878
11942
  }
11879
- } else if (expectedType === ANIMATION) {
11880
- if (animationTimeout > 0) {
11881
- type = ANIMATION;
11882
- timeout = animationTimeout;
11883
- propCount = animationDurations.length;
11943
+ }
11944
+ while (vnode.component) {
11945
+ vnode = vnode.component.subTree;
11946
+ }
11947
+ if (vnode.shapeFlag & 1 && vnode.el) {
11948
+ setVarsOnNode(vnode.el, vars);
11949
+ } else if (vnode.type === Fragment) {
11950
+ vnode.children.forEach((c) => setVarsOnVNode(c, vars));
11951
+ } else if (vnode.type === Static) {
11952
+ let { el, anchor } = vnode;
11953
+ while (el) {
11954
+ setVarsOnNode(el, vars);
11955
+ if (el === anchor)
11956
+ break;
11957
+ el = el.nextSibling;
11884
11958
  }
11885
- } else {
11886
- timeout = Math.max(transitionTimeout, animationTimeout);
11887
- type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
11888
- propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
11889
11959
  }
11890
- const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
11891
- getStyleProperties(`${TRANSITION$1}Property`).toString()
11892
- );
11893
- return {
11894
- type,
11895
- timeout,
11896
- propCount,
11897
- hasTransform
11898
- };
11899
11960
  }
11900
- function getTimeout(delays, durations) {
11901
- while (delays.length < durations.length) {
11902
- delays = delays.concat(delays);
11961
+ function setVarsOnNode(el, vars) {
11962
+ if (el.nodeType === 1) {
11963
+ const style = el.style;
11964
+ for (const key in vars) {
11965
+ style.setProperty(`--${key}`, vars[key]);
11966
+ }
11903
11967
  }
11904
- return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
11905
- }
11906
- function toMs(s) {
11907
- return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
11908
- }
11909
- function forceReflow() {
11910
- return document.body.offsetHeight;
11911
11968
  }
11912
11969
 
11913
11970
  const positionMap = /* @__PURE__ */ new WeakMap();
11914
11971
  const newPositionMap = /* @__PURE__ */ new WeakMap();
11972
+ const moveCbKey = Symbol("_moveCb");
11973
+ const enterCbKey = Symbol("_enterCb");
11915
11974
  const TransitionGroupImpl = {
11916
11975
  name: "TransitionGroup",
11917
11976
  props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
@@ -11944,13 +12003,13 @@ const TransitionGroupImpl = {
11944
12003
  const style = el.style;
11945
12004
  addTransitionClass(el, moveClass);
11946
12005
  style.transform = style.webkitTransform = style.transitionDuration = "";
11947
- const cb = el._moveCb = (e) => {
12006
+ const cb = el[moveCbKey] = (e) => {
11948
12007
  if (e && e.target !== el) {
11949
12008
  return;
11950
12009
  }
11951
12010
  if (!e || /transform$/.test(e.propertyName)) {
11952
12011
  el.removeEventListener("transitionend", cb);
11953
- el._moveCb = null;
12012
+ el[moveCbKey] = null;
11954
12013
  removeTransitionClass(el, moveClass);
11955
12014
  }
11956
12015
  };
@@ -12002,11 +12061,11 @@ const removeMode = (props) => delete props.mode;
12002
12061
  const TransitionGroup = TransitionGroupImpl;
12003
12062
  function callPendingCbs(c) {
12004
12063
  const el = c.el;
12005
- if (el._moveCb) {
12006
- el._moveCb();
12064
+ if (el[moveCbKey]) {
12065
+ el[moveCbKey]();
12007
12066
  }
12008
- if (el._enterCb) {
12009
- el._enterCb();
12067
+ if (el[enterCbKey]) {
12068
+ el[enterCbKey]();
12010
12069
  }
12011
12070
  }
12012
12071
  function recordPosition(c) {
@@ -12026,8 +12085,9 @@ function applyTranslation(c) {
12026
12085
  }
12027
12086
  function hasCSSTransform(el, root, moveClass) {
12028
12087
  const clone = el.cloneNode();
12029
- if (el._vtc) {
12030
- el._vtc.forEach((cls) => {
12088
+ const _vtc = el[vtcKey];
12089
+ if (_vtc) {
12090
+ _vtc.forEach((cls) => {
12031
12091
  cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
12032
12092
  });
12033
12093
  }
@@ -12054,9 +12114,10 @@ function onCompositionEnd(e) {
12054
12114
  target.dispatchEvent(new Event("input"));
12055
12115
  }
12056
12116
  }
12117
+ const assignKey = Symbol("_assign");
12057
12118
  const vModelText = {
12058
12119
  created(el, { modifiers: { lazy, trim, number } }, vnode) {
12059
- el._assign = getModelAssigner(vnode);
12120
+ el[assignKey] = getModelAssigner(vnode);
12060
12121
  const castToNumber = number || vnode.props && vnode.props.type === "number";
12061
12122
  addEventListener(el, lazy ? "change" : "input", (e) => {
12062
12123
  if (e.target.composing)
@@ -12068,7 +12129,7 @@ const vModelText = {
12068
12129
  if (castToNumber) {
12069
12130
  domValue = looseToNumber(domValue);
12070
12131
  }
12071
- el._assign(domValue);
12132
+ el[assignKey](domValue);
12072
12133
  });
12073
12134
  if (trim) {
12074
12135
  addEventListener(el, "change", () => {
@@ -12086,7 +12147,7 @@ const vModelText = {
12086
12147
  el.value = value == null ? "" : value;
12087
12148
  },
12088
12149
  beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
12089
- el._assign = getModelAssigner(vnode);
12150
+ el[assignKey] = getModelAssigner(vnode);
12090
12151
  if (el.composing)
12091
12152
  return;
12092
12153
  if (document.activeElement === el && el.type !== "range") {
@@ -12110,12 +12171,12 @@ const vModelCheckbox = {
12110
12171
  // #4096 array checkboxes need to be deep traversed
12111
12172
  deep: true,
12112
12173
  created(el, _, vnode) {
12113
- el._assign = getModelAssigner(vnode);
12174
+ el[assignKey] = getModelAssigner(vnode);
12114
12175
  addEventListener(el, "change", () => {
12115
12176
  const modelValue = el._modelValue;
12116
12177
  const elementValue = getValue(el);
12117
12178
  const checked = el.checked;
12118
- const assign = el._assign;
12179
+ const assign = el[assignKey];
12119
12180
  if (isArray(modelValue)) {
12120
12181
  const index = looseIndexOf(modelValue, elementValue);
12121
12182
  const found = index !== -1;
@@ -12142,7 +12203,7 @@ const vModelCheckbox = {
12142
12203
  // set initial checked on mount to wait for true-value/false-value
12143
12204
  mounted: setChecked,
12144
12205
  beforeUpdate(el, binding, vnode) {
12145
- el._assign = getModelAssigner(vnode);
12206
+ el[assignKey] = getModelAssigner(vnode);
12146
12207
  setChecked(el, binding, vnode);
12147
12208
  }
12148
12209
  };
@@ -12159,13 +12220,13 @@ function setChecked(el, { value, oldValue }, vnode) {
12159
12220
  const vModelRadio = {
12160
12221
  created(el, { value }, vnode) {
12161
12222
  el.checked = looseEqual(value, vnode.props.value);
12162
- el._assign = getModelAssigner(vnode);
12223
+ el[assignKey] = getModelAssigner(vnode);
12163
12224
  addEventListener(el, "change", () => {
12164
- el._assign(getValue(el));
12225
+ el[assignKey](getValue(el));
12165
12226
  });
12166
12227
  },
12167
12228
  beforeUpdate(el, { value, oldValue }, vnode) {
12168
- el._assign = getModelAssigner(vnode);
12229
+ el[assignKey] = getModelAssigner(vnode);
12169
12230
  if (value !== oldValue) {
12170
12231
  el.checked = looseEqual(value, vnode.props.value);
12171
12232
  }
@@ -12180,11 +12241,11 @@ const vModelSelect = {
12180
12241
  const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
12181
12242
  (o) => number ? looseToNumber(getValue(o)) : getValue(o)
12182
12243
  );
12183
- el._assign(
12244
+ el[assignKey](
12184
12245
  el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
12185
12246
  );
12186
12247
  });
12187
- el._assign = getModelAssigner(vnode);
12248
+ el[assignKey] = getModelAssigner(vnode);
12188
12249
  },
12189
12250
  // set value in mounted & updated because <select> relies on its children
12190
12251
  // <option>s.
@@ -12192,7 +12253,7 @@ const vModelSelect = {
12192
12253
  setSelected(el, value);
12193
12254
  },
12194
12255
  beforeUpdate(el, _binding, vnode) {
12195
- el._assign = getModelAssigner(vnode);
12256
+ el[assignKey] = getModelAssigner(vnode);
12196
12257
  },
12197
12258
  updated(el, { value }) {
12198
12259
  setSelected(el, value);
@@ -12389,52 +12450,6 @@ const withKeys = (fn, modifiers) => {
12389
12450
  };
12390
12451
  };
12391
12452
 
12392
- const vShow = {
12393
- beforeMount(el, { value }, { transition }) {
12394
- el._vod = el.style.display === "none" ? "" : el.style.display;
12395
- if (transition && value) {
12396
- transition.beforeEnter(el);
12397
- } else {
12398
- setDisplay(el, value);
12399
- }
12400
- },
12401
- mounted(el, { value }, { transition }) {
12402
- if (transition && value) {
12403
- transition.enter(el);
12404
- }
12405
- },
12406
- updated(el, { value, oldValue }, { transition }) {
12407
- if (!value === !oldValue)
12408
- return;
12409
- if (transition) {
12410
- if (value) {
12411
- transition.beforeEnter(el);
12412
- setDisplay(el, true);
12413
- transition.enter(el);
12414
- } else {
12415
- transition.leave(el, () => {
12416
- setDisplay(el, false);
12417
- });
12418
- }
12419
- } else {
12420
- setDisplay(el, value);
12421
- }
12422
- },
12423
- beforeUnmount(el, { value }) {
12424
- setDisplay(el, value);
12425
- }
12426
- };
12427
- function setDisplay(el, value) {
12428
- el.style.display = value ? el._vod : "none";
12429
- }
12430
- function initVShowForSSR() {
12431
- vShow.getSSRProps = ({ value }) => {
12432
- if (!value) {
12433
- return { style: { display: "none" } };
12434
- }
12435
- };
12436
- }
12437
-
12438
12453
  const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
12439
12454
  let renderer;
12440
12455
  let enabledHydration = false;
@@ -13474,7 +13489,7 @@ function parseChildren(context, mode, ancestors) {
13474
13489
  continue;
13475
13490
  } else if (/[a-z]/i.test(s[2])) {
13476
13491
  emitError(context, 23);
13477
- parseTag(context, TagType.End, parent);
13492
+ parseTag(context, 1 /* End */, parent);
13478
13493
  continue;
13479
13494
  } else {
13480
13495
  emitError(
@@ -13635,7 +13650,7 @@ function parseElement(context, ancestors) {
13635
13650
  const wasInPre = context.inPre;
13636
13651
  const wasInVPre = context.inVPre;
13637
13652
  const parent = last(ancestors);
13638
- const element = parseTag(context, TagType.Start, parent);
13653
+ const element = parseTag(context, 0 /* Start */, parent);
13639
13654
  const isPreBoundary = context.inPre && !wasInPre;
13640
13655
  const isVPreBoundary = context.inVPre && !wasInVPre;
13641
13656
  if (element.isSelfClosing || context.options.isVoidTag(element.tag)) {
@@ -13670,7 +13685,7 @@ function parseElement(context, ancestors) {
13670
13685
  }
13671
13686
  element.children = children;
13672
13687
  if (startsWithEndTagOpen(context.source, element.tag)) {
13673
- parseTag(context, TagType.End, parent);
13688
+ parseTag(context, 1 /* End */, parent);
13674
13689
  } else {
13675
13690
  emitError(context, 24, 0, element.loc.start);
13676
13691
  if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
@@ -13689,11 +13704,6 @@ function parseElement(context, ancestors) {
13689
13704
  }
13690
13705
  return element;
13691
13706
  }
13692
- var TagType = /* @__PURE__ */ ((TagType2) => {
13693
- TagType2[TagType2["Start"] = 0] = "Start";
13694
- TagType2[TagType2["End"] = 1] = "End";
13695
- return TagType2;
13696
- })(TagType || {});
13697
13707
  const isSpecialTemplateDirective = /* @__PURE__ */ makeMap(
13698
13708
  `if,else,else-if,for,slot`
13699
13709
  );
@@ -14462,7 +14472,7 @@ function createTransformContext(root, {
14462
14472
  directives: /* @__PURE__ */ new Set(),
14463
14473
  hoists: [],
14464
14474
  imports: [],
14465
- constantCache: /* @__PURE__ */ new Map(),
14475
+ constantCache: /* @__PURE__ */ new WeakMap(),
14466
14476
  temps: 0,
14467
14477
  cached: 0,
14468
14478
  identifiers: /* @__PURE__ */ Object.create(null),