llms-py 3.0.0__py3-none-any.whl → 3.0.0b1__py3-none-any.whl
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.
- llms/index.html +77 -35
- llms/llms.json +23 -72
- llms/main.py +732 -1786
- llms/providers.json +1 -1
- llms/{extensions/analytics/ui/index.mjs → ui/Analytics.mjs} +238 -154
- llms/ui/App.mjs +60 -151
- llms/ui/Avatar.mjs +85 -0
- llms/ui/Brand.mjs +52 -0
- llms/ui/ChatPrompt.mjs +606 -0
- llms/ui/Main.mjs +873 -0
- llms/ui/ModelSelector.mjs +693 -0
- llms/ui/OAuthSignIn.mjs +92 -0
- llms/ui/ProviderIcon.mjs +36 -0
- llms/ui/ProviderStatus.mjs +105 -0
- llms/{extensions/app/ui → ui}/Recents.mjs +65 -91
- llms/ui/{modules/chat/SettingsDialog.mjs → SettingsDialog.mjs} +9 -9
- llms/{extensions/app/ui/index.mjs → ui/Sidebar.mjs} +58 -124
- llms/ui/SignIn.mjs +64 -0
- llms/ui/SystemPromptEditor.mjs +31 -0
- llms/ui/SystemPromptSelector.mjs +56 -0
- llms/ui/Welcome.mjs +8 -0
- llms/ui/ai.mjs +53 -125
- llms/ui/app.css +111 -1837
- llms/ui/lib/charts.mjs +13 -9
- llms/ui/lib/servicestack-vue.mjs +3 -3
- llms/ui/lib/vue.min.mjs +9 -10
- llms/ui/lib/vue.mjs +1602 -1763
- llms/ui/markdown.mjs +2 -10
- llms/ui/tailwind.input.css +80 -496
- llms/ui/threadStore.mjs +572 -0
- llms/ui/utils.mjs +117 -113
- llms/ui.json +1069 -0
- {llms_py-3.0.0.dist-info → llms_py-3.0.0b1.dist-info}/METADATA +1 -1
- llms_py-3.0.0b1.dist-info/RECORD +49 -0
- llms/__pycache__/__init__.cpython-312.pyc +0 -0
- llms/__pycache__/__init__.cpython-313.pyc +0 -0
- llms/__pycache__/__init__.cpython-314.pyc +0 -0
- llms/__pycache__/__main__.cpython-312.pyc +0 -0
- llms/__pycache__/__main__.cpython-314.pyc +0 -0
- llms/__pycache__/llms.cpython-312.pyc +0 -0
- llms/__pycache__/main.cpython-312.pyc +0 -0
- llms/__pycache__/main.cpython-313.pyc +0 -0
- llms/__pycache__/main.cpython-314.pyc +0 -0
- llms/__pycache__/plugins.cpython-314.pyc +0 -0
- llms/extensions/app/README.md +0 -20
- llms/extensions/app/__init__.py +0 -530
- llms/extensions/app/__pycache__/__init__.cpython-314.pyc +0 -0
- llms/extensions/app/__pycache__/db.cpython-314.pyc +0 -0
- llms/extensions/app/__pycache__/db_manager.cpython-314.pyc +0 -0
- llms/extensions/app/db.py +0 -644
- llms/extensions/app/db_manager.py +0 -195
- llms/extensions/app/requests.json +0 -9073
- llms/extensions/app/threads.json +0 -15290
- llms/extensions/app/ui/threadStore.mjs +0 -411
- llms/extensions/core_tools/CALCULATOR.md +0 -32
- llms/extensions/core_tools/__init__.py +0 -598
- llms/extensions/core_tools/__pycache__/__init__.cpython-314.pyc +0 -0
- llms/extensions/core_tools/ui/codemirror/addon/edit/closebrackets.js +0 -201
- llms/extensions/core_tools/ui/codemirror/addon/edit/closetag.js +0 -185
- llms/extensions/core_tools/ui/codemirror/addon/edit/continuelist.js +0 -101
- llms/extensions/core_tools/ui/codemirror/addon/edit/matchbrackets.js +0 -160
- llms/extensions/core_tools/ui/codemirror/addon/edit/matchtags.js +0 -66
- llms/extensions/core_tools/ui/codemirror/addon/edit/trailingspace.js +0 -27
- llms/extensions/core_tools/ui/codemirror/addon/selection/active-line.js +0 -72
- llms/extensions/core_tools/ui/codemirror/addon/selection/mark-selection.js +0 -119
- llms/extensions/core_tools/ui/codemirror/addon/selection/selection-pointer.js +0 -98
- llms/extensions/core_tools/ui/codemirror/doc/docs.css +0 -225
- llms/extensions/core_tools/ui/codemirror/doc/source_sans.woff +0 -0
- llms/extensions/core_tools/ui/codemirror/lib/codemirror.css +0 -344
- llms/extensions/core_tools/ui/codemirror/lib/codemirror.js +0 -9884
- llms/extensions/core_tools/ui/codemirror/mode/clike/clike.js +0 -942
- llms/extensions/core_tools/ui/codemirror/mode/javascript/index.html +0 -118
- llms/extensions/core_tools/ui/codemirror/mode/javascript/javascript.js +0 -962
- llms/extensions/core_tools/ui/codemirror/mode/javascript/typescript.html +0 -62
- llms/extensions/core_tools/ui/codemirror/mode/python/python.js +0 -402
- llms/extensions/core_tools/ui/codemirror/theme/dracula.css +0 -40
- llms/extensions/core_tools/ui/codemirror/theme/mocha.css +0 -135
- llms/extensions/core_tools/ui/index.mjs +0 -650
- llms/extensions/gallery/README.md +0 -61
- llms/extensions/gallery/__init__.py +0 -61
- llms/extensions/gallery/__pycache__/__init__.cpython-314.pyc +0 -0
- llms/extensions/gallery/__pycache__/db.cpython-314.pyc +0 -0
- llms/extensions/gallery/db.py +0 -298
- llms/extensions/gallery/ui/index.mjs +0 -482
- llms/extensions/katex/README.md +0 -39
- llms/extensions/katex/__init__.py +0 -6
- llms/extensions/katex/__pycache__/__init__.cpython-314.pyc +0 -0
- llms/extensions/katex/ui/README.md +0 -125
- llms/extensions/katex/ui/contrib/auto-render.js +0 -338
- llms/extensions/katex/ui/contrib/auto-render.min.js +0 -1
- llms/extensions/katex/ui/contrib/auto-render.mjs +0 -244
- llms/extensions/katex/ui/contrib/copy-tex.js +0 -127
- llms/extensions/katex/ui/contrib/copy-tex.min.js +0 -1
- llms/extensions/katex/ui/contrib/copy-tex.mjs +0 -105
- llms/extensions/katex/ui/contrib/mathtex-script-type.js +0 -109
- llms/extensions/katex/ui/contrib/mathtex-script-type.min.js +0 -1
- llms/extensions/katex/ui/contrib/mathtex-script-type.mjs +0 -24
- llms/extensions/katex/ui/contrib/mhchem.js +0 -3213
- llms/extensions/katex/ui/contrib/mhchem.min.js +0 -1
- llms/extensions/katex/ui/contrib/mhchem.mjs +0 -3109
- llms/extensions/katex/ui/contrib/render-a11y-string.js +0 -887
- llms/extensions/katex/ui/contrib/render-a11y-string.min.js +0 -1
- llms/extensions/katex/ui/contrib/render-a11y-string.mjs +0 -800
- llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- llms/extensions/katex/ui/index.mjs +0 -92
- llms/extensions/katex/ui/katex-swap.css +0 -1230
- llms/extensions/katex/ui/katex-swap.min.css +0 -1
- llms/extensions/katex/ui/katex.css +0 -1230
- llms/extensions/katex/ui/katex.js +0 -19080
- llms/extensions/katex/ui/katex.min.css +0 -1
- llms/extensions/katex/ui/katex.min.js +0 -1
- llms/extensions/katex/ui/katex.min.mjs +0 -1
- llms/extensions/katex/ui/katex.mjs +0 -18547
- llms/extensions/providers/__init__.py +0 -18
- llms/extensions/providers/__pycache__/__init__.cpython-314.pyc +0 -0
- llms/extensions/providers/__pycache__/anthropic.cpython-314.pyc +0 -0
- llms/extensions/providers/__pycache__/chutes.cpython-314.pyc +0 -0
- llms/extensions/providers/__pycache__/google.cpython-314.pyc +0 -0
- llms/extensions/providers/__pycache__/nvidia.cpython-314.pyc +0 -0
- llms/extensions/providers/__pycache__/openai.cpython-314.pyc +0 -0
- llms/extensions/providers/__pycache__/openrouter.cpython-314.pyc +0 -0
- llms/extensions/providers/anthropic.py +0 -229
- llms/extensions/providers/chutes.py +0 -155
- llms/extensions/providers/google.py +0 -378
- llms/extensions/providers/nvidia.py +0 -105
- llms/extensions/providers/openai.py +0 -156
- llms/extensions/providers/openrouter.py +0 -72
- llms/extensions/system_prompts/README.md +0 -22
- llms/extensions/system_prompts/__init__.py +0 -45
- llms/extensions/system_prompts/__pycache__/__init__.cpython-314.pyc +0 -0
- llms/extensions/system_prompts/ui/index.mjs +0 -280
- llms/extensions/system_prompts/ui/prompts.json +0 -1067
- llms/extensions/tools/__init__.py +0 -5
- llms/extensions/tools/__pycache__/__init__.cpython-314.pyc +0 -0
- llms/extensions/tools/ui/index.mjs +0 -204
- llms/providers-extra.json +0 -356
- llms/ui/ctx.mjs +0 -365
- llms/ui/index.mjs +0 -129
- llms/ui/modules/chat/ChatBody.mjs +0 -691
- llms/ui/modules/chat/index.mjs +0 -828
- llms/ui/modules/layout.mjs +0 -243
- llms/ui/modules/model-selector.mjs +0 -851
- llms_py-3.0.0.dist-info/RECORD +0 -202
- {llms_py-3.0.0.dist-info → llms_py-3.0.0b1.dist-info}/WHEEL +0 -0
- {llms_py-3.0.0.dist-info → llms_py-3.0.0b1.dist-info}/entry_points.txt +0 -0
- {llms_py-3.0.0.dist-info → llms_py-3.0.0b1.dist-info}/licenses/LICENSE +0 -0
- {llms_py-3.0.0.dist-info → llms_py-3.0.0b1.dist-info}/top_level.txt +0 -0
llms/ui/lib/vue.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.21
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1002,13 +1002,13 @@ function addSub(link) {
|
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
1004
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
1005
|
-
const ITERATE_KEY =
|
|
1005
|
+
const ITERATE_KEY = Symbol(
|
|
1006
1006
|
"Object iterate"
|
|
1007
1007
|
);
|
|
1008
|
-
const MAP_KEY_ITERATE_KEY =
|
|
1008
|
+
const MAP_KEY_ITERATE_KEY = Symbol(
|
|
1009
1009
|
"Map keys iterate"
|
|
1010
1010
|
);
|
|
1011
|
-
const ARRAY_ITERATE_KEY =
|
|
1011
|
+
const ARRAY_ITERATE_KEY = Symbol(
|
|
1012
1012
|
"Array iterate"
|
|
1013
1013
|
);
|
|
1014
1014
|
function track(target, type, key) {
|
|
@@ -1116,16 +1116,10 @@ function shallowReadArray(arr) {
|
|
|
1116
1116
|
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
1117
1117
|
return arr;
|
|
1118
1118
|
}
|
|
1119
|
-
function toWrapped(target, item) {
|
|
1120
|
-
if (isReadonly(target)) {
|
|
1121
|
-
return isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
|
|
1122
|
-
}
|
|
1123
|
-
return toReactive(item);
|
|
1124
|
-
}
|
|
1125
1119
|
const arrayInstrumentations = {
|
|
1126
1120
|
__proto__: null,
|
|
1127
1121
|
[Symbol.iterator]() {
|
|
1128
|
-
return iterator(this, Symbol.iterator,
|
|
1122
|
+
return iterator(this, Symbol.iterator, toReactive);
|
|
1129
1123
|
},
|
|
1130
1124
|
concat(...args) {
|
|
1131
1125
|
return reactiveReadArray(this).concat(
|
|
@@ -1134,7 +1128,7 @@ const arrayInstrumentations = {
|
|
|
1134
1128
|
},
|
|
1135
1129
|
entries() {
|
|
1136
1130
|
return iterator(this, "entries", (value) => {
|
|
1137
|
-
value[1] =
|
|
1131
|
+
value[1] = toReactive(value[1]);
|
|
1138
1132
|
return value;
|
|
1139
1133
|
});
|
|
1140
1134
|
},
|
|
@@ -1142,37 +1136,16 @@ const arrayInstrumentations = {
|
|
|
1142
1136
|
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
1143
1137
|
},
|
|
1144
1138
|
filter(fn, thisArg) {
|
|
1145
|
-
return apply(
|
|
1146
|
-
this,
|
|
1147
|
-
"filter",
|
|
1148
|
-
fn,
|
|
1149
|
-
thisArg,
|
|
1150
|
-
(v) => v.map((item) => toWrapped(this, item)),
|
|
1151
|
-
arguments
|
|
1152
|
-
);
|
|
1139
|
+
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
|
|
1153
1140
|
},
|
|
1154
1141
|
find(fn, thisArg) {
|
|
1155
|
-
return apply(
|
|
1156
|
-
this,
|
|
1157
|
-
"find",
|
|
1158
|
-
fn,
|
|
1159
|
-
thisArg,
|
|
1160
|
-
(item) => toWrapped(this, item),
|
|
1161
|
-
arguments
|
|
1162
|
-
);
|
|
1142
|
+
return apply(this, "find", fn, thisArg, toReactive, arguments);
|
|
1163
1143
|
},
|
|
1164
1144
|
findIndex(fn, thisArg) {
|
|
1165
1145
|
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
1166
1146
|
},
|
|
1167
1147
|
findLast(fn, thisArg) {
|
|
1168
|
-
return apply(
|
|
1169
|
-
this,
|
|
1170
|
-
"findLast",
|
|
1171
|
-
fn,
|
|
1172
|
-
thisArg,
|
|
1173
|
-
(item) => toWrapped(this, item),
|
|
1174
|
-
arguments
|
|
1175
|
-
);
|
|
1148
|
+
return apply(this, "findLast", fn, thisArg, toReactive, arguments);
|
|
1176
1149
|
},
|
|
1177
1150
|
findLastIndex(fn, thisArg) {
|
|
1178
1151
|
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
@@ -1232,7 +1205,7 @@ const arrayInstrumentations = {
|
|
|
1232
1205
|
return noTracking(this, "unshift", args);
|
|
1233
1206
|
},
|
|
1234
1207
|
values() {
|
|
1235
|
-
return iterator(this, "values",
|
|
1208
|
+
return iterator(this, "values", toReactive);
|
|
1236
1209
|
}
|
|
1237
1210
|
};
|
|
1238
1211
|
function iterator(self, method, wrapValue) {
|
|
@@ -1242,7 +1215,7 @@ function iterator(self, method, wrapValue) {
|
|
|
1242
1215
|
iter._next = iter.next;
|
|
1243
1216
|
iter.next = () => {
|
|
1244
1217
|
const result = iter._next();
|
|
1245
|
-
if (
|
|
1218
|
+
if (result.value) {
|
|
1246
1219
|
result.value = wrapValue(result.value);
|
|
1247
1220
|
}
|
|
1248
1221
|
return result;
|
|
@@ -1263,7 +1236,7 @@ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
|
1263
1236
|
if (arr !== self) {
|
|
1264
1237
|
if (needsWrap) {
|
|
1265
1238
|
wrappedFn = function(item, index) {
|
|
1266
|
-
return fn.call(this,
|
|
1239
|
+
return fn.call(this, toReactive(item), index, self);
|
|
1267
1240
|
};
|
|
1268
1241
|
} else if (fn.length > 2) {
|
|
1269
1242
|
wrappedFn = function(item, index) {
|
|
@@ -1280,7 +1253,7 @@ function reduce(self, method, fn, args) {
|
|
|
1280
1253
|
if (arr !== self) {
|
|
1281
1254
|
if (!isShallow(self)) {
|
|
1282
1255
|
wrappedFn = function(acc, item, index) {
|
|
1283
|
-
return fn.call(this, acc,
|
|
1256
|
+
return fn.call(this, acc, toReactive(item), index, self);
|
|
1284
1257
|
};
|
|
1285
1258
|
} else if (fn.length > 3) {
|
|
1286
1259
|
wrappedFn = function(acc, item, index) {
|
|
@@ -1369,8 +1342,7 @@ class BaseReactiveHandler {
|
|
|
1369
1342
|
return res;
|
|
1370
1343
|
}
|
|
1371
1344
|
if (isRef(res)) {
|
|
1372
|
-
|
|
1373
|
-
return isReadonly2 && isObject(value) ? readonly(value) : value;
|
|
1345
|
+
return targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
1374
1346
|
}
|
|
1375
1347
|
if (isObject(res)) {
|
|
1376
1348
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
@@ -1384,14 +1356,13 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1384
1356
|
}
|
|
1385
1357
|
set(target, key, value, receiver) {
|
|
1386
1358
|
let oldValue = target[key];
|
|
1387
|
-
const isArrayWithIntegerKey = isArray(target) && isIntegerKey(key);
|
|
1388
1359
|
if (!this._isShallow) {
|
|
1389
1360
|
const isOldValueReadonly = isReadonly(oldValue);
|
|
1390
1361
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
1391
1362
|
oldValue = toRaw(oldValue);
|
|
1392
1363
|
value = toRaw(value);
|
|
1393
1364
|
}
|
|
1394
|
-
if (!
|
|
1365
|
+
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
1395
1366
|
if (isOldValueReadonly) {
|
|
1396
1367
|
{
|
|
1397
1368
|
warn$2(
|
|
@@ -1406,7 +1377,7 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1406
1377
|
}
|
|
1407
1378
|
}
|
|
1408
1379
|
}
|
|
1409
|
-
const hadKey =
|
|
1380
|
+
const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
|
|
1410
1381
|
const result = Reflect.set(
|
|
1411
1382
|
target,
|
|
1412
1383
|
key,
|
|
@@ -1936,35 +1907,16 @@ class ObjectRefImpl {
|
|
|
1936
1907
|
this._defaultValue = _defaultValue;
|
|
1937
1908
|
this["__v_isRef"] = true;
|
|
1938
1909
|
this._value = void 0;
|
|
1939
|
-
this._raw = toRaw(_object);
|
|
1940
|
-
let shallow = true;
|
|
1941
|
-
let obj = _object;
|
|
1942
|
-
if (!isArray(_object) || !isIntegerKey(String(_key))) {
|
|
1943
|
-
do {
|
|
1944
|
-
shallow = !isProxy(obj) || isShallow(obj);
|
|
1945
|
-
} while (shallow && (obj = obj["__v_raw"]));
|
|
1946
|
-
}
|
|
1947
|
-
this._shallow = shallow;
|
|
1948
1910
|
}
|
|
1949
1911
|
get value() {
|
|
1950
|
-
|
|
1951
|
-
if (this._shallow) {
|
|
1952
|
-
val = unref(val);
|
|
1953
|
-
}
|
|
1912
|
+
const val = this._object[this._key];
|
|
1954
1913
|
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1955
1914
|
}
|
|
1956
1915
|
set value(newVal) {
|
|
1957
|
-
if (this._shallow && isRef(this._raw[this._key])) {
|
|
1958
|
-
const nestedRef = this._object[this._key];
|
|
1959
|
-
if (isRef(nestedRef)) {
|
|
1960
|
-
nestedRef.value = newVal;
|
|
1961
|
-
return;
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
1916
|
this._object[this._key] = newVal;
|
|
1965
1917
|
}
|
|
1966
1918
|
get dep() {
|
|
1967
|
-
return getDepFromReactive(this.
|
|
1919
|
+
return getDepFromReactive(toRaw(this._object), this._key);
|
|
1968
1920
|
}
|
|
1969
1921
|
}
|
|
1970
1922
|
class GetterRefImpl {
|
|
@@ -1990,7 +1942,8 @@ function toRef(source, key, defaultValue) {
|
|
|
1990
1942
|
}
|
|
1991
1943
|
}
|
|
1992
1944
|
function propertyToRef(source, key, defaultValue) {
|
|
1993
|
-
|
|
1945
|
+
const val = source[key];
|
|
1946
|
+
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1994
1947
|
}
|
|
1995
1948
|
|
|
1996
1949
|
class ComputedRefImpl {
|
|
@@ -2739,11 +2692,14 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2739
2692
|
let isHmrUpdating = false;
|
|
2740
2693
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2741
2694
|
{
|
|
2742
|
-
getGlobalThis()
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2695
|
+
const g = getGlobalThis();
|
|
2696
|
+
if (!g.__VUE_HMR_RUNTIME__) {
|
|
2697
|
+
g.__VUE_HMR_RUNTIME__ = {
|
|
2698
|
+
createRecord: tryWrap(createRecord),
|
|
2699
|
+
rerender: tryWrap(rerender),
|
|
2700
|
+
reload: tryWrap(reload)
|
|
2701
|
+
};
|
|
2702
|
+
}
|
|
2747
2703
|
}
|
|
2748
2704
|
const map = /* @__PURE__ */ new Map();
|
|
2749
2705
|
function registerHMR(instance) {
|
|
@@ -3057,180 +3013,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3057
3013
|
}
|
|
3058
3014
|
}
|
|
3059
3015
|
|
|
3060
|
-
|
|
3061
|
-
{
|
|
3062
|
-
if (!currentInstance || currentInstance.isMounted) {
|
|
3063
|
-
warn$1(`provide() can only be used inside setup().`);
|
|
3064
|
-
}
|
|
3065
|
-
}
|
|
3066
|
-
if (currentInstance) {
|
|
3067
|
-
let provides = currentInstance.provides;
|
|
3068
|
-
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
3069
|
-
if (parentProvides === provides) {
|
|
3070
|
-
provides = currentInstance.provides = Object.create(parentProvides);
|
|
3071
|
-
}
|
|
3072
|
-
provides[key] = value;
|
|
3073
|
-
}
|
|
3074
|
-
}
|
|
3075
|
-
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
3076
|
-
const instance = getCurrentInstance();
|
|
3077
|
-
if (instance || currentApp) {
|
|
3078
|
-
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
3079
|
-
if (provides && key in provides) {
|
|
3080
|
-
return provides[key];
|
|
3081
|
-
} else if (arguments.length > 1) {
|
|
3082
|
-
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
3083
|
-
} else {
|
|
3084
|
-
warn$1(`injection "${String(key)}" not found.`);
|
|
3085
|
-
}
|
|
3086
|
-
} else {
|
|
3087
|
-
warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
3088
|
-
}
|
|
3089
|
-
}
|
|
3090
|
-
function hasInjectionContext() {
|
|
3091
|
-
return !!(getCurrentInstance() || currentApp);
|
|
3092
|
-
}
|
|
3093
|
-
|
|
3094
|
-
const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
|
|
3095
|
-
const useSSRContext = () => {
|
|
3096
|
-
{
|
|
3097
|
-
const ctx = inject(ssrContextKey);
|
|
3098
|
-
if (!ctx) {
|
|
3099
|
-
warn$1(
|
|
3100
|
-
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
3101
|
-
);
|
|
3102
|
-
}
|
|
3103
|
-
return ctx;
|
|
3104
|
-
}
|
|
3105
|
-
};
|
|
3106
|
-
|
|
3107
|
-
function watchEffect(effect, options) {
|
|
3108
|
-
return doWatch(effect, null, options);
|
|
3109
|
-
}
|
|
3110
|
-
function watchPostEffect(effect, options) {
|
|
3111
|
-
return doWatch(
|
|
3112
|
-
effect,
|
|
3113
|
-
null,
|
|
3114
|
-
extend({}, options, { flush: "post" })
|
|
3115
|
-
);
|
|
3116
|
-
}
|
|
3117
|
-
function watchSyncEffect(effect, options) {
|
|
3118
|
-
return doWatch(
|
|
3119
|
-
effect,
|
|
3120
|
-
null,
|
|
3121
|
-
extend({}, options, { flush: "sync" })
|
|
3122
|
-
);
|
|
3123
|
-
}
|
|
3124
|
-
function watch(source, cb, options) {
|
|
3125
|
-
if (!isFunction(cb)) {
|
|
3126
|
-
warn$1(
|
|
3127
|
-
`\`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.`
|
|
3128
|
-
);
|
|
3129
|
-
}
|
|
3130
|
-
return doWatch(source, cb, options);
|
|
3131
|
-
}
|
|
3132
|
-
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
3133
|
-
const { immediate, deep, flush, once } = options;
|
|
3134
|
-
if (!cb) {
|
|
3135
|
-
if (immediate !== void 0) {
|
|
3136
|
-
warn$1(
|
|
3137
|
-
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
3138
|
-
);
|
|
3139
|
-
}
|
|
3140
|
-
if (deep !== void 0) {
|
|
3141
|
-
warn$1(
|
|
3142
|
-
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
3143
|
-
);
|
|
3144
|
-
}
|
|
3145
|
-
if (once !== void 0) {
|
|
3146
|
-
warn$1(
|
|
3147
|
-
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
3148
|
-
);
|
|
3149
|
-
}
|
|
3150
|
-
}
|
|
3151
|
-
const baseWatchOptions = extend({}, options);
|
|
3152
|
-
baseWatchOptions.onWarn = warn$1;
|
|
3153
|
-
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
3154
|
-
let ssrCleanup;
|
|
3155
|
-
if (isInSSRComponentSetup) {
|
|
3156
|
-
if (flush === "sync") {
|
|
3157
|
-
const ctx = useSSRContext();
|
|
3158
|
-
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
3159
|
-
} else if (!runsImmediately) {
|
|
3160
|
-
const watchStopHandle = () => {
|
|
3161
|
-
};
|
|
3162
|
-
watchStopHandle.stop = NOOP;
|
|
3163
|
-
watchStopHandle.resume = NOOP;
|
|
3164
|
-
watchStopHandle.pause = NOOP;
|
|
3165
|
-
return watchStopHandle;
|
|
3166
|
-
}
|
|
3167
|
-
}
|
|
3168
|
-
const instance = currentInstance;
|
|
3169
|
-
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
3170
|
-
let isPre = false;
|
|
3171
|
-
if (flush === "post") {
|
|
3172
|
-
baseWatchOptions.scheduler = (job) => {
|
|
3173
|
-
queuePostRenderEffect(job, instance && instance.suspense);
|
|
3174
|
-
};
|
|
3175
|
-
} else if (flush !== "sync") {
|
|
3176
|
-
isPre = true;
|
|
3177
|
-
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
3178
|
-
if (isFirstRun) {
|
|
3179
|
-
job();
|
|
3180
|
-
} else {
|
|
3181
|
-
queueJob(job);
|
|
3182
|
-
}
|
|
3183
|
-
};
|
|
3184
|
-
}
|
|
3185
|
-
baseWatchOptions.augmentJob = (job) => {
|
|
3186
|
-
if (cb) {
|
|
3187
|
-
job.flags |= 4;
|
|
3188
|
-
}
|
|
3189
|
-
if (isPre) {
|
|
3190
|
-
job.flags |= 2;
|
|
3191
|
-
if (instance) {
|
|
3192
|
-
job.id = instance.uid;
|
|
3193
|
-
job.i = instance;
|
|
3194
|
-
}
|
|
3195
|
-
}
|
|
3196
|
-
};
|
|
3197
|
-
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
3198
|
-
if (isInSSRComponentSetup) {
|
|
3199
|
-
if (ssrCleanup) {
|
|
3200
|
-
ssrCleanup.push(watchHandle);
|
|
3201
|
-
} else if (runsImmediately) {
|
|
3202
|
-
watchHandle();
|
|
3203
|
-
}
|
|
3204
|
-
}
|
|
3205
|
-
return watchHandle;
|
|
3206
|
-
}
|
|
3207
|
-
function instanceWatch(source, value, options) {
|
|
3208
|
-
const publicThis = this.proxy;
|
|
3209
|
-
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
3210
|
-
let cb;
|
|
3211
|
-
if (isFunction(value)) {
|
|
3212
|
-
cb = value;
|
|
3213
|
-
} else {
|
|
3214
|
-
cb = value.handler;
|
|
3215
|
-
options = value;
|
|
3216
|
-
}
|
|
3217
|
-
const reset = setCurrentInstance(this);
|
|
3218
|
-
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3219
|
-
reset();
|
|
3220
|
-
return res;
|
|
3221
|
-
}
|
|
3222
|
-
function createPathGetter(ctx, path) {
|
|
3223
|
-
const segments = path.split(".");
|
|
3224
|
-
return () => {
|
|
3225
|
-
let cur = ctx;
|
|
3226
|
-
for (let i = 0; i < segments.length && cur; i++) {
|
|
3227
|
-
cur = cur[segments[i]];
|
|
3228
|
-
}
|
|
3229
|
-
return cur;
|
|
3230
|
-
};
|
|
3231
|
-
}
|
|
3232
|
-
|
|
3233
|
-
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
3016
|
+
const TeleportEndKey = Symbol("_vte");
|
|
3234
3017
|
const isTeleport = (type) => type.__isTeleport;
|
|
3235
3018
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
3236
3019
|
const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
|
|
@@ -3283,6 +3066,9 @@ const TeleportImpl = {
|
|
|
3283
3066
|
insert(mainAnchor, container, anchor);
|
|
3284
3067
|
const mount = (container2, anchor2) => {
|
|
3285
3068
|
if (shapeFlag & 16) {
|
|
3069
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3070
|
+
parentComponent.ce._teleportTarget = container2;
|
|
3071
|
+
}
|
|
3286
3072
|
mountChildren(
|
|
3287
3073
|
children,
|
|
3288
3074
|
container2,
|
|
@@ -3304,9 +3090,6 @@ const TeleportImpl = {
|
|
|
3304
3090
|
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3305
3091
|
namespace = "mathml";
|
|
3306
3092
|
}
|
|
3307
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3308
|
-
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3309
|
-
}
|
|
3310
3093
|
if (!disabled) {
|
|
3311
3094
|
mount(target, targetAnchor);
|
|
3312
3095
|
updateCssVars(n2, false);
|
|
@@ -3590,8 +3373,8 @@ function prepareAnchor(target, vnode, createText, insert) {
|
|
|
3590
3373
|
return targetAnchor;
|
|
3591
3374
|
}
|
|
3592
3375
|
|
|
3593
|
-
const leaveCbKey =
|
|
3594
|
-
const enterCbKey$1 =
|
|
3376
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
3377
|
+
const enterCbKey$1 = Symbol("_enterCb");
|
|
3595
3378
|
function useTransitionState() {
|
|
3596
3379
|
const state = {
|
|
3597
3380
|
isMounted: false,
|
|
@@ -4413,16 +4196,14 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4413
4196
|
if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
|
|
4414
4197
|
clientText = clientText.slice(1);
|
|
4415
4198
|
}
|
|
4416
|
-
|
|
4417
|
-
if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
|
|
4418
|
-
textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
|
|
4199
|
+
if (el.textContent !== clientText) {
|
|
4419
4200
|
if (!isMismatchAllowed(el, 0 /* TEXT */)) {
|
|
4420
4201
|
warn$1(
|
|
4421
4202
|
`Hydration text content mismatch on`,
|
|
4422
4203
|
el,
|
|
4423
4204
|
`
|
|
4424
|
-
- rendered on server: ${textContent}
|
|
4425
|
-
- expected on client: ${
|
|
4205
|
+
- rendered on server: ${el.textContent}
|
|
4206
|
+
- expected on client: ${vnode.children}`
|
|
4426
4207
|
);
|
|
4427
4208
|
logMismatchError();
|
|
4428
4209
|
}
|
|
@@ -5017,10 +4798,7 @@ function defineAsyncComponent(source) {
|
|
|
5017
4798
|
error: error.value
|
|
5018
4799
|
});
|
|
5019
4800
|
} else if (loadingComponent && !delayed.value) {
|
|
5020
|
-
return
|
|
5021
|
-
loadingComponent,
|
|
5022
|
-
instance
|
|
5023
|
-
);
|
|
4801
|
+
return createVNode(loadingComponent);
|
|
5024
4802
|
}
|
|
5025
4803
|
};
|
|
5026
4804
|
}
|
|
@@ -5128,9 +4906,7 @@ const KeepAliveImpl = {
|
|
|
5128
4906
|
}
|
|
5129
4907
|
function pruneCache(filter) {
|
|
5130
4908
|
cache.forEach((vnode, key) => {
|
|
5131
|
-
const name = getComponentName(
|
|
5132
|
-
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
|
|
5133
|
-
);
|
|
4909
|
+
const name = getComponentName(vnode.type);
|
|
5134
4910
|
if (name && !filter(name)) {
|
|
5135
4911
|
pruneCacheEntry(key);
|
|
5136
4912
|
}
|
|
@@ -5357,7 +5133,7 @@ const DIRECTIVES = "directives";
|
|
|
5357
5133
|
function resolveComponent(name, maybeSelfReference) {
|
|
5358
5134
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
5359
5135
|
}
|
|
5360
|
-
const NULL_DYNAMIC_COMPONENT =
|
|
5136
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
5361
5137
|
function resolveDynamicComponent(component) {
|
|
5362
5138
|
if (isString(component)) {
|
|
5363
5139
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
@@ -5479,13 +5255,12 @@ function createSlots(slots, dynamicSlots) {
|
|
|
5479
5255
|
|
|
5480
5256
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5481
5257
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
5482
|
-
const hasProps = Object.keys(props).length > 0;
|
|
5483
5258
|
if (name !== "default") props.name = name;
|
|
5484
5259
|
return openBlock(), createBlock(
|
|
5485
5260
|
Fragment,
|
|
5486
5261
|
null,
|
|
5487
5262
|
[createVNode("slot", props, fallback && fallback())],
|
|
5488
|
-
|
|
5263
|
+
64
|
|
5489
5264
|
);
|
|
5490
5265
|
}
|
|
5491
5266
|
let slot = slots[name];
|
|
@@ -5581,6 +5356,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
5581
5356
|
if (key === "__isVue") {
|
|
5582
5357
|
return true;
|
|
5583
5358
|
}
|
|
5359
|
+
let normalizedProps;
|
|
5584
5360
|
if (key[0] !== "$") {
|
|
5585
5361
|
const n = accessCache[key];
|
|
5586
5362
|
if (n !== void 0) {
|
|
@@ -5600,7 +5376,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
5600
5376
|
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
5601
5377
|
accessCache[key] = 2 /* DATA */;
|
|
5602
5378
|
return data[key];
|
|
5603
|
-
} else if (
|
|
5379
|
+
} else if (
|
|
5380
|
+
// only cache other properties when instance has declared (thus stable)
|
|
5381
|
+
// props
|
|
5382
|
+
(normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
|
|
5383
|
+
) {
|
|
5604
5384
|
accessCache[key] = 3 /* PROPS */;
|
|
5605
5385
|
return props[key];
|
|
5606
5386
|
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
@@ -5685,10 +5465,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
5685
5465
|
return true;
|
|
5686
5466
|
},
|
|
5687
5467
|
has({
|
|
5688
|
-
_: { data, setupState, accessCache, ctx, appContext,
|
|
5468
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
|
|
5689
5469
|
}, key) {
|
|
5690
|
-
let cssModules;
|
|
5691
|
-
return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || hasOwn(
|
|
5470
|
+
let normalizedProps, cssModules;
|
|
5471
|
+
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]);
|
|
5692
5472
|
},
|
|
5693
5473
|
defineProperty(target, key, descriptor) {
|
|
5694
5474
|
if (descriptor.get != null) {
|
|
@@ -6521,1084 +6301,623 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6521
6301
|
}
|
|
6522
6302
|
let currentApp = null;
|
|
6523
6303
|
|
|
6524
|
-
function
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6304
|
+
function provide(key, value) {
|
|
6305
|
+
if (!currentInstance) {
|
|
6306
|
+
{
|
|
6307
|
+
warn$1(`provide() can only be used inside setup().`);
|
|
6308
|
+
}
|
|
6309
|
+
} else {
|
|
6310
|
+
let provides = currentInstance.provides;
|
|
6311
|
+
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
6312
|
+
if (parentProvides === provides) {
|
|
6313
|
+
provides = currentInstance.provides = Object.create(parentProvides);
|
|
6314
|
+
}
|
|
6315
|
+
provides[key] = value;
|
|
6529
6316
|
}
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6317
|
+
}
|
|
6318
|
+
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
6319
|
+
const instance = getCurrentInstance();
|
|
6320
|
+
if (instance || currentApp) {
|
|
6321
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
6322
|
+
if (provides && key in provides) {
|
|
6323
|
+
return provides[key];
|
|
6324
|
+
} else if (arguments.length > 1) {
|
|
6325
|
+
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
6326
|
+
} else {
|
|
6327
|
+
warn$1(`injection "${String(key)}" not found.`);
|
|
6328
|
+
}
|
|
6329
|
+
} else {
|
|
6330
|
+
warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
6534
6331
|
}
|
|
6535
|
-
const hyphenatedName = hyphenate(name);
|
|
6536
|
-
const modifiers = getModelModifiers(props, camelizedName);
|
|
6537
|
-
const res = customRef((track, trigger) => {
|
|
6538
|
-
let localValue;
|
|
6539
|
-
let prevSetValue = EMPTY_OBJ;
|
|
6540
|
-
let prevEmittedValue;
|
|
6541
|
-
watchSyncEffect(() => {
|
|
6542
|
-
const propValue = props[camelizedName];
|
|
6543
|
-
if (hasChanged(localValue, propValue)) {
|
|
6544
|
-
localValue = propValue;
|
|
6545
|
-
trigger();
|
|
6546
|
-
}
|
|
6547
|
-
});
|
|
6548
|
-
return {
|
|
6549
|
-
get() {
|
|
6550
|
-
track();
|
|
6551
|
-
return options.get ? options.get(localValue) : localValue;
|
|
6552
|
-
},
|
|
6553
|
-
set(value) {
|
|
6554
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
6555
|
-
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
6556
|
-
return;
|
|
6557
|
-
}
|
|
6558
|
-
const rawProps = i.vnode.props;
|
|
6559
|
-
if (!(rawProps && // check if parent has passed v-model
|
|
6560
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
|
|
6561
|
-
localValue = value;
|
|
6562
|
-
trigger();
|
|
6563
|
-
}
|
|
6564
|
-
i.emit(`update:${name}`, emittedValue);
|
|
6565
|
-
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
6566
|
-
trigger();
|
|
6567
|
-
}
|
|
6568
|
-
prevSetValue = value;
|
|
6569
|
-
prevEmittedValue = emittedValue;
|
|
6570
|
-
}
|
|
6571
|
-
};
|
|
6572
|
-
});
|
|
6573
|
-
res[Symbol.iterator] = () => {
|
|
6574
|
-
let i2 = 0;
|
|
6575
|
-
return {
|
|
6576
|
-
next() {
|
|
6577
|
-
if (i2 < 2) {
|
|
6578
|
-
return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false };
|
|
6579
|
-
} else {
|
|
6580
|
-
return { done: true };
|
|
6581
|
-
}
|
|
6582
|
-
}
|
|
6583
|
-
};
|
|
6584
|
-
};
|
|
6585
|
-
return res;
|
|
6586
6332
|
}
|
|
6587
|
-
|
|
6588
|
-
return
|
|
6589
|
-
}
|
|
6333
|
+
function hasInjectionContext() {
|
|
6334
|
+
return !!(getCurrentInstance() || currentApp);
|
|
6335
|
+
}
|
|
6590
6336
|
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
6604
|
-
);
|
|
6605
|
-
}
|
|
6606
|
-
} else {
|
|
6607
|
-
const validator = emitsOptions[event];
|
|
6608
|
-
if (isFunction(validator)) {
|
|
6609
|
-
const isValid = validator(...rawArgs);
|
|
6610
|
-
if (!isValid) {
|
|
6611
|
-
warn$1(
|
|
6612
|
-
`Invalid event arguments: event validation failed for event "${event}".`
|
|
6613
|
-
);
|
|
6614
|
-
}
|
|
6615
|
-
}
|
|
6616
|
-
}
|
|
6617
|
-
}
|
|
6618
|
-
}
|
|
6619
|
-
let args = rawArgs;
|
|
6620
|
-
const isModelListener = event.startsWith("update:");
|
|
6621
|
-
const modifiers = isModelListener && getModelModifiers(props, event.slice(7));
|
|
6622
|
-
if (modifiers) {
|
|
6623
|
-
if (modifiers.trim) {
|
|
6624
|
-
args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
6625
|
-
}
|
|
6626
|
-
if (modifiers.number) {
|
|
6627
|
-
args = rawArgs.map(looseToNumber);
|
|
6337
|
+
const internalObjectProto = {};
|
|
6338
|
+
const createInternalObject = () => Object.create(internalObjectProto);
|
|
6339
|
+
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
6340
|
+
|
|
6341
|
+
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
6342
|
+
const props = {};
|
|
6343
|
+
const attrs = createInternalObject();
|
|
6344
|
+
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
6345
|
+
setFullProps(instance, rawProps, props, attrs);
|
|
6346
|
+
for (const key in instance.propsOptions[0]) {
|
|
6347
|
+
if (!(key in props)) {
|
|
6348
|
+
props[key] = void 0;
|
|
6628
6349
|
}
|
|
6629
6350
|
}
|
|
6630
6351
|
{
|
|
6631
|
-
|
|
6632
|
-
}
|
|
6633
|
-
{
|
|
6634
|
-
const lowerCaseEvent = event.toLowerCase();
|
|
6635
|
-
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
6636
|
-
warn$1(
|
|
6637
|
-
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
|
|
6638
|
-
instance,
|
|
6639
|
-
instance.type
|
|
6640
|
-
)} 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(
|
|
6641
|
-
event
|
|
6642
|
-
)}" instead of "${event}".`
|
|
6643
|
-
);
|
|
6644
|
-
}
|
|
6645
|
-
}
|
|
6646
|
-
let handlerName;
|
|
6647
|
-
let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
|
|
6648
|
-
props[handlerName = toHandlerKey(camelize(event))];
|
|
6649
|
-
if (!handler && isModelListener) {
|
|
6650
|
-
handler = props[handlerName = toHandlerKey(hyphenate(event))];
|
|
6651
|
-
}
|
|
6652
|
-
if (handler) {
|
|
6653
|
-
callWithAsyncErrorHandling(
|
|
6654
|
-
handler,
|
|
6655
|
-
instance,
|
|
6656
|
-
6,
|
|
6657
|
-
args
|
|
6658
|
-
);
|
|
6352
|
+
validateProps(rawProps || {}, props, instance);
|
|
6659
6353
|
}
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6354
|
+
if (isStateful) {
|
|
6355
|
+
instance.props = isSSR ? props : shallowReactive(props);
|
|
6356
|
+
} else {
|
|
6357
|
+
if (!instance.type.props) {
|
|
6358
|
+
instance.props = attrs;
|
|
6359
|
+
} else {
|
|
6360
|
+
instance.props = props;
|
|
6666
6361
|
}
|
|
6667
|
-
instance.emitted[handlerName] = true;
|
|
6668
|
-
callWithAsyncErrorHandling(
|
|
6669
|
-
onceHandler,
|
|
6670
|
-
instance,
|
|
6671
|
-
6,
|
|
6672
|
-
args
|
|
6673
|
-
);
|
|
6674
6362
|
}
|
|
6363
|
+
instance.attrs = attrs;
|
|
6675
6364
|
}
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
if (cached !== void 0) {
|
|
6681
|
-
return cached;
|
|
6365
|
+
function isInHmrContext(instance) {
|
|
6366
|
+
while (instance) {
|
|
6367
|
+
if (instance.type.__hmrId) return true;
|
|
6368
|
+
instance = instance.parent;
|
|
6682
6369
|
}
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6370
|
+
}
|
|
6371
|
+
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
6372
|
+
const {
|
|
6373
|
+
props,
|
|
6374
|
+
attrs,
|
|
6375
|
+
vnode: { patchFlag }
|
|
6376
|
+
} = instance;
|
|
6377
|
+
const rawCurrentProps = toRaw(props);
|
|
6378
|
+
const [options] = instance.propsOptions;
|
|
6379
|
+
let hasAttrsChanged = false;
|
|
6380
|
+
if (
|
|
6381
|
+
// always force full diff in dev
|
|
6382
|
+
// - #1942 if hmr is enabled with sfc component
|
|
6383
|
+
// - vite#872 non-sfc component used by sfc component
|
|
6384
|
+
!isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
|
|
6385
|
+
) {
|
|
6386
|
+
if (patchFlag & 8) {
|
|
6387
|
+
const propsToUpdate = instance.vnode.dynamicProps;
|
|
6388
|
+
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
6389
|
+
let key = propsToUpdate[i];
|
|
6390
|
+
if (isEmitListener(instance.emitsOptions, key)) {
|
|
6391
|
+
continue;
|
|
6392
|
+
}
|
|
6393
|
+
const value = rawProps[key];
|
|
6394
|
+
if (options) {
|
|
6395
|
+
if (hasOwn(attrs, key)) {
|
|
6396
|
+
if (value !== attrs[key]) {
|
|
6397
|
+
attrs[key] = value;
|
|
6398
|
+
hasAttrsChanged = true;
|
|
6399
|
+
}
|
|
6400
|
+
} else {
|
|
6401
|
+
const camelizedKey = camelize(key);
|
|
6402
|
+
props[camelizedKey] = resolvePropValue(
|
|
6403
|
+
options,
|
|
6404
|
+
rawCurrentProps,
|
|
6405
|
+
camelizedKey,
|
|
6406
|
+
value,
|
|
6407
|
+
instance,
|
|
6408
|
+
false
|
|
6409
|
+
);
|
|
6410
|
+
}
|
|
6411
|
+
} else {
|
|
6412
|
+
if (value !== attrs[key]) {
|
|
6413
|
+
attrs[key] = value;
|
|
6414
|
+
hasAttrsChanged = true;
|
|
6415
|
+
}
|
|
6416
|
+
}
|
|
6692
6417
|
}
|
|
6693
|
-
};
|
|
6694
|
-
if (!asMixin && appContext.mixins.length) {
|
|
6695
|
-
appContext.mixins.forEach(extendEmits);
|
|
6696
6418
|
}
|
|
6697
|
-
|
|
6698
|
-
|
|
6419
|
+
} else {
|
|
6420
|
+
if (setFullProps(instance, rawProps, props, attrs)) {
|
|
6421
|
+
hasAttrsChanged = true;
|
|
6699
6422
|
}
|
|
6700
|
-
|
|
6701
|
-
|
|
6423
|
+
let kebabKey;
|
|
6424
|
+
for (const key in rawCurrentProps) {
|
|
6425
|
+
if (!rawProps || // for camelCase
|
|
6426
|
+
!hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
|
|
6427
|
+
// and converted to camelCase (#955)
|
|
6428
|
+
((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
6429
|
+
if (options) {
|
|
6430
|
+
if (rawPrevProps && // for camelCase
|
|
6431
|
+
(rawPrevProps[key] !== void 0 || // for kebab-case
|
|
6432
|
+
rawPrevProps[kebabKey] !== void 0)) {
|
|
6433
|
+
props[key] = resolvePropValue(
|
|
6434
|
+
options,
|
|
6435
|
+
rawCurrentProps,
|
|
6436
|
+
key,
|
|
6437
|
+
void 0,
|
|
6438
|
+
instance,
|
|
6439
|
+
true
|
|
6440
|
+
);
|
|
6441
|
+
}
|
|
6442
|
+
} else {
|
|
6443
|
+
delete props[key];
|
|
6444
|
+
}
|
|
6445
|
+
}
|
|
6702
6446
|
}
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6447
|
+
if (attrs !== rawCurrentProps) {
|
|
6448
|
+
for (const key in attrs) {
|
|
6449
|
+
if (!rawProps || !hasOwn(rawProps, key) && true) {
|
|
6450
|
+
delete attrs[key];
|
|
6451
|
+
hasAttrsChanged = true;
|
|
6452
|
+
}
|
|
6453
|
+
}
|
|
6707
6454
|
}
|
|
6708
|
-
return null;
|
|
6709
|
-
}
|
|
6710
|
-
if (isArray(raw)) {
|
|
6711
|
-
raw.forEach((key) => normalized[key] = null);
|
|
6712
|
-
} else {
|
|
6713
|
-
extend(normalized, raw);
|
|
6714
6455
|
}
|
|
6715
|
-
if (
|
|
6716
|
-
|
|
6456
|
+
if (hasAttrsChanged) {
|
|
6457
|
+
trigger(instance.attrs, "set", "");
|
|
6717
6458
|
}
|
|
6718
|
-
|
|
6719
|
-
}
|
|
6720
|
-
function isEmitListener(options, key) {
|
|
6721
|
-
if (!options || !isOn(key)) {
|
|
6722
|
-
return false;
|
|
6459
|
+
{
|
|
6460
|
+
validateProps(rawProps || {}, props, instance);
|
|
6723
6461
|
}
|
|
6724
|
-
key = key.slice(2).replace(/Once$/, "");
|
|
6725
|
-
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
6726
6462
|
}
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
vnode,
|
|
6736
|
-
proxy,
|
|
6737
|
-
withProxy,
|
|
6738
|
-
propsOptions: [propsOptions],
|
|
6739
|
-
slots,
|
|
6740
|
-
attrs,
|
|
6741
|
-
emit,
|
|
6742
|
-
render,
|
|
6743
|
-
renderCache,
|
|
6744
|
-
props,
|
|
6745
|
-
data,
|
|
6746
|
-
setupState,
|
|
6747
|
-
ctx,
|
|
6748
|
-
inheritAttrs
|
|
6749
|
-
} = instance;
|
|
6750
|
-
const prev = setCurrentRenderingInstance(instance);
|
|
6751
|
-
let result;
|
|
6752
|
-
let fallthroughAttrs;
|
|
6753
|
-
{
|
|
6754
|
-
accessedAttrs = false;
|
|
6755
|
-
}
|
|
6756
|
-
try {
|
|
6757
|
-
if (vnode.shapeFlag & 4) {
|
|
6758
|
-
const proxyToUse = withProxy || proxy;
|
|
6759
|
-
const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
6760
|
-
get(target, key, receiver) {
|
|
6761
|
-
warn$1(
|
|
6762
|
-
`Property '${String(
|
|
6763
|
-
key
|
|
6764
|
-
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
6765
|
-
);
|
|
6766
|
-
return Reflect.get(target, key, receiver);
|
|
6767
|
-
}
|
|
6768
|
-
}) : proxyToUse;
|
|
6769
|
-
result = normalizeVNode(
|
|
6770
|
-
render.call(
|
|
6771
|
-
thisProxy,
|
|
6772
|
-
proxyToUse,
|
|
6773
|
-
renderCache,
|
|
6774
|
-
true ? shallowReadonly(props) : props,
|
|
6775
|
-
setupState,
|
|
6776
|
-
data,
|
|
6777
|
-
ctx
|
|
6778
|
-
)
|
|
6779
|
-
);
|
|
6780
|
-
fallthroughAttrs = attrs;
|
|
6781
|
-
} else {
|
|
6782
|
-
const render2 = Component;
|
|
6783
|
-
if (attrs === props) {
|
|
6784
|
-
markAttrsAccessed();
|
|
6463
|
+
function setFullProps(instance, rawProps, props, attrs) {
|
|
6464
|
+
const [options, needCastKeys] = instance.propsOptions;
|
|
6465
|
+
let hasAttrsChanged = false;
|
|
6466
|
+
let rawCastValues;
|
|
6467
|
+
if (rawProps) {
|
|
6468
|
+
for (let key in rawProps) {
|
|
6469
|
+
if (isReservedProp(key)) {
|
|
6470
|
+
continue;
|
|
6785
6471
|
}
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
},
|
|
6794
|
-
slots,
|
|
6795
|
-
emit
|
|
6796
|
-
} : { attrs, slots, emit }
|
|
6797
|
-
) : render2(
|
|
6798
|
-
true ? shallowReadonly(props) : props,
|
|
6799
|
-
null
|
|
6800
|
-
)
|
|
6801
|
-
);
|
|
6802
|
-
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
6803
|
-
}
|
|
6804
|
-
} catch (err) {
|
|
6805
|
-
blockStack.length = 0;
|
|
6806
|
-
handleError(err, instance, 1);
|
|
6807
|
-
result = createVNode(Comment);
|
|
6808
|
-
}
|
|
6809
|
-
let root = result;
|
|
6810
|
-
let setRoot = void 0;
|
|
6811
|
-
if (result.patchFlag > 0 && result.patchFlag & 2048) {
|
|
6812
|
-
[root, setRoot] = getChildRoot(result);
|
|
6813
|
-
}
|
|
6814
|
-
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
6815
|
-
const keys = Object.keys(fallthroughAttrs);
|
|
6816
|
-
const { shapeFlag } = root;
|
|
6817
|
-
if (keys.length) {
|
|
6818
|
-
if (shapeFlag & (1 | 6)) {
|
|
6819
|
-
if (propsOptions && keys.some(isModelListener)) {
|
|
6820
|
-
fallthroughAttrs = filterModelListeners(
|
|
6821
|
-
fallthroughAttrs,
|
|
6822
|
-
propsOptions
|
|
6823
|
-
);
|
|
6824
|
-
}
|
|
6825
|
-
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
6826
|
-
} else if (!accessedAttrs && root.type !== Comment) {
|
|
6827
|
-
const allAttrs = Object.keys(attrs);
|
|
6828
|
-
const eventAttrs = [];
|
|
6829
|
-
const extraAttrs = [];
|
|
6830
|
-
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
6831
|
-
const key = allAttrs[i];
|
|
6832
|
-
if (isOn(key)) {
|
|
6833
|
-
if (!isModelListener(key)) {
|
|
6834
|
-
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
6835
|
-
}
|
|
6836
|
-
} else {
|
|
6837
|
-
extraAttrs.push(key);
|
|
6838
|
-
}
|
|
6839
|
-
}
|
|
6840
|
-
if (extraAttrs.length) {
|
|
6841
|
-
warn$1(
|
|
6842
|
-
`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.`
|
|
6843
|
-
);
|
|
6472
|
+
const value = rawProps[key];
|
|
6473
|
+
let camelKey;
|
|
6474
|
+
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
6475
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) {
|
|
6476
|
+
props[camelKey] = value;
|
|
6477
|
+
} else {
|
|
6478
|
+
(rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
6844
6479
|
}
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6480
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
6481
|
+
if (!(key in attrs) || value !== attrs[key]) {
|
|
6482
|
+
attrs[key] = value;
|
|
6483
|
+
hasAttrsChanged = true;
|
|
6849
6484
|
}
|
|
6850
6485
|
}
|
|
6851
6486
|
}
|
|
6852
6487
|
}
|
|
6853
|
-
if (
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
6488
|
+
if (needCastKeys) {
|
|
6489
|
+
const rawCurrentProps = toRaw(props);
|
|
6490
|
+
const castValues = rawCastValues || EMPTY_OBJ;
|
|
6491
|
+
for (let i = 0; i < needCastKeys.length; i++) {
|
|
6492
|
+
const key = needCastKeys[i];
|
|
6493
|
+
props[key] = resolvePropValue(
|
|
6494
|
+
options,
|
|
6495
|
+
rawCurrentProps,
|
|
6496
|
+
key,
|
|
6497
|
+
castValues[key],
|
|
6498
|
+
instance,
|
|
6499
|
+
!hasOwn(castValues, key)
|
|
6866
6500
|
);
|
|
6867
6501
|
}
|
|
6868
|
-
setTransitionHooks(root, vnode.transition);
|
|
6869
|
-
}
|
|
6870
|
-
if (setRoot) {
|
|
6871
|
-
setRoot(root);
|
|
6872
|
-
} else {
|
|
6873
|
-
result = root;
|
|
6874
6502
|
}
|
|
6875
|
-
|
|
6876
|
-
return result;
|
|
6503
|
+
return hasAttrsChanged;
|
|
6877
6504
|
}
|
|
6878
|
-
|
|
6879
|
-
const
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
|
6889
|
-
const setRoot = (updatedRoot) => {
|
|
6890
|
-
rawChildren[index] = updatedRoot;
|
|
6891
|
-
if (dynamicChildren) {
|
|
6892
|
-
if (dynamicIndex > -1) {
|
|
6893
|
-
dynamicChildren[dynamicIndex] = updatedRoot;
|
|
6894
|
-
} else if (updatedRoot.patchFlag > 0) {
|
|
6895
|
-
vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
|
|
6896
|
-
}
|
|
6897
|
-
}
|
|
6898
|
-
};
|
|
6899
|
-
return [normalizeVNode(childRoot), setRoot];
|
|
6900
|
-
};
|
|
6901
|
-
function filterSingleRoot(children, recurse = true) {
|
|
6902
|
-
let singleRoot;
|
|
6903
|
-
for (let i = 0; i < children.length; i++) {
|
|
6904
|
-
const child = children[i];
|
|
6905
|
-
if (isVNode(child)) {
|
|
6906
|
-
if (child.type !== Comment || child.children === "v-if") {
|
|
6907
|
-
if (singleRoot) {
|
|
6908
|
-
return;
|
|
6505
|
+
function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
6506
|
+
const opt = options[key];
|
|
6507
|
+
if (opt != null) {
|
|
6508
|
+
const hasDefault = hasOwn(opt, "default");
|
|
6509
|
+
if (hasDefault && value === void 0) {
|
|
6510
|
+
const defaultValue = opt.default;
|
|
6511
|
+
if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
|
|
6512
|
+
const { propsDefaults } = instance;
|
|
6513
|
+
if (key in propsDefaults) {
|
|
6514
|
+
value = propsDefaults[key];
|
|
6909
6515
|
} else {
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6516
|
+
const reset = setCurrentInstance(instance);
|
|
6517
|
+
value = propsDefaults[key] = defaultValue.call(
|
|
6518
|
+
null,
|
|
6519
|
+
props
|
|
6520
|
+
);
|
|
6521
|
+
reset();
|
|
6914
6522
|
}
|
|
6523
|
+
} else {
|
|
6524
|
+
value = defaultValue;
|
|
6525
|
+
}
|
|
6526
|
+
if (instance.ce) {
|
|
6527
|
+
instance.ce._setProp(key, value);
|
|
6528
|
+
}
|
|
6529
|
+
}
|
|
6530
|
+
if (opt[0 /* shouldCast */]) {
|
|
6531
|
+
if (isAbsent && !hasDefault) {
|
|
6532
|
+
value = false;
|
|
6533
|
+
} else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) {
|
|
6534
|
+
value = true;
|
|
6915
6535
|
}
|
|
6916
|
-
} else {
|
|
6917
|
-
return;
|
|
6918
6536
|
}
|
|
6919
6537
|
}
|
|
6920
|
-
return
|
|
6538
|
+
return value;
|
|
6921
6539
|
}
|
|
6922
|
-
const
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6540
|
+
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
6541
|
+
function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
6542
|
+
const cache = asMixin ? mixinPropsCache : appContext.propsCache;
|
|
6543
|
+
const cached = cache.get(comp);
|
|
6544
|
+
if (cached) {
|
|
6545
|
+
return cached;
|
|
6928
6546
|
}
|
|
6929
|
-
|
|
6930
|
-
};
|
|
6931
|
-
const
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6547
|
+
const raw = comp.props;
|
|
6548
|
+
const normalized = {};
|
|
6549
|
+
const needCastKeys = [];
|
|
6550
|
+
let hasExtends = false;
|
|
6551
|
+
if (!isFunction(comp)) {
|
|
6552
|
+
const extendProps = (raw2) => {
|
|
6553
|
+
hasExtends = true;
|
|
6554
|
+
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
6555
|
+
extend(normalized, props);
|
|
6556
|
+
if (keys) needCastKeys.push(...keys);
|
|
6557
|
+
};
|
|
6558
|
+
if (!asMixin && appContext.mixins.length) {
|
|
6559
|
+
appContext.mixins.forEach(extendProps);
|
|
6560
|
+
}
|
|
6561
|
+
if (comp.extends) {
|
|
6562
|
+
extendProps(comp.extends);
|
|
6563
|
+
}
|
|
6564
|
+
if (comp.mixins) {
|
|
6565
|
+
comp.mixins.forEach(extendProps);
|
|
6936
6566
|
}
|
|
6937
6567
|
}
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
|
|
6942
|
-
};
|
|
6943
|
-
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
6944
|
-
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
6945
|
-
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
6946
|
-
const emits = component.emitsOptions;
|
|
6947
|
-
if ((prevChildren || nextChildren) && isHmrUpdating) {
|
|
6948
|
-
return true;
|
|
6949
|
-
}
|
|
6950
|
-
if (nextVNode.dirs || nextVNode.transition) {
|
|
6951
|
-
return true;
|
|
6952
|
-
}
|
|
6953
|
-
if (optimized && patchFlag >= 0) {
|
|
6954
|
-
if (patchFlag & 1024) {
|
|
6955
|
-
return true;
|
|
6568
|
+
if (!raw && !hasExtends) {
|
|
6569
|
+
if (isObject(comp)) {
|
|
6570
|
+
cache.set(comp, EMPTY_ARR);
|
|
6956
6571
|
}
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
const dynamicProps = nextVNode.dynamicProps;
|
|
6964
|
-
for (let i = 0; i < dynamicProps.length; i++) {
|
|
6965
|
-
const key = dynamicProps[i];
|
|
6966
|
-
if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
|
|
6967
|
-
return true;
|
|
6968
|
-
}
|
|
6572
|
+
return EMPTY_ARR;
|
|
6573
|
+
}
|
|
6574
|
+
if (isArray(raw)) {
|
|
6575
|
+
for (let i = 0; i < raw.length; i++) {
|
|
6576
|
+
if (!isString(raw[i])) {
|
|
6577
|
+
warn$1(`props must be strings when using array syntax.`, raw[i]);
|
|
6969
6578
|
}
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
if (!nextChildren || !nextChildren.$stable) {
|
|
6974
|
-
return true;
|
|
6579
|
+
const normalizedKey = camelize(raw[i]);
|
|
6580
|
+
if (validatePropName(normalizedKey)) {
|
|
6581
|
+
normalized[normalizedKey] = EMPTY_OBJ;
|
|
6975
6582
|
}
|
|
6976
6583
|
}
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
if (!prevProps) {
|
|
6981
|
-
return !!nextProps;
|
|
6584
|
+
} else if (raw) {
|
|
6585
|
+
if (!isObject(raw)) {
|
|
6586
|
+
warn$1(`invalid props options`, raw);
|
|
6982
6587
|
}
|
|
6983
|
-
|
|
6984
|
-
|
|
6588
|
+
for (const key in raw) {
|
|
6589
|
+
const normalizedKey = camelize(key);
|
|
6590
|
+
if (validatePropName(normalizedKey)) {
|
|
6591
|
+
const opt = raw[key];
|
|
6592
|
+
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
|
|
6593
|
+
const propType = prop.type;
|
|
6594
|
+
let shouldCast = false;
|
|
6595
|
+
let shouldCastTrue = true;
|
|
6596
|
+
if (isArray(propType)) {
|
|
6597
|
+
for (let index = 0; index < propType.length; ++index) {
|
|
6598
|
+
const type = propType[index];
|
|
6599
|
+
const typeName = isFunction(type) && type.name;
|
|
6600
|
+
if (typeName === "Boolean") {
|
|
6601
|
+
shouldCast = true;
|
|
6602
|
+
break;
|
|
6603
|
+
} else if (typeName === "String") {
|
|
6604
|
+
shouldCastTrue = false;
|
|
6605
|
+
}
|
|
6606
|
+
}
|
|
6607
|
+
} else {
|
|
6608
|
+
shouldCast = isFunction(propType) && propType.name === "Boolean";
|
|
6609
|
+
}
|
|
6610
|
+
prop[0 /* shouldCast */] = shouldCast;
|
|
6611
|
+
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
6612
|
+
if (shouldCast || hasOwn(prop, "default")) {
|
|
6613
|
+
needCastKeys.push(normalizedKey);
|
|
6614
|
+
}
|
|
6615
|
+
}
|
|
6985
6616
|
}
|
|
6986
|
-
return hasPropsChanged(prevProps, nextProps, emits);
|
|
6987
6617
|
}
|
|
6988
|
-
|
|
6618
|
+
const res = [normalized, needCastKeys];
|
|
6619
|
+
if (isObject(comp)) {
|
|
6620
|
+
cache.set(comp, res);
|
|
6621
|
+
}
|
|
6622
|
+
return res;
|
|
6989
6623
|
}
|
|
6990
|
-
function
|
|
6991
|
-
|
|
6992
|
-
if (nextKeys.length !== Object.keys(prevProps).length) {
|
|
6624
|
+
function validatePropName(key) {
|
|
6625
|
+
if (key[0] !== "$" && !isReservedProp(key)) {
|
|
6993
6626
|
return true;
|
|
6994
|
-
}
|
|
6995
|
-
|
|
6996
|
-
const key = nextKeys[i];
|
|
6997
|
-
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
|
|
6998
|
-
return true;
|
|
6999
|
-
}
|
|
6627
|
+
} else {
|
|
6628
|
+
warn$1(`Invalid prop name: "${key}" is a reserved property.`);
|
|
7000
6629
|
}
|
|
7001
6630
|
return false;
|
|
7002
6631
|
}
|
|
7003
|
-
function
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
} else {
|
|
7013
|
-
break;
|
|
7014
|
-
}
|
|
6632
|
+
function getType(ctor) {
|
|
6633
|
+
if (ctor === null) {
|
|
6634
|
+
return "null";
|
|
6635
|
+
}
|
|
6636
|
+
if (typeof ctor === "function") {
|
|
6637
|
+
return ctor.name || "";
|
|
6638
|
+
} else if (typeof ctor === "object") {
|
|
6639
|
+
const name = ctor.constructor && ctor.constructor.name;
|
|
6640
|
+
return name || "";
|
|
7015
6641
|
}
|
|
6642
|
+
return "";
|
|
7016
6643
|
}
|
|
7017
|
-
|
|
7018
|
-
const
|
|
7019
|
-
const
|
|
7020
|
-
const
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
6644
|
+
function validateProps(rawProps, props, instance) {
|
|
6645
|
+
const resolvedValues = toRaw(props);
|
|
6646
|
+
const options = instance.propsOptions[0];
|
|
6647
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
6648
|
+
for (const key in options) {
|
|
6649
|
+
let opt = options[key];
|
|
6650
|
+
if (opt == null) continue;
|
|
6651
|
+
validateProp(
|
|
6652
|
+
key,
|
|
6653
|
+
resolvedValues[key],
|
|
6654
|
+
opt,
|
|
6655
|
+
shallowReadonly(resolvedValues) ,
|
|
6656
|
+
!camelizePropsKey.includes(key)
|
|
6657
|
+
);
|
|
6658
|
+
}
|
|
6659
|
+
}
|
|
6660
|
+
function validateProp(name, value, prop, props, isAbsent) {
|
|
6661
|
+
const { type, required, validator, skipCheck } = prop;
|
|
6662
|
+
if (required && isAbsent) {
|
|
6663
|
+
warn$1('Missing required prop: "' + name + '"');
|
|
6664
|
+
return;
|
|
6665
|
+
}
|
|
6666
|
+
if (value == null && !required) {
|
|
6667
|
+
return;
|
|
6668
|
+
}
|
|
6669
|
+
if (type != null && type !== true && !skipCheck) {
|
|
6670
|
+
let isValid = false;
|
|
6671
|
+
const types = isArray(type) ? type : [type];
|
|
6672
|
+
const expectedTypes = [];
|
|
6673
|
+
for (let i = 0; i < types.length && !isValid; i++) {
|
|
6674
|
+
const { valid, expectedType } = assertType(value, types[i]);
|
|
6675
|
+
expectedTypes.push(expectedType || "");
|
|
6676
|
+
isValid = valid;
|
|
6677
|
+
}
|
|
6678
|
+
if (!isValid) {
|
|
6679
|
+
warn$1(getInvalidTypeMessage(name, value, expectedTypes));
|
|
6680
|
+
return;
|
|
7030
6681
|
}
|
|
7031
6682
|
}
|
|
7032
|
-
{
|
|
7033
|
-
|
|
6683
|
+
if (validator && !validator(value, props)) {
|
|
6684
|
+
warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
7034
6685
|
}
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
6686
|
+
}
|
|
6687
|
+
const isSimpleType = /* @__PURE__ */ makeMap(
|
|
6688
|
+
"String,Number,Boolean,Function,Symbol,BigInt"
|
|
6689
|
+
);
|
|
6690
|
+
function assertType(value, type) {
|
|
6691
|
+
let valid;
|
|
6692
|
+
const expectedType = getType(type);
|
|
6693
|
+
if (expectedType === "null") {
|
|
6694
|
+
valid = value === null;
|
|
6695
|
+
} else if (isSimpleType(expectedType)) {
|
|
6696
|
+
const t = typeof value;
|
|
6697
|
+
valid = t === expectedType.toLowerCase();
|
|
6698
|
+
if (!valid && t === "object") {
|
|
6699
|
+
valid = value instanceof type;
|
|
7042
6700
|
}
|
|
6701
|
+
} else if (expectedType === "Object") {
|
|
6702
|
+
valid = isObject(value);
|
|
6703
|
+
} else if (expectedType === "Array") {
|
|
6704
|
+
valid = isArray(value);
|
|
6705
|
+
} else {
|
|
6706
|
+
valid = value instanceof type;
|
|
7043
6707
|
}
|
|
7044
|
-
|
|
6708
|
+
return {
|
|
6709
|
+
valid,
|
|
6710
|
+
expectedType
|
|
6711
|
+
};
|
|
7045
6712
|
}
|
|
7046
|
-
function
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
6713
|
+
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
6714
|
+
if (expectedTypes.length === 0) {
|
|
6715
|
+
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
6716
|
+
}
|
|
6717
|
+
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
6718
|
+
const expectedType = expectedTypes[0];
|
|
6719
|
+
const receivedType = toRawType(value);
|
|
6720
|
+
const expectedValue = styleValue(value, expectedType);
|
|
6721
|
+
const receivedValue = styleValue(value, receivedType);
|
|
6722
|
+
if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
|
|
6723
|
+
message += ` with value ${expectedValue}`;
|
|
6724
|
+
}
|
|
6725
|
+
message += `, got ${receivedType} `;
|
|
6726
|
+
if (isExplicable(receivedType)) {
|
|
6727
|
+
message += `with value ${receivedValue}.`;
|
|
7050
6728
|
}
|
|
6729
|
+
return message;
|
|
7051
6730
|
}
|
|
7052
|
-
function
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
} = instance;
|
|
7058
|
-
const rawCurrentProps = toRaw(props);
|
|
7059
|
-
const [options] = instance.propsOptions;
|
|
7060
|
-
let hasAttrsChanged = false;
|
|
7061
|
-
if (
|
|
7062
|
-
// always force full diff in dev
|
|
7063
|
-
// - #1942 if hmr is enabled with sfc component
|
|
7064
|
-
// - vite#872 non-sfc component used by sfc component
|
|
7065
|
-
!isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
|
|
7066
|
-
) {
|
|
7067
|
-
if (patchFlag & 8) {
|
|
7068
|
-
const propsToUpdate = instance.vnode.dynamicProps;
|
|
7069
|
-
for (let i = 0; i < propsToUpdate.length; i++) {
|
|
7070
|
-
let key = propsToUpdate[i];
|
|
7071
|
-
if (isEmitListener(instance.emitsOptions, key)) {
|
|
7072
|
-
continue;
|
|
7073
|
-
}
|
|
7074
|
-
const value = rawProps[key];
|
|
7075
|
-
if (options) {
|
|
7076
|
-
if (hasOwn(attrs, key)) {
|
|
7077
|
-
if (value !== attrs[key]) {
|
|
7078
|
-
attrs[key] = value;
|
|
7079
|
-
hasAttrsChanged = true;
|
|
7080
|
-
}
|
|
7081
|
-
} else {
|
|
7082
|
-
const camelizedKey = camelize(key);
|
|
7083
|
-
props[camelizedKey] = resolvePropValue(
|
|
7084
|
-
options,
|
|
7085
|
-
rawCurrentProps,
|
|
7086
|
-
camelizedKey,
|
|
7087
|
-
value,
|
|
7088
|
-
instance,
|
|
7089
|
-
false
|
|
7090
|
-
);
|
|
7091
|
-
}
|
|
7092
|
-
} else {
|
|
7093
|
-
if (value !== attrs[key]) {
|
|
7094
|
-
attrs[key] = value;
|
|
7095
|
-
hasAttrsChanged = true;
|
|
7096
|
-
}
|
|
7097
|
-
}
|
|
7098
|
-
}
|
|
7099
|
-
}
|
|
6731
|
+
function styleValue(value, type) {
|
|
6732
|
+
if (type === "String") {
|
|
6733
|
+
return `"${value}"`;
|
|
6734
|
+
} else if (type === "Number") {
|
|
6735
|
+
return `${Number(value)}`;
|
|
7100
6736
|
} else {
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
} else {
|
|
7124
|
-
delete props[key];
|
|
7125
|
-
}
|
|
7126
|
-
}
|
|
6737
|
+
return `${value}`;
|
|
6738
|
+
}
|
|
6739
|
+
}
|
|
6740
|
+
function isExplicable(type) {
|
|
6741
|
+
const explicitTypes = ["string", "number", "boolean"];
|
|
6742
|
+
return explicitTypes.some((elem) => type.toLowerCase() === elem);
|
|
6743
|
+
}
|
|
6744
|
+
function isBoolean(...args) {
|
|
6745
|
+
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
6746
|
+
}
|
|
6747
|
+
|
|
6748
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
6749
|
+
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
6750
|
+
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
6751
|
+
if (rawSlot._n) {
|
|
6752
|
+
return rawSlot;
|
|
6753
|
+
}
|
|
6754
|
+
const normalized = withCtx((...args) => {
|
|
6755
|
+
if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
|
|
6756
|
+
warn$1(
|
|
6757
|
+
`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.`
|
|
6758
|
+
);
|
|
7127
6759
|
}
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
6760
|
+
return normalizeSlotValue(rawSlot(...args));
|
|
6761
|
+
}, ctx);
|
|
6762
|
+
normalized._c = false;
|
|
6763
|
+
return normalized;
|
|
6764
|
+
};
|
|
6765
|
+
const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
6766
|
+
const ctx = rawSlots._ctx;
|
|
6767
|
+
for (const key in rawSlots) {
|
|
6768
|
+
if (isInternalKey(key)) continue;
|
|
6769
|
+
const value = rawSlots[key];
|
|
6770
|
+
if (isFunction(value)) {
|
|
6771
|
+
slots[key] = normalizeSlot(key, value, ctx);
|
|
6772
|
+
} else if (value != null) {
|
|
6773
|
+
{
|
|
6774
|
+
warn$1(
|
|
6775
|
+
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
|
|
6776
|
+
);
|
|
7134
6777
|
}
|
|
6778
|
+
const normalized = normalizeSlotValue(value);
|
|
6779
|
+
slots[key] = () => normalized;
|
|
7135
6780
|
}
|
|
7136
6781
|
}
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
6782
|
+
};
|
|
6783
|
+
const normalizeVNodeSlots = (instance, children) => {
|
|
6784
|
+
if (!isKeepAlive(instance.vnode) && true) {
|
|
6785
|
+
warn$1(
|
|
6786
|
+
`Non-function value encountered for default slot. Prefer function slots for better performance.`
|
|
6787
|
+
);
|
|
7142
6788
|
}
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
if (isReservedProp(key)) {
|
|
7151
|
-
continue;
|
|
7152
|
-
}
|
|
7153
|
-
const value = rawProps[key];
|
|
7154
|
-
let camelKey;
|
|
7155
|
-
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
7156
|
-
if (!needCastKeys || !needCastKeys.includes(camelKey)) {
|
|
7157
|
-
props[camelKey] = value;
|
|
7158
|
-
} else {
|
|
7159
|
-
(rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
7160
|
-
}
|
|
7161
|
-
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
7162
|
-
if (!(key in attrs) || value !== attrs[key]) {
|
|
7163
|
-
attrs[key] = value;
|
|
7164
|
-
hasAttrsChanged = true;
|
|
7165
|
-
}
|
|
7166
|
-
}
|
|
6789
|
+
const normalized = normalizeSlotValue(children);
|
|
6790
|
+
instance.slots.default = () => normalized;
|
|
6791
|
+
};
|
|
6792
|
+
const assignSlots = (slots, children, optimized) => {
|
|
6793
|
+
for (const key in children) {
|
|
6794
|
+
if (optimized || !isInternalKey(key)) {
|
|
6795
|
+
slots[key] = children[key];
|
|
7167
6796
|
}
|
|
7168
6797
|
}
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
);
|
|
6798
|
+
};
|
|
6799
|
+
const initSlots = (instance, children, optimized) => {
|
|
6800
|
+
const slots = instance.slots = createInternalObject();
|
|
6801
|
+
if (instance.vnode.shapeFlag & 32) {
|
|
6802
|
+
const type = children._;
|
|
6803
|
+
if (type) {
|
|
6804
|
+
assignSlots(slots, children, optimized);
|
|
6805
|
+
if (optimized) {
|
|
6806
|
+
def(slots, "_", type, true);
|
|
6807
|
+
}
|
|
6808
|
+
} else {
|
|
6809
|
+
normalizeObjectSlots(children, slots);
|
|
7182
6810
|
}
|
|
6811
|
+
} else if (children) {
|
|
6812
|
+
normalizeVNodeSlots(instance, children);
|
|
7183
6813
|
}
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
if (
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
const reset = setCurrentInstance(instance);
|
|
7198
|
-
value = propsDefaults[key] = defaultValue.call(
|
|
7199
|
-
null,
|
|
7200
|
-
props
|
|
7201
|
-
);
|
|
7202
|
-
reset();
|
|
7203
|
-
}
|
|
6814
|
+
};
|
|
6815
|
+
const updateSlots = (instance, children, optimized) => {
|
|
6816
|
+
const { vnode, slots } = instance;
|
|
6817
|
+
let needDeletionCheck = true;
|
|
6818
|
+
let deletionComparisonTarget = EMPTY_OBJ;
|
|
6819
|
+
if (vnode.shapeFlag & 32) {
|
|
6820
|
+
const type = children._;
|
|
6821
|
+
if (type) {
|
|
6822
|
+
if (isHmrUpdating) {
|
|
6823
|
+
assignSlots(slots, children, optimized);
|
|
6824
|
+
trigger(instance, "set", "$slots");
|
|
6825
|
+
} else if (optimized && type === 1) {
|
|
6826
|
+
needDeletionCheck = false;
|
|
7204
6827
|
} else {
|
|
7205
|
-
|
|
7206
|
-
}
|
|
7207
|
-
if (instance.ce) {
|
|
7208
|
-
instance.ce._setProp(key, value);
|
|
6828
|
+
assignSlots(slots, children, optimized);
|
|
7209
6829
|
}
|
|
6830
|
+
} else {
|
|
6831
|
+
needDeletionCheck = !children.$stable;
|
|
6832
|
+
normalizeObjectSlots(children, slots);
|
|
7210
6833
|
}
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
6834
|
+
deletionComparisonTarget = children;
|
|
6835
|
+
} else if (children) {
|
|
6836
|
+
normalizeVNodeSlots(instance, children);
|
|
6837
|
+
deletionComparisonTarget = { default: 1 };
|
|
6838
|
+
}
|
|
6839
|
+
if (needDeletionCheck) {
|
|
6840
|
+
for (const key in slots) {
|
|
6841
|
+
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
6842
|
+
delete slots[key];
|
|
7216
6843
|
}
|
|
7217
6844
|
}
|
|
7218
6845
|
}
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
return cached;
|
|
7227
|
-
}
|
|
7228
|
-
const raw = comp.props;
|
|
7229
|
-
const normalized = {};
|
|
7230
|
-
const needCastKeys = [];
|
|
7231
|
-
let hasExtends = false;
|
|
7232
|
-
if (!isFunction(comp)) {
|
|
7233
|
-
const extendProps = (raw2) => {
|
|
7234
|
-
hasExtends = true;
|
|
7235
|
-
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
7236
|
-
extend(normalized, props);
|
|
7237
|
-
if (keys) needCastKeys.push(...keys);
|
|
7238
|
-
};
|
|
7239
|
-
if (!asMixin && appContext.mixins.length) {
|
|
7240
|
-
appContext.mixins.forEach(extendProps);
|
|
7241
|
-
}
|
|
7242
|
-
if (comp.extends) {
|
|
7243
|
-
extendProps(comp.extends);
|
|
7244
|
-
}
|
|
7245
|
-
if (comp.mixins) {
|
|
7246
|
-
comp.mixins.forEach(extendProps);
|
|
7247
|
-
}
|
|
6846
|
+
};
|
|
6847
|
+
|
|
6848
|
+
let supported;
|
|
6849
|
+
let perf;
|
|
6850
|
+
function startMeasure(instance, type) {
|
|
6851
|
+
if (instance.appContext.config.performance && isSupported()) {
|
|
6852
|
+
perf.mark(`vue-${type}-${instance.uid}`);
|
|
7248
6853
|
}
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
cache.set(comp, EMPTY_ARR);
|
|
7252
|
-
}
|
|
7253
|
-
return EMPTY_ARR;
|
|
6854
|
+
{
|
|
6855
|
+
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7254
6856
|
}
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
if (!isObject(raw)) {
|
|
7267
|
-
warn$1(`invalid props options`, raw);
|
|
7268
|
-
}
|
|
7269
|
-
for (const key in raw) {
|
|
7270
|
-
const normalizedKey = camelize(key);
|
|
7271
|
-
if (validatePropName(normalizedKey)) {
|
|
7272
|
-
const opt = raw[key];
|
|
7273
|
-
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
|
|
7274
|
-
const propType = prop.type;
|
|
7275
|
-
let shouldCast = false;
|
|
7276
|
-
let shouldCastTrue = true;
|
|
7277
|
-
if (isArray(propType)) {
|
|
7278
|
-
for (let index = 0; index < propType.length; ++index) {
|
|
7279
|
-
const type = propType[index];
|
|
7280
|
-
const typeName = isFunction(type) && type.name;
|
|
7281
|
-
if (typeName === "Boolean") {
|
|
7282
|
-
shouldCast = true;
|
|
7283
|
-
break;
|
|
7284
|
-
} else if (typeName === "String") {
|
|
7285
|
-
shouldCastTrue = false;
|
|
7286
|
-
}
|
|
7287
|
-
}
|
|
7288
|
-
} else {
|
|
7289
|
-
shouldCast = isFunction(propType) && propType.name === "Boolean";
|
|
7290
|
-
}
|
|
7291
|
-
prop[0 /* shouldCast */] = shouldCast;
|
|
7292
|
-
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
7293
|
-
if (shouldCast || hasOwn(prop, "default")) {
|
|
7294
|
-
needCastKeys.push(normalizedKey);
|
|
7295
|
-
}
|
|
7296
|
-
}
|
|
7297
|
-
}
|
|
6857
|
+
}
|
|
6858
|
+
function endMeasure(instance, type) {
|
|
6859
|
+
if (instance.appContext.config.performance && isSupported()) {
|
|
6860
|
+
const startTag = `vue-${type}-${instance.uid}`;
|
|
6861
|
+
const endTag = startTag + `:end`;
|
|
6862
|
+
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
6863
|
+
perf.mark(endTag);
|
|
6864
|
+
perf.measure(measureName, startTag, endTag);
|
|
6865
|
+
perf.clearMeasures(measureName);
|
|
6866
|
+
perf.clearMarks(startTag);
|
|
6867
|
+
perf.clearMarks(endTag);
|
|
7298
6868
|
}
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
cache.set(comp, res);
|
|
6869
|
+
{
|
|
6870
|
+
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7302
6871
|
}
|
|
7303
|
-
return res;
|
|
7304
6872
|
}
|
|
7305
|
-
function
|
|
7306
|
-
if (
|
|
7307
|
-
return
|
|
6873
|
+
function isSupported() {
|
|
6874
|
+
if (supported !== void 0) {
|
|
6875
|
+
return supported;
|
|
6876
|
+
}
|
|
6877
|
+
if (typeof window !== "undefined" && window.performance) {
|
|
6878
|
+
supported = true;
|
|
6879
|
+
perf = window.performance;
|
|
7308
6880
|
} else {
|
|
7309
|
-
|
|
6881
|
+
supported = false;
|
|
7310
6882
|
}
|
|
7311
|
-
return
|
|
6883
|
+
return supported;
|
|
7312
6884
|
}
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
if (typeof ctor === "function") {
|
|
7318
|
-
return ctor.name || "";
|
|
7319
|
-
} else if (typeof ctor === "object") {
|
|
7320
|
-
const name = ctor.constructor && ctor.constructor.name;
|
|
7321
|
-
return name || "";
|
|
7322
|
-
}
|
|
7323
|
-
return "";
|
|
6885
|
+
|
|
6886
|
+
const queuePostRenderEffect = queueEffectWithSuspense ;
|
|
6887
|
+
function createRenderer(options) {
|
|
6888
|
+
return baseCreateRenderer(options);
|
|
7324
6889
|
}
|
|
7325
|
-
function
|
|
7326
|
-
|
|
7327
|
-
const options = instance.propsOptions[0];
|
|
7328
|
-
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
7329
|
-
for (const key in options) {
|
|
7330
|
-
let opt = options[key];
|
|
7331
|
-
if (opt == null) continue;
|
|
7332
|
-
validateProp(
|
|
7333
|
-
key,
|
|
7334
|
-
resolvedValues[key],
|
|
7335
|
-
opt,
|
|
7336
|
-
shallowReadonly(resolvedValues) ,
|
|
7337
|
-
!camelizePropsKey.includes(key)
|
|
7338
|
-
);
|
|
7339
|
-
}
|
|
6890
|
+
function createHydrationRenderer(options) {
|
|
6891
|
+
return baseCreateRenderer(options, createHydrationFunctions);
|
|
7340
6892
|
}
|
|
7341
|
-
function
|
|
7342
|
-
const
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
}
|
|
7347
|
-
if (value == null && !required) {
|
|
7348
|
-
return;
|
|
6893
|
+
function baseCreateRenderer(options, createHydrationFns) {
|
|
6894
|
+
const target = getGlobalThis();
|
|
6895
|
+
target.__VUE__ = true;
|
|
6896
|
+
{
|
|
6897
|
+
setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
7349
6898
|
}
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
6899
|
+
const {
|
|
6900
|
+
insert: hostInsert,
|
|
6901
|
+
remove: hostRemove,
|
|
6902
|
+
patchProp: hostPatchProp,
|
|
6903
|
+
createElement: hostCreateElement,
|
|
6904
|
+
createText: hostCreateText,
|
|
6905
|
+
createComment: hostCreateComment,
|
|
6906
|
+
setText: hostSetText,
|
|
6907
|
+
setElementText: hostSetElementText,
|
|
6908
|
+
parentNode: hostParentNode,
|
|
6909
|
+
nextSibling: hostNextSibling,
|
|
6910
|
+
setScopeId: hostSetScopeId = NOOP,
|
|
6911
|
+
insertStaticContent: hostInsertStaticContent
|
|
6912
|
+
} = options;
|
|
6913
|
+
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
|
|
6914
|
+
if (n1 === n2) {
|
|
7361
6915
|
return;
|
|
7362
6916
|
}
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
}
|
|
7368
|
-
const isSimpleType = /* @__PURE__ */ makeMap(
|
|
7369
|
-
"String,Number,Boolean,Function,Symbol,BigInt"
|
|
7370
|
-
);
|
|
7371
|
-
function assertType(value, type) {
|
|
7372
|
-
let valid;
|
|
7373
|
-
const expectedType = getType(type);
|
|
7374
|
-
if (expectedType === "null") {
|
|
7375
|
-
valid = value === null;
|
|
7376
|
-
} else if (isSimpleType(expectedType)) {
|
|
7377
|
-
const t = typeof value;
|
|
7378
|
-
valid = t === expectedType.toLowerCase();
|
|
7379
|
-
if (!valid && t === "object") {
|
|
7380
|
-
valid = value instanceof type;
|
|
7381
|
-
}
|
|
7382
|
-
} else if (expectedType === "Object") {
|
|
7383
|
-
valid = isObject(value);
|
|
7384
|
-
} else if (expectedType === "Array") {
|
|
7385
|
-
valid = isArray(value);
|
|
7386
|
-
} else {
|
|
7387
|
-
valid = value instanceof type;
|
|
7388
|
-
}
|
|
7389
|
-
return {
|
|
7390
|
-
valid,
|
|
7391
|
-
expectedType
|
|
7392
|
-
};
|
|
7393
|
-
}
|
|
7394
|
-
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
7395
|
-
if (expectedTypes.length === 0) {
|
|
7396
|
-
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
7397
|
-
}
|
|
7398
|
-
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
7399
|
-
const expectedType = expectedTypes[0];
|
|
7400
|
-
const receivedType = toRawType(value);
|
|
7401
|
-
const expectedValue = styleValue(value, expectedType);
|
|
7402
|
-
const receivedValue = styleValue(value, receivedType);
|
|
7403
|
-
if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
|
|
7404
|
-
message += ` with value ${expectedValue}`;
|
|
7405
|
-
}
|
|
7406
|
-
message += `, got ${receivedType} `;
|
|
7407
|
-
if (isExplicable(receivedType)) {
|
|
7408
|
-
message += `with value ${receivedValue}.`;
|
|
7409
|
-
}
|
|
7410
|
-
return message;
|
|
7411
|
-
}
|
|
7412
|
-
function styleValue(value, type) {
|
|
7413
|
-
if (type === "String") {
|
|
7414
|
-
return `"${value}"`;
|
|
7415
|
-
} else if (type === "Number") {
|
|
7416
|
-
return `${Number(value)}`;
|
|
7417
|
-
} else {
|
|
7418
|
-
return `${value}`;
|
|
7419
|
-
}
|
|
7420
|
-
}
|
|
7421
|
-
function isExplicable(type) {
|
|
7422
|
-
const explicitTypes = ["string", "number", "boolean"];
|
|
7423
|
-
return explicitTypes.some((elem) => type.toLowerCase() === elem);
|
|
7424
|
-
}
|
|
7425
|
-
function isBoolean(...args) {
|
|
7426
|
-
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
7427
|
-
}
|
|
7428
|
-
|
|
7429
|
-
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
7430
|
-
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
7431
|
-
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
7432
|
-
if (rawSlot._n) {
|
|
7433
|
-
return rawSlot;
|
|
7434
|
-
}
|
|
7435
|
-
const normalized = withCtx((...args) => {
|
|
7436
|
-
if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
|
|
7437
|
-
warn$1(
|
|
7438
|
-
`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.`
|
|
7439
|
-
);
|
|
7440
|
-
}
|
|
7441
|
-
return normalizeSlotValue(rawSlot(...args));
|
|
7442
|
-
}, ctx);
|
|
7443
|
-
normalized._c = false;
|
|
7444
|
-
return normalized;
|
|
7445
|
-
};
|
|
7446
|
-
const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
7447
|
-
const ctx = rawSlots._ctx;
|
|
7448
|
-
for (const key in rawSlots) {
|
|
7449
|
-
if (isInternalKey(key)) continue;
|
|
7450
|
-
const value = rawSlots[key];
|
|
7451
|
-
if (isFunction(value)) {
|
|
7452
|
-
slots[key] = normalizeSlot(key, value, ctx);
|
|
7453
|
-
} else if (value != null) {
|
|
7454
|
-
{
|
|
7455
|
-
warn$1(
|
|
7456
|
-
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
|
|
7457
|
-
);
|
|
7458
|
-
}
|
|
7459
|
-
const normalized = normalizeSlotValue(value);
|
|
7460
|
-
slots[key] = () => normalized;
|
|
7461
|
-
}
|
|
7462
|
-
}
|
|
7463
|
-
};
|
|
7464
|
-
const normalizeVNodeSlots = (instance, children) => {
|
|
7465
|
-
if (!isKeepAlive(instance.vnode) && true) {
|
|
7466
|
-
warn$1(
|
|
7467
|
-
`Non-function value encountered for default slot. Prefer function slots for better performance.`
|
|
7468
|
-
);
|
|
7469
|
-
}
|
|
7470
|
-
const normalized = normalizeSlotValue(children);
|
|
7471
|
-
instance.slots.default = () => normalized;
|
|
7472
|
-
};
|
|
7473
|
-
const assignSlots = (slots, children, optimized) => {
|
|
7474
|
-
for (const key in children) {
|
|
7475
|
-
if (optimized || !isInternalKey(key)) {
|
|
7476
|
-
slots[key] = children[key];
|
|
7477
|
-
}
|
|
7478
|
-
}
|
|
7479
|
-
};
|
|
7480
|
-
const initSlots = (instance, children, optimized) => {
|
|
7481
|
-
const slots = instance.slots = createInternalObject();
|
|
7482
|
-
if (instance.vnode.shapeFlag & 32) {
|
|
7483
|
-
const type = children._;
|
|
7484
|
-
if (type) {
|
|
7485
|
-
assignSlots(slots, children, optimized);
|
|
7486
|
-
if (optimized) {
|
|
7487
|
-
def(slots, "_", type, true);
|
|
7488
|
-
}
|
|
7489
|
-
} else {
|
|
7490
|
-
normalizeObjectSlots(children, slots);
|
|
7491
|
-
}
|
|
7492
|
-
} else if (children) {
|
|
7493
|
-
normalizeVNodeSlots(instance, children);
|
|
7494
|
-
}
|
|
7495
|
-
};
|
|
7496
|
-
const updateSlots = (instance, children, optimized) => {
|
|
7497
|
-
const { vnode, slots } = instance;
|
|
7498
|
-
let needDeletionCheck = true;
|
|
7499
|
-
let deletionComparisonTarget = EMPTY_OBJ;
|
|
7500
|
-
if (vnode.shapeFlag & 32) {
|
|
7501
|
-
const type = children._;
|
|
7502
|
-
if (type) {
|
|
7503
|
-
if (isHmrUpdating) {
|
|
7504
|
-
assignSlots(slots, children, optimized);
|
|
7505
|
-
trigger(instance, "set", "$slots");
|
|
7506
|
-
} else if (optimized && type === 1) {
|
|
7507
|
-
needDeletionCheck = false;
|
|
7508
|
-
} else {
|
|
7509
|
-
assignSlots(slots, children, optimized);
|
|
7510
|
-
}
|
|
7511
|
-
} else {
|
|
7512
|
-
needDeletionCheck = !children.$stable;
|
|
7513
|
-
normalizeObjectSlots(children, slots);
|
|
7514
|
-
}
|
|
7515
|
-
deletionComparisonTarget = children;
|
|
7516
|
-
} else if (children) {
|
|
7517
|
-
normalizeVNodeSlots(instance, children);
|
|
7518
|
-
deletionComparisonTarget = { default: 1 };
|
|
7519
|
-
}
|
|
7520
|
-
if (needDeletionCheck) {
|
|
7521
|
-
for (const key in slots) {
|
|
7522
|
-
if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {
|
|
7523
|
-
delete slots[key];
|
|
7524
|
-
}
|
|
7525
|
-
}
|
|
7526
|
-
}
|
|
7527
|
-
};
|
|
7528
|
-
|
|
7529
|
-
let supported;
|
|
7530
|
-
let perf;
|
|
7531
|
-
function startMeasure(instance, type) {
|
|
7532
|
-
if (instance.appContext.config.performance && isSupported()) {
|
|
7533
|
-
perf.mark(`vue-${type}-${instance.uid}`);
|
|
7534
|
-
}
|
|
7535
|
-
{
|
|
7536
|
-
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7537
|
-
}
|
|
7538
|
-
}
|
|
7539
|
-
function endMeasure(instance, type) {
|
|
7540
|
-
if (instance.appContext.config.performance && isSupported()) {
|
|
7541
|
-
const startTag = `vue-${type}-${instance.uid}`;
|
|
7542
|
-
const endTag = startTag + `:end`;
|
|
7543
|
-
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
7544
|
-
perf.mark(endTag);
|
|
7545
|
-
perf.measure(measureName, startTag, endTag);
|
|
7546
|
-
perf.clearMeasures(measureName);
|
|
7547
|
-
perf.clearMarks(startTag);
|
|
7548
|
-
perf.clearMarks(endTag);
|
|
7549
|
-
}
|
|
7550
|
-
{
|
|
7551
|
-
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
7552
|
-
}
|
|
7553
|
-
}
|
|
7554
|
-
function isSupported() {
|
|
7555
|
-
if (supported !== void 0) {
|
|
7556
|
-
return supported;
|
|
7557
|
-
}
|
|
7558
|
-
if (typeof window !== "undefined" && window.performance) {
|
|
7559
|
-
supported = true;
|
|
7560
|
-
perf = window.performance;
|
|
7561
|
-
} else {
|
|
7562
|
-
supported = false;
|
|
7563
|
-
}
|
|
7564
|
-
return supported;
|
|
7565
|
-
}
|
|
7566
|
-
|
|
7567
|
-
const queuePostRenderEffect = queueEffectWithSuspense ;
|
|
7568
|
-
function createRenderer(options) {
|
|
7569
|
-
return baseCreateRenderer(options);
|
|
7570
|
-
}
|
|
7571
|
-
function createHydrationRenderer(options) {
|
|
7572
|
-
return baseCreateRenderer(options, createHydrationFunctions);
|
|
7573
|
-
}
|
|
7574
|
-
function baseCreateRenderer(options, createHydrationFns) {
|
|
7575
|
-
const target = getGlobalThis();
|
|
7576
|
-
target.__VUE__ = true;
|
|
7577
|
-
{
|
|
7578
|
-
setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
7579
|
-
}
|
|
7580
|
-
const {
|
|
7581
|
-
insert: hostInsert,
|
|
7582
|
-
remove: hostRemove,
|
|
7583
|
-
patchProp: hostPatchProp,
|
|
7584
|
-
createElement: hostCreateElement,
|
|
7585
|
-
createText: hostCreateText,
|
|
7586
|
-
createComment: hostCreateComment,
|
|
7587
|
-
setText: hostSetText,
|
|
7588
|
-
setElementText: hostSetElementText,
|
|
7589
|
-
parentNode: hostParentNode,
|
|
7590
|
-
nextSibling: hostNextSibling,
|
|
7591
|
-
setScopeId: hostSetScopeId = NOOP,
|
|
7592
|
-
insertStaticContent: hostInsertStaticContent
|
|
7593
|
-
} = options;
|
|
7594
|
-
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
|
|
7595
|
-
if (n1 === n2) {
|
|
7596
|
-
return;
|
|
7597
|
-
}
|
|
7598
|
-
if (n1 && !isSameVNodeType(n1, n2)) {
|
|
7599
|
-
anchor = getNextHostNode(n1);
|
|
7600
|
-
unmount(n1, parentComponent, parentSuspense, true);
|
|
7601
|
-
n1 = null;
|
|
6917
|
+
if (n1 && !isSameVNodeType(n1, n2)) {
|
|
6918
|
+
anchor = getNextHostNode(n1);
|
|
6919
|
+
unmount(n1, parentComponent, parentSuspense, true);
|
|
6920
|
+
n1 = null;
|
|
7602
6921
|
}
|
|
7603
6922
|
if (n2.patchFlag === -2) {
|
|
7604
6923
|
optimized = false;
|
|
@@ -7703,15 +7022,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7703
7022
|
} else {
|
|
7704
7023
|
const el = n2.el = n1.el;
|
|
7705
7024
|
if (n2.children !== n1.children) {
|
|
7706
|
-
|
|
7707
|
-
const childNodes = container.childNodes;
|
|
7708
|
-
const newChild = hostCreateText(n2.children);
|
|
7709
|
-
const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
|
|
7710
|
-
hostInsert(newChild, container, oldChild);
|
|
7711
|
-
hostRemove(oldChild);
|
|
7712
|
-
} else {
|
|
7713
|
-
hostSetText(el, n2.children);
|
|
7714
|
-
}
|
|
7025
|
+
hostSetText(el, n2.children);
|
|
7715
7026
|
}
|
|
7716
7027
|
}
|
|
7717
7028
|
};
|
|
@@ -7787,25 +7098,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7787
7098
|
optimized
|
|
7788
7099
|
);
|
|
7789
7100
|
} else {
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
parentSuspense,
|
|
7800
|
-
namespace,
|
|
7801
|
-
slotScopeIds,
|
|
7802
|
-
optimized
|
|
7803
|
-
);
|
|
7804
|
-
} finally {
|
|
7805
|
-
if (customElement) {
|
|
7806
|
-
customElement._endPatch();
|
|
7807
|
-
}
|
|
7808
|
-
}
|
|
7101
|
+
patchElement(
|
|
7102
|
+
n1,
|
|
7103
|
+
n2,
|
|
7104
|
+
parentComponent,
|
|
7105
|
+
parentSuspense,
|
|
7106
|
+
namespace,
|
|
7107
|
+
slotScopeIds,
|
|
7108
|
+
optimized
|
|
7109
|
+
);
|
|
7809
7110
|
}
|
|
7810
7111
|
};
|
|
7811
7112
|
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
@@ -8097,7 +7398,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8097
7398
|
} else {
|
|
8098
7399
|
if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
|
|
8099
7400
|
// of renderSlot() with no valid children
|
|
8100
|
-
n1.dynamicChildren
|
|
7401
|
+
n1.dynamicChildren) {
|
|
8101
7402
|
patchBlockChildren(
|
|
8102
7403
|
n1.dynamicChildren,
|
|
8103
7404
|
dynamicChildren,
|
|
@@ -8686,8 +7987,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8686
7987
|
const nextChild = c2[nextIndex];
|
|
8687
7988
|
const anchorVNode = c2[nextIndex + 1];
|
|
8688
7989
|
const anchor = nextIndex + 1 < l2 ? (
|
|
8689
|
-
// #13559,
|
|
8690
|
-
anchorVNode.el ||
|
|
7990
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
7991
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
8691
7992
|
) : parentAnchor;
|
|
8692
7993
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
8693
7994
|
patch(
|
|
@@ -8943,168 +8244,785 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8943
8244
|
};
|
|
8944
8245
|
let isFlushing = false;
|
|
8945
8246
|
const render = (vnode, container, namespace) => {
|
|
8946
|
-
let instance;
|
|
8947
8247
|
if (vnode == null) {
|
|
8948
8248
|
if (container._vnode) {
|
|
8949
8249
|
unmount(container._vnode, null, null, true);
|
|
8950
|
-
instance = container._vnode.component;
|
|
8951
8250
|
}
|
|
8952
|
-
} else {
|
|
8953
|
-
patch(
|
|
8954
|
-
container._vnode || null,
|
|
8955
|
-
vnode,
|
|
8956
|
-
container,
|
|
8957
|
-
null,
|
|
8958
|
-
null,
|
|
8959
|
-
null,
|
|
8960
|
-
namespace
|
|
8251
|
+
} else {
|
|
8252
|
+
patch(
|
|
8253
|
+
container._vnode || null,
|
|
8254
|
+
vnode,
|
|
8255
|
+
container,
|
|
8256
|
+
null,
|
|
8257
|
+
null,
|
|
8258
|
+
null,
|
|
8259
|
+
namespace
|
|
8260
|
+
);
|
|
8261
|
+
}
|
|
8262
|
+
container._vnode = vnode;
|
|
8263
|
+
if (!isFlushing) {
|
|
8264
|
+
isFlushing = true;
|
|
8265
|
+
flushPreFlushCbs();
|
|
8266
|
+
flushPostFlushCbs();
|
|
8267
|
+
isFlushing = false;
|
|
8268
|
+
}
|
|
8269
|
+
};
|
|
8270
|
+
const internals = {
|
|
8271
|
+
p: patch,
|
|
8272
|
+
um: unmount,
|
|
8273
|
+
m: move,
|
|
8274
|
+
r: remove,
|
|
8275
|
+
mt: mountComponent,
|
|
8276
|
+
mc: mountChildren,
|
|
8277
|
+
pc: patchChildren,
|
|
8278
|
+
pbc: patchBlockChildren,
|
|
8279
|
+
n: getNextHostNode,
|
|
8280
|
+
o: options
|
|
8281
|
+
};
|
|
8282
|
+
let hydrate;
|
|
8283
|
+
let hydrateNode;
|
|
8284
|
+
if (createHydrationFns) {
|
|
8285
|
+
[hydrate, hydrateNode] = createHydrationFns(
|
|
8286
|
+
internals
|
|
8287
|
+
);
|
|
8288
|
+
}
|
|
8289
|
+
return {
|
|
8290
|
+
render,
|
|
8291
|
+
hydrate,
|
|
8292
|
+
createApp: createAppAPI(render, hydrate)
|
|
8293
|
+
};
|
|
8294
|
+
}
|
|
8295
|
+
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
8296
|
+
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8297
|
+
}
|
|
8298
|
+
function toggleRecurse({ effect, job }, allowed) {
|
|
8299
|
+
if (allowed) {
|
|
8300
|
+
effect.flags |= 32;
|
|
8301
|
+
job.flags |= 4;
|
|
8302
|
+
} else {
|
|
8303
|
+
effect.flags &= -33;
|
|
8304
|
+
job.flags &= -5;
|
|
8305
|
+
}
|
|
8306
|
+
}
|
|
8307
|
+
function needTransition(parentSuspense, transition) {
|
|
8308
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
8309
|
+
}
|
|
8310
|
+
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
8311
|
+
const ch1 = n1.children;
|
|
8312
|
+
const ch2 = n2.children;
|
|
8313
|
+
if (isArray(ch1) && isArray(ch2)) {
|
|
8314
|
+
for (let i = 0; i < ch1.length; i++) {
|
|
8315
|
+
const c1 = ch1[i];
|
|
8316
|
+
let c2 = ch2[i];
|
|
8317
|
+
if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
|
|
8318
|
+
if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
|
|
8319
|
+
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
8320
|
+
c2.el = c1.el;
|
|
8321
|
+
}
|
|
8322
|
+
if (!shallow && c2.patchFlag !== -2)
|
|
8323
|
+
traverseStaticChildren(c1, c2);
|
|
8324
|
+
}
|
|
8325
|
+
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
8326
|
+
c2.patchFlag !== -1) {
|
|
8327
|
+
c2.el = c1.el;
|
|
8328
|
+
}
|
|
8329
|
+
if (c2.type === Comment && !c2.el) {
|
|
8330
|
+
c2.el = c1.el;
|
|
8331
|
+
}
|
|
8332
|
+
{
|
|
8333
|
+
c2.el && (c2.el.__vnode = c2);
|
|
8334
|
+
}
|
|
8335
|
+
}
|
|
8336
|
+
}
|
|
8337
|
+
}
|
|
8338
|
+
function getSequence(arr) {
|
|
8339
|
+
const p = arr.slice();
|
|
8340
|
+
const result = [0];
|
|
8341
|
+
let i, j, u, v, c;
|
|
8342
|
+
const len = arr.length;
|
|
8343
|
+
for (i = 0; i < len; i++) {
|
|
8344
|
+
const arrI = arr[i];
|
|
8345
|
+
if (arrI !== 0) {
|
|
8346
|
+
j = result[result.length - 1];
|
|
8347
|
+
if (arr[j] < arrI) {
|
|
8348
|
+
p[i] = j;
|
|
8349
|
+
result.push(i);
|
|
8350
|
+
continue;
|
|
8351
|
+
}
|
|
8352
|
+
u = 0;
|
|
8353
|
+
v = result.length - 1;
|
|
8354
|
+
while (u < v) {
|
|
8355
|
+
c = u + v >> 1;
|
|
8356
|
+
if (arr[result[c]] < arrI) {
|
|
8357
|
+
u = c + 1;
|
|
8358
|
+
} else {
|
|
8359
|
+
v = c;
|
|
8360
|
+
}
|
|
8361
|
+
}
|
|
8362
|
+
if (arrI < arr[result[u]]) {
|
|
8363
|
+
if (u > 0) {
|
|
8364
|
+
p[i] = result[u - 1];
|
|
8365
|
+
}
|
|
8366
|
+
result[u] = i;
|
|
8367
|
+
}
|
|
8368
|
+
}
|
|
8369
|
+
}
|
|
8370
|
+
u = result.length;
|
|
8371
|
+
v = result[u - 1];
|
|
8372
|
+
while (u-- > 0) {
|
|
8373
|
+
result[u] = v;
|
|
8374
|
+
v = p[v];
|
|
8375
|
+
}
|
|
8376
|
+
return result;
|
|
8377
|
+
}
|
|
8378
|
+
function locateNonHydratedAsyncRoot(instance) {
|
|
8379
|
+
const subComponent = instance.subTree.component;
|
|
8380
|
+
if (subComponent) {
|
|
8381
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
8382
|
+
return subComponent;
|
|
8383
|
+
} else {
|
|
8384
|
+
return locateNonHydratedAsyncRoot(subComponent);
|
|
8385
|
+
}
|
|
8386
|
+
}
|
|
8387
|
+
}
|
|
8388
|
+
function invalidateMount(hooks) {
|
|
8389
|
+
if (hooks) {
|
|
8390
|
+
for (let i = 0; i < hooks.length; i++)
|
|
8391
|
+
hooks[i].flags |= 8;
|
|
8392
|
+
}
|
|
8393
|
+
}
|
|
8394
|
+
|
|
8395
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
8396
|
+
const useSSRContext = () => {
|
|
8397
|
+
{
|
|
8398
|
+
const ctx = inject(ssrContextKey);
|
|
8399
|
+
if (!ctx) {
|
|
8400
|
+
warn$1(
|
|
8401
|
+
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
8402
|
+
);
|
|
8403
|
+
}
|
|
8404
|
+
return ctx;
|
|
8405
|
+
}
|
|
8406
|
+
};
|
|
8407
|
+
|
|
8408
|
+
function watchEffect(effect, options) {
|
|
8409
|
+
return doWatch(effect, null, options);
|
|
8410
|
+
}
|
|
8411
|
+
function watchPostEffect(effect, options) {
|
|
8412
|
+
return doWatch(
|
|
8413
|
+
effect,
|
|
8414
|
+
null,
|
|
8415
|
+
extend({}, options, { flush: "post" })
|
|
8416
|
+
);
|
|
8417
|
+
}
|
|
8418
|
+
function watchSyncEffect(effect, options) {
|
|
8419
|
+
return doWatch(
|
|
8420
|
+
effect,
|
|
8421
|
+
null,
|
|
8422
|
+
extend({}, options, { flush: "sync" })
|
|
8423
|
+
);
|
|
8424
|
+
}
|
|
8425
|
+
function watch(source, cb, options) {
|
|
8426
|
+
if (!isFunction(cb)) {
|
|
8427
|
+
warn$1(
|
|
8428
|
+
`\`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.`
|
|
8429
|
+
);
|
|
8430
|
+
}
|
|
8431
|
+
return doWatch(source, cb, options);
|
|
8432
|
+
}
|
|
8433
|
+
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
8434
|
+
const { immediate, deep, flush, once } = options;
|
|
8435
|
+
if (!cb) {
|
|
8436
|
+
if (immediate !== void 0) {
|
|
8437
|
+
warn$1(
|
|
8438
|
+
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
8439
|
+
);
|
|
8440
|
+
}
|
|
8441
|
+
if (deep !== void 0) {
|
|
8442
|
+
warn$1(
|
|
8443
|
+
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
8444
|
+
);
|
|
8445
|
+
}
|
|
8446
|
+
if (once !== void 0) {
|
|
8447
|
+
warn$1(
|
|
8448
|
+
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
8449
|
+
);
|
|
8450
|
+
}
|
|
8451
|
+
}
|
|
8452
|
+
const baseWatchOptions = extend({}, options);
|
|
8453
|
+
baseWatchOptions.onWarn = warn$1;
|
|
8454
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
8455
|
+
let ssrCleanup;
|
|
8456
|
+
if (isInSSRComponentSetup) {
|
|
8457
|
+
if (flush === "sync") {
|
|
8458
|
+
const ctx = useSSRContext();
|
|
8459
|
+
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
8460
|
+
} else if (!runsImmediately) {
|
|
8461
|
+
const watchStopHandle = () => {
|
|
8462
|
+
};
|
|
8463
|
+
watchStopHandle.stop = NOOP;
|
|
8464
|
+
watchStopHandle.resume = NOOP;
|
|
8465
|
+
watchStopHandle.pause = NOOP;
|
|
8466
|
+
return watchStopHandle;
|
|
8467
|
+
}
|
|
8468
|
+
}
|
|
8469
|
+
const instance = currentInstance;
|
|
8470
|
+
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
8471
|
+
let isPre = false;
|
|
8472
|
+
if (flush === "post") {
|
|
8473
|
+
baseWatchOptions.scheduler = (job) => {
|
|
8474
|
+
queuePostRenderEffect(job, instance && instance.suspense);
|
|
8475
|
+
};
|
|
8476
|
+
} else if (flush !== "sync") {
|
|
8477
|
+
isPre = true;
|
|
8478
|
+
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
8479
|
+
if (isFirstRun) {
|
|
8480
|
+
job();
|
|
8481
|
+
} else {
|
|
8482
|
+
queueJob(job);
|
|
8483
|
+
}
|
|
8484
|
+
};
|
|
8485
|
+
}
|
|
8486
|
+
baseWatchOptions.augmentJob = (job) => {
|
|
8487
|
+
if (cb) {
|
|
8488
|
+
job.flags |= 4;
|
|
8489
|
+
}
|
|
8490
|
+
if (isPre) {
|
|
8491
|
+
job.flags |= 2;
|
|
8492
|
+
if (instance) {
|
|
8493
|
+
job.id = instance.uid;
|
|
8494
|
+
job.i = instance;
|
|
8495
|
+
}
|
|
8496
|
+
}
|
|
8497
|
+
};
|
|
8498
|
+
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
8499
|
+
if (isInSSRComponentSetup) {
|
|
8500
|
+
if (ssrCleanup) {
|
|
8501
|
+
ssrCleanup.push(watchHandle);
|
|
8502
|
+
} else if (runsImmediately) {
|
|
8503
|
+
watchHandle();
|
|
8504
|
+
}
|
|
8505
|
+
}
|
|
8506
|
+
return watchHandle;
|
|
8507
|
+
}
|
|
8508
|
+
function instanceWatch(source, value, options) {
|
|
8509
|
+
const publicThis = this.proxy;
|
|
8510
|
+
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
8511
|
+
let cb;
|
|
8512
|
+
if (isFunction(value)) {
|
|
8513
|
+
cb = value;
|
|
8514
|
+
} else {
|
|
8515
|
+
cb = value.handler;
|
|
8516
|
+
options = value;
|
|
8517
|
+
}
|
|
8518
|
+
const reset = setCurrentInstance(this);
|
|
8519
|
+
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
8520
|
+
reset();
|
|
8521
|
+
return res;
|
|
8522
|
+
}
|
|
8523
|
+
function createPathGetter(ctx, path) {
|
|
8524
|
+
const segments = path.split(".");
|
|
8525
|
+
return () => {
|
|
8526
|
+
let cur = ctx;
|
|
8527
|
+
for (let i = 0; i < segments.length && cur; i++) {
|
|
8528
|
+
cur = cur[segments[i]];
|
|
8529
|
+
}
|
|
8530
|
+
return cur;
|
|
8531
|
+
};
|
|
8532
|
+
}
|
|
8533
|
+
|
|
8534
|
+
function useModel(props, name, options = EMPTY_OBJ) {
|
|
8535
|
+
const i = getCurrentInstance();
|
|
8536
|
+
if (!i) {
|
|
8537
|
+
warn$1(`useModel() called without active instance.`);
|
|
8538
|
+
return ref();
|
|
8539
|
+
}
|
|
8540
|
+
const camelizedName = camelize(name);
|
|
8541
|
+
if (!i.propsOptions[0][camelizedName]) {
|
|
8542
|
+
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
8543
|
+
return ref();
|
|
8544
|
+
}
|
|
8545
|
+
const hyphenatedName = hyphenate(name);
|
|
8546
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
8547
|
+
const res = customRef((track, trigger) => {
|
|
8548
|
+
let localValue;
|
|
8549
|
+
let prevSetValue = EMPTY_OBJ;
|
|
8550
|
+
let prevEmittedValue;
|
|
8551
|
+
watchSyncEffect(() => {
|
|
8552
|
+
const propValue = props[camelizedName];
|
|
8553
|
+
if (hasChanged(localValue, propValue)) {
|
|
8554
|
+
localValue = propValue;
|
|
8555
|
+
trigger();
|
|
8556
|
+
}
|
|
8557
|
+
});
|
|
8558
|
+
return {
|
|
8559
|
+
get() {
|
|
8560
|
+
track();
|
|
8561
|
+
return options.get ? options.get(localValue) : localValue;
|
|
8562
|
+
},
|
|
8563
|
+
set(value) {
|
|
8564
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
8565
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
8566
|
+
return;
|
|
8567
|
+
}
|
|
8568
|
+
const rawProps = i.vnode.props;
|
|
8569
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
8570
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {
|
|
8571
|
+
localValue = value;
|
|
8572
|
+
trigger();
|
|
8573
|
+
}
|
|
8574
|
+
i.emit(`update:${name}`, emittedValue);
|
|
8575
|
+
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
8576
|
+
trigger();
|
|
8577
|
+
}
|
|
8578
|
+
prevSetValue = value;
|
|
8579
|
+
prevEmittedValue = emittedValue;
|
|
8580
|
+
}
|
|
8581
|
+
};
|
|
8582
|
+
});
|
|
8583
|
+
res[Symbol.iterator] = () => {
|
|
8584
|
+
let i2 = 0;
|
|
8585
|
+
return {
|
|
8586
|
+
next() {
|
|
8587
|
+
if (i2 < 2) {
|
|
8588
|
+
return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false };
|
|
8589
|
+
} else {
|
|
8590
|
+
return { done: true };
|
|
8591
|
+
}
|
|
8592
|
+
}
|
|
8593
|
+
};
|
|
8594
|
+
};
|
|
8595
|
+
return res;
|
|
8596
|
+
}
|
|
8597
|
+
const getModelModifiers = (props, modelName) => {
|
|
8598
|
+
return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
|
|
8599
|
+
};
|
|
8600
|
+
|
|
8601
|
+
function emit(instance, event, ...rawArgs) {
|
|
8602
|
+
if (instance.isUnmounted) return;
|
|
8603
|
+
const props = instance.vnode.props || EMPTY_OBJ;
|
|
8604
|
+
{
|
|
8605
|
+
const {
|
|
8606
|
+
emitsOptions,
|
|
8607
|
+
propsOptions: [propsOptions]
|
|
8608
|
+
} = instance;
|
|
8609
|
+
if (emitsOptions) {
|
|
8610
|
+
if (!(event in emitsOptions) && true) {
|
|
8611
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
8612
|
+
warn$1(
|
|
8613
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
8614
|
+
);
|
|
8615
|
+
}
|
|
8616
|
+
} else {
|
|
8617
|
+
const validator = emitsOptions[event];
|
|
8618
|
+
if (isFunction(validator)) {
|
|
8619
|
+
const isValid = validator(...rawArgs);
|
|
8620
|
+
if (!isValid) {
|
|
8621
|
+
warn$1(
|
|
8622
|
+
`Invalid event arguments: event validation failed for event "${event}".`
|
|
8623
|
+
);
|
|
8624
|
+
}
|
|
8625
|
+
}
|
|
8626
|
+
}
|
|
8627
|
+
}
|
|
8628
|
+
}
|
|
8629
|
+
let args = rawArgs;
|
|
8630
|
+
const isModelListener = event.startsWith("update:");
|
|
8631
|
+
const modifiers = isModelListener && getModelModifiers(props, event.slice(7));
|
|
8632
|
+
if (modifiers) {
|
|
8633
|
+
if (modifiers.trim) {
|
|
8634
|
+
args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
8635
|
+
}
|
|
8636
|
+
if (modifiers.number) {
|
|
8637
|
+
args = rawArgs.map(looseToNumber);
|
|
8638
|
+
}
|
|
8639
|
+
}
|
|
8640
|
+
{
|
|
8641
|
+
devtoolsComponentEmit(instance, event, args);
|
|
8642
|
+
}
|
|
8643
|
+
{
|
|
8644
|
+
const lowerCaseEvent = event.toLowerCase();
|
|
8645
|
+
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
8646
|
+
warn$1(
|
|
8647
|
+
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
|
|
8648
|
+
instance,
|
|
8649
|
+
instance.type
|
|
8650
|
+
)} 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(
|
|
8651
|
+
event
|
|
8652
|
+
)}" instead of "${event}".`
|
|
8653
|
+
);
|
|
8654
|
+
}
|
|
8655
|
+
}
|
|
8656
|
+
let handlerName;
|
|
8657
|
+
let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
|
|
8658
|
+
props[handlerName = toHandlerKey(camelize(event))];
|
|
8659
|
+
if (!handler && isModelListener) {
|
|
8660
|
+
handler = props[handlerName = toHandlerKey(hyphenate(event))];
|
|
8661
|
+
}
|
|
8662
|
+
if (handler) {
|
|
8663
|
+
callWithAsyncErrorHandling(
|
|
8664
|
+
handler,
|
|
8665
|
+
instance,
|
|
8666
|
+
6,
|
|
8667
|
+
args
|
|
8668
|
+
);
|
|
8669
|
+
}
|
|
8670
|
+
const onceHandler = props[handlerName + `Once`];
|
|
8671
|
+
if (onceHandler) {
|
|
8672
|
+
if (!instance.emitted) {
|
|
8673
|
+
instance.emitted = {};
|
|
8674
|
+
} else if (instance.emitted[handlerName]) {
|
|
8675
|
+
return;
|
|
8676
|
+
}
|
|
8677
|
+
instance.emitted[handlerName] = true;
|
|
8678
|
+
callWithAsyncErrorHandling(
|
|
8679
|
+
onceHandler,
|
|
8680
|
+
instance,
|
|
8681
|
+
6,
|
|
8682
|
+
args
|
|
8683
|
+
);
|
|
8684
|
+
}
|
|
8685
|
+
}
|
|
8686
|
+
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
8687
|
+
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
8688
|
+
const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
8689
|
+
const cached = cache.get(comp);
|
|
8690
|
+
if (cached !== void 0) {
|
|
8691
|
+
return cached;
|
|
8692
|
+
}
|
|
8693
|
+
const raw = comp.emits;
|
|
8694
|
+
let normalized = {};
|
|
8695
|
+
let hasExtends = false;
|
|
8696
|
+
if (!isFunction(comp)) {
|
|
8697
|
+
const extendEmits = (raw2) => {
|
|
8698
|
+
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
8699
|
+
if (normalizedFromExtend) {
|
|
8700
|
+
hasExtends = true;
|
|
8701
|
+
extend(normalized, normalizedFromExtend);
|
|
8702
|
+
}
|
|
8703
|
+
};
|
|
8704
|
+
if (!asMixin && appContext.mixins.length) {
|
|
8705
|
+
appContext.mixins.forEach(extendEmits);
|
|
8706
|
+
}
|
|
8707
|
+
if (comp.extends) {
|
|
8708
|
+
extendEmits(comp.extends);
|
|
8709
|
+
}
|
|
8710
|
+
if (comp.mixins) {
|
|
8711
|
+
comp.mixins.forEach(extendEmits);
|
|
8712
|
+
}
|
|
8713
|
+
}
|
|
8714
|
+
if (!raw && !hasExtends) {
|
|
8715
|
+
if (isObject(comp)) {
|
|
8716
|
+
cache.set(comp, null);
|
|
8717
|
+
}
|
|
8718
|
+
return null;
|
|
8719
|
+
}
|
|
8720
|
+
if (isArray(raw)) {
|
|
8721
|
+
raw.forEach((key) => normalized[key] = null);
|
|
8722
|
+
} else {
|
|
8723
|
+
extend(normalized, raw);
|
|
8724
|
+
}
|
|
8725
|
+
if (isObject(comp)) {
|
|
8726
|
+
cache.set(comp, normalized);
|
|
8727
|
+
}
|
|
8728
|
+
return normalized;
|
|
8729
|
+
}
|
|
8730
|
+
function isEmitListener(options, key) {
|
|
8731
|
+
if (!options || !isOn(key)) {
|
|
8732
|
+
return false;
|
|
8733
|
+
}
|
|
8734
|
+
key = key.slice(2).replace(/Once$/, "");
|
|
8735
|
+
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
8736
|
+
}
|
|
8737
|
+
|
|
8738
|
+
let accessedAttrs = false;
|
|
8739
|
+
function markAttrsAccessed() {
|
|
8740
|
+
accessedAttrs = true;
|
|
8741
|
+
}
|
|
8742
|
+
function renderComponentRoot(instance) {
|
|
8743
|
+
const {
|
|
8744
|
+
type: Component,
|
|
8745
|
+
vnode,
|
|
8746
|
+
proxy,
|
|
8747
|
+
withProxy,
|
|
8748
|
+
propsOptions: [propsOptions],
|
|
8749
|
+
slots,
|
|
8750
|
+
attrs,
|
|
8751
|
+
emit,
|
|
8752
|
+
render,
|
|
8753
|
+
renderCache,
|
|
8754
|
+
props,
|
|
8755
|
+
data,
|
|
8756
|
+
setupState,
|
|
8757
|
+
ctx,
|
|
8758
|
+
inheritAttrs
|
|
8759
|
+
} = instance;
|
|
8760
|
+
const prev = setCurrentRenderingInstance(instance);
|
|
8761
|
+
let result;
|
|
8762
|
+
let fallthroughAttrs;
|
|
8763
|
+
{
|
|
8764
|
+
accessedAttrs = false;
|
|
8765
|
+
}
|
|
8766
|
+
try {
|
|
8767
|
+
if (vnode.shapeFlag & 4) {
|
|
8768
|
+
const proxyToUse = withProxy || proxy;
|
|
8769
|
+
const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
8770
|
+
get(target, key, receiver) {
|
|
8771
|
+
warn$1(
|
|
8772
|
+
`Property '${String(
|
|
8773
|
+
key
|
|
8774
|
+
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
8775
|
+
);
|
|
8776
|
+
return Reflect.get(target, key, receiver);
|
|
8777
|
+
}
|
|
8778
|
+
}) : proxyToUse;
|
|
8779
|
+
result = normalizeVNode(
|
|
8780
|
+
render.call(
|
|
8781
|
+
thisProxy,
|
|
8782
|
+
proxyToUse,
|
|
8783
|
+
renderCache,
|
|
8784
|
+
true ? shallowReadonly(props) : props,
|
|
8785
|
+
setupState,
|
|
8786
|
+
data,
|
|
8787
|
+
ctx
|
|
8788
|
+
)
|
|
8789
|
+
);
|
|
8790
|
+
fallthroughAttrs = attrs;
|
|
8791
|
+
} else {
|
|
8792
|
+
const render2 = Component;
|
|
8793
|
+
if (attrs === props) {
|
|
8794
|
+
markAttrsAccessed();
|
|
8795
|
+
}
|
|
8796
|
+
result = normalizeVNode(
|
|
8797
|
+
render2.length > 1 ? render2(
|
|
8798
|
+
true ? shallowReadonly(props) : props,
|
|
8799
|
+
true ? {
|
|
8800
|
+
get attrs() {
|
|
8801
|
+
markAttrsAccessed();
|
|
8802
|
+
return shallowReadonly(attrs);
|
|
8803
|
+
},
|
|
8804
|
+
slots,
|
|
8805
|
+
emit
|
|
8806
|
+
} : { attrs, slots, emit }
|
|
8807
|
+
) : render2(
|
|
8808
|
+
true ? shallowReadonly(props) : props,
|
|
8809
|
+
null
|
|
8810
|
+
)
|
|
8811
|
+
);
|
|
8812
|
+
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
|
|
8813
|
+
}
|
|
8814
|
+
} catch (err) {
|
|
8815
|
+
blockStack.length = 0;
|
|
8816
|
+
handleError(err, instance, 1);
|
|
8817
|
+
result = createVNode(Comment);
|
|
8818
|
+
}
|
|
8819
|
+
let root = result;
|
|
8820
|
+
let setRoot = void 0;
|
|
8821
|
+
if (result.patchFlag > 0 && result.patchFlag & 2048) {
|
|
8822
|
+
[root, setRoot] = getChildRoot(result);
|
|
8823
|
+
}
|
|
8824
|
+
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
8825
|
+
const keys = Object.keys(fallthroughAttrs);
|
|
8826
|
+
const { shapeFlag } = root;
|
|
8827
|
+
if (keys.length) {
|
|
8828
|
+
if (shapeFlag & (1 | 6)) {
|
|
8829
|
+
if (propsOptions && keys.some(isModelListener)) {
|
|
8830
|
+
fallthroughAttrs = filterModelListeners(
|
|
8831
|
+
fallthroughAttrs,
|
|
8832
|
+
propsOptions
|
|
8833
|
+
);
|
|
8834
|
+
}
|
|
8835
|
+
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
8836
|
+
} else if (!accessedAttrs && root.type !== Comment) {
|
|
8837
|
+
const allAttrs = Object.keys(attrs);
|
|
8838
|
+
const eventAttrs = [];
|
|
8839
|
+
const extraAttrs = [];
|
|
8840
|
+
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
8841
|
+
const key = allAttrs[i];
|
|
8842
|
+
if (isOn(key)) {
|
|
8843
|
+
if (!isModelListener(key)) {
|
|
8844
|
+
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
8845
|
+
}
|
|
8846
|
+
} else {
|
|
8847
|
+
extraAttrs.push(key);
|
|
8848
|
+
}
|
|
8849
|
+
}
|
|
8850
|
+
if (extraAttrs.length) {
|
|
8851
|
+
warn$1(
|
|
8852
|
+
`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.`
|
|
8853
|
+
);
|
|
8854
|
+
}
|
|
8855
|
+
if (eventAttrs.length) {
|
|
8856
|
+
warn$1(
|
|
8857
|
+
`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.`
|
|
8858
|
+
);
|
|
8859
|
+
}
|
|
8860
|
+
}
|
|
8861
|
+
}
|
|
8862
|
+
}
|
|
8863
|
+
if (vnode.dirs) {
|
|
8864
|
+
if (!isElementRoot(root)) {
|
|
8865
|
+
warn$1(
|
|
8866
|
+
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
8961
8867
|
);
|
|
8962
8868
|
}
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8869
|
+
root = cloneVNode(root, null, false, true);
|
|
8870
|
+
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
8871
|
+
}
|
|
8872
|
+
if (vnode.transition) {
|
|
8873
|
+
if (!isElementRoot(root)) {
|
|
8874
|
+
warn$1(
|
|
8875
|
+
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
8876
|
+
);
|
|
8969
8877
|
}
|
|
8970
|
-
|
|
8971
|
-
const internals = {
|
|
8972
|
-
p: patch,
|
|
8973
|
-
um: unmount,
|
|
8974
|
-
m: move,
|
|
8975
|
-
r: remove,
|
|
8976
|
-
mt: mountComponent,
|
|
8977
|
-
mc: mountChildren,
|
|
8978
|
-
pc: patchChildren,
|
|
8979
|
-
pbc: patchBlockChildren,
|
|
8980
|
-
n: getNextHostNode,
|
|
8981
|
-
o: options
|
|
8982
|
-
};
|
|
8983
|
-
let hydrate;
|
|
8984
|
-
let hydrateNode;
|
|
8985
|
-
if (createHydrationFns) {
|
|
8986
|
-
[hydrate, hydrateNode] = createHydrationFns(
|
|
8987
|
-
internals
|
|
8988
|
-
);
|
|
8878
|
+
setTransitionHooks(root, vnode.transition);
|
|
8989
8879
|
}
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
hydrate,
|
|
8993
|
-
createApp: createAppAPI(render, hydrate)
|
|
8994
|
-
};
|
|
8995
|
-
}
|
|
8996
|
-
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
8997
|
-
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8998
|
-
}
|
|
8999
|
-
function toggleRecurse({ effect, job }, allowed) {
|
|
9000
|
-
if (allowed) {
|
|
9001
|
-
effect.flags |= 32;
|
|
9002
|
-
job.flags |= 4;
|
|
8880
|
+
if (setRoot) {
|
|
8881
|
+
setRoot(root);
|
|
9003
8882
|
} else {
|
|
9004
|
-
|
|
9005
|
-
job.flags &= -5;
|
|
8883
|
+
result = root;
|
|
9006
8884
|
}
|
|
8885
|
+
setCurrentRenderingInstance(prev);
|
|
8886
|
+
return result;
|
|
9007
8887
|
}
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
if (
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
8888
|
+
const getChildRoot = (vnode) => {
|
|
8889
|
+
const rawChildren = vnode.children;
|
|
8890
|
+
const dynamicChildren = vnode.dynamicChildren;
|
|
8891
|
+
const childRoot = filterSingleRoot(rawChildren, false);
|
|
8892
|
+
if (!childRoot) {
|
|
8893
|
+
return [vnode, void 0];
|
|
8894
|
+
} else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
|
8895
|
+
return getChildRoot(childRoot);
|
|
8896
|
+
}
|
|
8897
|
+
const index = rawChildren.indexOf(childRoot);
|
|
8898
|
+
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
|
8899
|
+
const setRoot = (updatedRoot) => {
|
|
8900
|
+
rawChildren[index] = updatedRoot;
|
|
8901
|
+
if (dynamicChildren) {
|
|
8902
|
+
if (dynamicIndex > -1) {
|
|
8903
|
+
dynamicChildren[dynamicIndex] = updatedRoot;
|
|
8904
|
+
} else if (updatedRoot.patchFlag > 0) {
|
|
8905
|
+
vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
|
|
9025
8906
|
}
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
8907
|
+
}
|
|
8908
|
+
};
|
|
8909
|
+
return [normalizeVNode(childRoot), setRoot];
|
|
8910
|
+
};
|
|
8911
|
+
function filterSingleRoot(children, recurse = true) {
|
|
8912
|
+
let singleRoot;
|
|
8913
|
+
for (let i = 0; i < children.length; i++) {
|
|
8914
|
+
const child = children[i];
|
|
8915
|
+
if (isVNode(child)) {
|
|
8916
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
8917
|
+
if (singleRoot) {
|
|
8918
|
+
return;
|
|
9029
8919
|
} else {
|
|
9030
|
-
|
|
9031
|
-
(
|
|
8920
|
+
singleRoot = child;
|
|
8921
|
+
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
|
8922
|
+
return filterSingleRoot(singleRoot.children);
|
|
8923
|
+
}
|
|
9032
8924
|
}
|
|
9033
8925
|
}
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
}
|
|
9037
|
-
{
|
|
9038
|
-
c2.el && (c2.el.__vnode = c2);
|
|
9039
|
-
}
|
|
8926
|
+
} else {
|
|
8927
|
+
return;
|
|
9040
8928
|
}
|
|
9041
8929
|
}
|
|
8930
|
+
return singleRoot;
|
|
9042
8931
|
}
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
const
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
8932
|
+
const getFunctionalFallthrough = (attrs) => {
|
|
8933
|
+
let res;
|
|
8934
|
+
for (const key in attrs) {
|
|
8935
|
+
if (key === "class" || key === "style" || isOn(key)) {
|
|
8936
|
+
(res || (res = {}))[key] = attrs[key];
|
|
8937
|
+
}
|
|
8938
|
+
}
|
|
8939
|
+
return res;
|
|
8940
|
+
};
|
|
8941
|
+
const filterModelListeners = (attrs, props) => {
|
|
8942
|
+
const res = {};
|
|
8943
|
+
for (const key in attrs) {
|
|
8944
|
+
if (!isModelListener(key) || !(key.slice(9) in props)) {
|
|
8945
|
+
res[key] = attrs[key];
|
|
8946
|
+
}
|
|
8947
|
+
}
|
|
8948
|
+
return res;
|
|
8949
|
+
};
|
|
8950
|
+
const isElementRoot = (vnode) => {
|
|
8951
|
+
return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
|
|
8952
|
+
};
|
|
8953
|
+
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
8954
|
+
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
8955
|
+
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
8956
|
+
const emits = component.emitsOptions;
|
|
8957
|
+
if ((prevChildren || nextChildren) && isHmrUpdating) {
|
|
8958
|
+
return true;
|
|
8959
|
+
}
|
|
8960
|
+
if (nextVNode.dirs || nextVNode.transition) {
|
|
8961
|
+
return true;
|
|
8962
|
+
}
|
|
8963
|
+
if (optimized && patchFlag >= 0) {
|
|
8964
|
+
if (patchFlag & 1024) {
|
|
8965
|
+
return true;
|
|
8966
|
+
}
|
|
8967
|
+
if (patchFlag & 16) {
|
|
8968
|
+
if (!prevProps) {
|
|
8969
|
+
return !!nextProps;
|
|
9056
8970
|
}
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
v = c;
|
|
8971
|
+
return hasPropsChanged(prevProps, nextProps, emits);
|
|
8972
|
+
} else if (patchFlag & 8) {
|
|
8973
|
+
const dynamicProps = nextVNode.dynamicProps;
|
|
8974
|
+
for (let i = 0; i < dynamicProps.length; i++) {
|
|
8975
|
+
const key = dynamicProps[i];
|
|
8976
|
+
if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
|
|
8977
|
+
return true;
|
|
9065
8978
|
}
|
|
9066
8979
|
}
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
8980
|
+
}
|
|
8981
|
+
} else {
|
|
8982
|
+
if (prevChildren || nextChildren) {
|
|
8983
|
+
if (!nextChildren || !nextChildren.$stable) {
|
|
8984
|
+
return true;
|
|
9072
8985
|
}
|
|
9073
8986
|
}
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
v = result[u - 1];
|
|
9077
|
-
while (u-- > 0) {
|
|
9078
|
-
result[u] = v;
|
|
9079
|
-
v = p[v];
|
|
9080
|
-
}
|
|
9081
|
-
return result;
|
|
9082
|
-
}
|
|
9083
|
-
function locateNonHydratedAsyncRoot(instance) {
|
|
9084
|
-
const subComponent = instance.subTree.component;
|
|
9085
|
-
if (subComponent) {
|
|
9086
|
-
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
9087
|
-
return subComponent;
|
|
9088
|
-
} else {
|
|
9089
|
-
return locateNonHydratedAsyncRoot(subComponent);
|
|
8987
|
+
if (prevProps === nextProps) {
|
|
8988
|
+
return false;
|
|
9090
8989
|
}
|
|
8990
|
+
if (!prevProps) {
|
|
8991
|
+
return !!nextProps;
|
|
8992
|
+
}
|
|
8993
|
+
if (!nextProps) {
|
|
8994
|
+
return true;
|
|
8995
|
+
}
|
|
8996
|
+
return hasPropsChanged(prevProps, nextProps, emits);
|
|
9091
8997
|
}
|
|
8998
|
+
return false;
|
|
9092
8999
|
}
|
|
9093
|
-
function
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9000
|
+
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
9001
|
+
const nextKeys = Object.keys(nextProps);
|
|
9002
|
+
if (nextKeys.length !== Object.keys(prevProps).length) {
|
|
9003
|
+
return true;
|
|
9097
9004
|
}
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9005
|
+
for (let i = 0; i < nextKeys.length; i++) {
|
|
9006
|
+
const key = nextKeys[i];
|
|
9007
|
+
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
|
|
9008
|
+
return true;
|
|
9009
|
+
}
|
|
9102
9010
|
}
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9011
|
+
return false;
|
|
9012
|
+
}
|
|
9013
|
+
function updateHOCHostEl({ vnode, parent }, el) {
|
|
9014
|
+
while (parent) {
|
|
9015
|
+
const root = parent.subTree;
|
|
9016
|
+
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
9017
|
+
root.el = vnode.el;
|
|
9018
|
+
}
|
|
9019
|
+
if (root === vnode) {
|
|
9020
|
+
(vnode = parent.vnode).el = el;
|
|
9021
|
+
parent = parent.parent;
|
|
9022
|
+
} else {
|
|
9023
|
+
break;
|
|
9024
|
+
}
|
|
9106
9025
|
}
|
|
9107
|
-
return null;
|
|
9108
9026
|
}
|
|
9109
9027
|
|
|
9110
9028
|
const isSuspense = (type) => type.__isSuspense;
|
|
@@ -9430,8 +9348,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9430
9348
|
pendingId,
|
|
9431
9349
|
effects,
|
|
9432
9350
|
parentComponent: parentComponent2,
|
|
9433
|
-
container: container2
|
|
9434
|
-
isInFallback
|
|
9351
|
+
container: container2
|
|
9435
9352
|
} = suspense;
|
|
9436
9353
|
let delayEnter = false;
|
|
9437
9354
|
if (suspense.isHydrating) {
|
|
@@ -9448,9 +9365,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9448
9365
|
0
|
|
9449
9366
|
);
|
|
9450
9367
|
queuePostFlushCb(effects);
|
|
9451
|
-
if (isInFallback && vnode2.ssFallback) {
|
|
9452
|
-
vnode2.ssFallback.el = null;
|
|
9453
|
-
}
|
|
9454
9368
|
}
|
|
9455
9369
|
};
|
|
9456
9370
|
}
|
|
@@ -9459,9 +9373,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9459
9373
|
anchor = next(activeBranch);
|
|
9460
9374
|
}
|
|
9461
9375
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
9462
|
-
if (!delayEnter && isInFallback && vnode2.ssFallback) {
|
|
9463
|
-
queuePostRenderEffect(() => vnode2.ssFallback.el = null, suspense);
|
|
9464
|
-
}
|
|
9465
9376
|
}
|
|
9466
9377
|
if (!delayEnter) {
|
|
9467
9378
|
move(pendingBranch, container2, anchor, 0);
|
|
@@ -9580,7 +9491,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9580
9491
|
optimized2
|
|
9581
9492
|
);
|
|
9582
9493
|
if (placeholder) {
|
|
9583
|
-
vnode2.placeholder = null;
|
|
9584
9494
|
remove(placeholder);
|
|
9585
9495
|
}
|
|
9586
9496
|
updateHOCHostEl(instance, vnode2.el);
|
|
@@ -9708,10 +9618,10 @@ function isVNodeSuspensible(vnode) {
|
|
|
9708
9618
|
return suspensible != null && suspensible !== false;
|
|
9709
9619
|
}
|
|
9710
9620
|
|
|
9711
|
-
const Fragment =
|
|
9712
|
-
const Text =
|
|
9713
|
-
const Comment =
|
|
9714
|
-
const Static =
|
|
9621
|
+
const Fragment = Symbol.for("v-fgt");
|
|
9622
|
+
const Text = Symbol.for("v-txt");
|
|
9623
|
+
const Comment = Symbol.for("v-cmt");
|
|
9624
|
+
const Static = Symbol.for("v-stc");
|
|
9715
9625
|
const blockStack = [];
|
|
9716
9626
|
let currentBlock = null;
|
|
9717
9627
|
function openBlock(disableTracking = false) {
|
|
@@ -10237,6 +10147,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
10237
10147
|
return setupResult;
|
|
10238
10148
|
}
|
|
10239
10149
|
function setupStatefulComponent(instance, isSSR) {
|
|
10150
|
+
var _a;
|
|
10240
10151
|
const Component = instance.type;
|
|
10241
10152
|
{
|
|
10242
10153
|
if (Component.name) {
|
|
@@ -10296,7 +10207,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10296
10207
|
} else {
|
|
10297
10208
|
instance.asyncDep = setupResult;
|
|
10298
10209
|
if (!instance.suspense) {
|
|
10299
|
-
const name =
|
|
10210
|
+
const name = (_a = Component.name) != null ? _a : "Anonymous";
|
|
10300
10211
|
warn$1(
|
|
10301
10212
|
`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.`
|
|
10302
10213
|
);
|
|
@@ -10494,7 +10405,7 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
10494
10405
|
name = match[1];
|
|
10495
10406
|
}
|
|
10496
10407
|
}
|
|
10497
|
-
if (!name && instance) {
|
|
10408
|
+
if (!name && instance && instance.parent) {
|
|
10498
10409
|
const inferFromRegistry = (registry) => {
|
|
10499
10410
|
for (const key in registry) {
|
|
10500
10411
|
if (registry[key] === Component) {
|
|
@@ -10502,8 +10413,8 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
10502
10413
|
}
|
|
10503
10414
|
}
|
|
10504
10415
|
};
|
|
10505
|
-
name = inferFromRegistry(
|
|
10506
|
-
instance.parent.type.components
|
|
10416
|
+
name = inferFromRegistry(
|
|
10417
|
+
instance.components || instance.parent.type.components
|
|
10507
10418
|
) || inferFromRegistry(instance.appContext.components);
|
|
10508
10419
|
}
|
|
10509
10420
|
return name ? classify(name) : isRoot ? `App` : `Anonymous`;
|
|
@@ -10524,28 +10435,31 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
10524
10435
|
};
|
|
10525
10436
|
|
|
10526
10437
|
function h(type, propsOrChildren, children) {
|
|
10527
|
-
|
|
10438
|
+
const doCreateVNode = (type2, props, children2) => {
|
|
10528
10439
|
setBlockTracking(-1);
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10440
|
+
try {
|
|
10441
|
+
return createVNode(type2, props, children2);
|
|
10442
|
+
} finally {
|
|
10443
|
+
setBlockTracking(1);
|
|
10444
|
+
}
|
|
10445
|
+
};
|
|
10446
|
+
const l = arguments.length;
|
|
10447
|
+
if (l === 2) {
|
|
10448
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
10449
|
+
if (isVNode(propsOrChildren)) {
|
|
10450
|
+
return doCreateVNode(type, null, [propsOrChildren]);
|
|
10538
10451
|
}
|
|
10452
|
+
return doCreateVNode(type, propsOrChildren);
|
|
10539
10453
|
} else {
|
|
10540
|
-
|
|
10541
|
-
children = Array.prototype.slice.call(arguments, 2);
|
|
10542
|
-
} else if (l === 3 && isVNode(children)) {
|
|
10543
|
-
children = [children];
|
|
10544
|
-
}
|
|
10545
|
-
return createVNode(type, propsOrChildren, children);
|
|
10454
|
+
return doCreateVNode(type, null, propsOrChildren);
|
|
10546
10455
|
}
|
|
10547
|
-
}
|
|
10548
|
-
|
|
10456
|
+
} else {
|
|
10457
|
+
if (l > 3) {
|
|
10458
|
+
children = Array.prototype.slice.call(arguments, 2);
|
|
10459
|
+
} else if (l === 3 && isVNode(children)) {
|
|
10460
|
+
children = [children];
|
|
10461
|
+
}
|
|
10462
|
+
return doCreateVNode(type, propsOrChildren, children);
|
|
10549
10463
|
}
|
|
10550
10464
|
}
|
|
10551
10465
|
|
|
@@ -10755,7 +10669,7 @@ function isMemoSame(cached, memo) {
|
|
|
10755
10669
|
return true;
|
|
10756
10670
|
}
|
|
10757
10671
|
|
|
10758
|
-
const version = "3.5.
|
|
10672
|
+
const version = "3.5.21";
|
|
10759
10673
|
const warn = warn$1 ;
|
|
10760
10674
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10761
10675
|
const devtools = devtools$1 ;
|
|
@@ -10860,7 +10774,7 @@ const nodeOps = {
|
|
|
10860
10774
|
|
|
10861
10775
|
const TRANSITION$1 = "transition";
|
|
10862
10776
|
const ANIMATION = "animation";
|
|
10863
|
-
const vtcKey =
|
|
10777
|
+
const vtcKey = Symbol("_vtc");
|
|
10864
10778
|
const DOMTransitionPropsValidators = {
|
|
10865
10779
|
name: String,
|
|
10866
10780
|
type: String,
|
|
@@ -10984,11 +10898,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
10984
10898
|
const resolve = () => finishLeave(el, done);
|
|
10985
10899
|
addTransitionClass(el, leaveFromClass);
|
|
10986
10900
|
if (!el._enterCancelled) {
|
|
10987
|
-
forceReflow(
|
|
10901
|
+
forceReflow();
|
|
10988
10902
|
addTransitionClass(el, leaveActiveClass);
|
|
10989
10903
|
} else {
|
|
10990
10904
|
addTransitionClass(el, leaveActiveClass);
|
|
10991
|
-
forceReflow(
|
|
10905
|
+
forceReflow();
|
|
10992
10906
|
}
|
|
10993
10907
|
nextFrame(() => {
|
|
10994
10908
|
if (!el._isLeaving) {
|
|
@@ -11134,9 +11048,8 @@ function toMs(s) {
|
|
|
11134
11048
|
if (s === "auto") return 0;
|
|
11135
11049
|
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
11136
11050
|
}
|
|
11137
|
-
function forceReflow(
|
|
11138
|
-
|
|
11139
|
-
return targetDocument.body.offsetHeight;
|
|
11051
|
+
function forceReflow() {
|
|
11052
|
+
return document.body.offsetHeight;
|
|
11140
11053
|
}
|
|
11141
11054
|
|
|
11142
11055
|
function patchClass(el, value, isSVG) {
|
|
@@ -11153,8 +11066,8 @@ function patchClass(el, value, isSVG) {
|
|
|
11153
11066
|
}
|
|
11154
11067
|
}
|
|
11155
11068
|
|
|
11156
|
-
const vShowOriginalDisplay =
|
|
11157
|
-
const vShowHidden =
|
|
11069
|
+
const vShowOriginalDisplay = Symbol("_vod");
|
|
11070
|
+
const vShowHidden = Symbol("_vsh");
|
|
11158
11071
|
const vShow = {
|
|
11159
11072
|
// used for prop mismatch check during hydration
|
|
11160
11073
|
name: "show",
|
|
@@ -11203,7 +11116,7 @@ function initVShowForSSR() {
|
|
|
11203
11116
|
};
|
|
11204
11117
|
}
|
|
11205
11118
|
|
|
11206
|
-
const CSS_VAR_TEXT =
|
|
11119
|
+
const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
|
|
11207
11120
|
function useCssVars(getter) {
|
|
11208
11121
|
const instance = getCurrentInstance();
|
|
11209
11122
|
if (!instance) {
|
|
@@ -11453,7 +11366,7 @@ function addEventListener(el, event, handler, options) {
|
|
|
11453
11366
|
function removeEventListener(el, event, handler, options) {
|
|
11454
11367
|
el.removeEventListener(event, handler, options);
|
|
11455
11368
|
}
|
|
11456
|
-
const veiKey =
|
|
11369
|
+
const veiKey = Symbol("_vei");
|
|
11457
11370
|
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
11458
11371
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
11459
11372
|
const existingInvoker = invokers[rawName];
|
|
@@ -11577,9 +11490,6 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
11577
11490
|
if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
|
|
11578
11491
|
return false;
|
|
11579
11492
|
}
|
|
11580
|
-
if (key === "sandbox" && el.tagName === "IFRAME") {
|
|
11581
|
-
return false;
|
|
11582
|
-
}
|
|
11583
11493
|
if (key === "form") {
|
|
11584
11494
|
return false;
|
|
11585
11495
|
}
|
|
@@ -11640,8 +11550,6 @@ class VueElement extends BaseClass {
|
|
|
11640
11550
|
this._nonce = this._def.nonce;
|
|
11641
11551
|
this._connected = false;
|
|
11642
11552
|
this._resolved = false;
|
|
11643
|
-
this._patching = false;
|
|
11644
|
-
this._dirty = false;
|
|
11645
11553
|
this._numberProps = null;
|
|
11646
11554
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
11647
11555
|
this._ob = null;
|
|
@@ -11654,11 +11562,7 @@ class VueElement extends BaseClass {
|
|
|
11654
11562
|
);
|
|
11655
11563
|
}
|
|
11656
11564
|
if (_def.shadowRoot !== false) {
|
|
11657
|
-
this.attachShadow(
|
|
11658
|
-
extend({}, _def.shadowRootOptions, {
|
|
11659
|
-
mode: "open"
|
|
11660
|
-
})
|
|
11661
|
-
);
|
|
11565
|
+
this.attachShadow({ mode: "open" });
|
|
11662
11566
|
this._root = this.shadowRoot;
|
|
11663
11567
|
} else {
|
|
11664
11568
|
this._root = this;
|
|
@@ -11718,18 +11622,9 @@ class VueElement extends BaseClass {
|
|
|
11718
11622
|
this._app && this._app.unmount();
|
|
11719
11623
|
if (this._instance) this._instance.ce = void 0;
|
|
11720
11624
|
this._app = this._instance = null;
|
|
11721
|
-
if (this._teleportTargets) {
|
|
11722
|
-
this._teleportTargets.clear();
|
|
11723
|
-
this._teleportTargets = void 0;
|
|
11724
|
-
}
|
|
11725
11625
|
}
|
|
11726
11626
|
});
|
|
11727
11627
|
}
|
|
11728
|
-
_processMutations(mutations) {
|
|
11729
|
-
for (const m of mutations) {
|
|
11730
|
-
this._setAttr(m.attributeName);
|
|
11731
|
-
}
|
|
11732
|
-
}
|
|
11733
11628
|
/**
|
|
11734
11629
|
* resolve inner component definition (handle possible async component)
|
|
11735
11630
|
*/
|
|
@@ -11740,7 +11635,11 @@ class VueElement extends BaseClass {
|
|
|
11740
11635
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
11741
11636
|
this._setAttr(this.attributes[i].name);
|
|
11742
11637
|
}
|
|
11743
|
-
this._ob = new MutationObserver(
|
|
11638
|
+
this._ob = new MutationObserver((mutations) => {
|
|
11639
|
+
for (const m of mutations) {
|
|
11640
|
+
this._setAttr(m.attributeName);
|
|
11641
|
+
}
|
|
11642
|
+
});
|
|
11744
11643
|
this._ob.observe(this, { attributes: true });
|
|
11745
11644
|
const resolve = (def, isAsync = false) => {
|
|
11746
11645
|
this._resolved = true;
|
|
@@ -11817,7 +11716,7 @@ class VueElement extends BaseClass {
|
|
|
11817
11716
|
return this._getProp(key);
|
|
11818
11717
|
},
|
|
11819
11718
|
set(val) {
|
|
11820
|
-
this._setProp(key, val, true,
|
|
11719
|
+
this._setProp(key, val, true, true);
|
|
11821
11720
|
}
|
|
11822
11721
|
});
|
|
11823
11722
|
}
|
|
@@ -11843,7 +11742,6 @@ class VueElement extends BaseClass {
|
|
|
11843
11742
|
*/
|
|
11844
11743
|
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
11845
11744
|
if (val !== this._props[key]) {
|
|
11846
|
-
this._dirty = true;
|
|
11847
11745
|
if (val === REMOVAL) {
|
|
11848
11746
|
delete this._props[key];
|
|
11849
11747
|
} else {
|
|
@@ -11857,10 +11755,7 @@ class VueElement extends BaseClass {
|
|
|
11857
11755
|
}
|
|
11858
11756
|
if (shouldReflect) {
|
|
11859
11757
|
const ob = this._ob;
|
|
11860
|
-
|
|
11861
|
-
this._processMutations(ob.takeRecords());
|
|
11862
|
-
ob.disconnect();
|
|
11863
|
-
}
|
|
11758
|
+
ob && ob.disconnect();
|
|
11864
11759
|
if (val === true) {
|
|
11865
11760
|
this.setAttribute(hyphenate(key), "");
|
|
11866
11761
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -11964,7 +11859,7 @@ class VueElement extends BaseClass {
|
|
|
11964
11859
|
* Only called when shadowRoot is false
|
|
11965
11860
|
*/
|
|
11966
11861
|
_renderSlots() {
|
|
11967
|
-
const outlets = this.
|
|
11862
|
+
const outlets = (this._teleportTarget || this).querySelectorAll("slot");
|
|
11968
11863
|
const scopeId = this._instance.type.__scopeId;
|
|
11969
11864
|
for (let i = 0; i < outlets.length; i++) {
|
|
11970
11865
|
const o = outlets[i];
|
|
@@ -11990,45 +11885,12 @@ class VueElement extends BaseClass {
|
|
|
11990
11885
|
parent.removeChild(o);
|
|
11991
11886
|
}
|
|
11992
11887
|
}
|
|
11993
|
-
/**
|
|
11994
|
-
* @internal
|
|
11995
|
-
*/
|
|
11996
|
-
_getSlots() {
|
|
11997
|
-
const roots = [this];
|
|
11998
|
-
if (this._teleportTargets) {
|
|
11999
|
-
roots.push(...this._teleportTargets);
|
|
12000
|
-
}
|
|
12001
|
-
const slots = /* @__PURE__ */ new Set();
|
|
12002
|
-
for (const root of roots) {
|
|
12003
|
-
const found = root.querySelectorAll("slot");
|
|
12004
|
-
for (let i = 0; i < found.length; i++) {
|
|
12005
|
-
slots.add(found[i]);
|
|
12006
|
-
}
|
|
12007
|
-
}
|
|
12008
|
-
return Array.from(slots);
|
|
12009
|
-
}
|
|
12010
11888
|
/**
|
|
12011
11889
|
* @internal
|
|
12012
11890
|
*/
|
|
12013
11891
|
_injectChildStyle(comp) {
|
|
12014
11892
|
this._applyStyles(comp.styles, comp);
|
|
12015
11893
|
}
|
|
12016
|
-
/**
|
|
12017
|
-
* @internal
|
|
12018
|
-
*/
|
|
12019
|
-
_beginPatch() {
|
|
12020
|
-
this._patching = true;
|
|
12021
|
-
this._dirty = false;
|
|
12022
|
-
}
|
|
12023
|
-
/**
|
|
12024
|
-
* @internal
|
|
12025
|
-
*/
|
|
12026
|
-
_endPatch() {
|
|
12027
|
-
this._patching = false;
|
|
12028
|
-
if (this._dirty && this._instance) {
|
|
12029
|
-
this._update();
|
|
12030
|
-
}
|
|
12031
|
-
}
|
|
12032
11894
|
/**
|
|
12033
11895
|
* @internal
|
|
12034
11896
|
*/
|
|
@@ -12091,8 +11953,8 @@ function useCssModule(name = "$style") {
|
|
|
12091
11953
|
|
|
12092
11954
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
12093
11955
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
12094
|
-
const moveCbKey =
|
|
12095
|
-
const enterCbKey =
|
|
11956
|
+
const moveCbKey = Symbol("_moveCb");
|
|
11957
|
+
const enterCbKey = Symbol("_enterCb");
|
|
12096
11958
|
const decorate = (t) => {
|
|
12097
11959
|
delete t.props.mode;
|
|
12098
11960
|
return t;
|
|
@@ -12124,7 +11986,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
12124
11986
|
prevChildren.forEach(callPendingCbs);
|
|
12125
11987
|
prevChildren.forEach(recordPosition);
|
|
12126
11988
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
12127
|
-
forceReflow(
|
|
11989
|
+
forceReflow();
|
|
12128
11990
|
movedChildren.forEach((c) => {
|
|
12129
11991
|
const el = c.el;
|
|
12130
11992
|
const style = el.style;
|
|
@@ -12163,10 +12025,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
12163
12025
|
instance
|
|
12164
12026
|
)
|
|
12165
12027
|
);
|
|
12166
|
-
positionMap.set(
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12028
|
+
positionMap.set(
|
|
12029
|
+
child,
|
|
12030
|
+
child.el.getBoundingClientRect()
|
|
12031
|
+
);
|
|
12170
12032
|
}
|
|
12171
12033
|
}
|
|
12172
12034
|
}
|
|
@@ -12197,10 +12059,7 @@ function callPendingCbs(c) {
|
|
|
12197
12059
|
}
|
|
12198
12060
|
}
|
|
12199
12061
|
function recordPosition(c) {
|
|
12200
|
-
newPositionMap.set(c,
|
|
12201
|
-
left: c.el.offsetLeft,
|
|
12202
|
-
top: c.el.offsetTop
|
|
12203
|
-
});
|
|
12062
|
+
newPositionMap.set(c, c.el.getBoundingClientRect());
|
|
12204
12063
|
}
|
|
12205
12064
|
function applyTranslation(c) {
|
|
12206
12065
|
const oldPos = positionMap.get(c);
|
|
@@ -12245,23 +12104,25 @@ function onCompositionEnd(e) {
|
|
|
12245
12104
|
target.dispatchEvent(new Event("input"));
|
|
12246
12105
|
}
|
|
12247
12106
|
}
|
|
12248
|
-
const assignKey =
|
|
12249
|
-
function castValue(value, trim, number) {
|
|
12250
|
-
if (trim) value = value.trim();
|
|
12251
|
-
if (number) value = looseToNumber(value);
|
|
12252
|
-
return value;
|
|
12253
|
-
}
|
|
12107
|
+
const assignKey = Symbol("_assign");
|
|
12254
12108
|
const vModelText = {
|
|
12255
12109
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
12256
12110
|
el[assignKey] = getModelAssigner(vnode);
|
|
12257
12111
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
12258
12112
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
12259
12113
|
if (e.target.composing) return;
|
|
12260
|
-
el
|
|
12114
|
+
let domValue = el.value;
|
|
12115
|
+
if (trim) {
|
|
12116
|
+
domValue = domValue.trim();
|
|
12117
|
+
}
|
|
12118
|
+
if (castToNumber) {
|
|
12119
|
+
domValue = looseToNumber(domValue);
|
|
12120
|
+
}
|
|
12121
|
+
el[assignKey](domValue);
|
|
12261
12122
|
});
|
|
12262
|
-
if (trim
|
|
12123
|
+
if (trim) {
|
|
12263
12124
|
addEventListener(el, "change", () => {
|
|
12264
|
-
el.value =
|
|
12125
|
+
el.value = el.value.trim();
|
|
12265
12126
|
});
|
|
12266
12127
|
}
|
|
12267
12128
|
if (!lazy) {
|
|
@@ -12771,7 +12632,6 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12771
12632
|
mergeModels: mergeModels,
|
|
12772
12633
|
mergeProps: mergeProps,
|
|
12773
12634
|
nextTick: nextTick,
|
|
12774
|
-
nodeOps: nodeOps,
|
|
12775
12635
|
normalizeClass: normalizeClass,
|
|
12776
12636
|
normalizeProps: normalizeProps,
|
|
12777
12637
|
normalizeStyle: normalizeStyle,
|
|
@@ -12790,7 +12650,6 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
12790
12650
|
onUpdated: onUpdated,
|
|
12791
12651
|
onWatcherCleanup: onWatcherCleanup,
|
|
12792
12652
|
openBlock: openBlock,
|
|
12793
|
-
patchProp: patchProp,
|
|
12794
12653
|
popScopeId: popScopeId,
|
|
12795
12654
|
provide: provide,
|
|
12796
12655
|
proxyRefs: proxyRefs,
|
|
@@ -12872,81 +12731,81 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
12872
12731
|
}
|
|
12873
12732
|
}
|
|
12874
12733
|
|
|
12875
|
-
const FRAGMENT =
|
|
12876
|
-
const TELEPORT =
|
|
12877
|
-
const SUSPENSE =
|
|
12878
|
-
const KEEP_ALIVE =
|
|
12879
|
-
const BASE_TRANSITION =
|
|
12734
|
+
const FRAGMENT = Symbol(`Fragment` );
|
|
12735
|
+
const TELEPORT = Symbol(`Teleport` );
|
|
12736
|
+
const SUSPENSE = Symbol(`Suspense` );
|
|
12737
|
+
const KEEP_ALIVE = Symbol(`KeepAlive` );
|
|
12738
|
+
const BASE_TRANSITION = Symbol(
|
|
12880
12739
|
`BaseTransition`
|
|
12881
12740
|
);
|
|
12882
|
-
const OPEN_BLOCK =
|
|
12883
|
-
const CREATE_BLOCK =
|
|
12884
|
-
const CREATE_ELEMENT_BLOCK =
|
|
12741
|
+
const OPEN_BLOCK = Symbol(`openBlock` );
|
|
12742
|
+
const CREATE_BLOCK = Symbol(`createBlock` );
|
|
12743
|
+
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
12885
12744
|
`createElementBlock`
|
|
12886
12745
|
);
|
|
12887
|
-
const CREATE_VNODE =
|
|
12888
|
-
const CREATE_ELEMENT_VNODE =
|
|
12746
|
+
const CREATE_VNODE = Symbol(`createVNode` );
|
|
12747
|
+
const CREATE_ELEMENT_VNODE = Symbol(
|
|
12889
12748
|
`createElementVNode`
|
|
12890
12749
|
);
|
|
12891
|
-
const CREATE_COMMENT =
|
|
12750
|
+
const CREATE_COMMENT = Symbol(
|
|
12892
12751
|
`createCommentVNode`
|
|
12893
12752
|
);
|
|
12894
|
-
const CREATE_TEXT =
|
|
12753
|
+
const CREATE_TEXT = Symbol(
|
|
12895
12754
|
`createTextVNode`
|
|
12896
12755
|
);
|
|
12897
|
-
const CREATE_STATIC =
|
|
12756
|
+
const CREATE_STATIC = Symbol(
|
|
12898
12757
|
`createStaticVNode`
|
|
12899
12758
|
);
|
|
12900
|
-
const RESOLVE_COMPONENT =
|
|
12759
|
+
const RESOLVE_COMPONENT = Symbol(
|
|
12901
12760
|
`resolveComponent`
|
|
12902
12761
|
);
|
|
12903
|
-
const RESOLVE_DYNAMIC_COMPONENT =
|
|
12762
|
+
const RESOLVE_DYNAMIC_COMPONENT = Symbol(
|
|
12904
12763
|
`resolveDynamicComponent`
|
|
12905
12764
|
);
|
|
12906
|
-
const RESOLVE_DIRECTIVE =
|
|
12765
|
+
const RESOLVE_DIRECTIVE = Symbol(
|
|
12907
12766
|
`resolveDirective`
|
|
12908
12767
|
);
|
|
12909
|
-
const RESOLVE_FILTER =
|
|
12768
|
+
const RESOLVE_FILTER = Symbol(
|
|
12910
12769
|
`resolveFilter`
|
|
12911
12770
|
);
|
|
12912
|
-
const WITH_DIRECTIVES =
|
|
12771
|
+
const WITH_DIRECTIVES = Symbol(
|
|
12913
12772
|
`withDirectives`
|
|
12914
12773
|
);
|
|
12915
|
-
const RENDER_LIST =
|
|
12916
|
-
const RENDER_SLOT =
|
|
12917
|
-
const CREATE_SLOTS =
|
|
12918
|
-
const TO_DISPLAY_STRING =
|
|
12774
|
+
const RENDER_LIST = Symbol(`renderList` );
|
|
12775
|
+
const RENDER_SLOT = Symbol(`renderSlot` );
|
|
12776
|
+
const CREATE_SLOTS = Symbol(`createSlots` );
|
|
12777
|
+
const TO_DISPLAY_STRING = Symbol(
|
|
12919
12778
|
`toDisplayString`
|
|
12920
12779
|
);
|
|
12921
|
-
const MERGE_PROPS =
|
|
12922
|
-
const NORMALIZE_CLASS =
|
|
12780
|
+
const MERGE_PROPS = Symbol(`mergeProps` );
|
|
12781
|
+
const NORMALIZE_CLASS = Symbol(
|
|
12923
12782
|
`normalizeClass`
|
|
12924
12783
|
);
|
|
12925
|
-
const NORMALIZE_STYLE =
|
|
12784
|
+
const NORMALIZE_STYLE = Symbol(
|
|
12926
12785
|
`normalizeStyle`
|
|
12927
12786
|
);
|
|
12928
|
-
const NORMALIZE_PROPS =
|
|
12787
|
+
const NORMALIZE_PROPS = Symbol(
|
|
12929
12788
|
`normalizeProps`
|
|
12930
12789
|
);
|
|
12931
|
-
const GUARD_REACTIVE_PROPS =
|
|
12790
|
+
const GUARD_REACTIVE_PROPS = Symbol(
|
|
12932
12791
|
`guardReactiveProps`
|
|
12933
12792
|
);
|
|
12934
|
-
const TO_HANDLERS =
|
|
12935
|
-
const CAMELIZE =
|
|
12936
|
-
const CAPITALIZE =
|
|
12937
|
-
const TO_HANDLER_KEY =
|
|
12793
|
+
const TO_HANDLERS = Symbol(`toHandlers` );
|
|
12794
|
+
const CAMELIZE = Symbol(`camelize` );
|
|
12795
|
+
const CAPITALIZE = Symbol(`capitalize` );
|
|
12796
|
+
const TO_HANDLER_KEY = Symbol(
|
|
12938
12797
|
`toHandlerKey`
|
|
12939
12798
|
);
|
|
12940
|
-
const SET_BLOCK_TRACKING =
|
|
12799
|
+
const SET_BLOCK_TRACKING = Symbol(
|
|
12941
12800
|
`setBlockTracking`
|
|
12942
12801
|
);
|
|
12943
|
-
const PUSH_SCOPE_ID =
|
|
12944
|
-
const POP_SCOPE_ID =
|
|
12945
|
-
const WITH_CTX =
|
|
12946
|
-
const UNREF =
|
|
12947
|
-
const IS_REF =
|
|
12948
|
-
const WITH_MEMO =
|
|
12949
|
-
const IS_MEMO_SAME =
|
|
12802
|
+
const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
|
|
12803
|
+
const POP_SCOPE_ID = Symbol(`popScopeId` );
|
|
12804
|
+
const WITH_CTX = Symbol(`withCtx` );
|
|
12805
|
+
const UNREF = Symbol(`unref` );
|
|
12806
|
+
const IS_REF = Symbol(`isRef` );
|
|
12807
|
+
const WITH_MEMO = Symbol(`withMemo` );
|
|
12808
|
+
const IS_MEMO_SAME = Symbol(`isMemoSame` );
|
|
12950
12809
|
const helperNameMap = {
|
|
12951
12810
|
[FRAGMENT]: `Fragment`,
|
|
12952
12811
|
[TELEPORT]: `Teleport`,
|
|
@@ -13241,28 +13100,14 @@ class Tokenizer {
|
|
|
13241
13100
|
getPos(index) {
|
|
13242
13101
|
let line = 1;
|
|
13243
13102
|
let column = index + 1;
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
const m = l + r >>> 1;
|
|
13251
|
-
this.newlines[m] < index ? l = m : r = m;
|
|
13252
|
-
}
|
|
13253
|
-
j = l;
|
|
13254
|
-
} else {
|
|
13255
|
-
for (let i = length - 1; i >= 0; i--) {
|
|
13256
|
-
if (index > this.newlines[i]) {
|
|
13257
|
-
j = i;
|
|
13258
|
-
break;
|
|
13259
|
-
}
|
|
13103
|
+
for (let i = this.newlines.length - 1; i >= 0; i--) {
|
|
13104
|
+
const newlineIndex = this.newlines[i];
|
|
13105
|
+
if (index > newlineIndex) {
|
|
13106
|
+
line = i + 2;
|
|
13107
|
+
column = index - newlineIndex;
|
|
13108
|
+
break;
|
|
13260
13109
|
}
|
|
13261
13110
|
}
|
|
13262
|
-
if (j >= 0) {
|
|
13263
|
-
line = j + 2;
|
|
13264
|
-
column = index - this.newlines[j];
|
|
13265
|
-
}
|
|
13266
13111
|
return {
|
|
13267
13112
|
column,
|
|
13268
13113
|
line,
|
|
@@ -14010,7 +13855,7 @@ const errorMessages = {
|
|
|
14010
13855
|
[32]: `v-for has invalid expression.`,
|
|
14011
13856
|
[33]: `<template v-for> key should be placed on the <template> tag.`,
|
|
14012
13857
|
[34]: `v-bind is missing expression.`,
|
|
14013
|
-
[
|
|
13858
|
+
[52]: `v-bind with same-name shorthand only allows static argument.`,
|
|
14014
13859
|
[35]: `v-on is missing expression.`,
|
|
14015
13860
|
[36]: `Unexpected custom directive on <slot> outlet.`,
|
|
14016
13861
|
[37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
|
|
@@ -14022,17 +13867,16 @@ const errorMessages = {
|
|
|
14022
13867
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
14023
13868
|
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
14024
13869
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
14025
|
-
[45]: `
|
|
14026
|
-
[46]:
|
|
14027
|
-
[
|
|
14028
|
-
[52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
|
|
13870
|
+
[45]: `Error parsing JavaScript expression: `,
|
|
13871
|
+
[46]: `<KeepAlive> expects exactly one child component.`,
|
|
13872
|
+
[51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
|
|
14029
13873
|
// generic errors
|
|
14030
|
-
[
|
|
14031
|
-
[
|
|
14032
|
-
[
|
|
14033
|
-
[
|
|
13874
|
+
[47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
13875
|
+
[48]: `ES module mode is not supported in this build of compiler.`,
|
|
13876
|
+
[49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
13877
|
+
[50]: `"scopeId" option is only supported in module mode.`,
|
|
14034
13878
|
// just to fulfill types
|
|
14035
|
-
[
|
|
13879
|
+
[53]: ``
|
|
14036
13880
|
};
|
|
14037
13881
|
|
|
14038
13882
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
@@ -14270,20 +14114,6 @@ function getMemoedVNodeCall(node) {
|
|
|
14270
14114
|
}
|
|
14271
14115
|
}
|
|
14272
14116
|
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;
|
|
14273
|
-
function isAllWhitespace(str) {
|
|
14274
|
-
for (let i = 0; i < str.length; i++) {
|
|
14275
|
-
if (!isWhitespace(str.charCodeAt(i))) {
|
|
14276
|
-
return false;
|
|
14277
|
-
}
|
|
14278
|
-
}
|
|
14279
|
-
return true;
|
|
14280
|
-
}
|
|
14281
|
-
function isWhitespaceText(node) {
|
|
14282
|
-
return node.type === 2 && isAllWhitespace(node.content) || node.type === 12 && isWhitespaceText(node.content);
|
|
14283
|
-
}
|
|
14284
|
-
function isCommentOrWhitespace(node) {
|
|
14285
|
-
return node.type === 3 || isWhitespaceText(node);
|
|
14286
|
-
}
|
|
14287
14117
|
|
|
14288
14118
|
const defaultParserOptions = {
|
|
14289
14119
|
parseMode: "base",
|
|
@@ -14823,6 +14653,14 @@ function condenseWhitespace(nodes) {
|
|
|
14823
14653
|
}
|
|
14824
14654
|
return removedWhitespace ? nodes.filter(Boolean) : nodes;
|
|
14825
14655
|
}
|
|
14656
|
+
function isAllWhitespace(str) {
|
|
14657
|
+
for (let i = 0; i < str.length; i++) {
|
|
14658
|
+
if (!isWhitespace(str.charCodeAt(i))) {
|
|
14659
|
+
return false;
|
|
14660
|
+
}
|
|
14661
|
+
}
|
|
14662
|
+
return true;
|
|
14663
|
+
}
|
|
14826
14664
|
function hasNewlineChar(str) {
|
|
14827
14665
|
for (let i = 0; i < str.length; i++) {
|
|
14828
14666
|
const c = str.charCodeAt(i);
|
|
@@ -16121,7 +15959,7 @@ function validateBrowserExpression(node, context, asParams = false, asRawStateme
|
|
|
16121
15959
|
}
|
|
16122
15960
|
context.onError(
|
|
16123
15961
|
createCompilerError(
|
|
16124
|
-
|
|
15962
|
+
45,
|
|
16125
15963
|
node.loc,
|
|
16126
15964
|
void 0,
|
|
16127
15965
|
message
|
|
@@ -16228,11 +16066,13 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
16228
16066
|
let i = siblings.indexOf(node);
|
|
16229
16067
|
while (i-- >= -1) {
|
|
16230
16068
|
const sibling = siblings[i];
|
|
16231
|
-
if (sibling &&
|
|
16069
|
+
if (sibling && sibling.type === 3) {
|
|
16070
|
+
context.removeNode(sibling);
|
|
16071
|
+
comments.unshift(sibling);
|
|
16072
|
+
continue;
|
|
16073
|
+
}
|
|
16074
|
+
if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
|
|
16232
16075
|
context.removeNode(sibling);
|
|
16233
|
-
if (sibling.type === 3) {
|
|
16234
|
-
comments.unshift(sibling);
|
|
16235
|
-
}
|
|
16236
16076
|
continue;
|
|
16237
16077
|
}
|
|
16238
16078
|
if (sibling && sibling.type === 9) {
|
|
@@ -16385,6 +16225,80 @@ function getParentCondition(node) {
|
|
|
16385
16225
|
}
|
|
16386
16226
|
}
|
|
16387
16227
|
|
|
16228
|
+
const transformBind = (dir, _node, context) => {
|
|
16229
|
+
const { modifiers, loc } = dir;
|
|
16230
|
+
const arg = dir.arg;
|
|
16231
|
+
let { exp } = dir;
|
|
16232
|
+
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
16233
|
+
{
|
|
16234
|
+
exp = void 0;
|
|
16235
|
+
}
|
|
16236
|
+
}
|
|
16237
|
+
if (!exp) {
|
|
16238
|
+
if (arg.type !== 4 || !arg.isStatic) {
|
|
16239
|
+
context.onError(
|
|
16240
|
+
createCompilerError(
|
|
16241
|
+
52,
|
|
16242
|
+
arg.loc
|
|
16243
|
+
)
|
|
16244
|
+
);
|
|
16245
|
+
return {
|
|
16246
|
+
props: [
|
|
16247
|
+
createObjectProperty(arg, createSimpleExpression("", true, loc))
|
|
16248
|
+
]
|
|
16249
|
+
};
|
|
16250
|
+
}
|
|
16251
|
+
transformBindShorthand(dir);
|
|
16252
|
+
exp = dir.exp;
|
|
16253
|
+
}
|
|
16254
|
+
if (arg.type !== 4) {
|
|
16255
|
+
arg.children.unshift(`(`);
|
|
16256
|
+
arg.children.push(`) || ""`);
|
|
16257
|
+
} else if (!arg.isStatic) {
|
|
16258
|
+
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
16259
|
+
}
|
|
16260
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
16261
|
+
if (arg.type === 4) {
|
|
16262
|
+
if (arg.isStatic) {
|
|
16263
|
+
arg.content = camelize(arg.content);
|
|
16264
|
+
} else {
|
|
16265
|
+
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
16266
|
+
}
|
|
16267
|
+
} else {
|
|
16268
|
+
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
16269
|
+
arg.children.push(`)`);
|
|
16270
|
+
}
|
|
16271
|
+
}
|
|
16272
|
+
if (!context.inSSR) {
|
|
16273
|
+
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
16274
|
+
injectPrefix(arg, ".");
|
|
16275
|
+
}
|
|
16276
|
+
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
16277
|
+
injectPrefix(arg, "^");
|
|
16278
|
+
}
|
|
16279
|
+
}
|
|
16280
|
+
return {
|
|
16281
|
+
props: [createObjectProperty(arg, exp)]
|
|
16282
|
+
};
|
|
16283
|
+
};
|
|
16284
|
+
const transformBindShorthand = (dir, context) => {
|
|
16285
|
+
const arg = dir.arg;
|
|
16286
|
+
const propName = camelize(arg.content);
|
|
16287
|
+
dir.exp = createSimpleExpression(propName, false, arg.loc);
|
|
16288
|
+
};
|
|
16289
|
+
const injectPrefix = (arg, prefix) => {
|
|
16290
|
+
if (arg.type === 4) {
|
|
16291
|
+
if (arg.isStatic) {
|
|
16292
|
+
arg.content = prefix + arg.content;
|
|
16293
|
+
} else {
|
|
16294
|
+
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
16295
|
+
}
|
|
16296
|
+
} else {
|
|
16297
|
+
arg.children.unshift(`'${prefix}' + (`);
|
|
16298
|
+
arg.children.push(`)`);
|
|
16299
|
+
}
|
|
16300
|
+
};
|
|
16301
|
+
|
|
16388
16302
|
const transformFor = createStructuralDirectiveTransform(
|
|
16389
16303
|
"for",
|
|
16390
16304
|
(node, dir, context) => {
|
|
@@ -16396,7 +16310,10 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
16396
16310
|
const isTemplate = isTemplateNode(node);
|
|
16397
16311
|
const memo = findDir(node, "memo");
|
|
16398
16312
|
const keyProp = findProp(node, `key`, false, true);
|
|
16399
|
-
keyProp && keyProp.type === 7;
|
|
16313
|
+
const isDirKey = keyProp && keyProp.type === 7;
|
|
16314
|
+
if (isDirKey && !keyProp.exp) {
|
|
16315
|
+
transformBindShorthand(keyProp);
|
|
16316
|
+
}
|
|
16400
16317
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
16401
16318
|
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
16402
16319
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
@@ -16685,7 +16602,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
16685
16602
|
let prev;
|
|
16686
16603
|
while (j--) {
|
|
16687
16604
|
prev = children[j];
|
|
16688
|
-
if (
|
|
16605
|
+
if (prev.type !== 3 && isNonWhitespaceContent(prev)) {
|
|
16689
16606
|
break;
|
|
16690
16607
|
}
|
|
16691
16608
|
}
|
|
@@ -16760,7 +16677,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
16760
16677
|
} else if (implicitDefaultChildren.length && // #3766
|
|
16761
16678
|
// with whitespace: 'preserve', whitespaces between slots will end up in
|
|
16762
16679
|
// implicitDefaultChildren. Ignore if all implicit children are whitespaces.
|
|
16763
|
-
|
|
16680
|
+
implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) {
|
|
16764
16681
|
if (hasNamedDefaultSlot) {
|
|
16765
16682
|
context.onError(
|
|
16766
16683
|
createCompilerError(
|
|
@@ -16833,6 +16750,11 @@ function hasForwardedSlots(children) {
|
|
|
16833
16750
|
}
|
|
16834
16751
|
return false;
|
|
16835
16752
|
}
|
|
16753
|
+
function isNonWhitespaceContent(node) {
|
|
16754
|
+
if (node.type !== 2 && node.type !== 12)
|
|
16755
|
+
return true;
|
|
16756
|
+
return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
|
|
16757
|
+
}
|
|
16836
16758
|
|
|
16837
16759
|
const directiveImportMap = /* @__PURE__ */ new WeakMap();
|
|
16838
16760
|
const transformElement = (node, context) => {
|
|
@@ -16884,7 +16806,7 @@ const transformElement = (node, context) => {
|
|
|
16884
16806
|
patchFlag |= 1024;
|
|
16885
16807
|
if (node.children.length > 1) {
|
|
16886
16808
|
context.onError(
|
|
16887
|
-
createCompilerError(
|
|
16809
|
+
createCompilerError(46, {
|
|
16888
16810
|
start: node.children[0].loc.start,
|
|
16889
16811
|
end: node.children[node.children.length - 1].loc.end,
|
|
16890
16812
|
source: ""
|
|
@@ -17431,7 +17353,7 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
17431
17353
|
if (arg.isStatic) {
|
|
17432
17354
|
let rawName = arg.content;
|
|
17433
17355
|
if (rawName.startsWith("vnode")) {
|
|
17434
|
-
context.onError(createCompilerError(
|
|
17356
|
+
context.onError(createCompilerError(51, arg.loc));
|
|
17435
17357
|
}
|
|
17436
17358
|
if (rawName.startsWith("vue:")) {
|
|
17437
17359
|
rawName = `vnode-${rawName.slice(4)}`;
|
|
@@ -17501,58 +17423,6 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
17501
17423
|
return ret;
|
|
17502
17424
|
};
|
|
17503
17425
|
|
|
17504
|
-
const transformBind = (dir, _node, context) => {
|
|
17505
|
-
const { modifiers, loc } = dir;
|
|
17506
|
-
const arg = dir.arg;
|
|
17507
|
-
let { exp } = dir;
|
|
17508
|
-
if (exp && exp.type === 4 && !exp.content.trim()) {
|
|
17509
|
-
{
|
|
17510
|
-
exp = void 0;
|
|
17511
|
-
}
|
|
17512
|
-
}
|
|
17513
|
-
if (arg.type !== 4) {
|
|
17514
|
-
arg.children.unshift(`(`);
|
|
17515
|
-
arg.children.push(`) || ""`);
|
|
17516
|
-
} else if (!arg.isStatic) {
|
|
17517
|
-
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
17518
|
-
}
|
|
17519
|
-
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
17520
|
-
if (arg.type === 4) {
|
|
17521
|
-
if (arg.isStatic) {
|
|
17522
|
-
arg.content = camelize(arg.content);
|
|
17523
|
-
} else {
|
|
17524
|
-
arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
17525
|
-
}
|
|
17526
|
-
} else {
|
|
17527
|
-
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
17528
|
-
arg.children.push(`)`);
|
|
17529
|
-
}
|
|
17530
|
-
}
|
|
17531
|
-
if (!context.inSSR) {
|
|
17532
|
-
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
17533
|
-
injectPrefix(arg, ".");
|
|
17534
|
-
}
|
|
17535
|
-
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
17536
|
-
injectPrefix(arg, "^");
|
|
17537
|
-
}
|
|
17538
|
-
}
|
|
17539
|
-
return {
|
|
17540
|
-
props: [createObjectProperty(arg, exp)]
|
|
17541
|
-
};
|
|
17542
|
-
};
|
|
17543
|
-
const injectPrefix = (arg, prefix) => {
|
|
17544
|
-
if (arg.type === 4) {
|
|
17545
|
-
if (arg.isStatic) {
|
|
17546
|
-
arg.content = prefix + arg.content;
|
|
17547
|
-
} else {
|
|
17548
|
-
arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
17549
|
-
}
|
|
17550
|
-
} else {
|
|
17551
|
-
arg.children.unshift(`'${prefix}' + (`);
|
|
17552
|
-
arg.children.push(`)`);
|
|
17553
|
-
}
|
|
17554
|
-
};
|
|
17555
|
-
|
|
17556
17426
|
const transformText = (node, context) => {
|
|
17557
17427
|
if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
|
|
17558
17428
|
return () => {
|
|
@@ -17664,10 +17534,6 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
17664
17534
|
context.onError(createCompilerError(44, exp.loc));
|
|
17665
17535
|
return createTransformProps();
|
|
17666
17536
|
}
|
|
17667
|
-
if (bindingType === "literal-const" || bindingType === "setup-const") {
|
|
17668
|
-
context.onError(createCompilerError(45, exp.loc));
|
|
17669
|
-
return createTransformProps();
|
|
17670
|
-
}
|
|
17671
17537
|
if (!expString.trim() || !isMemberExpression(exp) && true) {
|
|
17672
17538
|
context.onError(
|
|
17673
17539
|
createCompilerError(42, exp.loc)
|
|
@@ -17738,36 +17604,9 @@ const transformMemo = (node, context) => {
|
|
|
17738
17604
|
}
|
|
17739
17605
|
};
|
|
17740
17606
|
|
|
17741
|
-
const transformVBindShorthand = (node, context) => {
|
|
17742
|
-
if (node.type === 1) {
|
|
17743
|
-
for (const prop of node.props) {
|
|
17744
|
-
if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
|
|
17745
|
-
prop.exp.type === 4 && !prop.exp.content.trim()) && prop.arg) {
|
|
17746
|
-
const arg = prop.arg;
|
|
17747
|
-
if (arg.type !== 4 || !arg.isStatic) {
|
|
17748
|
-
context.onError(
|
|
17749
|
-
createCompilerError(
|
|
17750
|
-
53,
|
|
17751
|
-
arg.loc
|
|
17752
|
-
)
|
|
17753
|
-
);
|
|
17754
|
-
prop.exp = createSimpleExpression("", true, arg.loc);
|
|
17755
|
-
} else {
|
|
17756
|
-
const propName = camelize(arg.content);
|
|
17757
|
-
if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
|
|
17758
|
-
propName[0] === "-") {
|
|
17759
|
-
prop.exp = createSimpleExpression(propName, false, arg.loc);
|
|
17760
|
-
}
|
|
17761
|
-
}
|
|
17762
|
-
}
|
|
17763
|
-
}
|
|
17764
|
-
}
|
|
17765
|
-
};
|
|
17766
|
-
|
|
17767
17607
|
function getBaseTransformPreset(prefixIdentifiers) {
|
|
17768
17608
|
return [
|
|
17769
17609
|
[
|
|
17770
|
-
transformVBindShorthand,
|
|
17771
17610
|
transformOnce,
|
|
17772
17611
|
transformIf,
|
|
17773
17612
|
transformMemo,
|
|
@@ -17791,17 +17630,17 @@ function baseCompile(source, options = {}) {
|
|
|
17791
17630
|
const isModuleMode = options.mode === "module";
|
|
17792
17631
|
{
|
|
17793
17632
|
if (options.prefixIdentifiers === true) {
|
|
17794
|
-
onError(createCompilerError(
|
|
17633
|
+
onError(createCompilerError(47));
|
|
17795
17634
|
} else if (isModuleMode) {
|
|
17796
|
-
onError(createCompilerError(
|
|
17635
|
+
onError(createCompilerError(48));
|
|
17797
17636
|
}
|
|
17798
17637
|
}
|
|
17799
17638
|
const prefixIdentifiers = false;
|
|
17800
17639
|
if (options.cacheHandlers) {
|
|
17801
|
-
onError(createCompilerError(
|
|
17640
|
+
onError(createCompilerError(49));
|
|
17802
17641
|
}
|
|
17803
17642
|
if (options.scopeId && !isModuleMode) {
|
|
17804
|
-
onError(createCompilerError(
|
|
17643
|
+
onError(createCompilerError(50));
|
|
17805
17644
|
}
|
|
17806
17645
|
const resolvedOptions = extend({}, options, {
|
|
17807
17646
|
prefixIdentifiers
|
|
@@ -17829,26 +17668,26 @@ function baseCompile(source, options = {}) {
|
|
|
17829
17668
|
|
|
17830
17669
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
17831
17670
|
|
|
17832
|
-
const V_MODEL_RADIO =
|
|
17833
|
-
const V_MODEL_CHECKBOX =
|
|
17671
|
+
const V_MODEL_RADIO = Symbol(`vModelRadio` );
|
|
17672
|
+
const V_MODEL_CHECKBOX = Symbol(
|
|
17834
17673
|
`vModelCheckbox`
|
|
17835
17674
|
);
|
|
17836
|
-
const V_MODEL_TEXT =
|
|
17837
|
-
const V_MODEL_SELECT =
|
|
17675
|
+
const V_MODEL_TEXT = Symbol(`vModelText` );
|
|
17676
|
+
const V_MODEL_SELECT = Symbol(
|
|
17838
17677
|
`vModelSelect`
|
|
17839
17678
|
);
|
|
17840
|
-
const V_MODEL_DYNAMIC =
|
|
17679
|
+
const V_MODEL_DYNAMIC = Symbol(
|
|
17841
17680
|
`vModelDynamic`
|
|
17842
17681
|
);
|
|
17843
|
-
const V_ON_WITH_MODIFIERS =
|
|
17682
|
+
const V_ON_WITH_MODIFIERS = Symbol(
|
|
17844
17683
|
`vOnModifiersGuard`
|
|
17845
17684
|
);
|
|
17846
|
-
const V_ON_WITH_KEYS =
|
|
17685
|
+
const V_ON_WITH_KEYS = Symbol(
|
|
17847
17686
|
`vOnKeysGuard`
|
|
17848
17687
|
);
|
|
17849
|
-
const V_SHOW =
|
|
17850
|
-
const TRANSITION =
|
|
17851
|
-
const TRANSITION_GROUP =
|
|
17688
|
+
const V_SHOW = Symbol(`vShow` );
|
|
17689
|
+
const TRANSITION = Symbol(`Transition` );
|
|
17690
|
+
const TRANSITION_GROUP = Symbol(
|
|
17852
17691
|
`TransitionGroup`
|
|
17853
17692
|
);
|
|
17854
17693
|
registerRuntimeHelpers({
|
|
@@ -17959,29 +17798,29 @@ function createDOMCompilerError(code, loc) {
|
|
|
17959
17798
|
);
|
|
17960
17799
|
}
|
|
17961
17800
|
const DOMErrorMessages = {
|
|
17962
|
-
[
|
|
17963
|
-
[
|
|
17964
|
-
[
|
|
17965
|
-
[
|
|
17966
|
-
[
|
|
17967
|
-
[
|
|
17968
|
-
[
|
|
17969
|
-
[
|
|
17970
|
-
[
|
|
17971
|
-
[
|
|
17972
|
-
[
|
|
17801
|
+
[53]: `v-html is missing expression.`,
|
|
17802
|
+
[54]: `v-html will override element children.`,
|
|
17803
|
+
[55]: `v-text is missing expression.`,
|
|
17804
|
+
[56]: `v-text will override element children.`,
|
|
17805
|
+
[57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
|
|
17806
|
+
[58]: `v-model argument is not supported on plain elements.`,
|
|
17807
|
+
[59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
|
|
17808
|
+
[60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
|
|
17809
|
+
[61]: `v-show is missing expression.`,
|
|
17810
|
+
[62]: `<Transition> expects exactly one child element or component.`,
|
|
17811
|
+
[63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
|
|
17973
17812
|
};
|
|
17974
17813
|
|
|
17975
17814
|
const transformVHtml = (dir, node, context) => {
|
|
17976
17815
|
const { exp, loc } = dir;
|
|
17977
17816
|
if (!exp) {
|
|
17978
17817
|
context.onError(
|
|
17979
|
-
createDOMCompilerError(
|
|
17818
|
+
createDOMCompilerError(53, loc)
|
|
17980
17819
|
);
|
|
17981
17820
|
}
|
|
17982
17821
|
if (node.children.length) {
|
|
17983
17822
|
context.onError(
|
|
17984
|
-
createDOMCompilerError(
|
|
17823
|
+
createDOMCompilerError(54, loc)
|
|
17985
17824
|
);
|
|
17986
17825
|
node.children.length = 0;
|
|
17987
17826
|
}
|
|
@@ -17999,12 +17838,12 @@ const transformVText = (dir, node, context) => {
|
|
|
17999
17838
|
const { exp, loc } = dir;
|
|
18000
17839
|
if (!exp) {
|
|
18001
17840
|
context.onError(
|
|
18002
|
-
createDOMCompilerError(
|
|
17841
|
+
createDOMCompilerError(55, loc)
|
|
18003
17842
|
);
|
|
18004
17843
|
}
|
|
18005
17844
|
if (node.children.length) {
|
|
18006
17845
|
context.onError(
|
|
18007
|
-
createDOMCompilerError(
|
|
17846
|
+
createDOMCompilerError(56, loc)
|
|
18008
17847
|
);
|
|
18009
17848
|
node.children.length = 0;
|
|
18010
17849
|
}
|
|
@@ -18030,7 +17869,7 @@ const transformModel = (dir, node, context) => {
|
|
|
18030
17869
|
if (dir.arg) {
|
|
18031
17870
|
context.onError(
|
|
18032
17871
|
createDOMCompilerError(
|
|
18033
|
-
|
|
17872
|
+
58,
|
|
18034
17873
|
dir.arg.loc
|
|
18035
17874
|
)
|
|
18036
17875
|
);
|
|
@@ -18040,7 +17879,7 @@ const transformModel = (dir, node, context) => {
|
|
|
18040
17879
|
if (value && isStaticArgOf(value.arg, "value")) {
|
|
18041
17880
|
context.onError(
|
|
18042
17881
|
createDOMCompilerError(
|
|
18043
|
-
|
|
17882
|
+
60,
|
|
18044
17883
|
value.loc
|
|
18045
17884
|
)
|
|
18046
17885
|
);
|
|
@@ -18068,7 +17907,7 @@ const transformModel = (dir, node, context) => {
|
|
|
18068
17907
|
isInvalidType = true;
|
|
18069
17908
|
context.onError(
|
|
18070
17909
|
createDOMCompilerError(
|
|
18071
|
-
|
|
17910
|
+
59,
|
|
18072
17911
|
dir.loc
|
|
18073
17912
|
)
|
|
18074
17913
|
);
|
|
@@ -18094,7 +17933,7 @@ const transformModel = (dir, node, context) => {
|
|
|
18094
17933
|
} else {
|
|
18095
17934
|
context.onError(
|
|
18096
17935
|
createDOMCompilerError(
|
|
18097
|
-
|
|
17936
|
+
57,
|
|
18098
17937
|
dir.loc
|
|
18099
17938
|
)
|
|
18100
17939
|
);
|
|
@@ -18196,7 +18035,7 @@ const transformShow = (dir, node, context) => {
|
|
|
18196
18035
|
const { exp, loc } = dir;
|
|
18197
18036
|
if (!exp) {
|
|
18198
18037
|
context.onError(
|
|
18199
|
-
createDOMCompilerError(
|
|
18038
|
+
createDOMCompilerError(61, loc)
|
|
18200
18039
|
);
|
|
18201
18040
|
}
|
|
18202
18041
|
return {
|
|
@@ -18216,7 +18055,7 @@ const transformTransition = (node, context) => {
|
|
|
18216
18055
|
if (hasMultipleChildren(node)) {
|
|
18217
18056
|
context.onError(
|
|
18218
18057
|
createDOMCompilerError(
|
|
18219
|
-
|
|
18058
|
+
62,
|
|
18220
18059
|
{
|
|
18221
18060
|
start: node.children[0].loc.start,
|
|
18222
18061
|
end: node.children[node.children.length - 1].loc.end,
|
|
@@ -18245,7 +18084,7 @@ const transformTransition = (node, context) => {
|
|
|
18245
18084
|
};
|
|
18246
18085
|
function hasMultipleChildren(node) {
|
|
18247
18086
|
const children = node.children = node.children.filter(
|
|
18248
|
-
(c) => !
|
|
18087
|
+
(c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
|
|
18249
18088
|
);
|
|
18250
18089
|
const child = children[0];
|
|
18251
18090
|
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
|
|
@@ -18255,7 +18094,7 @@ const ignoreSideEffectTags = (node, context) => {
|
|
|
18255
18094
|
if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
|
|
18256
18095
|
context.onError(
|
|
18257
18096
|
createDOMCompilerError(
|
|
18258
|
-
|
|
18097
|
+
63,
|
|
18259
18098
|
node.loc
|
|
18260
18099
|
)
|
|
18261
18100
|
);
|
|
@@ -18527,4 +18366,4 @@ ${codeFrame}` : message);
|
|
|
18527
18366
|
}
|
|
18528
18367
|
registerRuntimeCompiler(compileToFunction);
|
|
18529
18368
|
|
|
18530
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick,
|
|
18369
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|