@vue/compat 3.2.30 → 3.2.33

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.
@@ -427,8 +427,17 @@ function warn(msg, ...args) {
427
427
  let activeEffectScope;
428
428
  class EffectScope {
429
429
  constructor(detached = false) {
430
+ /**
431
+ * @internal
432
+ */
430
433
  this.active = true;
434
+ /**
435
+ * @internal
436
+ */
431
437
  this.effects = [];
438
+ /**
439
+ * @internal
440
+ */
432
441
  this.cleanups = [];
433
442
  if (!detached && activeEffectScope) {
434
443
  this.parent = activeEffectScope;
@@ -438,21 +447,30 @@ class EffectScope {
438
447
  }
439
448
  run(fn) {
440
449
  if (this.active) {
450
+ const currentEffectScope = activeEffectScope;
441
451
  try {
442
452
  activeEffectScope = this;
443
453
  return fn();
444
454
  }
445
455
  finally {
446
- activeEffectScope = this.parent;
456
+ activeEffectScope = currentEffectScope;
447
457
  }
448
458
  }
449
459
  else {
450
460
  warn(`cannot run an inactive effect scope.`);
451
461
  }
452
462
  }
463
+ /**
464
+ * This should only be called on non-detached scopes
465
+ * @internal
466
+ */
453
467
  on() {
454
468
  activeEffectScope = this;
455
469
  }
470
+ /**
471
+ * This should only be called on non-detached scopes
472
+ * @internal
473
+ */
456
474
  off() {
457
475
  activeEffectScope = this.parent;
458
476
  }
@@ -594,10 +612,17 @@ class ReactiveEffect {
594
612
  activeEffect = this.parent;
595
613
  shouldTrack = lastShouldTrack;
596
614
  this.parent = undefined;
615
+ if (this.deferStop) {
616
+ this.stop();
617
+ }
597
618
  }
598
619
  }
599
620
  stop() {
600
- if (this.active) {
621
+ // stopped while running itself - defer the cleanup
622
+ if (activeEffect === this) {
623
+ this.deferStop = true;
624
+ }
625
+ else if (this.active) {
601
626
  cleanupEffect(this);
602
627
  if (this.onStop) {
603
628
  this.onStop();
@@ -676,9 +701,7 @@ function trackEffects(dep, debuggerEventExtraInfo) {
676
701
  dep.add(activeEffect);
677
702
  activeEffect.deps.push(dep);
678
703
  if (activeEffect.onTrack) {
679
- activeEffect.onTrack(Object.assign({
680
- effect: activeEffect
681
- }, debuggerEventExtraInfo));
704
+ activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo));
682
705
  }
683
706
  }
684
707
  }
@@ -774,7 +797,9 @@ function triggerEffects(dep, debuggerEventExtraInfo) {
774
797
  }
775
798
 
776
799
  const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
777
- const builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol)
800
+ const builtInSymbols = new Set(
801
+ /*#__PURE__*/
802
+ Object.getOwnPropertyNames(Symbol)
778
803
  .map(key => Symbol[key])
779
804
  .filter(isSymbol));
780
805
  const get = /*#__PURE__*/ createGetter();
@@ -926,13 +951,13 @@ const readonlyHandlers = {
926
951
  get: readonlyGet,
927
952
  set(target, key) {
928
953
  {
929
- console.warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
954
+ warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
930
955
  }
931
956
  return true;
932
957
  },
933
958
  deleteProperty(target, key) {
934
959
  {
935
- console.warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
960
+ warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
936
961
  }
937
962
  return true;
938
963
  }
@@ -1760,7 +1785,7 @@ let preFlushIndex = 0;
1760
1785
  const pendingPostFlushCbs = [];
1761
1786
  let activePostFlushCbs = null;
1762
1787
  let postFlushIndex = 0;
1763
- const resolvedPromise = Promise.resolve();
1788
+ const resolvedPromise = /*#__PURE__*/ Promise.resolve();
1764
1789
  let currentFlushPromise = null;
1765
1790
  let currentPreFlushParentJob = null;
1766
1791
  const RECURSION_LIMIT = 100;
@@ -2694,6 +2719,8 @@ function compatModelEmit(instance, event, args) {
2694
2719
  }
2695
2720
 
2696
2721
  function emit$2(instance, event, ...rawArgs) {
2722
+ if (instance.isUnmounted)
2723
+ return;
2697
2724
  const props = instance.vnode.props || EMPTY_OBJ;
2698
2725
  {
2699
2726
  const { emitsOptions, propsOptions: [propsOptions] } = instance;
@@ -3711,12 +3738,10 @@ function watchEffect(effect, options) {
3711
3738
  return doWatch(effect, null, options);
3712
3739
  }
3713
3740
  function watchPostEffect(effect, options) {
3714
- return doWatch(effect, null, (Object.assign(options || {}, { flush: 'post' })
3715
- ));
3741
+ return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) ));
3716
3742
  }
3717
3743
  function watchSyncEffect(effect, options) {
3718
- return doWatch(effect, null, (Object.assign(options || {}, { flush: 'sync' })
3719
- ));
3744
+ return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) ));
3720
3745
  }
3721
3746
  // initial value for watchers to trigger on undefined initial values
3722
3747
  const INITIAL_WATCHER_VALUE = {};
@@ -4015,10 +4040,22 @@ const BaseTransitionImpl = {
4015
4040
  if (!children || !children.length) {
4016
4041
  return;
4017
4042
  }
4018
- // warn multiple elements
4043
+ let child = children[0];
4019
4044
  if (children.length > 1) {
4020
- warn$1('<transition> can only be used on a single element or component. Use ' +
4021
- '<transition-group> for lists.');
4045
+ let hasFound = false;
4046
+ // locate first non-comment child
4047
+ for (const c of children) {
4048
+ if (c.type !== Comment) {
4049
+ if (hasFound) {
4050
+ // warn more than one non-comment child
4051
+ warn$1('<transition> can only be used on a single element or component. ' +
4052
+ 'Use <transition-group> for lists.');
4053
+ break;
4054
+ }
4055
+ child = c;
4056
+ hasFound = true;
4057
+ }
4058
+ }
4022
4059
  }
4023
4060
  // there's no need to track reactivity for these props so use the raw
4024
4061
  // props for a bit better perf
@@ -4026,11 +4063,11 @@ const BaseTransitionImpl = {
4026
4063
  const { mode } = rawProps;
4027
4064
  // check mode
4028
4065
  if (mode &&
4029
- mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
4066
+ mode !== 'in-out' &&
4067
+ mode !== 'out-in' &&
4068
+ mode !== 'default') {
4030
4069
  warn$1(`invalid <transition> mode: ${mode}`);
4031
4070
  }
4032
- // at this point children has a guaranteed length of 1.
4033
- const child = children[0];
4034
4071
  if (state.isLeaving) {
4035
4072
  return emptyPlaceholder(child);
4036
4073
  }
@@ -4256,20 +4293,24 @@ function setTransitionHooks(vnode, hooks) {
4256
4293
  vnode.transition = hooks;
4257
4294
  }
4258
4295
  }
4259
- function getTransitionRawChildren(children, keepComment = false) {
4296
+ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4260
4297
  let ret = [];
4261
4298
  let keyedFragmentCount = 0;
4262
4299
  for (let i = 0; i < children.length; i++) {
4263
- const child = children[i];
4300
+ let child = children[i];
4301
+ // #5360 inherit parent key in case of <template v-for>
4302
+ const key = parentKey == null
4303
+ ? child.key
4304
+ : String(parentKey) + String(child.key != null ? child.key : i);
4264
4305
  // handle fragment children case, e.g. v-for
4265
4306
  if (child.type === Fragment) {
4266
4307
  if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
4267
4308
  keyedFragmentCount++;
4268
- ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
4309
+ ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
4269
4310
  }
4270
4311
  // comment placeholders should be skipped, e.g. v-if
4271
4312
  else if (keepComment || child.type !== Comment) {
4272
- ret.push(child);
4313
+ ret.push(key != null ? cloneVNode(child, { key }) : child);
4273
4314
  }
4274
4315
  }
4275
4316
  // #1126 if a transition children list contains multiple sub fragments, these
@@ -5327,6 +5368,10 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
5327
5368
  const propsToUpdate = instance.vnode.dynamicProps;
5328
5369
  for (let i = 0; i < propsToUpdate.length; i++) {
5329
5370
  let key = propsToUpdate[i];
5371
+ // skip if the prop key is a declared emit event listener
5372
+ if (isEmitListener(instance.emitsOptions, key)) {
5373
+ continue;
5374
+ }
5330
5375
  // PROPS flag guarantees rawProps to be non-null
5331
5376
  const value = rawProps[key];
5332
5377
  if (options) {
@@ -5912,7 +5957,8 @@ function withDirectives(vnode, directives) {
5912
5957
  warn$1(`withDirectives can only be used inside render functions.`);
5913
5958
  return vnode;
5914
5959
  }
5915
- const instance = internalInstance.proxy;
5960
+ const instance = getExposeProxy(internalInstance) ||
5961
+ internalInstance.proxy;
5916
5962
  const bindings = vnode.dirs || (vnode.dirs = []);
5917
5963
  for (let i = 0; i < directives.length; i++) {
5918
5964
  let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
@@ -6032,7 +6078,7 @@ function createCompatVue(createApp, createSingletonApp) {
6032
6078
  return vm;
6033
6079
  }
6034
6080
  }
6035
- Vue.version = `2.6.14-compat:${"3.2.30"}`;
6081
+ Vue.version = `2.6.14-compat:${"3.2.33"}`;
6036
6082
  Vue.config = singletonApp.config;
6037
6083
  Vue.use = (p, ...options) => {
6038
6084
  if (p && isFunction(p.install)) {
@@ -6459,6 +6505,9 @@ function createAppContext() {
6459
6505
  let uid = 0;
6460
6506
  function createAppAPI(render, hydrate) {
6461
6507
  return function createApp(rootComponent, rootProps = null) {
6508
+ if (!isFunction(rootComponent)) {
6509
+ rootComponent = Object.assign({}, rootComponent);
6510
+ }
6462
6511
  if (rootProps != null && !isObject(rootProps)) {
6463
6512
  warn$1(`root props passed to app.mount() must be an object.`);
6464
6513
  rootProps = null;
@@ -6658,6 +6707,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
6658
6707
  if (!isArray(existing)) {
6659
6708
  if (_isString) {
6660
6709
  refs[ref] = [refValue];
6710
+ if (hasOwn(setupState, ref)) {
6711
+ setupState[ref] = refs[ref];
6712
+ }
6661
6713
  }
6662
6714
  else {
6663
6715
  ref.value = [refValue];
@@ -6856,7 +6908,8 @@ function createHydrationFunctions(rendererInternals) {
6856
6908
  // e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
6857
6909
  const forcePatchValue = (type === 'input' && dirs) || type === 'option';
6858
6910
  // skip props & children if this is hoisted static nodes
6859
- if (forcePatchValue || patchFlag !== -1 /* HOISTED */) {
6911
+ // #5405 in dev, always hydrate children for HMR
6912
+ {
6860
6913
  if (dirs) {
6861
6914
  invokeDirectiveHook(vnode, null, parentComponent, 'created');
6862
6915
  }
@@ -7029,7 +7082,7 @@ function startMeasure(instance, type) {
7029
7082
  perf.mark(`vue-${type}-${instance.uid}`);
7030
7083
  }
7031
7084
  {
7032
- devtoolsPerfStart(instance, type, supported ? perf.now() : Date.now());
7085
+ devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
7033
7086
  }
7034
7087
  }
7035
7088
  function endMeasure(instance, type) {
@@ -7042,7 +7095,7 @@ function endMeasure(instance, type) {
7042
7095
  perf.clearMarks(endTag);
7043
7096
  }
7044
7097
  {
7045
- devtoolsPerfEnd(instance, type, supported ? perf.now() : Date.now());
7098
+ devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
7046
7099
  }
7047
7100
  }
7048
7101
  function isSupported() {
@@ -8189,7 +8242,22 @@ function baseCreateRenderer(options, createHydrationFns) {
8189
8242
  const remove = vnode => {
8190
8243
  const { type, el, anchor, transition } = vnode;
8191
8244
  if (type === Fragment) {
8192
- removeFragment(el, anchor);
8245
+ if (vnode.patchFlag > 0 &&
8246
+ vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ &&
8247
+ transition &&
8248
+ !transition.persisted) {
8249
+ vnode.children.forEach(child => {
8250
+ if (child.type === Comment) {
8251
+ hostRemove(child.el);
8252
+ }
8253
+ else {
8254
+ remove(child);
8255
+ }
8256
+ });
8257
+ }
8258
+ else {
8259
+ removeFragment(el, anchor);
8260
+ }
8193
8261
  return;
8194
8262
  }
8195
8263
  if (type === Static) {
@@ -9582,7 +9650,10 @@ function renderSlot(slots, name, props = {},
9582
9650
  // this is not a user-facing function, so the fallback is always generated by
9583
9651
  // the compiler and guaranteed to be a function returning an array
9584
9652
  fallback, noSlotted) {
9585
- if (currentRenderingInstance.isCE) {
9653
+ if (currentRenderingInstance.isCE ||
9654
+ (currentRenderingInstance.parent &&
9655
+ isAsyncWrapper(currentRenderingInstance.parent) &&
9656
+ currentRenderingInstance.parent.isCE)) {
9586
9657
  return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
9587
9658
  }
9588
9659
  let slot = slots[name];
@@ -9872,7 +9943,10 @@ const getPublicInstance = (i) => {
9872
9943
  return getExposeProxy(i) || i.proxy;
9873
9944
  return getPublicInstance(i.parent);
9874
9945
  };
9875
- const publicPropertiesMap = extend(Object.create(null), {
9946
+ const publicPropertiesMap =
9947
+ // Move PURE marker to new line to workaround compiler discarding it
9948
+ // due to type annotation
9949
+ /*#__PURE__*/ extend(Object.create(null), {
9876
9950
  $: i => i,
9877
9951
  $el: i => i.vnode.el,
9878
9952
  $data: i => i.data,
@@ -9985,7 +10059,9 @@ const PublicInstanceProxyHandlers = {
9985
10059
  }
9986
10060
  else {
9987
10061
  const val = globalProperties[key];
9988
- return isFunction(val) ? val.bind(instance.proxy) : val;
10062
+ return isFunction(val)
10063
+ ? Object.assign(val.bind(instance.proxy), val)
10064
+ : val;
9989
10065
  }
9990
10066
  }
9991
10067
  }
@@ -10010,9 +10086,11 @@ const PublicInstanceProxyHandlers = {
10010
10086
  const { data, setupState, ctx } = instance;
10011
10087
  if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
10012
10088
  setupState[key] = value;
10089
+ return true;
10013
10090
  }
10014
10091
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
10015
10092
  data[key] = value;
10093
+ return true;
10016
10094
  }
10017
10095
  else if (hasOwn(instance.props, key)) {
10018
10096
  warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
@@ -10046,6 +10124,16 @@ const PublicInstanceProxyHandlers = {
10046
10124
  hasOwn(ctx, key) ||
10047
10125
  hasOwn(publicPropertiesMap, key) ||
10048
10126
  hasOwn(appContext.config.globalProperties, key));
10127
+ },
10128
+ defineProperty(target, key, descriptor) {
10129
+ if (descriptor.get != null) {
10130
+ // invalidate key cache of a getter based property #5417
10131
+ target._.accessCache[key] = 0;
10132
+ }
10133
+ else if (hasOwn(descriptor, 'value')) {
10134
+ this.set(target, key, descriptor.value, null);
10135
+ }
10136
+ return Reflect.defineProperty(target, key, descriptor);
10049
10137
  }
10050
10138
  };
10051
10139
  {
@@ -10248,6 +10336,7 @@ function setupComponent(instance, isSSR = false) {
10248
10336
  return setupResult;
10249
10337
  }
10250
10338
  function setupStatefulComponent(instance, isSSR) {
10339
+ var _a;
10251
10340
  const Component = instance.type;
10252
10341
  {
10253
10342
  if (Component.name) {
@@ -10305,6 +10394,13 @@ function setupStatefulComponent(instance, isSSR) {
10305
10394
  // async setup returned Promise.
10306
10395
  // bail here and wait for re-entry.
10307
10396
  instance.asyncDep = setupResult;
10397
+ if (!instance.suspense) {
10398
+ const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
10399
+ warn$1(`Component <${name}>: setup function returned a promise, but no ` +
10400
+ `<Suspense> boundary was found in the parent component tree. ` +
10401
+ `A component with async setup() must be nested in a <Suspense> ` +
10402
+ `in order to be rendered.`);
10403
+ }
10308
10404
  }
10309
10405
  }
10310
10406
  else {
@@ -10936,7 +11032,7 @@ function isMemoSame(cached, memo) {
10936
11032
  }
10937
11033
 
10938
11034
  // Core API ------------------------------------------------------------------
10939
- const version = "3.2.30";
11035
+ const version = "3.2.33";
10940
11036
  /**
10941
11037
  * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
10942
11038
  * @internal
@@ -10960,7 +11056,7 @@ const compatUtils = (_compatUtils );
10960
11056
 
10961
11057
  const svgNS = 'http://www.w3.org/2000/svg';
10962
11058
  const doc = (typeof document !== 'undefined' ? document : null);
10963
- const templateContainer = doc && doc.createElement('template');
11059
+ const templateContainer = doc && /*#__PURE__*/ doc.createElement('template');
10964
11060
  const nodeOps = {
10965
11061
  insert: (child, parent, anchor) => {
10966
11062
  parent.insertBefore(child, anchor || null);
@@ -11111,6 +11207,8 @@ function setStyle(style, name, val) {
11111
11207
  val.forEach(v => setStyle(style, name, v));
11112
11208
  }
11113
11209
  else {
11210
+ if (val == null)
11211
+ val = '';
11114
11212
  if (name.startsWith('--')) {
11115
11213
  // custom property definition
11116
11214
  style.setProperty(name, val);
@@ -11232,41 +11330,39 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
11232
11330
  }
11233
11331
  return;
11234
11332
  }
11333
+ let needRemove = false;
11235
11334
  if (value === '' || value == null) {
11236
11335
  const type = typeof el[key];
11237
11336
  if (type === 'boolean') {
11238
11337
  // e.g. <select multiple> compiles to { multiple: '' }
11239
- el[key] = includeBooleanAttr(value);
11240
- return;
11338
+ value = includeBooleanAttr(value);
11241
11339
  }
11242
11340
  else if (value == null && type === 'string') {
11243
11341
  // e.g. <div :id="null">
11244
- el[key] = '';
11245
- el.removeAttribute(key);
11246
- return;
11342
+ value = '';
11343
+ needRemove = true;
11247
11344
  }
11248
11345
  else if (type === 'number') {
11249
11346
  // e.g. <img :width="null">
11250
11347
  // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
11251
- try {
11252
- el[key] = 0;
11253
- }
11254
- catch (_a) { }
11255
- el.removeAttribute(key);
11256
- return;
11348
+ value = 0;
11349
+ needRemove = true;
11257
11350
  }
11258
11351
  }
11259
- if (value === false &&
11260
- compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent)) {
11261
- const type = typeof el[key];
11262
- if (type === 'string' || type === 'number') {
11263
- compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent, key);
11264
- el[key] = type === 'number' ? 0 : '';
11265
- el.removeAttribute(key);
11266
- return;
11352
+ else {
11353
+ if (value === false &&
11354
+ compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent)) {
11355
+ const type = typeof el[key];
11356
+ if (type === 'string' || type === 'number') {
11357
+ compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent, key);
11358
+ value = type === 'number' ? 0 : '';
11359
+ needRemove = true;
11360
+ }
11267
11361
  }
11268
11362
  }
11269
- // some properties perform value validation and throw
11363
+ // some properties perform value validation and throw,
11364
+ // some properties has getter, no setter, will error in 'use strict'
11365
+ // eg. <select :type="null"></select> <select :willValidate="null"></select>
11270
11366
  try {
11271
11367
  el[key] = value;
11272
11368
  }
@@ -11276,31 +11372,35 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
11276
11372
  `value ${value} is invalid.`, e);
11277
11373
  }
11278
11374
  }
11375
+ needRemove && el.removeAttribute(key);
11279
11376
  }
11280
11377
 
11281
11378
  // Async edge case fix requires storing an event listener's attach timestamp.
11282
- let _getNow = Date.now;
11283
- let skipTimestampCheck = false;
11284
- if (typeof window !== 'undefined') {
11285
- // Determine what event timestamp the browser is using. Annoyingly, the
11286
- // timestamp can either be hi-res (relative to page load) or low-res
11287
- // (relative to UNIX epoch), so in order to compare time we have to use the
11288
- // same timestamp type when saving the flush timestamp.
11289
- if (_getNow() > document.createEvent('Event').timeStamp) {
11290
- // if the low-res timestamp which is bigger than the event timestamp
11291
- // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
11292
- // and we need to use the hi-res version for event listeners as well.
11293
- _getNow = () => performance.now();
11294
- }
11295
- // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
11296
- // and does not fire microtasks in between event propagation, so safe to exclude.
11297
- const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
11298
- skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
11299
- }
11379
+ const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
11380
+ let _getNow = Date.now;
11381
+ let skipTimestampCheck = false;
11382
+ if (typeof window !== 'undefined') {
11383
+ // Determine what event timestamp the browser is using. Annoyingly, the
11384
+ // timestamp can either be hi-res (relative to page load) or low-res
11385
+ // (relative to UNIX epoch), so in order to compare time we have to use the
11386
+ // same timestamp type when saving the flush timestamp.
11387
+ if (Date.now() > document.createEvent('Event').timeStamp) {
11388
+ // if the low-res timestamp which is bigger than the event timestamp
11389
+ // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
11390
+ // and we need to use the hi-res version for event listeners as well.
11391
+ _getNow = () => performance.now();
11392
+ }
11393
+ // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
11394
+ // and does not fire microtasks in between event propagation, so safe to exclude.
11395
+ const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
11396
+ skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
11397
+ }
11398
+ return [_getNow, skipTimestampCheck];
11399
+ })();
11300
11400
  // To avoid the overhead of repeatedly calling performance.now(), we cache
11301
11401
  // and use the same timestamp for all event listeners attached in the same tick.
11302
11402
  let cachedNow = 0;
11303
- const p = Promise.resolve();
11403
+ const p = /*#__PURE__*/ Promise.resolve();
11304
11404
  const reset = () => {
11305
11405
  cachedNow = 0;
11306
11406
  };
@@ -11425,13 +11525,13 @@ function shouldSetAsProp(el, key, value, isSVG) {
11425
11525
  }
11426
11526
  return false;
11427
11527
  }
11428
- // spellcheck and draggable are numerated attrs, however their
11429
- // corresponding DOM properties are actually booleans - this leads to
11430
- // setting it with a string "false" value leading it to be coerced to
11431
- // `true`, so we need to always treat them as attributes.
11528
+ // these are enumerated attrs, however their corresponding DOM properties
11529
+ // are actually booleans - this leads to setting it with a string "false"
11530
+ // value leading it to be coerced to `true`, so we need to always treat
11531
+ // them as attributes.
11432
11532
  // Note that `contentEditable` doesn't have this problem: its DOM
11433
11533
  // property is also enumerated string values.
11434
- if (key === 'spellcheck' || key === 'draggable') {
11534
+ if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
11435
11535
  return false;
11436
11536
  }
11437
11537
  // #1787, #2840 form property on form elements is readonly and must be set as
@@ -12573,7 +12673,7 @@ function setDisplay(el, value) {
12573
12673
  el.style.display = value ? el._vod : 'none';
12574
12674
  }
12575
12675
 
12576
- const rendererOptions = extend({ patchProp }, nodeOps);
12676
+ const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps);
12577
12677
  // lazy create the renderer - this makes core renderer logic tree-shakable
12578
12678
  // in case the user only imports reactivity utilities from Vue.
12579
12679
  let renderer;