@vue/compat 3.6.0-rc.1 → 3.6.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-compat.d.ts +743 -678
- package/dist/vue.cjs.js +1328 -944
- package/dist/vue.cjs.prod.js +1116 -809
- package/dist/vue.esm-browser.js +1240 -895
- package/dist/vue.esm-browser.prod.js +7 -6
- package/dist/vue.esm-bundler.js +1314 -916
- package/dist/vue.global.js +1240 -895
- package/dist/vue.global.prod.js +7 -6
- package/dist/vue.runtime.esm-browser.js +1240 -895
- package/dist/vue.runtime.esm-browser.prod.js +7 -6
- package/dist/vue.runtime.esm-bundler.js +1314 -916
- package/dist/vue.runtime.global.js +1240 -895
- package/dist/vue.runtime.global.prod.js +7 -6
- package/package.json +3 -3
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -24,7 +24,7 @@ var Vue = (function() {
|
|
|
24
24
|
* \/\*#\_\_PURE\_\_\*\/
|
|
25
25
|
* So that they can be tree-shaken if necessary.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
28
28
|
function makeMap(str) {
|
|
29
29
|
const map = Object.create(null);
|
|
30
30
|
for (const key of str.split(",")) map[key] = 1;
|
|
@@ -68,9 +68,9 @@ var Vue = (function() {
|
|
|
68
68
|
};
|
|
69
69
|
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
70
70
|
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
71
|
-
const isReservedProp =
|
|
72
|
-
const isBuiltInTag =
|
|
73
|
-
const isBuiltInDirective =
|
|
71
|
+
const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
72
|
+
const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
|
|
73
|
+
const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
74
74
|
const cacheStringFunction = (fn) => {
|
|
75
75
|
const cache = Object.create(null);
|
|
76
76
|
return ((str) => {
|
|
@@ -178,7 +178,7 @@ var Vue = (function() {
|
|
|
178
178
|
[2]: "DYNAMIC",
|
|
179
179
|
[3]: "FORWARDED"
|
|
180
180
|
};
|
|
181
|
-
const isGloballyAllowed =
|
|
181
|
+
const isGloballyAllowed = /*@__PURE__*/ makeMap("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");
|
|
182
182
|
//#endregion
|
|
183
183
|
//#region packages/shared/src/codeframe.ts
|
|
184
184
|
const range = 2;
|
|
@@ -232,10 +232,10 @@ var Vue = (function() {
|
|
|
232
232
|
}
|
|
233
233
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
234
234
|
const propertyDelimiterRE = /:([^]+)/;
|
|
235
|
-
const styleCommentRE =
|
|
235
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
236
236
|
function parseStringStyle(cssText) {
|
|
237
237
|
const ret = {};
|
|
238
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
238
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
239
239
|
if (item) {
|
|
240
240
|
const tmp = item.split(propertyDelimiterRE);
|
|
241
241
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -285,22 +285,22 @@ var Vue = (function() {
|
|
|
285
285
|
* Compiler only.
|
|
286
286
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
287
287
|
*/
|
|
288
|
-
const isHTMLTag =
|
|
288
|
+
const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
|
|
289
289
|
/**
|
|
290
290
|
* Compiler only.
|
|
291
291
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
292
292
|
*/
|
|
293
|
-
const isSVGTag =
|
|
293
|
+
const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
|
|
294
294
|
/**
|
|
295
295
|
* Compiler only.
|
|
296
296
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
297
297
|
*/
|
|
298
|
-
const isMathMLTag =
|
|
298
|
+
const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
|
|
299
299
|
/**
|
|
300
300
|
* Compiler only.
|
|
301
301
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
302
302
|
*/
|
|
303
|
-
const isVoidTag =
|
|
303
|
+
const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
|
|
304
304
|
//#endregion
|
|
305
305
|
//#region packages/shared/src/domAttrConfig.ts
|
|
306
306
|
/**
|
|
@@ -315,11 +315,11 @@ var Vue = (function() {
|
|
|
315
315
|
* - readonly -> readOnly
|
|
316
316
|
*/
|
|
317
317
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
318
|
-
const isSpecialBooleanAttr =
|
|
318
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
319
319
|
/**
|
|
320
320
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
321
321
|
*/
|
|
322
|
-
const isBooleanAttr =
|
|
322
|
+
const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
323
323
|
/**
|
|
324
324
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
325
325
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -333,11 +333,11 @@ var Vue = (function() {
|
|
|
333
333
|
* Don't also forget to allow `data-*` and `aria-*`!
|
|
334
334
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
|
335
335
|
*/
|
|
336
|
-
const isKnownHtmlAttr =
|
|
336
|
+
const isKnownHtmlAttr = /*@__PURE__*/ makeMap("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap");
|
|
337
337
|
/**
|
|
338
338
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
339
339
|
*/
|
|
340
|
-
const isKnownSvgAttr =
|
|
340
|
+
const isKnownSvgAttr = /*@__PURE__*/ makeMap("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan");
|
|
341
341
|
/**
|
|
342
342
|
* Shared between server-renderer and runtime-core hydration logic
|
|
343
343
|
*/
|
|
@@ -363,13 +363,54 @@ var Vue = (function() {
|
|
|
363
363
|
}
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region packages/shared/src/looseEqual.ts
|
|
366
|
-
function looseCompareArrays(a, b) {
|
|
366
|
+
function looseCompareArrays(a, b, seen) {
|
|
367
367
|
if (a.length !== b.length) return false;
|
|
368
368
|
let equal = true;
|
|
369
|
-
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
|
|
369
|
+
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i], seen);
|
|
370
370
|
return equal;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function looseCompareCollections(a, b, seen) {
|
|
373
|
+
if (a.size !== b.size) return false;
|
|
374
|
+
const candidates = Array.from(b);
|
|
375
|
+
const matched = new Uint8Array(candidates.length);
|
|
376
|
+
for (const item of a) {
|
|
377
|
+
let index = -1;
|
|
378
|
+
for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i], seen)) {
|
|
379
|
+
index = i;
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
if (index < 0) return false;
|
|
383
|
+
matched[index] = 1;
|
|
384
|
+
}
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
387
|
+
function looseCompareObjects(a, b, seen) {
|
|
388
|
+
let aValidType = isMap(a);
|
|
389
|
+
let bValidType = isMap(b);
|
|
390
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
391
|
+
aValidType = isSet(a);
|
|
392
|
+
bValidType = isSet(b);
|
|
393
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
394
|
+
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
395
|
+
for (const key in a) {
|
|
396
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
397
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
398
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) return false;
|
|
399
|
+
}
|
|
400
|
+
return String(a) === String(b);
|
|
401
|
+
}
|
|
402
|
+
function looseCompareNested(a, b, seen, compare) {
|
|
403
|
+
if (!seen) seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
404
|
+
const [seenA, seenB] = seen;
|
|
405
|
+
if (seenA.has(a) || seenB.has(b)) return seenA.get(a) === b && seenB.get(b) === a;
|
|
406
|
+
seenA.set(a, b);
|
|
407
|
+
seenB.set(b, a);
|
|
408
|
+
const equal = compare(a, b, seen);
|
|
409
|
+
seenA.delete(a);
|
|
410
|
+
seenB.delete(b);
|
|
411
|
+
return equal;
|
|
412
|
+
}
|
|
413
|
+
function looseEqual(a, b, seen) {
|
|
373
414
|
if (a === b) return true;
|
|
374
415
|
let aValidType = isDate(a);
|
|
375
416
|
let bValidType = isDate(b);
|
|
@@ -379,17 +420,12 @@ var Vue = (function() {
|
|
|
379
420
|
if (aValidType || bValidType) return a === b;
|
|
380
421
|
aValidType = isArray(a);
|
|
381
422
|
bValidType = isArray(b);
|
|
382
|
-
if (aValidType || bValidType) return aValidType && bValidType ?
|
|
423
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
|
|
383
424
|
aValidType = isObject(a);
|
|
384
425
|
bValidType = isObject(b);
|
|
385
426
|
if (aValidType || bValidType) {
|
|
386
427
|
if (!aValidType || !bValidType) return false;
|
|
387
|
-
|
|
388
|
-
for (const key in a) {
|
|
389
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
390
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
391
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
|
|
392
|
-
}
|
|
428
|
+
return looseCompareNested(a, b, seen, looseCompareObjects);
|
|
393
429
|
}
|
|
394
430
|
return String(a) === String(b);
|
|
395
431
|
}
|
|
@@ -519,6 +555,8 @@ var Vue = (function() {
|
|
|
519
555
|
function warn$2(msg, ...args) {
|
|
520
556
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
521
557
|
}
|
|
558
|
+
//#endregion
|
|
559
|
+
//#region packages/reactivity/src/system.ts
|
|
522
560
|
const notifyBuffer = [];
|
|
523
561
|
let batchDepth = 0;
|
|
524
562
|
let activeSub = void 0;
|
|
@@ -657,13 +695,23 @@ var Vue = (function() {
|
|
|
657
695
|
sub.flags &= -5;
|
|
658
696
|
}
|
|
659
697
|
function flush() {
|
|
698
|
+
let hasError = false;
|
|
699
|
+
let error;
|
|
660
700
|
while (notifyIndex < notifyBufferLength) {
|
|
661
701
|
const effect = notifyBuffer[notifyIndex];
|
|
662
702
|
notifyBuffer[notifyIndex++] = void 0;
|
|
663
|
-
|
|
703
|
+
try {
|
|
704
|
+
effect.notify();
|
|
705
|
+
} catch (err) {
|
|
706
|
+
if (!hasError) {
|
|
707
|
+
hasError = true;
|
|
708
|
+
error = err;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
664
711
|
}
|
|
665
712
|
notifyIndex = 0;
|
|
666
713
|
notifyBufferLength = 0;
|
|
714
|
+
if (hasError) throw error;
|
|
667
715
|
}
|
|
668
716
|
function checkDirty(link, sub) {
|
|
669
717
|
let stack;
|
|
@@ -747,7 +795,7 @@ var Vue = (function() {
|
|
|
747
795
|
}
|
|
748
796
|
set subs(value) {
|
|
749
797
|
this._subs = value;
|
|
750
|
-
if (value === void 0) this.map.delete(this.key);
|
|
798
|
+
if (value === void 0 && this.map) this.map.delete(this.key);
|
|
751
799
|
}
|
|
752
800
|
};
|
|
753
801
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -830,9 +878,7 @@ var Vue = (function() {
|
|
|
830
878
|
if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
831
879
|
}
|
|
832
880
|
break;
|
|
833
|
-
case "set":
|
|
834
|
-
if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
835
|
-
break;
|
|
881
|
+
case "set": if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
836
882
|
}
|
|
837
883
|
}
|
|
838
884
|
}
|
|
@@ -847,13 +893,17 @@ var Vue = (function() {
|
|
|
847
893
|
/**
|
|
848
894
|
* Track array iteration and return:
|
|
849
895
|
* - if input is reactive: a cloned raw array with reactive values
|
|
850
|
-
* - if input is
|
|
896
|
+
* - if input is readonly: a cloned raw array with readonly values, preserving
|
|
897
|
+
* reactivity
|
|
898
|
+
* - if input is raw or shallow: the original raw array
|
|
851
899
|
*/
|
|
852
900
|
function reactiveReadArray(array) {
|
|
853
901
|
const raw = /* @__PURE__ */ toRaw(array);
|
|
854
902
|
if (raw === array) return raw;
|
|
855
903
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
856
|
-
|
|
904
|
+
if (/* @__PURE__ */ isShallow(array)) return raw;
|
|
905
|
+
if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
|
|
906
|
+
return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
857
907
|
}
|
|
858
908
|
/**
|
|
859
909
|
* Track array iteration and return raw array
|
|
@@ -1029,8 +1079,8 @@ var Vue = (function() {
|
|
|
1029
1079
|
}
|
|
1030
1080
|
//#endregion
|
|
1031
1081
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
1032
|
-
const isNonTrackableKeys =
|
|
1033
|
-
const builtInSymbols = new Set(
|
|
1082
|
+
const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1083
|
+
const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1034
1084
|
function hasOwnProperty(key) {
|
|
1035
1085
|
if (!isSymbol(key)) key = String(key);
|
|
1036
1086
|
const obj = /* @__PURE__ */ toRaw(this);
|
|
@@ -1085,12 +1135,14 @@ var Vue = (function() {
|
|
|
1085
1135
|
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
1086
1136
|
value = /* @__PURE__ */ toRaw(value);
|
|
1087
1137
|
}
|
|
1088
|
-
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value))
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1138
|
+
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1139
|
+
if (isOldValueReadonly) {
|
|
1140
|
+
warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
|
|
1141
|
+
return true;
|
|
1142
|
+
} else {
|
|
1143
|
+
oldValue.value = value;
|
|
1144
|
+
return true;
|
|
1145
|
+
}
|
|
1094
1146
|
}
|
|
1095
1147
|
}
|
|
1096
1148
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
@@ -1131,10 +1183,10 @@ var Vue = (function() {
|
|
|
1131
1183
|
return true;
|
|
1132
1184
|
}
|
|
1133
1185
|
};
|
|
1134
|
-
const mutableHandlers =
|
|
1135
|
-
const readonlyHandlers =
|
|
1136
|
-
const shallowReactiveHandlers =
|
|
1137
|
-
const shallowReadonlyHandlers =
|
|
1186
|
+
const mutableHandlers = /*@__PURE__*/ new MutableReactiveHandler();
|
|
1187
|
+
const readonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler();
|
|
1188
|
+
const shallowReactiveHandlers = /*@__PURE__*/ new MutableReactiveHandler(true);
|
|
1189
|
+
const shallowReadonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler(true);
|
|
1138
1190
|
//#endregion
|
|
1139
1191
|
//#region packages/reactivity/src/collectionHandlers.ts
|
|
1140
1192
|
const toShallow = (value) => value;
|
|
@@ -1285,10 +1337,10 @@ var Vue = (function() {
|
|
|
1285
1337
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1286
1338
|
};
|
|
1287
1339
|
}
|
|
1288
|
-
const mutableCollectionHandlers = { get:
|
|
1289
|
-
const shallowCollectionHandlers = { get:
|
|
1290
|
-
const readonlyCollectionHandlers = { get:
|
|
1291
|
-
const shallowReadonlyCollectionHandlers = { get:
|
|
1340
|
+
const mutableCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, false) };
|
|
1341
|
+
const shallowCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, true) };
|
|
1342
|
+
const readonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, false) };
|
|
1343
|
+
const shallowReadonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, true) };
|
|
1292
1344
|
function checkIdentityKeys(target, has, key) {
|
|
1293
1345
|
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1294
1346
|
if (rawKey !== key && has.call(target, rawKey)) {
|
|
@@ -1313,7 +1365,7 @@ var Vue = (function() {
|
|
|
1313
1365
|
default: return 0;
|
|
1314
1366
|
}
|
|
1315
1367
|
}
|
|
1316
|
-
|
|
1368
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1317
1369
|
function reactive(target) {
|
|
1318
1370
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
1319
1371
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1348,7 +1400,7 @@ var Vue = (function() {
|
|
|
1348
1400
|
* @param target - The source object.
|
|
1349
1401
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}
|
|
1350
1402
|
*/
|
|
1351
|
-
|
|
1403
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1352
1404
|
function shallowReactive(target) {
|
|
1353
1405
|
return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
|
|
1354
1406
|
}
|
|
@@ -1381,7 +1433,7 @@ var Vue = (function() {
|
|
|
1381
1433
|
* @param target - The source object.
|
|
1382
1434
|
* @see {@link https://vuejs.org/api/reactivity-core.html#readonly}
|
|
1383
1435
|
*/
|
|
1384
|
-
|
|
1436
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1385
1437
|
function readonly(target) {
|
|
1386
1438
|
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
1387
1439
|
}
|
|
@@ -1415,7 +1467,7 @@ var Vue = (function() {
|
|
|
1415
1467
|
* @param target - The source object.
|
|
1416
1468
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}
|
|
1417
1469
|
*/
|
|
1418
|
-
|
|
1470
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1419
1471
|
function shallowReadonly(target) {
|
|
1420
1472
|
return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
|
|
1421
1473
|
}
|
|
@@ -1452,7 +1504,7 @@ var Vue = (function() {
|
|
|
1452
1504
|
* @param value - The value to check.
|
|
1453
1505
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}
|
|
1454
1506
|
*/
|
|
1455
|
-
|
|
1507
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1456
1508
|
function isReactive(value) {
|
|
1457
1509
|
if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1458
1510
|
return !!(value && value["__v_isReactive"]);
|
|
@@ -1468,11 +1520,11 @@ var Vue = (function() {
|
|
|
1468
1520
|
* @param value - The value to check.
|
|
1469
1521
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}
|
|
1470
1522
|
*/
|
|
1471
|
-
|
|
1523
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1472
1524
|
function isReadonly(value) {
|
|
1473
1525
|
return !!(value && value["__v_isReadonly"]);
|
|
1474
1526
|
}
|
|
1475
|
-
|
|
1527
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1476
1528
|
function isShallow(value) {
|
|
1477
1529
|
return !!(value && value["__v_isShallow"]);
|
|
1478
1530
|
}
|
|
@@ -1483,7 +1535,7 @@ var Vue = (function() {
|
|
|
1483
1535
|
* @param value - The value to check.
|
|
1484
1536
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
|
|
1485
1537
|
*/
|
|
1486
|
-
|
|
1538
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1487
1539
|
function isProxy(value) {
|
|
1488
1540
|
return value ? !!value["__v_raw"] : false;
|
|
1489
1541
|
}
|
|
@@ -1510,7 +1562,7 @@ var Vue = (function() {
|
|
|
1510
1562
|
* @param observed - The object for which the "raw" value is requested.
|
|
1511
1563
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}
|
|
1512
1564
|
*/
|
|
1513
|
-
|
|
1565
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1514
1566
|
function toRaw(observed) {
|
|
1515
1567
|
const raw = observed && observed["__v_raw"];
|
|
1516
1568
|
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
@@ -1559,15 +1611,15 @@ var Vue = (function() {
|
|
|
1559
1611
|
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1560
1612
|
//#endregion
|
|
1561
1613
|
//#region packages/reactivity/src/ref.ts
|
|
1562
|
-
|
|
1614
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1563
1615
|
function isRef(r) {
|
|
1564
1616
|
return r ? r["__v_isRef"] === true : false;
|
|
1565
1617
|
}
|
|
1566
|
-
|
|
1618
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1567
1619
|
function ref(value) {
|
|
1568
1620
|
return createRef(value, toReactive);
|
|
1569
1621
|
}
|
|
1570
|
-
|
|
1622
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1571
1623
|
function shallowRef(value) {
|
|
1572
1624
|
return createRef(value);
|
|
1573
1625
|
}
|
|
@@ -1770,7 +1822,7 @@ var Vue = (function() {
|
|
|
1770
1822
|
* @param object - Reactive object to be made into an object of linked refs.
|
|
1771
1823
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}
|
|
1772
1824
|
*/
|
|
1773
|
-
|
|
1825
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1774
1826
|
function toRefs(object) {
|
|
1775
1827
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1776
1828
|
for (const key in object) ret[key] = propertyToRef(object, key);
|
|
@@ -1821,7 +1873,7 @@ var Vue = (function() {
|
|
|
1821
1873
|
return this._value = this._getter();
|
|
1822
1874
|
}
|
|
1823
1875
|
};
|
|
1824
|
-
|
|
1876
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1825
1877
|
function toRef(source, key, defaultValue) {
|
|
1826
1878
|
if (/* @__PURE__ */ isRef(source)) return source;
|
|
1827
1879
|
else if (isFunction(source)) return new GetterRefImpl(source);
|
|
@@ -1887,10 +1939,12 @@ var Vue = (function() {
|
|
|
1887
1939
|
get dirty() {
|
|
1888
1940
|
const flags = this.flags;
|
|
1889
1941
|
if (flags & 16) return true;
|
|
1890
|
-
if (flags & 32)
|
|
1891
|
-
this.
|
|
1892
|
-
|
|
1893
|
-
|
|
1942
|
+
if (flags & 32) {
|
|
1943
|
+
if (checkDirty(this.deps, this)) {
|
|
1944
|
+
this.flags = flags | 16;
|
|
1945
|
+
return true;
|
|
1946
|
+
} else this.flags = flags & -33;
|
|
1947
|
+
}
|
|
1894
1948
|
return false;
|
|
1895
1949
|
}
|
|
1896
1950
|
};
|
|
@@ -2069,10 +2123,12 @@ var Vue = (function() {
|
|
|
2069
2123
|
get _dirty() {
|
|
2070
2124
|
const flags = this.flags;
|
|
2071
2125
|
if (flags & 16) return true;
|
|
2072
|
-
if (flags & 32)
|
|
2073
|
-
this.
|
|
2074
|
-
|
|
2075
|
-
|
|
2126
|
+
if (flags & 32) {
|
|
2127
|
+
if (checkDirty(this.deps, this)) {
|
|
2128
|
+
this.flags = flags | 16;
|
|
2129
|
+
return true;
|
|
2130
|
+
} else this.flags = flags & -33;
|
|
2131
|
+
}
|
|
2076
2132
|
return false;
|
|
2077
2133
|
}
|
|
2078
2134
|
/**
|
|
@@ -2133,7 +2189,7 @@ var Vue = (function() {
|
|
|
2133
2189
|
}
|
|
2134
2190
|
};
|
|
2135
2191
|
setupOnTrigger(ComputedRefImpl);
|
|
2136
|
-
|
|
2192
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2137
2193
|
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
2138
2194
|
let getter;
|
|
2139
2195
|
let setter;
|
|
@@ -2211,25 +2267,26 @@ var Vue = (function() {
|
|
|
2211
2267
|
else if (isFunction(s)) return call ? call(s, 2) : s();
|
|
2212
2268
|
else warnInvalidSource(s, onWarn);
|
|
2213
2269
|
});
|
|
2214
|
-
} else if (isFunction(source))
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2270
|
+
} else if (isFunction(source)) {
|
|
2271
|
+
if (cb) getter = call ? () => call(source, 2) : source;
|
|
2272
|
+
else getter = () => {
|
|
2273
|
+
if (this.cleanupsLength) {
|
|
2274
|
+
const prevSub = setActiveSub();
|
|
2275
|
+
try {
|
|
2276
|
+
cleanup(this);
|
|
2277
|
+
} finally {
|
|
2278
|
+
setActiveSub(prevSub);
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
const currentEffect = activeWatcher;
|
|
2282
|
+
activeWatcher = this;
|
|
2218
2283
|
try {
|
|
2219
|
-
|
|
2284
|
+
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2220
2285
|
} finally {
|
|
2221
|
-
|
|
2286
|
+
activeWatcher = currentEffect;
|
|
2222
2287
|
}
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
activeWatcher = this;
|
|
2226
|
-
try {
|
|
2227
|
-
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2228
|
-
} finally {
|
|
2229
|
-
activeWatcher = currentEffect;
|
|
2230
|
-
}
|
|
2231
|
-
};
|
|
2232
|
-
else {
|
|
2288
|
+
};
|
|
2289
|
+
} else {
|
|
2233
2290
|
getter = NOOP;
|
|
2234
2291
|
warnInvalidSource(source, onWarn);
|
|
2235
2292
|
}
|
|
@@ -2553,7 +2610,7 @@ var Vue = (function() {
|
|
|
2553
2610
|
let jobsLength = 0;
|
|
2554
2611
|
let flushIndex = 0;
|
|
2555
2612
|
let postFlushIndex = 0;
|
|
2556
|
-
const resolvedPromise =
|
|
2613
|
+
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
2557
2614
|
const RECURSION_LIMIT = 100;
|
|
2558
2615
|
function nextTick(fn) {
|
|
2559
2616
|
const p = currentFlushPromise || resolvedPromise;
|
|
@@ -2592,6 +2649,7 @@ var Vue = (function() {
|
|
|
2592
2649
|
flushJobs();
|
|
2593
2650
|
} catch (e) {
|
|
2594
2651
|
currentFlushPromise = null;
|
|
2652
|
+
if (jobsLength || postJobs.length) queueFlush();
|
|
2595
2653
|
throw e;
|
|
2596
2654
|
}
|
|
2597
2655
|
};
|
|
@@ -2599,9 +2657,10 @@ var Vue = (function() {
|
|
|
2599
2657
|
if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
|
|
2600
2658
|
}
|
|
2601
2659
|
function queuePostFlushCb(jobs, id = Infinity) {
|
|
2602
|
-
if (!isArray(jobs))
|
|
2603
|
-
|
|
2604
|
-
|
|
2660
|
+
if (!isArray(jobs)) {
|
|
2661
|
+
if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
|
|
2662
|
+
else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
|
|
2663
|
+
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2605
2664
|
queueFlush();
|
|
2606
2665
|
}
|
|
2607
2666
|
function flushPreFlushCbs(instance, seen) {
|
|
@@ -2615,32 +2674,39 @@ var Vue = (function() {
|
|
|
2615
2674
|
i--;
|
|
2616
2675
|
jobsLength--;
|
|
2617
2676
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2618
|
-
|
|
2619
|
-
|
|
2677
|
+
try {
|
|
2678
|
+
cb();
|
|
2679
|
+
} finally {
|
|
2680
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2681
|
+
}
|
|
2620
2682
|
}
|
|
2621
2683
|
}
|
|
2622
2684
|
function flushPostFlushCbs(seen) {
|
|
2623
2685
|
if (postJobs.length) {
|
|
2624
2686
|
if (activePostJobs) {
|
|
2625
|
-
activePostJobs.push(
|
|
2687
|
+
for (let i = 0; i < postJobs.length; i++) activePostJobs.push(postJobs[i]);
|
|
2626
2688
|
postJobs.length = 0;
|
|
2627
2689
|
return;
|
|
2628
2690
|
}
|
|
2629
2691
|
activePostJobs = postJobs;
|
|
2630
2692
|
postJobs = [];
|
|
2631
2693
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
cb
|
|
2638
|
-
|
|
2639
|
-
|
|
2694
|
+
try {
|
|
2695
|
+
while (postFlushIndex < activePostJobs.length) {
|
|
2696
|
+
const cb = activePostJobs[postFlushIndex++];
|
|
2697
|
+
if (checkRecursiveUpdates(seen, cb)) continue;
|
|
2698
|
+
if (cb.flags & 2) cb.flags &= -2;
|
|
2699
|
+
if (!(cb.flags & 4)) try {
|
|
2700
|
+
cb();
|
|
2701
|
+
} finally {
|
|
2702
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2703
|
+
}
|
|
2640
2704
|
}
|
|
2705
|
+
} finally {
|
|
2706
|
+
while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
|
|
2707
|
+
activePostJobs = null;
|
|
2708
|
+
postFlushIndex = 0;
|
|
2641
2709
|
}
|
|
2642
|
-
activePostJobs = null;
|
|
2643
|
-
postFlushIndex = 0;
|
|
2644
2710
|
}
|
|
2645
2711
|
}
|
|
2646
2712
|
let isFlushing = false;
|
|
@@ -2650,9 +2716,12 @@ var Vue = (function() {
|
|
|
2650
2716
|
function flushOnAppMount(instance) {
|
|
2651
2717
|
if (!isFlushing) {
|
|
2652
2718
|
isFlushing = true;
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2719
|
+
try {
|
|
2720
|
+
flushPreFlushCbs(instance);
|
|
2721
|
+
flushPostFlushCbs();
|
|
2722
|
+
} finally {
|
|
2723
|
+
isFlushing = false;
|
|
2724
|
+
}
|
|
2656
2725
|
}
|
|
2657
2726
|
}
|
|
2658
2727
|
function flushJobs(seen) {
|
|
@@ -2682,8 +2751,8 @@ var Vue = (function() {
|
|
|
2682
2751
|
jobsLength = 0;
|
|
2683
2752
|
jobs.length = 0;
|
|
2684
2753
|
flushPostFlushCbs(seen);
|
|
2685
|
-
currentFlushPromise = null;
|
|
2686
2754
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
2755
|
+
else currentFlushPromise = null;
|
|
2687
2756
|
}
|
|
2688
2757
|
}
|
|
2689
2758
|
function checkRecursiveUpdates(seen, fn) {
|
|
@@ -2714,6 +2783,19 @@ var Vue = (function() {
|
|
|
2714
2783
|
rerender: tryWrap(rerender),
|
|
2715
2784
|
reload: tryWrap(reload)
|
|
2716
2785
|
};
|
|
2786
|
+
function runWithHmrUpdating(fn) {
|
|
2787
|
+
isHmrUpdating = true;
|
|
2788
|
+
let done = false;
|
|
2789
|
+
try {
|
|
2790
|
+
fn();
|
|
2791
|
+
done = true;
|
|
2792
|
+
} finally {
|
|
2793
|
+
if (done) nextTick(() => {
|
|
2794
|
+
isHmrUpdating = false;
|
|
2795
|
+
});
|
|
2796
|
+
else isHmrUpdating = false;
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2717
2799
|
const map = /* @__PURE__ */ new Map();
|
|
2718
2800
|
function registerHMR(instance) {
|
|
2719
2801
|
const id = instance.type.__hmrId;
|
|
@@ -2755,18 +2837,16 @@ var Vue = (function() {
|
|
|
2755
2837
|
instance.render = newRender;
|
|
2756
2838
|
normalizeClassComponent(instance.type).render = newRender;
|
|
2757
2839
|
}
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2840
|
+
runWithHmrUpdating(() => {
|
|
2841
|
+
if (instance.vapor) {
|
|
2842
|
+
if (!instance.isUnmounted) instance.hmrRerender();
|
|
2843
|
+
} else {
|
|
2844
|
+
const i = instance;
|
|
2845
|
+
if (!(i.effect.flags & 1024)) {
|
|
2846
|
+
i.renderCache = [];
|
|
2847
|
+
i.effect.run();
|
|
2848
|
+
}
|
|
2766
2849
|
}
|
|
2767
|
-
}
|
|
2768
|
-
nextTick(() => {
|
|
2769
|
-
isHmrUpdating = false;
|
|
2770
2850
|
});
|
|
2771
2851
|
});
|
|
2772
2852
|
}
|
|
@@ -2781,17 +2861,19 @@ var Vue = (function() {
|
|
|
2781
2861
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2782
2862
|
const dirtyInstances = new Set(instances);
|
|
2783
2863
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2784
|
-
|
|
2785
|
-
const
|
|
2786
|
-
|
|
2787
|
-
if (
|
|
2788
|
-
rerenderedParents.
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2864
|
+
runWithHmrUpdating(() => {
|
|
2865
|
+
for (const instance of instances) {
|
|
2866
|
+
const parent = instance.parent;
|
|
2867
|
+
if (parent) {
|
|
2868
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2869
|
+
rerenderedParents.add(parent);
|
|
2870
|
+
parent.hmrRerender();
|
|
2871
|
+
}
|
|
2872
|
+
} else instance.hmrReload(newComp);
|
|
2873
|
+
}
|
|
2874
|
+
});
|
|
2793
2875
|
} else {
|
|
2794
|
-
const
|
|
2876
|
+
const parents = /* @__PURE__ */ new Set();
|
|
2795
2877
|
const dirtyInstanceSet = new Set(instances);
|
|
2796
2878
|
for (const instance of instances) {
|
|
2797
2879
|
const oldComp = normalizeClassComponent(instance.type);
|
|
@@ -2810,33 +2892,23 @@ var Vue = (function() {
|
|
|
2810
2892
|
instance.ceReload(newComp.styles);
|
|
2811
2893
|
dirtyInstances.delete(instance);
|
|
2812
2894
|
} else if (instance.parent) {
|
|
2813
|
-
|
|
2814
|
-
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2815
|
-
let updates = parentUpdates.get(parent);
|
|
2816
|
-
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2817
|
-
updates.push([instance, dirtyInstances]);
|
|
2818
|
-
}
|
|
2895
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) parents.add(instance.parent);
|
|
2819
2896
|
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2820
2897
|
else if (typeof window !== "undefined") window.location.reload();
|
|
2821
2898
|
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2822
2899
|
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2823
2900
|
}
|
|
2824
|
-
|
|
2901
|
+
parents.forEach((parent) => {
|
|
2825
2902
|
queueJob(() => {
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2903
|
+
runWithHmrUpdating(() => {
|
|
2904
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2905
|
+
else {
|
|
2906
|
+
const i = parent;
|
|
2907
|
+
if (!(i.effect.flags & 1024)) {
|
|
2908
|
+
i.renderCache = [];
|
|
2909
|
+
i.effect.run();
|
|
2910
|
+
}
|
|
2833
2911
|
}
|
|
2834
|
-
}
|
|
2835
|
-
nextTick(() => {
|
|
2836
|
-
isHmrUpdating = false;
|
|
2837
|
-
});
|
|
2838
|
-
updates.forEach(([instance, dirtyInstances]) => {
|
|
2839
|
-
dirtyInstances.delete(instance);
|
|
2840
2912
|
});
|
|
2841
2913
|
});
|
|
2842
2914
|
});
|
|
@@ -2906,20 +2978,20 @@ var Vue = (function() {
|
|
|
2906
2978
|
function devtoolsUnmountApp(app) {
|
|
2907
2979
|
emit$2("app:unmount", app);
|
|
2908
2980
|
}
|
|
2909
|
-
const devtoolsComponentAdded =
|
|
2910
|
-
const devtoolsComponentUpdated =
|
|
2911
|
-
const _devtoolsComponentRemoved =
|
|
2981
|
+
const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
|
|
2982
|
+
const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
|
|
2983
|
+
const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
|
|
2912
2984
|
const devtoolsComponentRemoved = (component) => {
|
|
2913
2985
|
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
|
|
2914
2986
|
};
|
|
2915
|
-
|
|
2987
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2916
2988
|
function createDevtoolsComponentHook(hook) {
|
|
2917
2989
|
return (component) => {
|
|
2918
2990
|
emit$2(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
|
|
2919
2991
|
};
|
|
2920
2992
|
}
|
|
2921
|
-
const devtoolsPerfStart =
|
|
2922
|
-
const devtoolsPerfEnd =
|
|
2993
|
+
const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
|
|
2994
|
+
const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
|
|
2923
2995
|
function createDevtoolsPerformanceHook(hook) {
|
|
2924
2996
|
return (component, type, time) => {
|
|
2925
2997
|
emit$2(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -3148,7 +3220,7 @@ var Vue = (function() {
|
|
|
3148
3220
|
validateCompatConfig(config);
|
|
3149
3221
|
extend(globalCompatConfig, config);
|
|
3150
3222
|
}
|
|
3151
|
-
const seenConfigObjects =
|
|
3223
|
+
const seenConfigObjects = /*@__PURE__*/ new WeakSet();
|
|
3152
3224
|
const warnedInvalidKeys = {};
|
|
3153
3225
|
function validateCompatConfig(config, instance) {
|
|
3154
3226
|
if (seenConfigObjects.has(config)) return;
|
|
@@ -3200,7 +3272,7 @@ var Vue = (function() {
|
|
|
3200
3272
|
}
|
|
3201
3273
|
//#endregion
|
|
3202
3274
|
//#region packages/runtime-core/src/compat/instanceEventEmitter.ts
|
|
3203
|
-
const eventRegistryMap =
|
|
3275
|
+
const eventRegistryMap = /*@__PURE__*/ new WeakMap();
|
|
3204
3276
|
function getRegistry(instance) {
|
|
3205
3277
|
let events = eventRegistryMap.get(instance);
|
|
3206
3278
|
if (!events) eventRegistryMap.set(instance, events = Object.create(null));
|
|
@@ -3334,19 +3406,21 @@ var Vue = (function() {
|
|
|
3334
3406
|
};
|
|
3335
3407
|
function mapCompatDirectiveHook(name, dir, instance) {
|
|
3336
3408
|
const mappedName = legacyDirectiveHookMap[name];
|
|
3337
|
-
if (mappedName)
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3409
|
+
if (mappedName) {
|
|
3410
|
+
if (isArray(mappedName)) {
|
|
3411
|
+
const hook = [];
|
|
3412
|
+
mappedName.forEach((mapped) => {
|
|
3413
|
+
const mappedHook = dir[mapped];
|
|
3414
|
+
if (mappedHook) {
|
|
3415
|
+
softAssertCompatEnabled("CUSTOM_DIR", instance, mapped, name);
|
|
3416
|
+
hook.push(mappedHook);
|
|
3417
|
+
}
|
|
3418
|
+
});
|
|
3419
|
+
return hook.length ? hook : void 0;
|
|
3420
|
+
} else {
|
|
3421
|
+
if (dir[mappedName]) softAssertCompatEnabled("CUSTOM_DIR", instance, mappedName, name);
|
|
3422
|
+
return dir[mappedName];
|
|
3423
|
+
}
|
|
3350
3424
|
}
|
|
3351
3425
|
}
|
|
3352
3426
|
//#endregion
|
|
@@ -3509,7 +3583,7 @@ var Vue = (function() {
|
|
|
3509
3583
|
}
|
|
3510
3584
|
const prev = setCurrentInstance(this);
|
|
3511
3585
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3512
|
-
|
|
3586
|
+
restoreCurrentInstance(prev);
|
|
3513
3587
|
return res;
|
|
3514
3588
|
}
|
|
3515
3589
|
function createPathGetter(ctx, path) {
|
|
@@ -3531,15 +3605,16 @@ var Vue = (function() {
|
|
|
3531
3605
|
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
3532
3606
|
const resolveTarget = (props, select) => {
|
|
3533
3607
|
const targetSelector = props && props.to;
|
|
3534
|
-
if (isString(targetSelector))
|
|
3535
|
-
|
|
3536
|
-
|
|
3608
|
+
if (isString(targetSelector)) {
|
|
3609
|
+
if (!select) {
|
|
3610
|
+
warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
|
|
3611
|
+
return null;
|
|
3612
|
+
} else {
|
|
3613
|
+
const target = select(targetSelector);
|
|
3614
|
+
if (!target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
3615
|
+
return target;
|
|
3616
|
+
}
|
|
3537
3617
|
} else {
|
|
3538
|
-
const target = select(targetSelector);
|
|
3539
|
-
if (!target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
3540
|
-
return target;
|
|
3541
|
-
}
|
|
3542
|
-
else {
|
|
3543
3618
|
if (!targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
3544
3619
|
return targetSelector;
|
|
3545
3620
|
}
|
|
@@ -3577,7 +3652,8 @@ var Vue = (function() {
|
|
|
3577
3652
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3578
3653
|
pendingMounts.delete(vnode);
|
|
3579
3654
|
if (isTeleportDisabled(vnode.props)) {
|
|
3580
|
-
|
|
3655
|
+
const mountContainer = parentNode(vnode.el) || container;
|
|
3656
|
+
mount(vnode, mountContainer, vnode.anchor);
|
|
3581
3657
|
updateCssVars(vnode, true);
|
|
3582
3658
|
}
|
|
3583
3659
|
mountToTarget(vnode);
|
|
@@ -3686,15 +3762,17 @@ var Vue = (function() {
|
|
|
3686
3762
|
const disabled = isTeleportDisabled(vnode.props);
|
|
3687
3763
|
if (target) {
|
|
3688
3764
|
const targetNode = target._lpa || target.firstChild;
|
|
3689
|
-
if (vnode.shapeFlag & 16)
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3765
|
+
if (vnode.shapeFlag & 16) {
|
|
3766
|
+
if (disabled) {
|
|
3767
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3768
|
+
hydrateAnchor(target, targetNode);
|
|
3769
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
|
|
3770
|
+
} else {
|
|
3771
|
+
vnode.anchor = nextSibling(node);
|
|
3772
|
+
hydrateAnchor(target, targetNode);
|
|
3773
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
|
|
3774
|
+
hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3775
|
+
}
|
|
3698
3776
|
}
|
|
3699
3777
|
updateCssVars(vnode, disabled);
|
|
3700
3778
|
} else if (disabled) {
|
|
@@ -3772,59 +3850,27 @@ var Vue = (function() {
|
|
|
3772
3850
|
onAfterAppear: TransitionHookValidator,
|
|
3773
3851
|
onAppearCancelled: TransitionHookValidator
|
|
3774
3852
|
};
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3853
|
+
function isEmptyTransitionChild(vnode, instance) {
|
|
3854
|
+
if (vnode.type === Comment) return true;
|
|
3855
|
+
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3856
|
+
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3857
|
+
}
|
|
3779
3858
|
const BaseTransitionImpl = {
|
|
3780
3859
|
name: `BaseTransition`,
|
|
3781
3860
|
props: BaseTransitionPropsValidators,
|
|
3782
3861
|
setup(props, { slots }) {
|
|
3783
3862
|
const instance = getCurrentInstance();
|
|
3784
3863
|
const state = useTransitionState();
|
|
3864
|
+
let resumeAfterLeave;
|
|
3785
3865
|
return () => {
|
|
3786
|
-
const
|
|
3787
|
-
const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
|
|
3866
|
+
const child = resolveTransitionChild(slots.default && slots.default(), !!instance.subTree);
|
|
3788
3867
|
if (!child) return;
|
|
3789
3868
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
3790
3869
|
const { mode } = rawProps;
|
|
3791
3870
|
checkTransitionMode(mode);
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
let enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance, (hooks) => enterHooks = hooks);
|
|
3796
|
-
if (innerChild.type !== Comment) setTransitionHooks(innerChild, enterHooks);
|
|
3797
|
-
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3798
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
3799
|
-
let leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
|
|
3800
|
-
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
3801
|
-
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
3802
|
-
state.isLeaving = true;
|
|
3803
|
-
leavingHooks.afterLeave = () => {
|
|
3804
|
-
state.isLeaving = false;
|
|
3805
|
-
if (!(instance.job.flags & 4)) instance.update();
|
|
3806
|
-
delete leavingHooks.afterLeave;
|
|
3807
|
-
oldInnerChild = void 0;
|
|
3808
|
-
};
|
|
3809
|
-
return emptyPlaceholder(child);
|
|
3810
|
-
} else if (mode === "in-out" && innerChild.type !== Comment) leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
3811
|
-
const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
|
|
3812
|
-
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
3813
|
-
el[leaveCbKey] = () => {
|
|
3814
|
-
earlyRemove();
|
|
3815
|
-
el[leaveCbKey] = void 0;
|
|
3816
|
-
delete enterHooks.delayedLeave;
|
|
3817
|
-
oldInnerChild = void 0;
|
|
3818
|
-
};
|
|
3819
|
-
enterHooks.delayedLeave = () => {
|
|
3820
|
-
delayedLeave();
|
|
3821
|
-
delete enterHooks.delayedLeave;
|
|
3822
|
-
oldInnerChild = void 0;
|
|
3823
|
-
};
|
|
3824
|
-
};
|
|
3825
|
-
else oldInnerChild = void 0;
|
|
3826
|
-
} else if (oldInnerChild) oldInnerChild = void 0;
|
|
3827
|
-
return child;
|
|
3871
|
+
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3872
|
+
if (!(instance.job.flags & 4)) instance.update();
|
|
3873
|
+
}) : NOOP);
|
|
3828
3874
|
};
|
|
3829
3875
|
}
|
|
3830
3876
|
};
|
|
@@ -3857,7 +3903,7 @@ var Vue = (function() {
|
|
|
3857
3903
|
function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
3858
3904
|
const key = String(vnode.key);
|
|
3859
3905
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
3860
|
-
|
|
3906
|
+
const hooks = baseResolveTransitionHooks({
|
|
3861
3907
|
isLeaving: () => leavingVNodesCache[key] === vnode,
|
|
3862
3908
|
setLeavingNodeCache: () => {
|
|
3863
3909
|
leavingVNodesCache[key] = vnode;
|
|
@@ -3875,6 +3921,13 @@ var Vue = (function() {
|
|
|
3875
3921
|
return hooks;
|
|
3876
3922
|
}
|
|
3877
3923
|
}, props, state, instance);
|
|
3924
|
+
if (vnode.type === VaporSlot) extend(hooks, {
|
|
3925
|
+
__vapor: true,
|
|
3926
|
+
props,
|
|
3927
|
+
state,
|
|
3928
|
+
instance
|
|
3929
|
+
});
|
|
3930
|
+
return hooks;
|
|
3878
3931
|
}
|
|
3879
3932
|
function baseResolveTransitionHooks(context, props, state, instance) {
|
|
3880
3933
|
const { isLeaving, setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
|
|
@@ -3894,8 +3947,10 @@ var Vue = (function() {
|
|
|
3894
3947
|
persisted,
|
|
3895
3948
|
beforeEnter(el) {
|
|
3896
3949
|
let hook = onBeforeEnter;
|
|
3897
|
-
if (!state.isMounted)
|
|
3898
|
-
|
|
3950
|
+
if (!state.isMounted) {
|
|
3951
|
+
if (appear) hook = onBeforeAppear || onBeforeEnter;
|
|
3952
|
+
else return;
|
|
3953
|
+
}
|
|
3899
3954
|
if (el[leaveCbKey]) el[leaveCbKey](true);
|
|
3900
3955
|
earlyRemove();
|
|
3901
3956
|
callHook(hook, [el]);
|
|
@@ -3905,11 +3960,13 @@ var Vue = (function() {
|
|
|
3905
3960
|
let hook = onEnter;
|
|
3906
3961
|
let afterHook = onAfterEnter;
|
|
3907
3962
|
let cancelHook = onEnterCancelled;
|
|
3908
|
-
if (!state.isMounted)
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3963
|
+
if (!state.isMounted) {
|
|
3964
|
+
if (appear) {
|
|
3965
|
+
hook = onAppear || onEnter;
|
|
3966
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
3967
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
3968
|
+
} else return;
|
|
3969
|
+
}
|
|
3913
3970
|
let called = false;
|
|
3914
3971
|
el[enterCbKey$1] = (cancelled) => {
|
|
3915
3972
|
if (called) return;
|
|
@@ -3943,7 +4000,7 @@ var Vue = (function() {
|
|
|
3943
4000
|
else done();
|
|
3944
4001
|
},
|
|
3945
4002
|
clone(node) {
|
|
3946
|
-
return cloneHooks(node);
|
|
4003
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3947
4004
|
}
|
|
3948
4005
|
};
|
|
3949
4006
|
return hooks;
|
|
@@ -3967,16 +4024,91 @@ var Vue = (function() {
|
|
|
3967
4024
|
if (shapeFlag & 32 && isFunction(children.default)) return children.default();
|
|
3968
4025
|
}
|
|
3969
4026
|
}
|
|
4027
|
+
function resolveTransitionChild(children, renderEmpty = false) {
|
|
4028
|
+
const branches = children && getTransitionRawChildren(children, true);
|
|
4029
|
+
return branches && branches.length ? findNonCommentChild(branches) : renderEmpty ? createCommentVNode() : void 0;
|
|
4030
|
+
}
|
|
4031
|
+
/**
|
|
4032
|
+
* @internal
|
|
4033
|
+
*/
|
|
4034
|
+
function prepareTransitionSwitch(previous, next, props, state, instance, resumeAfterLeave, delayedLeaveSource) {
|
|
4035
|
+
if (state.isLeaving) return emptyPlaceholder(next);
|
|
4036
|
+
const nextInner = getInnerChild$1(next);
|
|
4037
|
+
if (!nextInner) return emptyPlaceholder(next);
|
|
4038
|
+
let enterHooks = resolveTransitionHooks(nextInner, props, state, instance, (hooks) => {
|
|
4039
|
+
if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
|
|
4040
|
+
enterHooks = hooks;
|
|
4041
|
+
});
|
|
4042
|
+
if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
|
|
4043
|
+
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
4044
|
+
const mode = props.mode;
|
|
4045
|
+
const previousInner = previous && getInnerChild$1(previous);
|
|
4046
|
+
if (previous && previousInner && !isSameVNodeType(previousInner, nextInner) && !isEmptyTransitionChild(previousInner, instance)) {
|
|
4047
|
+
const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
|
|
4048
|
+
if (nextInner.type !== Comment && (mode === "out-in" || mode === "in-out") && applyTransitionModeSwitch(previousInner, leavingHooks, mode === "in-out" ? () => enterHooks : void 0, props, state, resumeAfterLeave)) return emptyPlaceholder(next);
|
|
4049
|
+
}
|
|
4050
|
+
return next;
|
|
4051
|
+
}
|
|
4052
|
+
function forwardDelayedLeave(hooks, source) {
|
|
4053
|
+
const delayedLeave = source && source.delayedLeave;
|
|
4054
|
+
if (!delayedLeave) return;
|
|
4055
|
+
hooks.delayedLeave = () => {
|
|
4056
|
+
if (source.delayedLeave === delayedLeave) delayedLeave();
|
|
4057
|
+
delete hooks.delayedLeave;
|
|
4058
|
+
};
|
|
4059
|
+
}
|
|
4060
|
+
function prepareLeavingTransitionHooks(previousInner, props, state, instance) {
|
|
4061
|
+
return setTransitionHooks(previousInner, resolveTransitionHooks(previousInner, props, state, instance));
|
|
4062
|
+
}
|
|
4063
|
+
function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, props, state, resumeAfterLeave) {
|
|
4064
|
+
if (props.mode === "out-in") {
|
|
4065
|
+
state.isLeaving = true;
|
|
4066
|
+
leavingHooks.afterLeave = () => {
|
|
4067
|
+
state.isLeaving = false;
|
|
4068
|
+
resumeAfterLeave();
|
|
4069
|
+
delete leavingHooks.afterLeave;
|
|
4070
|
+
};
|
|
4071
|
+
return true;
|
|
4072
|
+
} else if (props.mode === "in-out" && getEnterHooks) {
|
|
4073
|
+
let delayedLeavingVNode = leavingVNode;
|
|
4074
|
+
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4075
|
+
const enterHooks = getEnterHooks();
|
|
4076
|
+
if (!enterHooks) {
|
|
4077
|
+
delayedLeave();
|
|
4078
|
+
return;
|
|
4079
|
+
}
|
|
4080
|
+
const vnode = delayedLeavingVNode;
|
|
4081
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4082
|
+
leavingVNodesCache[String(vnode.key)] = vnode;
|
|
4083
|
+
el[leaveCbKey] = () => {
|
|
4084
|
+
earlyRemove();
|
|
4085
|
+
el[leaveCbKey] = void 0;
|
|
4086
|
+
delete enterHooks.delayedLeave;
|
|
4087
|
+
delayedLeavingVNode = void 0;
|
|
4088
|
+
};
|
|
4089
|
+
enterHooks.delayedLeave = () => {
|
|
4090
|
+
delayedLeave();
|
|
4091
|
+
delete enterHooks.delayedLeave;
|
|
4092
|
+
delayedLeavingVNode = void 0;
|
|
4093
|
+
};
|
|
4094
|
+
};
|
|
4095
|
+
}
|
|
4096
|
+
return false;
|
|
4097
|
+
}
|
|
3970
4098
|
function setTransitionHooks(vnode, hooks) {
|
|
3971
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
3972
|
-
else {
|
|
4099
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3973
4100
|
vnode.transition = hooks;
|
|
3974
|
-
setTransitionHooks(vnode.component
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
4101
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4102
|
+
else {
|
|
4103
|
+
const subTree = vnode.component.subTree;
|
|
4104
|
+
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
4105
|
+
}
|
|
4106
|
+
} else if (vnode.shapeFlag & 128) {
|
|
4107
|
+
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4108
|
+
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4109
|
+
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
3979
4110
|
} else vnode.transition = hooks;
|
|
4111
|
+
return hooks;
|
|
3980
4112
|
}
|
|
3981
4113
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
3982
4114
|
let ret = [];
|
|
@@ -4000,9 +4132,9 @@ var Vue = (function() {
|
|
|
4000
4132
|
}
|
|
4001
4133
|
//#endregion
|
|
4002
4134
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
4003
|
-
|
|
4135
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4004
4136
|
function defineComponent(options, extraOptions) {
|
|
4005
|
-
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
4137
|
+
return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
|
|
4006
4138
|
}
|
|
4007
4139
|
//#endregion
|
|
4008
4140
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
@@ -4099,15 +4231,16 @@ var Vue = (function() {
|
|
|
4099
4231
|
if (rawRef.f) {
|
|
4100
4232
|
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
4101
4233
|
if (isUnmount) isArray(existing) && remove(existing, refValue);
|
|
4102
|
-
else if (!isArray(existing))
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4234
|
+
else if (!isArray(existing)) {
|
|
4235
|
+
if (_isString) {
|
|
4236
|
+
refs[ref] = [refValue];
|
|
4237
|
+
if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
|
|
4238
|
+
} else {
|
|
4239
|
+
const newVal = [refValue];
|
|
4240
|
+
if (canSetRef(ref, rawRef.k)) ref.value = newVal;
|
|
4241
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
4242
|
+
}
|
|
4243
|
+
} else if (!existing.includes(refValue)) existing.push(refValue);
|
|
4111
4244
|
} else if (_isString) {
|
|
4112
4245
|
refs[ref] = value;
|
|
4113
4246
|
if (canSetSetupRef(ref)) setupState[ref] = value;
|
|
@@ -4159,7 +4292,18 @@ var Vue = (function() {
|
|
|
4159
4292
|
hasLoggedMismatchError = true;
|
|
4160
4293
|
};
|
|
4161
4294
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
4162
|
-
const isMathMLContainer = (container) =>
|
|
4295
|
+
const isMathMLContainer = (container) => {
|
|
4296
|
+
if (!container.namespaceURI.includes("MathML")) return false;
|
|
4297
|
+
if (container.tagName !== "annotation-xml") return true;
|
|
4298
|
+
const encoding = container.getAttribute("encoding");
|
|
4299
|
+
return !encoding || !encoding.includes("html");
|
|
4300
|
+
};
|
|
4301
|
+
/**
|
|
4302
|
+
* Resolve the element namespace a container's children should be created in.
|
|
4303
|
+
* The live DOM is the source of truth, so this also covers containers that are
|
|
4304
|
+
* only known at runtime (interop boundaries, teleport targets).
|
|
4305
|
+
* @internal
|
|
4306
|
+
*/
|
|
4163
4307
|
const getContainerType = (container) => {
|
|
4164
4308
|
if (container.nodeType !== 1) return void 0;
|
|
4165
4309
|
if (isSVGContainer(container)) return "svg";
|
|
@@ -4183,7 +4327,7 @@ var Vue = (function() {
|
|
|
4183
4327
|
};
|
|
4184
4328
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
4185
4329
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4186
|
-
const isFragmentStart = isComment(node) && node.data === "[";
|
|
4330
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
4187
4331
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
4188
4332
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
4189
4333
|
let domType = node.nodeType;
|
|
@@ -4197,11 +4341,12 @@ var Vue = (function() {
|
|
|
4197
4341
|
let nextNode = null;
|
|
4198
4342
|
switch (type) {
|
|
4199
4343
|
case Text:
|
|
4200
|
-
if (domType !== 3)
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4344
|
+
if (domType !== 3) {
|
|
4345
|
+
if (vnode.children === "") {
|
|
4346
|
+
insert(vnode.el = createText(""), parentNode(node), node);
|
|
4347
|
+
nextNode = node;
|
|
4348
|
+
} else nextNode = onMismatch();
|
|
4349
|
+
} else {
|
|
4205
4350
|
if (node.data !== vnode.children) {
|
|
4206
4351
|
warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
|
|
4207
4352
|
logMismatchError();
|
|
@@ -4238,45 +4383,35 @@ var Vue = (function() {
|
|
|
4238
4383
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4239
4384
|
break;
|
|
4240
4385
|
case VaporSlot:
|
|
4241
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
|
|
4386
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4242
4387
|
break;
|
|
4243
|
-
default: if (shapeFlag & 1)
|
|
4244
|
-
|
|
4245
|
-
|
|
4388
|
+
default: if (shapeFlag & 1) {
|
|
4389
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
4390
|
+
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4391
|
+
} else if (shapeFlag & 6) {
|
|
4246
4392
|
vnode.slotScopeIds = slotScopeIds;
|
|
4247
4393
|
const container = parentNode(node);
|
|
4248
4394
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
4249
4395
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
4250
4396
|
else nextNode = nextSibling(node);
|
|
4251
|
-
if (vnode.type.__vapor)
|
|
4252
|
-
|
|
4253
|
-
getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
|
|
4254
|
-
if (vnode.dirs) {
|
|
4255
|
-
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
4256
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
4257
|
-
}
|
|
4258
|
-
}, () => {
|
|
4259
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
|
|
4260
|
-
});
|
|
4261
|
-
if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
4262
|
-
const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
|
|
4263
|
-
if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
|
|
4264
|
-
} else {
|
|
4397
|
+
if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
|
|
4398
|
+
else {
|
|
4265
4399
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
4266
4400
|
const component = vnode.component;
|
|
4267
|
-
if (isAsyncWrapper(vnode)
|
|
4401
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep)) {
|
|
4268
4402
|
let subTree;
|
|
4269
4403
|
if (isFragmentStart) {
|
|
4270
|
-
subTree = createVNode(
|
|
4404
|
+
subTree = createVNode(Static);
|
|
4271
4405
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4272
|
-
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
4406
|
+
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(node.nodeType === 8 ? Comment : "div");
|
|
4273
4407
|
subTree.el = node;
|
|
4274
4408
|
component.subTree = subTree;
|
|
4275
4409
|
}
|
|
4276
4410
|
}
|
|
4277
|
-
} else if (shapeFlag & 64)
|
|
4278
|
-
|
|
4279
|
-
|
|
4411
|
+
} else if (shapeFlag & 64) {
|
|
4412
|
+
if (domType !== 8) nextNode = onMismatch();
|
|
4413
|
+
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
4414
|
+
} else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
4280
4415
|
else warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
4281
4416
|
}
|
|
4282
4417
|
if (ref != null) setRef(ref, null, parentSuspense, vnode);
|
|
@@ -4328,7 +4463,10 @@ var Vue = (function() {
|
|
|
4328
4463
|
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
4329
4464
|
for (const key in props) {
|
|
4330
4465
|
if (!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
|
|
4331
|
-
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key))
|
|
4466
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
4467
|
+
if (isUnchangedResourceProp(el, key, props[key])) continue;
|
|
4468
|
+
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4469
|
+
}
|
|
4332
4470
|
}
|
|
4333
4471
|
}
|
|
4334
4472
|
let vnodeHooks;
|
|
@@ -4376,8 +4514,9 @@ var Vue = (function() {
|
|
|
4376
4514
|
const { slotScopeIds: fragmentSlotScopeIds } = vnode;
|
|
4377
4515
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
4378
4516
|
const container = parentNode(node);
|
|
4379
|
-
const
|
|
4380
|
-
|
|
4517
|
+
const first = nextSibling(node);
|
|
4518
|
+
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4519
|
+
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
4381
4520
|
else {
|
|
4382
4521
|
logMismatchError();
|
|
4383
4522
|
insert(vnode.anchor = createComment(`]`), container, next);
|
|
@@ -4386,7 +4525,7 @@ var Vue = (function() {
|
|
|
4386
4525
|
};
|
|
4387
4526
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4388
4527
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4389
|
-
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
4528
|
+
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data === "[" || node.data === "(") ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
4390
4529
|
logMismatchError();
|
|
4391
4530
|
}
|
|
4392
4531
|
vnode.el = null;
|
|
@@ -4402,20 +4541,22 @@ var Vue = (function() {
|
|
|
4402
4541
|
const container = parentNode(node);
|
|
4403
4542
|
remove(node);
|
|
4404
4543
|
patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4405
|
-
if (parentComponent) {
|
|
4544
|
+
if (parentComponent && parentComponent.vnode) {
|
|
4406
4545
|
parentComponent.vnode.el = vnode.el;
|
|
4407
4546
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
4408
4547
|
}
|
|
4409
4548
|
return next;
|
|
4410
4549
|
};
|
|
4411
|
-
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
4550
|
+
const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "(" ? "(" : "[", close = open === "(" ? ")" : "]") => {
|
|
4412
4551
|
let match = 0;
|
|
4413
4552
|
while (node) {
|
|
4414
4553
|
node = nextSibling(node);
|
|
4415
4554
|
if (node && isComment(node)) {
|
|
4416
4555
|
if (node.data === open) match++;
|
|
4417
|
-
if (node.data === close)
|
|
4418
|
-
|
|
4556
|
+
if (node.data === close) {
|
|
4557
|
+
if (match === 0) return nextSibling(node);
|
|
4558
|
+
else match--;
|
|
4559
|
+
}
|
|
4419
4560
|
}
|
|
4420
4561
|
}
|
|
4421
4562
|
return node;
|
|
@@ -4425,7 +4566,7 @@ var Vue = (function() {
|
|
|
4425
4566
|
if (parentNode) parentNode.replaceChild(newNode, oldNode);
|
|
4426
4567
|
let parent = parentComponent;
|
|
4427
4568
|
while (parent) {
|
|
4428
|
-
if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
4569
|
+
if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
4429
4570
|
parent = parent.parent;
|
|
4430
4571
|
}
|
|
4431
4572
|
};
|
|
@@ -4434,6 +4575,16 @@ var Vue = (function() {
|
|
|
4434
4575
|
const isTemplateNode$1 = (node) => {
|
|
4435
4576
|
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
4436
4577
|
};
|
|
4578
|
+
const resourceProps = /*@__PURE__*/ new Set([
|
|
4579
|
+
"src",
|
|
4580
|
+
"srcset",
|
|
4581
|
+
"href",
|
|
4582
|
+
"poster"
|
|
4583
|
+
]);
|
|
4584
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
4585
|
+
if (!resourceProps.has(key)) return false;
|
|
4586
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
4587
|
+
}
|
|
4437
4588
|
/**
|
|
4438
4589
|
* Dev only
|
|
4439
4590
|
*/
|
|
@@ -4477,7 +4628,10 @@ var Vue = (function() {
|
|
|
4477
4628
|
function getAttributeMismatch(el, key, clientValue) {
|
|
4478
4629
|
let actual;
|
|
4479
4630
|
let expected;
|
|
4480
|
-
if (
|
|
4631
|
+
if (key === "hidden") {
|
|
4632
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
4633
|
+
expected = normalizeHiddenValue(clientValue);
|
|
4634
|
+
} else if (isBooleanAttr(key)) {
|
|
4481
4635
|
actual = el.hasAttribute(key);
|
|
4482
4636
|
expected = includeBooleanAttr(clientValue);
|
|
4483
4637
|
} else if (clientValue == null) {
|
|
@@ -4505,6 +4659,11 @@ var Vue = (function() {
|
|
|
4505
4659
|
}
|
|
4506
4660
|
return false;
|
|
4507
4661
|
}
|
|
4662
|
+
function normalizeHiddenValue(value) {
|
|
4663
|
+
if (!isRenderableAttrValue(value)) return false;
|
|
4664
|
+
if (isString(value)) return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
4665
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
4666
|
+
}
|
|
4508
4667
|
function toClassSet(str) {
|
|
4509
4668
|
return new Set(str.trim().split(/\s+/));
|
|
4510
4669
|
}
|
|
@@ -4643,16 +4802,18 @@ var Vue = (function() {
|
|
|
4643
4802
|
return teardown;
|
|
4644
4803
|
};
|
|
4645
4804
|
function forEachElement(node, cb) {
|
|
4646
|
-
if (isComment(node) && node.data === "[") {
|
|
4805
|
+
if (isComment(node) && (node.data === "[" || node.data === "(")) {
|
|
4806
|
+
const open = node.data;
|
|
4807
|
+
const close = open === "[" ? "]" : ")";
|
|
4647
4808
|
let depth = 1;
|
|
4648
4809
|
let next = node.nextSibling;
|
|
4649
4810
|
while (next) {
|
|
4650
4811
|
if (next.nodeType === 1) {
|
|
4651
4812
|
if (cb(next) === false) break;
|
|
4652
4813
|
} else if (isComment(next)) {
|
|
4653
|
-
if (next.data ===
|
|
4814
|
+
if (next.data === close) {
|
|
4654
4815
|
if (--depth === 0) break;
|
|
4655
|
-
} else if (next.data ===
|
|
4816
|
+
} else if (next.data === open) depth++;
|
|
4656
4817
|
}
|
|
4657
4818
|
next = next.nextSibling;
|
|
4658
4819
|
}
|
|
@@ -4661,14 +4822,14 @@ var Vue = (function() {
|
|
|
4661
4822
|
//#endregion
|
|
4662
4823
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
4663
4824
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4664
|
-
|
|
4825
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4665
4826
|
function defineAsyncComponent(source) {
|
|
4666
4827
|
const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
|
|
4667
4828
|
return /* @__PURE__ */ defineComponent({
|
|
4668
4829
|
name: "AsyncComponentWrapper",
|
|
4669
4830
|
__asyncLoader: load,
|
|
4670
4831
|
__asyncHydrate(el, instance, hydrate) {
|
|
4671
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4832
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4672
4833
|
},
|
|
4673
4834
|
get __asyncResolved() {
|
|
4674
4835
|
return getResolvedComp();
|
|
@@ -4787,10 +4948,10 @@ var Vue = (function() {
|
|
|
4787
4948
|
* shared between core and vapor
|
|
4788
4949
|
* @internal
|
|
4789
4950
|
*/
|
|
4790
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4951
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4791
4952
|
const wasConnected = el.isConnected;
|
|
4792
4953
|
let patched = false;
|
|
4793
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4954
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4794
4955
|
const performHydrate = () => {
|
|
4795
4956
|
if (patched) {
|
|
4796
4957
|
{
|
|
@@ -4876,10 +5037,13 @@ var Vue = (function() {
|
|
|
4876
5037
|
});
|
|
4877
5038
|
let pendingCacheKey = null;
|
|
4878
5039
|
const cacheSubtree = () => {
|
|
4879
|
-
if (pendingCacheKey != null)
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
5040
|
+
if (pendingCacheKey != null) {
|
|
5041
|
+
if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
|
|
5042
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
5043
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
5044
|
+
}, void 0, keepAliveInstance.subTree.suspense);
|
|
5045
|
+
else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
5046
|
+
}
|
|
4883
5047
|
};
|
|
4884
5048
|
onMounted(cacheSubtree);
|
|
4885
5049
|
onUpdated(cacheSubtree);
|
|
@@ -4950,7 +5114,7 @@ var Vue = (function() {
|
|
|
4950
5114
|
t.__isBuiltIn = true;
|
|
4951
5115
|
return t;
|
|
4952
5116
|
};
|
|
4953
|
-
const KeepAlive =
|
|
5117
|
+
const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
|
|
4954
5118
|
function matches(pattern, name) {
|
|
4955
5119
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
4956
5120
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -5041,7 +5205,7 @@ var Vue = (function() {
|
|
|
5041
5205
|
try {
|
|
5042
5206
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
5043
5207
|
} finally {
|
|
5044
|
-
|
|
5208
|
+
restoreCurrentInstance(prev);
|
|
5045
5209
|
setActiveSub(prevSub);
|
|
5046
5210
|
}
|
|
5047
5211
|
});
|
|
@@ -5166,16 +5330,17 @@ var Vue = (function() {
|
|
|
5166
5330
|
}
|
|
5167
5331
|
const l = arguments.length;
|
|
5168
5332
|
const is2ndArgArrayChildren = isArray(propsOrChildren);
|
|
5169
|
-
if (l === 2 || is2ndArgArrayChildren)
|
|
5170
|
-
if (
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5333
|
+
if (l === 2 || is2ndArgArrayChildren) {
|
|
5334
|
+
if (isObject(propsOrChildren) && !is2ndArgArrayChildren) {
|
|
5335
|
+
if (isVNode(propsOrChildren)) return convertLegacySlots(createVNode(type, null, [propsOrChildren]));
|
|
5336
|
+
return convertLegacySlots(convertLegacyDirectives(createVNode(type, convertLegacyProps(propsOrChildren, type)), propsOrChildren));
|
|
5337
|
+
} else return convertLegacySlots(createVNode(type, null, propsOrChildren));
|
|
5338
|
+
} else {
|
|
5174
5339
|
if (isVNode(children)) children = [children];
|
|
5175
5340
|
return convertLegacySlots(convertLegacyDirectives(createVNode(type, convertLegacyProps(propsOrChildren, type), children), propsOrChildren));
|
|
5176
5341
|
}
|
|
5177
5342
|
}
|
|
5178
|
-
const skipLegacyRootLevelProps =
|
|
5343
|
+
const skipLegacyRootLevelProps = /*@__PURE__*/ makeMap("staticStyle,staticClass,directives,model,hook");
|
|
5179
5344
|
function convertLegacyProps(legacyProps, type) {
|
|
5180
5345
|
if (!legacyProps) return null;
|
|
5181
5346
|
const converted = {};
|
|
@@ -5187,8 +5352,10 @@ var Vue = (function() {
|
|
|
5187
5352
|
if (key === "nativeOn") handlerKey += `Native`;
|
|
5188
5353
|
const existing = converted[handlerKey];
|
|
5189
5354
|
const incoming = listeners[event];
|
|
5190
|
-
if (existing !== incoming)
|
|
5191
|
-
|
|
5355
|
+
if (existing !== incoming) {
|
|
5356
|
+
if (existing) converted[handlerKey] = [].concat(existing, incoming);
|
|
5357
|
+
else converted[handlerKey] = incoming;
|
|
5358
|
+
}
|
|
5192
5359
|
}
|
|
5193
5360
|
} else if (!skipLegacyRootLevelProps(key)) converted[key] = legacyProps[key];
|
|
5194
5361
|
if (legacyProps.staticClass) converted.class = normalizeClass([legacyProps.staticClass, converted.class]);
|
|
@@ -5287,7 +5454,7 @@ var Vue = (function() {
|
|
|
5287
5454
|
const legacyFn = comp.render;
|
|
5288
5455
|
const Func = (props, ctx) => {
|
|
5289
5456
|
const instance = getCurrentInstance();
|
|
5290
|
-
|
|
5457
|
+
const legacyCtx = {
|
|
5291
5458
|
props,
|
|
5292
5459
|
children: instance.vnode.children || [],
|
|
5293
5460
|
data: instance.vnode.props || {},
|
|
@@ -5307,7 +5474,8 @@ var Vue = (function() {
|
|
|
5307
5474
|
}
|
|
5308
5475
|
return {};
|
|
5309
5476
|
}
|
|
5310
|
-
}
|
|
5477
|
+
};
|
|
5478
|
+
return legacyFn(compatH, legacyCtx);
|
|
5311
5479
|
};
|
|
5312
5480
|
Func.props = comp.props;
|
|
5313
5481
|
Func.displayName = comp.name;
|
|
@@ -5336,23 +5504,25 @@ var Vue = (function() {
|
|
|
5336
5504
|
}
|
|
5337
5505
|
ret = new Array(source.length);
|
|
5338
5506
|
for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
|
|
5339
|
-
} else if (typeof source === "number")
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
5347
|
-
else {
|
|
5348
|
-
const keys = Object.keys(source);
|
|
5349
|
-
ret = new Array(keys.length);
|
|
5350
|
-
for (let i = 0, l = keys.length; i < l; i++) {
|
|
5351
|
-
const key = keys[i];
|
|
5352
|
-
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
5507
|
+
} else if (typeof source === "number") {
|
|
5508
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
5509
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
5510
|
+
ret = [];
|
|
5511
|
+
} else {
|
|
5512
|
+
ret = new Array(source);
|
|
5513
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
5353
5514
|
}
|
|
5354
|
-
}
|
|
5355
|
-
|
|
5515
|
+
} else if (isObject(source)) {
|
|
5516
|
+
if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
5517
|
+
else {
|
|
5518
|
+
const keys = Object.keys(source);
|
|
5519
|
+
ret = new Array(keys.length);
|
|
5520
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
5521
|
+
const key = keys[i];
|
|
5522
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
5523
|
+
}
|
|
5524
|
+
}
|
|
5525
|
+
} else ret = [];
|
|
5356
5526
|
if (cache) cache[index] = ret;
|
|
5357
5527
|
return ret;
|
|
5358
5528
|
}
|
|
@@ -5377,18 +5547,28 @@ var Vue = (function() {
|
|
|
5377
5547
|
//#endregion
|
|
5378
5548
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
5379
5549
|
/**
|
|
5550
|
+
* Links a slot function to its raw vapor slot: a raw vapor slot carries
|
|
5551
|
+
* itself, and the wrapper the interop slots proxy hands out carries the raw
|
|
5552
|
+
* slot it wraps — one lookup answers both "is this a vapor slot" and
|
|
5553
|
+
* "which one". Internal to vapor interop.
|
|
5554
|
+
*/
|
|
5555
|
+
const rawVaporSlotKey = Symbol(`rawVaporSlot`);
|
|
5556
|
+
/**
|
|
5380
5557
|
* Compiler runtime helper for rendering `<slot/>`
|
|
5381
5558
|
* @private
|
|
5382
5559
|
*/
|
|
5383
|
-
function renderSlot(slots, name, props
|
|
5560
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
5561
|
+
if (props == null) props = {};
|
|
5384
5562
|
let slot = slots[name];
|
|
5385
|
-
|
|
5386
|
-
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
5563
|
+
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
5387
5564
|
if (vaporSlot) {
|
|
5388
5565
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
5389
5566
|
ret.vs = {
|
|
5390
5567
|
slot: vaporSlot,
|
|
5391
|
-
fallback
|
|
5568
|
+
outlets: fallback ? [{
|
|
5569
|
+
fallback,
|
|
5570
|
+
owner: currentRenderingInstance
|
|
5571
|
+
}] : void 0
|
|
5392
5572
|
};
|
|
5393
5573
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5394
5574
|
return ret;
|
|
@@ -5409,9 +5589,15 @@ var Vue = (function() {
|
|
|
5409
5589
|
let rendered;
|
|
5410
5590
|
try {
|
|
5411
5591
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5412
|
-
|
|
5592
|
+
let attached = false;
|
|
5593
|
+
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
5594
|
+
const interop = currentRenderingInstance.appContext.vapor;
|
|
5595
|
+
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
5596
|
+
}
|
|
5413
5597
|
const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
|
|
5414
5598
|
rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
5599
|
+
if (!validSlotContent && fallback) rendered.shapeFlag |= 1024;
|
|
5600
|
+
if (attached) rendered.vo = true;
|
|
5415
5601
|
} catch (err) {
|
|
5416
5602
|
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
5417
5603
|
throw err;
|
|
@@ -5429,10 +5615,6 @@ var Vue = (function() {
|
|
|
5429
5615
|
return true;
|
|
5430
5616
|
}) ? vnodes : null;
|
|
5431
5617
|
}
|
|
5432
|
-
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
5433
|
-
let vaporSlot;
|
|
5434
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
5435
|
-
}
|
|
5436
5618
|
//#endregion
|
|
5437
5619
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
5438
5620
|
/**
|
|
@@ -5491,12 +5673,14 @@ var Vue = (function() {
|
|
|
5491
5673
|
function mapKeyToName(slots) {
|
|
5492
5674
|
for (let i = 0; i < slots.length; i++) {
|
|
5493
5675
|
const fn = slots[i];
|
|
5494
|
-
if (fn)
|
|
5495
|
-
|
|
5676
|
+
if (fn) {
|
|
5677
|
+
if (isArray(fn)) mapKeyToName(fn);
|
|
5678
|
+
else fn.name = fn.key || "default";
|
|
5679
|
+
}
|
|
5496
5680
|
}
|
|
5497
5681
|
return slots;
|
|
5498
5682
|
}
|
|
5499
|
-
const staticCacheMap =
|
|
5683
|
+
const staticCacheMap = /*@__PURE__*/ new WeakMap();
|
|
5500
5684
|
function legacyRenderStatic(instance, index) {
|
|
5501
5685
|
let cache = staticCacheMap.get(instance);
|
|
5502
5686
|
if (!cache) staticCacheMap.set(instance, cache = []);
|
|
@@ -5629,11 +5813,38 @@ var Vue = (function() {
|
|
|
5629
5813
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
5630
5814
|
return getPublicInstance(i.parent);
|
|
5631
5815
|
};
|
|
5816
|
+
const resolveDevRootEl = (vnode) => {
|
|
5817
|
+
let found = false;
|
|
5818
|
+
while (true) {
|
|
5819
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
5820
|
+
const root = filterSingleRoot(vnode.children);
|
|
5821
|
+
if (!root) return;
|
|
5822
|
+
vnode = root;
|
|
5823
|
+
found = true;
|
|
5824
|
+
continue;
|
|
5825
|
+
}
|
|
5826
|
+
const component = vnode.component;
|
|
5827
|
+
if (component && component.subTree) {
|
|
5828
|
+
vnode = component.subTree;
|
|
5829
|
+
continue;
|
|
5830
|
+
}
|
|
5831
|
+
const suspense = vnode.suspense;
|
|
5832
|
+
if (suspense && suspense.activeBranch) {
|
|
5833
|
+
vnode = suspense.activeBranch;
|
|
5834
|
+
continue;
|
|
5835
|
+
}
|
|
5836
|
+
return found ? vnode.el : void 0;
|
|
5837
|
+
}
|
|
5838
|
+
};
|
|
5839
|
+
const getDevRootFragmentEl = (i) => {
|
|
5840
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
5841
|
+
return el === void 0 ? i.vnode.el : el;
|
|
5842
|
+
};
|
|
5632
5843
|
let publicPropertiesMap;
|
|
5633
5844
|
const getPublicPropertiesMap = () => {
|
|
5634
5845
|
if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
|
|
5635
5846
|
$: (i) => i,
|
|
5636
|
-
$el: (i) => i
|
|
5847
|
+
$el: (i) => getDevRootFragmentEl(i),
|
|
5637
5848
|
$data: (i) => i.data,
|
|
5638
5849
|
$props: (i) => /* @__PURE__ */ shallowReadonly(i.props),
|
|
5639
5850
|
$attrs: (i) => /* @__PURE__ */ shallowReadonly(i.attrs),
|
|
@@ -5746,7 +5957,7 @@ var Vue = (function() {
|
|
|
5746
5957
|
warn$1("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.");
|
|
5747
5958
|
return Reflect.ownKeys(target);
|
|
5748
5959
|
};
|
|
5749
|
-
const RuntimeCompiledPublicInstanceProxyHandlers =
|
|
5960
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
|
|
5750
5961
|
get(target, key) {
|
|
5751
5962
|
if (key === Symbol.unscopables) return;
|
|
5752
5963
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
@@ -5931,12 +6142,13 @@ var Vue = (function() {
|
|
|
5931
6142
|
for (const key in defaults) {
|
|
5932
6143
|
if (key.startsWith("__skip")) continue;
|
|
5933
6144
|
let opt = props[key];
|
|
5934
|
-
if (opt)
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
6145
|
+
if (opt) {
|
|
6146
|
+
if (isArray(opt) || isFunction(opt)) opt = props[key] = {
|
|
6147
|
+
type: opt,
|
|
6148
|
+
default: defaults[key]
|
|
6149
|
+
};
|
|
6150
|
+
else opt.default = defaults[key];
|
|
6151
|
+
} else if (opt === null) opt = props[key] = { default: defaults[key] };
|
|
5940
6152
|
else warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
5941
6153
|
if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
|
|
5942
6154
|
}
|
|
@@ -5986,37 +6198,32 @@ var Vue = (function() {
|
|
|
5986
6198
|
function withAsyncContext(getAwaitable) {
|
|
5987
6199
|
const ctx = getCurrentGenericInstance();
|
|
5988
6200
|
const inSSRSetup = isInSSRComponentSetup;
|
|
5989
|
-
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
5990
6201
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
5991
6202
|
let awaitable = getAwaitable();
|
|
5992
6203
|
setCurrentInstance(null, void 0);
|
|
5993
6204
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5994
6205
|
const restore = () => {
|
|
5995
|
-
const
|
|
6206
|
+
const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5996
6207
|
setCurrentInstance(ctx);
|
|
5997
6208
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
5998
|
-
|
|
5999
|
-
return () => {
|
|
6000
|
-
if (reset) reset();
|
|
6001
|
-
if (resetStoppedScope) resetStoppedScope.reset();
|
|
6002
|
-
};
|
|
6209
|
+
return stoppedScope;
|
|
6003
6210
|
};
|
|
6004
6211
|
const cleanup = () => {
|
|
6005
6212
|
setCurrentInstance(null, void 0);
|
|
6006
6213
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
6007
6214
|
};
|
|
6008
6215
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
6009
|
-
const
|
|
6216
|
+
const stoppedScope = restore();
|
|
6010
6217
|
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
6011
|
-
if (
|
|
6218
|
+
if (stoppedScope) stoppedScope.reset();
|
|
6012
6219
|
cleanup();
|
|
6013
6220
|
}));
|
|
6014
6221
|
throw e;
|
|
6015
6222
|
});
|
|
6016
6223
|
return [awaitable, () => {
|
|
6017
|
-
const
|
|
6224
|
+
const stoppedScope = restore();
|
|
6018
6225
|
Promise.resolve().then(() => {
|
|
6019
|
-
if (
|
|
6226
|
+
if (stoppedScope) stoppedScope.reset();
|
|
6020
6227
|
cleanup();
|
|
6021
6228
|
});
|
|
6022
6229
|
}];
|
|
@@ -6079,11 +6286,12 @@ var Vue = (function() {
|
|
|
6079
6286
|
const opt = computedOptions[key];
|
|
6080
6287
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
6081
6288
|
if (get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
|
|
6289
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
|
|
6290
|
+
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
6291
|
+
};
|
|
6082
6292
|
const c = computed({
|
|
6083
6293
|
get,
|
|
6084
|
-
set
|
|
6085
|
-
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
6086
|
-
}
|
|
6294
|
+
set
|
|
6087
6295
|
});
|
|
6088
6296
|
Object.defineProperty(ctx, key, {
|
|
6089
6297
|
enumerable: true,
|
|
@@ -6142,9 +6350,10 @@ var Vue = (function() {
|
|
|
6142
6350
|
for (const key in injectOptions) {
|
|
6143
6351
|
const opt = injectOptions[key];
|
|
6144
6352
|
let injected;
|
|
6145
|
-
if (isObject(opt))
|
|
6146
|
-
|
|
6147
|
-
|
|
6353
|
+
if (isObject(opt)) {
|
|
6354
|
+
if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
|
|
6355
|
+
else injected = inject(opt.from || key);
|
|
6356
|
+
} else injected = inject(opt);
|
|
6148
6357
|
if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
|
|
6149
6358
|
enumerable: true,
|
|
6150
6359
|
configurable: true,
|
|
@@ -6164,7 +6373,8 @@ var Vue = (function() {
|
|
|
6164
6373
|
{
|
|
6165
6374
|
const cur = getCurrentInstance();
|
|
6166
6375
|
const instance = cur && getCurrentScope() === cur.scope ? cur : null;
|
|
6167
|
-
|
|
6376
|
+
const newValue = getter();
|
|
6377
|
+
if (isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) options.deep = true;
|
|
6168
6378
|
const baseGetter = getter;
|
|
6169
6379
|
getter = () => {
|
|
6170
6380
|
const val = baseGetter();
|
|
@@ -6177,13 +6387,14 @@ var Vue = (function() {
|
|
|
6177
6387
|
if (isFunction(handler)) watch(getter, handler, options);
|
|
6178
6388
|
else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
6179
6389
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis), options);
|
|
6180
|
-
else if (isObject(raw))
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6390
|
+
else if (isObject(raw)) {
|
|
6391
|
+
if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
6392
|
+
else {
|
|
6393
|
+
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
6394
|
+
if (isFunction(handler)) watch(getter, handler, extend(raw, options));
|
|
6395
|
+
else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
6396
|
+
}
|
|
6397
|
+
} else warn$1(`Invalid watch option: "${key}"`, raw);
|
|
6187
6398
|
}
|
|
6188
6399
|
/**
|
|
6189
6400
|
* Resolve merged options and cache it on the component.
|
|
@@ -6197,12 +6408,13 @@ var Vue = (function() {
|
|
|
6197
6408
|
const cached = cache.get(base);
|
|
6198
6409
|
let resolved;
|
|
6199
6410
|
if (cached) resolved = cached;
|
|
6200
|
-
else if (!globalMixins.length && !mixins && !extendsOptions)
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6411
|
+
else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
6412
|
+
if (isCompatEnabled$1("PRIVATE_APIS", instance)) {
|
|
6413
|
+
resolved = extend({}, base);
|
|
6414
|
+
resolved.parent = instance.parent && instance.parent.proxy;
|
|
6415
|
+
resolved.propsData = instance.vnode.props;
|
|
6416
|
+
} else resolved = base;
|
|
6417
|
+
} else {
|
|
6206
6418
|
resolved = {};
|
|
6207
6419
|
if (globalMixins.length) globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
|
|
6208
6420
|
mergeOptions(resolved, base, optionMergeStrategies);
|
|
@@ -6275,7 +6487,7 @@ var Vue = (function() {
|
|
|
6275
6487
|
}
|
|
6276
6488
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
6277
6489
|
if (to) {
|
|
6278
|
-
if (isArray(to) && isArray(from)) return [
|
|
6490
|
+
if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
6279
6491
|
return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
|
|
6280
6492
|
} else return from;
|
|
6281
6493
|
}
|
|
@@ -6336,7 +6548,7 @@ var Vue = (function() {
|
|
|
6336
6548
|
if (options.el) return vm.$mount(options.el);
|
|
6337
6549
|
else return vm;
|
|
6338
6550
|
}
|
|
6339
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6551
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.11`;
|
|
6340
6552
|
Vue.config = singletonApp.config;
|
|
6341
6553
|
Vue.use = (plugin, ...options) => {
|
|
6342
6554
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6726,8 +6938,10 @@ var Vue = (function() {
|
|
|
6726
6938
|
} else warn$1(`Cannot unmount an app that is not mounted.`);
|
|
6727
6939
|
},
|
|
6728
6940
|
provide(key, value) {
|
|
6729
|
-
if (key in context.provides)
|
|
6730
|
-
|
|
6941
|
+
if (key in context.provides) {
|
|
6942
|
+
if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
|
|
6943
|
+
else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
|
|
6944
|
+
}
|
|
6731
6945
|
context.provides[key] = value;
|
|
6732
6946
|
return app;
|
|
6733
6947
|
},
|
|
@@ -6809,13 +7023,17 @@ var Vue = (function() {
|
|
|
6809
7023
|
const modifiers = getModelModifiers(props, camelizedName, defaultPropGetter);
|
|
6810
7024
|
const res = customRef((track, trigger) => {
|
|
6811
7025
|
let localValue;
|
|
7026
|
+
let prevPropValue = EMPTY_OBJ;
|
|
6812
7027
|
let prevSetValue = EMPTY_OBJ;
|
|
6813
7028
|
let prevEmittedValue;
|
|
6814
7029
|
watchSyncEffect(() => {
|
|
6815
7030
|
const propValue = props[camelizedName];
|
|
6816
|
-
if (hasChanged(
|
|
6817
|
-
|
|
6818
|
-
|
|
7031
|
+
if (hasChanged(prevPropValue, propValue)) {
|
|
7032
|
+
prevPropValue = propValue;
|
|
7033
|
+
if (hasChanged(localValue, propValue)) {
|
|
7034
|
+
localValue = propValue;
|
|
7035
|
+
trigger();
|
|
7036
|
+
}
|
|
6819
7037
|
}
|
|
6820
7038
|
});
|
|
6821
7039
|
return {
|
|
@@ -6877,12 +7095,14 @@ var Vue = (function() {
|
|
|
6877
7095
|
if (instance.isUnmounted) return;
|
|
6878
7096
|
{
|
|
6879
7097
|
const { emitsOptions, propsOptions } = instance;
|
|
6880
|
-
if (emitsOptions)
|
|
6881
|
-
if (!
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
if (
|
|
7098
|
+
if (emitsOptions) {
|
|
7099
|
+
if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
|
|
7100
|
+
if (!propsOptions || !propsOptions[0] || !(toHandlerKey(camelize(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`);
|
|
7101
|
+
} else {
|
|
7102
|
+
const validator = emitsOptions[event];
|
|
7103
|
+
if (isFunction(validator)) {
|
|
7104
|
+
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
7105
|
+
}
|
|
6886
7106
|
}
|
|
6887
7107
|
}
|
|
6888
7108
|
}
|
|
@@ -6892,7 +7112,7 @@ var Vue = (function() {
|
|
|
6892
7112
|
const modifiers = isCompatModelListener ? props.modelModifiers : isModelListener && getModelModifiers(props, event.slice(7), getter);
|
|
6893
7113
|
if (modifiers) {
|
|
6894
7114
|
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
6895
|
-
if (modifiers.number) args =
|
|
7115
|
+
if (modifiers.number) args = args.map(looseToNumber);
|
|
6896
7116
|
}
|
|
6897
7117
|
devtoolsComponentEmit(instance, event, args);
|
|
6898
7118
|
{
|
|
@@ -7034,8 +7254,9 @@ var Vue = (function() {
|
|
|
7034
7254
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
7035
7255
|
}
|
|
7036
7256
|
if (vnode.transition) {
|
|
7037
|
-
|
|
7038
|
-
|
|
7257
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
7258
|
+
if (!isElementRoot(child)) warn$1("Component inside <Transition> renders non-element root node that cannot be animated.");
|
|
7259
|
+
setTransitionHooks(child, vnode.transition);
|
|
7039
7260
|
}
|
|
7040
7261
|
if (setRoot) setRoot(root);
|
|
7041
7262
|
else result = root;
|
|
@@ -7086,18 +7307,21 @@ var Vue = (function() {
|
|
|
7086
7307
|
for (let i = 0; i < children.length; i++) {
|
|
7087
7308
|
const child = children[i];
|
|
7088
7309
|
if (isVNode(child)) {
|
|
7089
|
-
if (child.type !== Comment || child.children === "v-if")
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7310
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
7311
|
+
if (singleRoot) return;
|
|
7312
|
+
else {
|
|
7313
|
+
singleRoot = child;
|
|
7314
|
+
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
7315
|
+
}
|
|
7093
7316
|
}
|
|
7094
7317
|
} else return;
|
|
7095
7318
|
}
|
|
7096
7319
|
return singleRoot;
|
|
7097
7320
|
}
|
|
7321
|
+
const isFunctionalFallthroughKey = (key) => key === "class" || key === "style" || isOn(key);
|
|
7098
7322
|
const getFunctionalFallthrough = (attrs) => {
|
|
7099
7323
|
let res;
|
|
7100
|
-
for (const key in attrs) if (
|
|
7324
|
+
for (const key in attrs) if (isFunctionalFallthroughKey(key)) (res || (res = {}))[key] = attrs[key];
|
|
7101
7325
|
return res;
|
|
7102
7326
|
};
|
|
7103
7327
|
const filterModelListeners = (attrs, props) => {
|
|
@@ -7233,16 +7457,17 @@ var Vue = (function() {
|
|
|
7233
7457
|
let key = propsToUpdate[i];
|
|
7234
7458
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
7235
7459
|
const value = rawProps[key];
|
|
7236
|
-
if (options)
|
|
7237
|
-
if (
|
|
7238
|
-
attrs[key]
|
|
7239
|
-
|
|
7460
|
+
if (options) {
|
|
7461
|
+
if (hasOwn(attrs, key)) {
|
|
7462
|
+
if (value !== attrs[key]) {
|
|
7463
|
+
attrs[key] = value;
|
|
7464
|
+
hasAttrsChanged = true;
|
|
7465
|
+
}
|
|
7466
|
+
} else {
|
|
7467
|
+
const camelizedKey = camelize(key);
|
|
7468
|
+
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
7240
7469
|
}
|
|
7241
7470
|
} else {
|
|
7242
|
-
const camelizedKey = camelize(key);
|
|
7243
|
-
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
7244
|
-
}
|
|
7245
|
-
else {
|
|
7246
7471
|
if (isOn(key) && key.endsWith("Native")) key = key.slice(0, -6);
|
|
7247
7472
|
else if (shouldSkipAttr(key, instance)) continue;
|
|
7248
7473
|
if (value !== attrs[key]) {
|
|
@@ -7255,9 +7480,11 @@ var Vue = (function() {
|
|
|
7255
7480
|
} else {
|
|
7256
7481
|
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
7257
7482
|
let kebabKey;
|
|
7258
|
-
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
|
7259
|
-
if (
|
|
7260
|
-
|
|
7483
|
+
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
7484
|
+
if (options) {
|
|
7485
|
+
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
|
|
7486
|
+
} else delete props[key];
|
|
7487
|
+
}
|
|
7261
7488
|
if (attrs !== rawCurrentProps) {
|
|
7262
7489
|
for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && !hasOwn(rawProps, key + "Native")) {
|
|
7263
7490
|
delete attrs[key];
|
|
@@ -7278,9 +7505,10 @@ var Vue = (function() {
|
|
|
7278
7505
|
if (key === "inline-template") continue;
|
|
7279
7506
|
const value = rawProps[key];
|
|
7280
7507
|
let camelKey;
|
|
7281
|
-
if (options && hasOwn(options, camelKey = camelize(key)))
|
|
7282
|
-
|
|
7283
|
-
|
|
7508
|
+
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
7509
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
|
|
7510
|
+
else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
7511
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
7284
7512
|
if (isOn(key) && key.endsWith("Native")) key = key.slice(0, -6);
|
|
7285
7513
|
else if (shouldSkipAttr(key, instance)) continue;
|
|
7286
7514
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
@@ -7329,7 +7557,7 @@ var Vue = (function() {
|
|
|
7329
7557
|
const prev = setCurrentInstance(instance);
|
|
7330
7558
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
7331
7559
|
value = factory.call(isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null, props);
|
|
7332
|
-
|
|
7560
|
+
restoreCurrentInstance(prev);
|
|
7333
7561
|
return value;
|
|
7334
7562
|
}
|
|
7335
7563
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -7446,7 +7674,7 @@ var Vue = (function() {
|
|
|
7446
7674
|
}
|
|
7447
7675
|
if (validator && !validator(value, /* @__PURE__ */ shallowReadonly(resolvedProps))) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
|
|
7448
7676
|
}
|
|
7449
|
-
const isSimpleType =
|
|
7677
|
+
const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
7450
7678
|
/**
|
|
7451
7679
|
* dev only
|
|
7452
7680
|
*/
|
|
@@ -7559,12 +7787,13 @@ var Vue = (function() {
|
|
|
7559
7787
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
7560
7788
|
if (vnode.shapeFlag & 32) {
|
|
7561
7789
|
const type = children._;
|
|
7562
|
-
if (type)
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7790
|
+
if (type) {
|
|
7791
|
+
if (isHmrUpdating) {
|
|
7792
|
+
assignSlots(slots, children, optimized);
|
|
7793
|
+
trigger(instance, "set", "$slots");
|
|
7794
|
+
} else if (optimized && type === 1) needDeletionCheck = false;
|
|
7795
|
+
else assignSlots(slots, children, optimized);
|
|
7796
|
+
} else {
|
|
7568
7797
|
needDeletionCheck = !children.$stable;
|
|
7569
7798
|
normalizeObjectSlots(children, slots, instance);
|
|
7570
7799
|
}
|
|
@@ -7582,7 +7811,7 @@ var Vue = (function() {
|
|
|
7582
7811
|
let supported;
|
|
7583
7812
|
let perf;
|
|
7584
7813
|
let cachedNow$1 = 0;
|
|
7585
|
-
const p$1 =
|
|
7814
|
+
const p$1 = /*@__PURE__*/ Promise.resolve();
|
|
7586
7815
|
const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
|
|
7587
7816
|
/**
|
|
7588
7817
|
* @internal
|
|
@@ -7663,6 +7892,10 @@ var Vue = (function() {
|
|
|
7663
7892
|
optimized = false;
|
|
7664
7893
|
n2.dynamicChildren = null;
|
|
7665
7894
|
}
|
|
7895
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
7896
|
+
if (n2.dynamicChildren === EMPTY_ARR) n2.dynamicChildren = [];
|
|
7897
|
+
n2.dynamicChildren.hasOnce = true;
|
|
7898
|
+
}
|
|
7666
7899
|
const { type, ref, shapeFlag } = n2;
|
|
7667
7900
|
switch (type) {
|
|
7668
7901
|
case Text:
|
|
@@ -7679,7 +7912,7 @@ var Vue = (function() {
|
|
|
7679
7912
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7680
7913
|
break;
|
|
7681
7914
|
case VaporSlot:
|
|
7682
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
|
|
7915
|
+
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
7683
7916
|
break;
|
|
7684
7917
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7685
7918
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -7798,7 +8031,10 @@ var Vue = (function() {
|
|
|
7798
8031
|
for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
|
|
7799
8032
|
};
|
|
7800
8033
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
7801
|
-
for (let i = start; i < children.length; i++)
|
|
8034
|
+
for (let i = start; i < children.length; i++) {
|
|
8035
|
+
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
8036
|
+
patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8037
|
+
}
|
|
7802
8038
|
};
|
|
7803
8039
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
7804
8040
|
const el = n2.el = n1.el;
|
|
@@ -7810,6 +8046,7 @@ var Vue = (function() {
|
|
|
7810
8046
|
let vnodeHook;
|
|
7811
8047
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
7812
8048
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8049
|
+
if (n2.ibu) n2.ibu();
|
|
7813
8050
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7814
8051
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
7815
8052
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -7843,8 +8080,9 @@ var Vue = (function() {
|
|
|
7843
8080
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
7844
8081
|
}
|
|
7845
8082
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
7846
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
|
|
8083
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
7847
8084
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8085
|
+
n2.iu && n2.iu();
|
|
7848
8086
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
7849
8087
|
}, void 0, parentSuspense);
|
|
7850
8088
|
};
|
|
@@ -7852,7 +8090,8 @@ var Vue = (function() {
|
|
|
7852
8090
|
for (let i = 0; i < newChildren.length; i++) {
|
|
7853
8091
|
const oldVNode = oldChildren[i];
|
|
7854
8092
|
const newVNode = newChildren[i];
|
|
7855
|
-
|
|
8093
|
+
const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
|
|
8094
|
+
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
7856
8095
|
}
|
|
7857
8096
|
};
|
|
7858
8097
|
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
@@ -7890,41 +8129,15 @@ var Vue = (function() {
|
|
|
7890
8129
|
};
|
|
7891
8130
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
7892
8131
|
n2.slotScopeIds = slotScopeIds;
|
|
7893
|
-
if (n2.type.__vapor)
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
7903
|
-
});
|
|
7904
|
-
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
7905
|
-
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
7906
|
-
if (vnodeMountedHook) {
|
|
7907
|
-
const scopedVNode = n2;
|
|
7908
|
-
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
7909
|
-
}
|
|
7910
|
-
}
|
|
7911
|
-
else {
|
|
7912
|
-
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
7913
|
-
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
7914
|
-
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7915
|
-
}, () => {
|
|
7916
|
-
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
7917
|
-
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
7918
|
-
});
|
|
7919
|
-
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
7920
|
-
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
7921
|
-
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
7922
|
-
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
7923
|
-
}, void 0, parentSuspense);
|
|
7924
|
-
}
|
|
7925
|
-
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
7926
|
-
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
7927
|
-
else updateComponent(n1, n2, optimized);
|
|
8132
|
+
if (n2.type.__vapor) {
|
|
8133
|
+
if (n1 == null) {
|
|
8134
|
+
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
8135
|
+
else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
|
|
8136
|
+
} else getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdateComponent(n1, n2, optimized));
|
|
8137
|
+
} else if (n1 == null) {
|
|
8138
|
+
if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
8139
|
+
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
8140
|
+
} else updateComponent(n1, n2, optimized);
|
|
7928
8141
|
};
|
|
7929
8142
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
7930
8143
|
const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
|
|
@@ -7968,16 +8181,18 @@ var Vue = (function() {
|
|
|
7968
8181
|
};
|
|
7969
8182
|
const updateComponent = (n1, n2, optimized) => {
|
|
7970
8183
|
const instance = n2.component = n1.component;
|
|
7971
|
-
if (shouldUpdateComponent(n1, n2, optimized))
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
8184
|
+
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
8185
|
+
if (instance.asyncDep && !instance.asyncResolved) {
|
|
8186
|
+
pushWarningContext(n2);
|
|
8187
|
+
n2.el = n1.el;
|
|
8188
|
+
updateComponentPreRender(instance, n2, optimized);
|
|
8189
|
+
popWarningContext();
|
|
8190
|
+
return;
|
|
8191
|
+
} else {
|
|
8192
|
+
instance.next = n2;
|
|
8193
|
+
instance.effect.run();
|
|
8194
|
+
}
|
|
7976
8195
|
} else {
|
|
7977
|
-
instance.next = n2;
|
|
7978
|
-
instance.effect.run();
|
|
7979
|
-
}
|
|
7980
|
-
else {
|
|
7981
8196
|
n2.el = n1.el;
|
|
7982
8197
|
instance.vnode = n2;
|
|
7983
8198
|
}
|
|
@@ -8080,6 +8295,7 @@ var Vue = (function() {
|
|
|
8080
8295
|
} else next = vnode;
|
|
8081
8296
|
if (bu) invokeArrayFns(bu);
|
|
8082
8297
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8298
|
+
if (next.ibu) next.ibu();
|
|
8083
8299
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
|
|
8084
8300
|
toggleRecurse(instance, true);
|
|
8085
8301
|
startMeasure(instance, `render`);
|
|
@@ -8093,7 +8309,10 @@ var Vue = (function() {
|
|
|
8093
8309
|
next.el = nextTree.el;
|
|
8094
8310
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
8095
8311
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
8096
|
-
if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() =>
|
|
8312
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
8313
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8314
|
+
next.iu && next.iu();
|
|
8315
|
+
}, void 0, parentSuspense);
|
|
8097
8316
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
|
|
8098
8317
|
devtoolsComponentUpdated(instance);
|
|
8099
8318
|
popWarningContext();
|
|
@@ -8134,9 +8353,10 @@ var Vue = (function() {
|
|
|
8134
8353
|
if (shapeFlag & 8) {
|
|
8135
8354
|
if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
|
|
8136
8355
|
if (c2 !== c1) hostSetElementText(container, c2);
|
|
8137
|
-
} else if (prevShapeFlag & 16)
|
|
8138
|
-
|
|
8139
|
-
|
|
8356
|
+
} else if (prevShapeFlag & 16) {
|
|
8357
|
+
if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8358
|
+
else unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
8359
|
+
} else {
|
|
8140
8360
|
if (prevShapeFlag & 8) hostSetElementText(container, "");
|
|
8141
8361
|
if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8142
8362
|
}
|
|
@@ -8235,15 +8455,17 @@ var Vue = (function() {
|
|
|
8235
8455
|
const anchorVNode = c2[nextIndex + 1];
|
|
8236
8456
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
8237
8457
|
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8238
|
-
else if (moved)
|
|
8239
|
-
|
|
8458
|
+
else if (moved) {
|
|
8459
|
+
if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
|
|
8460
|
+
else j--;
|
|
8461
|
+
}
|
|
8240
8462
|
}
|
|
8241
8463
|
}
|
|
8242
8464
|
};
|
|
8243
8465
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8244
8466
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8245
8467
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8246
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
8468
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8247
8469
|
return;
|
|
8248
8470
|
}
|
|
8249
8471
|
if (shapeFlag & 6) {
|
|
@@ -8268,54 +8490,37 @@ var Vue = (function() {
|
|
|
8268
8490
|
moveStaticNode(vnode, container, anchor);
|
|
8269
8491
|
return;
|
|
8270
8492
|
}
|
|
8271
|
-
if (moveType !== 2 && shapeFlag & 1 && transition)
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
const remove = () => {
|
|
8493
|
+
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
8494
|
+
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
8495
|
+
else performTransitionLeave(el, transition, () => {
|
|
8275
8496
|
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
8276
8497
|
else hostInsert(el, container, anchor);
|
|
8277
|
-
};
|
|
8278
|
-
|
|
8279
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8280
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
8281
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
8282
|
-
else leave(el, () => {
|
|
8283
|
-
remove();
|
|
8284
|
-
afterLeave && afterLeave();
|
|
8285
|
-
});
|
|
8286
|
-
};
|
|
8287
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
8288
|
-
else performLeave();
|
|
8289
|
-
}
|
|
8290
|
-
else hostInsert(el, container, anchor);
|
|
8498
|
+
}, true, true);
|
|
8499
|
+
} else hostInsert(el, container, anchor);
|
|
8291
8500
|
};
|
|
8292
8501
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
8293
8502
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
8294
|
-
if (patchFlag === -2) optimized = false;
|
|
8503
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) optimized = false;
|
|
8295
8504
|
if (ref != null) {
|
|
8296
8505
|
const prevSub = setActiveSub();
|
|
8297
8506
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
8298
8507
|
setActiveSub(prevSub);
|
|
8299
8508
|
}
|
|
8300
|
-
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8509
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8301
8510
|
if (shapeFlag & 256) {
|
|
8302
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
8511
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8303
8512
|
else parentComponent.ctx.deactivate(vnode);
|
|
8304
8513
|
return;
|
|
8305
8514
|
}
|
|
8515
|
+
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
8516
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8517
|
+
return;
|
|
8518
|
+
}
|
|
8306
8519
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
8307
8520
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
8308
8521
|
let vnodeHook;
|
|
8309
8522
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8310
|
-
if (shapeFlag & 6)
|
|
8311
|
-
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8312
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8313
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8314
|
-
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8315
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8316
|
-
}, void 0, parentSuspense);
|
|
8317
|
-
return;
|
|
8318
|
-
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
8523
|
+
if (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
8319
8524
|
else {
|
|
8320
8525
|
if (shapeFlag & 128) {
|
|
8321
8526
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
@@ -8326,7 +8531,7 @@ var Vue = (function() {
|
|
|
8326
8531
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8327
8532
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8328
8533
|
if (type === VaporSlot) {
|
|
8329
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8534
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8330
8535
|
return;
|
|
8331
8536
|
}
|
|
8332
8537
|
if (doRemove) remove(vnode);
|
|
@@ -8350,6 +8555,7 @@ var Vue = (function() {
|
|
|
8350
8555
|
}
|
|
8351
8556
|
if (type === Static) {
|
|
8352
8557
|
removeStaticNode(vnode);
|
|
8558
|
+
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8353
8559
|
return;
|
|
8354
8560
|
}
|
|
8355
8561
|
if (transition) performTransitionLeave(el, transition, () => hostRemove(el), !!(vnode.shapeFlag & 1));
|
|
@@ -8375,7 +8581,10 @@ var Vue = (function() {
|
|
|
8375
8581
|
if (effect) {
|
|
8376
8582
|
effect.stop();
|
|
8377
8583
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8378
|
-
} else if (
|
|
8584
|
+
} else if (instance.vnode.el && subTree) {
|
|
8585
|
+
subTree.transition = instance.vnode.transition;
|
|
8586
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8587
|
+
}
|
|
8379
8588
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
8380
8589
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
|
|
8381
8590
|
queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
|
|
@@ -8450,12 +8659,14 @@ var Vue = (function() {
|
|
|
8450
8659
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8451
8660
|
}
|
|
8452
8661
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
8453
|
-
if (!vapor)
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8662
|
+
if (!vapor) {
|
|
8663
|
+
if (allowed) {
|
|
8664
|
+
effect.flags |= 128;
|
|
8665
|
+
job.flags |= 2;
|
|
8666
|
+
} else {
|
|
8667
|
+
effect.flags &= -129;
|
|
8668
|
+
job.flags &= -3;
|
|
8669
|
+
}
|
|
8459
8670
|
}
|
|
8460
8671
|
}
|
|
8461
8672
|
function needTransition(parentSuspense, transition) {
|
|
@@ -8495,8 +8706,10 @@ var Vue = (function() {
|
|
|
8495
8706
|
}
|
|
8496
8707
|
function locateNonHydratedAsyncRoot(instance) {
|
|
8497
8708
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
8498
|
-
if (subComponent)
|
|
8499
|
-
|
|
8709
|
+
if (subComponent) {
|
|
8710
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
8711
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
8712
|
+
}
|
|
8500
8713
|
}
|
|
8501
8714
|
function invalidateMount(hooks) {
|
|
8502
8715
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
@@ -8515,13 +8728,15 @@ var Vue = (function() {
|
|
|
8515
8728
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
8516
8729
|
const performRemove = () => {
|
|
8517
8730
|
remove();
|
|
8518
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8731
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
8519
8732
|
};
|
|
8520
8733
|
if (force || isElement && transition && !transition.persisted) {
|
|
8521
8734
|
const { leave, delayLeave } = transition;
|
|
8522
8735
|
const performLeave = () => {
|
|
8736
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8523
8737
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
8524
|
-
|
|
8738
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
8739
|
+
else leave(el, performRemove);
|
|
8525
8740
|
};
|
|
8526
8741
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
8527
8742
|
else performLeave();
|
|
@@ -8540,7 +8755,7 @@ var Vue = (function() {
|
|
|
8540
8755
|
/**
|
|
8541
8756
|
* shared between vdom and vapor
|
|
8542
8757
|
*/
|
|
8543
|
-
function getInheritedScopeIds(vnode, parentComponent) {
|
|
8758
|
+
function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
|
|
8544
8759
|
const inheritedScopeIds = [];
|
|
8545
8760
|
let currentParent = parentComponent;
|
|
8546
8761
|
let currentVNode = vnode;
|
|
@@ -8556,6 +8771,8 @@ var Vue = (function() {
|
|
|
8556
8771
|
currentParent = currentParent.parent;
|
|
8557
8772
|
} else break;
|
|
8558
8773
|
}
|
|
8774
|
+
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
8775
|
+
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
8559
8776
|
return inheritedScopeIds;
|
|
8560
8777
|
}
|
|
8561
8778
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
@@ -8574,7 +8791,7 @@ var Vue = (function() {
|
|
|
8574
8791
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
8575
8792
|
if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
|
|
8576
8793
|
else {
|
|
8577
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
8794
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
8578
8795
|
n2.suspense = n1.suspense;
|
|
8579
8796
|
n2.suspense.vnode = n2;
|
|
8580
8797
|
n2.el = n1.el;
|
|
@@ -8612,10 +8829,12 @@ var Vue = (function() {
|
|
|
8612
8829
|
if (pendingBranch) {
|
|
8613
8830
|
suspense.pendingBranch = newBranch;
|
|
8614
8831
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
8615
|
-
|
|
8832
|
+
suspense.deps++;
|
|
8833
|
+
patch(pendingBranch, newBranch, isHydrating ? container : suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
8834
|
+
suspense.deps--;
|
|
8616
8835
|
if (suspense.deps <= 0) suspense.resolve();
|
|
8617
8836
|
else if (isInFallback) {
|
|
8618
|
-
if (!isHydrating) {
|
|
8837
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
8619
8838
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
8620
8839
|
setActiveBranch(suspense, newFallback);
|
|
8621
8840
|
}
|
|
@@ -8627,12 +8846,16 @@ var Vue = (function() {
|
|
|
8627
8846
|
suspense.activeBranch = pendingBranch;
|
|
8628
8847
|
} else unmount(pendingBranch, parentComponent, suspense);
|
|
8629
8848
|
suspense.deps = 0;
|
|
8849
|
+
for (let i = 0; i < suspense.effects.length; i++) {
|
|
8850
|
+
const effect = suspense.effects[i];
|
|
8851
|
+
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
8852
|
+
}
|
|
8630
8853
|
suspense.effects.length = 0;
|
|
8631
8854
|
suspense.hiddenContainer = createElement("div");
|
|
8632
8855
|
if (isInFallback) {
|
|
8633
8856
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
8634
8857
|
if (suspense.deps <= 0) suspense.resolve();
|
|
8635
|
-
else {
|
|
8858
|
+
else if (!suspense.isFallbackMountPending) {
|
|
8636
8859
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
8637
8860
|
setActiveBranch(suspense, newFallback);
|
|
8638
8861
|
}
|
|
@@ -8734,7 +8957,7 @@ var Vue = (function() {
|
|
|
8734
8957
|
let hasUnresolvedAncestor = false;
|
|
8735
8958
|
while (parent) {
|
|
8736
8959
|
if (parent.pendingBranch) {
|
|
8737
|
-
parent.effects.push(
|
|
8960
|
+
for (let i = 0; i < effects.length; i++) parent.effects.push(effects[i]);
|
|
8738
8961
|
hasUnresolvedAncestor = true;
|
|
8739
8962
|
break;
|
|
8740
8963
|
}
|
|
@@ -8744,6 +8967,7 @@ var Vue = (function() {
|
|
|
8744
8967
|
suspense.effects = [];
|
|
8745
8968
|
if (isSuspensible) {
|
|
8746
8969
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
8970
|
+
parentSuspenseId = void 0;
|
|
8747
8971
|
parentSuspense.deps--;
|
|
8748
8972
|
if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
|
|
8749
8973
|
}
|
|
@@ -8758,8 +8982,9 @@ var Vue = (function() {
|
|
|
8758
8982
|
const mountFallback = () => {
|
|
8759
8983
|
suspense.isFallbackMountPending = false;
|
|
8760
8984
|
if (!suspense.isInFallback) return;
|
|
8761
|
-
|
|
8762
|
-
|
|
8985
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
8986
|
+
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
8987
|
+
setActiveBranch(suspense, latestFallback);
|
|
8763
8988
|
};
|
|
8764
8989
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
8765
8990
|
if (delayEnter) {
|
|
@@ -8780,11 +9005,16 @@ var Vue = (function() {
|
|
|
8780
9005
|
registerDep(instance, onResolve) {
|
|
8781
9006
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
8782
9007
|
if (isInPendingSuspense) suspense.deps++;
|
|
9008
|
+
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
8783
9009
|
instance.asyncDep.catch((err) => {
|
|
8784
9010
|
handleError(err, instance, 0);
|
|
8785
9011
|
}).then((asyncSetupResult) => {
|
|
8786
9012
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
8787
9013
|
setCurrentInstance(null, void 0);
|
|
9014
|
+
if (hydratedEl && !instance.scope.active) {
|
|
9015
|
+
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
9016
|
+
return;
|
|
9017
|
+
}
|
|
8788
9018
|
instance.asyncResolved = true;
|
|
8789
9019
|
onResolve(asyncSetupResult);
|
|
8790
9020
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -8835,9 +9065,10 @@ var Vue = (function() {
|
|
|
8835
9065
|
return s;
|
|
8836
9066
|
}
|
|
8837
9067
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
8838
|
-
if (suspense && suspense.pendingBranch)
|
|
8839
|
-
|
|
8840
|
-
|
|
9068
|
+
if (suspense && suspense.pendingBranch) {
|
|
9069
|
+
if (isArray(fn)) suspense.effects.push(...fn);
|
|
9070
|
+
else suspense.effects.push(fn);
|
|
9071
|
+
} else queuePostFlushCb(fn, id);
|
|
8841
9072
|
}
|
|
8842
9073
|
function setActiveBranch(suspense, branch) {
|
|
8843
9074
|
suspense.activeBranch = branch;
|
|
@@ -9044,11 +9275,26 @@ var Vue = (function() {
|
|
|
9044
9275
|
if (shapeFlag & 128) type.normalize(vnode);
|
|
9045
9276
|
} else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
9046
9277
|
if (vnode.key !== vnode.key) warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
9278
|
+
if (props && vnode.shapeFlag & 1) {
|
|
9279
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
9280
|
+
if (overwritingProp && hasContentChildren(vnode.children)) warn$1(`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`);
|
|
9281
|
+
}
|
|
9047
9282
|
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
|
|
9048
9283
|
convertLegacyVModelProps(vnode);
|
|
9049
9284
|
defineLegacyVNodeProperties(vnode);
|
|
9050
9285
|
return vnode;
|
|
9051
9286
|
}
|
|
9287
|
+
/**
|
|
9288
|
+
* dev only
|
|
9289
|
+
* Whether children would actually render something. Empty text and empty
|
|
9290
|
+
* arrays are ignored, mirroring the compiler's `node.children.length` check
|
|
9291
|
+
* for `v-html` / `v-text`.
|
|
9292
|
+
*/
|
|
9293
|
+
function hasContentChildren(children) {
|
|
9294
|
+
if (isString(children)) return children !== "";
|
|
9295
|
+
if (isArray(children)) return children.length > 0;
|
|
9296
|
+
return false;
|
|
9297
|
+
}
|
|
9052
9298
|
const createVNode = createVNodeWithArgsTransform;
|
|
9053
9299
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
9054
9300
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -9058,8 +9304,10 @@ var Vue = (function() {
|
|
|
9058
9304
|
if (isVNode(type)) {
|
|
9059
9305
|
const cloned = cloneVNode(type, props, true);
|
|
9060
9306
|
if (children) normalizeChildren(cloned, children);
|
|
9061
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock)
|
|
9062
|
-
|
|
9307
|
+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
9308
|
+
if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
9309
|
+
else currentBlock.push(cloned);
|
|
9310
|
+
}
|
|
9063
9311
|
cloned.patchFlag = -2;
|
|
9064
9312
|
return cloned;
|
|
9065
9313
|
}
|
|
@@ -9120,7 +9368,10 @@ var Vue = (function() {
|
|
|
9120
9368
|
ce: vnode.ce,
|
|
9121
9369
|
vi: vnode.vi,
|
|
9122
9370
|
vs: cloneVaporSlotMeta(vnode),
|
|
9123
|
-
vb: vnode.vb
|
|
9371
|
+
vb: vnode.vb,
|
|
9372
|
+
ibu: vnode.ibu,
|
|
9373
|
+
iu: vnode.iu,
|
|
9374
|
+
cacheIndex: vnode.cacheIndex
|
|
9124
9375
|
};
|
|
9125
9376
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
9126
9377
|
defineLegacyVNodeProperties(cloned);
|
|
@@ -9131,8 +9382,7 @@ var Vue = (function() {
|
|
|
9131
9382
|
if (!vaporSlot) return vaporSlot;
|
|
9132
9383
|
const cloned = {
|
|
9133
9384
|
slot: vaporSlot.slot,
|
|
9134
|
-
|
|
9135
|
-
outletFallback: vaporSlot.outletFallback
|
|
9385
|
+
outlets: vaporSlot.outlets
|
|
9136
9386
|
};
|
|
9137
9387
|
if (vnode.el) {
|
|
9138
9388
|
cloned.state = vaporSlot.state;
|
|
@@ -9184,25 +9434,28 @@ var Vue = (function() {
|
|
|
9184
9434
|
const { shapeFlag } = vnode;
|
|
9185
9435
|
if (children == null) children = null;
|
|
9186
9436
|
else if (isArray(children)) type = 16;
|
|
9187
|
-
else if (typeof children === "object")
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9437
|
+
else if (typeof children === "object") {
|
|
9438
|
+
if (shapeFlag & 65) {
|
|
9439
|
+
const slot = children.default;
|
|
9440
|
+
if (slot) {
|
|
9441
|
+
slot._c && (slot._d = false);
|
|
9442
|
+
normalizeChildren(vnode, slot());
|
|
9443
|
+
slot._c && (slot._d = true);
|
|
9444
|
+
}
|
|
9445
|
+
return;
|
|
9446
|
+
} else {
|
|
9447
|
+
type = 32;
|
|
9448
|
+
const slotFlag = children._;
|
|
9449
|
+
if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
|
|
9450
|
+
else if (slotFlag === 3 && currentRenderingInstance) {
|
|
9451
|
+
if (currentRenderingInstance.slots._ === 1) children._ = 1;
|
|
9452
|
+
else {
|
|
9453
|
+
children._ = 2;
|
|
9454
|
+
vnode.patchFlag |= 1024;
|
|
9455
|
+
}
|
|
9456
|
+
}
|
|
9203
9457
|
}
|
|
9204
|
-
}
|
|
9205
|
-
else if (isFunction(children)) {
|
|
9458
|
+
} else if (isFunction(children)) {
|
|
9206
9459
|
if (shapeFlag & 65) {
|
|
9207
9460
|
normalizeChildren(vnode, { default: children });
|
|
9208
9461
|
return;
|
|
@@ -9270,6 +9523,16 @@ var Vue = (function() {
|
|
|
9270
9523
|
simpleSetCurrentInstance(instance);
|
|
9271
9524
|
}
|
|
9272
9525
|
};
|
|
9526
|
+
/**
|
|
9527
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
9528
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
9529
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
9530
|
+
* @internal
|
|
9531
|
+
*/
|
|
9532
|
+
const restoreCurrentInstance = (prev) => {
|
|
9533
|
+
setCurrentScope(prev[1]);
|
|
9534
|
+
simpleSetCurrentInstance(prev[0]);
|
|
9535
|
+
};
|
|
9273
9536
|
const internalOptions = [
|
|
9274
9537
|
"ce",
|
|
9275
9538
|
"type",
|
|
@@ -9301,7 +9564,7 @@ var Vue = (function() {
|
|
|
9301
9564
|
};
|
|
9302
9565
|
//#endregion
|
|
9303
9566
|
//#region packages/runtime-core/src/component.ts
|
|
9304
|
-
const emptyAppContext =
|
|
9567
|
+
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
9305
9568
|
let uid = 0;
|
|
9306
9569
|
function createComponentInstance(vnode, parent, suspense) {
|
|
9307
9570
|
const type = vnode.type;
|
|
@@ -9421,7 +9684,7 @@ var Vue = (function() {
|
|
|
9421
9684
|
const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
|
|
9422
9685
|
const isAsyncSetup = isPromise(setupResult);
|
|
9423
9686
|
setActiveSub(prevSub);
|
|
9424
|
-
|
|
9687
|
+
restoreCurrentInstance(prev);
|
|
9425
9688
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
9426
9689
|
if (isAsyncSetup) {
|
|
9427
9690
|
const unsetCurrentInstance = () => {
|
|
@@ -9429,7 +9692,12 @@ var Vue = (function() {
|
|
|
9429
9692
|
};
|
|
9430
9693
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
9431
9694
|
if (isSSR) return setupResult.then((resolvedResult) => {
|
|
9432
|
-
|
|
9695
|
+
setInSSRSetupState(true);
|
|
9696
|
+
try {
|
|
9697
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
9698
|
+
} finally {
|
|
9699
|
+
setInSSRSetupState(false);
|
|
9700
|
+
}
|
|
9433
9701
|
}).catch((e) => {
|
|
9434
9702
|
handleError(e, instance, 0);
|
|
9435
9703
|
});
|
|
@@ -9494,13 +9762,15 @@ var Vue = (function() {
|
|
|
9494
9762
|
applyOptions(instance);
|
|
9495
9763
|
} finally {
|
|
9496
9764
|
setActiveSub(prevSub);
|
|
9497
|
-
|
|
9765
|
+
restoreCurrentInstance(prevInstance);
|
|
9498
9766
|
}
|
|
9499
9767
|
}
|
|
9500
|
-
if (!Component.render && instance.render === NOOP && !isSSR)
|
|
9768
|
+
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
9769
|
+
if (!compile$1 && Component.template)
|
|
9501
9770
|
/* v8 ignore start */
|
|
9502
|
-
|
|
9503
|
-
|
|
9771
|
+
warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.global.js\" instead.");
|
|
9772
|
+
else warn$1(`Component is missing template or render function: `, Component);
|
|
9773
|
+
}
|
|
9504
9774
|
}
|
|
9505
9775
|
const attrsProxyHandlers = {
|
|
9506
9776
|
get(target, key) {
|
|
@@ -9563,14 +9833,13 @@ var Vue = (function() {
|
|
|
9563
9833
|
if (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
|
|
9564
9834
|
get(target, key) {
|
|
9565
9835
|
if (key in target) return target[key];
|
|
9566
|
-
else {
|
|
9836
|
+
else if (!instance.vapor) {
|
|
9567
9837
|
const publicPropertiesMap = getPublicPropertiesMap();
|
|
9568
9838
|
if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);
|
|
9569
9839
|
}
|
|
9570
9840
|
},
|
|
9571
9841
|
has(target, key) {
|
|
9572
|
-
|
|
9573
|
-
return key in target || key in publicPropertiesMap;
|
|
9842
|
+
return key in target || !instance.vapor && key in getPublicPropertiesMap();
|
|
9574
9843
|
}
|
|
9575
9844
|
}));
|
|
9576
9845
|
else return instance.proxy;
|
|
@@ -9608,11 +9877,12 @@ var Vue = (function() {
|
|
|
9608
9877
|
try {
|
|
9609
9878
|
setBlockTracking(-1);
|
|
9610
9879
|
const l = arguments.length;
|
|
9611
|
-
if (l === 2)
|
|
9612
|
-
if (
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9880
|
+
if (l === 2) {
|
|
9881
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
9882
|
+
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
9883
|
+
return createVNode(type, propsOrChildren);
|
|
9884
|
+
} else return createVNode(type, null, propsOrChildren);
|
|
9885
|
+
} else {
|
|
9616
9886
|
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
9617
9887
|
else if (l === 3 && isVNode(children)) children = [children];
|
|
9618
9888
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -9804,7 +10074,7 @@ var Vue = (function() {
|
|
|
9804
10074
|
}
|
|
9805
10075
|
//#endregion
|
|
9806
10076
|
//#region packages/runtime-core/src/index.ts
|
|
9807
|
-
const version = "3.6.0-rc.
|
|
10077
|
+
const version = "3.6.0-rc.11";
|
|
9808
10078
|
const warn = warn$1;
|
|
9809
10079
|
/**
|
|
9810
10080
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9833,7 +10103,7 @@ var Vue = (function() {
|
|
|
9833
10103
|
let policy = void 0;
|
|
9834
10104
|
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
9835
10105
|
if (tt) try {
|
|
9836
|
-
policy =
|
|
10106
|
+
policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
|
|
9837
10107
|
} catch (e) {
|
|
9838
10108
|
warn(`Error creating trusted types policy: ${e}`);
|
|
9839
10109
|
}
|
|
@@ -9841,7 +10111,7 @@ var Vue = (function() {
|
|
|
9841
10111
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
9842
10112
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
9843
10113
|
const doc = typeof document !== "undefined" ? document : null;
|
|
9844
|
-
const templateContainer = doc &&
|
|
10114
|
+
const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
|
|
9845
10115
|
const nodeOps = {
|
|
9846
10116
|
insert: (child, parent, anchor) => {
|
|
9847
10117
|
parent.insertBefore(child, anchor || null);
|
|
@@ -9915,7 +10185,7 @@ var Vue = (function() {
|
|
|
9915
10185
|
leaveActiveClass: String,
|
|
9916
10186
|
leaveToClass: String
|
|
9917
10187
|
};
|
|
9918
|
-
const TransitionPropsValidators =
|
|
10188
|
+
const TransitionPropsValidators = /*@__PURE__*/ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
|
|
9919
10189
|
/**
|
|
9920
10190
|
* Wrap logic that attaches extra properties to Transition in a function
|
|
9921
10191
|
* so that it can be annotated as pure
|
|
@@ -9930,7 +10200,7 @@ var Vue = (function() {
|
|
|
9930
10200
|
* DOM Transition is a higher-order-component based on the platform-agnostic
|
|
9931
10201
|
* base Transition component, with DOM-specific logic.
|
|
9932
10202
|
*/
|
|
9933
|
-
const Transition =
|
|
10203
|
+
const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
|
|
9934
10204
|
/**
|
|
9935
10205
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
9936
10206
|
* with custom HOCs.
|
|
@@ -10170,14 +10440,15 @@ var Vue = (function() {
|
|
|
10170
10440
|
},
|
|
10171
10441
|
updated(el, { value, oldValue }, { transition }) {
|
|
10172
10442
|
if (!value === !oldValue) return;
|
|
10173
|
-
if (transition)
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10443
|
+
if (transition) {
|
|
10444
|
+
if (value) {
|
|
10445
|
+
transition.beforeEnter(el);
|
|
10446
|
+
setDisplay(el, true);
|
|
10447
|
+
transition.enter(el);
|
|
10448
|
+
} else transition.leave(el, () => {
|
|
10449
|
+
setDisplay(el, false);
|
|
10450
|
+
});
|
|
10451
|
+
} else setDisplay(el, value);
|
|
10181
10452
|
},
|
|
10182
10453
|
beforeUnmount(el, { value }) {
|
|
10183
10454
|
setDisplay(el, value);
|
|
@@ -10196,49 +10467,20 @@ var Vue = (function() {
|
|
|
10196
10467
|
*/
|
|
10197
10468
|
function useCssVars(getter) {
|
|
10198
10469
|
const instance = getCurrentInstance();
|
|
10199
|
-
const getVars = () => getter(instance.proxy);
|
|
10200
|
-
const setVars = (vars) => {
|
|
10201
|
-
if (instance.ce) setVarsOnNode(instance.ce, vars);
|
|
10202
|
-
else setVarsOnVNode(instance.subTree, vars);
|
|
10203
|
-
};
|
|
10204
|
-
baseUseCssVars(instance, () => instance.subTree.el.parentNode, getVars, setVars);
|
|
10205
|
-
}
|
|
10206
|
-
function setVarsOnVNode(vnode, vars) {
|
|
10207
|
-
if (vnode.shapeFlag & 128) {
|
|
10208
|
-
const suspense = vnode.suspense;
|
|
10209
|
-
vnode = suspense.activeBranch;
|
|
10210
|
-
if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
|
|
10211
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
10212
|
-
});
|
|
10213
|
-
}
|
|
10214
|
-
while (vnode.component) vnode = vnode.component.subTree;
|
|
10215
|
-
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
10216
|
-
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10217
|
-
else if (vnode.type === Static) {
|
|
10218
|
-
let { el, anchor } = vnode;
|
|
10219
|
-
while (el) {
|
|
10220
|
-
setVarsOnNode(el, vars);
|
|
10221
|
-
if (el === anchor) break;
|
|
10222
|
-
el = el.nextSibling;
|
|
10223
|
-
}
|
|
10224
|
-
}
|
|
10225
|
-
}
|
|
10226
|
-
/**
|
|
10227
|
-
* @internal
|
|
10228
|
-
* shared between vdom and vapor
|
|
10229
|
-
*/
|
|
10230
|
-
function baseUseCssVars(instance, getParentNode, getVars, setVars) {
|
|
10231
10470
|
/* v8 ignore start */
|
|
10232
10471
|
if (!instance) {
|
|
10233
10472
|
warn(`useCssVars is called without current active component instance.`);
|
|
10234
10473
|
return;
|
|
10235
10474
|
}
|
|
10475
|
+
/* v8 ignore stop */
|
|
10476
|
+
const getVars = () => getter(instance.proxy);
|
|
10236
10477
|
instance.getCssVars = getVars;
|
|
10237
10478
|
const updateTeleports = instance.ut = (vars = getVars()) => {
|
|
10238
10479
|
Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach((node) => setVarsOnNode(node, vars));
|
|
10239
10480
|
};
|
|
10240
10481
|
const applyCssVars = (vars = getVars()) => {
|
|
10241
|
-
|
|
10482
|
+
if (instance.ce) setVarsOnNode(instance.ce, vars);
|
|
10483
|
+
else setVarsOnVNode(instance.subTree, vars);
|
|
10242
10484
|
updateTeleports(vars);
|
|
10243
10485
|
};
|
|
10244
10486
|
onBeforeUpdate(() => {
|
|
@@ -10251,10 +10493,38 @@ var Vue = (function() {
|
|
|
10251
10493
|
applyCssVars(vars);
|
|
10252
10494
|
}, NOOP, { flush: "post" });
|
|
10253
10495
|
const ob = new MutationObserver(() => applyCssVars());
|
|
10254
|
-
ob.observe(
|
|
10496
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
10255
10497
|
onUnmounted(() => ob.disconnect());
|
|
10256
10498
|
});
|
|
10257
10499
|
}
|
|
10500
|
+
function setVarsOnVNode(vnode, vars) {
|
|
10501
|
+
if (vnode.shapeFlag & 128) {
|
|
10502
|
+
const suspense = vnode.suspense;
|
|
10503
|
+
vnode = suspense.activeBranch;
|
|
10504
|
+
if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
|
|
10505
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
10506
|
+
});
|
|
10507
|
+
}
|
|
10508
|
+
while (vnode.component) {
|
|
10509
|
+
const component = vnode.component;
|
|
10510
|
+
if (component.vapor) {
|
|
10511
|
+
component.appContext.vapor.applyCssVars(vnode, vars);
|
|
10512
|
+
return;
|
|
10513
|
+
}
|
|
10514
|
+
vnode = vnode.component.subTree;
|
|
10515
|
+
}
|
|
10516
|
+
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
10517
|
+
else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
10518
|
+
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10519
|
+
else if (vnode.type === Static) {
|
|
10520
|
+
let { el, anchor } = vnode;
|
|
10521
|
+
while (el) {
|
|
10522
|
+
setVarsOnNode(el, vars);
|
|
10523
|
+
if (el === anchor) break;
|
|
10524
|
+
el = el.nextSibling;
|
|
10525
|
+
}
|
|
10526
|
+
}
|
|
10527
|
+
}
|
|
10258
10528
|
/**
|
|
10259
10529
|
* @internal
|
|
10260
10530
|
* shared between vdom and vapor
|
|
@@ -10279,11 +10549,13 @@ var Vue = (function() {
|
|
|
10279
10549
|
const isCssString = isString(next);
|
|
10280
10550
|
let hasControlledDisplay = false;
|
|
10281
10551
|
if (next && !isCssString) {
|
|
10282
|
-
if (prev)
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10552
|
+
if (prev) {
|
|
10553
|
+
if (!isString(prev)) {
|
|
10554
|
+
for (const key in prev) if (next[key] == null) setStyle(style, key, "");
|
|
10555
|
+
} else for (const prevStyle of prev.split(";")) {
|
|
10556
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
10557
|
+
if (next[key] == null) setStyle(style, key, "");
|
|
10558
|
+
}
|
|
10287
10559
|
}
|
|
10288
10560
|
for (const key in next) {
|
|
10289
10561
|
if (key === "display") hasControlledDisplay = true;
|
|
@@ -10299,7 +10571,11 @@ var Vue = (function() {
|
|
|
10299
10571
|
style.cssText = next;
|
|
10300
10572
|
hasControlledDisplay = displayRE.test(next);
|
|
10301
10573
|
}
|
|
10302
|
-
} else if (prev)
|
|
10574
|
+
} else if (prev) {
|
|
10575
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
10576
|
+
if (cssVarText) style.cssText = cssVarText;
|
|
10577
|
+
else el.removeAttribute("style");
|
|
10578
|
+
}
|
|
10303
10579
|
if (vShowOriginalDisplay in el) {
|
|
10304
10580
|
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10305
10581
|
if (el[vShowHidden]) style.display = "none";
|
|
@@ -10312,8 +10588,10 @@ var Vue = (function() {
|
|
|
10312
10588
|
else {
|
|
10313
10589
|
const val = rawVal == null ? "" : String(rawVal);
|
|
10314
10590
|
if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
10315
|
-
if (name.startsWith("--"))
|
|
10316
|
-
|
|
10591
|
+
if (name.startsWith("--")) {
|
|
10592
|
+
if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
|
|
10593
|
+
else style.setProperty(name, val);
|
|
10594
|
+
} else {
|
|
10317
10595
|
const prefixed = autoPrefix(style, name);
|
|
10318
10596
|
if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
|
|
10319
10597
|
else style[prefixed] = val;
|
|
@@ -10350,15 +10628,16 @@ var Vue = (function() {
|
|
|
10350
10628
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
10351
10629
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
10352
10630
|
function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
|
|
10353
|
-
if (isSVG && key.startsWith("xlink:"))
|
|
10354
|
-
|
|
10355
|
-
|
|
10631
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
10632
|
+
if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
10633
|
+
else el.setAttributeNS(xlinkNS, key, value);
|
|
10634
|
+
} else {
|
|
10356
10635
|
if (compatCoerceAttr(el, key, value, instance)) return;
|
|
10357
10636
|
if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
|
|
10358
10637
|
else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
|
|
10359
10638
|
}
|
|
10360
10639
|
}
|
|
10361
|
-
const isEnumeratedAttr =
|
|
10640
|
+
const isEnumeratedAttr = /*@__PURE__*/ makeMap("contenteditable,draggable,spellcheck");
|
|
10362
10641
|
function compatCoerceAttr(el, key, value, instance = null) {
|
|
10363
10642
|
if (isEnumeratedAttr(key)) {
|
|
10364
10643
|
const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
|
|
@@ -10450,7 +10729,7 @@ var Vue = (function() {
|
|
|
10450
10729
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
10451
10730
|
}
|
|
10452
10731
|
let cachedNow = 0;
|
|
10453
|
-
const p =
|
|
10732
|
+
const p = /*@__PURE__*/ Promise.resolve();
|
|
10454
10733
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
10455
10734
|
function createInvoker(initialValue, instance) {
|
|
10456
10735
|
const invoker = (e) => {
|
|
@@ -10518,7 +10797,7 @@ var Vue = (function() {
|
|
|
10518
10797
|
//#endregion
|
|
10519
10798
|
//#region packages/runtime-dom/src/apiCustomElement.ts
|
|
10520
10799
|
const REMOVAL = {};
|
|
10521
|
-
|
|
10800
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
10522
10801
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
10523
10802
|
let Comp = /* @__PURE__ */ defineComponent(options, extraOptions);
|
|
10524
10803
|
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
@@ -10567,12 +10846,14 @@ var Vue = (function() {
|
|
|
10567
10846
|
this._parent = parent;
|
|
10568
10847
|
break;
|
|
10569
10848
|
}
|
|
10570
|
-
if (!this._instance)
|
|
10571
|
-
|
|
10572
|
-
this._pendingResolve =
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10849
|
+
if (!this._instance) {
|
|
10850
|
+
if (this._resolved) this._mountComponent(this._def);
|
|
10851
|
+
else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
|
|
10852
|
+
this._pendingResolve = void 0;
|
|
10853
|
+
if (this.isConnected) return this._resolveDef();
|
|
10854
|
+
});
|
|
10855
|
+
else this._resolveDef();
|
|
10856
|
+
}
|
|
10576
10857
|
}
|
|
10577
10858
|
disconnectedCallback() {
|
|
10578
10859
|
this._connected = false;
|
|
@@ -10606,7 +10887,7 @@ var Vue = (function() {
|
|
|
10606
10887
|
* resolve inner component definition (handle possible async component)
|
|
10607
10888
|
*/
|
|
10608
10889
|
_resolveDef() {
|
|
10609
|
-
if (this._pendingResolve) return;
|
|
10890
|
+
if (this._pendingResolve) return this._pendingResolve;
|
|
10610
10891
|
for (let i = 0; i < this.attributes.length; i++) this._setAttr(this.attributes[i].name);
|
|
10611
10892
|
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
10612
10893
|
this._ob.observe(this, { attributes: true });
|
|
@@ -10636,6 +10917,7 @@ var Vue = (function() {
|
|
|
10636
10917
|
this._def = def;
|
|
10637
10918
|
resolve(def);
|
|
10638
10919
|
});
|
|
10920
|
+
return this._pendingResolve;
|
|
10639
10921
|
} else resolve(this._def);
|
|
10640
10922
|
}
|
|
10641
10923
|
_mountComponent(def) {
|
|
@@ -10674,14 +10956,17 @@ var Vue = (function() {
|
|
|
10674
10956
|
const { props } = def;
|
|
10675
10957
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
10676
10958
|
for (const key of Object.keys(this)) if (key[0] !== "_" && declaredPropKeys.includes(key)) this._setProp(key, this[key]);
|
|
10677
|
-
for (const key of declaredPropKeys.map(camelize))
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10959
|
+
for (const key of declaredPropKeys.map(camelize)) {
|
|
10960
|
+
if (key in Object.getPrototypeOf(this)) warn(`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`);
|
|
10961
|
+
Object.defineProperty(this, key, {
|
|
10962
|
+
get() {
|
|
10963
|
+
return this._getProp(key);
|
|
10964
|
+
},
|
|
10965
|
+
set(val) {
|
|
10966
|
+
this._setProp(key, val, true, !this._patching);
|
|
10967
|
+
}
|
|
10968
|
+
});
|
|
10969
|
+
}
|
|
10685
10970
|
}
|
|
10686
10971
|
_setAttr(key) {
|
|
10687
10972
|
if (key.startsWith("data-v-")) return;
|
|
@@ -10784,13 +11069,11 @@ var Vue = (function() {
|
|
|
10784
11069
|
_renderSlots() {
|
|
10785
11070
|
const outlets = this._getSlots();
|
|
10786
11071
|
const scopeId = this._instance.type.__scopeId;
|
|
10787
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
10788
11072
|
for (let i = 0; i < outlets.length; i++) {
|
|
10789
11073
|
const o = outlets[i];
|
|
10790
11074
|
const slotName = o.getAttribute("name") || "default";
|
|
10791
11075
|
const content = this._slots[slotName];
|
|
10792
11076
|
const parent = o.parentNode;
|
|
10793
|
-
const replacementNodes = [];
|
|
10794
11077
|
if (content) for (const n of content) {
|
|
10795
11078
|
if (scopeId && n.nodeType === 1) {
|
|
10796
11079
|
const id = scopeId + "-s";
|
|
@@ -10800,20 +11083,10 @@ var Vue = (function() {
|
|
|
10800
11083
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
10801
11084
|
}
|
|
10802
11085
|
parent.insertBefore(n, o);
|
|
10803
|
-
replacementNodes.push(n);
|
|
10804
|
-
}
|
|
10805
|
-
else while (o.firstChild) {
|
|
10806
|
-
const child = o.firstChild;
|
|
10807
|
-
parent.insertBefore(child, o);
|
|
10808
|
-
replacementNodes.push(child);
|
|
10809
11086
|
}
|
|
11087
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
10810
11088
|
parent.removeChild(o);
|
|
10811
|
-
slotReplacements.set(o, {
|
|
10812
|
-
nodes: replacementNodes,
|
|
10813
|
-
usedFallback: !content
|
|
10814
|
-
});
|
|
10815
11089
|
}
|
|
10816
|
-
this._updateSlotNodes(slotReplacements);
|
|
10817
11090
|
}
|
|
10818
11091
|
/**
|
|
10819
11092
|
* @internal
|
|
@@ -10852,7 +11125,7 @@ var Vue = (function() {
|
|
|
10852
11125
|
* @internal
|
|
10853
11126
|
*/
|
|
10854
11127
|
_hasShadowRoot() {
|
|
10855
|
-
return this.
|
|
11128
|
+
return this._root !== this;
|
|
10856
11129
|
}
|
|
10857
11130
|
/**
|
|
10858
11131
|
* @internal
|
|
@@ -10897,10 +11170,6 @@ var Vue = (function() {
|
|
|
10897
11170
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
10898
11171
|
this._app = this._instance = null;
|
|
10899
11172
|
}
|
|
10900
|
-
/**
|
|
10901
|
-
* Only called when shadowRoot is false
|
|
10902
|
-
*/
|
|
10903
|
-
_updateSlotNodes(replacements) {}
|
|
10904
11173
|
_createVNode() {
|
|
10905
11174
|
const baseProps = {};
|
|
10906
11175
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
@@ -10951,7 +11220,7 @@ var Vue = (function() {
|
|
|
10951
11220
|
};
|
|
10952
11221
|
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
10953
11222
|
name: "TransitionGroup",
|
|
10954
|
-
props:
|
|
11223
|
+
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
10955
11224
|
tag: String,
|
|
10956
11225
|
moveClass: String
|
|
10957
11226
|
}),
|
|
@@ -11083,13 +11352,22 @@ var Vue = (function() {
|
|
|
11083
11352
|
}
|
|
11084
11353
|
}
|
|
11085
11354
|
const assignKey = Symbol("_assign");
|
|
11355
|
+
const initialValueKey = Symbol("_initialValue");
|
|
11086
11356
|
const vModelText = {
|
|
11087
11357
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
11358
|
+
if (el.parentNode) {
|
|
11359
|
+
if (el.type === "text") el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
|
|
11360
|
+
else if (el.type === "textarea") el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
|
|
11361
|
+
}
|
|
11088
11362
|
el[assignKey] = getModelAssigner(vnode);
|
|
11089
11363
|
vModelTextInit(el, trim, number || !!(vnode.props && vnode.props.type === "number"), lazy);
|
|
11090
11364
|
},
|
|
11091
|
-
mounted(el, { value }) {
|
|
11092
|
-
|
|
11365
|
+
mounted(el, { value, modifiers: { trim, number } }) {
|
|
11366
|
+
const newValue = value == null ? "" : value;
|
|
11367
|
+
const initialValue = el[initialValueKey];
|
|
11368
|
+
delete el[initialValueKey];
|
|
11369
|
+
if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) el[assignKey](castValue(el.value, trim, number));
|
|
11370
|
+
else el.value = newValue;
|
|
11093
11371
|
},
|
|
11094
11372
|
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
11095
11373
|
el[assignKey] = getModelAssigner(vnode);
|
|
@@ -11224,19 +11502,39 @@ var Vue = (function() {
|
|
|
11224
11502
|
el._modelValue = value;
|
|
11225
11503
|
addEventListener(el, "change", () => {
|
|
11226
11504
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
11227
|
-
|
|
11228
|
-
el.
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11505
|
+
const multiple = el.multiple;
|
|
11506
|
+
const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
|
|
11507
|
+
const pending = el._pendingValue = [multiple, multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
|
|
11508
|
+
try {
|
|
11509
|
+
(set || el[assignKey])(assignedValue);
|
|
11510
|
+
} finally {
|
|
11511
|
+
nextTick(() => {
|
|
11512
|
+
if (el._pendingValue === pending) el._pendingValue = void 0;
|
|
11513
|
+
});
|
|
11514
|
+
}
|
|
11232
11515
|
});
|
|
11233
11516
|
};
|
|
11517
|
+
function isSameSelectValue(value, assignedValue, multiple) {
|
|
11518
|
+
if (!multiple) return looseEqual(value, assignedValue);
|
|
11519
|
+
if (isArray(value)) return looseEqual(value, assignedValue);
|
|
11520
|
+
if (isSet(value)) {
|
|
11521
|
+
if (value.size !== assignedValue.length) return false;
|
|
11522
|
+
for (const item of assignedValue) if (!value.has(item)) return false;
|
|
11523
|
+
return true;
|
|
11524
|
+
}
|
|
11525
|
+
return false;
|
|
11526
|
+
}
|
|
11234
11527
|
/**
|
|
11235
11528
|
* @internal
|
|
11236
11529
|
*/
|
|
11237
11530
|
const vModelSetSelected = (el, value) => {
|
|
11238
11531
|
el._modelValue = value;
|
|
11239
|
-
|
|
11532
|
+
const pending = el._pendingValue;
|
|
11533
|
+
el._pendingValue = void 0;
|
|
11534
|
+
if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
|
|
11535
|
+
setSelected(el, value);
|
|
11536
|
+
};
|
|
11537
|
+
function setSelected(el, value) {
|
|
11240
11538
|
const isMultiple = el.multiple;
|
|
11241
11539
|
const isArrayValue = isArray(value);
|
|
11242
11540
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -11246,18 +11544,19 @@ var Vue = (function() {
|
|
|
11246
11544
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
11247
11545
|
const option = el.options[i];
|
|
11248
11546
|
const optionValue = getValue(option);
|
|
11249
|
-
if (isMultiple)
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11547
|
+
if (isMultiple) {
|
|
11548
|
+
if (isArrayValue) {
|
|
11549
|
+
const optionType = typeof optionValue;
|
|
11550
|
+
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
11551
|
+
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
11552
|
+
} else option.selected = value.has(optionValue);
|
|
11553
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
11255
11554
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
11256
11555
|
return;
|
|
11257
11556
|
}
|
|
11258
11557
|
}
|
|
11259
11558
|
if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
|
|
11260
|
-
}
|
|
11559
|
+
}
|
|
11261
11560
|
/**
|
|
11262
11561
|
* @internal retrieve raw value set via :value bindings
|
|
11263
11562
|
*/
|
|
@@ -11553,7 +11852,7 @@ var Vue = (function() {
|
|
|
11553
11852
|
withModifiers: () => withModifiers,
|
|
11554
11853
|
withScopeId: () => withScopeId
|
|
11555
11854
|
});
|
|
11556
|
-
const rendererOptions =
|
|
11855
|
+
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
11557
11856
|
let renderer;
|
|
11558
11857
|
let enabledHydration = false;
|
|
11559
11858
|
function ensureRenderer() {
|
|
@@ -12104,13 +12403,14 @@ var Vue = (function() {
|
|
|
12104
12403
|
}
|
|
12105
12404
|
}
|
|
12106
12405
|
stateInterpolationOpen(c) {
|
|
12107
|
-
if (c === this.delimiterOpen[this.delimiterIndex])
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12406
|
+
if (c === this.delimiterOpen[this.delimiterIndex]) {
|
|
12407
|
+
if (this.delimiterIndex === this.delimiterOpen.length - 1) {
|
|
12408
|
+
const start = this.index + 1 - this.delimiterOpen.length;
|
|
12409
|
+
if (start > this.sectionStart) this.cbs.ontext(this.sectionStart, start);
|
|
12410
|
+
this.state = 3;
|
|
12411
|
+
this.sectionStart = start;
|
|
12412
|
+
} else this.delimiterIndex++;
|
|
12413
|
+
} else if (this.inRCDATA) {
|
|
12114
12414
|
this.state = 32;
|
|
12115
12415
|
this.stateInRCDATA(c);
|
|
12116
12416
|
} else {
|
|
@@ -12126,13 +12426,14 @@ var Vue = (function() {
|
|
|
12126
12426
|
}
|
|
12127
12427
|
}
|
|
12128
12428
|
stateInterpolationClose(c) {
|
|
12129
|
-
if (c === this.delimiterClose[this.delimiterIndex])
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12429
|
+
if (c === this.delimiterClose[this.delimiterIndex]) {
|
|
12430
|
+
if (this.delimiterIndex === this.delimiterClose.length - 1) {
|
|
12431
|
+
this.cbs.oninterpolation(this.sectionStart, this.index + 1);
|
|
12432
|
+
if (this.inRCDATA) this.state = 32;
|
|
12433
|
+
else this.state = 1;
|
|
12434
|
+
this.sectionStart = this.index + 1;
|
|
12435
|
+
} else this.delimiterIndex++;
|
|
12436
|
+
} else {
|
|
12136
12437
|
this.state = 3;
|
|
12137
12438
|
this.stateInterpolation(c);
|
|
12138
12439
|
}
|
|
@@ -12247,9 +12548,10 @@ var Vue = (function() {
|
|
|
12247
12548
|
this.sectionStart = this.index;
|
|
12248
12549
|
if (this.mode === 0) this.state = 6;
|
|
12249
12550
|
else if (this.inSFCRoot) this.state = 34;
|
|
12250
|
-
else if (!this.inXML)
|
|
12251
|
-
|
|
12252
|
-
|
|
12551
|
+
else if (!this.inXML) {
|
|
12552
|
+
if (c === 116) this.state = 30;
|
|
12553
|
+
else this.state = c === 115 ? 29 : 6;
|
|
12554
|
+
} else this.state = 6;
|
|
12253
12555
|
} else if (c === 47) this.state = 8;
|
|
12254
12556
|
else {
|
|
12255
12557
|
this.state = 1;
|
|
@@ -12602,9 +12904,7 @@ var Vue = (function() {
|
|
|
12602
12904
|
case 24:
|
|
12603
12905
|
this.stateInProcessingInstruction(c);
|
|
12604
12906
|
break;
|
|
12605
|
-
case 33:
|
|
12606
|
-
this.stateInEntity();
|
|
12607
|
-
break;
|
|
12907
|
+
case 33: this.stateInEntity();
|
|
12608
12908
|
}
|
|
12609
12909
|
this.index++;
|
|
12610
12910
|
}
|
|
@@ -12633,9 +12933,10 @@ var Vue = (function() {
|
|
|
12633
12933
|
handleTrailingData() {
|
|
12634
12934
|
const endIndex = this.buffer.length;
|
|
12635
12935
|
if (this.sectionStart >= endIndex) return;
|
|
12636
|
-
if (this.state === 28)
|
|
12637
|
-
|
|
12638
|
-
|
|
12936
|
+
if (this.state === 28) {
|
|
12937
|
+
if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, endIndex);
|
|
12938
|
+
else this.cbs.oncomment(this.sectionStart, endIndex);
|
|
12939
|
+
} else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) {} else this.cbs.ontext(this.sectionStart, endIndex);
|
|
12639
12940
|
}
|
|
12640
12941
|
emitCodePoint(cp, consumed) {}
|
|
12641
12942
|
};
|
|
@@ -12837,12 +13138,10 @@ var Vue = (function() {
|
|
|
12837
13138
|
if (!--currentOpenParensCount) state = stateStack.pop();
|
|
12838
13139
|
}
|
|
12839
13140
|
break;
|
|
12840
|
-
case 3:
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
}
|
|
12845
|
-
break;
|
|
13141
|
+
case 3: if (char === currentStringType) {
|
|
13142
|
+
state = stateStack.pop();
|
|
13143
|
+
currentStringType = null;
|
|
13144
|
+
}
|
|
12846
13145
|
}
|
|
12847
13146
|
}
|
|
12848
13147
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
@@ -12892,7 +13191,7 @@ var Vue = (function() {
|
|
|
12892
13191
|
function isSlotOutlet(node) {
|
|
12893
13192
|
return node.type === 1 && node.tagType === 2;
|
|
12894
13193
|
}
|
|
12895
|
-
const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
13194
|
+
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
12896
13195
|
function getUnnormalizedProps(props, callPath = []) {
|
|
12897
13196
|
if (props && !isString(props) && props.type === 14) {
|
|
12898
13197
|
const callee = props.callee;
|
|
@@ -12935,9 +13234,10 @@ var Vue = (function() {
|
|
|
12935
13234
|
propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [createObjectExpression([prop]), props]);
|
|
12936
13235
|
if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) parentCall = callPath[callPath.length - 2];
|
|
12937
13236
|
}
|
|
12938
|
-
if (node.type === 13)
|
|
12939
|
-
|
|
12940
|
-
|
|
13237
|
+
if (node.type === 13) {
|
|
13238
|
+
if (parentCall) parentCall.arguments[0] = propsWithInjection;
|
|
13239
|
+
else node.props = propsWithInjection;
|
|
13240
|
+
} else if (parentCall) parentCall.arguments[0] = propsWithInjection;
|
|
12941
13241
|
else node.arguments[2] = propsWithInjection;
|
|
12942
13242
|
}
|
|
12943
13243
|
function injectSlotKey(node, prop) {
|
|
@@ -13212,10 +13512,7 @@ var Vue = (function() {
|
|
|
13212
13512
|
case 18:
|
|
13213
13513
|
case 19:
|
|
13214
13514
|
case 20:
|
|
13215
|
-
case 21:
|
|
13216
|
-
emitError(9, end);
|
|
13217
|
-
break;
|
|
13218
|
-
default: break;
|
|
13515
|
+
case 21: emitError(9, end);
|
|
13219
13516
|
}
|
|
13220
13517
|
for (let index = 0; index < stack.length; index++) {
|
|
13221
13518
|
onCloseTag(stack[index], end - 1);
|
|
@@ -13365,7 +13662,7 @@ var Vue = (function() {
|
|
|
13365
13662
|
while (currentInput.charCodeAt(i) !== c && i >= 0) i--;
|
|
13366
13663
|
return i;
|
|
13367
13664
|
}
|
|
13368
|
-
const specialTemplateDir = new Set([
|
|
13665
|
+
const specialTemplateDir = /* @__PURE__ */ new Set([
|
|
13369
13666
|
"if",
|
|
13370
13667
|
"else",
|
|
13371
13668
|
"else-if",
|
|
@@ -13401,16 +13698,18 @@ var Vue = (function() {
|
|
|
13401
13698
|
let removedWhitespace = false;
|
|
13402
13699
|
for (let i = 0; i < nodes.length; i++) {
|
|
13403
13700
|
const node = nodes[i];
|
|
13404
|
-
if (node.type === 2)
|
|
13405
|
-
if (
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13413
|
-
|
|
13701
|
+
if (node.type === 2) {
|
|
13702
|
+
if (!inPre) {
|
|
13703
|
+
if (isAllWhitespace(node.content)) {
|
|
13704
|
+
const prev = nodes[i - 1] && nodes[i - 1].type;
|
|
13705
|
+
const next = nodes[i + 1] && nodes[i + 1].type;
|
|
13706
|
+
if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
|
|
13707
|
+
removedWhitespace = true;
|
|
13708
|
+
nodes[i] = null;
|
|
13709
|
+
} else node.content = " ";
|
|
13710
|
+
} else if (shouldCondense) node.content = condense(node.content);
|
|
13711
|
+
} else node.content = node.content.replace(windowsNewlineRE, "\n");
|
|
13712
|
+
}
|
|
13414
13713
|
}
|
|
13415
13714
|
return removedWhitespace ? nodes.filter(Boolean) : nodes;
|
|
13416
13715
|
}
|
|
@@ -13671,7 +13970,7 @@ var Vue = (function() {
|
|
|
13671
13970
|
default: return 0;
|
|
13672
13971
|
}
|
|
13673
13972
|
}
|
|
13674
|
-
const allowHoistedHelperSet = new Set([
|
|
13973
|
+
const allowHoistedHelperSet = /* @__PURE__ */ new Set([
|
|
13675
13974
|
NORMALIZE_CLASS,
|
|
13676
13975
|
NORMALIZE_STYLE,
|
|
13677
13976
|
NORMALIZE_PROPS,
|
|
@@ -13715,7 +14014,7 @@ var Vue = (function() {
|
|
|
13715
14014
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
13716
14015
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
13717
14016
|
}
|
|
13718
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false,
|
|
14017
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13719
14018
|
const context = {
|
|
13720
14019
|
filename,
|
|
13721
14020
|
selfName: getSelfName(filename),
|
|
@@ -13737,7 +14036,6 @@ var Vue = (function() {
|
|
|
13737
14036
|
bindingMetadata,
|
|
13738
14037
|
inline,
|
|
13739
14038
|
isTS,
|
|
13740
|
-
eventDelegation,
|
|
13741
14039
|
onError,
|
|
13742
14040
|
onWarn,
|
|
13743
14041
|
compatConfig,
|
|
@@ -13830,7 +14128,7 @@ var Vue = (function() {
|
|
|
13830
14128
|
traverseNode(root, context);
|
|
13831
14129
|
if (options.hoistStatic) cacheStatic(root, context);
|
|
13832
14130
|
if (!options.ssr) createRootCodegen(root, context);
|
|
13833
|
-
root.helpers = new Set([...context.helpers.keys()]);
|
|
14131
|
+
root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]);
|
|
13834
14132
|
root.components = [...context.components];
|
|
13835
14133
|
root.directives = [...context.directives];
|
|
13836
14134
|
root.imports = context.imports;
|
|
@@ -13877,8 +14175,10 @@ var Vue = (function() {
|
|
|
13877
14175
|
const exitFns = [];
|
|
13878
14176
|
for (let i = 0; i < nodeTransforms.length; i++) {
|
|
13879
14177
|
const onExit = nodeTransforms[i](node, context);
|
|
13880
|
-
if (onExit)
|
|
13881
|
-
|
|
14178
|
+
if (onExit) {
|
|
14179
|
+
if (isArray(onExit)) exitFns.push(...onExit);
|
|
14180
|
+
else exitFns.push(onExit);
|
|
14181
|
+
}
|
|
13882
14182
|
if (!context.currentNode) return;
|
|
13883
14183
|
else node = context.currentNode;
|
|
13884
14184
|
}
|
|
@@ -13895,9 +14195,7 @@ var Vue = (function() {
|
|
|
13895
14195
|
case 10:
|
|
13896
14196
|
case 11:
|
|
13897
14197
|
case 1:
|
|
13898
|
-
case 0:
|
|
13899
|
-
traverseChildren(node, context);
|
|
13900
|
-
break;
|
|
14198
|
+
case 0: traverseChildren(node, context);
|
|
13901
14199
|
}
|
|
13902
14200
|
context.currentNode = node;
|
|
13903
14201
|
let i = exitFns.length;
|
|
@@ -14093,10 +14391,12 @@ var Vue = (function() {
|
|
|
14093
14391
|
if (isString(node)) push(node, -3);
|
|
14094
14392
|
else if (isArray(node)) genNodeListAsArray(node, context);
|
|
14095
14393
|
else genNode(node, context);
|
|
14096
|
-
if (i < nodes.length - 1)
|
|
14097
|
-
|
|
14098
|
-
|
|
14099
|
-
|
|
14394
|
+
if (i < nodes.length - 1) {
|
|
14395
|
+
if (multilines) {
|
|
14396
|
+
comma && push(",");
|
|
14397
|
+
newline();
|
|
14398
|
+
} else comma && push(", ");
|
|
14399
|
+
}
|
|
14100
14400
|
}
|
|
14101
14401
|
}
|
|
14102
14402
|
function genNode(node, context) {
|
|
@@ -14208,8 +14508,10 @@ var Vue = (function() {
|
|
|
14208
14508
|
const { push, helper, pure } = context;
|
|
14209
14509
|
const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node;
|
|
14210
14510
|
let patchFlagString;
|
|
14211
|
-
if (patchFlag)
|
|
14212
|
-
|
|
14511
|
+
if (patchFlag) {
|
|
14512
|
+
if (patchFlag < 0) patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`;
|
|
14513
|
+
else patchFlagString = patchFlag + ` /* ${Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `)} */`;
|
|
14514
|
+
}
|
|
14213
14515
|
if (directives) push(helper(WITH_DIRECTIVES) + `(`);
|
|
14214
14516
|
if (isBlock) push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);
|
|
14215
14517
|
if (pure) push(PURE_ANNOTATION);
|
|
@@ -14478,16 +14780,17 @@ var Vue = (function() {
|
|
|
14478
14780
|
const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2));
|
|
14479
14781
|
const { children } = branch;
|
|
14480
14782
|
const firstChild = children[0];
|
|
14481
|
-
if (children.length !== 1 || firstChild.type !== 1)
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14783
|
+
if (children.length !== 1 || firstChild.type !== 1) {
|
|
14784
|
+
if (children.length === 1 && firstChild.type === 11) {
|
|
14785
|
+
const vnodeCall = firstChild.codegenNode;
|
|
14786
|
+
injectProp(vnodeCall, keyProperty, context);
|
|
14787
|
+
return vnodeCall;
|
|
14788
|
+
} else {
|
|
14789
|
+
let patchFlag = 64;
|
|
14790
|
+
if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) patchFlag |= 2048;
|
|
14791
|
+
return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag, void 0, void 0, true, false, false, branch.loc);
|
|
14792
|
+
}
|
|
14485
14793
|
} else {
|
|
14486
|
-
let patchFlag = 64;
|
|
14487
|
-
if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) patchFlag |= 2048;
|
|
14488
|
-
return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag, void 0, void 0, true, false, false, branch.loc);
|
|
14489
|
-
}
|
|
14490
|
-
else {
|
|
14491
14794
|
const ret = firstChild.codegenNode;
|
|
14492
14795
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
14493
14796
|
if (vnodeCall.type === 13) convertToBlock(vnodeCall, context);
|
|
@@ -14508,9 +14811,10 @@ var Vue = (function() {
|
|
|
14508
14811
|
return true;
|
|
14509
14812
|
}
|
|
14510
14813
|
function getParentCondition(node) {
|
|
14511
|
-
while (true) if (node.type === 19)
|
|
14512
|
-
|
|
14513
|
-
|
|
14814
|
+
while (true) if (node.type === 19) {
|
|
14815
|
+
if (node.alternate.type === 19) node = node.alternate;
|
|
14816
|
+
else return node;
|
|
14817
|
+
} else if (node.type === 20) node = node.value;
|
|
14514
14818
|
}
|
|
14515
14819
|
//#endregion
|
|
14516
14820
|
//#region packages/compiler-core/src/transforms/vFor.ts
|
|
@@ -14548,15 +14852,24 @@ var Vue = (function() {
|
|
|
14548
14852
|
else {
|
|
14549
14853
|
childBlock = children[0].codegenNode;
|
|
14550
14854
|
if (isTemplate && keyProperty) injectProp(childBlock, keyProperty, context);
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14855
|
+
const shouldUseBlock = !isStableFragment || childBlock.isBlockRequired === true;
|
|
14856
|
+
if (childBlock.isBlock !== shouldUseBlock) {
|
|
14857
|
+
if (childBlock.isBlock) {
|
|
14858
|
+
removeHelper(OPEN_BLOCK);
|
|
14859
|
+
removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
|
|
14860
|
+
} else removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent));
|
|
14861
|
+
}
|
|
14862
|
+
childBlock.isBlock = shouldUseBlock;
|
|
14556
14863
|
if (childBlock.isBlock) {
|
|
14557
14864
|
helper(OPEN_BLOCK);
|
|
14558
14865
|
helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
|
|
14559
|
-
} else
|
|
14866
|
+
} else {
|
|
14867
|
+
helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
|
|
14868
|
+
if (childBlock.needsPatch) {
|
|
14869
|
+
var _childBlock$patchFlag;
|
|
14870
|
+
childBlock.patchFlag = ((_childBlock$patchFlag = childBlock.patchFlag) !== null && _childBlock$patchFlag !== void 0 ? _childBlock$patchFlag : 0) | 512;
|
|
14871
|
+
}
|
|
14872
|
+
}
|
|
14560
14873
|
}
|
|
14561
14874
|
if (memo) {
|
|
14562
14875
|
const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [createSimpleExpression(`_cached`)]));
|
|
@@ -14728,8 +15041,10 @@ var Vue = (function() {
|
|
|
14728
15041
|
return createObjectProperty(`default`, fn);
|
|
14729
15042
|
};
|
|
14730
15043
|
if (!hasTemplateSlots) slotsProperties.push(buildDefaultSlotProperty(void 0, children));
|
|
14731
|
-
else if (implicitDefaultChildren.length && !implicitDefaultChildren.every(isWhitespaceText))
|
|
14732
|
-
|
|
15044
|
+
else if (implicitDefaultChildren.length && !implicitDefaultChildren.every(isWhitespaceText)) {
|
|
15045
|
+
if (hasNamedDefaultSlot) context.onError(createCompilerError(39, implicitDefaultChildren[0].loc));
|
|
15046
|
+
else slotsProperties.push(buildDefaultSlotProperty(void 0, implicitDefaultChildren));
|
|
15047
|
+
}
|
|
14733
15048
|
}
|
|
14734
15049
|
const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1;
|
|
14735
15050
|
let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, createSimpleExpression(slotFlag + ` /* ${slotFlagsText[slotFlag]} */`, false))), loc);
|
|
@@ -14755,10 +15070,7 @@ var Vue = (function() {
|
|
|
14755
15070
|
if (hasForwardedSlots(child.branches)) return true;
|
|
14756
15071
|
break;
|
|
14757
15072
|
case 10:
|
|
14758
|
-
case 11:
|
|
14759
|
-
if (hasForwardedSlots(child.children)) return true;
|
|
14760
|
-
break;
|
|
14761
|
-
default: break;
|
|
15073
|
+
case 11: if (hasForwardedSlots(child.children)) return true;
|
|
14762
15074
|
}
|
|
14763
15075
|
}
|
|
14764
15076
|
return false;
|
|
@@ -14780,12 +15092,16 @@ var Vue = (function() {
|
|
|
14780
15092
|
let vnodeDynamicProps;
|
|
14781
15093
|
let dynamicPropNames;
|
|
14782
15094
|
let vnodeDirectives;
|
|
15095
|
+
let needsPatch = false;
|
|
15096
|
+
let isBlockRequired = false;
|
|
14783
15097
|
let shouldUseBlock = isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && (tag === "svg" || tag === "foreignObject" || tag === "math");
|
|
14784
15098
|
if (props.length > 0) {
|
|
14785
15099
|
const propsBuildResult = buildProps(node, context, void 0, isComponent, isDynamicComponent);
|
|
14786
15100
|
vnodeProps = propsBuildResult.props;
|
|
14787
15101
|
patchFlag = propsBuildResult.patchFlag;
|
|
14788
15102
|
dynamicPropNames = propsBuildResult.dynamicPropNames;
|
|
15103
|
+
needsPatch = propsBuildResult.needsPatch;
|
|
15104
|
+
isBlockRequired = propsBuildResult.isBlockRequired;
|
|
14789
15105
|
const directives = propsBuildResult.directives;
|
|
14790
15106
|
vnodeDirectives = directives && directives.length ? createArrayExpression(directives.map((dir) => buildDirectiveArgs(dir, context))) : void 0;
|
|
14791
15107
|
if (propsBuildResult.shouldUseBlock) shouldUseBlock = true;
|
|
@@ -14814,7 +15130,10 @@ var Vue = (function() {
|
|
|
14814
15130
|
} else vnodeChildren = node.children;
|
|
14815
15131
|
}
|
|
14816
15132
|
if (dynamicPropNames && dynamicPropNames.length) vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
|
|
14817
|
-
node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, patchFlag === 0 ? void 0 : patchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false, isComponent, node.loc);
|
|
15133
|
+
const vnodeCall = node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, patchFlag === 0 ? void 0 : patchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false, isComponent, node.loc);
|
|
15134
|
+
needsPatch = needsPatch && (patchFlag === 0 || patchFlag === 32);
|
|
15135
|
+
if (needsPatch) vnodeCall.needsPatch = true;
|
|
15136
|
+
if (isBlockRequired) vnodeCall.isBlockRequired = true;
|
|
14818
15137
|
};
|
|
14819
15138
|
};
|
|
14820
15139
|
function resolveComponentType(node, context, ssr = false) {
|
|
@@ -14848,6 +15167,7 @@ var Vue = (function() {
|
|
|
14848
15167
|
const runtimeDirectives = [];
|
|
14849
15168
|
const hasChildren = children.length > 0;
|
|
14850
15169
|
let shouldUseBlock = false;
|
|
15170
|
+
let isBlockRequired = false;
|
|
14851
15171
|
let patchFlag = 0;
|
|
14852
15172
|
let hasRef = false;
|
|
14853
15173
|
let hasClassBinding = false;
|
|
@@ -14872,12 +15192,12 @@ var Vue = (function() {
|
|
|
14872
15192
|
const isEventHandler = isOn(name);
|
|
14873
15193
|
if (isEventHandler && (!isComponent || isDynamicComponent) && name.toLowerCase() !== "onclick" && name !== "onUpdate:modelValue" && !isReservedProp(name)) hasHydrationEventBinding = true;
|
|
14874
15194
|
if (isEventHandler && isReservedProp(name)) hasVnodeHook = true;
|
|
15195
|
+
if (name === "ref") hasRef = true;
|
|
14875
15196
|
if (isEventHandler && value.type === 14) value = value.arguments[0];
|
|
14876
15197
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) return;
|
|
14877
|
-
if (name === "
|
|
14878
|
-
else if (name === "class") hasClassBinding = true;
|
|
15198
|
+
if (name === "class") hasClassBinding = true;
|
|
14879
15199
|
else if (name === "style") hasStyleBinding = true;
|
|
14880
|
-
else if (name !== "key" && !dynamicPropNames.includes(name)) dynamicPropNames.push(name);
|
|
15200
|
+
else if (name !== "ref" && name !== "key" && !dynamicPropNames.includes(name)) dynamicPropNames.push(name);
|
|
14881
15201
|
if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) dynamicPropNames.push(name);
|
|
14882
15202
|
} else hasDynamicKeys = true;
|
|
14883
15203
|
};
|
|
@@ -14903,33 +15223,38 @@ var Vue = (function() {
|
|
|
14903
15223
|
if (name === "once" || name === "memo") continue;
|
|
14904
15224
|
if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled("COMPILER_IS_ON_ELEMENT", context))) continue;
|
|
14905
15225
|
if (isVOn && ssr) continue;
|
|
14906
|
-
if (isVBind && isStaticArgOf(arg, "key")
|
|
15226
|
+
if (isVBind && isStaticArgOf(arg, "key")) shouldUseBlock = true;
|
|
15227
|
+
if (isVOn && hasChildren && arg && isStaticExp(arg) && camelize(arg.content) === "vue:beforeUpdate") {
|
|
15228
|
+
shouldUseBlock = true;
|
|
15229
|
+
isBlockRequired = true;
|
|
15230
|
+
}
|
|
14907
15231
|
if (isVBind && isStaticArgOf(arg, "ref")) pushRefVForMarker();
|
|
14908
15232
|
if (!arg && (isVBind || isVOn)) {
|
|
14909
15233
|
hasDynamicKeys = true;
|
|
14910
|
-
if (exp)
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
if (
|
|
14914
|
-
if (
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
15234
|
+
if (exp) {
|
|
15235
|
+
if (isVBind) {
|
|
15236
|
+
pushMergeArg();
|
|
15237
|
+
if (mergeArgs.some((arg) => {
|
|
15238
|
+
if (arg.type === 15) return arg.properties.some(({ key }) => {
|
|
15239
|
+
if (key.type !== 4 || !key.isStatic) return true;
|
|
15240
|
+
return key.content !== "class" && key.content !== "style" && !isOn(key.content);
|
|
15241
|
+
});
|
|
15242
|
+
else return true;
|
|
15243
|
+
})) checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context, loc);
|
|
15244
|
+
if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context)) {
|
|
15245
|
+
mergeArgs.unshift(exp);
|
|
15246
|
+
continue;
|
|
15247
|
+
}
|
|
15248
|
+
pushRefVForMarker();
|
|
15249
|
+
pushMergeArg();
|
|
15250
|
+
mergeArgs.push(exp);
|
|
15251
|
+
} else pushMergeArg({
|
|
15252
|
+
type: 14,
|
|
15253
|
+
loc,
|
|
15254
|
+
callee: context.helper(TO_HANDLERS),
|
|
15255
|
+
arguments: isComponent ? [exp] : [exp, `true`]
|
|
15256
|
+
});
|
|
15257
|
+
} else context.onError(createCompilerError(isVBind ? 34 : 35, loc));
|
|
14933
15258
|
continue;
|
|
14934
15259
|
}
|
|
14935
15260
|
if (isVBind && modifiers.some((mod) => mod.content === "prop")) patchFlag |= 32;
|
|
@@ -14945,7 +15270,10 @@ var Vue = (function() {
|
|
|
14945
15270
|
}
|
|
14946
15271
|
} else if (!isBuiltInDirective(name)) {
|
|
14947
15272
|
runtimeDirectives.push(prop);
|
|
14948
|
-
if (hasChildren)
|
|
15273
|
+
if (hasChildren) {
|
|
15274
|
+
shouldUseBlock = true;
|
|
15275
|
+
isBlockRequired = true;
|
|
15276
|
+
}
|
|
14949
15277
|
}
|
|
14950
15278
|
}
|
|
14951
15279
|
}
|
|
@@ -14962,7 +15290,8 @@ var Vue = (function() {
|
|
|
14962
15290
|
if (dynamicPropNames.length) patchFlag |= 8;
|
|
14963
15291
|
if (hasHydrationEventBinding) patchFlag |= 32;
|
|
14964
15292
|
}
|
|
14965
|
-
|
|
15293
|
+
const needsPatch = (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0);
|
|
15294
|
+
if (!shouldUseBlock && needsPatch) patchFlag |= 512;
|
|
14966
15295
|
if (!context.inSSR && propsExpression) switch (propsExpression.type) {
|
|
14967
15296
|
case 15:
|
|
14968
15297
|
let classKeyIndex = -1;
|
|
@@ -14983,16 +15312,16 @@ var Vue = (function() {
|
|
|
14983
15312
|
} else propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]);
|
|
14984
15313
|
break;
|
|
14985
15314
|
case 14: break;
|
|
14986
|
-
default:
|
|
14987
|
-
propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [propsExpression])]);
|
|
14988
|
-
break;
|
|
15315
|
+
default: propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [propsExpression])]);
|
|
14989
15316
|
}
|
|
14990
15317
|
return {
|
|
14991
15318
|
props: propsExpression,
|
|
14992
15319
|
directives: runtimeDirectives,
|
|
14993
15320
|
patchFlag,
|
|
14994
15321
|
dynamicPropNames,
|
|
14995
|
-
shouldUseBlock
|
|
15322
|
+
shouldUseBlock,
|
|
15323
|
+
needsPatch,
|
|
15324
|
+
isBlockRequired
|
|
14996
15325
|
};
|
|
14997
15326
|
}
|
|
14998
15327
|
function dedupeProperties(properties) {
|
|
@@ -15089,10 +15418,12 @@ var Vue = (function() {
|
|
|
15089
15418
|
for (let i = 0; i < node.props.length; i++) {
|
|
15090
15419
|
const p = node.props[i];
|
|
15091
15420
|
if (p.type === 6) {
|
|
15092
|
-
if (p.value)
|
|
15093
|
-
|
|
15094
|
-
|
|
15095
|
-
|
|
15421
|
+
if (p.value) {
|
|
15422
|
+
if (p.name === "name") slotName = JSON.stringify(p.value.content);
|
|
15423
|
+
else {
|
|
15424
|
+
p.name = camelize(p.name);
|
|
15425
|
+
nonNameProps.push(p);
|
|
15426
|
+
}
|
|
15096
15427
|
}
|
|
15097
15428
|
} else if (p.name === "bind" && isStaticArgOf(p.arg, "name")) {
|
|
15098
15429
|
if (p.exp) slotName = p.exp;
|
|
@@ -15118,17 +15449,18 @@ var Vue = (function() {
|
|
|
15118
15449
|
const { loc, modifiers, arg } = dir;
|
|
15119
15450
|
if (!dir.exp && !modifiers.length) context.onError(createCompilerError(35, loc));
|
|
15120
15451
|
let eventName;
|
|
15121
|
-
if (arg.type === 4)
|
|
15122
|
-
|
|
15123
|
-
|
|
15124
|
-
|
|
15125
|
-
|
|
15126
|
-
|
|
15127
|
-
|
|
15128
|
-
|
|
15129
|
-
|
|
15130
|
-
|
|
15131
|
-
|
|
15452
|
+
if (arg.type === 4) {
|
|
15453
|
+
if (arg.isStatic) {
|
|
15454
|
+
let rawName = arg.content;
|
|
15455
|
+
if (rawName.startsWith("vnode")) context.onError(createCompilerError(52, arg.loc));
|
|
15456
|
+
if (rawName.startsWith("vue:")) rawName = `vnode-${rawName.slice(4)}`;
|
|
15457
|
+
eventName = createSimpleExpression(node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? toHandlerKey(camelize(rawName)) : `on:${rawName}`, true, arg.loc);
|
|
15458
|
+
} else eventName = createCompoundExpression([
|
|
15459
|
+
`${context.helperString(TO_HANDLER_KEY)}(`,
|
|
15460
|
+
arg,
|
|
15461
|
+
`)`
|
|
15462
|
+
]);
|
|
15463
|
+
} else {
|
|
15132
15464
|
eventName = arg;
|
|
15133
15465
|
eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);
|
|
15134
15466
|
eventName.children.push(`)`);
|
|
@@ -15164,11 +15496,14 @@ var Vue = (function() {
|
|
|
15164
15496
|
arg.children.unshift(`(`);
|
|
15165
15497
|
arg.children.push(`) || ""`);
|
|
15166
15498
|
} else if (!arg.isStatic) arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
15167
|
-
if (modifiers.some((mod) => mod.content === "camel"))
|
|
15168
|
-
|
|
15169
|
-
|
|
15170
|
-
|
|
15171
|
-
|
|
15499
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
15500
|
+
if (arg.type === 4) {
|
|
15501
|
+
if (arg.isStatic) arg.content = camelize(arg.content);
|
|
15502
|
+
else arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
15503
|
+
} else {
|
|
15504
|
+
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
15505
|
+
arg.children.push(`)`);
|
|
15506
|
+
}
|
|
15172
15507
|
}
|
|
15173
15508
|
if (!context.inSSR) {
|
|
15174
15509
|
if (modifiers.some((mod) => mod.content === "prop")) injectPrefix(arg, ".");
|
|
@@ -15177,9 +15512,10 @@ var Vue = (function() {
|
|
|
15177
15512
|
return { props: [createObjectProperty(arg, exp)] };
|
|
15178
15513
|
};
|
|
15179
15514
|
const injectPrefix = (arg, prefix) => {
|
|
15180
|
-
if (arg.type === 4)
|
|
15181
|
-
|
|
15182
|
-
|
|
15515
|
+
if (arg.type === 4) {
|
|
15516
|
+
if (arg.isStatic) arg.content = prefix + arg.content;
|
|
15517
|
+
else arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
15518
|
+
} else {
|
|
15183
15519
|
arg.children.unshift(`'${prefix}' + (`);
|
|
15184
15520
|
arg.children.push(`)`);
|
|
15185
15521
|
}
|
|
@@ -15326,11 +15662,12 @@ var Vue = (function() {
|
|
|
15326
15662
|
if (c === 96 && prev !== 92) inTemplateString = false;
|
|
15327
15663
|
} else if (inRegex) {
|
|
15328
15664
|
if (c === 47 && prev !== 92) inRegex = false;
|
|
15329
|
-
} else if (c === 124 && exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren)
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15665
|
+
} else if (c === 124 && exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) {
|
|
15666
|
+
if (expression === void 0) {
|
|
15667
|
+
lastFilterIndex = i + 1;
|
|
15668
|
+
expression = exp.slice(0, i).trim();
|
|
15669
|
+
} else pushFilter();
|
|
15670
|
+
} else {
|
|
15334
15671
|
switch (c) {
|
|
15335
15672
|
case 34:
|
|
15336
15673
|
inDouble = true;
|
|
@@ -15356,9 +15693,7 @@ var Vue = (function() {
|
|
|
15356
15693
|
case 123:
|
|
15357
15694
|
curly++;
|
|
15358
15695
|
break;
|
|
15359
|
-
case 125:
|
|
15360
|
-
curly--;
|
|
15361
|
-
break;
|
|
15696
|
+
case 125: curly--;
|
|
15362
15697
|
}
|
|
15363
15698
|
if (c === 47) {
|
|
15364
15699
|
let j = i - 1;
|
|
@@ -15634,9 +15969,7 @@ var Vue = (function() {
|
|
|
15634
15969
|
isInvalidType = true;
|
|
15635
15970
|
context.onError(createDOMCompilerError(60, dir.loc));
|
|
15636
15971
|
break;
|
|
15637
|
-
default:
|
|
15638
|
-
checkDuplicatedValue();
|
|
15639
|
-
break;
|
|
15972
|
+
default: checkDuplicatedValue();
|
|
15640
15973
|
}
|
|
15641
15974
|
} else if (hasDynamicKeyVBind(node)) directiveToUse = V_MODEL_DYNAMIC;
|
|
15642
15975
|
else checkDuplicatedValue();
|
|
@@ -15649,27 +15982,37 @@ var Vue = (function() {
|
|
|
15649
15982
|
};
|
|
15650
15983
|
//#endregion
|
|
15651
15984
|
//#region packages/compiler-dom/src/transforms/vOn.ts
|
|
15652
|
-
const isEventOptionModifier =
|
|
15653
|
-
const isNonKeyModifier =
|
|
15654
|
-
const maybeKeyModifier =
|
|
15655
|
-
const isKeyboardEvent =
|
|
15985
|
+
const isEventOptionModifier = /*@__PURE__*/ makeMap(`passive,once,capture`);
|
|
15986
|
+
const isNonKeyModifier = /*@__PURE__*/ makeMap("stop,prevent,self,ctrl,shift,alt,meta,exact,middle");
|
|
15987
|
+
const maybeKeyModifier = /*@__PURE__*/ makeMap("left,right");
|
|
15988
|
+
const isKeyboardEvent = /*@__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`);
|
|
15656
15989
|
const resolveModifiers = (key, modifiers, context, loc) => {
|
|
15657
15990
|
const keyModifiers = [];
|
|
15658
15991
|
const nonKeyModifiers = [];
|
|
15659
15992
|
const eventOptionModifiers = [];
|
|
15660
15993
|
for (let i = 0; i < modifiers.length; i++) {
|
|
15661
15994
|
const modifier = modifiers[i].content;
|
|
15995
|
+
if (modifier === "delegate") {
|
|
15996
|
+
if (context) {
|
|
15997
|
+
const error = /* @__PURE__ */ new SyntaxError(`.delegate modifier is only supported in Vapor components.`);
|
|
15998
|
+
error.loc = modifiers[i].loc;
|
|
15999
|
+
context.onWarn(error);
|
|
16000
|
+
}
|
|
16001
|
+
continue;
|
|
16002
|
+
}
|
|
15662
16003
|
if (modifier === "native" && context && checkCompatEnabled("COMPILER_V_ON_NATIVE", context, loc)) eventOptionModifiers.push(modifier);
|
|
15663
16004
|
else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
|
|
15664
16005
|
else {
|
|
15665
16006
|
const keyString = isString(key) ? key : isStaticExp(key) ? key.content : null;
|
|
15666
|
-
if (maybeKeyModifier(modifier))
|
|
15667
|
-
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
|
|
15672
|
-
|
|
16007
|
+
if (maybeKeyModifier(modifier)) {
|
|
16008
|
+
if (keyString) {
|
|
16009
|
+
if (isKeyboardEvent(keyString.toLowerCase())) keyModifiers.push(modifier);
|
|
16010
|
+
else nonKeyModifiers.push(modifier);
|
|
16011
|
+
} else {
|
|
16012
|
+
keyModifiers.push(modifier);
|
|
16013
|
+
nonKeyModifiers.push(modifier);
|
|
16014
|
+
}
|
|
16015
|
+
} else if (isNonKeyModifier(modifier)) nonKeyModifiers.push(modifier);
|
|
15673
16016
|
else keyModifiers.push(modifier);
|
|
15674
16017
|
}
|
|
15675
16018
|
}
|
|
@@ -15784,7 +16127,7 @@ var Vue = (function() {
|
|
|
15784
16127
|
}
|
|
15785
16128
|
return true;
|
|
15786
16129
|
}
|
|
15787
|
-
const headings = new Set([
|
|
16130
|
+
const headings = /* @__PURE__ */ new Set([
|
|
15788
16131
|
"h1",
|
|
15789
16132
|
"h2",
|
|
15790
16133
|
"h3",
|
|
@@ -15796,7 +16139,7 @@ var Vue = (function() {
|
|
|
15796
16139
|
/**
|
|
15797
16140
|
* maps element to set of elements that can be it's children, no other */
|
|
15798
16141
|
const onlyValidChildren = {
|
|
15799
|
-
head: new Set([
|
|
16142
|
+
head: /* @__PURE__ */ new Set([
|
|
15800
16143
|
"base",
|
|
15801
16144
|
"basefront",
|
|
15802
16145
|
"bgsound",
|
|
@@ -15809,24 +16152,24 @@ var Vue = (function() {
|
|
|
15809
16152
|
"script",
|
|
15810
16153
|
"template"
|
|
15811
16154
|
]),
|
|
15812
|
-
optgroup: new Set(["option"]),
|
|
15813
|
-
select: new Set([
|
|
16155
|
+
optgroup: /* @__PURE__ */ new Set(["option"]),
|
|
16156
|
+
select: /* @__PURE__ */ new Set([
|
|
15814
16157
|
"optgroup",
|
|
15815
16158
|
"option",
|
|
15816
16159
|
"hr"
|
|
15817
16160
|
]),
|
|
15818
|
-
table: new Set([
|
|
16161
|
+
table: /* @__PURE__ */ new Set([
|
|
15819
16162
|
"caption",
|
|
15820
16163
|
"colgroup",
|
|
15821
16164
|
"tbody",
|
|
15822
16165
|
"tfoot",
|
|
15823
16166
|
"thead"
|
|
15824
16167
|
]),
|
|
15825
|
-
tr: new Set(["td", "th"]),
|
|
15826
|
-
colgroup: new Set(["col"]),
|
|
15827
|
-
tbody: new Set(["tr"]),
|
|
15828
|
-
thead: new Set(["tr"]),
|
|
15829
|
-
tfoot: new Set(["tr"]),
|
|
16168
|
+
tr: /* @__PURE__ */ new Set(["td", "th"]),
|
|
16169
|
+
colgroup: /* @__PURE__ */ new Set(["col"]),
|
|
16170
|
+
tbody: /* @__PURE__ */ new Set(["tr"]),
|
|
16171
|
+
thead: /* @__PURE__ */ new Set(["tr"]),
|
|
16172
|
+
tfoot: /* @__PURE__ */ new Set(["tr"]),
|
|
15830
16173
|
script: emptySet,
|
|
15831
16174
|
iframe: emptySet,
|
|
15832
16175
|
option: emptySet,
|
|
@@ -15837,30 +16180,30 @@ var Vue = (function() {
|
|
|
15837
16180
|
/** maps elements to set of elements which can be it's parent, no other */
|
|
15838
16181
|
const onlyValidParents = {
|
|
15839
16182
|
html: emptySet,
|
|
15840
|
-
body: new Set(["html"]),
|
|
15841
|
-
head: new Set(["html"]),
|
|
15842
|
-
td: new Set(["tr"]),
|
|
15843
|
-
colgroup: new Set(["table"]),
|
|
15844
|
-
caption: new Set(["table"]),
|
|
15845
|
-
tbody: new Set(["table"]),
|
|
15846
|
-
tfoot: new Set(["table"]),
|
|
15847
|
-
col: new Set(["colgroup"]),
|
|
15848
|
-
th: new Set(["tr"]),
|
|
15849
|
-
thead: new Set(["table"]),
|
|
15850
|
-
tr: new Set([
|
|
16183
|
+
body: /* @__PURE__ */ new Set(["html"]),
|
|
16184
|
+
head: /* @__PURE__ */ new Set(["html"]),
|
|
16185
|
+
td: /* @__PURE__ */ new Set(["tr"]),
|
|
16186
|
+
colgroup: /* @__PURE__ */ new Set(["table"]),
|
|
16187
|
+
caption: /* @__PURE__ */ new Set(["table"]),
|
|
16188
|
+
tbody: /* @__PURE__ */ new Set(["table"]),
|
|
16189
|
+
tfoot: /* @__PURE__ */ new Set(["table"]),
|
|
16190
|
+
col: /* @__PURE__ */ new Set(["colgroup"]),
|
|
16191
|
+
th: /* @__PURE__ */ new Set(["tr"]),
|
|
16192
|
+
thead: /* @__PURE__ */ new Set(["table"]),
|
|
16193
|
+
tr: /* @__PURE__ */ new Set([
|
|
15851
16194
|
"tbody",
|
|
15852
16195
|
"thead",
|
|
15853
16196
|
"tfoot"
|
|
15854
16197
|
]),
|
|
15855
|
-
dd: new Set(["dl", "div"]),
|
|
15856
|
-
dt: new Set(["dl", "div"]),
|
|
15857
|
-
figcaption: new Set(["figure"]),
|
|
15858
|
-
summary: new Set(["details"]),
|
|
15859
|
-
area: new Set(["map"])
|
|
16198
|
+
dd: /* @__PURE__ */ new Set(["dl", "div"]),
|
|
16199
|
+
dt: /* @__PURE__ */ new Set(["dl", "div"]),
|
|
16200
|
+
figcaption: /* @__PURE__ */ new Set(["figure"]),
|
|
16201
|
+
summary: /* @__PURE__ */ new Set(["details"]),
|
|
16202
|
+
area: /* @__PURE__ */ new Set(["map"])
|
|
15860
16203
|
};
|
|
15861
16204
|
/** maps element to set of elements that can not be it's children, others can */
|
|
15862
16205
|
const knownInvalidChildren = {
|
|
15863
|
-
p: new Set([
|
|
16206
|
+
p: /* @__PURE__ */ new Set([
|
|
15864
16207
|
"address",
|
|
15865
16208
|
"article",
|
|
15866
16209
|
"aside",
|
|
@@ -15895,7 +16238,7 @@ var Vue = (function() {
|
|
|
15895
16238
|
"table",
|
|
15896
16239
|
"ul"
|
|
15897
16240
|
]),
|
|
15898
|
-
svg: new Set([
|
|
16241
|
+
svg: /* @__PURE__ */ new Set([
|
|
15899
16242
|
"b",
|
|
15900
16243
|
"blockquote",
|
|
15901
16244
|
"br",
|
|
@@ -15936,12 +16279,12 @@ var Vue = (function() {
|
|
|
15936
16279
|
};
|
|
15937
16280
|
/** maps element to set of elements that can not be it's parent, others can */
|
|
15938
16281
|
const knownInvalidParents = {
|
|
15939
|
-
a: new Set(["a"]),
|
|
15940
|
-
button: new Set(["button"]),
|
|
15941
|
-
dd: new Set(["dd", "dt"]),
|
|
15942
|
-
dt: new Set(["dd", "dt"]),
|
|
15943
|
-
form: new Set(["form"]),
|
|
15944
|
-
li: new Set(["li"]),
|
|
16282
|
+
a: /* @__PURE__ */ new Set(["a"]),
|
|
16283
|
+
button: /* @__PURE__ */ new Set(["button"]),
|
|
16284
|
+
dd: /* @__PURE__ */ new Set(["dd", "dt"]),
|
|
16285
|
+
dt: /* @__PURE__ */ new Set(["dd", "dt"]),
|
|
16286
|
+
form: /* @__PURE__ */ new Set(["form"]),
|
|
16287
|
+
li: /* @__PURE__ */ new Set(["li"]),
|
|
15945
16288
|
h1: headings,
|
|
15946
16289
|
h2: headings,
|
|
15947
16290
|
h3: headings,
|
|
@@ -15984,10 +16327,12 @@ var Vue = (function() {
|
|
|
15984
16327
|
//#region packages/vue-compat/src/index.ts
|
|
15985
16328
|
const compileCache = Object.create(null);
|
|
15986
16329
|
function compileToFunction(template, options) {
|
|
15987
|
-
if (!isString(template))
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
|
|
16330
|
+
if (!isString(template)) {
|
|
16331
|
+
if (template.nodeType) template = template.innerHTML;
|
|
16332
|
+
else {
|
|
16333
|
+
warn(`invalid template option: `, template);
|
|
16334
|
+
return NOOP;
|
|
16335
|
+
}
|
|
15991
16336
|
}
|
|
15992
16337
|
const key = genCacheKey(template, options);
|
|
15993
16338
|
const cached = compileCache[key];
|