@vue/compat 3.4.21 → 3.4.22
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 +205 -124
- package/dist/vue.cjs.prod.js +172 -116
- package/dist/vue.esm-browser.js +203 -124
- package/dist/vue.esm-browser.prod.js +6 -5
- package/dist/vue.esm-bundler.js +211 -134
- package/dist/vue.global.js +203 -124
- package/dist/vue.global.prod.js +7 -6
- package/dist/vue.runtime.esm-browser.js +180 -121
- package/dist/vue.runtime.esm-browser.prod.js +6 -5
- package/dist/vue.runtime.esm-bundler.js +188 -131
- package/dist/vue.runtime.global.js +180 -121
- package/dist/vue.runtime.global.prod.js +7 -6
- package/package.json +4 -4
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.4.
|
|
2
|
+
* @vue/compat v3.4.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
|
+
// @__NO_SIDE_EFFECTS__
|
|
6
8
|
function makeMap(str, expectsLowerCase) {
|
|
7
9
|
const set = new Set(str.split(","));
|
|
8
10
|
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
|
@@ -354,7 +356,11 @@ const replacer = (_key, val) => {
|
|
|
354
356
|
};
|
|
355
357
|
const stringifySymbol = (v, i = "") => {
|
|
356
358
|
var _a;
|
|
357
|
-
return
|
|
359
|
+
return (
|
|
360
|
+
// Symbol.description in es2019+ so we need to cast here to pass
|
|
361
|
+
// the lib: es2016 check
|
|
362
|
+
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
|
363
|
+
);
|
|
358
364
|
};
|
|
359
365
|
|
|
360
366
|
function warn$2(msg, ...args) {
|
|
@@ -790,6 +796,8 @@ function createArrayInstrumentations() {
|
|
|
790
796
|
return instrumentations;
|
|
791
797
|
}
|
|
792
798
|
function hasOwnProperty(key) {
|
|
799
|
+
if (!isSymbol(key))
|
|
800
|
+
key = String(key);
|
|
793
801
|
const obj = toRaw(this);
|
|
794
802
|
track(obj, "has", key);
|
|
795
803
|
return obj.hasOwnProperty(key);
|
|
@@ -1142,23 +1150,16 @@ function createInstrumentations() {
|
|
|
1142
1150
|
clear: createReadonlyMethod("clear"),
|
|
1143
1151
|
forEach: createForEach(true, true)
|
|
1144
1152
|
};
|
|
1145
|
-
const iteratorMethods = [
|
|
1153
|
+
const iteratorMethods = [
|
|
1154
|
+
"keys",
|
|
1155
|
+
"values",
|
|
1156
|
+
"entries",
|
|
1157
|
+
Symbol.iterator
|
|
1158
|
+
];
|
|
1146
1159
|
iteratorMethods.forEach((method) => {
|
|
1147
|
-
mutableInstrumentations2[method] = createIterableMethod(
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
false
|
|
1151
|
-
);
|
|
1152
|
-
readonlyInstrumentations2[method] = createIterableMethod(
|
|
1153
|
-
method,
|
|
1154
|
-
true,
|
|
1155
|
-
false
|
|
1156
|
-
);
|
|
1157
|
-
shallowInstrumentations2[method] = createIterableMethod(
|
|
1158
|
-
method,
|
|
1159
|
-
false,
|
|
1160
|
-
true
|
|
1161
|
-
);
|
|
1160
|
+
mutableInstrumentations2[method] = createIterableMethod(method, false, false);
|
|
1161
|
+
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1162
|
+
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1162
1163
|
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1163
1164
|
method,
|
|
1164
1165
|
true,
|
|
@@ -1315,7 +1316,7 @@ function isShallow(value) {
|
|
|
1315
1316
|
return !!(value && value["__v_isShallow"]);
|
|
1316
1317
|
}
|
|
1317
1318
|
function isProxy(value) {
|
|
1318
|
-
return
|
|
1319
|
+
return value ? !!value["__v_raw"] : false;
|
|
1319
1320
|
}
|
|
1320
1321
|
function toRaw(observed) {
|
|
1321
1322
|
const raw = observed && observed["__v_raw"];
|
|
@@ -1779,11 +1780,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
1779
1780
|
}
|
|
1780
1781
|
return res;
|
|
1781
1782
|
}
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1783
|
+
if (isArray(fn)) {
|
|
1784
|
+
const values = [];
|
|
1785
|
+
for (let i = 0; i < fn.length; i++) {
|
|
1786
|
+
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
1787
|
+
}
|
|
1788
|
+
return values;
|
|
1789
|
+
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
1790
|
+
warn$1(
|
|
1791
|
+
`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
|
|
1792
|
+
);
|
|
1785
1793
|
}
|
|
1786
|
-
return values;
|
|
1787
1794
|
}
|
|
1788
1795
|
function handleError(err, instance, type, throwInDev = true) {
|
|
1789
1796
|
const contextVNode = instance ? instance.vnode : null;
|
|
@@ -1804,12 +1811,14 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
1804
1811
|
}
|
|
1805
1812
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
1806
1813
|
if (appErrorHandler) {
|
|
1814
|
+
pauseTracking();
|
|
1807
1815
|
callWithErrorHandling(
|
|
1808
1816
|
appErrorHandler,
|
|
1809
1817
|
null,
|
|
1810
1818
|
10,
|
|
1811
1819
|
[err, exposedInstance, errorInfo]
|
|
1812
1820
|
);
|
|
1821
|
+
resetTracking();
|
|
1813
1822
|
return;
|
|
1814
1823
|
}
|
|
1815
1824
|
}
|
|
@@ -2187,6 +2196,8 @@ const devtoolsComponentRemoved = (component) => {
|
|
|
2187
2196
|
_devtoolsComponentRemoved(component);
|
|
2188
2197
|
}
|
|
2189
2198
|
};
|
|
2199
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2200
|
+
// @__NO_SIDE_EFFECTS__
|
|
2190
2201
|
function createDevtoolsComponentHook(hook) {
|
|
2191
2202
|
return (component) => {
|
|
2192
2203
|
emit$2(
|
|
@@ -4870,7 +4881,7 @@ const KeepAliveImpl = {
|
|
|
4870
4881
|
return () => {
|
|
4871
4882
|
pendingCacheKey = null;
|
|
4872
4883
|
if (!slots.default) {
|
|
4873
|
-
return null;
|
|
4884
|
+
return current = null;
|
|
4874
4885
|
}
|
|
4875
4886
|
const children = slots.default();
|
|
4876
4887
|
const rawVNode = children[0];
|
|
@@ -5601,47 +5612,74 @@ function installCompatInstanceProperties(map) {
|
|
|
5601
5612
|
$once: (i) => once.bind(null, i),
|
|
5602
5613
|
$off: (i) => off.bind(null, i),
|
|
5603
5614
|
$children: getCompatChildren,
|
|
5604
|
-
$listeners: getCompatListeners
|
|
5615
|
+
$listeners: getCompatListeners,
|
|
5616
|
+
// inject additional properties into $options for compat
|
|
5617
|
+
// e.g. vuex needs this.$options.parent
|
|
5618
|
+
$options: (i) => {
|
|
5619
|
+
if (!isCompatEnabled$1("PRIVATE_APIS", i)) {
|
|
5620
|
+
return resolveMergedOptions(i);
|
|
5621
|
+
}
|
|
5622
|
+
if (i.resolvedOptions) {
|
|
5623
|
+
return i.resolvedOptions;
|
|
5624
|
+
}
|
|
5625
|
+
const res = i.resolvedOptions = extend({}, resolveMergedOptions(i));
|
|
5626
|
+
Object.defineProperties(res, {
|
|
5627
|
+
parent: {
|
|
5628
|
+
get() {
|
|
5629
|
+
warnDeprecation$1("PRIVATE_APIS", i, "$options.parent");
|
|
5630
|
+
return i.proxy.$parent;
|
|
5631
|
+
}
|
|
5632
|
+
},
|
|
5633
|
+
propsData: {
|
|
5634
|
+
get() {
|
|
5635
|
+
warnDeprecation$1(
|
|
5636
|
+
"PRIVATE_APIS",
|
|
5637
|
+
i,
|
|
5638
|
+
"$options.propsData"
|
|
5639
|
+
);
|
|
5640
|
+
return i.vnode.props;
|
|
5641
|
+
}
|
|
5642
|
+
}
|
|
5643
|
+
});
|
|
5644
|
+
return res;
|
|
5645
|
+
}
|
|
5605
5646
|
});
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
_d: () => legacyBindDynamicKeys,
|
|
5643
|
-
_p: () => legacyPrependModifier
|
|
5644
|
-
});
|
|
5647
|
+
const privateAPIs = {
|
|
5648
|
+
// needed by many libs / render fns
|
|
5649
|
+
$vnode: (i) => i.vnode,
|
|
5650
|
+
// some private properties that are likely accessed...
|
|
5651
|
+
_self: (i) => i.proxy,
|
|
5652
|
+
_uid: (i) => i.uid,
|
|
5653
|
+
_data: (i) => i.data,
|
|
5654
|
+
_isMounted: (i) => i.isMounted,
|
|
5655
|
+
_isDestroyed: (i) => i.isUnmounted,
|
|
5656
|
+
// v2 render helpers
|
|
5657
|
+
$createElement: () => compatH,
|
|
5658
|
+
_c: () => compatH,
|
|
5659
|
+
_o: () => legacyMarkOnce,
|
|
5660
|
+
_n: () => looseToNumber,
|
|
5661
|
+
_s: () => toDisplayString,
|
|
5662
|
+
_l: () => renderList,
|
|
5663
|
+
_t: (i) => legacyRenderSlot.bind(null, i),
|
|
5664
|
+
_q: () => looseEqual,
|
|
5665
|
+
_i: () => looseIndexOf,
|
|
5666
|
+
_m: (i) => legacyRenderStatic.bind(null, i),
|
|
5667
|
+
_f: () => resolveFilter$1,
|
|
5668
|
+
_k: (i) => legacyCheckKeyCodes.bind(null, i),
|
|
5669
|
+
_b: () => legacyBindObjectProps,
|
|
5670
|
+
_v: () => createTextVNode,
|
|
5671
|
+
_e: () => createCommentVNode,
|
|
5672
|
+
_u: () => legacyresolveScopedSlots,
|
|
5673
|
+
_g: () => legacyBindObjectListeners,
|
|
5674
|
+
_d: () => legacyBindDynamicKeys,
|
|
5675
|
+
_p: () => legacyPrependModifier
|
|
5676
|
+
};
|
|
5677
|
+
for (const key in privateAPIs) {
|
|
5678
|
+
map[key] = (i) => {
|
|
5679
|
+
if (isCompatEnabled$1("PRIVATE_APIS", i)) {
|
|
5680
|
+
return privateAPIs[key](i);
|
|
5681
|
+
}
|
|
5682
|
+
};
|
|
5645
5683
|
}
|
|
5646
5684
|
}
|
|
5647
5685
|
|
|
@@ -5682,6 +5720,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
|
|
|
5682
5720
|
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
5683
5721
|
const PublicInstanceProxyHandlers = {
|
|
5684
5722
|
get({ _: instance }, key) {
|
|
5723
|
+
if (key === "__v_skip") {
|
|
5724
|
+
return true;
|
|
5725
|
+
}
|
|
5685
5726
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
5686
5727
|
if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") {
|
|
5687
5728
|
return true;
|
|
@@ -6538,7 +6579,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6538
6579
|
return vm;
|
|
6539
6580
|
}
|
|
6540
6581
|
}
|
|
6541
|
-
Vue.version = `2.6.14-compat:${"3.4.
|
|
6582
|
+
Vue.version = `2.6.14-compat:${"3.4.22"}`;
|
|
6542
6583
|
Vue.config = singletonApp.config;
|
|
6543
6584
|
Vue.use = (p, ...options) => {
|
|
6544
6585
|
if (p && isFunction(p.install)) {
|
|
@@ -6733,15 +6774,14 @@ function applySingletonPrototype(app, Ctor) {
|
|
|
6733
6774
|
app.config.globalProperties = Object.create(Ctor.prototype);
|
|
6734
6775
|
}
|
|
6735
6776
|
let hasPrototypeAugmentations = false;
|
|
6736
|
-
const
|
|
6737
|
-
for (const key in descriptors) {
|
|
6777
|
+
for (const key of Object.getOwnPropertyNames(Ctor.prototype)) {
|
|
6738
6778
|
if (key !== "constructor") {
|
|
6739
6779
|
hasPrototypeAugmentations = true;
|
|
6740
6780
|
if (enabled) {
|
|
6741
6781
|
Object.defineProperty(
|
|
6742
6782
|
app.config.globalProperties,
|
|
6743
6783
|
key,
|
|
6744
|
-
|
|
6784
|
+
Object.getOwnPropertyDescriptor(Ctor.prototype, key)
|
|
6745
6785
|
);
|
|
6746
6786
|
}
|
|
6747
6787
|
}
|
|
@@ -7179,10 +7219,10 @@ function shouldSkipAttr(key, instance) {
|
|
|
7179
7219
|
return false;
|
|
7180
7220
|
}
|
|
7181
7221
|
|
|
7222
|
+
const attrsProto = {};
|
|
7182
7223
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
7183
7224
|
const props = {};
|
|
7184
|
-
const attrs =
|
|
7185
|
-
def(attrs, InternalObjectKey, 1);
|
|
7225
|
+
const attrs = Object.create(attrsProto);
|
|
7186
7226
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
7187
7227
|
setFullProps(instance, rawProps, props, attrs);
|
|
7188
7228
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -7304,7 +7344,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
7304
7344
|
}
|
|
7305
7345
|
}
|
|
7306
7346
|
if (hasAttrsChanged) {
|
|
7307
|
-
trigger(instance, "set", "
|
|
7347
|
+
trigger(instance.attrs, "set", "");
|
|
7308
7348
|
}
|
|
7309
7349
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7310
7350
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -7662,7 +7702,7 @@ const initSlots = (instance, children) => {
|
|
|
7662
7702
|
const type = children._;
|
|
7663
7703
|
if (type) {
|
|
7664
7704
|
instance.slots = toRaw(children);
|
|
7665
|
-
def(
|
|
7705
|
+
def(instance.slots, "_", type);
|
|
7666
7706
|
} else {
|
|
7667
7707
|
normalizeObjectSlots(
|
|
7668
7708
|
children,
|
|
@@ -7676,7 +7716,6 @@ const initSlots = (instance, children) => {
|
|
|
7676
7716
|
normalizeVNodeSlots(instance, children);
|
|
7677
7717
|
}
|
|
7678
7718
|
}
|
|
7679
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
7680
7719
|
};
|
|
7681
7720
|
const updateSlots = (instance, children, optimized) => {
|
|
7682
7721
|
const { vnode, slots } = instance;
|
|
@@ -7848,6 +7887,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7848
7887
|
}
|
|
7849
7888
|
};
|
|
7850
7889
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
7890
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
7851
7891
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
7852
7892
|
const onMismatch = () => handleMismatch(
|
|
7853
7893
|
node,
|
|
@@ -8093,9 +8133,9 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
8093
8133
|
}
|
|
8094
8134
|
}
|
|
8095
8135
|
if (props) {
|
|
8096
|
-
if (!!(process.env.NODE_ENV !== "production") || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
8136
|
+
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
8097
8137
|
for (const key in props) {
|
|
8098
|
-
if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
8138
|
+
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
8099
8139
|
hasMismatch = true;
|
|
8100
8140
|
}
|
|
8101
8141
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -10415,7 +10455,6 @@ const createVNodeWithArgsTransform = (...args) => {
|
|
|
10415
10455
|
...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
|
|
10416
10456
|
);
|
|
10417
10457
|
};
|
|
10418
|
-
const InternalObjectKey = `__vInternal`;
|
|
10419
10458
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
10420
10459
|
const normalizeRef = ({
|
|
10421
10460
|
ref,
|
|
@@ -10555,7 +10594,7 @@ Component that was made reactive: `,
|
|
|
10555
10594
|
function guardReactiveProps(props) {
|
|
10556
10595
|
if (!props)
|
|
10557
10596
|
return null;
|
|
10558
|
-
return isProxy(props) ||
|
|
10597
|
+
return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
|
|
10559
10598
|
}
|
|
10560
10599
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
10561
10600
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -10663,7 +10702,7 @@ function normalizeChildren(vnode, children) {
|
|
|
10663
10702
|
} else {
|
|
10664
10703
|
type = 32;
|
|
10665
10704
|
const slotFlag = children._;
|
|
10666
|
-
if (!slotFlag
|
|
10705
|
+
if (!slotFlag) {
|
|
10667
10706
|
children._ctx = currentRenderingInstance;
|
|
10668
10707
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
10669
10708
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -10901,7 +10940,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10901
10940
|
}
|
|
10902
10941
|
}
|
|
10903
10942
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
10904
|
-
instance.proxy =
|
|
10943
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
10905
10944
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
10906
10945
|
exposePropsOnRenderContext(instance);
|
|
10907
10946
|
}
|
|
@@ -11047,31 +11086,26 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
11047
11086
|
}
|
|
11048
11087
|
}
|
|
11049
11088
|
}
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
return target[key];
|
|
11071
|
-
}
|
|
11072
|
-
}
|
|
11073
|
-
));
|
|
11074
|
-
}
|
|
11089
|
+
const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
11090
|
+
get(target, key) {
|
|
11091
|
+
markAttrsAccessed();
|
|
11092
|
+
track(target, "get", "");
|
|
11093
|
+
return target[key];
|
|
11094
|
+
},
|
|
11095
|
+
set() {
|
|
11096
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
11097
|
+
return false;
|
|
11098
|
+
},
|
|
11099
|
+
deleteProperty() {
|
|
11100
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
11101
|
+
return false;
|
|
11102
|
+
}
|
|
11103
|
+
} : {
|
|
11104
|
+
get(target, key) {
|
|
11105
|
+
track(target, "get", "");
|
|
11106
|
+
return target[key];
|
|
11107
|
+
}
|
|
11108
|
+
};
|
|
11075
11109
|
function getSlotsProxy(instance) {
|
|
11076
11110
|
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
11077
11111
|
get(target, key) {
|
|
@@ -11105,9 +11139,10 @@ function createSetupContext(instance) {
|
|
|
11105
11139
|
instance.exposed = exposed || {};
|
|
11106
11140
|
};
|
|
11107
11141
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
11142
|
+
let attrsProxy;
|
|
11108
11143
|
return Object.freeze({
|
|
11109
11144
|
get attrs() {
|
|
11110
|
-
return
|
|
11145
|
+
return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
|
|
11111
11146
|
},
|
|
11112
11147
|
get slots() {
|
|
11113
11148
|
return getSlotsProxy(instance);
|
|
@@ -11119,9 +11154,7 @@ function createSetupContext(instance) {
|
|
|
11119
11154
|
});
|
|
11120
11155
|
} else {
|
|
11121
11156
|
return {
|
|
11122
|
-
|
|
11123
|
-
return getAttrsProxy(instance);
|
|
11124
|
-
},
|
|
11157
|
+
attrs: new Proxy(instance.attrs, attrsProxyHandlers),
|
|
11125
11158
|
slots: instance.slots,
|
|
11126
11159
|
emit: instance.emit,
|
|
11127
11160
|
expose
|
|
@@ -11461,7 +11494,7 @@ function isMemoSame(cached, memo) {
|
|
|
11461
11494
|
return true;
|
|
11462
11495
|
}
|
|
11463
11496
|
|
|
11464
|
-
const version = "3.4.
|
|
11497
|
+
const version = "3.4.22";
|
|
11465
11498
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
11466
11499
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11467
11500
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -11946,8 +11979,8 @@ function useCssVars(getter) {
|
|
|
11946
11979
|
setVarsOnVNode(instance.subTree, vars);
|
|
11947
11980
|
updateTeleports(vars);
|
|
11948
11981
|
};
|
|
11949
|
-
watchPostEffect(setVars);
|
|
11950
11982
|
onMounted(() => {
|
|
11983
|
+
watchPostEffect(setVars);
|
|
11951
11984
|
const ob = new MutationObserver(setVars);
|
|
11952
11985
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
11953
11986
|
onUnmounted(() => ob.disconnect());
|
|
@@ -12213,11 +12246,14 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
12213
12246
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
12214
12247
|
const existingInvoker = invokers[rawName];
|
|
12215
12248
|
if (nextValue && existingInvoker) {
|
|
12216
|
-
existingInvoker.value = nextValue;
|
|
12249
|
+
existingInvoker.value = !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue;
|
|
12217
12250
|
} else {
|
|
12218
12251
|
const [name, options] = parseName(rawName);
|
|
12219
12252
|
if (nextValue) {
|
|
12220
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
12253
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
12254
|
+
!!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue,
|
|
12255
|
+
instance
|
|
12256
|
+
);
|
|
12221
12257
|
addEventListener(el, name, invoker, options);
|
|
12222
12258
|
} else if (existingInvoker) {
|
|
12223
12259
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -12260,6 +12296,16 @@ function createInvoker(initialValue, instance) {
|
|
|
12260
12296
|
invoker.attached = getNow();
|
|
12261
12297
|
return invoker;
|
|
12262
12298
|
}
|
|
12299
|
+
function sanitizeEventValue(value, propName) {
|
|
12300
|
+
if (isFunction(value) || isArray(value)) {
|
|
12301
|
+
return value;
|
|
12302
|
+
}
|
|
12303
|
+
warn(
|
|
12304
|
+
`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
|
|
12305
|
+
Expected function or array of functions, received type ${typeof value}.`
|
|
12306
|
+
);
|
|
12307
|
+
return NOOP;
|
|
12308
|
+
}
|
|
12263
12309
|
function patchStopImmediatePropagation(e, value) {
|
|
12264
12310
|
if (isArray(value)) {
|
|
12265
12311
|
const originalStop = e.stopImmediatePropagation;
|
|
@@ -12267,7 +12313,9 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
12267
12313
|
originalStop.call(e);
|
|
12268
12314
|
e._stopped = true;
|
|
12269
12315
|
};
|
|
12270
|
-
return value.map(
|
|
12316
|
+
return value.map(
|
|
12317
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
12318
|
+
);
|
|
12271
12319
|
} else {
|
|
12272
12320
|
return value;
|
|
12273
12321
|
}
|
|
@@ -12468,7 +12516,7 @@ class VueElement extends BaseClass {
|
|
|
12468
12516
|
}
|
|
12469
12517
|
}
|
|
12470
12518
|
_setAttr(key) {
|
|
12471
|
-
let value = this.getAttribute(key);
|
|
12519
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
12472
12520
|
const camelKey = camelize(key);
|
|
12473
12521
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
12474
12522
|
value = toNumber(value);
|
|
@@ -12640,7 +12688,28 @@ const TransitionGroupImpl = {
|
|
|
12640
12688
|
)) {
|
|
12641
12689
|
tag = "span";
|
|
12642
12690
|
}
|
|
12643
|
-
prevChildren =
|
|
12691
|
+
prevChildren = [];
|
|
12692
|
+
if (children) {
|
|
12693
|
+
for (let i = 0; i < children.length; i++) {
|
|
12694
|
+
const child = children[i];
|
|
12695
|
+
if (child.el && child.el instanceof Element) {
|
|
12696
|
+
prevChildren.push(child);
|
|
12697
|
+
setTransitionHooks(
|
|
12698
|
+
child,
|
|
12699
|
+
resolveTransitionHooks(
|
|
12700
|
+
child,
|
|
12701
|
+
cssTransitionProps,
|
|
12702
|
+
state,
|
|
12703
|
+
instance
|
|
12704
|
+
)
|
|
12705
|
+
);
|
|
12706
|
+
positionMap.set(
|
|
12707
|
+
child,
|
|
12708
|
+
child.el.getBoundingClientRect()
|
|
12709
|
+
);
|
|
12710
|
+
}
|
|
12711
|
+
}
|
|
12712
|
+
}
|
|
12644
12713
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
12645
12714
|
for (let i = 0; i < children.length; i++) {
|
|
12646
12715
|
const child = children[i];
|
|
@@ -12653,16 +12722,6 @@ const TransitionGroupImpl = {
|
|
|
12653
12722
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
12654
12723
|
}
|
|
12655
12724
|
}
|
|
12656
|
-
if (prevChildren) {
|
|
12657
|
-
for (let i = 0; i < prevChildren.length; i++) {
|
|
12658
|
-
const child = prevChildren[i];
|
|
12659
|
-
setTransitionHooks(
|
|
12660
|
-
child,
|
|
12661
|
-
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
12662
|
-
);
|
|
12663
|
-
positionMap.set(child, child.el.getBoundingClientRect());
|
|
12664
|
-
}
|
|
12665
|
-
}
|
|
12666
12725
|
return createVNode(tag, null, children);
|
|
12667
12726
|
};
|
|
12668
12727
|
}
|
|
@@ -12764,7 +12823,7 @@ const vModelText = {
|
|
|
12764
12823
|
el[assignKey] = getModelAssigner(vnode);
|
|
12765
12824
|
if (el.composing)
|
|
12766
12825
|
return;
|
|
12767
|
-
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
12826
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
12768
12827
|
const newValue = value == null ? "" : value;
|
|
12769
12828
|
if (elValue === newValue) {
|
|
12770
12829
|
return;
|
|
@@ -12867,14 +12926,14 @@ const vModelSelect = {
|
|
|
12867
12926
|
// set value in mounted & updated because <select> relies on its children
|
|
12868
12927
|
// <option>s.
|
|
12869
12928
|
mounted(el, { value, modifiers: { number } }) {
|
|
12870
|
-
setSelected(el, value
|
|
12929
|
+
setSelected(el, value);
|
|
12871
12930
|
},
|
|
12872
12931
|
beforeUpdate(el, _binding, vnode) {
|
|
12873
12932
|
el[assignKey] = getModelAssigner(vnode);
|
|
12874
12933
|
},
|
|
12875
12934
|
updated(el, { value, modifiers: { number } }) {
|
|
12876
12935
|
if (!el._assigning) {
|
|
12877
|
-
setSelected(el, value
|
|
12936
|
+
setSelected(el, value);
|
|
12878
12937
|
}
|
|
12879
12938
|
}
|
|
12880
12939
|
};
|
|
@@ -12894,9 +12953,7 @@ function setSelected(el, value, number) {
|
|
|
12894
12953
|
if (isArrayValue) {
|
|
12895
12954
|
const optionType = typeof optionValue;
|
|
12896
12955
|
if (optionType === "string" || optionType === "number") {
|
|
12897
|
-
option.selected = value.
|
|
12898
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
12899
|
-
);
|
|
12956
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
12900
12957
|
} else {
|
|
12901
12958
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
12902
12959
|
}
|
|
@@ -15252,7 +15309,7 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
15252
15309
|
if (isImplied) {
|
|
15253
15310
|
setLocEnd(el.loc, backTrack(end, 60));
|
|
15254
15311
|
} else {
|
|
15255
|
-
setLocEnd(el.loc, end + 1);
|
|
15312
|
+
setLocEnd(el.loc, lookAhead(end, 62) + 1);
|
|
15256
15313
|
}
|
|
15257
15314
|
if (tokenizer.inSFCRoot) {
|
|
15258
15315
|
if (el.children.length) {
|
|
@@ -15347,6 +15404,12 @@ function onCloseTag(el, end, isImplied = false) {
|
|
|
15347
15404
|
}
|
|
15348
15405
|
}
|
|
15349
15406
|
}
|
|
15407
|
+
function lookAhead(index, c) {
|
|
15408
|
+
let i = index;
|
|
15409
|
+
while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1)
|
|
15410
|
+
i++;
|
|
15411
|
+
return i;
|
|
15412
|
+
}
|
|
15350
15413
|
function backTrack(index, c) {
|
|
15351
15414
|
let i = index;
|
|
15352
15415
|
while (currentInput.charCodeAt(i) !== c && i >= 0)
|
|
@@ -17531,13 +17594,27 @@ const transformElement = (node, context) => {
|
|
|
17531
17594
|
function resolveComponentType(node, context, ssr = false) {
|
|
17532
17595
|
let { tag } = node;
|
|
17533
17596
|
const isExplicitDynamic = isComponentTag(tag);
|
|
17534
|
-
const isProp = findProp(
|
|
17597
|
+
const isProp = findProp(
|
|
17598
|
+
node,
|
|
17599
|
+
"is",
|
|
17600
|
+
false,
|
|
17601
|
+
true
|
|
17602
|
+
/* allow empty */
|
|
17603
|
+
);
|
|
17535
17604
|
if (isProp) {
|
|
17536
17605
|
if (isExplicitDynamic || isCompatEnabled(
|
|
17537
17606
|
"COMPILER_IS_ON_ELEMENT",
|
|
17538
17607
|
context
|
|
17539
17608
|
)) {
|
|
17540
|
-
|
|
17609
|
+
let exp;
|
|
17610
|
+
if (isProp.type === 6) {
|
|
17611
|
+
exp = isProp.value && createSimpleExpression(isProp.value.content, true);
|
|
17612
|
+
} else {
|
|
17613
|
+
exp = isProp.exp;
|
|
17614
|
+
if (!exp) {
|
|
17615
|
+
exp = createSimpleExpression(`is`, false, isProp.loc);
|
|
17616
|
+
}
|
|
17617
|
+
}
|
|
17541
17618
|
if (exp) {
|
|
17542
17619
|
return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
|
|
17543
17620
|
exp
|