superdoc 0.34.6-RC1 → 0.34.7
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/chunks/{PdfViewer-Cdq6hWaP.cjs → PdfViewer-C8xLNe_n.cjs} +2 -2
- package/dist/chunks/{PdfViewer-Yy390Dyv.es.js → PdfViewer-WfRCZj-e.es.js} +2 -2
- package/dist/chunks/{eventemitter3-CFCpOk3d.cjs → eventemitter3-DmHNHvFX.cjs} +1 -1
- package/dist/chunks/{eventemitter3-BZXKb7j7.es.js → eventemitter3-hYlnBzSA.es.js} +1 -1
- package/dist/chunks/{index-_8cQcYzu-Dj8Emsl2.es.js → index-BENzx4z6-DdFuGCwa.es.js} +1 -1
- package/dist/chunks/{index-_8cQcYzu-CB4RkW2W.cjs → index-BENzx4z6-Ds8akndA.cjs} +1 -1
- package/dist/chunks/{index-QkGtTLUE.cjs → index-CIQILa8l.cjs} +7 -12
- package/dist/chunks/{index-M9d0bJ9k.es.js → index-wZJgMVEg.es.js} +7 -12
- package/dist/chunks/{jszip-B99MTu59.cjs → jszip-BP2FTbpi.cjs} +1 -1
- package/dist/chunks/{jszip-Duxs2YMV.es.js → jszip-jKrsZoMS.es.js} +1 -1
- package/dist/chunks/{super-editor.es-kNY6AOSu.es.js → super-editor.es-B21z_KOS.es.js} +626 -727
- package/dist/chunks/{super-editor.es-C-hpEM8j.cjs → super-editor.es-BVJ4WHrZ.cjs} +673 -774
- package/dist/chunks/{vue-B5QAf5pA.es.js → vue-CKmzTNVs.es.js} +1379 -1420
- package/dist/chunks/{vue-ARQSyfaw.cjs → vue-Cwv-wUpm.cjs} +1379 -1420
- package/dist/chunks/xml-js-BSDu25I7.cjs +3 -0
- package/dist/chunks/xml-js-CBrRls0f.es.js +2 -0
- package/dist/packages/superdoc/src/components/CommentsLayer/use-comment.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-Ddl2ZmKy.js → converter-BItdKEMN.js} +301 -394
- package/dist/super-editor/chunks/{docx-zipper-D1BgiAWm.js → docx-zipper-Brh1H7kE.js} +1 -1
- package/dist/super-editor/chunks/{editor-B2T2u3JG.js → editor-BwXcd5wT.js} +59 -67
- package/dist/super-editor/chunks/{index-_8cQcYzu.js → index-BENzx4z6.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-hyRTdNjv.js → toolbar-CiQKWEEf.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/exporter/commentsExporter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/r/r-translator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration/collaboration-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +2 -2
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +975 -1121
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-CVyfrKaV.es.js +0 -2
- package/dist/chunks/xml-js-DQa4Ye5C.cjs +0 -3
|
@@ -162,7 +162,7 @@ process.umask = function() {
|
|
|
162
162
|
var browserExports = browser.exports;
|
|
163
163
|
const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
164
164
|
/**
|
|
165
|
-
* @vue/shared v3.5.
|
|
165
|
+
* @vue/shared v3.5.24
|
|
166
166
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
167
167
|
* @license MIT
|
|
168
168
|
**/
|
|
@@ -1027,16 +1027,10 @@ function shallowReadArray(arr) {
|
|
|
1027
1027
|
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
1028
1028
|
return arr;
|
|
1029
1029
|
}
|
|
1030
|
-
function toWrapped(target, item) {
|
|
1031
|
-
if (isReadonly(target)) {
|
|
1032
|
-
return isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
|
|
1033
|
-
}
|
|
1034
|
-
return toReactive(item);
|
|
1035
|
-
}
|
|
1036
1030
|
const arrayInstrumentations = {
|
|
1037
1031
|
__proto__: null,
|
|
1038
1032
|
[Symbol.iterator]() {
|
|
1039
|
-
return iterator(this, Symbol.iterator,
|
|
1033
|
+
return iterator(this, Symbol.iterator, toReactive);
|
|
1040
1034
|
},
|
|
1041
1035
|
concat(...args) {
|
|
1042
1036
|
return reactiveReadArray(this).concat(
|
|
@@ -1045,7 +1039,7 @@ const arrayInstrumentations = {
|
|
|
1045
1039
|
},
|
|
1046
1040
|
entries() {
|
|
1047
1041
|
return iterator(this, "entries", (value) => {
|
|
1048
|
-
value[1] =
|
|
1042
|
+
value[1] = toReactive(value[1]);
|
|
1049
1043
|
return value;
|
|
1050
1044
|
});
|
|
1051
1045
|
},
|
|
@@ -1053,37 +1047,16 @@ const arrayInstrumentations = {
|
|
|
1053
1047
|
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
1054
1048
|
},
|
|
1055
1049
|
filter(fn, thisArg) {
|
|
1056
|
-
return apply(
|
|
1057
|
-
this,
|
|
1058
|
-
"filter",
|
|
1059
|
-
fn,
|
|
1060
|
-
thisArg,
|
|
1061
|
-
(v) => v.map((item) => toWrapped(this, item)),
|
|
1062
|
-
arguments
|
|
1063
|
-
);
|
|
1050
|
+
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
|
|
1064
1051
|
},
|
|
1065
1052
|
find(fn, thisArg) {
|
|
1066
|
-
return apply(
|
|
1067
|
-
this,
|
|
1068
|
-
"find",
|
|
1069
|
-
fn,
|
|
1070
|
-
thisArg,
|
|
1071
|
-
(item) => toWrapped(this, item),
|
|
1072
|
-
arguments
|
|
1073
|
-
);
|
|
1053
|
+
return apply(this, "find", fn, thisArg, toReactive, arguments);
|
|
1074
1054
|
},
|
|
1075
1055
|
findIndex(fn, thisArg) {
|
|
1076
1056
|
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
1077
1057
|
},
|
|
1078
1058
|
findLast(fn, thisArg) {
|
|
1079
|
-
return apply(
|
|
1080
|
-
this,
|
|
1081
|
-
"findLast",
|
|
1082
|
-
fn,
|
|
1083
|
-
thisArg,
|
|
1084
|
-
(item) => toWrapped(this, item),
|
|
1085
|
-
arguments
|
|
1086
|
-
);
|
|
1059
|
+
return apply(this, "findLast", fn, thisArg, toReactive, arguments);
|
|
1087
1060
|
},
|
|
1088
1061
|
findLastIndex(fn, thisArg) {
|
|
1089
1062
|
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
@@ -1143,7 +1116,7 @@ const arrayInstrumentations = {
|
|
|
1143
1116
|
return noTracking(this, "unshift", args);
|
|
1144
1117
|
},
|
|
1145
1118
|
values() {
|
|
1146
|
-
return iterator(this, "values",
|
|
1119
|
+
return iterator(this, "values", toReactive);
|
|
1147
1120
|
}
|
|
1148
1121
|
};
|
|
1149
1122
|
function iterator(self2, method, wrapValue) {
|
|
@@ -1174,7 +1147,7 @@ function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
|
|
|
1174
1147
|
if (arr !== self2) {
|
|
1175
1148
|
if (needsWrap) {
|
|
1176
1149
|
wrappedFn = function(item, index) {
|
|
1177
|
-
return fn.call(this,
|
|
1150
|
+
return fn.call(this, toReactive(item), index, self2);
|
|
1178
1151
|
};
|
|
1179
1152
|
} else if (fn.length > 2) {
|
|
1180
1153
|
wrappedFn = function(item, index) {
|
|
@@ -1191,7 +1164,7 @@ function reduce(self2, method, fn, args) {
|
|
|
1191
1164
|
if (arr !== self2) {
|
|
1192
1165
|
if (!isShallow(self2)) {
|
|
1193
1166
|
wrappedFn = function(acc, item, index) {
|
|
1194
|
-
return fn.call(this, acc,
|
|
1167
|
+
return fn.call(this, acc, toReactive(item), index, self2);
|
|
1195
1168
|
};
|
|
1196
1169
|
} else if (fn.length > 3) {
|
|
1197
1170
|
wrappedFn = function(acc, item, index) {
|
|
@@ -1294,14 +1267,13 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1294
1267
|
}
|
|
1295
1268
|
set(target, key, value, receiver) {
|
|
1296
1269
|
let oldValue = target[key];
|
|
1297
|
-
const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
|
|
1298
1270
|
if (!this._isShallow) {
|
|
1299
1271
|
const isOldValueReadonly = isReadonly(oldValue);
|
|
1300
1272
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
1301
1273
|
oldValue = toRaw(oldValue);
|
|
1302
1274
|
value = toRaw(value);
|
|
1303
1275
|
}
|
|
1304
|
-
if (!
|
|
1276
|
+
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
1305
1277
|
if (isOldValueReadonly) {
|
|
1306
1278
|
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
1307
1279
|
warn$2(
|
|
@@ -1316,7 +1288,7 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1316
1288
|
}
|
|
1317
1289
|
}
|
|
1318
1290
|
}
|
|
1319
|
-
const hadKey =
|
|
1291
|
+
const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
|
|
1320
1292
|
const result = Reflect.set(
|
|
1321
1293
|
target,
|
|
1322
1294
|
key,
|
|
@@ -1813,35 +1785,16 @@ class ObjectRefImpl {
|
|
|
1813
1785
|
this._defaultValue = _defaultValue;
|
|
1814
1786
|
this["__v_isRef"] = true;
|
|
1815
1787
|
this._value = void 0;
|
|
1816
|
-
this._raw = toRaw(_object);
|
|
1817
|
-
let shallow = true;
|
|
1818
|
-
let obj = _object;
|
|
1819
|
-
if (!isArray(_object) || !isIntegerKey(String(_key))) {
|
|
1820
|
-
do {
|
|
1821
|
-
shallow = !isProxy(obj) || isShallow(obj);
|
|
1822
|
-
} while (shallow && (obj = obj["__v_raw"]));
|
|
1823
|
-
}
|
|
1824
|
-
this._shallow = shallow;
|
|
1825
1788
|
}
|
|
1826
1789
|
get value() {
|
|
1827
|
-
|
|
1828
|
-
if (this._shallow) {
|
|
1829
|
-
val = unref(val);
|
|
1830
|
-
}
|
|
1790
|
+
const val = this._object[this._key];
|
|
1831
1791
|
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1832
1792
|
}
|
|
1833
1793
|
set value(newVal) {
|
|
1834
|
-
if (this._shallow && isRef(this._raw[this._key])) {
|
|
1835
|
-
const nestedRef = this._object[this._key];
|
|
1836
|
-
if (isRef(nestedRef)) {
|
|
1837
|
-
nestedRef.value = newVal;
|
|
1838
|
-
return;
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
1794
|
this._object[this._key] = newVal;
|
|
1842
1795
|
}
|
|
1843
1796
|
get dep() {
|
|
1844
|
-
return getDepFromReactive(this.
|
|
1797
|
+
return getDepFromReactive(toRaw(this._object), this._key);
|
|
1845
1798
|
}
|
|
1846
1799
|
}
|
|
1847
1800
|
class GetterRefImpl {
|
|
@@ -1867,7 +1820,8 @@ function toRef(source, key, defaultValue) {
|
|
|
1867
1820
|
}
|
|
1868
1821
|
}
|
|
1869
1822
|
function propertyToRef(source, key, defaultValue) {
|
|
1870
|
-
|
|
1823
|
+
const val = source[key];
|
|
1824
|
+
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1871
1825
|
}
|
|
1872
1826
|
class ComputedRefImpl {
|
|
1873
1827
|
constructor(fn, setter, isSSR) {
|
|
@@ -4193,6 +4147,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
4193
4147
|
if (!!(process$1.env.NODE_ENV !== "production") && key === "__isVue") {
|
|
4194
4148
|
return true;
|
|
4195
4149
|
}
|
|
4150
|
+
let normalizedProps;
|
|
4196
4151
|
if (key[0] !== "$") {
|
|
4197
4152
|
const n = accessCache[key];
|
|
4198
4153
|
if (n !== void 0) {
|
|
@@ -4212,7 +4167,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
4212
4167
|
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
4213
4168
|
accessCache[key] = 2;
|
|
4214
4169
|
return data[key];
|
|
4215
|
-
} else if (
|
|
4170
|
+
} else if (
|
|
4171
|
+
// only cache other properties when instance has declared (thus stable)
|
|
4172
|
+
// props
|
|
4173
|
+
(normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
|
|
4174
|
+
) {
|
|
4216
4175
|
accessCache[key] = 3;
|
|
4217
4176
|
return props[key];
|
|
4218
4177
|
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
@@ -4297,10 +4256,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
4297
4256
|
return true;
|
|
4298
4257
|
},
|
|
4299
4258
|
has({
|
|
4300
|
-
_: { data, setupState, accessCache, ctx, appContext,
|
|
4259
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
|
|
4301
4260
|
}, key) {
|
|
4302
|
-
let cssModules;
|
|
4303
|
-
return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || hasOwn(
|
|
4261
|
+
let normalizedProps, cssModules;
|
|
4262
|
+
return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
4304
4263
|
},
|
|
4305
4264
|
defineProperty(target, key, descriptor) {
|
|
4306
4265
|
if (descriptor.get != null) {
|
|
@@ -5000,12 +4959,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5000
4959
|
}
|
|
5001
4960
|
let currentApp = null;
|
|
5002
4961
|
function provide(key, value) {
|
|
5003
|
-
if (
|
|
5004
|
-
if (
|
|
4962
|
+
if (!currentInstance) {
|
|
4963
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
5005
4964
|
warn$1(`provide() can only be used inside setup().`);
|
|
5006
4965
|
}
|
|
5007
|
-
}
|
|
5008
|
-
if (currentInstance) {
|
|
4966
|
+
} else {
|
|
5009
4967
|
let provides = currentInstance.provides;
|
|
5010
4968
|
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
5011
4969
|
if (parentProvides === provides) {
|
|
@@ -5032,1138 +4990,587 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
5032
4990
|
function hasInjectionContext() {
|
|
5033
4991
|
return !!(getCurrentInstance() || currentApp);
|
|
5034
4992
|
}
|
|
5035
|
-
const
|
|
5036
|
-
const
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
};
|
|
5047
|
-
function watchEffect(effect2, options) {
|
|
5048
|
-
return doWatch(effect2, null, options);
|
|
5049
|
-
}
|
|
5050
|
-
function watch(source, cb, options) {
|
|
5051
|
-
if (!!(process$1.env.NODE_ENV !== "production") && !isFunction(cb)) {
|
|
5052
|
-
warn$1(
|
|
5053
|
-
`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
|
|
5054
|
-
);
|
|
5055
|
-
}
|
|
5056
|
-
return doWatch(source, cb, options);
|
|
5057
|
-
}
|
|
5058
|
-
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
5059
|
-
const { immediate, deep, flush, once } = options;
|
|
5060
|
-
if (!!(process$1.env.NODE_ENV !== "production") && !cb) {
|
|
5061
|
-
if (immediate !== void 0) {
|
|
5062
|
-
warn$1(
|
|
5063
|
-
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
5064
|
-
);
|
|
5065
|
-
}
|
|
5066
|
-
if (deep !== void 0) {
|
|
5067
|
-
warn$1(
|
|
5068
|
-
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
5069
|
-
);
|
|
5070
|
-
}
|
|
5071
|
-
if (once !== void 0) {
|
|
5072
|
-
warn$1(
|
|
5073
|
-
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
5074
|
-
);
|
|
5075
|
-
}
|
|
5076
|
-
}
|
|
5077
|
-
const baseWatchOptions = extend({}, options);
|
|
5078
|
-
if (!!(process$1.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
|
|
5079
|
-
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
5080
|
-
let ssrCleanup;
|
|
5081
|
-
if (isInSSRComponentSetup) {
|
|
5082
|
-
if (flush === "sync") {
|
|
5083
|
-
const ctx = useSSRContext();
|
|
5084
|
-
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
5085
|
-
} else if (!runsImmediately) {
|
|
5086
|
-
const watchStopHandle = () => {
|
|
5087
|
-
};
|
|
5088
|
-
watchStopHandle.stop = NOOP;
|
|
5089
|
-
watchStopHandle.resume = NOOP;
|
|
5090
|
-
watchStopHandle.pause = NOOP;
|
|
5091
|
-
return watchStopHandle;
|
|
4993
|
+
const internalObjectProto = {};
|
|
4994
|
+
const createInternalObject = () => Object.create(internalObjectProto);
|
|
4995
|
+
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
4996
|
+
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
4997
|
+
const props = {};
|
|
4998
|
+
const attrs = createInternalObject();
|
|
4999
|
+
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
5000
|
+
setFullProps(instance, rawProps, props, attrs);
|
|
5001
|
+
for (const key in instance.propsOptions[0]) {
|
|
5002
|
+
if (!(key in props)) {
|
|
5003
|
+
props[key] = void 0;
|
|
5092
5004
|
}
|
|
5093
5005
|
}
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
let isPre = false;
|
|
5097
|
-
if (flush === "post") {
|
|
5098
|
-
baseWatchOptions.scheduler = (job) => {
|
|
5099
|
-
queuePostRenderEffect(job, instance && instance.suspense);
|
|
5100
|
-
};
|
|
5101
|
-
} else if (flush !== "sync") {
|
|
5102
|
-
isPre = true;
|
|
5103
|
-
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
5104
|
-
if (isFirstRun) {
|
|
5105
|
-
job();
|
|
5106
|
-
} else {
|
|
5107
|
-
queueJob(job);
|
|
5108
|
-
}
|
|
5109
|
-
};
|
|
5006
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
5007
|
+
validateProps(rawProps || {}, props, instance);
|
|
5110
5008
|
}
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
job.id = instance.uid;
|
|
5119
|
-
job.i = instance;
|
|
5120
|
-
}
|
|
5121
|
-
}
|
|
5122
|
-
};
|
|
5123
|
-
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
5124
|
-
if (isInSSRComponentSetup) {
|
|
5125
|
-
if (ssrCleanup) {
|
|
5126
|
-
ssrCleanup.push(watchHandle);
|
|
5127
|
-
} else if (runsImmediately) {
|
|
5128
|
-
watchHandle();
|
|
5009
|
+
if (isStateful) {
|
|
5010
|
+
instance.props = isSSR ? props : shallowReactive(props);
|
|
5011
|
+
} else {
|
|
5012
|
+
if (!instance.type.props) {
|
|
5013
|
+
instance.props = attrs;
|
|
5014
|
+
} else {
|
|
5015
|
+
instance.props = props;
|
|
5129
5016
|
}
|
|
5130
5017
|
}
|
|
5131
|
-
|
|
5018
|
+
instance.attrs = attrs;
|
|
5132
5019
|
}
|
|
5133
|
-
function
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
if (isFunction(value)) {
|
|
5138
|
-
cb = value;
|
|
5139
|
-
} else {
|
|
5140
|
-
cb = value.handler;
|
|
5141
|
-
options = value;
|
|
5020
|
+
function isInHmrContext(instance) {
|
|
5021
|
+
while (instance) {
|
|
5022
|
+
if (instance.type.__hmrId) return true;
|
|
5023
|
+
instance = instance.parent;
|
|
5142
5024
|
}
|
|
5143
|
-
const reset = setCurrentInstance(this);
|
|
5144
|
-
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
5145
|
-
reset();
|
|
5146
|
-
return res;
|
|
5147
|
-
}
|
|
5148
|
-
function createPathGetter(ctx, path) {
|
|
5149
|
-
const segments = path.split(".");
|
|
5150
|
-
return () => {
|
|
5151
|
-
let cur = ctx;
|
|
5152
|
-
for (let i = 0; i < segments.length && cur; i++) {
|
|
5153
|
-
cur = cur[segments[i]];
|
|
5154
|
-
}
|
|
5155
|
-
return cur;
|
|
5156
|
-
};
|
|
5157
5025
|
}
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
if
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5026
|
+
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
5027
|
+
const {
|
|
5028
|
+
props,
|
|
5029
|
+
attrs,
|
|
5030
|
+
vnode: { patchFlag }
|
|
5031
|
+
} = instance;
|
|
5032
|
+
const rawCurrentProps = toRaw(props);
|
|
5033
|
+
const [options] = instance.propsOptions;
|
|
5034
|
+
let hasAttrsChanged = false;
|
|
5035
|
+
if (
|
|
5036
|
+
// always force full diff in dev
|
|
5037
|
+
// - #1942 if hmr is enabled with sfc component
|
|
5038
|
+
// - vite#872 non-sfc component used by sfc component
|
|
5039
|
+
!(!!(process$1.env.NODE_ENV !== "production") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16)
|
|
5040
|
+
) {
|
|
5041
|
+
if (patchFlag & 8) {
|
|
5042
|
+
const propsToUpdate = instance.vnode.dynamicProps;
|
|
5043
|
+
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
5044
|
+
let key = propsToUpdate[i];
|
|
5045
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
5046
|
+
continue;
|
|
5175
5047
|
}
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5048
|
+
const value = rawProps[key];
|
|
5049
|
+
if (options) {
|
|
5050
|
+
if (hasOwn(attrs, key)) {
|
|
5051
|
+
if (value !== attrs[key]) {
|
|
5052
|
+
attrs[key] = value;
|
|
5053
|
+
hasAttrsChanged = true;
|
|
5054
|
+
}
|
|
5055
|
+
} else {
|
|
5056
|
+
const camelizedKey = camelize(key);
|
|
5057
|
+
props[camelizedKey] = resolvePropValue(
|
|
5058
|
+
options,
|
|
5059
|
+
rawCurrentProps,
|
|
5060
|
+
camelizedKey,
|
|
5061
|
+
value,
|
|
5062
|
+
instance,
|
|
5063
|
+
false
|
|
5183
5064
|
);
|
|
5184
5065
|
}
|
|
5066
|
+
} else {
|
|
5067
|
+
if (value !== attrs[key]) {
|
|
5068
|
+
attrs[key] = value;
|
|
5069
|
+
hasAttrsChanged = true;
|
|
5070
|
+
}
|
|
5185
5071
|
}
|
|
5186
5072
|
}
|
|
5187
5073
|
}
|
|
5188
|
-
}
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
const modifiers = isModelListener2 && getModelModifiers(props, event.slice(7));
|
|
5192
|
-
if (modifiers) {
|
|
5193
|
-
if (modifiers.trim) {
|
|
5194
|
-
args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
5074
|
+
} else {
|
|
5075
|
+
if (setFullProps(instance, rawProps, props, attrs)) {
|
|
5076
|
+
hasAttrsChanged = true;
|
|
5195
5077
|
}
|
|
5196
|
-
|
|
5197
|
-
|
|
5078
|
+
let kebabKey;
|
|
5079
|
+
for (const key in rawCurrentProps) {
|
|
5080
|
+
if (!rawProps || // for camelCase
|
|
5081
|
+
!hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
|
|
5082
|
+
// and converted to camelCase (#955)
|
|
5083
|
+
((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
5084
|
+
if (options) {
|
|
5085
|
+
if (rawPrevProps && // for camelCase
|
|
5086
|
+
(rawPrevProps[key] !== void 0 || // for kebab-case
|
|
5087
|
+
rawPrevProps[kebabKey] !== void 0)) {
|
|
5088
|
+
props[key] = resolvePropValue(
|
|
5089
|
+
options,
|
|
5090
|
+
rawCurrentProps,
|
|
5091
|
+
key,
|
|
5092
|
+
void 0,
|
|
5093
|
+
instance,
|
|
5094
|
+
true
|
|
5095
|
+
);
|
|
5096
|
+
}
|
|
5097
|
+
} else {
|
|
5098
|
+
delete props[key];
|
|
5099
|
+
}
|
|
5100
|
+
}
|
|
5101
|
+
}
|
|
5102
|
+
if (attrs !== rawCurrentProps) {
|
|
5103
|
+
for (const key in attrs) {
|
|
5104
|
+
if (!rawProps || !hasOwn(rawProps, key) && true) {
|
|
5105
|
+
delete attrs[key];
|
|
5106
|
+
hasAttrsChanged = true;
|
|
5107
|
+
}
|
|
5108
|
+
}
|
|
5198
5109
|
}
|
|
5199
5110
|
}
|
|
5200
|
-
if (
|
|
5201
|
-
|
|
5111
|
+
if (hasAttrsChanged) {
|
|
5112
|
+
trigger(instance.attrs, "set", "");
|
|
5202
5113
|
}
|
|
5203
5114
|
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
5204
|
-
|
|
5205
|
-
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
5206
|
-
warn$1(
|
|
5207
|
-
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
|
|
5208
|
-
instance,
|
|
5209
|
-
instance.type
|
|
5210
|
-
)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(
|
|
5211
|
-
event
|
|
5212
|
-
)}" instead of "${event}".`
|
|
5213
|
-
);
|
|
5214
|
-
}
|
|
5115
|
+
validateProps(rawProps || {}, props, instance);
|
|
5215
5116
|
}
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5117
|
+
}
|
|
5118
|
+
function setFullProps(instance, rawProps, props, attrs) {
|
|
5119
|
+
const [options, needCastKeys] = instance.propsOptions;
|
|
5120
|
+
let hasAttrsChanged = false;
|
|
5121
|
+
let rawCastValues;
|
|
5122
|
+
if (rawProps) {
|
|
5123
|
+
for (let key in rawProps) {
|
|
5124
|
+
if (isReservedProp(key)) {
|
|
5125
|
+
continue;
|
|
5126
|
+
}
|
|
5127
|
+
const value = rawProps[key];
|
|
5128
|
+
let camelKey;
|
|
5129
|
+
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
5130
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) {
|
|
5131
|
+
props[camelKey] = value;
|
|
5132
|
+
} else {
|
|
5133
|
+
(rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
5134
|
+
}
|
|
5135
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
5136
|
+
if (!(key in attrs) || value !== attrs[key]) {
|
|
5137
|
+
attrs[key] = value;
|
|
5138
|
+
hasAttrsChanged = true;
|
|
5139
|
+
}
|
|
5140
|
+
}
|
|
5141
|
+
}
|
|
5221
5142
|
}
|
|
5222
|
-
if (
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5143
|
+
if (needCastKeys) {
|
|
5144
|
+
const rawCurrentProps = toRaw(props);
|
|
5145
|
+
const castValues = rawCastValues || EMPTY_OBJ;
|
|
5146
|
+
for (let i = 0; i < needCastKeys.length; i++) {
|
|
5147
|
+
const key = needCastKeys[i];
|
|
5148
|
+
props[key] = resolvePropValue(
|
|
5149
|
+
options,
|
|
5150
|
+
rawCurrentProps,
|
|
5151
|
+
key,
|
|
5152
|
+
castValues[key],
|
|
5153
|
+
instance,
|
|
5154
|
+
!hasOwn(castValues, key)
|
|
5155
|
+
);
|
|
5156
|
+
}
|
|
5229
5157
|
}
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5158
|
+
return hasAttrsChanged;
|
|
5159
|
+
}
|
|
5160
|
+
function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
5161
|
+
const opt = options[key];
|
|
5162
|
+
if (opt != null) {
|
|
5163
|
+
const hasDefault = hasOwn(opt, "default");
|
|
5164
|
+
if (hasDefault && value === void 0) {
|
|
5165
|
+
const defaultValue = opt.default;
|
|
5166
|
+
if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
|
|
5167
|
+
const { propsDefaults } = instance;
|
|
5168
|
+
if (key in propsDefaults) {
|
|
5169
|
+
value = propsDefaults[key];
|
|
5170
|
+
} else {
|
|
5171
|
+
const reset = setCurrentInstance(instance);
|
|
5172
|
+
value = propsDefaults[key] = defaultValue.call(
|
|
5173
|
+
null,
|
|
5174
|
+
props
|
|
5175
|
+
);
|
|
5176
|
+
reset();
|
|
5177
|
+
}
|
|
5178
|
+
} else {
|
|
5179
|
+
value = defaultValue;
|
|
5180
|
+
}
|
|
5181
|
+
if (instance.ce) {
|
|
5182
|
+
instance.ce._setProp(key, value);
|
|
5183
|
+
}
|
|
5184
|
+
}
|
|
5185
|
+
if (opt[
|
|
5186
|
+
0
|
|
5187
|
+
/* shouldCast */
|
|
5188
|
+
]) {
|
|
5189
|
+
if (isAbsent && !hasDefault) {
|
|
5190
|
+
value = false;
|
|
5191
|
+
} else if (opt[
|
|
5192
|
+
1
|
|
5193
|
+
/* shouldCastTrue */
|
|
5194
|
+
] && (value === "" || value === hyphenate(key))) {
|
|
5195
|
+
value = true;
|
|
5196
|
+
}
|
|
5236
5197
|
}
|
|
5237
|
-
instance.emitted[handlerName] = true;
|
|
5238
|
-
callWithAsyncErrorHandling(
|
|
5239
|
-
onceHandler,
|
|
5240
|
-
instance,
|
|
5241
|
-
6,
|
|
5242
|
-
args
|
|
5243
|
-
);
|
|
5244
5198
|
}
|
|
5199
|
+
return value;
|
|
5245
5200
|
}
|
|
5246
|
-
const
|
|
5247
|
-
function
|
|
5248
|
-
const cache = asMixin ?
|
|
5201
|
+
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
5202
|
+
function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
5203
|
+
const cache = asMixin ? mixinPropsCache : appContext.propsCache;
|
|
5249
5204
|
const cached = cache.get(comp);
|
|
5250
|
-
if (cached
|
|
5205
|
+
if (cached) {
|
|
5251
5206
|
return cached;
|
|
5252
5207
|
}
|
|
5253
|
-
const raw = comp.
|
|
5254
|
-
|
|
5208
|
+
const raw = comp.props;
|
|
5209
|
+
const normalized = {};
|
|
5210
|
+
const needCastKeys = [];
|
|
5255
5211
|
let hasExtends = false;
|
|
5256
5212
|
if (!isFunction(comp)) {
|
|
5257
|
-
const
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
}
|
|
5213
|
+
const extendProps = (raw2) => {
|
|
5214
|
+
hasExtends = true;
|
|
5215
|
+
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
5216
|
+
extend(normalized, props);
|
|
5217
|
+
if (keys) needCastKeys.push(...keys);
|
|
5263
5218
|
};
|
|
5264
5219
|
if (!asMixin && appContext.mixins.length) {
|
|
5265
|
-
appContext.mixins.forEach(
|
|
5220
|
+
appContext.mixins.forEach(extendProps);
|
|
5266
5221
|
}
|
|
5267
5222
|
if (comp.extends) {
|
|
5268
|
-
|
|
5223
|
+
extendProps(comp.extends);
|
|
5269
5224
|
}
|
|
5270
5225
|
if (comp.mixins) {
|
|
5271
|
-
comp.mixins.forEach(
|
|
5226
|
+
comp.mixins.forEach(extendProps);
|
|
5272
5227
|
}
|
|
5273
5228
|
}
|
|
5274
5229
|
if (!raw && !hasExtends) {
|
|
5275
5230
|
if (isObject(comp)) {
|
|
5276
|
-
cache.set(comp,
|
|
5231
|
+
cache.set(comp, EMPTY_ARR);
|
|
5277
5232
|
}
|
|
5278
|
-
return
|
|
5233
|
+
return EMPTY_ARR;
|
|
5279
5234
|
}
|
|
5280
5235
|
if (isArray(raw)) {
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5236
|
+
for (let i = 0; i < raw.length; i++) {
|
|
5237
|
+
if (!!(process$1.env.NODE_ENV !== "production") && !isString(raw[i])) {
|
|
5238
|
+
warn$1(`props must be strings when using array syntax.`, raw[i]);
|
|
5239
|
+
}
|
|
5240
|
+
const normalizedKey = camelize(raw[i]);
|
|
5241
|
+
if (validatePropName(normalizedKey)) {
|
|
5242
|
+
normalized[normalizedKey] = EMPTY_OBJ;
|
|
5243
|
+
}
|
|
5244
|
+
}
|
|
5245
|
+
} else if (raw) {
|
|
5246
|
+
if (!!(process$1.env.NODE_ENV !== "production") && !isObject(raw)) {
|
|
5247
|
+
warn$1(`invalid props options`, raw);
|
|
5248
|
+
}
|
|
5249
|
+
for (const key in raw) {
|
|
5250
|
+
const normalizedKey = camelize(key);
|
|
5251
|
+
if (validatePropName(normalizedKey)) {
|
|
5252
|
+
const opt = raw[key];
|
|
5253
|
+
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
|
|
5254
|
+
const propType = prop.type;
|
|
5255
|
+
let shouldCast = false;
|
|
5256
|
+
let shouldCastTrue = true;
|
|
5257
|
+
if (isArray(propType)) {
|
|
5258
|
+
for (let index = 0; index < propType.length; ++index) {
|
|
5259
|
+
const type = propType[index];
|
|
5260
|
+
const typeName = isFunction(type) && type.name;
|
|
5261
|
+
if (typeName === "Boolean") {
|
|
5262
|
+
shouldCast = true;
|
|
5263
|
+
break;
|
|
5264
|
+
} else if (typeName === "String") {
|
|
5265
|
+
shouldCastTrue = false;
|
|
5266
|
+
}
|
|
5267
|
+
}
|
|
5268
|
+
} else {
|
|
5269
|
+
shouldCast = isFunction(propType) && propType.name === "Boolean";
|
|
5270
|
+
}
|
|
5271
|
+
prop[
|
|
5272
|
+
0
|
|
5273
|
+
/* shouldCast */
|
|
5274
|
+
] = shouldCast;
|
|
5275
|
+
prop[
|
|
5276
|
+
1
|
|
5277
|
+
/* shouldCastTrue */
|
|
5278
|
+
] = shouldCastTrue;
|
|
5279
|
+
if (shouldCast || hasOwn(prop, "default")) {
|
|
5280
|
+
needCastKeys.push(normalizedKey);
|
|
5281
|
+
}
|
|
5282
|
+
}
|
|
5283
|
+
}
|
|
5284
5284
|
}
|
|
5285
|
+
const res = [normalized, needCastKeys];
|
|
5285
5286
|
if (isObject(comp)) {
|
|
5286
|
-
cache.set(comp,
|
|
5287
|
+
cache.set(comp, res);
|
|
5287
5288
|
}
|
|
5288
|
-
return
|
|
5289
|
+
return res;
|
|
5289
5290
|
}
|
|
5290
|
-
function
|
|
5291
|
-
if (
|
|
5292
|
-
return
|
|
5291
|
+
function validatePropName(key) {
|
|
5292
|
+
if (key[0] !== "$" && !isReservedProp(key)) {
|
|
5293
|
+
return true;
|
|
5294
|
+
} else if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
5295
|
+
warn$1(`Invalid prop name: "${key}" is a reserved property.`);
|
|
5293
5296
|
}
|
|
5294
|
-
|
|
5295
|
-
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
5297
|
+
return false;
|
|
5296
5298
|
}
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5299
|
+
function getType(ctor) {
|
|
5300
|
+
if (ctor === null) {
|
|
5301
|
+
return "null";
|
|
5302
|
+
}
|
|
5303
|
+
if (typeof ctor === "function") {
|
|
5304
|
+
return ctor.name || "";
|
|
5305
|
+
} else if (typeof ctor === "object") {
|
|
5306
|
+
const name = ctor.constructor && ctor.constructor.name;
|
|
5307
|
+
return name || "";
|
|
5308
|
+
}
|
|
5309
|
+
return "";
|
|
5300
5310
|
}
|
|
5301
|
-
function
|
|
5302
|
-
const
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
setupState,
|
|
5316
|
-
ctx,
|
|
5317
|
-
inheritAttrs
|
|
5318
|
-
} = instance;
|
|
5319
|
-
const prev = setCurrentRenderingInstance(instance);
|
|
5320
|
-
let result;
|
|
5321
|
-
let fallthroughAttrs;
|
|
5322
|
-
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
5323
|
-
accessedAttrs = false;
|
|
5311
|
+
function validateProps(rawProps, props, instance) {
|
|
5312
|
+
const resolvedValues = toRaw(props);
|
|
5313
|
+
const options = instance.propsOptions[0];
|
|
5314
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
5315
|
+
for (const key in options) {
|
|
5316
|
+
let opt = options[key];
|
|
5317
|
+
if (opt == null) continue;
|
|
5318
|
+
validateProp(
|
|
5319
|
+
key,
|
|
5320
|
+
resolvedValues[key],
|
|
5321
|
+
opt,
|
|
5322
|
+
!!(process$1.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues,
|
|
5323
|
+
!camelizePropsKey.includes(key)
|
|
5324
|
+
);
|
|
5324
5325
|
}
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
`Property '${String(
|
|
5332
|
-
key
|
|
5333
|
-
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
5334
|
-
);
|
|
5335
|
-
return Reflect.get(target, key, receiver);
|
|
5336
|
-
}
|
|
5337
|
-
}) : proxyToUse;
|
|
5338
|
-
result = normalizeVNode(
|
|
5339
|
-
render.call(
|
|
5340
|
-
thisProxy,
|
|
5341
|
-
proxyToUse,
|
|
5342
|
-
renderCache,
|
|
5343
|
-
!!(process$1.env.NODE_ENV !== "production") ? shallowReadonly(props) : props,
|
|
5344
|
-
setupState,
|
|
5345
|
-
data,
|
|
5346
|
-
ctx
|
|
5347
|
-
)
|
|
5348
|
-
);
|
|
5349
|
-
fallthroughAttrs = attrs;
|
|
5350
|
-
} else {
|
|
5351
|
-
const render2 = Component;
|
|
5352
|
-
if (!!(process$1.env.NODE_ENV !== "production") && attrs === props) {
|
|
5353
|
-
markAttrsAccessed();
|
|
5354
|
-
}
|
|
5355
|
-
result = normalizeVNode(
|
|
5356
|
-
render2.length > 1 ? render2(
|
|
5357
|
-
!!(process$1.env.NODE_ENV !== "production") ? shallowReadonly(props) : props,
|
|
5358
|
-
!!(process$1.env.NODE_ENV !== "production") ? {
|
|
5359
|
-
get attrs() {
|
|
5360
|
-
markAttrsAccessed();
|
|
5361
|
-
return shallowReadonly(attrs);
|
|
5362
|
-
},
|
|
5363
|
-
slots,
|
|
5364
|
-
emit: emit2
|
|
5365
|
-
} : { attrs, slots, emit: emit2 }
|
|
5366
|
-
) : render2(
|
|
5367
|
-
!!(process$1.env.NODE_ENV !== "production") ? shallowReadonly(props) : props,
|
|
5368
|
-
null
|
|
5369
|
-
)
|
|
5370
|
-
);
|
|
5371
|
-
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
5372
|
-
}
|
|
5373
|
-
} catch (err) {
|
|
5374
|
-
blockStack.length = 0;
|
|
5375
|
-
handleError(err, instance, 1);
|
|
5376
|
-
result = createVNode(Comment);
|
|
5326
|
+
}
|
|
5327
|
+
function validateProp(name, value, prop, props, isAbsent) {
|
|
5328
|
+
const { type, required, validator, skipCheck } = prop;
|
|
5329
|
+
if (required && isAbsent) {
|
|
5330
|
+
warn$1('Missing required prop: "' + name + '"');
|
|
5331
|
+
return;
|
|
5377
5332
|
}
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
if (!!(process$1.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) {
|
|
5381
|
-
[root, setRoot] = getChildRoot(result);
|
|
5333
|
+
if (value == null && !required) {
|
|
5334
|
+
return;
|
|
5382
5335
|
}
|
|
5383
|
-
if (
|
|
5384
|
-
|
|
5385
|
-
const
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
propsOptions
|
|
5392
|
-
);
|
|
5393
|
-
}
|
|
5394
|
-
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
5395
|
-
} else if (!!(process$1.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) {
|
|
5396
|
-
const allAttrs = Object.keys(attrs);
|
|
5397
|
-
const eventAttrs = [];
|
|
5398
|
-
const extraAttrs = [];
|
|
5399
|
-
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
5400
|
-
const key = allAttrs[i];
|
|
5401
|
-
if (isOn(key)) {
|
|
5402
|
-
if (!isModelListener(key)) {
|
|
5403
|
-
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
5404
|
-
}
|
|
5405
|
-
} else {
|
|
5406
|
-
extraAttrs.push(key);
|
|
5407
|
-
}
|
|
5408
|
-
}
|
|
5409
|
-
if (extraAttrs.length) {
|
|
5410
|
-
warn$1(
|
|
5411
|
-
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
|
|
5412
|
-
);
|
|
5413
|
-
}
|
|
5414
|
-
if (eventAttrs.length) {
|
|
5415
|
-
warn$1(
|
|
5416
|
-
`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
|
|
5417
|
-
);
|
|
5418
|
-
}
|
|
5419
|
-
}
|
|
5336
|
+
if (type != null && type !== true && !skipCheck) {
|
|
5337
|
+
let isValid = false;
|
|
5338
|
+
const types = isArray(type) ? type : [type];
|
|
5339
|
+
const expectedTypes = [];
|
|
5340
|
+
for (let i = 0; i < types.length && !isValid; i++) {
|
|
5341
|
+
const { valid, expectedType } = assertType(value, types[i]);
|
|
5342
|
+
expectedTypes.push(expectedType || "");
|
|
5343
|
+
isValid = valid;
|
|
5420
5344
|
}
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
warn$1(
|
|
5425
|
-
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
5426
|
-
);
|
|
5345
|
+
if (!isValid) {
|
|
5346
|
+
warn$1(getInvalidTypeMessage(name, value, expectedTypes));
|
|
5347
|
+
return;
|
|
5427
5348
|
}
|
|
5428
|
-
root = cloneVNode(root, null, false, true);
|
|
5429
|
-
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
5430
5349
|
}
|
|
5431
|
-
if (
|
|
5432
|
-
|
|
5433
|
-
warn$1(
|
|
5434
|
-
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
5435
|
-
);
|
|
5436
|
-
}
|
|
5437
|
-
setTransitionHooks(root, vnode.transition);
|
|
5350
|
+
if (validator && !validator(value, props)) {
|
|
5351
|
+
warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
5438
5352
|
}
|
|
5439
|
-
|
|
5440
|
-
|
|
5353
|
+
}
|
|
5354
|
+
const isSimpleType = /* @__PURE__ */ makeMap(
|
|
5355
|
+
"String,Number,Boolean,Function,Symbol,BigInt"
|
|
5356
|
+
);
|
|
5357
|
+
function assertType(value, type) {
|
|
5358
|
+
let valid;
|
|
5359
|
+
const expectedType = getType(type);
|
|
5360
|
+
if (expectedType === "null") {
|
|
5361
|
+
valid = value === null;
|
|
5362
|
+
} else if (isSimpleType(expectedType)) {
|
|
5363
|
+
const t = typeof value;
|
|
5364
|
+
valid = t === expectedType.toLowerCase();
|
|
5365
|
+
if (!valid && t === "object") {
|
|
5366
|
+
valid = value instanceof type;
|
|
5367
|
+
}
|
|
5368
|
+
} else if (expectedType === "Object") {
|
|
5369
|
+
valid = isObject(value);
|
|
5370
|
+
} else if (expectedType === "Array") {
|
|
5371
|
+
valid = isArray(value);
|
|
5441
5372
|
} else {
|
|
5442
|
-
|
|
5373
|
+
valid = value instanceof type;
|
|
5443
5374
|
}
|
|
5444
|
-
|
|
5445
|
-
|
|
5375
|
+
return {
|
|
5376
|
+
valid,
|
|
5377
|
+
expectedType
|
|
5378
|
+
};
|
|
5446
5379
|
}
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
const childRoot = filterSingleRoot(rawChildren, false);
|
|
5451
|
-
if (!childRoot) {
|
|
5452
|
-
return [vnode, void 0];
|
|
5453
|
-
} else if (!!(process$1.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
|
5454
|
-
return getChildRoot(childRoot);
|
|
5380
|
+
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
5381
|
+
if (expectedTypes.length === 0) {
|
|
5382
|
+
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
5455
5383
|
}
|
|
5456
|
-
|
|
5457
|
-
const
|
|
5458
|
-
const
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
} else if (updatedRoot.patchFlag > 0) {
|
|
5464
|
-
vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
|
|
5465
|
-
}
|
|
5466
|
-
}
|
|
5467
|
-
};
|
|
5468
|
-
return [normalizeVNode(childRoot), setRoot];
|
|
5469
|
-
};
|
|
5470
|
-
function filterSingleRoot(children, recurse = true) {
|
|
5471
|
-
let singleRoot;
|
|
5472
|
-
for (let i = 0; i < children.length; i++) {
|
|
5473
|
-
const child = children[i];
|
|
5474
|
-
if (isVNode(child)) {
|
|
5475
|
-
if (child.type !== Comment || child.children === "v-if") {
|
|
5476
|
-
if (singleRoot) {
|
|
5477
|
-
return;
|
|
5478
|
-
} else {
|
|
5479
|
-
singleRoot = child;
|
|
5480
|
-
if (!!(process$1.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
|
5481
|
-
return filterSingleRoot(singleRoot.children);
|
|
5482
|
-
}
|
|
5483
|
-
}
|
|
5484
|
-
}
|
|
5485
|
-
} else {
|
|
5486
|
-
return;
|
|
5487
|
-
}
|
|
5384
|
+
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
5385
|
+
const expectedType = expectedTypes[0];
|
|
5386
|
+
const receivedType = toRawType(value);
|
|
5387
|
+
const expectedValue = styleValue(value, expectedType);
|
|
5388
|
+
const receivedValue = styleValue(value, receivedType);
|
|
5389
|
+
if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
|
|
5390
|
+
message += ` with value ${expectedValue}`;
|
|
5488
5391
|
}
|
|
5489
|
-
|
|
5392
|
+
message += `, got ${receivedType} `;
|
|
5393
|
+
if (isExplicable(receivedType)) {
|
|
5394
|
+
message += `with value ${receivedValue}.`;
|
|
5395
|
+
}
|
|
5396
|
+
return message;
|
|
5490
5397
|
}
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5398
|
+
function styleValue(value, type) {
|
|
5399
|
+
if (type === "String") {
|
|
5400
|
+
return `"${value}"`;
|
|
5401
|
+
} else if (type === "Number") {
|
|
5402
|
+
return `${Number(value)}`;
|
|
5403
|
+
} else {
|
|
5404
|
+
return `${value}`;
|
|
5497
5405
|
}
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
const
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5406
|
+
}
|
|
5407
|
+
function isExplicable(type) {
|
|
5408
|
+
const explicitTypes = ["string", "number", "boolean"];
|
|
5409
|
+
return explicitTypes.some((elem) => type.toLowerCase() === elem);
|
|
5410
|
+
}
|
|
5411
|
+
function isBoolean(...args) {
|
|
5412
|
+
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
5413
|
+
}
|
|
5414
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
5415
|
+
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
5416
|
+
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
5417
|
+
if (rawSlot._n) {
|
|
5418
|
+
return rawSlot;
|
|
5506
5419
|
}
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5420
|
+
const normalized = withCtx((...args) => {
|
|
5421
|
+
if (!!(process$1.env.NODE_ENV !== "production") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
|
|
5422
|
+
warn$1(
|
|
5423
|
+
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
|
5424
|
+
);
|
|
5425
|
+
}
|
|
5426
|
+
return normalizeSlotValue(rawSlot(...args));
|
|
5427
|
+
}, ctx);
|
|
5428
|
+
normalized._c = false;
|
|
5429
|
+
return normalized;
|
|
5511
5430
|
};
|
|
5512
|
-
|
|
5513
|
-
const
|
|
5514
|
-
const
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5431
|
+
const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
5432
|
+
const ctx = rawSlots._ctx;
|
|
5433
|
+
for (const key in rawSlots) {
|
|
5434
|
+
if (isInternalKey(key)) continue;
|
|
5435
|
+
const value = rawSlots[key];
|
|
5436
|
+
if (isFunction(value)) {
|
|
5437
|
+
slots[key] = normalizeSlot(key, value, ctx);
|
|
5438
|
+
} else if (value != null) {
|
|
5439
|
+
if (!!(process$1.env.NODE_ENV !== "production") && true) {
|
|
5440
|
+
warn$1(
|
|
5441
|
+
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
|
|
5442
|
+
);
|
|
5443
|
+
}
|
|
5444
|
+
const normalized = normalizeSlotValue(value);
|
|
5445
|
+
slots[key] = () => normalized;
|
|
5446
|
+
}
|
|
5518
5447
|
}
|
|
5519
|
-
|
|
5520
|
-
|
|
5448
|
+
};
|
|
5449
|
+
const normalizeVNodeSlots = (instance, children) => {
|
|
5450
|
+
if (!!(process$1.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) {
|
|
5451
|
+
warn$1(
|
|
5452
|
+
`Non-function value encountered for default slot. Prefer function slots for better performance.`
|
|
5453
|
+
);
|
|
5521
5454
|
}
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5455
|
+
const normalized = normalizeSlotValue(children);
|
|
5456
|
+
instance.slots.default = () => normalized;
|
|
5457
|
+
};
|
|
5458
|
+
const assignSlots = (slots, children, optimized) => {
|
|
5459
|
+
for (const key in children) {
|
|
5460
|
+
if (optimized || !isInternalKey(key)) {
|
|
5461
|
+
slots[key] = children[key];
|
|
5525
5462
|
}
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
return true;
|
|
5537
|
-
}
|
|
5463
|
+
}
|
|
5464
|
+
};
|
|
5465
|
+
const initSlots = (instance, children, optimized) => {
|
|
5466
|
+
const slots = instance.slots = createInternalObject();
|
|
5467
|
+
if (instance.vnode.shapeFlag & 32) {
|
|
5468
|
+
const type = children._;
|
|
5469
|
+
if (type) {
|
|
5470
|
+
assignSlots(slots, children, optimized);
|
|
5471
|
+
if (optimized) {
|
|
5472
|
+
def(slots, "_", type, true);
|
|
5538
5473
|
}
|
|
5474
|
+
} else {
|
|
5475
|
+
normalizeObjectSlots(children, slots);
|
|
5539
5476
|
}
|
|
5540
|
-
} else {
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5477
|
+
} else if (children) {
|
|
5478
|
+
normalizeVNodeSlots(instance, children);
|
|
5479
|
+
}
|
|
5480
|
+
};
|
|
5481
|
+
const updateSlots = (instance, children, optimized) => {
|
|
5482
|
+
const { vnode, slots } = instance;
|
|
5483
|
+
let needDeletionCheck = true;
|
|
5484
|
+
let deletionComparisonTarget = EMPTY_OBJ;
|
|
5485
|
+
if (vnode.shapeFlag & 32) {
|
|
5486
|
+
const type = children._;
|
|
5487
|
+
if (type) {
|
|
5488
|
+
if (!!(process$1.env.NODE_ENV !== "production") && isHmrUpdating) {
|
|
5489
|
+
assignSlots(slots, children, optimized);
|
|
5490
|
+
trigger(instance, "set", "$slots");
|
|
5491
|
+
} else if (optimized && type === 1) {
|
|
5492
|
+
needDeletionCheck = false;
|
|
5493
|
+
} else {
|
|
5494
|
+
assignSlots(slots, children, optimized);
|
|
5544
5495
|
}
|
|
5496
|
+
} else {
|
|
5497
|
+
needDeletionCheck = !children.$stable;
|
|
5498
|
+
normalizeObjectSlots(children, slots);
|
|
5545
5499
|
}
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5500
|
+
deletionComparisonTarget = children;
|
|
5501
|
+
} else if (children) {
|
|
5502
|
+
normalizeVNodeSlots(instance, children);
|
|
5503
|
+
deletionComparisonTarget = { default: 1 };
|
|
5504
|
+
}
|
|
5505
|
+
if (needDeletionCheck) {
|
|
5506
|
+
for (const key in slots) {
|
|
5507
|
+
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
5508
|
+
delete slots[key];
|
|
5509
|
+
}
|
|
5554
5510
|
}
|
|
5555
|
-
return hasPropsChanged(prevProps, nextProps, emits);
|
|
5556
5511
|
}
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
if (
|
|
5562
|
-
|
|
5512
|
+
};
|
|
5513
|
+
let supported;
|
|
5514
|
+
let perf;
|
|
5515
|
+
function startMeasure(instance, type) {
|
|
5516
|
+
if (instance.appContext.config.performance && isSupported()) {
|
|
5517
|
+
perf.mark(`vue-${type}-${instance.uid}`);
|
|
5563
5518
|
}
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
|
|
5567
|
-
return true;
|
|
5568
|
-
}
|
|
5519
|
+
if (!!(process$1.env.NODE_ENV !== "production") || false) {
|
|
5520
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
5569
5521
|
}
|
|
5570
|
-
return false;
|
|
5571
5522
|
}
|
|
5572
|
-
function
|
|
5573
|
-
|
|
5574
|
-
const
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
break;
|
|
5583
|
-
}
|
|
5523
|
+
function endMeasure(instance, type) {
|
|
5524
|
+
if (instance.appContext.config.performance && isSupported()) {
|
|
5525
|
+
const startTag = `vue-${type}-${instance.uid}`;
|
|
5526
|
+
const endTag = startTag + `:end`;
|
|
5527
|
+
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
5528
|
+
perf.mark(endTag);
|
|
5529
|
+
perf.measure(measureName, startTag, endTag);
|
|
5530
|
+
perf.clearMeasures(measureName);
|
|
5531
|
+
perf.clearMarks(startTag);
|
|
5532
|
+
perf.clearMarks(endTag);
|
|
5584
5533
|
}
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
const createInternalObject = () => Object.create(internalObjectProto);
|
|
5588
|
-
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
5589
|
-
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
5590
|
-
const props = {};
|
|
5591
|
-
const attrs = createInternalObject();
|
|
5592
|
-
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
5593
|
-
setFullProps(instance, rawProps, props, attrs);
|
|
5594
|
-
for (const key in instance.propsOptions[0]) {
|
|
5595
|
-
if (!(key in props)) {
|
|
5596
|
-
props[key] = void 0;
|
|
5597
|
-
}
|
|
5534
|
+
if (!!(process$1.env.NODE_ENV !== "production") || false) {
|
|
5535
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
5598
5536
|
}
|
|
5599
|
-
|
|
5600
|
-
|
|
5537
|
+
}
|
|
5538
|
+
function isSupported() {
|
|
5539
|
+
if (supported !== void 0) {
|
|
5540
|
+
return supported;
|
|
5601
5541
|
}
|
|
5602
|
-
if (
|
|
5603
|
-
|
|
5542
|
+
if (typeof window !== "undefined" && window.performance) {
|
|
5543
|
+
supported = true;
|
|
5544
|
+
perf = window.performance;
|
|
5604
5545
|
} else {
|
|
5605
|
-
|
|
5606
|
-
instance.props = attrs;
|
|
5607
|
-
} else {
|
|
5608
|
-
instance.props = props;
|
|
5609
|
-
}
|
|
5546
|
+
supported = false;
|
|
5610
5547
|
}
|
|
5611
|
-
|
|
5548
|
+
return supported;
|
|
5612
5549
|
}
|
|
5613
|
-
function
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5550
|
+
function initFeatureFlags() {
|
|
5551
|
+
const needWarn = [];
|
|
5552
|
+
if (!!(process$1.env.NODE_ENV !== "production") && needWarn.length) {
|
|
5553
|
+
const multi = needWarn.length > 1;
|
|
5554
|
+
console.warn(
|
|
5555
|
+
`Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
5556
|
+
|
|
5557
|
+
For more details, see https://link.vuejs.org/feature-flags.`
|
|
5558
|
+
);
|
|
5617
5559
|
}
|
|
5618
5560
|
}
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
!(!!(process$1.env.NODE_ENV !== "production") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16)
|
|
5633
|
-
) {
|
|
5634
|
-
if (patchFlag & 8) {
|
|
5635
|
-
const propsToUpdate = instance.vnode.dynamicProps;
|
|
5636
|
-
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
5637
|
-
let key = propsToUpdate[i];
|
|
5638
|
-
if (isEmitListener(instance.emitsOptions, key)) {
|
|
5639
|
-
continue;
|
|
5640
|
-
}
|
|
5641
|
-
const value = rawProps[key];
|
|
5642
|
-
if (options) {
|
|
5643
|
-
if (hasOwn(attrs, key)) {
|
|
5644
|
-
if (value !== attrs[key]) {
|
|
5645
|
-
attrs[key] = value;
|
|
5646
|
-
hasAttrsChanged = true;
|
|
5647
|
-
}
|
|
5648
|
-
} else {
|
|
5649
|
-
const camelizedKey = camelize(key);
|
|
5650
|
-
props[camelizedKey] = resolvePropValue(
|
|
5651
|
-
options,
|
|
5652
|
-
rawCurrentProps,
|
|
5653
|
-
camelizedKey,
|
|
5654
|
-
value,
|
|
5655
|
-
instance,
|
|
5656
|
-
false
|
|
5657
|
-
);
|
|
5658
|
-
}
|
|
5659
|
-
} else {
|
|
5660
|
-
if (value !== attrs[key]) {
|
|
5661
|
-
attrs[key] = value;
|
|
5662
|
-
hasAttrsChanged = true;
|
|
5663
|
-
}
|
|
5664
|
-
}
|
|
5665
|
-
}
|
|
5666
|
-
}
|
|
5667
|
-
} else {
|
|
5668
|
-
if (setFullProps(instance, rawProps, props, attrs)) {
|
|
5669
|
-
hasAttrsChanged = true;
|
|
5670
|
-
}
|
|
5671
|
-
let kebabKey;
|
|
5672
|
-
for (const key in rawCurrentProps) {
|
|
5673
|
-
if (!rawProps || // for camelCase
|
|
5674
|
-
!hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
|
|
5675
|
-
// and converted to camelCase (#955)
|
|
5676
|
-
((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
5677
|
-
if (options) {
|
|
5678
|
-
if (rawPrevProps && // for camelCase
|
|
5679
|
-
(rawPrevProps[key] !== void 0 || // for kebab-case
|
|
5680
|
-
rawPrevProps[kebabKey] !== void 0)) {
|
|
5681
|
-
props[key] = resolvePropValue(
|
|
5682
|
-
options,
|
|
5683
|
-
rawCurrentProps,
|
|
5684
|
-
key,
|
|
5685
|
-
void 0,
|
|
5686
|
-
instance,
|
|
5687
|
-
true
|
|
5688
|
-
);
|
|
5689
|
-
}
|
|
5690
|
-
} else {
|
|
5691
|
-
delete props[key];
|
|
5692
|
-
}
|
|
5693
|
-
}
|
|
5694
|
-
}
|
|
5695
|
-
if (attrs !== rawCurrentProps) {
|
|
5696
|
-
for (const key in attrs) {
|
|
5697
|
-
if (!rawProps || !hasOwn(rawProps, key) && true) {
|
|
5698
|
-
delete attrs[key];
|
|
5699
|
-
hasAttrsChanged = true;
|
|
5700
|
-
}
|
|
5701
|
-
}
|
|
5702
|
-
}
|
|
5703
|
-
}
|
|
5704
|
-
if (hasAttrsChanged) {
|
|
5705
|
-
trigger(instance.attrs, "set", "");
|
|
5706
|
-
}
|
|
5707
|
-
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
5708
|
-
validateProps(rawProps || {}, props, instance);
|
|
5709
|
-
}
|
|
5710
|
-
}
|
|
5711
|
-
function setFullProps(instance, rawProps, props, attrs) {
|
|
5712
|
-
const [options, needCastKeys] = instance.propsOptions;
|
|
5713
|
-
let hasAttrsChanged = false;
|
|
5714
|
-
let rawCastValues;
|
|
5715
|
-
if (rawProps) {
|
|
5716
|
-
for (let key in rawProps) {
|
|
5717
|
-
if (isReservedProp(key)) {
|
|
5718
|
-
continue;
|
|
5719
|
-
}
|
|
5720
|
-
const value = rawProps[key];
|
|
5721
|
-
let camelKey;
|
|
5722
|
-
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
5723
|
-
if (!needCastKeys || !needCastKeys.includes(camelKey)) {
|
|
5724
|
-
props[camelKey] = value;
|
|
5725
|
-
} else {
|
|
5726
|
-
(rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
5727
|
-
}
|
|
5728
|
-
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
5729
|
-
if (!(key in attrs) || value !== attrs[key]) {
|
|
5730
|
-
attrs[key] = value;
|
|
5731
|
-
hasAttrsChanged = true;
|
|
5732
|
-
}
|
|
5733
|
-
}
|
|
5734
|
-
}
|
|
5735
|
-
}
|
|
5736
|
-
if (needCastKeys) {
|
|
5737
|
-
const rawCurrentProps = toRaw(props);
|
|
5738
|
-
const castValues = rawCastValues || EMPTY_OBJ;
|
|
5739
|
-
for (let i = 0; i < needCastKeys.length; i++) {
|
|
5740
|
-
const key = needCastKeys[i];
|
|
5741
|
-
props[key] = resolvePropValue(
|
|
5742
|
-
options,
|
|
5743
|
-
rawCurrentProps,
|
|
5744
|
-
key,
|
|
5745
|
-
castValues[key],
|
|
5746
|
-
instance,
|
|
5747
|
-
!hasOwn(castValues, key)
|
|
5748
|
-
);
|
|
5749
|
-
}
|
|
5750
|
-
}
|
|
5751
|
-
return hasAttrsChanged;
|
|
5752
|
-
}
|
|
5753
|
-
function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
5754
|
-
const opt = options[key];
|
|
5755
|
-
if (opt != null) {
|
|
5756
|
-
const hasDefault = hasOwn(opt, "default");
|
|
5757
|
-
if (hasDefault && value === void 0) {
|
|
5758
|
-
const defaultValue = opt.default;
|
|
5759
|
-
if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
|
|
5760
|
-
const { propsDefaults } = instance;
|
|
5761
|
-
if (key in propsDefaults) {
|
|
5762
|
-
value = propsDefaults[key];
|
|
5763
|
-
} else {
|
|
5764
|
-
const reset = setCurrentInstance(instance);
|
|
5765
|
-
value = propsDefaults[key] = defaultValue.call(
|
|
5766
|
-
null,
|
|
5767
|
-
props
|
|
5768
|
-
);
|
|
5769
|
-
reset();
|
|
5770
|
-
}
|
|
5771
|
-
} else {
|
|
5772
|
-
value = defaultValue;
|
|
5773
|
-
}
|
|
5774
|
-
if (instance.ce) {
|
|
5775
|
-
instance.ce._setProp(key, value);
|
|
5776
|
-
}
|
|
5777
|
-
}
|
|
5778
|
-
if (opt[
|
|
5779
|
-
0
|
|
5780
|
-
/* shouldCast */
|
|
5781
|
-
]) {
|
|
5782
|
-
if (isAbsent && !hasDefault) {
|
|
5783
|
-
value = false;
|
|
5784
|
-
} else if (opt[
|
|
5785
|
-
1
|
|
5786
|
-
/* shouldCastTrue */
|
|
5787
|
-
] && (value === "" || value === hyphenate(key))) {
|
|
5788
|
-
value = true;
|
|
5789
|
-
}
|
|
5790
|
-
}
|
|
5791
|
-
}
|
|
5792
|
-
return value;
|
|
5793
|
-
}
|
|
5794
|
-
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
5795
|
-
function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
5796
|
-
const cache = asMixin ? mixinPropsCache : appContext.propsCache;
|
|
5797
|
-
const cached = cache.get(comp);
|
|
5798
|
-
if (cached) {
|
|
5799
|
-
return cached;
|
|
5800
|
-
}
|
|
5801
|
-
const raw = comp.props;
|
|
5802
|
-
const normalized = {};
|
|
5803
|
-
const needCastKeys = [];
|
|
5804
|
-
let hasExtends = false;
|
|
5805
|
-
if (!isFunction(comp)) {
|
|
5806
|
-
const extendProps = (raw2) => {
|
|
5807
|
-
hasExtends = true;
|
|
5808
|
-
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
5809
|
-
extend(normalized, props);
|
|
5810
|
-
if (keys) needCastKeys.push(...keys);
|
|
5811
|
-
};
|
|
5812
|
-
if (!asMixin && appContext.mixins.length) {
|
|
5813
|
-
appContext.mixins.forEach(extendProps);
|
|
5814
|
-
}
|
|
5815
|
-
if (comp.extends) {
|
|
5816
|
-
extendProps(comp.extends);
|
|
5817
|
-
}
|
|
5818
|
-
if (comp.mixins) {
|
|
5819
|
-
comp.mixins.forEach(extendProps);
|
|
5820
|
-
}
|
|
5821
|
-
}
|
|
5822
|
-
if (!raw && !hasExtends) {
|
|
5823
|
-
if (isObject(comp)) {
|
|
5824
|
-
cache.set(comp, EMPTY_ARR);
|
|
5825
|
-
}
|
|
5826
|
-
return EMPTY_ARR;
|
|
5827
|
-
}
|
|
5828
|
-
if (isArray(raw)) {
|
|
5829
|
-
for (let i = 0; i < raw.length; i++) {
|
|
5830
|
-
if (!!(process$1.env.NODE_ENV !== "production") && !isString(raw[i])) {
|
|
5831
|
-
warn$1(`props must be strings when using array syntax.`, raw[i]);
|
|
5832
|
-
}
|
|
5833
|
-
const normalizedKey = camelize(raw[i]);
|
|
5834
|
-
if (validatePropName(normalizedKey)) {
|
|
5835
|
-
normalized[normalizedKey] = EMPTY_OBJ;
|
|
5836
|
-
}
|
|
5837
|
-
}
|
|
5838
|
-
} else if (raw) {
|
|
5839
|
-
if (!!(process$1.env.NODE_ENV !== "production") && !isObject(raw)) {
|
|
5840
|
-
warn$1(`invalid props options`, raw);
|
|
5841
|
-
}
|
|
5842
|
-
for (const key in raw) {
|
|
5843
|
-
const normalizedKey = camelize(key);
|
|
5844
|
-
if (validatePropName(normalizedKey)) {
|
|
5845
|
-
const opt = raw[key];
|
|
5846
|
-
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
|
|
5847
|
-
const propType = prop.type;
|
|
5848
|
-
let shouldCast = false;
|
|
5849
|
-
let shouldCastTrue = true;
|
|
5850
|
-
if (isArray(propType)) {
|
|
5851
|
-
for (let index = 0; index < propType.length; ++index) {
|
|
5852
|
-
const type = propType[index];
|
|
5853
|
-
const typeName = isFunction(type) && type.name;
|
|
5854
|
-
if (typeName === "Boolean") {
|
|
5855
|
-
shouldCast = true;
|
|
5856
|
-
break;
|
|
5857
|
-
} else if (typeName === "String") {
|
|
5858
|
-
shouldCastTrue = false;
|
|
5859
|
-
}
|
|
5860
|
-
}
|
|
5861
|
-
} else {
|
|
5862
|
-
shouldCast = isFunction(propType) && propType.name === "Boolean";
|
|
5863
|
-
}
|
|
5864
|
-
prop[
|
|
5865
|
-
0
|
|
5866
|
-
/* shouldCast */
|
|
5867
|
-
] = shouldCast;
|
|
5868
|
-
prop[
|
|
5869
|
-
1
|
|
5870
|
-
/* shouldCastTrue */
|
|
5871
|
-
] = shouldCastTrue;
|
|
5872
|
-
if (shouldCast || hasOwn(prop, "default")) {
|
|
5873
|
-
needCastKeys.push(normalizedKey);
|
|
5874
|
-
}
|
|
5875
|
-
}
|
|
5876
|
-
}
|
|
5877
|
-
}
|
|
5878
|
-
const res = [normalized, needCastKeys];
|
|
5879
|
-
if (isObject(comp)) {
|
|
5880
|
-
cache.set(comp, res);
|
|
5881
|
-
}
|
|
5882
|
-
return res;
|
|
5883
|
-
}
|
|
5884
|
-
function validatePropName(key) {
|
|
5885
|
-
if (key[0] !== "$" && !isReservedProp(key)) {
|
|
5886
|
-
return true;
|
|
5887
|
-
} else if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
5888
|
-
warn$1(`Invalid prop name: "${key}" is a reserved property.`);
|
|
5889
|
-
}
|
|
5890
|
-
return false;
|
|
5891
|
-
}
|
|
5892
|
-
function getType(ctor) {
|
|
5893
|
-
if (ctor === null) {
|
|
5894
|
-
return "null";
|
|
5895
|
-
}
|
|
5896
|
-
if (typeof ctor === "function") {
|
|
5897
|
-
return ctor.name || "";
|
|
5898
|
-
} else if (typeof ctor === "object") {
|
|
5899
|
-
const name = ctor.constructor && ctor.constructor.name;
|
|
5900
|
-
return name || "";
|
|
5901
|
-
}
|
|
5902
|
-
return "";
|
|
5903
|
-
}
|
|
5904
|
-
function validateProps(rawProps, props, instance) {
|
|
5905
|
-
const resolvedValues = toRaw(props);
|
|
5906
|
-
const options = instance.propsOptions[0];
|
|
5907
|
-
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
5908
|
-
for (const key in options) {
|
|
5909
|
-
let opt = options[key];
|
|
5910
|
-
if (opt == null) continue;
|
|
5911
|
-
validateProp(
|
|
5912
|
-
key,
|
|
5913
|
-
resolvedValues[key],
|
|
5914
|
-
opt,
|
|
5915
|
-
!!(process$1.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues,
|
|
5916
|
-
!camelizePropsKey.includes(key)
|
|
5917
|
-
);
|
|
5918
|
-
}
|
|
5919
|
-
}
|
|
5920
|
-
function validateProp(name, value, prop, props, isAbsent) {
|
|
5921
|
-
const { type, required, validator, skipCheck } = prop;
|
|
5922
|
-
if (required && isAbsent) {
|
|
5923
|
-
warn$1('Missing required prop: "' + name + '"');
|
|
5924
|
-
return;
|
|
5925
|
-
}
|
|
5926
|
-
if (value == null && !required) {
|
|
5927
|
-
return;
|
|
5928
|
-
}
|
|
5929
|
-
if (type != null && type !== true && !skipCheck) {
|
|
5930
|
-
let isValid = false;
|
|
5931
|
-
const types = isArray(type) ? type : [type];
|
|
5932
|
-
const expectedTypes = [];
|
|
5933
|
-
for (let i = 0; i < types.length && !isValid; i++) {
|
|
5934
|
-
const { valid, expectedType } = assertType(value, types[i]);
|
|
5935
|
-
expectedTypes.push(expectedType || "");
|
|
5936
|
-
isValid = valid;
|
|
5937
|
-
}
|
|
5938
|
-
if (!isValid) {
|
|
5939
|
-
warn$1(getInvalidTypeMessage(name, value, expectedTypes));
|
|
5940
|
-
return;
|
|
5941
|
-
}
|
|
5942
|
-
}
|
|
5943
|
-
if (validator && !validator(value, props)) {
|
|
5944
|
-
warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
5945
|
-
}
|
|
5946
|
-
}
|
|
5947
|
-
const isSimpleType = /* @__PURE__ */ makeMap(
|
|
5948
|
-
"String,Number,Boolean,Function,Symbol,BigInt"
|
|
5949
|
-
);
|
|
5950
|
-
function assertType(value, type) {
|
|
5951
|
-
let valid;
|
|
5952
|
-
const expectedType = getType(type);
|
|
5953
|
-
if (expectedType === "null") {
|
|
5954
|
-
valid = value === null;
|
|
5955
|
-
} else if (isSimpleType(expectedType)) {
|
|
5956
|
-
const t = typeof value;
|
|
5957
|
-
valid = t === expectedType.toLowerCase();
|
|
5958
|
-
if (!valid && t === "object") {
|
|
5959
|
-
valid = value instanceof type;
|
|
5960
|
-
}
|
|
5961
|
-
} else if (expectedType === "Object") {
|
|
5962
|
-
valid = isObject(value);
|
|
5963
|
-
} else if (expectedType === "Array") {
|
|
5964
|
-
valid = isArray(value);
|
|
5965
|
-
} else {
|
|
5966
|
-
valid = value instanceof type;
|
|
5967
|
-
}
|
|
5968
|
-
return {
|
|
5969
|
-
valid,
|
|
5970
|
-
expectedType
|
|
5971
|
-
};
|
|
5972
|
-
}
|
|
5973
|
-
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
5974
|
-
if (expectedTypes.length === 0) {
|
|
5975
|
-
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
5976
|
-
}
|
|
5977
|
-
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
5978
|
-
const expectedType = expectedTypes[0];
|
|
5979
|
-
const receivedType = toRawType(value);
|
|
5980
|
-
const expectedValue = styleValue(value, expectedType);
|
|
5981
|
-
const receivedValue = styleValue(value, receivedType);
|
|
5982
|
-
if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
|
|
5983
|
-
message += ` with value ${expectedValue}`;
|
|
5984
|
-
}
|
|
5985
|
-
message += `, got ${receivedType} `;
|
|
5986
|
-
if (isExplicable(receivedType)) {
|
|
5987
|
-
message += `with value ${receivedValue}.`;
|
|
5988
|
-
}
|
|
5989
|
-
return message;
|
|
5990
|
-
}
|
|
5991
|
-
function styleValue(value, type) {
|
|
5992
|
-
if (type === "String") {
|
|
5993
|
-
return `"${value}"`;
|
|
5994
|
-
} else if (type === "Number") {
|
|
5995
|
-
return `${Number(value)}`;
|
|
5996
|
-
} else {
|
|
5997
|
-
return `${value}`;
|
|
5998
|
-
}
|
|
5999
|
-
}
|
|
6000
|
-
function isExplicable(type) {
|
|
6001
|
-
const explicitTypes = ["string", "number", "boolean"];
|
|
6002
|
-
return explicitTypes.some((elem) => type.toLowerCase() === elem);
|
|
6003
|
-
}
|
|
6004
|
-
function isBoolean(...args) {
|
|
6005
|
-
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
6006
|
-
}
|
|
6007
|
-
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
6008
|
-
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
6009
|
-
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
6010
|
-
if (rawSlot._n) {
|
|
6011
|
-
return rawSlot;
|
|
6012
|
-
}
|
|
6013
|
-
const normalized = withCtx((...args) => {
|
|
6014
|
-
if (!!(process$1.env.NODE_ENV !== "production") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
|
|
6015
|
-
warn$1(
|
|
6016
|
-
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
|
6017
|
-
);
|
|
6018
|
-
}
|
|
6019
|
-
return normalizeSlotValue(rawSlot(...args));
|
|
6020
|
-
}, ctx);
|
|
6021
|
-
normalized._c = false;
|
|
6022
|
-
return normalized;
|
|
6023
|
-
};
|
|
6024
|
-
const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
6025
|
-
const ctx = rawSlots._ctx;
|
|
6026
|
-
for (const key in rawSlots) {
|
|
6027
|
-
if (isInternalKey(key)) continue;
|
|
6028
|
-
const value = rawSlots[key];
|
|
6029
|
-
if (isFunction(value)) {
|
|
6030
|
-
slots[key] = normalizeSlot(key, value, ctx);
|
|
6031
|
-
} else if (value != null) {
|
|
6032
|
-
if (!!(process$1.env.NODE_ENV !== "production") && true) {
|
|
6033
|
-
warn$1(
|
|
6034
|
-
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
|
|
6035
|
-
);
|
|
6036
|
-
}
|
|
6037
|
-
const normalized = normalizeSlotValue(value);
|
|
6038
|
-
slots[key] = () => normalized;
|
|
6039
|
-
}
|
|
6040
|
-
}
|
|
6041
|
-
};
|
|
6042
|
-
const normalizeVNodeSlots = (instance, children) => {
|
|
6043
|
-
if (!!(process$1.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) {
|
|
6044
|
-
warn$1(
|
|
6045
|
-
`Non-function value encountered for default slot. Prefer function slots for better performance.`
|
|
6046
|
-
);
|
|
6047
|
-
}
|
|
6048
|
-
const normalized = normalizeSlotValue(children);
|
|
6049
|
-
instance.slots.default = () => normalized;
|
|
6050
|
-
};
|
|
6051
|
-
const assignSlots = (slots, children, optimized) => {
|
|
6052
|
-
for (const key in children) {
|
|
6053
|
-
if (optimized || !isInternalKey(key)) {
|
|
6054
|
-
slots[key] = children[key];
|
|
6055
|
-
}
|
|
6056
|
-
}
|
|
6057
|
-
};
|
|
6058
|
-
const initSlots = (instance, children, optimized) => {
|
|
6059
|
-
const slots = instance.slots = createInternalObject();
|
|
6060
|
-
if (instance.vnode.shapeFlag & 32) {
|
|
6061
|
-
const type = children._;
|
|
6062
|
-
if (type) {
|
|
6063
|
-
assignSlots(slots, children, optimized);
|
|
6064
|
-
if (optimized) {
|
|
6065
|
-
def(slots, "_", type, true);
|
|
6066
|
-
}
|
|
6067
|
-
} else {
|
|
6068
|
-
normalizeObjectSlots(children, slots);
|
|
6069
|
-
}
|
|
6070
|
-
} else if (children) {
|
|
6071
|
-
normalizeVNodeSlots(instance, children);
|
|
6072
|
-
}
|
|
6073
|
-
};
|
|
6074
|
-
const updateSlots = (instance, children, optimized) => {
|
|
6075
|
-
const { vnode, slots } = instance;
|
|
6076
|
-
let needDeletionCheck = true;
|
|
6077
|
-
let deletionComparisonTarget = EMPTY_OBJ;
|
|
6078
|
-
if (vnode.shapeFlag & 32) {
|
|
6079
|
-
const type = children._;
|
|
6080
|
-
if (type) {
|
|
6081
|
-
if (!!(process$1.env.NODE_ENV !== "production") && isHmrUpdating) {
|
|
6082
|
-
assignSlots(slots, children, optimized);
|
|
6083
|
-
trigger(instance, "set", "$slots");
|
|
6084
|
-
} else if (optimized && type === 1) {
|
|
6085
|
-
needDeletionCheck = false;
|
|
6086
|
-
} else {
|
|
6087
|
-
assignSlots(slots, children, optimized);
|
|
6088
|
-
}
|
|
6089
|
-
} else {
|
|
6090
|
-
needDeletionCheck = !children.$stable;
|
|
6091
|
-
normalizeObjectSlots(children, slots);
|
|
6092
|
-
}
|
|
6093
|
-
deletionComparisonTarget = children;
|
|
6094
|
-
} else if (children) {
|
|
6095
|
-
normalizeVNodeSlots(instance, children);
|
|
6096
|
-
deletionComparisonTarget = { default: 1 };
|
|
6097
|
-
}
|
|
6098
|
-
if (needDeletionCheck) {
|
|
6099
|
-
for (const key in slots) {
|
|
6100
|
-
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
6101
|
-
delete slots[key];
|
|
6102
|
-
}
|
|
6103
|
-
}
|
|
6104
|
-
}
|
|
6105
|
-
};
|
|
6106
|
-
let supported;
|
|
6107
|
-
let perf;
|
|
6108
|
-
function startMeasure(instance, type) {
|
|
6109
|
-
if (instance.appContext.config.performance && isSupported()) {
|
|
6110
|
-
perf.mark(`vue-${type}-${instance.uid}`);
|
|
6111
|
-
}
|
|
6112
|
-
if (!!(process$1.env.NODE_ENV !== "production") || false) {
|
|
6113
|
-
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
6114
|
-
}
|
|
6115
|
-
}
|
|
6116
|
-
function endMeasure(instance, type) {
|
|
6117
|
-
if (instance.appContext.config.performance && isSupported()) {
|
|
6118
|
-
const startTag = `vue-${type}-${instance.uid}`;
|
|
6119
|
-
const endTag = startTag + `:end`;
|
|
6120
|
-
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
6121
|
-
perf.mark(endTag);
|
|
6122
|
-
perf.measure(measureName, startTag, endTag);
|
|
6123
|
-
perf.clearMeasures(measureName);
|
|
6124
|
-
perf.clearMarks(startTag);
|
|
6125
|
-
perf.clearMarks(endTag);
|
|
6126
|
-
}
|
|
6127
|
-
if (!!(process$1.env.NODE_ENV !== "production") || false) {
|
|
6128
|
-
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
6129
|
-
}
|
|
6130
|
-
}
|
|
6131
|
-
function isSupported() {
|
|
6132
|
-
if (supported !== void 0) {
|
|
6133
|
-
return supported;
|
|
6134
|
-
}
|
|
6135
|
-
if (typeof window !== "undefined" && window.performance) {
|
|
6136
|
-
supported = true;
|
|
6137
|
-
perf = window.performance;
|
|
6138
|
-
} else {
|
|
6139
|
-
supported = false;
|
|
6140
|
-
}
|
|
6141
|
-
return supported;
|
|
6142
|
-
}
|
|
6143
|
-
function initFeatureFlags() {
|
|
6144
|
-
const needWarn = [];
|
|
6145
|
-
if (!!(process$1.env.NODE_ENV !== "production") && needWarn.length) {
|
|
6146
|
-
const multi = needWarn.length > 1;
|
|
6147
|
-
console.warn(
|
|
6148
|
-
`Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
6149
|
-
|
|
6150
|
-
For more details, see https://link.vuejs.org/feature-flags.`
|
|
6151
|
-
);
|
|
6152
|
-
}
|
|
6153
|
-
}
|
|
6154
|
-
const queuePostRenderEffect = queueEffectWithSuspense;
|
|
6155
|
-
function createRenderer(options) {
|
|
6156
|
-
return baseCreateRenderer(options);
|
|
6157
|
-
}
|
|
6158
|
-
function baseCreateRenderer(options, createHydrationFns) {
|
|
6159
|
-
{
|
|
6160
|
-
initFeatureFlags();
|
|
6161
|
-
}
|
|
6162
|
-
const target = getGlobalThis();
|
|
6163
|
-
target.__VUE__ = true;
|
|
6164
|
-
if (!!(process$1.env.NODE_ENV !== "production") || false) {
|
|
6165
|
-
setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
6166
|
-
}
|
|
5561
|
+
const queuePostRenderEffect = queueEffectWithSuspense;
|
|
5562
|
+
function createRenderer(options) {
|
|
5563
|
+
return baseCreateRenderer(options);
|
|
5564
|
+
}
|
|
5565
|
+
function baseCreateRenderer(options, createHydrationFns) {
|
|
5566
|
+
{
|
|
5567
|
+
initFeatureFlags();
|
|
5568
|
+
}
|
|
5569
|
+
const target = getGlobalThis();
|
|
5570
|
+
target.__VUE__ = true;
|
|
5571
|
+
if (!!(process$1.env.NODE_ENV !== "production") || false) {
|
|
5572
|
+
setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
5573
|
+
}
|
|
6167
5574
|
const {
|
|
6168
5575
|
insert: hostInsert,
|
|
6169
5576
|
remove: hostRemove,
|
|
@@ -7284,362 +6691,913 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7284
6691
|
return;
|
|
7285
6692
|
}
|
|
7286
6693
|
if (type === Fragment) {
|
|
7287
|
-
hostInsert(el, container, anchor);
|
|
7288
|
-
for (let i = 0; i < children.length; i++) {
|
|
7289
|
-
move(children[i], container, anchor, moveType);
|
|
6694
|
+
hostInsert(el, container, anchor);
|
|
6695
|
+
for (let i = 0; i < children.length; i++) {
|
|
6696
|
+
move(children[i], container, anchor, moveType);
|
|
6697
|
+
}
|
|
6698
|
+
hostInsert(vnode.anchor, container, anchor);
|
|
6699
|
+
return;
|
|
6700
|
+
}
|
|
6701
|
+
if (type === Static) {
|
|
6702
|
+
moveStaticNode(vnode, container, anchor);
|
|
6703
|
+
return;
|
|
6704
|
+
}
|
|
6705
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
6706
|
+
if (needTransition2) {
|
|
6707
|
+
if (moveType === 0) {
|
|
6708
|
+
transition.beforeEnter(el);
|
|
6709
|
+
hostInsert(el, container, anchor);
|
|
6710
|
+
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
6711
|
+
} else {
|
|
6712
|
+
const { leave, delayLeave, afterLeave } = transition;
|
|
6713
|
+
const remove22 = () => {
|
|
6714
|
+
if (vnode.ctx.isUnmounted) {
|
|
6715
|
+
hostRemove(el);
|
|
6716
|
+
} else {
|
|
6717
|
+
hostInsert(el, container, anchor);
|
|
6718
|
+
}
|
|
6719
|
+
};
|
|
6720
|
+
const performLeave = () => {
|
|
6721
|
+
if (el._isLeaving) {
|
|
6722
|
+
el[leaveCbKey](
|
|
6723
|
+
true
|
|
6724
|
+
/* cancelled */
|
|
6725
|
+
);
|
|
6726
|
+
}
|
|
6727
|
+
leave(el, () => {
|
|
6728
|
+
remove22();
|
|
6729
|
+
afterLeave && afterLeave();
|
|
6730
|
+
});
|
|
6731
|
+
};
|
|
6732
|
+
if (delayLeave) {
|
|
6733
|
+
delayLeave(el, remove22, performLeave);
|
|
6734
|
+
} else {
|
|
6735
|
+
performLeave();
|
|
6736
|
+
}
|
|
6737
|
+
}
|
|
6738
|
+
} else {
|
|
6739
|
+
hostInsert(el, container, anchor);
|
|
6740
|
+
}
|
|
6741
|
+
};
|
|
6742
|
+
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
6743
|
+
const {
|
|
6744
|
+
type,
|
|
6745
|
+
props,
|
|
6746
|
+
ref: ref3,
|
|
6747
|
+
children,
|
|
6748
|
+
dynamicChildren,
|
|
6749
|
+
shapeFlag,
|
|
6750
|
+
patchFlag,
|
|
6751
|
+
dirs,
|
|
6752
|
+
cacheIndex
|
|
6753
|
+
} = vnode;
|
|
6754
|
+
if (patchFlag === -2) {
|
|
6755
|
+
optimized = false;
|
|
6756
|
+
}
|
|
6757
|
+
if (ref3 != null) {
|
|
6758
|
+
pauseTracking();
|
|
6759
|
+
setRef(ref3, null, parentSuspense, vnode, true);
|
|
6760
|
+
resetTracking();
|
|
6761
|
+
}
|
|
6762
|
+
if (cacheIndex != null) {
|
|
6763
|
+
parentComponent.renderCache[cacheIndex] = void 0;
|
|
6764
|
+
}
|
|
6765
|
+
if (shapeFlag & 256) {
|
|
6766
|
+
parentComponent.ctx.deactivate(vnode);
|
|
6767
|
+
return;
|
|
6768
|
+
}
|
|
6769
|
+
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
6770
|
+
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
6771
|
+
let vnodeHook;
|
|
6772
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
6773
|
+
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6774
|
+
}
|
|
6775
|
+
if (shapeFlag & 6) {
|
|
6776
|
+
unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
6777
|
+
} else {
|
|
6778
|
+
if (shapeFlag & 128) {
|
|
6779
|
+
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
6780
|
+
return;
|
|
6781
|
+
}
|
|
6782
|
+
if (shouldInvokeDirs) {
|
|
6783
|
+
invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
6784
|
+
}
|
|
6785
|
+
if (shapeFlag & 64) {
|
|
6786
|
+
vnode.type.remove(
|
|
6787
|
+
vnode,
|
|
6788
|
+
parentComponent,
|
|
6789
|
+
parentSuspense,
|
|
6790
|
+
internals,
|
|
6791
|
+
doRemove
|
|
6792
|
+
);
|
|
6793
|
+
} else if (dynamicChildren && // #5154
|
|
6794
|
+
// when v-once is used inside a block, setBlockTracking(-1) marks the
|
|
6795
|
+
// parent block with hasOnce: true
|
|
6796
|
+
// so that it doesn't take the fast path during unmount - otherwise
|
|
6797
|
+
// components nested in v-once are never unmounted.
|
|
6798
|
+
!dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
6799
|
+
(type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
|
|
6800
|
+
unmountChildren(
|
|
6801
|
+
dynamicChildren,
|
|
6802
|
+
parentComponent,
|
|
6803
|
+
parentSuspense,
|
|
6804
|
+
false,
|
|
6805
|
+
true
|
|
6806
|
+
);
|
|
6807
|
+
} else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
|
|
6808
|
+
unmountChildren(children, parentComponent, parentSuspense);
|
|
6809
|
+
}
|
|
6810
|
+
if (doRemove) {
|
|
6811
|
+
remove2(vnode);
|
|
6812
|
+
}
|
|
6813
|
+
}
|
|
6814
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
|
|
6815
|
+
queuePostRenderEffect(() => {
|
|
6816
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6817
|
+
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
6818
|
+
}, parentSuspense);
|
|
6819
|
+
}
|
|
6820
|
+
};
|
|
6821
|
+
const remove2 = (vnode) => {
|
|
6822
|
+
const { type, el, anchor, transition } = vnode;
|
|
6823
|
+
if (type === Fragment) {
|
|
6824
|
+
if (!!(process$1.env.NODE_ENV !== "production") && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
|
|
6825
|
+
vnode.children.forEach((child) => {
|
|
6826
|
+
if (child.type === Comment) {
|
|
6827
|
+
hostRemove(child.el);
|
|
6828
|
+
} else {
|
|
6829
|
+
remove2(child);
|
|
6830
|
+
}
|
|
6831
|
+
});
|
|
6832
|
+
} else {
|
|
6833
|
+
removeFragment(el, anchor);
|
|
7290
6834
|
}
|
|
7291
|
-
hostInsert(vnode.anchor, container, anchor);
|
|
7292
6835
|
return;
|
|
7293
6836
|
}
|
|
7294
6837
|
if (type === Static) {
|
|
7295
|
-
|
|
6838
|
+
removeStaticNode(vnode);
|
|
7296
6839
|
return;
|
|
7297
6840
|
}
|
|
7298
|
-
const
|
|
7299
|
-
|
|
7300
|
-
if (
|
|
7301
|
-
transition.
|
|
7302
|
-
|
|
7303
|
-
|
|
6841
|
+
const performRemove = () => {
|
|
6842
|
+
hostRemove(el);
|
|
6843
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
6844
|
+
transition.afterLeave();
|
|
6845
|
+
}
|
|
6846
|
+
};
|
|
6847
|
+
if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
6848
|
+
const { leave, delayLeave } = transition;
|
|
6849
|
+
const performLeave = () => leave(el, performRemove);
|
|
6850
|
+
if (delayLeave) {
|
|
6851
|
+
delayLeave(vnode.el, performRemove, performLeave);
|
|
7304
6852
|
} else {
|
|
7305
|
-
|
|
7306
|
-
const remove22 = () => {
|
|
7307
|
-
if (vnode.ctx.isUnmounted) {
|
|
7308
|
-
hostRemove(el);
|
|
7309
|
-
} else {
|
|
7310
|
-
hostInsert(el, container, anchor);
|
|
7311
|
-
}
|
|
7312
|
-
};
|
|
7313
|
-
const performLeave = () => {
|
|
7314
|
-
if (el._isLeaving) {
|
|
7315
|
-
el[leaveCbKey](
|
|
7316
|
-
true
|
|
7317
|
-
/* cancelled */
|
|
7318
|
-
);
|
|
7319
|
-
}
|
|
7320
|
-
leave(el, () => {
|
|
7321
|
-
remove22();
|
|
7322
|
-
afterLeave && afterLeave();
|
|
7323
|
-
});
|
|
7324
|
-
};
|
|
7325
|
-
if (delayLeave) {
|
|
7326
|
-
delayLeave(el, remove22, performLeave);
|
|
7327
|
-
} else {
|
|
7328
|
-
performLeave();
|
|
7329
|
-
}
|
|
6853
|
+
performLeave();
|
|
7330
6854
|
}
|
|
7331
6855
|
} else {
|
|
7332
|
-
|
|
6856
|
+
performRemove();
|
|
7333
6857
|
}
|
|
7334
6858
|
};
|
|
7335
|
-
const
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
dynamicChildren,
|
|
7342
|
-
shapeFlag,
|
|
7343
|
-
patchFlag,
|
|
7344
|
-
dirs,
|
|
7345
|
-
cacheIndex
|
|
7346
|
-
} = vnode;
|
|
7347
|
-
if (patchFlag === -2) {
|
|
7348
|
-
optimized = false;
|
|
6859
|
+
const removeFragment = (cur, end) => {
|
|
6860
|
+
let next;
|
|
6861
|
+
while (cur !== end) {
|
|
6862
|
+
next = hostNextSibling(cur);
|
|
6863
|
+
hostRemove(cur);
|
|
6864
|
+
cur = next;
|
|
7349
6865
|
}
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
6866
|
+
hostRemove(end);
|
|
6867
|
+
};
|
|
6868
|
+
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
6869
|
+
if (!!(process$1.env.NODE_ENV !== "production") && instance.type.__hmrId) {
|
|
6870
|
+
unregisterHMR(instance);
|
|
6871
|
+
}
|
|
6872
|
+
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
6873
|
+
invalidateMount(m);
|
|
6874
|
+
invalidateMount(a);
|
|
6875
|
+
if (bum) {
|
|
6876
|
+
invokeArrayFns(bum);
|
|
6877
|
+
}
|
|
6878
|
+
scope.stop();
|
|
6879
|
+
if (job) {
|
|
6880
|
+
job.flags |= 8;
|
|
6881
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6882
|
+
}
|
|
6883
|
+
if (um) {
|
|
6884
|
+
queuePostRenderEffect(um, parentSuspense);
|
|
6885
|
+
}
|
|
6886
|
+
queuePostRenderEffect(() => {
|
|
6887
|
+
instance.isUnmounted = true;
|
|
6888
|
+
}, parentSuspense);
|
|
6889
|
+
if (!!(process$1.env.NODE_ENV !== "production") || false) {
|
|
6890
|
+
devtoolsComponentRemoved(instance);
|
|
6891
|
+
}
|
|
6892
|
+
};
|
|
6893
|
+
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
6894
|
+
for (let i = start; i < children.length; i++) {
|
|
6895
|
+
unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
|
|
6896
|
+
}
|
|
6897
|
+
};
|
|
6898
|
+
const getNextHostNode = (vnode) => {
|
|
6899
|
+
if (vnode.shapeFlag & 6) {
|
|
6900
|
+
return getNextHostNode(vnode.component.subTree);
|
|
6901
|
+
}
|
|
6902
|
+
if (vnode.shapeFlag & 128) {
|
|
6903
|
+
return vnode.suspense.next();
|
|
6904
|
+
}
|
|
6905
|
+
const el = hostNextSibling(vnode.anchor || vnode.el);
|
|
6906
|
+
const teleportEnd = el && el[TeleportEndKey];
|
|
6907
|
+
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
6908
|
+
};
|
|
6909
|
+
let isFlushing = false;
|
|
6910
|
+
const render = (vnode, container, namespace) => {
|
|
6911
|
+
if (vnode == null) {
|
|
6912
|
+
if (container._vnode) {
|
|
6913
|
+
unmount(container._vnode, null, null, true);
|
|
6914
|
+
}
|
|
6915
|
+
} else {
|
|
6916
|
+
patch(
|
|
6917
|
+
container._vnode || null,
|
|
6918
|
+
vnode,
|
|
6919
|
+
container,
|
|
6920
|
+
null,
|
|
6921
|
+
null,
|
|
6922
|
+
null,
|
|
6923
|
+
namespace
|
|
6924
|
+
);
|
|
6925
|
+
}
|
|
6926
|
+
container._vnode = vnode;
|
|
6927
|
+
if (!isFlushing) {
|
|
6928
|
+
isFlushing = true;
|
|
6929
|
+
flushPreFlushCbs();
|
|
6930
|
+
flushPostFlushCbs();
|
|
6931
|
+
isFlushing = false;
|
|
6932
|
+
}
|
|
6933
|
+
};
|
|
6934
|
+
const internals = {
|
|
6935
|
+
p: patch,
|
|
6936
|
+
um: unmount,
|
|
6937
|
+
m: move,
|
|
6938
|
+
r: remove2,
|
|
6939
|
+
mt: mountComponent,
|
|
6940
|
+
mc: mountChildren,
|
|
6941
|
+
pc: patchChildren,
|
|
6942
|
+
pbc: patchBlockChildren,
|
|
6943
|
+
n: getNextHostNode,
|
|
6944
|
+
o: options
|
|
6945
|
+
};
|
|
6946
|
+
let hydrate;
|
|
6947
|
+
return {
|
|
6948
|
+
render,
|
|
6949
|
+
hydrate,
|
|
6950
|
+
createApp: createAppAPI(render)
|
|
6951
|
+
};
|
|
6952
|
+
}
|
|
6953
|
+
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
6954
|
+
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
6955
|
+
}
|
|
6956
|
+
function toggleRecurse({ effect: effect2, job }, allowed) {
|
|
6957
|
+
if (allowed) {
|
|
6958
|
+
effect2.flags |= 32;
|
|
6959
|
+
job.flags |= 4;
|
|
6960
|
+
} else {
|
|
6961
|
+
effect2.flags &= -33;
|
|
6962
|
+
job.flags &= -5;
|
|
6963
|
+
}
|
|
6964
|
+
}
|
|
6965
|
+
function needTransition(parentSuspense, transition) {
|
|
6966
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
6967
|
+
}
|
|
6968
|
+
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
6969
|
+
const ch1 = n1.children;
|
|
6970
|
+
const ch2 = n2.children;
|
|
6971
|
+
if (isArray(ch1) && isArray(ch2)) {
|
|
6972
|
+
for (let i = 0; i < ch1.length; i++) {
|
|
6973
|
+
const c1 = ch1[i];
|
|
6974
|
+
let c2 = ch2[i];
|
|
6975
|
+
if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
|
|
6976
|
+
if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
|
|
6977
|
+
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
6978
|
+
c2.el = c1.el;
|
|
6979
|
+
}
|
|
6980
|
+
if (!shallow && c2.patchFlag !== -2)
|
|
6981
|
+
traverseStaticChildren(c1, c2);
|
|
6982
|
+
}
|
|
6983
|
+
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
6984
|
+
c2.patchFlag !== -1) {
|
|
6985
|
+
c2.el = c1.el;
|
|
6986
|
+
}
|
|
6987
|
+
if (c2.type === Comment && !c2.el) {
|
|
6988
|
+
c2.el = c1.el;
|
|
6989
|
+
}
|
|
6990
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
6991
|
+
c2.el && (c2.el.__vnode = c2);
|
|
6992
|
+
}
|
|
6993
|
+
}
|
|
6994
|
+
}
|
|
6995
|
+
}
|
|
6996
|
+
function getSequence(arr) {
|
|
6997
|
+
const p2 = arr.slice();
|
|
6998
|
+
const result = [0];
|
|
6999
|
+
let i, j, u, v, c;
|
|
7000
|
+
const len = arr.length;
|
|
7001
|
+
for (i = 0; i < len; i++) {
|
|
7002
|
+
const arrI = arr[i];
|
|
7003
|
+
if (arrI !== 0) {
|
|
7004
|
+
j = result[result.length - 1];
|
|
7005
|
+
if (arr[j] < arrI) {
|
|
7006
|
+
p2[i] = j;
|
|
7007
|
+
result.push(i);
|
|
7008
|
+
continue;
|
|
7009
|
+
}
|
|
7010
|
+
u = 0;
|
|
7011
|
+
v = result.length - 1;
|
|
7012
|
+
while (u < v) {
|
|
7013
|
+
c = u + v >> 1;
|
|
7014
|
+
if (arr[result[c]] < arrI) {
|
|
7015
|
+
u = c + 1;
|
|
7016
|
+
} else {
|
|
7017
|
+
v = c;
|
|
7018
|
+
}
|
|
7019
|
+
}
|
|
7020
|
+
if (arrI < arr[result[u]]) {
|
|
7021
|
+
if (u > 0) {
|
|
7022
|
+
p2[i] = result[u - 1];
|
|
7023
|
+
}
|
|
7024
|
+
result[u] = i;
|
|
7025
|
+
}
|
|
7026
|
+
}
|
|
7027
|
+
}
|
|
7028
|
+
u = result.length;
|
|
7029
|
+
v = result[u - 1];
|
|
7030
|
+
while (u-- > 0) {
|
|
7031
|
+
result[u] = v;
|
|
7032
|
+
v = p2[v];
|
|
7033
|
+
}
|
|
7034
|
+
return result;
|
|
7035
|
+
}
|
|
7036
|
+
function locateNonHydratedAsyncRoot(instance) {
|
|
7037
|
+
const subComponent = instance.subTree.component;
|
|
7038
|
+
if (subComponent) {
|
|
7039
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
7040
|
+
return subComponent;
|
|
7041
|
+
} else {
|
|
7042
|
+
return locateNonHydratedAsyncRoot(subComponent);
|
|
7354
7043
|
}
|
|
7355
|
-
|
|
7356
|
-
|
|
7044
|
+
}
|
|
7045
|
+
}
|
|
7046
|
+
function invalidateMount(hooks) {
|
|
7047
|
+
if (hooks) {
|
|
7048
|
+
for (let i = 0; i < hooks.length; i++)
|
|
7049
|
+
hooks[i].flags |= 8;
|
|
7050
|
+
}
|
|
7051
|
+
}
|
|
7052
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
7053
|
+
const useSSRContext = () => {
|
|
7054
|
+
{
|
|
7055
|
+
const ctx = inject(ssrContextKey);
|
|
7056
|
+
if (!ctx) {
|
|
7057
|
+
!!(process$1.env.NODE_ENV !== "production") && warn$1(
|
|
7058
|
+
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
7059
|
+
);
|
|
7357
7060
|
}
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7061
|
+
return ctx;
|
|
7062
|
+
}
|
|
7063
|
+
};
|
|
7064
|
+
function watchEffect(effect2, options) {
|
|
7065
|
+
return doWatch(effect2, null, options);
|
|
7066
|
+
}
|
|
7067
|
+
function watch(source, cb, options) {
|
|
7068
|
+
if (!!(process$1.env.NODE_ENV !== "production") && !isFunction(cb)) {
|
|
7069
|
+
warn$1(
|
|
7070
|
+
`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
|
|
7071
|
+
);
|
|
7072
|
+
}
|
|
7073
|
+
return doWatch(source, cb, options);
|
|
7074
|
+
}
|
|
7075
|
+
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
7076
|
+
const { immediate, deep, flush, once } = options;
|
|
7077
|
+
if (!!(process$1.env.NODE_ENV !== "production") && !cb) {
|
|
7078
|
+
if (immediate !== void 0) {
|
|
7079
|
+
warn$1(
|
|
7080
|
+
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
7081
|
+
);
|
|
7361
7082
|
}
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7083
|
+
if (deep !== void 0) {
|
|
7084
|
+
warn$1(
|
|
7085
|
+
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
7086
|
+
);
|
|
7367
7087
|
}
|
|
7368
|
-
if (
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
7373
|
-
return;
|
|
7374
|
-
}
|
|
7375
|
-
if (shouldInvokeDirs) {
|
|
7376
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
7377
|
-
}
|
|
7378
|
-
if (shapeFlag & 64) {
|
|
7379
|
-
vnode.type.remove(
|
|
7380
|
-
vnode,
|
|
7381
|
-
parentComponent,
|
|
7382
|
-
parentSuspense,
|
|
7383
|
-
internals,
|
|
7384
|
-
doRemove
|
|
7385
|
-
);
|
|
7386
|
-
} else if (dynamicChildren && // #5154
|
|
7387
|
-
// when v-once is used inside a block, setBlockTracking(-1) marks the
|
|
7388
|
-
// parent block with hasOnce: true
|
|
7389
|
-
// so that it doesn't take the fast path during unmount - otherwise
|
|
7390
|
-
// components nested in v-once are never unmounted.
|
|
7391
|
-
!dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
7392
|
-
(type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
|
|
7393
|
-
unmountChildren(
|
|
7394
|
-
dynamicChildren,
|
|
7395
|
-
parentComponent,
|
|
7396
|
-
parentSuspense,
|
|
7397
|
-
false,
|
|
7398
|
-
true
|
|
7399
|
-
);
|
|
7400
|
-
} else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
|
|
7401
|
-
unmountChildren(children, parentComponent, parentSuspense);
|
|
7402
|
-
}
|
|
7403
|
-
if (doRemove) {
|
|
7404
|
-
remove2(vnode);
|
|
7405
|
-
}
|
|
7088
|
+
if (once !== void 0) {
|
|
7089
|
+
warn$1(
|
|
7090
|
+
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
7091
|
+
);
|
|
7406
7092
|
}
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7093
|
+
}
|
|
7094
|
+
const baseWatchOptions = extend({}, options);
|
|
7095
|
+
if (!!(process$1.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
|
|
7096
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
7097
|
+
let ssrCleanup;
|
|
7098
|
+
if (isInSSRComponentSetup) {
|
|
7099
|
+
if (flush === "sync") {
|
|
7100
|
+
const ctx = useSSRContext();
|
|
7101
|
+
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
7102
|
+
} else if (!runsImmediately) {
|
|
7103
|
+
const watchStopHandle = () => {
|
|
7104
|
+
};
|
|
7105
|
+
watchStopHandle.stop = NOOP;
|
|
7106
|
+
watchStopHandle.resume = NOOP;
|
|
7107
|
+
watchStopHandle.pause = NOOP;
|
|
7108
|
+
return watchStopHandle;
|
|
7412
7109
|
}
|
|
7413
|
-
}
|
|
7414
|
-
const
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7110
|
+
}
|
|
7111
|
+
const instance = currentInstance;
|
|
7112
|
+
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
7113
|
+
let isPre = false;
|
|
7114
|
+
if (flush === "post") {
|
|
7115
|
+
baseWatchOptions.scheduler = (job) => {
|
|
7116
|
+
queuePostRenderEffect(job, instance && instance.suspense);
|
|
7117
|
+
};
|
|
7118
|
+
} else if (flush !== "sync") {
|
|
7119
|
+
isPre = true;
|
|
7120
|
+
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
7121
|
+
if (isFirstRun) {
|
|
7122
|
+
job();
|
|
7425
7123
|
} else {
|
|
7426
|
-
|
|
7427
|
-
}
|
|
7428
|
-
return;
|
|
7429
|
-
}
|
|
7430
|
-
if (type === Static) {
|
|
7431
|
-
removeStaticNode(vnode);
|
|
7432
|
-
return;
|
|
7433
|
-
}
|
|
7434
|
-
const performRemove = () => {
|
|
7435
|
-
hostRemove(el);
|
|
7436
|
-
if (transition && !transition.persisted && transition.afterLeave) {
|
|
7437
|
-
transition.afterLeave();
|
|
7124
|
+
queueJob(job);
|
|
7438
7125
|
}
|
|
7439
7126
|
};
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7127
|
+
}
|
|
7128
|
+
baseWatchOptions.augmentJob = (job) => {
|
|
7129
|
+
if (cb) {
|
|
7130
|
+
job.flags |= 4;
|
|
7131
|
+
}
|
|
7132
|
+
if (isPre) {
|
|
7133
|
+
job.flags |= 2;
|
|
7134
|
+
if (instance) {
|
|
7135
|
+
job.id = instance.uid;
|
|
7136
|
+
job.i = instance;
|
|
7447
7137
|
}
|
|
7448
|
-
} else {
|
|
7449
|
-
performRemove();
|
|
7450
7138
|
}
|
|
7451
7139
|
};
|
|
7452
|
-
const
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7140
|
+
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
7141
|
+
if (isInSSRComponentSetup) {
|
|
7142
|
+
if (ssrCleanup) {
|
|
7143
|
+
ssrCleanup.push(watchHandle);
|
|
7144
|
+
} else if (runsImmediately) {
|
|
7145
|
+
watchHandle();
|
|
7458
7146
|
}
|
|
7459
|
-
|
|
7147
|
+
}
|
|
7148
|
+
return watchHandle;
|
|
7149
|
+
}
|
|
7150
|
+
function instanceWatch(source, value, options) {
|
|
7151
|
+
const publicThis = this.proxy;
|
|
7152
|
+
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
7153
|
+
let cb;
|
|
7154
|
+
if (isFunction(value)) {
|
|
7155
|
+
cb = value;
|
|
7156
|
+
} else {
|
|
7157
|
+
cb = value.handler;
|
|
7158
|
+
options = value;
|
|
7159
|
+
}
|
|
7160
|
+
const reset = setCurrentInstance(this);
|
|
7161
|
+
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
7162
|
+
reset();
|
|
7163
|
+
return res;
|
|
7164
|
+
}
|
|
7165
|
+
function createPathGetter(ctx, path) {
|
|
7166
|
+
const segments = path.split(".");
|
|
7167
|
+
return () => {
|
|
7168
|
+
let cur = ctx;
|
|
7169
|
+
for (let i = 0; i < segments.length && cur; i++) {
|
|
7170
|
+
cur = cur[segments[i]];
|
|
7171
|
+
}
|
|
7172
|
+
return cur;
|
|
7460
7173
|
};
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7174
|
+
}
|
|
7175
|
+
const getModelModifiers = (props, modelName) => {
|
|
7176
|
+
return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
|
|
7177
|
+
};
|
|
7178
|
+
function emit(instance, event, ...rawArgs) {
|
|
7179
|
+
if (instance.isUnmounted) return;
|
|
7180
|
+
const props = instance.vnode.props || EMPTY_OBJ;
|
|
7181
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
7182
|
+
const {
|
|
7183
|
+
emitsOptions,
|
|
7184
|
+
propsOptions: [propsOptions]
|
|
7185
|
+
} = instance;
|
|
7186
|
+
if (emitsOptions) {
|
|
7187
|
+
if (!(event in emitsOptions) && true) {
|
|
7188
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
7189
|
+
warn$1(
|
|
7190
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
7191
|
+
);
|
|
7192
|
+
}
|
|
7193
|
+
} else {
|
|
7194
|
+
const validator = emitsOptions[event];
|
|
7195
|
+
if (isFunction(validator)) {
|
|
7196
|
+
const isValid = validator(...rawArgs);
|
|
7197
|
+
if (!isValid) {
|
|
7198
|
+
warn$1(
|
|
7199
|
+
`Invalid event arguments: event validation failed for event "${event}".`
|
|
7200
|
+
);
|
|
7201
|
+
}
|
|
7202
|
+
}
|
|
7203
|
+
}
|
|
7204
|
+
}
|
|
7205
|
+
}
|
|
7206
|
+
let args = rawArgs;
|
|
7207
|
+
const isModelListener2 = event.startsWith("update:");
|
|
7208
|
+
const modifiers = isModelListener2 && getModelModifiers(props, event.slice(7));
|
|
7209
|
+
if (modifiers) {
|
|
7210
|
+
if (modifiers.trim) {
|
|
7211
|
+
args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
7464
7212
|
}
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
invalidateMount(a);
|
|
7468
|
-
if (bum) {
|
|
7469
|
-
invokeArrayFns(bum);
|
|
7213
|
+
if (modifiers.number) {
|
|
7214
|
+
args = rawArgs.map(looseToNumber);
|
|
7470
7215
|
}
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7216
|
+
}
|
|
7217
|
+
if (!!(process$1.env.NODE_ENV !== "production") || false) {
|
|
7218
|
+
devtoolsComponentEmit(instance, event, args);
|
|
7219
|
+
}
|
|
7220
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
7221
|
+
const lowerCaseEvent = event.toLowerCase();
|
|
7222
|
+
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
7223
|
+
warn$1(
|
|
7224
|
+
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
|
|
7225
|
+
instance,
|
|
7226
|
+
instance.type
|
|
7227
|
+
)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(
|
|
7228
|
+
event
|
|
7229
|
+
)}" instead of "${event}".`
|
|
7230
|
+
);
|
|
7475
7231
|
}
|
|
7476
|
-
|
|
7477
|
-
|
|
7232
|
+
}
|
|
7233
|
+
let handlerName;
|
|
7234
|
+
let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
|
|
7235
|
+
props[handlerName = toHandlerKey(camelize(event))];
|
|
7236
|
+
if (!handler && isModelListener2) {
|
|
7237
|
+
handler = props[handlerName = toHandlerKey(hyphenate(event))];
|
|
7238
|
+
}
|
|
7239
|
+
if (handler) {
|
|
7240
|
+
callWithAsyncErrorHandling(
|
|
7241
|
+
handler,
|
|
7242
|
+
instance,
|
|
7243
|
+
6,
|
|
7244
|
+
args
|
|
7245
|
+
);
|
|
7246
|
+
}
|
|
7247
|
+
const onceHandler = props[handlerName + `Once`];
|
|
7248
|
+
if (onceHandler) {
|
|
7249
|
+
if (!instance.emitted) {
|
|
7250
|
+
instance.emitted = {};
|
|
7251
|
+
} else if (instance.emitted[handlerName]) {
|
|
7252
|
+
return;
|
|
7478
7253
|
}
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7254
|
+
instance.emitted[handlerName] = true;
|
|
7255
|
+
callWithAsyncErrorHandling(
|
|
7256
|
+
onceHandler,
|
|
7257
|
+
instance,
|
|
7258
|
+
6,
|
|
7259
|
+
args
|
|
7260
|
+
);
|
|
7261
|
+
}
|
|
7262
|
+
}
|
|
7263
|
+
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
7264
|
+
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
7265
|
+
const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
7266
|
+
const cached = cache.get(comp);
|
|
7267
|
+
if (cached !== void 0) {
|
|
7268
|
+
return cached;
|
|
7269
|
+
}
|
|
7270
|
+
const raw = comp.emits;
|
|
7271
|
+
let normalized = {};
|
|
7272
|
+
let hasExtends = false;
|
|
7273
|
+
if (!isFunction(comp)) {
|
|
7274
|
+
const extendEmits = (raw2) => {
|
|
7275
|
+
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
7276
|
+
if (normalizedFromExtend) {
|
|
7277
|
+
hasExtends = true;
|
|
7278
|
+
extend(normalized, normalizedFromExtend);
|
|
7279
|
+
}
|
|
7280
|
+
};
|
|
7281
|
+
if (!asMixin && appContext.mixins.length) {
|
|
7282
|
+
appContext.mixins.forEach(extendEmits);
|
|
7484
7283
|
}
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
for (let i = start; i < children.length; i++) {
|
|
7488
|
-
unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
|
|
7284
|
+
if (comp.extends) {
|
|
7285
|
+
extendEmits(comp.extends);
|
|
7489
7286
|
}
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
if (vnode.shapeFlag & 6) {
|
|
7493
|
-
return getNextHostNode(vnode.component.subTree);
|
|
7287
|
+
if (comp.mixins) {
|
|
7288
|
+
comp.mixins.forEach(extendEmits);
|
|
7494
7289
|
}
|
|
7495
|
-
|
|
7496
|
-
|
|
7290
|
+
}
|
|
7291
|
+
if (!raw && !hasExtends) {
|
|
7292
|
+
if (isObject(comp)) {
|
|
7293
|
+
cache.set(comp, null);
|
|
7497
7294
|
}
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7295
|
+
return null;
|
|
7296
|
+
}
|
|
7297
|
+
if (isArray(raw)) {
|
|
7298
|
+
raw.forEach((key) => normalized[key] = null);
|
|
7299
|
+
} else {
|
|
7300
|
+
extend(normalized, raw);
|
|
7301
|
+
}
|
|
7302
|
+
if (isObject(comp)) {
|
|
7303
|
+
cache.set(comp, normalized);
|
|
7304
|
+
}
|
|
7305
|
+
return normalized;
|
|
7306
|
+
}
|
|
7307
|
+
function isEmitListener(options, key) {
|
|
7308
|
+
if (!options || !isOn(key)) {
|
|
7309
|
+
return false;
|
|
7310
|
+
}
|
|
7311
|
+
key = key.slice(2).replace(/Once$/, "");
|
|
7312
|
+
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
7313
|
+
}
|
|
7314
|
+
let accessedAttrs = false;
|
|
7315
|
+
function markAttrsAccessed() {
|
|
7316
|
+
accessedAttrs = true;
|
|
7317
|
+
}
|
|
7318
|
+
function renderComponentRoot(instance) {
|
|
7319
|
+
const {
|
|
7320
|
+
type: Component,
|
|
7321
|
+
vnode,
|
|
7322
|
+
proxy,
|
|
7323
|
+
withProxy,
|
|
7324
|
+
propsOptions: [propsOptions],
|
|
7325
|
+
slots,
|
|
7326
|
+
attrs,
|
|
7327
|
+
emit: emit2,
|
|
7328
|
+
render,
|
|
7329
|
+
renderCache,
|
|
7330
|
+
props,
|
|
7331
|
+
data,
|
|
7332
|
+
setupState,
|
|
7333
|
+
ctx,
|
|
7334
|
+
inheritAttrs
|
|
7335
|
+
} = instance;
|
|
7336
|
+
const prev = setCurrentRenderingInstance(instance);
|
|
7337
|
+
let result;
|
|
7338
|
+
let fallthroughAttrs;
|
|
7339
|
+
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
7340
|
+
accessedAttrs = false;
|
|
7341
|
+
}
|
|
7342
|
+
try {
|
|
7343
|
+
if (vnode.shapeFlag & 4) {
|
|
7344
|
+
const proxyToUse = withProxy || proxy;
|
|
7345
|
+
const thisProxy = !!(process$1.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
7346
|
+
get(target, key, receiver) {
|
|
7347
|
+
warn$1(
|
|
7348
|
+
`Property '${String(
|
|
7349
|
+
key
|
|
7350
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
7351
|
+
);
|
|
7352
|
+
return Reflect.get(target, key, receiver);
|
|
7353
|
+
}
|
|
7354
|
+
}) : proxyToUse;
|
|
7355
|
+
result = normalizeVNode(
|
|
7356
|
+
render.call(
|
|
7357
|
+
thisProxy,
|
|
7358
|
+
proxyToUse,
|
|
7359
|
+
renderCache,
|
|
7360
|
+
!!(process$1.env.NODE_ENV !== "production") ? shallowReadonly(props) : props,
|
|
7361
|
+
setupState,
|
|
7362
|
+
data,
|
|
7363
|
+
ctx
|
|
7364
|
+
)
|
|
7365
|
+
);
|
|
7366
|
+
fallthroughAttrs = attrs;
|
|
7508
7367
|
} else {
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7368
|
+
const render2 = Component;
|
|
7369
|
+
if (!!(process$1.env.NODE_ENV !== "production") && attrs === props) {
|
|
7370
|
+
markAttrsAccessed();
|
|
7371
|
+
}
|
|
7372
|
+
result = normalizeVNode(
|
|
7373
|
+
render2.length > 1 ? render2(
|
|
7374
|
+
!!(process$1.env.NODE_ENV !== "production") ? shallowReadonly(props) : props,
|
|
7375
|
+
!!(process$1.env.NODE_ENV !== "production") ? {
|
|
7376
|
+
get attrs() {
|
|
7377
|
+
markAttrsAccessed();
|
|
7378
|
+
return shallowReadonly(attrs);
|
|
7379
|
+
},
|
|
7380
|
+
slots,
|
|
7381
|
+
emit: emit2
|
|
7382
|
+
} : { attrs, slots, emit: emit2 }
|
|
7383
|
+
) : render2(
|
|
7384
|
+
!!(process$1.env.NODE_ENV !== "production") ? shallowReadonly(props) : props,
|
|
7385
|
+
null
|
|
7386
|
+
)
|
|
7387
|
+
);
|
|
7388
|
+
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
7389
|
+
}
|
|
7390
|
+
} catch (err) {
|
|
7391
|
+
blockStack.length = 0;
|
|
7392
|
+
handleError(err, instance, 1);
|
|
7393
|
+
result = createVNode(Comment);
|
|
7394
|
+
}
|
|
7395
|
+
let root = result;
|
|
7396
|
+
let setRoot = void 0;
|
|
7397
|
+
if (!!(process$1.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) {
|
|
7398
|
+
[root, setRoot] = getChildRoot(result);
|
|
7399
|
+
}
|
|
7400
|
+
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
7401
|
+
const keys = Object.keys(fallthroughAttrs);
|
|
7402
|
+
const { shapeFlag } = root;
|
|
7403
|
+
if (keys.length) {
|
|
7404
|
+
if (shapeFlag & (1 | 6)) {
|
|
7405
|
+
if (propsOptions && keys.some(isModelListener)) {
|
|
7406
|
+
fallthroughAttrs = filterModelListeners(
|
|
7407
|
+
fallthroughAttrs,
|
|
7408
|
+
propsOptions
|
|
7409
|
+
);
|
|
7410
|
+
}
|
|
7411
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
7412
|
+
} else if (!!(process$1.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) {
|
|
7413
|
+
const allAttrs = Object.keys(attrs);
|
|
7414
|
+
const eventAttrs = [];
|
|
7415
|
+
const extraAttrs = [];
|
|
7416
|
+
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
7417
|
+
const key = allAttrs[i];
|
|
7418
|
+
if (isOn(key)) {
|
|
7419
|
+
if (!isModelListener(key)) {
|
|
7420
|
+
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
7421
|
+
}
|
|
7422
|
+
} else {
|
|
7423
|
+
extraAttrs.push(key);
|
|
7424
|
+
}
|
|
7425
|
+
}
|
|
7426
|
+
if (extraAttrs.length) {
|
|
7427
|
+
warn$1(
|
|
7428
|
+
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
|
|
7429
|
+
);
|
|
7430
|
+
}
|
|
7431
|
+
if (eventAttrs.length) {
|
|
7432
|
+
warn$1(
|
|
7433
|
+
`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
|
|
7434
|
+
);
|
|
7435
|
+
}
|
|
7436
|
+
}
|
|
7437
|
+
}
|
|
7438
|
+
}
|
|
7439
|
+
if (vnode.dirs) {
|
|
7440
|
+
if (!!(process$1.env.NODE_ENV !== "production") && !isElementRoot(root)) {
|
|
7441
|
+
warn$1(
|
|
7442
|
+
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
7517
7443
|
);
|
|
7518
7444
|
}
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7445
|
+
root = cloneVNode(root, null, false, true);
|
|
7446
|
+
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
7447
|
+
}
|
|
7448
|
+
if (vnode.transition) {
|
|
7449
|
+
if (!!(process$1.env.NODE_ENV !== "production") && !isElementRoot(root)) {
|
|
7450
|
+
warn$1(
|
|
7451
|
+
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
7452
|
+
);
|
|
7525
7453
|
}
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
m: move,
|
|
7531
|
-
r: remove2,
|
|
7532
|
-
mt: mountComponent,
|
|
7533
|
-
mc: mountChildren,
|
|
7534
|
-
pc: patchChildren,
|
|
7535
|
-
pbc: patchBlockChildren,
|
|
7536
|
-
n: getNextHostNode,
|
|
7537
|
-
o: options
|
|
7538
|
-
};
|
|
7539
|
-
let hydrate;
|
|
7540
|
-
return {
|
|
7541
|
-
render,
|
|
7542
|
-
hydrate,
|
|
7543
|
-
createApp: createAppAPI(render)
|
|
7544
|
-
};
|
|
7545
|
-
}
|
|
7546
|
-
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
7547
|
-
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
7548
|
-
}
|
|
7549
|
-
function toggleRecurse({ effect: effect2, job }, allowed) {
|
|
7550
|
-
if (allowed) {
|
|
7551
|
-
effect2.flags |= 32;
|
|
7552
|
-
job.flags |= 4;
|
|
7454
|
+
setTransitionHooks(root, vnode.transition);
|
|
7455
|
+
}
|
|
7456
|
+
if (!!(process$1.env.NODE_ENV !== "production") && setRoot) {
|
|
7457
|
+
setRoot(root);
|
|
7553
7458
|
} else {
|
|
7554
|
-
|
|
7555
|
-
job.flags &= -5;
|
|
7459
|
+
result = root;
|
|
7556
7460
|
}
|
|
7461
|
+
setCurrentRenderingInstance(prev);
|
|
7462
|
+
return result;
|
|
7557
7463
|
}
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
if (
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
7577
|
-
c2.patchFlag !== -1) {
|
|
7578
|
-
c2.el = c1.el;
|
|
7579
|
-
}
|
|
7580
|
-
if (c2.type === Comment && !c2.el) {
|
|
7581
|
-
c2.el = c1.el;
|
|
7464
|
+
const getChildRoot = (vnode) => {
|
|
7465
|
+
const rawChildren = vnode.children;
|
|
7466
|
+
const dynamicChildren = vnode.dynamicChildren;
|
|
7467
|
+
const childRoot = filterSingleRoot(rawChildren, false);
|
|
7468
|
+
if (!childRoot) {
|
|
7469
|
+
return [vnode, void 0];
|
|
7470
|
+
} else if (!!(process$1.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
|
7471
|
+
return getChildRoot(childRoot);
|
|
7472
|
+
}
|
|
7473
|
+
const index = rawChildren.indexOf(childRoot);
|
|
7474
|
+
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
|
7475
|
+
const setRoot = (updatedRoot) => {
|
|
7476
|
+
rawChildren[index] = updatedRoot;
|
|
7477
|
+
if (dynamicChildren) {
|
|
7478
|
+
if (dynamicIndex > -1) {
|
|
7479
|
+
dynamicChildren[dynamicIndex] = updatedRoot;
|
|
7480
|
+
} else if (updatedRoot.patchFlag > 0) {
|
|
7481
|
+
vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
|
|
7582
7482
|
}
|
|
7583
|
-
|
|
7584
|
-
|
|
7483
|
+
}
|
|
7484
|
+
};
|
|
7485
|
+
return [normalizeVNode(childRoot), setRoot];
|
|
7486
|
+
};
|
|
7487
|
+
function filterSingleRoot(children, recurse = true) {
|
|
7488
|
+
let singleRoot;
|
|
7489
|
+
for (let i = 0; i < children.length; i++) {
|
|
7490
|
+
const child = children[i];
|
|
7491
|
+
if (isVNode(child)) {
|
|
7492
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
7493
|
+
if (singleRoot) {
|
|
7494
|
+
return;
|
|
7495
|
+
} else {
|
|
7496
|
+
singleRoot = child;
|
|
7497
|
+
if (!!(process$1.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
|
7498
|
+
return filterSingleRoot(singleRoot.children);
|
|
7499
|
+
}
|
|
7500
|
+
}
|
|
7585
7501
|
}
|
|
7502
|
+
} else {
|
|
7503
|
+
return;
|
|
7586
7504
|
}
|
|
7587
7505
|
}
|
|
7506
|
+
return singleRoot;
|
|
7588
7507
|
}
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
const
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7508
|
+
const getFunctionalFallthrough = (attrs) => {
|
|
7509
|
+
let res;
|
|
7510
|
+
for (const key in attrs) {
|
|
7511
|
+
if (key === "class" || key === "style" || isOn(key)) {
|
|
7512
|
+
(res || (res = {}))[key] = attrs[key];
|
|
7513
|
+
}
|
|
7514
|
+
}
|
|
7515
|
+
return res;
|
|
7516
|
+
};
|
|
7517
|
+
const filterModelListeners = (attrs, props) => {
|
|
7518
|
+
const res = {};
|
|
7519
|
+
for (const key in attrs) {
|
|
7520
|
+
if (!isModelListener(key) || !(key.slice(9) in props)) {
|
|
7521
|
+
res[key] = attrs[key];
|
|
7522
|
+
}
|
|
7523
|
+
}
|
|
7524
|
+
return res;
|
|
7525
|
+
};
|
|
7526
|
+
const isElementRoot = (vnode) => {
|
|
7527
|
+
return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
|
|
7528
|
+
};
|
|
7529
|
+
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
7530
|
+
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
7531
|
+
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
7532
|
+
const emits = component.emitsOptions;
|
|
7533
|
+
if (!!(process$1.env.NODE_ENV !== "production") && (prevChildren || nextChildren) && isHmrUpdating) {
|
|
7534
|
+
return true;
|
|
7535
|
+
}
|
|
7536
|
+
if (nextVNode.dirs || nextVNode.transition) {
|
|
7537
|
+
return true;
|
|
7538
|
+
}
|
|
7539
|
+
if (optimized && patchFlag >= 0) {
|
|
7540
|
+
if (patchFlag & 1024) {
|
|
7541
|
+
return true;
|
|
7542
|
+
}
|
|
7543
|
+
if (patchFlag & 16) {
|
|
7544
|
+
if (!prevProps) {
|
|
7545
|
+
return !!nextProps;
|
|
7602
7546
|
}
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
v = c;
|
|
7547
|
+
return hasPropsChanged(prevProps, nextProps, emits);
|
|
7548
|
+
} else if (patchFlag & 8) {
|
|
7549
|
+
const dynamicProps = nextVNode.dynamicProps;
|
|
7550
|
+
for (let i = 0; i < dynamicProps.length; i++) {
|
|
7551
|
+
const key = dynamicProps[i];
|
|
7552
|
+
if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
|
|
7553
|
+
return true;
|
|
7611
7554
|
}
|
|
7612
7555
|
}
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7556
|
+
}
|
|
7557
|
+
} else {
|
|
7558
|
+
if (prevChildren || nextChildren) {
|
|
7559
|
+
if (!nextChildren || !nextChildren.$stable) {
|
|
7560
|
+
return true;
|
|
7618
7561
|
}
|
|
7619
7562
|
}
|
|
7563
|
+
if (prevProps === nextProps) {
|
|
7564
|
+
return false;
|
|
7565
|
+
}
|
|
7566
|
+
if (!prevProps) {
|
|
7567
|
+
return !!nextProps;
|
|
7568
|
+
}
|
|
7569
|
+
if (!nextProps) {
|
|
7570
|
+
return true;
|
|
7571
|
+
}
|
|
7572
|
+
return hasPropsChanged(prevProps, nextProps, emits);
|
|
7620
7573
|
}
|
|
7621
|
-
|
|
7622
|
-
v = result[u - 1];
|
|
7623
|
-
while (u-- > 0) {
|
|
7624
|
-
result[u] = v;
|
|
7625
|
-
v = p2[v];
|
|
7626
|
-
}
|
|
7627
|
-
return result;
|
|
7574
|
+
return false;
|
|
7628
7575
|
}
|
|
7629
|
-
function
|
|
7630
|
-
const
|
|
7631
|
-
if (
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7576
|
+
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
7577
|
+
const nextKeys = Object.keys(nextProps);
|
|
7578
|
+
if (nextKeys.length !== Object.keys(prevProps).length) {
|
|
7579
|
+
return true;
|
|
7580
|
+
}
|
|
7581
|
+
for (let i = 0; i < nextKeys.length; i++) {
|
|
7582
|
+
const key = nextKeys[i];
|
|
7583
|
+
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
|
|
7584
|
+
return true;
|
|
7636
7585
|
}
|
|
7637
7586
|
}
|
|
7587
|
+
return false;
|
|
7638
7588
|
}
|
|
7639
|
-
function
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7589
|
+
function updateHOCHostEl({ vnode, parent }, el) {
|
|
7590
|
+
while (parent) {
|
|
7591
|
+
const root = parent.subTree;
|
|
7592
|
+
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
7593
|
+
root.el = vnode.el;
|
|
7594
|
+
}
|
|
7595
|
+
if (root === vnode) {
|
|
7596
|
+
(vnode = parent.vnode).el = el;
|
|
7597
|
+
parent = parent.parent;
|
|
7598
|
+
} else {
|
|
7599
|
+
break;
|
|
7600
|
+
}
|
|
7643
7601
|
}
|
|
7644
7602
|
}
|
|
7645
7603
|
const isSuspense = (type) => type.__isSuspense;
|
|
@@ -8175,6 +8133,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
8175
8133
|
return setupResult;
|
|
8176
8134
|
}
|
|
8177
8135
|
function setupStatefulComponent(instance, isSSR) {
|
|
8136
|
+
var _a;
|
|
8178
8137
|
const Component = instance.type;
|
|
8179
8138
|
if (!!(process$1.env.NODE_ENV !== "production")) {
|
|
8180
8139
|
if (Component.name) {
|
|
@@ -8234,7 +8193,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
8234
8193
|
} else {
|
|
8235
8194
|
instance.asyncDep = setupResult;
|
|
8236
8195
|
if (!!(process$1.env.NODE_ENV !== "production") && !instance.suspense) {
|
|
8237
|
-
const name =
|
|
8196
|
+
const name = (_a = Component.name) != null ? _a : "Anonymous";
|
|
8238
8197
|
warn$1(
|
|
8239
8198
|
`Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
|
|
8240
8199
|
);
|
|
@@ -8407,7 +8366,7 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
8407
8366
|
name = match[1];
|
|
8408
8367
|
}
|
|
8409
8368
|
}
|
|
8410
|
-
if (!name && instance) {
|
|
8369
|
+
if (!name && instance && instance.parent) {
|
|
8411
8370
|
const inferFromRegistry = (registry) => {
|
|
8412
8371
|
for (const key in registry) {
|
|
8413
8372
|
if (registry[key] === Component) {
|
|
@@ -8415,8 +8374,8 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
8415
8374
|
}
|
|
8416
8375
|
}
|
|
8417
8376
|
};
|
|
8418
|
-
name = inferFromRegistry(
|
|
8419
|
-
instance.parent.type.components
|
|
8377
|
+
name = inferFromRegistry(
|
|
8378
|
+
instance.components || instance.parent.type.components
|
|
8420
8379
|
) || inferFromRegistry(instance.appContext.components);
|
|
8421
8380
|
}
|
|
8422
8381
|
return name ? classify(name) : isRoot ? `App` : `Anonymous`;
|
|
@@ -8638,7 +8597,7 @@ function initCustomFormatter() {
|
|
|
8638
8597
|
window.devtoolsFormatters = [formatter];
|
|
8639
8598
|
}
|
|
8640
8599
|
}
|
|
8641
|
-
const version = "3.5.
|
|
8600
|
+
const version = "3.5.24";
|
|
8642
8601
|
const warn = !!(process$1.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8643
8602
|
!!(process$1.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
8644
8603
|
!!(process$1.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP;
|