@vue/compat 3.5.0-beta.1 → 3.5.0-beta.3

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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.0-beta.1
2
+ * @vue/compat v3.5.0-beta.3
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7,7 +7,7 @@
7
7
 
8
8
  var parser = require('@babel/parser');
9
9
  var estreeWalker = require('estree-walker');
10
- var decode_js = require('entities/dist/decode.js');
10
+ var decode_js = require('entities/lib/decode.js');
11
11
  var sourceMapJs = require('source-map-js');
12
12
 
13
13
  /*! #__NO_SIDE_EFFECTS__ */
@@ -583,11 +583,11 @@ class ReactiveEffect {
583
583
  }
584
584
  }
585
585
  pause() {
586
- this.flags |= 128;
586
+ this.flags |= 64;
587
587
  }
588
588
  resume() {
589
- if (this.flags & 128) {
590
- this.flags &= ~128;
589
+ if (this.flags & 64) {
590
+ this.flags &= ~64;
591
591
  if (pausedQueueEffects.has(this)) {
592
592
  pausedQueueEffects.delete(this);
593
593
  this.trigger();
@@ -601,9 +601,6 @@ class ReactiveEffect {
601
601
  if (this.flags & 2 && !(this.flags & 32)) {
602
602
  return;
603
603
  }
604
- if (this.flags & 64) {
605
- return this.trigger();
606
- }
607
604
  if (!(this.flags & 8)) {
608
605
  this.flags |= 8;
609
606
  this.nextEffect = batchedEffect;
@@ -647,7 +644,7 @@ class ReactiveEffect {
647
644
  }
648
645
  }
649
646
  trigger() {
650
- if (this.flags & 128) {
647
+ if (this.flags & 64) {
651
648
  pausedQueueEffects.add(this);
652
649
  } else if (this.scheduler) {
653
650
  this.scheduler();
@@ -677,6 +674,7 @@ function endBatch() {
677
674
  batchDepth--;
678
675
  return;
679
676
  }
677
+ batchDepth--;
680
678
  let error;
681
679
  while (batchedEffect) {
682
680
  let e = batchedEffect;
@@ -695,7 +693,6 @@ function endBatch() {
695
693
  e = next;
696
694
  }
697
695
  }
698
- batchDepth--;
699
696
  if (error) throw error;
700
697
  }
701
698
  function prepareDeps(sub) {
@@ -1098,26 +1095,26 @@ const arrayInstrumentations = {
1098
1095
  });
1099
1096
  },
1100
1097
  every(fn, thisArg) {
1101
- return apply(this, "every", fn, thisArg);
1098
+ return apply(this, "every", fn, thisArg, void 0, arguments);
1102
1099
  },
1103
1100
  filter(fn, thisArg) {
1104
- return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive));
1101
+ return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
1105
1102
  },
1106
1103
  find(fn, thisArg) {
1107
- return apply(this, "find", fn, thisArg, toReactive);
1104
+ return apply(this, "find", fn, thisArg, toReactive, arguments);
1108
1105
  },
1109
1106
  findIndex(fn, thisArg) {
1110
- return apply(this, "findIndex", fn, thisArg);
1107
+ return apply(this, "findIndex", fn, thisArg, void 0, arguments);
1111
1108
  },
1112
1109
  findLast(fn, thisArg) {
1113
- return apply(this, "findLast", fn, thisArg, toReactive);
1110
+ return apply(this, "findLast", fn, thisArg, toReactive, arguments);
1114
1111
  },
1115
1112
  findLastIndex(fn, thisArg) {
1116
- return apply(this, "findLastIndex", fn, thisArg);
1113
+ return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
1117
1114
  },
1118
1115
  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
1119
1116
  forEach(fn, thisArg) {
1120
- return apply(this, "forEach", fn, thisArg);
1117
+ return apply(this, "forEach", fn, thisArg, void 0, arguments);
1121
1118
  },
1122
1119
  includes(...args) {
1123
1120
  return searchProxy(this, "includes", args);
@@ -1133,7 +1130,7 @@ const arrayInstrumentations = {
1133
1130
  return searchProxy(this, "lastIndexOf", args);
1134
1131
  },
1135
1132
  map(fn, thisArg) {
1136
- return apply(this, "map", fn, thisArg);
1133
+ return apply(this, "map", fn, thisArg, void 0, arguments);
1137
1134
  },
1138
1135
  pop() {
1139
1136
  return noTracking(this, "pop");
@@ -1152,7 +1149,7 @@ const arrayInstrumentations = {
1152
1149
  },
1153
1150
  // slice could use ARRAY_ITERATE but also seems to beg for range tracking
1154
1151
  some(fn, thisArg) {
1155
- return apply(this, "some", fn, thisArg);
1152
+ return apply(this, "some", fn, thisArg, void 0, arguments);
1156
1153
  },
1157
1154
  splice(...args) {
1158
1155
  return noTracking(this, "splice", args);
@@ -1188,12 +1185,17 @@ function iterator(self, method, wrapValue) {
1188
1185
  }
1189
1186
  return iter;
1190
1187
  }
1191
- function apply(self, method, fn, thisArg, wrappedRetFn) {
1188
+ const arrayProto = Array.prototype;
1189
+ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1192
1190
  const arr = shallowReadArray(self);
1193
- let needsWrap = false;
1191
+ const needsWrap = arr !== self && !isShallow(self);
1192
+ const methodFn = arr[method];
1193
+ if (methodFn !== arrayProto[method]) {
1194
+ const result2 = methodFn.apply(arr, args);
1195
+ return needsWrap ? toReactive(result2) : result2;
1196
+ }
1194
1197
  let wrappedFn = fn;
1195
1198
  if (arr !== self) {
1196
- needsWrap = !isShallow(self);
1197
1199
  if (needsWrap) {
1198
1200
  wrappedFn = function(item, index) {
1199
1201
  return fn.call(this, toReactive(item), index, self);
@@ -1204,7 +1206,7 @@ function apply(self, method, fn, thisArg, wrappedRetFn) {
1204
1206
  };
1205
1207
  }
1206
1208
  }
1207
- const result = arr[method](wrappedFn, thisArg);
1209
+ const result = methodFn.call(arr, wrappedFn, thisArg);
1208
1210
  return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
1209
1211
  }
1210
1212
  function reduce(self, method, fn, args) {
@@ -2055,6 +2057,220 @@ const TriggerOpTypes = {
2055
2057
  "CLEAR": "clear"
2056
2058
  };
2057
2059
 
2060
+ const INITIAL_WATCHER_VALUE = {};
2061
+ const cleanupMap = /* @__PURE__ */ new WeakMap();
2062
+ let activeWatcher = void 0;
2063
+ function getCurrentWatcher() {
2064
+ return activeWatcher;
2065
+ }
2066
+ function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
2067
+ if (owner) {
2068
+ let cleanups = cleanupMap.get(owner);
2069
+ if (!cleanups) cleanupMap.set(owner, cleanups = []);
2070
+ cleanups.push(cleanupFn);
2071
+ } else if (!failSilently) {
2072
+ warn$2(
2073
+ `onWatcherCleanup() was called when there was no active watcher to associate with.`
2074
+ );
2075
+ }
2076
+ }
2077
+ function watch$1(source, cb, options = EMPTY_OBJ) {
2078
+ const { immediate, deep, once, scheduler, augmentJob, call } = options;
2079
+ const warnInvalidSource = (s) => {
2080
+ (options.onWarn || warn$2)(
2081
+ `Invalid watch source: `,
2082
+ s,
2083
+ `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
2084
+ );
2085
+ };
2086
+ const reactiveGetter = (source2) => {
2087
+ if (deep) return source2;
2088
+ if (isShallow(source2) || deep === false || deep === 0)
2089
+ return traverse(source2, 1);
2090
+ return traverse(source2);
2091
+ };
2092
+ let effect;
2093
+ let getter;
2094
+ let cleanup;
2095
+ let boundCleanup;
2096
+ let forceTrigger = false;
2097
+ let isMultiSource = false;
2098
+ if (isRef(source)) {
2099
+ getter = () => source.value;
2100
+ forceTrigger = isShallow(source);
2101
+ } else if (isReactive(source)) {
2102
+ getter = () => reactiveGetter(source);
2103
+ forceTrigger = true;
2104
+ } else if (isArray(source)) {
2105
+ isMultiSource = true;
2106
+ forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
2107
+ getter = () => source.map((s) => {
2108
+ if (isRef(s)) {
2109
+ return s.value;
2110
+ } else if (isReactive(s)) {
2111
+ return reactiveGetter(s);
2112
+ } else if (isFunction(s)) {
2113
+ return call ? call(s, 2) : s();
2114
+ } else {
2115
+ warnInvalidSource(s);
2116
+ }
2117
+ });
2118
+ } else if (isFunction(source)) {
2119
+ if (cb) {
2120
+ getter = call ? () => call(source, 2) : source;
2121
+ } else {
2122
+ getter = () => {
2123
+ if (cleanup) {
2124
+ pauseTracking();
2125
+ try {
2126
+ cleanup();
2127
+ } finally {
2128
+ resetTracking();
2129
+ }
2130
+ }
2131
+ const currentEffect = activeWatcher;
2132
+ activeWatcher = effect;
2133
+ try {
2134
+ return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
2135
+ } finally {
2136
+ activeWatcher = currentEffect;
2137
+ }
2138
+ };
2139
+ }
2140
+ } else {
2141
+ getter = NOOP;
2142
+ warnInvalidSource(source);
2143
+ }
2144
+ if (cb && deep) {
2145
+ const baseGetter = getter;
2146
+ const depth = deep === true ? Infinity : deep;
2147
+ getter = () => traverse(baseGetter(), depth);
2148
+ }
2149
+ if (once) {
2150
+ if (cb) {
2151
+ const _cb = cb;
2152
+ cb = (...args) => {
2153
+ _cb(...args);
2154
+ effect.stop();
2155
+ };
2156
+ } else {
2157
+ const _getter = getter;
2158
+ getter = () => {
2159
+ _getter();
2160
+ effect.stop();
2161
+ };
2162
+ }
2163
+ }
2164
+ let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
2165
+ const job = (immediateFirstRun) => {
2166
+ if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {
2167
+ return;
2168
+ }
2169
+ if (cb) {
2170
+ const newValue = effect.run();
2171
+ if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2172
+ if (cleanup) {
2173
+ cleanup();
2174
+ }
2175
+ const currentWatcher = activeWatcher;
2176
+ activeWatcher = effect;
2177
+ try {
2178
+ const args = [
2179
+ newValue,
2180
+ // pass undefined as the old value when it's changed for the first time
2181
+ oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
2182
+ boundCleanup
2183
+ ];
2184
+ call ? call(cb, 3, args) : (
2185
+ // @ts-expect-error
2186
+ cb(...args)
2187
+ );
2188
+ oldValue = newValue;
2189
+ } finally {
2190
+ activeWatcher = currentWatcher;
2191
+ }
2192
+ }
2193
+ } else {
2194
+ effect.run();
2195
+ }
2196
+ };
2197
+ if (augmentJob) {
2198
+ augmentJob(job);
2199
+ }
2200
+ effect = new ReactiveEffect(getter);
2201
+ effect.scheduler = scheduler ? () => scheduler(job, false) : job;
2202
+ boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);
2203
+ cleanup = effect.onStop = () => {
2204
+ const cleanups = cleanupMap.get(effect);
2205
+ if (cleanups) {
2206
+ if (call) {
2207
+ call(cleanups, 4);
2208
+ } else {
2209
+ for (const cleanup2 of cleanups) cleanup2();
2210
+ }
2211
+ cleanupMap.delete(effect);
2212
+ }
2213
+ };
2214
+ {
2215
+ effect.onTrack = options.onTrack;
2216
+ effect.onTrigger = options.onTrigger;
2217
+ }
2218
+ if (cb) {
2219
+ if (immediate) {
2220
+ job(true);
2221
+ } else {
2222
+ oldValue = effect.run();
2223
+ }
2224
+ } else if (scheduler) {
2225
+ scheduler(job.bind(null, true), true);
2226
+ } else {
2227
+ effect.run();
2228
+ }
2229
+ const scope = getCurrentScope();
2230
+ const watchHandle = () => {
2231
+ effect.stop();
2232
+ if (scope) {
2233
+ remove(scope.effects, effect);
2234
+ }
2235
+ };
2236
+ watchHandle.pause = effect.pause.bind(effect);
2237
+ watchHandle.resume = effect.resume.bind(effect);
2238
+ watchHandle.stop = watchHandle;
2239
+ return watchHandle;
2240
+ }
2241
+ function traverse(value, depth = Infinity, seen) {
2242
+ if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
2243
+ return value;
2244
+ }
2245
+ seen = seen || /* @__PURE__ */ new Set();
2246
+ if (seen.has(value)) {
2247
+ return value;
2248
+ }
2249
+ seen.add(value);
2250
+ depth--;
2251
+ if (isRef(value)) {
2252
+ traverse(value.value, depth, seen);
2253
+ } else if (isArray(value)) {
2254
+ for (let i = 0; i < value.length; i++) {
2255
+ traverse(value[i], depth, seen);
2256
+ }
2257
+ } else if (isSet(value) || isMap(value)) {
2258
+ value.forEach((v) => {
2259
+ traverse(v, depth, seen);
2260
+ });
2261
+ } else if (isPlainObject(value)) {
2262
+ for (const key in value) {
2263
+ traverse(value[key], depth, seen);
2264
+ }
2265
+ for (const key of Object.getOwnPropertySymbols(value)) {
2266
+ if (Object.prototype.propertyIsEnumerable.call(value, key)) {
2267
+ traverse(value[key], depth, seen);
2268
+ }
2269
+ }
2270
+ }
2271
+ return value;
2272
+ }
2273
+
2058
2274
  const stack$1 = [];
2059
2275
  function pushWarningContext(vnode) {
2060
2276
  stack$1.push(vnode);
@@ -2182,12 +2398,6 @@ const ErrorCodes = {
2182
2398
  "0": "SETUP_FUNCTION",
2183
2399
  "RENDER_FUNCTION": 1,
2184
2400
  "1": "RENDER_FUNCTION",
2185
- "WATCH_GETTER": 2,
2186
- "2": "WATCH_GETTER",
2187
- "WATCH_CALLBACK": 3,
2188
- "3": "WATCH_CALLBACK",
2189
- "WATCH_CLEANUP": 4,
2190
- "4": "WATCH_CLEANUP",
2191
2401
  "NATIVE_EVENT_HANDLER": 5,
2192
2402
  "5": "NATIVE_EVENT_HANDLER",
2193
2403
  "COMPONENT_EVENT_HANDLER": 6,
@@ -2339,7 +2549,7 @@ function nextTick(fn) {
2339
2549
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
2340
2550
  }
2341
2551
  function findInsertionIndex(id) {
2342
- let start = flushIndex + 1;
2552
+ let start = isFlushing ? flushIndex + 1 : 0;
2343
2553
  let end = queue.length;
2344
2554
  while (start < end) {
2345
2555
  const middle = start + end >>> 1;
@@ -2355,15 +2565,13 @@ function findInsertionIndex(id) {
2355
2565
  }
2356
2566
  function queueJob(job) {
2357
2567
  if (!(job.flags & 1)) {
2358
- if (job.id == null) {
2359
- queue.push(job);
2360
- } else if (
2361
- // fast path when the job id is larger than the tail
2362
- !(job.flags & 2) && job.id >= (queue[queue.length - 1] && queue[queue.length - 1].id || 0)
2363
- ) {
2568
+ const jobId = getId(job);
2569
+ const lastJob = queue[queue.length - 1];
2570
+ if (!lastJob || // fast path when the job id is larger than the tail
2571
+ !(job.flags & 2) && jobId >= getId(lastJob)) {
2364
2572
  queue.push(job);
2365
2573
  } else {
2366
- queue.splice(findInsertionIndex(job.id), 0, job);
2574
+ queue.splice(findInsertionIndex(jobId), 0, job);
2367
2575
  }
2368
2576
  if (!(job.flags & 4)) {
2369
2577
  job.flags |= 1;
@@ -2377,12 +2585,6 @@ function queueFlush() {
2377
2585
  currentFlushPromise = resolvedPromise.then(flushJobs);
2378
2586
  }
2379
2587
  }
2380
- function invalidateJob(job) {
2381
- const i = queue.indexOf(job);
2382
- if (i > flushIndex) {
2383
- queue.splice(i, 1);
2384
- }
2385
- }
2386
2588
  function queuePostFlushCb(cb) {
2387
2589
  if (!isArray(cb)) {
2388
2590
  if (activePostFlushCbs && cb.id === -1) {
@@ -2444,24 +2646,13 @@ function flushPostFlushCbs(seen) {
2444
2646
  postFlushIndex = 0;
2445
2647
  }
2446
2648
  }
2447
- const getId = (job) => job.id == null ? Infinity : job.id;
2448
- const comparator = (a, b) => {
2449
- const diff = getId(a) - getId(b);
2450
- if (diff === 0) {
2451
- const isAPre = a.flags & 2;
2452
- const isBPre = b.flags & 2;
2453
- if (isAPre && !isBPre) return -1;
2454
- if (isBPre && !isAPre) return 1;
2455
- }
2456
- return diff;
2457
- };
2649
+ const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2458
2650
  function flushJobs(seen) {
2459
2651
  isFlushPending = false;
2460
2652
  isFlushing = true;
2461
2653
  {
2462
2654
  seen = seen || /* @__PURE__ */ new Map();
2463
2655
  }
2464
- queue.sort(comparator);
2465
2656
  const check = (job) => checkRecursiveUpdates(seen, job) ;
2466
2657
  try {
2467
2658
  for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
@@ -3102,7 +3293,7 @@ function on(instance, event, fn) {
3102
3293
  function once(instance, event, fn) {
3103
3294
  const wrapped = (...args) => {
3104
3295
  off(instance, event, wrapped);
3105
- fn.call(instance.proxy, ...args);
3296
+ fn.apply(instance.proxy, args);
3106
3297
  };
3107
3298
  wrapped.fn = fn;
3108
3299
  on(instance, event, wrapped);
@@ -4140,6 +4331,7 @@ const logMismatchError = () => {
4140
4331
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
4141
4332
  const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
4142
4333
  const getContainerType = (container) => {
4334
+ if (container.nodeType !== 1) return void 0;
4143
4335
  if (isSVGContainer(container)) return "svg";
4144
4336
  if (isMathMLContainer(container)) return "mathml";
4145
4337
  return void 0;
@@ -5068,7 +5260,7 @@ const KeepAliveImpl = {
5068
5260
  function pruneCache(filter) {
5069
5261
  cache.forEach((vnode, key) => {
5070
5262
  const name = getComponentName(vnode.type);
5071
- if (name && (!filter || !filter(name))) {
5263
+ if (name && !filter(name)) {
5072
5264
  pruneCacheEntry(key);
5073
5265
  }
5074
5266
  });
@@ -5190,6 +5382,7 @@ function matches(pattern, name) {
5190
5382
  } else if (isString(pattern)) {
5191
5383
  return pattern.split(",").includes(name);
5192
5384
  } else if (isRegExp(pattern)) {
5385
+ pattern.lastIndex = 0;
5193
5386
  return pattern.test(name);
5194
5387
  }
5195
5388
  return false;
@@ -6634,23 +6827,43 @@ function callHook$1(hook, instance, type) {
6634
6827
  );
6635
6828
  }
6636
6829
  function createWatcher(raw, ctx, publicThis, key) {
6637
- const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
6830
+ let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
6831
+ const options = {};
6832
+ {
6833
+ const instance = currentInstance && getCurrentScope() === currentInstance.scope ? currentInstance : null;
6834
+ const newValue = getter();
6835
+ if (isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
6836
+ options.deep = true;
6837
+ }
6838
+ const baseGetter = getter;
6839
+ getter = () => {
6840
+ const val = baseGetter();
6841
+ if (isArray(val) && checkCompatEnabled$1("WATCH_ARRAY", instance)) {
6842
+ traverse(val);
6843
+ }
6844
+ return val;
6845
+ };
6846
+ }
6638
6847
  if (isString(raw)) {
6639
6848
  const handler = ctx[raw];
6640
6849
  if (isFunction(handler)) {
6641
- watch(getter, handler);
6850
+ {
6851
+ watch(getter, handler, options);
6852
+ }
6642
6853
  } else {
6643
6854
  warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
6644
6855
  }
6645
6856
  } else if (isFunction(raw)) {
6646
- watch(getter, raw.bind(publicThis));
6857
+ {
6858
+ watch(getter, raw.bind(publicThis), options);
6859
+ }
6647
6860
  } else if (isObject(raw)) {
6648
6861
  if (isArray(raw)) {
6649
6862
  raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
6650
6863
  } else {
6651
6864
  const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
6652
6865
  if (isFunction(handler)) {
6653
- watch(getter, handler, raw);
6866
+ watch(getter, handler, extend(raw, options) );
6654
6867
  } else {
6655
6868
  warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
6656
6869
  }
@@ -6874,7 +7087,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6874
7087
  return vm;
6875
7088
  }
6876
7089
  }
6877
- Vue.version = `2.6.14-compat:${"3.5.0-beta.1"}`;
7090
+ Vue.version = `2.6.14-compat:${"3.5.0-beta.3"}`;
6878
7091
  Vue.config = singletonApp.config;
6879
7092
  Vue.use = (plugin, ...options) => {
6880
7093
  if (plugin && isFunction(plugin.install)) {
@@ -7206,7 +7419,7 @@ function defineReactive(obj, key, val) {
7206
7419
  if (isArray(val)) {
7207
7420
  methodsToPatch.forEach((m) => {
7208
7421
  val[m] = (...args) => {
7209
- Array.prototype[m].call(reactiveVal, ...args);
7422
+ Array.prototype[m].apply(reactiveVal, args);
7210
7423
  };
7211
7424
  });
7212
7425
  } else {
@@ -8401,7 +8614,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8401
8614
  if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
8402
8615
  subTree = filterSingleRoot(subTree.children) || subTree;
8403
8616
  }
8404
- if (vnode === subTree) {
8617
+ if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
8405
8618
  const parentVNode = parentComponent.vnode;
8406
8619
  setScopeId(
8407
8620
  el,
@@ -8731,7 +8944,6 @@ function baseCreateRenderer(options, createHydrationFns) {
8731
8944
  return;
8732
8945
  } else {
8733
8946
  instance.next = n2;
8734
- invalidateJob(instance.update);
8735
8947
  instance.update();
8736
8948
  }
8737
8949
  } else {
@@ -9655,7 +9867,6 @@ function watchSyncEffect(effect, options) {
9655
9867
  extend({}, options, { flush: "sync" })
9656
9868
  );
9657
9869
  }
9658
- const INITIAL_WATCHER_VALUE = {};
9659
9870
  function watch(source, cb, options) {
9660
9871
  if (!isFunction(cb)) {
9661
9872
  warn$1(
@@ -9664,21 +9875,8 @@ function watch(source, cb, options) {
9664
9875
  }
9665
9876
  return doWatch(source, cb, options);
9666
9877
  }
9667
- function doWatch(source, cb, {
9668
- immediate,
9669
- deep,
9670
- flush,
9671
- once,
9672
- onTrack,
9673
- onTrigger
9674
- } = EMPTY_OBJ) {
9675
- if (cb && once) {
9676
- const _cb = cb;
9677
- cb = (...args) => {
9678
- _cb(...args);
9679
- watchHandle();
9680
- };
9681
- }
9878
+ function doWatch(source, cb, options = EMPTY_OBJ) {
9879
+ const { immediate, deep, flush, once } = options;
9682
9880
  if (!cb) {
9683
9881
  if (immediate !== void 0) {
9684
9882
  warn$1(
@@ -9696,174 +9894,53 @@ function doWatch(source, cb, {
9696
9894
  );
9697
9895
  }
9698
9896
  }
9699
- const warnInvalidSource = (s) => {
9700
- warn$1(
9701
- `Invalid watch source: `,
9702
- s,
9703
- `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
9704
- );
9705
- };
9706
- const instance = currentInstance;
9707
- const reactiveGetter = (source2) => {
9708
- if (deep) return source2;
9709
- if (isShallow(source2) || deep === false || deep === 0)
9710
- return traverse(source2, 1);
9711
- return traverse(source2);
9712
- };
9713
- let getter;
9714
- let forceTrigger = false;
9715
- let isMultiSource = false;
9716
- if (isRef(source)) {
9717
- getter = () => source.value;
9718
- forceTrigger = isShallow(source);
9719
- } else if (isReactive(source)) {
9720
- getter = () => reactiveGetter(source);
9721
- forceTrigger = true;
9722
- } else if (isArray(source)) {
9723
- isMultiSource = true;
9724
- forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
9725
- getter = () => source.map((s) => {
9726
- if (isRef(s)) {
9727
- return s.value;
9728
- } else if (isReactive(s)) {
9729
- return reactiveGetter(s);
9730
- } else if (isFunction(s)) {
9731
- return callWithErrorHandling(s, instance, 2);
9732
- } else {
9733
- warnInvalidSource(s);
9734
- }
9735
- });
9736
- } else if (isFunction(source)) {
9737
- if (cb) {
9738
- getter = () => callWithErrorHandling(source, instance, 2);
9739
- } else {
9740
- getter = () => {
9741
- if (cleanup) {
9742
- cleanup();
9743
- }
9744
- return callWithAsyncErrorHandling(
9745
- source,
9746
- instance,
9747
- 3,
9748
- [onCleanup]
9749
- );
9750
- };
9751
- }
9752
- } else {
9753
- getter = NOOP;
9754
- warnInvalidSource(source);
9755
- }
9756
- if (cb && !deep) {
9757
- const baseGetter = getter;
9758
- getter = () => {
9759
- const val = baseGetter();
9760
- if (isArray(val) && checkCompatEnabled$1("WATCH_ARRAY", instance)) {
9761
- traverse(val);
9762
- }
9763
- return val;
9764
- };
9765
- }
9766
- if (cb && deep) {
9767
- const baseGetter = getter;
9768
- const depth = deep === true ? Infinity : deep;
9769
- getter = () => traverse(baseGetter(), depth);
9770
- }
9771
- let cleanup;
9772
- let onCleanup = (fn) => {
9773
- cleanup = effect.onStop = () => {
9774
- callWithErrorHandling(fn, instance, 4);
9775
- cleanup = effect.onStop = void 0;
9776
- };
9777
- };
9897
+ const baseWatchOptions = extend({}, options);
9898
+ baseWatchOptions.onWarn = warn$1;
9778
9899
  let ssrCleanup;
9779
9900
  if (isInSSRComponentSetup) {
9780
- onCleanup = NOOP;
9781
- if (!cb) {
9782
- getter();
9783
- } else if (immediate) {
9784
- callWithAsyncErrorHandling(cb, instance, 3, [
9785
- getter(),
9786
- isMultiSource ? [] : void 0,
9787
- onCleanup
9788
- ]);
9789
- }
9790
9901
  if (flush === "sync") {
9791
9902
  const ctx = useSSRContext();
9792
9903
  ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
9904
+ } else if (!cb || immediate) {
9905
+ baseWatchOptions.once = true;
9793
9906
  } else {
9794
- const watchHandle2 = () => {
9907
+ return {
9908
+ stop: NOOP,
9909
+ resume: NOOP,
9910
+ pause: NOOP
9795
9911
  };
9796
- watchHandle2.stop = NOOP;
9797
- watchHandle2.resume = NOOP;
9798
- watchHandle2.pause = NOOP;
9799
- return watchHandle2;
9800
9912
  }
9801
9913
  }
9802
- let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
9803
- const job = (immediateFirstRun) => {
9804
- if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {
9805
- return;
9806
- }
9807
- if (cb) {
9808
- const newValue = effect.run();
9809
- if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
9810
- if (cleanup) {
9811
- cleanup();
9812
- }
9813
- callWithAsyncErrorHandling(cb, instance, 3, [
9814
- newValue,
9815
- // pass undefined as the old value when it's changed for the first time
9816
- oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
9817
- onCleanup
9818
- ]);
9819
- oldValue = newValue;
9914
+ const instance = currentInstance;
9915
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
9916
+ let isPre = false;
9917
+ if (flush === "post") {
9918
+ baseWatchOptions.scheduler = (job) => {
9919
+ queuePostRenderEffect(job, instance && instance.suspense);
9920
+ };
9921
+ } else if (flush !== "sync") {
9922
+ isPre = true;
9923
+ baseWatchOptions.scheduler = (job, isFirstRun) => {
9924
+ if (isFirstRun) {
9925
+ job();
9926
+ } else {
9927
+ queueJob(job);
9820
9928
  }
9821
- } else {
9822
- effect.run();
9823
- }
9824
- };
9825
- if (cb) job.flags |= 4;
9826
- const effect = new ReactiveEffect(getter);
9827
- let scheduler;
9828
- if (flush === "sync") {
9829
- effect.flags |= 64;
9830
- scheduler = job;
9831
- } else if (flush === "post") {
9832
- scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
9833
- } else {
9834
- job.flags |= 2;
9835
- if (instance) job.id = instance.uid;
9836
- scheduler = () => queueJob(job);
9929
+ };
9837
9930
  }
9838
- effect.scheduler = scheduler;
9839
- const scope = getCurrentScope();
9840
- const watchHandle = () => {
9841
- effect.stop();
9842
- if (scope) {
9843
- remove(scope.effects, effect);
9931
+ baseWatchOptions.augmentJob = (job) => {
9932
+ if (cb) {
9933
+ job.flags |= 4;
9844
9934
  }
9845
- };
9846
- watchHandle.pause = effect.pause.bind(effect);
9847
- watchHandle.resume = effect.resume.bind(effect);
9848
- watchHandle.stop = watchHandle;
9849
- {
9850
- effect.onTrack = onTrack;
9851
- effect.onTrigger = onTrigger;
9852
- }
9853
- if (cb) {
9854
- if (immediate) {
9855
- job(true);
9856
- } else {
9857
- oldValue = effect.run();
9935
+ if (isPre) {
9936
+ job.flags |= 2;
9937
+ if (instance) {
9938
+ job.id = instance.uid;
9939
+ job.i = instance;
9940
+ }
9858
9941
  }
9859
- } else if (flush === "post") {
9860
- queuePostRenderEffect(
9861
- effect.run.bind(effect),
9862
- instance && instance.suspense
9863
- );
9864
- } else {
9865
- effect.run();
9866
- }
9942
+ };
9943
+ const watchHandle = watch$1(source, cb, baseWatchOptions);
9867
9944
  if (ssrCleanup) ssrCleanup.push(watchHandle);
9868
9945
  return watchHandle;
9869
9946
  }
@@ -9892,38 +9969,6 @@ function createPathGetter(ctx, path) {
9892
9969
  return cur;
9893
9970
  };
9894
9971
  }
9895
- function traverse(value, depth = Infinity, seen) {
9896
- if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
9897
- return value;
9898
- }
9899
- seen = seen || /* @__PURE__ */ new Set();
9900
- if (seen.has(value)) {
9901
- return value;
9902
- }
9903
- seen.add(value);
9904
- depth--;
9905
- if (isRef(value)) {
9906
- traverse(value.value, depth, seen);
9907
- } else if (isArray(value)) {
9908
- for (let i = 0; i < value.length; i++) {
9909
- traverse(value[i], depth, seen);
9910
- }
9911
- } else if (isSet(value) || isMap(value)) {
9912
- value.forEach((v) => {
9913
- traverse(v, depth, seen);
9914
- });
9915
- } else if (isPlainObject(value)) {
9916
- for (const key in value) {
9917
- traverse(value[key], depth, seen);
9918
- }
9919
- for (const key of Object.getOwnPropertySymbols(value)) {
9920
- if (Object.prototype.propertyIsEnumerable.call(value, key)) {
9921
- traverse(value[key], depth, seen);
9922
- }
9923
- }
9924
- }
9925
- return value;
9926
- }
9927
9972
 
9928
9973
  function useModel(props, name, options = EMPTY_OBJ) {
9929
9974
  const i = getCurrentInstance();
@@ -12178,7 +12223,7 @@ function isMemoSame(cached, memo) {
12178
12223
  return true;
12179
12224
  }
12180
12225
 
12181
- const version = "3.5.0-beta.1";
12226
+ const version = "3.5.0-beta.3";
12182
12227
  const warn = warn$1 ;
12183
12228
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12184
12229
  const devtools = devtools$1 ;
@@ -13069,7 +13114,6 @@ class VueElement extends BaseClass {
13069
13114
  this._ob = null;
13070
13115
  if (this.shadowRoot && _createApp !== createApp) {
13071
13116
  this._root = this.shadowRoot;
13072
- this._mount(_def);
13073
13117
  } else {
13074
13118
  if (this.shadowRoot) {
13075
13119
  warn(
@@ -13082,9 +13126,9 @@ class VueElement extends BaseClass {
13082
13126
  } else {
13083
13127
  this._root = this;
13084
13128
  }
13085
- if (!this._def.__asyncLoader) {
13086
- this._resolveProps(this._def);
13087
- }
13129
+ }
13130
+ if (!this._def.__asyncLoader) {
13131
+ this._resolveProps(this._def);
13088
13132
  }
13089
13133
  }
13090
13134
  connectedCallback() {
@@ -13284,6 +13328,7 @@ class VueElement extends BaseClass {
13284
13328
  vnode.ce = (instance) => {
13285
13329
  this._instance = instance;
13286
13330
  instance.ce = this;
13331
+ instance.isCE = true;
13287
13332
  {
13288
13333
  instance.ceReload = (newStyles) => {
13289
13334
  if (this._styles) {
@@ -14154,6 +14199,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
14154
14199
  effectScope: effectScope,
14155
14200
  getCurrentInstance: getCurrentInstance,
14156
14201
  getCurrentScope: getCurrentScope,
14202
+ getCurrentWatcher: getCurrentWatcher,
14157
14203
  getTransitionRawChildren: getTransitionRawChildren,
14158
14204
  guardReactiveProps: guardReactiveProps,
14159
14205
  h: h,
@@ -14196,6 +14242,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
14196
14242
  onServerPrefetch: onServerPrefetch,
14197
14243
  onUnmounted: onUnmounted,
14198
14244
  onUpdated: onUpdated,
14245
+ onWatcherCleanup: onWatcherCleanup,
14199
14246
  openBlock: openBlock,
14200
14247
  popScopeId: popScopeId,
14201
14248
  provide: provide,
@@ -15759,6 +15806,9 @@ const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || no
15759
15806
  const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
15760
15807
  function isReferenced(node, parent, grandparent) {
15761
15808
  switch (parent.type) {
15809
+ // yes: PARENT[NODE]
15810
+ // yes: NODE.child
15811
+ // no: parent.NODE
15762
15812
  case "MemberExpression":
15763
15813
  case "OptionalMemberExpression":
15764
15814
  if (parent.property === node) {
@@ -15767,12 +15817,23 @@ function isReferenced(node, parent, grandparent) {
15767
15817
  return parent.object === node;
15768
15818
  case "JSXMemberExpression":
15769
15819
  return parent.object === node;
15820
+ // no: let NODE = init;
15821
+ // yes: let id = NODE;
15770
15822
  case "VariableDeclarator":
15771
15823
  return parent.init === node;
15824
+ // yes: () => NODE
15825
+ // no: (NODE) => {}
15772
15826
  case "ArrowFunctionExpression":
15773
15827
  return parent.body === node;
15828
+ // no: class { #NODE; }
15829
+ // no: class { get #NODE() {} }
15830
+ // no: class { #NODE() {} }
15831
+ // no: class { fn() { return this.#NODE; } }
15774
15832
  case "PrivateName":
15775
15833
  return false;
15834
+ // no: class { NODE() {} }
15835
+ // yes: class { [NODE]() {} }
15836
+ // no: class { foo(NODE) {} }
15776
15837
  case "ClassMethod":
15777
15838
  case "ClassPrivateMethod":
15778
15839
  case "ObjectMethod":
@@ -15780,11 +15841,18 @@ function isReferenced(node, parent, grandparent) {
15780
15841
  return !!parent.computed;
15781
15842
  }
15782
15843
  return false;
15844
+ // yes: { [NODE]: "" }
15845
+ // no: { NODE: "" }
15846
+ // depends: { NODE }
15847
+ // depends: { key: NODE }
15783
15848
  case "ObjectProperty":
15784
15849
  if (parent.key === node) {
15785
15850
  return !!parent.computed;
15786
15851
  }
15787
15852
  return !grandparent;
15853
+ // no: class { NODE = value; }
15854
+ // yes: class { [NODE] = value; }
15855
+ // yes: class { key = NODE; }
15788
15856
  case "ClassProperty":
15789
15857
  if (parent.key === node) {
15790
15858
  return !!parent.computed;
@@ -15792,47 +15860,80 @@ function isReferenced(node, parent, grandparent) {
15792
15860
  return true;
15793
15861
  case "ClassPrivateProperty":
15794
15862
  return parent.key !== node;
15863
+ // no: class NODE {}
15864
+ // yes: class Foo extends NODE {}
15795
15865
  case "ClassDeclaration":
15796
15866
  case "ClassExpression":
15797
15867
  return parent.superClass === node;
15868
+ // yes: left = NODE;
15869
+ // no: NODE = right;
15798
15870
  case "AssignmentExpression":
15799
15871
  return parent.right === node;
15872
+ // no: [NODE = foo] = [];
15873
+ // yes: [foo = NODE] = [];
15800
15874
  case "AssignmentPattern":
15801
15875
  return parent.right === node;
15876
+ // no: NODE: for (;;) {}
15802
15877
  case "LabeledStatement":
15803
15878
  return false;
15879
+ // no: try {} catch (NODE) {}
15804
15880
  case "CatchClause":
15805
15881
  return false;
15882
+ // no: function foo(...NODE) {}
15806
15883
  case "RestElement":
15807
15884
  return false;
15808
15885
  case "BreakStatement":
15809
15886
  case "ContinueStatement":
15810
15887
  return false;
15888
+ // no: function NODE() {}
15889
+ // no: function foo(NODE) {}
15811
15890
  case "FunctionDeclaration":
15812
15891
  case "FunctionExpression":
15813
15892
  return false;
15893
+ // no: export NODE from "foo";
15894
+ // no: export * as NODE from "foo";
15814
15895
  case "ExportNamespaceSpecifier":
15815
15896
  case "ExportDefaultSpecifier":
15816
15897
  return false;
15898
+ // no: export { foo as NODE };
15899
+ // yes: export { NODE as foo };
15900
+ // no: export { NODE as foo } from "foo";
15817
15901
  case "ExportSpecifier":
15818
15902
  return parent.local === node;
15903
+ // no: import NODE from "foo";
15904
+ // no: import * as NODE from "foo";
15905
+ // no: import { NODE as foo } from "foo";
15906
+ // no: import { foo as NODE } from "foo";
15907
+ // no: import NODE from "bar";
15819
15908
  case "ImportDefaultSpecifier":
15820
15909
  case "ImportNamespaceSpecifier":
15821
15910
  case "ImportSpecifier":
15822
15911
  return false;
15912
+ // no: import "foo" assert { NODE: "json" }
15823
15913
  case "ImportAttribute":
15824
15914
  return false;
15915
+ // no: <div NODE="foo" />
15825
15916
  case "JSXAttribute":
15826
15917
  return false;
15918
+ // no: [NODE] = [];
15919
+ // no: ({ NODE }) = [];
15827
15920
  case "ObjectPattern":
15828
15921
  case "ArrayPattern":
15829
15922
  return false;
15923
+ // no: new.NODE
15924
+ // no: NODE.target
15830
15925
  case "MetaProperty":
15831
15926
  return false;
15927
+ // yes: type X = { someProperty: NODE }
15928
+ // no: type X = { NODE: OtherType }
15832
15929
  case "ObjectTypeProperty":
15833
15930
  return parent.key !== node;
15931
+ // yes: enum X { Foo = NODE }
15932
+ // no: enum X { NODE }
15834
15933
  case "TSEnumMember":
15835
15934
  return parent.id !== node;
15935
+ // yes: { [NODE]: value }
15936
+ // no: { NODE: value }
15836
15937
  case "TSPropertySignature":
15837
15938
  if (parent.key === node) {
15838
15939
  return !!parent.computed;
@@ -15880,10 +15981,11 @@ function isCoreComponent(tag) {
15880
15981
  }
15881
15982
  const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/;
15882
15983
  const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
15883
- const isMemberExpressionNode = (path, context) => {
15984
+ const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
15985
+ const isMemberExpressionNode = (exp, context) => {
15884
15986
  try {
15885
- let ret = parser.parseExpression(path, {
15886
- plugins: context.expressionPlugins
15987
+ let ret = exp.ast || parser.parseExpression(getExpSource(exp), {
15988
+ plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"]
15887
15989
  });
15888
15990
  ret = unwrapTSNode(ret);
15889
15991
  return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined";
@@ -15892,6 +15994,24 @@ const isMemberExpressionNode = (path, context) => {
15892
15994
  }
15893
15995
  };
15894
15996
  const isMemberExpression = isMemberExpressionNode;
15997
+ const isFnExpressionNode = (exp, context) => {
15998
+ try {
15999
+ let ret = exp.ast || parser.parseExpression(getExpSource(exp), {
16000
+ plugins: context.expressionPlugins ? [...context.expressionPlugins, "typescript"] : ["typescript"]
16001
+ });
16002
+ if (ret.type === "Program") {
16003
+ ret = ret.body[0];
16004
+ if (ret.type === "ExpressionStatement") {
16005
+ ret = ret.expression;
16006
+ }
16007
+ }
16008
+ ret = unwrapTSNode(ret);
16009
+ return ret.type === "FunctionExpression" || ret.type === "ArrowFunctionExpression";
16010
+ } catch (e) {
16011
+ return false;
16012
+ }
16013
+ };
16014
+ const isFnExpression = isFnExpressionNode;
15895
16015
  function advancePositionWithClone(pos, source, numberOfCharacters = source.length) {
15896
16016
  return advancePositionWithMutation(
15897
16017
  {
@@ -16406,7 +16526,9 @@ const tokenizer = new Tokenizer(stack, {
16406
16526
  case 17:
16407
16527
  case 18:
16408
16528
  case 19:
16529
+ // "
16409
16530
  case 20:
16531
+ // '
16410
16532
  case 21:
16411
16533
  emitError(9, end);
16412
16534
  break;
@@ -17432,6 +17554,7 @@ function traverseNode(node, context) {
17432
17554
  context.helper(TO_DISPLAY_STRING);
17433
17555
  }
17434
17556
  break;
17557
+ // for container types, further traverse downwards
17435
17558
  case 9:
17436
17559
  for (let i2 = 0; i2 < node.branches.length; i2++) {
17437
17560
  traverseNode(node.branches[i2], context);
@@ -17912,6 +18035,7 @@ function genNode(node, context) {
17912
18035
  case 21:
17913
18036
  genNodeList(node.body, context, true, false);
17914
18037
  break;
18038
+ // SSR only types
17915
18039
  case 22:
17916
18040
  genTemplateLiteral(node, context);
17917
18041
  break;
@@ -17927,6 +18051,7 @@ function genNode(node, context) {
17927
18051
  case 26:
17928
18052
  genReturnStatement(node, context);
17929
18053
  break;
18054
+ /* istanbul ignore next */
17930
18055
  case 10:
17931
18056
  break;
17932
18057
  default:
@@ -19993,7 +20118,6 @@ function processSlotOutlet(node, context) {
19993
20118
  };
19994
20119
  }
19995
20120
 
19996
- const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
19997
20121
  const transformOn$1 = (dir, node, context, augmentor) => {
19998
20122
  const { loc, modifiers, arg } = dir;
19999
20123
  if (!dir.exp && !modifiers.length) {
@@ -20037,8 +20161,8 @@ const transformOn$1 = (dir, node, context, augmentor) => {
20037
20161
  }
20038
20162
  let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
20039
20163
  if (exp) {
20040
- const isMemberExp = isMemberExpression(exp.content, context);
20041
- const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content));
20164
+ const isMemberExp = isMemberExpression(exp, context);
20165
+ const isInlineStatement = !(isMemberExp || isFnExpression(exp, context));
20042
20166
  const hasMultipleStatements = exp.content.includes(`;`);
20043
20167
  if (context.prefixIdentifiers) {
20044
20168
  isInlineStatement && context.addIdentifiers(`$event`);
@@ -20208,7 +20332,7 @@ const transformModel$1 = (dir, node, context) => {
20208
20332
  return createTransformProps();
20209
20333
  }
20210
20334
  const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
20211
- if (!expString.trim() || !isMemberExpression(expString, context) && !maybeRef) {
20335
+ if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) {
20212
20336
  context.onError(
20213
20337
  createCompilerError(42, exp.loc)
20214
20338
  );
@@ -20343,27 +20467,35 @@ function parseFilter(node, context) {
20343
20467
  case 34:
20344
20468
  inDouble = true;
20345
20469
  break;
20470
+ // "
20346
20471
  case 39:
20347
20472
  inSingle = true;
20348
20473
  break;
20474
+ // '
20349
20475
  case 96:
20350
20476
  inTemplateString = true;
20351
20477
  break;
20478
+ // `
20352
20479
  case 40:
20353
20480
  paren++;
20354
20481
  break;
20482
+ // (
20355
20483
  case 41:
20356
20484
  paren--;
20357
20485
  break;
20486
+ // )
20358
20487
  case 91:
20359
20488
  square++;
20360
20489
  break;
20490
+ // [
20361
20491
  case 93:
20362
20492
  square--;
20363
20493
  break;
20494
+ // ]
20364
20495
  case 123:
20365
20496
  curly++;
20366
20497
  break;
20498
+ // {
20367
20499
  case 125:
20368
20500
  curly--;
20369
20501
  break;