@vue/runtime-dom 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/runtime-dom.cjs.js +106 -76
- package/dist/runtime-dom.cjs.prod.js +95 -68
- package/dist/runtime-dom.d.ts +147 -157
- package/dist/runtime-dom.esm-browser.js +942 -653
- package/dist/runtime-dom.esm-browser.prod.js +4 -3
- package/dist/runtime-dom.esm-bundler.js +153 -121
- package/dist/runtime-dom.global.js +942 -653
- package/dist/runtime-dom.global.prod.js +4 -3
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-rc.11
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -13,7 +13,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
13
13
|
* \/\*#\_\_PURE\_\_\*\/
|
|
14
14
|
* So that they can be tree-shaken if necessary.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
17
17
|
function makeMap(str) {
|
|
18
18
|
const map = Object.create(null);
|
|
19
19
|
for (const key of str.split(",")) map[key] = 1;
|
|
@@ -57,9 +57,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
57
57
|
};
|
|
58
58
|
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
59
59
|
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
60
|
-
const isReservedProp =
|
|
61
|
-
const isBuiltInTag =
|
|
62
|
-
const isBuiltInDirective =
|
|
60
|
+
const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
61
|
+
const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
|
|
62
|
+
const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
63
63
|
const cacheStringFunction = (fn) => {
|
|
64
64
|
const cache = Object.create(null);
|
|
65
65
|
return ((str) => {
|
|
@@ -133,7 +133,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
133
133
|
function canSetValueDirectly(tagName) {
|
|
134
134
|
return tagName !== "PROGRESS" && !tagName.includes("-");
|
|
135
135
|
}
|
|
136
|
-
const isGloballyAllowed =
|
|
136
|
+
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");
|
|
137
137
|
//#endregion
|
|
138
138
|
//#region packages/shared/src/normalizeProp.ts
|
|
139
139
|
function normalizeStyle(value) {
|
|
@@ -149,10 +149,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
149
149
|
}
|
|
150
150
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
151
151
|
const propertyDelimiterRE = /:([^]+)/;
|
|
152
|
-
const styleCommentRE =
|
|
152
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
153
153
|
function parseStringStyle(cssText) {
|
|
154
154
|
const ret = {};
|
|
155
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
155
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
156
156
|
if (item) {
|
|
157
157
|
const tmp = item.split(propertyDelimiterRE);
|
|
158
158
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -201,17 +201,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
201
201
|
* Compiler only.
|
|
202
202
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
203
203
|
*/
|
|
204
|
-
const isHTMLTag =
|
|
204
|
+
const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
|
|
205
205
|
/**
|
|
206
206
|
* Compiler only.
|
|
207
207
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
208
208
|
*/
|
|
209
|
-
const isSVGTag =
|
|
209
|
+
const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
|
|
210
210
|
/**
|
|
211
211
|
* Compiler only.
|
|
212
212
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
213
213
|
*/
|
|
214
|
-
const isMathMLTag =
|
|
214
|
+
const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
|
|
215
215
|
//#endregion
|
|
216
216
|
//#region packages/shared/src/domAttrConfig.ts
|
|
217
217
|
/**
|
|
@@ -226,11 +226,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
226
226
|
* - readonly -> readOnly
|
|
227
227
|
*/
|
|
228
228
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
229
|
-
const isSpecialBooleanAttr =
|
|
229
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
230
230
|
/**
|
|
231
231
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
232
232
|
*/
|
|
233
|
-
const isBooleanAttr =
|
|
233
|
+
const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
234
234
|
/**
|
|
235
235
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
236
236
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -244,11 +244,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
244
244
|
* Don't also forget to allow `data-*` and `aria-*`!
|
|
245
245
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
|
246
246
|
*/
|
|
247
|
-
const isKnownHtmlAttr =
|
|
247
|
+
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");
|
|
248
248
|
/**
|
|
249
249
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
250
250
|
*/
|
|
251
|
-
const isKnownSvgAttr =
|
|
251
|
+
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");
|
|
252
252
|
/**
|
|
253
253
|
* Shared between server-renderer and runtime-core hydration logic
|
|
254
254
|
*/
|
|
@@ -274,13 +274,54 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
274
274
|
}
|
|
275
275
|
//#endregion
|
|
276
276
|
//#region packages/shared/src/looseEqual.ts
|
|
277
|
-
function looseCompareArrays(a, b) {
|
|
277
|
+
function looseCompareArrays(a, b, seen) {
|
|
278
278
|
if (a.length !== b.length) return false;
|
|
279
279
|
let equal = true;
|
|
280
|
-
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
|
|
280
|
+
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i], seen);
|
|
281
281
|
return equal;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function looseCompareCollections(a, b, seen) {
|
|
284
|
+
if (a.size !== b.size) return false;
|
|
285
|
+
const candidates = Array.from(b);
|
|
286
|
+
const matched = new Uint8Array(candidates.length);
|
|
287
|
+
for (const item of a) {
|
|
288
|
+
let index = -1;
|
|
289
|
+
for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i], seen)) {
|
|
290
|
+
index = i;
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
if (index < 0) return false;
|
|
294
|
+
matched[index] = 1;
|
|
295
|
+
}
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
function looseCompareObjects(a, b, seen) {
|
|
299
|
+
let aValidType = isMap(a);
|
|
300
|
+
let bValidType = isMap(b);
|
|
301
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
302
|
+
aValidType = isSet(a);
|
|
303
|
+
bValidType = isSet(b);
|
|
304
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
305
|
+
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
306
|
+
for (const key in a) {
|
|
307
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
308
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
309
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) return false;
|
|
310
|
+
}
|
|
311
|
+
return String(a) === String(b);
|
|
312
|
+
}
|
|
313
|
+
function looseCompareNested(a, b, seen, compare) {
|
|
314
|
+
if (!seen) seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
315
|
+
const [seenA, seenB] = seen;
|
|
316
|
+
if (seenA.has(a) || seenB.has(b)) return seenA.get(a) === b && seenB.get(b) === a;
|
|
317
|
+
seenA.set(a, b);
|
|
318
|
+
seenB.set(b, a);
|
|
319
|
+
const equal = compare(a, b, seen);
|
|
320
|
+
seenA.delete(a);
|
|
321
|
+
seenB.delete(b);
|
|
322
|
+
return equal;
|
|
323
|
+
}
|
|
324
|
+
function looseEqual(a, b, seen) {
|
|
284
325
|
if (a === b) return true;
|
|
285
326
|
let aValidType = isDate(a);
|
|
286
327
|
let bValidType = isDate(b);
|
|
@@ -290,17 +331,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
290
331
|
if (aValidType || bValidType) return a === b;
|
|
291
332
|
aValidType = isArray(a);
|
|
292
333
|
bValidType = isArray(b);
|
|
293
|
-
if (aValidType || bValidType) return aValidType && bValidType ?
|
|
334
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
|
|
294
335
|
aValidType = isObject(a);
|
|
295
336
|
bValidType = isObject(b);
|
|
296
337
|
if (aValidType || bValidType) {
|
|
297
338
|
if (!aValidType || !bValidType) return false;
|
|
298
|
-
|
|
299
|
-
for (const key in a) {
|
|
300
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
301
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
302
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
|
|
303
|
-
}
|
|
339
|
+
return looseCompareNested(a, b, seen, looseCompareObjects);
|
|
304
340
|
}
|
|
305
341
|
return String(a) === String(b);
|
|
306
342
|
}
|
|
@@ -430,6 +466,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
430
466
|
function warn$2(msg, ...args) {
|
|
431
467
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
432
468
|
}
|
|
469
|
+
//#endregion
|
|
470
|
+
//#region packages/reactivity/src/system.ts
|
|
433
471
|
const notifyBuffer = [];
|
|
434
472
|
let batchDepth = 0;
|
|
435
473
|
let activeSub = void 0;
|
|
@@ -568,13 +606,23 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
568
606
|
sub.flags &= -5;
|
|
569
607
|
}
|
|
570
608
|
function flush() {
|
|
609
|
+
let hasError = false;
|
|
610
|
+
let error;
|
|
571
611
|
while (notifyIndex < notifyBufferLength) {
|
|
572
612
|
const effect = notifyBuffer[notifyIndex];
|
|
573
613
|
notifyBuffer[notifyIndex++] = void 0;
|
|
574
|
-
|
|
614
|
+
try {
|
|
615
|
+
effect.notify();
|
|
616
|
+
} catch (err) {
|
|
617
|
+
if (!hasError) {
|
|
618
|
+
hasError = true;
|
|
619
|
+
error = err;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
575
622
|
}
|
|
576
623
|
notifyIndex = 0;
|
|
577
624
|
notifyBufferLength = 0;
|
|
625
|
+
if (hasError) throw error;
|
|
578
626
|
}
|
|
579
627
|
function checkDirty(link, sub) {
|
|
580
628
|
let stack;
|
|
@@ -658,7 +706,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
658
706
|
}
|
|
659
707
|
set subs(value) {
|
|
660
708
|
this._subs = value;
|
|
661
|
-
if (value === void 0) this.map.delete(this.key);
|
|
709
|
+
if (value === void 0 && this.map) this.map.delete(this.key);
|
|
662
710
|
}
|
|
663
711
|
};
|
|
664
712
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -741,9 +789,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
741
789
|
if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
742
790
|
}
|
|
743
791
|
break;
|
|
744
|
-
case "set":
|
|
745
|
-
if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
746
|
-
break;
|
|
792
|
+
case "set": if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
747
793
|
}
|
|
748
794
|
}
|
|
749
795
|
}
|
|
@@ -758,13 +804,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
758
804
|
/**
|
|
759
805
|
* Track array iteration and return:
|
|
760
806
|
* - if input is reactive: a cloned raw array with reactive values
|
|
761
|
-
* - if input is
|
|
807
|
+
* - if input is readonly: a cloned raw array with readonly values, preserving
|
|
808
|
+
* reactivity
|
|
809
|
+
* - if input is raw or shallow: the original raw array
|
|
762
810
|
*/
|
|
763
811
|
function reactiveReadArray(array) {
|
|
764
812
|
const raw = /* @__PURE__ */ toRaw(array);
|
|
765
813
|
if (raw === array) return raw;
|
|
766
814
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
767
|
-
|
|
815
|
+
if (/* @__PURE__ */ isShallow(array)) return raw;
|
|
816
|
+
if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
|
|
817
|
+
return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
768
818
|
}
|
|
769
819
|
/**
|
|
770
820
|
* Track array iteration and return raw array
|
|
@@ -940,8 +990,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
940
990
|
}
|
|
941
991
|
//#endregion
|
|
942
992
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
943
|
-
const isNonTrackableKeys =
|
|
944
|
-
const builtInSymbols = new Set(
|
|
993
|
+
const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
994
|
+
const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
945
995
|
function hasOwnProperty(key) {
|
|
946
996
|
if (!isSymbol(key)) key = String(key);
|
|
947
997
|
const obj = /* @__PURE__ */ toRaw(this);
|
|
@@ -996,12 +1046,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
996
1046
|
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
997
1047
|
value = /* @__PURE__ */ toRaw(value);
|
|
998
1048
|
}
|
|
999
|
-
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value))
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1049
|
+
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1050
|
+
if (isOldValueReadonly) {
|
|
1051
|
+
warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
|
|
1052
|
+
return true;
|
|
1053
|
+
} else {
|
|
1054
|
+
oldValue.value = value;
|
|
1055
|
+
return true;
|
|
1056
|
+
}
|
|
1005
1057
|
}
|
|
1006
1058
|
}
|
|
1007
1059
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
@@ -1042,10 +1094,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1042
1094
|
return true;
|
|
1043
1095
|
}
|
|
1044
1096
|
};
|
|
1045
|
-
const mutableHandlers =
|
|
1046
|
-
const readonlyHandlers =
|
|
1047
|
-
const shallowReactiveHandlers =
|
|
1048
|
-
const shallowReadonlyHandlers =
|
|
1097
|
+
const mutableHandlers = /*@__PURE__*/ new MutableReactiveHandler();
|
|
1098
|
+
const readonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler();
|
|
1099
|
+
const shallowReactiveHandlers = /*@__PURE__*/ new MutableReactiveHandler(true);
|
|
1100
|
+
const shallowReadonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler(true);
|
|
1049
1101
|
//#endregion
|
|
1050
1102
|
//#region packages/reactivity/src/collectionHandlers.ts
|
|
1051
1103
|
const toShallow = (value) => value;
|
|
@@ -1196,10 +1248,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1196
1248
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1197
1249
|
};
|
|
1198
1250
|
}
|
|
1199
|
-
const mutableCollectionHandlers = { get:
|
|
1200
|
-
const shallowCollectionHandlers = { get:
|
|
1201
|
-
const readonlyCollectionHandlers = { get:
|
|
1202
|
-
const shallowReadonlyCollectionHandlers = { get:
|
|
1251
|
+
const mutableCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, false) };
|
|
1252
|
+
const shallowCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, true) };
|
|
1253
|
+
const readonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, false) };
|
|
1254
|
+
const shallowReadonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, true) };
|
|
1203
1255
|
function checkIdentityKeys(target, has, key) {
|
|
1204
1256
|
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1205
1257
|
if (rawKey !== key && has.call(target, rawKey)) {
|
|
@@ -1224,7 +1276,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1224
1276
|
default: return 0;
|
|
1225
1277
|
}
|
|
1226
1278
|
}
|
|
1227
|
-
|
|
1279
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1228
1280
|
function reactive(target) {
|
|
1229
1281
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
1230
1282
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1259,7 +1311,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1259
1311
|
* @param target - The source object.
|
|
1260
1312
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}
|
|
1261
1313
|
*/
|
|
1262
|
-
|
|
1314
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1263
1315
|
function shallowReactive(target) {
|
|
1264
1316
|
return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
|
|
1265
1317
|
}
|
|
@@ -1292,7 +1344,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1292
1344
|
* @param target - The source object.
|
|
1293
1345
|
* @see {@link https://vuejs.org/api/reactivity-core.html#readonly}
|
|
1294
1346
|
*/
|
|
1295
|
-
|
|
1347
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1296
1348
|
function readonly(target) {
|
|
1297
1349
|
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
1298
1350
|
}
|
|
@@ -1326,7 +1378,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1326
1378
|
* @param target - The source object.
|
|
1327
1379
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}
|
|
1328
1380
|
*/
|
|
1329
|
-
|
|
1381
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1330
1382
|
function shallowReadonly(target) {
|
|
1331
1383
|
return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
|
|
1332
1384
|
}
|
|
@@ -1363,7 +1415,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1363
1415
|
* @param value - The value to check.
|
|
1364
1416
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}
|
|
1365
1417
|
*/
|
|
1366
|
-
|
|
1418
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1367
1419
|
function isReactive(value) {
|
|
1368
1420
|
if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1369
1421
|
return !!(value && value["__v_isReactive"]);
|
|
@@ -1379,11 +1431,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1379
1431
|
* @param value - The value to check.
|
|
1380
1432
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}
|
|
1381
1433
|
*/
|
|
1382
|
-
|
|
1434
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1383
1435
|
function isReadonly(value) {
|
|
1384
1436
|
return !!(value && value["__v_isReadonly"]);
|
|
1385
1437
|
}
|
|
1386
|
-
|
|
1438
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1387
1439
|
function isShallow(value) {
|
|
1388
1440
|
return !!(value && value["__v_isShallow"]);
|
|
1389
1441
|
}
|
|
@@ -1394,7 +1446,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1394
1446
|
* @param value - The value to check.
|
|
1395
1447
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
|
|
1396
1448
|
*/
|
|
1397
|
-
|
|
1449
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1398
1450
|
function isProxy(value) {
|
|
1399
1451
|
return value ? !!value["__v_raw"] : false;
|
|
1400
1452
|
}
|
|
@@ -1421,7 +1473,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1421
1473
|
* @param observed - The object for which the "raw" value is requested.
|
|
1422
1474
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}
|
|
1423
1475
|
*/
|
|
1424
|
-
|
|
1476
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1425
1477
|
function toRaw(observed) {
|
|
1426
1478
|
const raw = observed && observed["__v_raw"];
|
|
1427
1479
|
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
@@ -1470,15 +1522,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1470
1522
|
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1471
1523
|
//#endregion
|
|
1472
1524
|
//#region packages/reactivity/src/ref.ts
|
|
1473
|
-
|
|
1525
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1474
1526
|
function isRef(r) {
|
|
1475
1527
|
return r ? r["__v_isRef"] === true : false;
|
|
1476
1528
|
}
|
|
1477
|
-
|
|
1529
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1478
1530
|
function ref(value) {
|
|
1479
1531
|
return createRef(value, toReactive);
|
|
1480
1532
|
}
|
|
1481
|
-
|
|
1533
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1482
1534
|
function shallowRef(value) {
|
|
1483
1535
|
return createRef(value);
|
|
1484
1536
|
}
|
|
@@ -1681,7 +1733,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1681
1733
|
* @param object - Reactive object to be made into an object of linked refs.
|
|
1682
1734
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}
|
|
1683
1735
|
*/
|
|
1684
|
-
|
|
1736
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1685
1737
|
function toRefs(object) {
|
|
1686
1738
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1687
1739
|
for (const key in object) ret[key] = propertyToRef(object, key);
|
|
@@ -1732,7 +1784,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1732
1784
|
return this._value = this._getter();
|
|
1733
1785
|
}
|
|
1734
1786
|
};
|
|
1735
|
-
|
|
1787
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1736
1788
|
function toRef(source, key, defaultValue) {
|
|
1737
1789
|
if (/* @__PURE__ */ isRef(source)) return source;
|
|
1738
1790
|
else if (isFunction(source)) return new GetterRefImpl(source);
|
|
@@ -1798,10 +1850,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1798
1850
|
get dirty() {
|
|
1799
1851
|
const flags = this.flags;
|
|
1800
1852
|
if (flags & 16) return true;
|
|
1801
|
-
if (flags & 32)
|
|
1802
|
-
this.
|
|
1803
|
-
|
|
1804
|
-
|
|
1853
|
+
if (flags & 32) {
|
|
1854
|
+
if (checkDirty(this.deps, this)) {
|
|
1855
|
+
this.flags = flags | 16;
|
|
1856
|
+
return true;
|
|
1857
|
+
} else this.flags = flags & -33;
|
|
1858
|
+
}
|
|
1805
1859
|
return false;
|
|
1806
1860
|
}
|
|
1807
1861
|
};
|
|
@@ -1980,10 +2034,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1980
2034
|
get _dirty() {
|
|
1981
2035
|
const flags = this.flags;
|
|
1982
2036
|
if (flags & 16) return true;
|
|
1983
|
-
if (flags & 32)
|
|
1984
|
-
this.
|
|
1985
|
-
|
|
1986
|
-
|
|
2037
|
+
if (flags & 32) {
|
|
2038
|
+
if (checkDirty(this.deps, this)) {
|
|
2039
|
+
this.flags = flags | 16;
|
|
2040
|
+
return true;
|
|
2041
|
+
} else this.flags = flags & -33;
|
|
2042
|
+
}
|
|
1987
2043
|
return false;
|
|
1988
2044
|
}
|
|
1989
2045
|
/**
|
|
@@ -2044,7 +2100,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2044
2100
|
}
|
|
2045
2101
|
};
|
|
2046
2102
|
setupOnTrigger(ComputedRefImpl);
|
|
2047
|
-
|
|
2103
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2048
2104
|
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
2049
2105
|
let getter;
|
|
2050
2106
|
let setter;
|
|
@@ -2122,25 +2178,26 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2122
2178
|
else if (isFunction(s)) return call ? call(s, 2) : s();
|
|
2123
2179
|
else warnInvalidSource(s, onWarn);
|
|
2124
2180
|
});
|
|
2125
|
-
} else if (isFunction(source))
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2181
|
+
} else if (isFunction(source)) {
|
|
2182
|
+
if (cb) getter = call ? () => call(source, 2) : source;
|
|
2183
|
+
else getter = () => {
|
|
2184
|
+
if (this.cleanupsLength) {
|
|
2185
|
+
const prevSub = setActiveSub();
|
|
2186
|
+
try {
|
|
2187
|
+
cleanup(this);
|
|
2188
|
+
} finally {
|
|
2189
|
+
setActiveSub(prevSub);
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
const currentEffect = activeWatcher;
|
|
2193
|
+
activeWatcher = this;
|
|
2129
2194
|
try {
|
|
2130
|
-
|
|
2195
|
+
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2131
2196
|
} finally {
|
|
2132
|
-
|
|
2197
|
+
activeWatcher = currentEffect;
|
|
2133
2198
|
}
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
activeWatcher = this;
|
|
2137
|
-
try {
|
|
2138
|
-
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2139
|
-
} finally {
|
|
2140
|
-
activeWatcher = currentEffect;
|
|
2141
|
-
}
|
|
2142
|
-
};
|
|
2143
|
-
else {
|
|
2199
|
+
};
|
|
2200
|
+
} else {
|
|
2144
2201
|
getter = NOOP;
|
|
2145
2202
|
warnInvalidSource(source, onWarn);
|
|
2146
2203
|
}
|
|
@@ -2464,7 +2521,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2464
2521
|
let jobsLength = 0;
|
|
2465
2522
|
let flushIndex = 0;
|
|
2466
2523
|
let postFlushIndex = 0;
|
|
2467
|
-
const resolvedPromise =
|
|
2524
|
+
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
2468
2525
|
const RECURSION_LIMIT = 100;
|
|
2469
2526
|
function nextTick(fn) {
|
|
2470
2527
|
const p = currentFlushPromise || resolvedPromise;
|
|
@@ -2503,6 +2560,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2503
2560
|
flushJobs();
|
|
2504
2561
|
} catch (e) {
|
|
2505
2562
|
currentFlushPromise = null;
|
|
2563
|
+
if (jobsLength || postJobs.length) queueFlush();
|
|
2506
2564
|
throw e;
|
|
2507
2565
|
}
|
|
2508
2566
|
};
|
|
@@ -2510,9 +2568,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2510
2568
|
if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
|
|
2511
2569
|
}
|
|
2512
2570
|
function queuePostFlushCb(jobs, id = Infinity) {
|
|
2513
|
-
if (!isArray(jobs))
|
|
2514
|
-
|
|
2515
|
-
|
|
2571
|
+
if (!isArray(jobs)) {
|
|
2572
|
+
if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
|
|
2573
|
+
else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
|
|
2574
|
+
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2516
2575
|
queueFlush();
|
|
2517
2576
|
}
|
|
2518
2577
|
function flushPreFlushCbs(instance, seen) {
|
|
@@ -2526,32 +2585,39 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2526
2585
|
i--;
|
|
2527
2586
|
jobsLength--;
|
|
2528
2587
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2529
|
-
|
|
2530
|
-
|
|
2588
|
+
try {
|
|
2589
|
+
cb();
|
|
2590
|
+
} finally {
|
|
2591
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2592
|
+
}
|
|
2531
2593
|
}
|
|
2532
2594
|
}
|
|
2533
2595
|
function flushPostFlushCbs(seen) {
|
|
2534
2596
|
if (postJobs.length) {
|
|
2535
2597
|
if (activePostJobs) {
|
|
2536
|
-
activePostJobs.push(
|
|
2598
|
+
for (let i = 0; i < postJobs.length; i++) activePostJobs.push(postJobs[i]);
|
|
2537
2599
|
postJobs.length = 0;
|
|
2538
2600
|
return;
|
|
2539
2601
|
}
|
|
2540
2602
|
activePostJobs = postJobs;
|
|
2541
2603
|
postJobs = [];
|
|
2542
2604
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
cb
|
|
2549
|
-
|
|
2550
|
-
|
|
2605
|
+
try {
|
|
2606
|
+
while (postFlushIndex < activePostJobs.length) {
|
|
2607
|
+
const cb = activePostJobs[postFlushIndex++];
|
|
2608
|
+
if (checkRecursiveUpdates(seen, cb)) continue;
|
|
2609
|
+
if (cb.flags & 2) cb.flags &= -2;
|
|
2610
|
+
if (!(cb.flags & 4)) try {
|
|
2611
|
+
cb();
|
|
2612
|
+
} finally {
|
|
2613
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2614
|
+
}
|
|
2551
2615
|
}
|
|
2616
|
+
} finally {
|
|
2617
|
+
while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
|
|
2618
|
+
activePostJobs = null;
|
|
2619
|
+
postFlushIndex = 0;
|
|
2552
2620
|
}
|
|
2553
|
-
activePostJobs = null;
|
|
2554
|
-
postFlushIndex = 0;
|
|
2555
2621
|
}
|
|
2556
2622
|
}
|
|
2557
2623
|
let isFlushing = false;
|
|
@@ -2561,9 +2627,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2561
2627
|
function flushOnAppMount(instance) {
|
|
2562
2628
|
if (!isFlushing) {
|
|
2563
2629
|
isFlushing = true;
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2630
|
+
try {
|
|
2631
|
+
flushPreFlushCbs(instance);
|
|
2632
|
+
flushPostFlushCbs();
|
|
2633
|
+
} finally {
|
|
2634
|
+
isFlushing = false;
|
|
2635
|
+
}
|
|
2567
2636
|
}
|
|
2568
2637
|
}
|
|
2569
2638
|
function flushJobs(seen) {
|
|
@@ -2593,8 +2662,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2593
2662
|
jobsLength = 0;
|
|
2594
2663
|
jobs.length = 0;
|
|
2595
2664
|
flushPostFlushCbs(seen);
|
|
2596
|
-
currentFlushPromise = null;
|
|
2597
2665
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
2666
|
+
else currentFlushPromise = null;
|
|
2598
2667
|
}
|
|
2599
2668
|
}
|
|
2600
2669
|
function checkRecursiveUpdates(seen, fn) {
|
|
@@ -2625,6 +2694,19 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2625
2694
|
rerender: tryWrap(rerender),
|
|
2626
2695
|
reload: tryWrap(reload)
|
|
2627
2696
|
};
|
|
2697
|
+
function runWithHmrUpdating(fn) {
|
|
2698
|
+
isHmrUpdating = true;
|
|
2699
|
+
let done = false;
|
|
2700
|
+
try {
|
|
2701
|
+
fn();
|
|
2702
|
+
done = true;
|
|
2703
|
+
} finally {
|
|
2704
|
+
if (done) nextTick(() => {
|
|
2705
|
+
isHmrUpdating = false;
|
|
2706
|
+
});
|
|
2707
|
+
else isHmrUpdating = false;
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2628
2710
|
const map = /* @__PURE__ */ new Map();
|
|
2629
2711
|
function registerHMR(instance) {
|
|
2630
2712
|
const id = instance.type.__hmrId;
|
|
@@ -2666,18 +2748,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2666
2748
|
instance.render = newRender;
|
|
2667
2749
|
normalizeClassComponent(instance.type).render = newRender;
|
|
2668
2750
|
}
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2751
|
+
runWithHmrUpdating(() => {
|
|
2752
|
+
if (instance.vapor) {
|
|
2753
|
+
if (!instance.isUnmounted) instance.hmrRerender();
|
|
2754
|
+
} else {
|
|
2755
|
+
const i = instance;
|
|
2756
|
+
if (!(i.effect.flags & 1024)) {
|
|
2757
|
+
i.renderCache = [];
|
|
2758
|
+
i.effect.run();
|
|
2759
|
+
}
|
|
2677
2760
|
}
|
|
2678
|
-
}
|
|
2679
|
-
nextTick(() => {
|
|
2680
|
-
isHmrUpdating = false;
|
|
2681
2761
|
});
|
|
2682
2762
|
});
|
|
2683
2763
|
}
|
|
@@ -2692,17 +2772,19 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2692
2772
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2693
2773
|
const dirtyInstances = new Set(instances);
|
|
2694
2774
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2695
|
-
|
|
2696
|
-
const
|
|
2697
|
-
|
|
2698
|
-
if (
|
|
2699
|
-
rerenderedParents.
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2775
|
+
runWithHmrUpdating(() => {
|
|
2776
|
+
for (const instance of instances) {
|
|
2777
|
+
const parent = instance.parent;
|
|
2778
|
+
if (parent) {
|
|
2779
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2780
|
+
rerenderedParents.add(parent);
|
|
2781
|
+
parent.hmrRerender();
|
|
2782
|
+
}
|
|
2783
|
+
} else instance.hmrReload(newComp);
|
|
2784
|
+
}
|
|
2785
|
+
});
|
|
2704
2786
|
} else {
|
|
2705
|
-
const
|
|
2787
|
+
const parents = /* @__PURE__ */ new Set();
|
|
2706
2788
|
const dirtyInstanceSet = new Set(instances);
|
|
2707
2789
|
for (const instance of instances) {
|
|
2708
2790
|
const oldComp = normalizeClassComponent(instance.type);
|
|
@@ -2721,33 +2803,23 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2721
2803
|
instance.ceReload(newComp.styles);
|
|
2722
2804
|
dirtyInstances.delete(instance);
|
|
2723
2805
|
} else if (instance.parent) {
|
|
2724
|
-
|
|
2725
|
-
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2726
|
-
let updates = parentUpdates.get(parent);
|
|
2727
|
-
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2728
|
-
updates.push([instance, dirtyInstances]);
|
|
2729
|
-
}
|
|
2806
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) parents.add(instance.parent);
|
|
2730
2807
|
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2731
2808
|
else if (typeof window !== "undefined") window.location.reload();
|
|
2732
2809
|
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2733
2810
|
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2734
2811
|
}
|
|
2735
|
-
|
|
2812
|
+
parents.forEach((parent) => {
|
|
2736
2813
|
queueJob(() => {
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2814
|
+
runWithHmrUpdating(() => {
|
|
2815
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2816
|
+
else {
|
|
2817
|
+
const i = parent;
|
|
2818
|
+
if (!(i.effect.flags & 1024)) {
|
|
2819
|
+
i.renderCache = [];
|
|
2820
|
+
i.effect.run();
|
|
2821
|
+
}
|
|
2744
2822
|
}
|
|
2745
|
-
}
|
|
2746
|
-
nextTick(() => {
|
|
2747
|
-
isHmrUpdating = false;
|
|
2748
|
-
});
|
|
2749
|
-
updates.forEach(([instance, dirtyInstances]) => {
|
|
2750
|
-
dirtyInstances.delete(instance);
|
|
2751
2823
|
});
|
|
2752
2824
|
});
|
|
2753
2825
|
});
|
|
@@ -2817,20 +2889,20 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2817
2889
|
function devtoolsUnmountApp(app) {
|
|
2818
2890
|
emit$1("app:unmount", app);
|
|
2819
2891
|
}
|
|
2820
|
-
const devtoolsComponentAdded =
|
|
2821
|
-
const devtoolsComponentUpdated =
|
|
2822
|
-
const _devtoolsComponentRemoved =
|
|
2892
|
+
const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
|
|
2893
|
+
const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
|
|
2894
|
+
const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
|
|
2823
2895
|
const devtoolsComponentRemoved = (component) => {
|
|
2824
2896
|
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
|
|
2825
2897
|
};
|
|
2826
|
-
|
|
2898
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2827
2899
|
function createDevtoolsComponentHook(hook) {
|
|
2828
2900
|
return (component) => {
|
|
2829
2901
|
emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
|
|
2830
2902
|
};
|
|
2831
2903
|
}
|
|
2832
|
-
const devtoolsPerfStart =
|
|
2833
|
-
const devtoolsPerfEnd =
|
|
2904
|
+
const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
|
|
2905
|
+
const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
|
|
2834
2906
|
function createDevtoolsPerformanceHook(hook) {
|
|
2835
2907
|
return (component, type, time) => {
|
|
2836
2908
|
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -3069,7 +3141,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3069
3141
|
}
|
|
3070
3142
|
const prev = setCurrentInstance(this);
|
|
3071
3143
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3072
|
-
|
|
3144
|
+
restoreCurrentInstance(prev);
|
|
3073
3145
|
return res;
|
|
3074
3146
|
}
|
|
3075
3147
|
function createPathGetter(ctx, path) {
|
|
@@ -3091,15 +3163,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3091
3163
|
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
3092
3164
|
const resolveTarget = (props, select) => {
|
|
3093
3165
|
const targetSelector = props && props.to;
|
|
3094
|
-
if (isString(targetSelector))
|
|
3095
|
-
|
|
3096
|
-
|
|
3166
|
+
if (isString(targetSelector)) {
|
|
3167
|
+
if (!select) {
|
|
3168
|
+
warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
|
|
3169
|
+
return null;
|
|
3170
|
+
} else {
|
|
3171
|
+
const target = select(targetSelector);
|
|
3172
|
+
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.`);
|
|
3173
|
+
return target;
|
|
3174
|
+
}
|
|
3097
3175
|
} else {
|
|
3098
|
-
const target = select(targetSelector);
|
|
3099
|
-
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.`);
|
|
3100
|
-
return target;
|
|
3101
|
-
}
|
|
3102
|
-
else {
|
|
3103
3176
|
if (!targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
3104
3177
|
return targetSelector;
|
|
3105
3178
|
}
|
|
@@ -3137,7 +3210,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3137
3210
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3138
3211
|
pendingMounts.delete(vnode);
|
|
3139
3212
|
if (isTeleportDisabled(vnode.props)) {
|
|
3140
|
-
|
|
3213
|
+
const mountContainer = parentNode(vnode.el) || container;
|
|
3214
|
+
mount(vnode, mountContainer, vnode.anchor);
|
|
3141
3215
|
updateCssVars(vnode, true);
|
|
3142
3216
|
}
|
|
3143
3217
|
mountToTarget(vnode);
|
|
@@ -3246,15 +3320,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3246
3320
|
const disabled = isTeleportDisabled(vnode.props);
|
|
3247
3321
|
if (target) {
|
|
3248
3322
|
const targetNode = target._lpa || target.firstChild;
|
|
3249
|
-
if (vnode.shapeFlag & 16)
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3323
|
+
if (vnode.shapeFlag & 16) {
|
|
3324
|
+
if (disabled) {
|
|
3325
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3326
|
+
hydrateAnchor(target, targetNode);
|
|
3327
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
|
|
3328
|
+
} else {
|
|
3329
|
+
vnode.anchor = nextSibling(node);
|
|
3330
|
+
hydrateAnchor(target, targetNode);
|
|
3331
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
|
|
3332
|
+
hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3333
|
+
}
|
|
3258
3334
|
}
|
|
3259
3335
|
updateCssVars(vnode, disabled);
|
|
3260
3336
|
} else if (disabled) {
|
|
@@ -3332,59 +3408,27 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3332
3408
|
onAfterAppear: TransitionHookValidator,
|
|
3333
3409
|
onAppearCancelled: TransitionHookValidator
|
|
3334
3410
|
};
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3411
|
+
function isEmptyTransitionChild(vnode, instance) {
|
|
3412
|
+
if (vnode.type === Comment) return true;
|
|
3413
|
+
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3414
|
+
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3415
|
+
}
|
|
3339
3416
|
const BaseTransitionImpl = {
|
|
3340
3417
|
name: `BaseTransition`,
|
|
3341
3418
|
props: BaseTransitionPropsValidators,
|
|
3342
3419
|
setup(props, { slots }) {
|
|
3343
3420
|
const instance = getCurrentInstance();
|
|
3344
3421
|
const state = useTransitionState();
|
|
3422
|
+
let resumeAfterLeave;
|
|
3345
3423
|
return () => {
|
|
3346
|
-
const
|
|
3347
|
-
const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
|
|
3424
|
+
const child = resolveTransitionChild(slots.default && slots.default(), !!instance.subTree);
|
|
3348
3425
|
if (!child) return;
|
|
3349
3426
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
3350
3427
|
const { mode } = rawProps;
|
|
3351
3428
|
checkTransitionMode(mode);
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
let enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance, (hooks) => enterHooks = hooks);
|
|
3356
|
-
if (innerChild.type !== Comment) setTransitionHooks(innerChild, enterHooks);
|
|
3357
|
-
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3358
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
3359
|
-
let leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
|
|
3360
|
-
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
3361
|
-
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
3362
|
-
state.isLeaving = true;
|
|
3363
|
-
leavingHooks.afterLeave = () => {
|
|
3364
|
-
state.isLeaving = false;
|
|
3365
|
-
if (!(instance.job.flags & 4)) instance.update();
|
|
3366
|
-
delete leavingHooks.afterLeave;
|
|
3367
|
-
oldInnerChild = void 0;
|
|
3368
|
-
};
|
|
3369
|
-
return emptyPlaceholder(child);
|
|
3370
|
-
} else if (mode === "in-out" && innerChild.type !== Comment) leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
3371
|
-
const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
|
|
3372
|
-
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
3373
|
-
el[leaveCbKey] = () => {
|
|
3374
|
-
earlyRemove();
|
|
3375
|
-
el[leaveCbKey] = void 0;
|
|
3376
|
-
delete enterHooks.delayedLeave;
|
|
3377
|
-
oldInnerChild = void 0;
|
|
3378
|
-
};
|
|
3379
|
-
enterHooks.delayedLeave = () => {
|
|
3380
|
-
delayedLeave();
|
|
3381
|
-
delete enterHooks.delayedLeave;
|
|
3382
|
-
oldInnerChild = void 0;
|
|
3383
|
-
};
|
|
3384
|
-
};
|
|
3385
|
-
else oldInnerChild = void 0;
|
|
3386
|
-
} else if (oldInnerChild) oldInnerChild = void 0;
|
|
3387
|
-
return child;
|
|
3429
|
+
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3430
|
+
if (!(instance.job.flags & 4)) instance.update();
|
|
3431
|
+
}) : NOOP);
|
|
3388
3432
|
};
|
|
3389
3433
|
}
|
|
3390
3434
|
};
|
|
@@ -3416,7 +3460,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3416
3460
|
function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
3417
3461
|
const key = String(vnode.key);
|
|
3418
3462
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
3419
|
-
|
|
3463
|
+
const hooks = baseResolveTransitionHooks({
|
|
3420
3464
|
isLeaving: () => leavingVNodesCache[key] === vnode,
|
|
3421
3465
|
setLeavingNodeCache: () => {
|
|
3422
3466
|
leavingVNodesCache[key] = vnode;
|
|
@@ -3434,6 +3478,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3434
3478
|
return hooks;
|
|
3435
3479
|
}
|
|
3436
3480
|
}, props, state, instance);
|
|
3481
|
+
if (vnode.type === VaporSlot) extend(hooks, {
|
|
3482
|
+
__vapor: true,
|
|
3483
|
+
props,
|
|
3484
|
+
state,
|
|
3485
|
+
instance
|
|
3486
|
+
});
|
|
3487
|
+
return hooks;
|
|
3437
3488
|
}
|
|
3438
3489
|
function baseResolveTransitionHooks(context, props, state, instance) {
|
|
3439
3490
|
const { isLeaving, setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
|
|
@@ -3453,8 +3504,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3453
3504
|
persisted,
|
|
3454
3505
|
beforeEnter(el) {
|
|
3455
3506
|
let hook = onBeforeEnter;
|
|
3456
|
-
if (!state.isMounted)
|
|
3457
|
-
|
|
3507
|
+
if (!state.isMounted) {
|
|
3508
|
+
if (appear) hook = onBeforeAppear || onBeforeEnter;
|
|
3509
|
+
else return;
|
|
3510
|
+
}
|
|
3458
3511
|
if (el[leaveCbKey]) el[leaveCbKey](true);
|
|
3459
3512
|
earlyRemove();
|
|
3460
3513
|
callHook(hook, [el]);
|
|
@@ -3464,11 +3517,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3464
3517
|
let hook = onEnter;
|
|
3465
3518
|
let afterHook = onAfterEnter;
|
|
3466
3519
|
let cancelHook = onEnterCancelled;
|
|
3467
|
-
if (!state.isMounted)
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3520
|
+
if (!state.isMounted) {
|
|
3521
|
+
if (appear) {
|
|
3522
|
+
hook = onAppear || onEnter;
|
|
3523
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
3524
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
3525
|
+
} else return;
|
|
3526
|
+
}
|
|
3472
3527
|
let called = false;
|
|
3473
3528
|
el[enterCbKey$1] = (cancelled) => {
|
|
3474
3529
|
if (called) return;
|
|
@@ -3502,7 +3557,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3502
3557
|
else done();
|
|
3503
3558
|
},
|
|
3504
3559
|
clone(node) {
|
|
3505
|
-
return cloneHooks(node);
|
|
3560
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3506
3561
|
}
|
|
3507
3562
|
};
|
|
3508
3563
|
return hooks;
|
|
@@ -3526,16 +3581,91 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3526
3581
|
if (shapeFlag & 32 && isFunction(children.default)) return children.default();
|
|
3527
3582
|
}
|
|
3528
3583
|
}
|
|
3584
|
+
function resolveTransitionChild(children, renderEmpty = false) {
|
|
3585
|
+
const branches = children && getTransitionRawChildren(children, true);
|
|
3586
|
+
return branches && branches.length ? findNonCommentChild(branches) : renderEmpty ? createCommentVNode() : void 0;
|
|
3587
|
+
}
|
|
3588
|
+
/**
|
|
3589
|
+
* @internal
|
|
3590
|
+
*/
|
|
3591
|
+
function prepareTransitionSwitch(previous, next, props, state, instance, resumeAfterLeave, delayedLeaveSource) {
|
|
3592
|
+
if (state.isLeaving) return emptyPlaceholder(next);
|
|
3593
|
+
const nextInner = getInnerChild$1(next);
|
|
3594
|
+
if (!nextInner) return emptyPlaceholder(next);
|
|
3595
|
+
let enterHooks = resolveTransitionHooks(nextInner, props, state, instance, (hooks) => {
|
|
3596
|
+
if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
|
|
3597
|
+
enterHooks = hooks;
|
|
3598
|
+
});
|
|
3599
|
+
if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
|
|
3600
|
+
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
3601
|
+
const mode = props.mode;
|
|
3602
|
+
const previousInner = previous && getInnerChild$1(previous);
|
|
3603
|
+
if (previous && previousInner && !isSameVNodeType(previousInner, nextInner) && !isEmptyTransitionChild(previousInner, instance)) {
|
|
3604
|
+
const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
|
|
3605
|
+
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);
|
|
3606
|
+
}
|
|
3607
|
+
return next;
|
|
3608
|
+
}
|
|
3609
|
+
function forwardDelayedLeave(hooks, source) {
|
|
3610
|
+
const delayedLeave = source && source.delayedLeave;
|
|
3611
|
+
if (!delayedLeave) return;
|
|
3612
|
+
hooks.delayedLeave = () => {
|
|
3613
|
+
if (source.delayedLeave === delayedLeave) delayedLeave();
|
|
3614
|
+
delete hooks.delayedLeave;
|
|
3615
|
+
};
|
|
3616
|
+
}
|
|
3617
|
+
function prepareLeavingTransitionHooks(previousInner, props, state, instance) {
|
|
3618
|
+
return setTransitionHooks(previousInner, resolveTransitionHooks(previousInner, props, state, instance));
|
|
3619
|
+
}
|
|
3620
|
+
function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, props, state, resumeAfterLeave) {
|
|
3621
|
+
if (props.mode === "out-in") {
|
|
3622
|
+
state.isLeaving = true;
|
|
3623
|
+
leavingHooks.afterLeave = () => {
|
|
3624
|
+
state.isLeaving = false;
|
|
3625
|
+
resumeAfterLeave();
|
|
3626
|
+
delete leavingHooks.afterLeave;
|
|
3627
|
+
};
|
|
3628
|
+
return true;
|
|
3629
|
+
} else if (props.mode === "in-out" && getEnterHooks) {
|
|
3630
|
+
let delayedLeavingVNode = leavingVNode;
|
|
3631
|
+
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
3632
|
+
const enterHooks = getEnterHooks();
|
|
3633
|
+
if (!enterHooks) {
|
|
3634
|
+
delayedLeave();
|
|
3635
|
+
return;
|
|
3636
|
+
}
|
|
3637
|
+
const vnode = delayedLeavingVNode;
|
|
3638
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
3639
|
+
leavingVNodesCache[String(vnode.key)] = vnode;
|
|
3640
|
+
el[leaveCbKey] = () => {
|
|
3641
|
+
earlyRemove();
|
|
3642
|
+
el[leaveCbKey] = void 0;
|
|
3643
|
+
delete enterHooks.delayedLeave;
|
|
3644
|
+
delayedLeavingVNode = void 0;
|
|
3645
|
+
};
|
|
3646
|
+
enterHooks.delayedLeave = () => {
|
|
3647
|
+
delayedLeave();
|
|
3648
|
+
delete enterHooks.delayedLeave;
|
|
3649
|
+
delayedLeavingVNode = void 0;
|
|
3650
|
+
};
|
|
3651
|
+
};
|
|
3652
|
+
}
|
|
3653
|
+
return false;
|
|
3654
|
+
}
|
|
3529
3655
|
function setTransitionHooks(vnode, hooks) {
|
|
3530
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
3531
|
-
else {
|
|
3656
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3532
3657
|
vnode.transition = hooks;
|
|
3533
|
-
setTransitionHooks(vnode.component
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3658
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3659
|
+
else {
|
|
3660
|
+
const subTree = vnode.component.subTree;
|
|
3661
|
+
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
3662
|
+
}
|
|
3663
|
+
} else if (vnode.shapeFlag & 128) {
|
|
3664
|
+
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3665
|
+
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3666
|
+
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
3538
3667
|
} else vnode.transition = hooks;
|
|
3668
|
+
return hooks;
|
|
3539
3669
|
}
|
|
3540
3670
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
3541
3671
|
let ret = [];
|
|
@@ -3559,9 +3689,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3559
3689
|
}
|
|
3560
3690
|
//#endregion
|
|
3561
3691
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
3562
|
-
|
|
3692
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
3563
3693
|
function defineComponent(options, extraOptions) {
|
|
3564
|
-
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
3694
|
+
return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
|
|
3565
3695
|
}
|
|
3566
3696
|
//#endregion
|
|
3567
3697
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
@@ -3658,15 +3788,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3658
3788
|
if (rawRef.f) {
|
|
3659
3789
|
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
3660
3790
|
if (isUnmount) isArray(existing) && remove(existing, refValue);
|
|
3661
|
-
else if (!isArray(existing))
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3791
|
+
else if (!isArray(existing)) {
|
|
3792
|
+
if (_isString) {
|
|
3793
|
+
refs[ref] = [refValue];
|
|
3794
|
+
if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
|
|
3795
|
+
} else {
|
|
3796
|
+
const newVal = [refValue];
|
|
3797
|
+
if (canSetRef(ref, rawRef.k)) ref.value = newVal;
|
|
3798
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
3799
|
+
}
|
|
3800
|
+
} else if (!existing.includes(refValue)) existing.push(refValue);
|
|
3670
3801
|
} else if (_isString) {
|
|
3671
3802
|
refs[ref] = value;
|
|
3672
3803
|
if (canSetSetupRef(ref)) setupState[ref] = value;
|
|
@@ -3718,7 +3849,18 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3718
3849
|
hasLoggedMismatchError = true;
|
|
3719
3850
|
};
|
|
3720
3851
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
3721
|
-
const isMathMLContainer = (container) =>
|
|
3852
|
+
const isMathMLContainer = (container) => {
|
|
3853
|
+
if (!container.namespaceURI.includes("MathML")) return false;
|
|
3854
|
+
if (container.tagName !== "annotation-xml") return true;
|
|
3855
|
+
const encoding = container.getAttribute("encoding");
|
|
3856
|
+
return !encoding || !encoding.includes("html");
|
|
3857
|
+
};
|
|
3858
|
+
/**
|
|
3859
|
+
* Resolve the element namespace a container's children should be created in.
|
|
3860
|
+
* The live DOM is the source of truth, so this also covers containers that are
|
|
3861
|
+
* only known at runtime (interop boundaries, teleport targets).
|
|
3862
|
+
* @internal
|
|
3863
|
+
*/
|
|
3722
3864
|
const getContainerType = (container) => {
|
|
3723
3865
|
if (container.nodeType !== 1) return void 0;
|
|
3724
3866
|
if (isSVGContainer(container)) return "svg";
|
|
@@ -3742,7 +3884,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3742
3884
|
};
|
|
3743
3885
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
3744
3886
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
3745
|
-
const isFragmentStart = isComment(node) && node.data === "[";
|
|
3887
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
3746
3888
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
3747
3889
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
3748
3890
|
let domType = node.nodeType;
|
|
@@ -3756,11 +3898,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3756
3898
|
let nextNode = null;
|
|
3757
3899
|
switch (type) {
|
|
3758
3900
|
case Text:
|
|
3759
|
-
if (domType !== 3)
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3901
|
+
if (domType !== 3) {
|
|
3902
|
+
if (vnode.children === "") {
|
|
3903
|
+
insert(vnode.el = createText(""), parentNode(node), node);
|
|
3904
|
+
nextNode = node;
|
|
3905
|
+
} else nextNode = onMismatch();
|
|
3906
|
+
} else {
|
|
3764
3907
|
if (node.data !== vnode.children) {
|
|
3765
3908
|
warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
|
|
3766
3909
|
logMismatchError();
|
|
@@ -3797,45 +3940,35 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3797
3940
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3798
3941
|
break;
|
|
3799
3942
|
case VaporSlot:
|
|
3800
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
|
|
3943
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
3801
3944
|
break;
|
|
3802
|
-
default: if (shapeFlag & 1)
|
|
3803
|
-
|
|
3804
|
-
|
|
3945
|
+
default: if (shapeFlag & 1) {
|
|
3946
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
|
|
3947
|
+
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3948
|
+
} else if (shapeFlag & 6) {
|
|
3805
3949
|
vnode.slotScopeIds = slotScopeIds;
|
|
3806
3950
|
const container = parentNode(node);
|
|
3807
3951
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
3808
3952
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
3809
3953
|
else nextNode = nextSibling(node);
|
|
3810
|
-
if (vnode.type.__vapor)
|
|
3811
|
-
|
|
3812
|
-
getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
|
|
3813
|
-
if (vnode.dirs) {
|
|
3814
|
-
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
3815
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
3816
|
-
}
|
|
3817
|
-
}, () => {
|
|
3818
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
|
|
3819
|
-
});
|
|
3820
|
-
if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
3821
|
-
const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
|
|
3822
|
-
if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
|
|
3823
|
-
} else {
|
|
3954
|
+
if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
|
|
3955
|
+
else {
|
|
3824
3956
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
3825
3957
|
const component = vnode.component;
|
|
3826
|
-
if (isAsyncWrapper(vnode)
|
|
3958
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep)) {
|
|
3827
3959
|
let subTree;
|
|
3828
3960
|
if (isFragmentStart) {
|
|
3829
|
-
subTree = createVNode(
|
|
3961
|
+
subTree = createVNode(Static);
|
|
3830
3962
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
3831
|
-
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
3963
|
+
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(node.nodeType === 8 ? Comment : "div");
|
|
3832
3964
|
subTree.el = node;
|
|
3833
3965
|
component.subTree = subTree;
|
|
3834
3966
|
}
|
|
3835
3967
|
}
|
|
3836
|
-
} else if (shapeFlag & 64)
|
|
3837
|
-
|
|
3838
|
-
|
|
3968
|
+
} else if (shapeFlag & 64) {
|
|
3969
|
+
if (domType !== 8) nextNode = onMismatch();
|
|
3970
|
+
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
3971
|
+
} else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
3839
3972
|
else warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
3840
3973
|
}
|
|
3841
3974
|
if (ref != null) setRef(ref, null, parentSuspense, vnode);
|
|
@@ -3887,7 +4020,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3887
4020
|
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
3888
4021
|
for (const key in props) {
|
|
3889
4022
|
if (!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
|
|
3890
|
-
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key))
|
|
4023
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
4024
|
+
if (isUnchangedResourceProp(el, key, props[key])) continue;
|
|
4025
|
+
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4026
|
+
}
|
|
3891
4027
|
}
|
|
3892
4028
|
}
|
|
3893
4029
|
let vnodeHooks;
|
|
@@ -3935,8 +4071,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3935
4071
|
const { slotScopeIds: fragmentSlotScopeIds } = vnode;
|
|
3936
4072
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
3937
4073
|
const container = parentNode(node);
|
|
3938
|
-
const
|
|
3939
|
-
|
|
4074
|
+
const first = nextSibling(node);
|
|
4075
|
+
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4076
|
+
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
3940
4077
|
else {
|
|
3941
4078
|
logMismatchError();
|
|
3942
4079
|
insert(vnode.anchor = createComment(`]`), container, next);
|
|
@@ -3945,7 +4082,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3945
4082
|
};
|
|
3946
4083
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
3947
4084
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
3948
|
-
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);
|
|
4085
|
+
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);
|
|
3949
4086
|
logMismatchError();
|
|
3950
4087
|
}
|
|
3951
4088
|
vnode.el = null;
|
|
@@ -3961,20 +4098,22 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3961
4098
|
const container = parentNode(node);
|
|
3962
4099
|
remove(node);
|
|
3963
4100
|
patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
3964
|
-
if (parentComponent) {
|
|
4101
|
+
if (parentComponent && parentComponent.vnode) {
|
|
3965
4102
|
parentComponent.vnode.el = vnode.el;
|
|
3966
4103
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
3967
4104
|
}
|
|
3968
4105
|
return next;
|
|
3969
4106
|
};
|
|
3970
|
-
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
4107
|
+
const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "(" ? "(" : "[", close = open === "(" ? ")" : "]") => {
|
|
3971
4108
|
let match = 0;
|
|
3972
4109
|
while (node) {
|
|
3973
4110
|
node = nextSibling(node);
|
|
3974
4111
|
if (node && isComment(node)) {
|
|
3975
4112
|
if (node.data === open) match++;
|
|
3976
|
-
if (node.data === close)
|
|
3977
|
-
|
|
4113
|
+
if (node.data === close) {
|
|
4114
|
+
if (match === 0) return nextSibling(node);
|
|
4115
|
+
else match--;
|
|
4116
|
+
}
|
|
3978
4117
|
}
|
|
3979
4118
|
}
|
|
3980
4119
|
return node;
|
|
@@ -3984,7 +4123,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3984
4123
|
if (parentNode) parentNode.replaceChild(newNode, oldNode);
|
|
3985
4124
|
let parent = parentComponent;
|
|
3986
4125
|
while (parent) {
|
|
3987
|
-
if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
4126
|
+
if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
3988
4127
|
parent = parent.parent;
|
|
3989
4128
|
}
|
|
3990
4129
|
};
|
|
@@ -3993,6 +4132,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3993
4132
|
const isTemplateNode = (node) => {
|
|
3994
4133
|
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
3995
4134
|
};
|
|
4135
|
+
const resourceProps = /*@__PURE__*/ new Set([
|
|
4136
|
+
"src",
|
|
4137
|
+
"srcset",
|
|
4138
|
+
"href",
|
|
4139
|
+
"poster"
|
|
4140
|
+
]);
|
|
4141
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
4142
|
+
if (!resourceProps.has(key)) return false;
|
|
4143
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
4144
|
+
}
|
|
3996
4145
|
/**
|
|
3997
4146
|
* Dev only
|
|
3998
4147
|
*/
|
|
@@ -4036,7 +4185,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4036
4185
|
function getAttributeMismatch(el, key, clientValue) {
|
|
4037
4186
|
let actual;
|
|
4038
4187
|
let expected;
|
|
4039
|
-
if (
|
|
4188
|
+
if (key === "hidden") {
|
|
4189
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
4190
|
+
expected = normalizeHiddenValue(clientValue);
|
|
4191
|
+
} else if (isBooleanAttr(key)) {
|
|
4040
4192
|
actual = el.hasAttribute(key);
|
|
4041
4193
|
expected = includeBooleanAttr(clientValue);
|
|
4042
4194
|
} else if (clientValue == null) {
|
|
@@ -4064,6 +4216,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4064
4216
|
}
|
|
4065
4217
|
return false;
|
|
4066
4218
|
}
|
|
4219
|
+
function normalizeHiddenValue(value) {
|
|
4220
|
+
if (!isRenderableAttrValue(value)) return false;
|
|
4221
|
+
if (isString(value)) return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
4222
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
4223
|
+
}
|
|
4067
4224
|
function toClassSet(str) {
|
|
4068
4225
|
return new Set(str.trim().split(/\s+/));
|
|
4069
4226
|
}
|
|
@@ -4202,16 +4359,18 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4202
4359
|
return teardown;
|
|
4203
4360
|
};
|
|
4204
4361
|
function forEachElement(node, cb) {
|
|
4205
|
-
if (isComment(node) && node.data === "[") {
|
|
4362
|
+
if (isComment(node) && (node.data === "[" || node.data === "(")) {
|
|
4363
|
+
const open = node.data;
|
|
4364
|
+
const close = open === "[" ? "]" : ")";
|
|
4206
4365
|
let depth = 1;
|
|
4207
4366
|
let next = node.nextSibling;
|
|
4208
4367
|
while (next) {
|
|
4209
4368
|
if (next.nodeType === 1) {
|
|
4210
4369
|
if (cb(next) === false) break;
|
|
4211
4370
|
} else if (isComment(next)) {
|
|
4212
|
-
if (next.data ===
|
|
4371
|
+
if (next.data === close) {
|
|
4213
4372
|
if (--depth === 0) break;
|
|
4214
|
-
} else if (next.data ===
|
|
4373
|
+
} else if (next.data === open) depth++;
|
|
4215
4374
|
}
|
|
4216
4375
|
next = next.nextSibling;
|
|
4217
4376
|
}
|
|
@@ -4220,14 +4379,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4220
4379
|
//#endregion
|
|
4221
4380
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
4222
4381
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4223
|
-
|
|
4382
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4224
4383
|
function defineAsyncComponent(source) {
|
|
4225
4384
|
const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
|
|
4226
4385
|
return /* @__PURE__ */ defineComponent({
|
|
4227
4386
|
name: "AsyncComponentWrapper",
|
|
4228
4387
|
__asyncLoader: load,
|
|
4229
4388
|
__asyncHydrate(el, instance, hydrate) {
|
|
4230
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4389
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4231
4390
|
},
|
|
4232
4391
|
get __asyncResolved() {
|
|
4233
4392
|
return getResolvedComp();
|
|
@@ -4346,10 +4505,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4346
4505
|
* shared between core and vapor
|
|
4347
4506
|
* @internal
|
|
4348
4507
|
*/
|
|
4349
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4508
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4350
4509
|
const wasConnected = el.isConnected;
|
|
4351
4510
|
let patched = false;
|
|
4352
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4511
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4353
4512
|
const performHydrate = () => {
|
|
4354
4513
|
if (patched) {
|
|
4355
4514
|
{
|
|
@@ -4435,10 +4594,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4435
4594
|
});
|
|
4436
4595
|
let pendingCacheKey = null;
|
|
4437
4596
|
const cacheSubtree = () => {
|
|
4438
|
-
if (pendingCacheKey != null)
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4597
|
+
if (pendingCacheKey != null) {
|
|
4598
|
+
if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
|
|
4599
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
4600
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
4601
|
+
}, void 0, keepAliveInstance.subTree.suspense);
|
|
4602
|
+
else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
4603
|
+
}
|
|
4442
4604
|
};
|
|
4443
4605
|
onMounted(cacheSubtree);
|
|
4444
4606
|
onUpdated(cacheSubtree);
|
|
@@ -4595,7 +4757,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4595
4757
|
try {
|
|
4596
4758
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
4597
4759
|
} finally {
|
|
4598
|
-
|
|
4760
|
+
restoreCurrentInstance(prev);
|
|
4599
4761
|
setActiveSub(prevSub);
|
|
4600
4762
|
}
|
|
4601
4763
|
});
|
|
@@ -4680,23 +4842,25 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4680
4842
|
}
|
|
4681
4843
|
ret = new Array(source.length);
|
|
4682
4844
|
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]);
|
|
4683
|
-
} else if (typeof source === "number")
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
4691
|
-
else {
|
|
4692
|
-
const keys = Object.keys(source);
|
|
4693
|
-
ret = new Array(keys.length);
|
|
4694
|
-
for (let i = 0, l = keys.length; i < l; i++) {
|
|
4695
|
-
const key = keys[i];
|
|
4696
|
-
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
4845
|
+
} else if (typeof source === "number") {
|
|
4846
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
4847
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
4848
|
+
ret = [];
|
|
4849
|
+
} else {
|
|
4850
|
+
ret = new Array(source);
|
|
4851
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
4697
4852
|
}
|
|
4698
|
-
}
|
|
4699
|
-
|
|
4853
|
+
} else if (isObject(source)) {
|
|
4854
|
+
if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
4855
|
+
else {
|
|
4856
|
+
const keys = Object.keys(source);
|
|
4857
|
+
ret = new Array(keys.length);
|
|
4858
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
4859
|
+
const key = keys[i];
|
|
4860
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
4861
|
+
}
|
|
4862
|
+
}
|
|
4863
|
+
} else ret = [];
|
|
4700
4864
|
if (cache) cache[index] = ret;
|
|
4701
4865
|
return ret;
|
|
4702
4866
|
}
|
|
@@ -4721,18 +4885,28 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4721
4885
|
//#endregion
|
|
4722
4886
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
4723
4887
|
/**
|
|
4888
|
+
* Links a slot function to its raw vapor slot: a raw vapor slot carries
|
|
4889
|
+
* itself, and the wrapper the interop slots proxy hands out carries the raw
|
|
4890
|
+
* slot it wraps — one lookup answers both "is this a vapor slot" and
|
|
4891
|
+
* "which one". Internal to vapor interop.
|
|
4892
|
+
*/
|
|
4893
|
+
const rawVaporSlotKey = Symbol(`rawVaporSlot`);
|
|
4894
|
+
/**
|
|
4724
4895
|
* Compiler runtime helper for rendering `<slot/>`
|
|
4725
4896
|
* @private
|
|
4726
4897
|
*/
|
|
4727
|
-
function renderSlot(slots, name, props
|
|
4898
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
4899
|
+
if (props == null) props = {};
|
|
4728
4900
|
let slot = slots[name];
|
|
4729
|
-
|
|
4730
|
-
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
4901
|
+
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
4731
4902
|
if (vaporSlot) {
|
|
4732
4903
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
4733
4904
|
ret.vs = {
|
|
4734
4905
|
slot: vaporSlot,
|
|
4735
|
-
fallback
|
|
4906
|
+
outlets: fallback ? [{
|
|
4907
|
+
fallback,
|
|
4908
|
+
owner: currentRenderingInstance
|
|
4909
|
+
}] : void 0
|
|
4736
4910
|
};
|
|
4737
4911
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
4738
4912
|
return ret;
|
|
@@ -4753,9 +4927,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4753
4927
|
let rendered;
|
|
4754
4928
|
try {
|
|
4755
4929
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
4756
|
-
|
|
4930
|
+
let attached = false;
|
|
4931
|
+
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
4932
|
+
const interop = currentRenderingInstance.appContext.vapor;
|
|
4933
|
+
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
4934
|
+
}
|
|
4757
4935
|
const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
|
|
4758
4936
|
rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
4937
|
+
if (!validSlotContent && fallback) rendered.shapeFlag |= 1024;
|
|
4938
|
+
if (attached) rendered.vo = true;
|
|
4759
4939
|
} catch (err) {
|
|
4760
4940
|
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
4761
4941
|
throw err;
|
|
@@ -4773,10 +4953,6 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4773
4953
|
return true;
|
|
4774
4954
|
}) ? vnodes : null;
|
|
4775
4955
|
}
|
|
4776
|
-
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
4777
|
-
let vaporSlot;
|
|
4778
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
4779
|
-
}
|
|
4780
4956
|
//#endregion
|
|
4781
4957
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
4782
4958
|
/**
|
|
@@ -4804,11 +4980,38 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4804
4980
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
4805
4981
|
return getPublicInstance(i.parent);
|
|
4806
4982
|
};
|
|
4983
|
+
const resolveDevRootEl = (vnode) => {
|
|
4984
|
+
let found = false;
|
|
4985
|
+
while (true) {
|
|
4986
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
4987
|
+
const root = filterSingleRoot(vnode.children);
|
|
4988
|
+
if (!root) return;
|
|
4989
|
+
vnode = root;
|
|
4990
|
+
found = true;
|
|
4991
|
+
continue;
|
|
4992
|
+
}
|
|
4993
|
+
const component = vnode.component;
|
|
4994
|
+
if (component && component.subTree) {
|
|
4995
|
+
vnode = component.subTree;
|
|
4996
|
+
continue;
|
|
4997
|
+
}
|
|
4998
|
+
const suspense = vnode.suspense;
|
|
4999
|
+
if (suspense && suspense.activeBranch) {
|
|
5000
|
+
vnode = suspense.activeBranch;
|
|
5001
|
+
continue;
|
|
5002
|
+
}
|
|
5003
|
+
return found ? vnode.el : void 0;
|
|
5004
|
+
}
|
|
5005
|
+
};
|
|
5006
|
+
const getDevRootFragmentEl = (i) => {
|
|
5007
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
5008
|
+
return el === void 0 ? i.vnode.el : el;
|
|
5009
|
+
};
|
|
4807
5010
|
let publicPropertiesMap;
|
|
4808
5011
|
const getPublicPropertiesMap = () => {
|
|
4809
5012
|
if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
|
|
4810
5013
|
$: (i) => i,
|
|
4811
|
-
$el: (i) => i
|
|
5014
|
+
$el: (i) => getDevRootFragmentEl(i),
|
|
4812
5015
|
$data: (i) => i.data,
|
|
4813
5016
|
$props: (i) => /* @__PURE__ */ shallowReadonly(i.props),
|
|
4814
5017
|
$attrs: (i) => /* @__PURE__ */ shallowReadonly(i.attrs),
|
|
@@ -4914,7 +5117,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4914
5117
|
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.");
|
|
4915
5118
|
return Reflect.ownKeys(target);
|
|
4916
5119
|
};
|
|
4917
|
-
const RuntimeCompiledPublicInstanceProxyHandlers =
|
|
5120
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
|
|
4918
5121
|
get(target, key) {
|
|
4919
5122
|
if (key === Symbol.unscopables) return;
|
|
4920
5123
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
@@ -5086,12 +5289,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5086
5289
|
for (const key in defaults) {
|
|
5087
5290
|
if (key.startsWith("__skip")) continue;
|
|
5088
5291
|
let opt = props[key];
|
|
5089
|
-
if (opt)
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5292
|
+
if (opt) {
|
|
5293
|
+
if (isArray(opt) || isFunction(opt)) opt = props[key] = {
|
|
5294
|
+
type: opt,
|
|
5295
|
+
default: defaults[key]
|
|
5296
|
+
};
|
|
5297
|
+
else opt.default = defaults[key];
|
|
5298
|
+
} else if (opt === null) opt = props[key] = { default: defaults[key] };
|
|
5095
5299
|
else warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
5096
5300
|
if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
|
|
5097
5301
|
}
|
|
@@ -5141,37 +5345,32 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5141
5345
|
function withAsyncContext(getAwaitable) {
|
|
5142
5346
|
const ctx = getCurrentGenericInstance();
|
|
5143
5347
|
const inSSRSetup = isInSSRComponentSetup;
|
|
5144
|
-
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
5145
5348
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
5146
5349
|
let awaitable = getAwaitable();
|
|
5147
5350
|
setCurrentInstance(null, void 0);
|
|
5148
5351
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5149
5352
|
const restore = () => {
|
|
5150
|
-
const
|
|
5353
|
+
const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5151
5354
|
setCurrentInstance(ctx);
|
|
5152
5355
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
5153
|
-
|
|
5154
|
-
return () => {
|
|
5155
|
-
if (reset) reset();
|
|
5156
|
-
if (resetStoppedScope) resetStoppedScope.reset();
|
|
5157
|
-
};
|
|
5356
|
+
return stoppedScope;
|
|
5158
5357
|
};
|
|
5159
5358
|
const cleanup = () => {
|
|
5160
5359
|
setCurrentInstance(null, void 0);
|
|
5161
5360
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5162
5361
|
};
|
|
5163
5362
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
5164
|
-
const
|
|
5363
|
+
const stoppedScope = restore();
|
|
5165
5364
|
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
5166
|
-
if (
|
|
5365
|
+
if (stoppedScope) stoppedScope.reset();
|
|
5167
5366
|
cleanup();
|
|
5168
5367
|
}));
|
|
5169
5368
|
throw e;
|
|
5170
5369
|
});
|
|
5171
5370
|
return [awaitable, () => {
|
|
5172
|
-
const
|
|
5371
|
+
const stoppedScope = restore();
|
|
5173
5372
|
Promise.resolve().then(() => {
|
|
5174
|
-
if (
|
|
5373
|
+
if (stoppedScope) stoppedScope.reset();
|
|
5175
5374
|
cleanup();
|
|
5176
5375
|
});
|
|
5177
5376
|
}];
|
|
@@ -5234,11 +5433,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5234
5433
|
const opt = computedOptions[key];
|
|
5235
5434
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
5236
5435
|
if (get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
|
|
5436
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
|
|
5437
|
+
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
5438
|
+
};
|
|
5237
5439
|
const c = computed({
|
|
5238
5440
|
get,
|
|
5239
|
-
set
|
|
5240
|
-
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
5241
|
-
}
|
|
5441
|
+
set
|
|
5242
5442
|
});
|
|
5243
5443
|
Object.defineProperty(ctx, key, {
|
|
5244
5444
|
enumerable: true,
|
|
@@ -5294,9 +5494,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5294
5494
|
for (const key in injectOptions) {
|
|
5295
5495
|
const opt = injectOptions[key];
|
|
5296
5496
|
let injected;
|
|
5297
|
-
if (isObject(opt))
|
|
5298
|
-
|
|
5299
|
-
|
|
5497
|
+
if (isObject(opt)) {
|
|
5498
|
+
if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
|
|
5499
|
+
else injected = inject(opt.from || key);
|
|
5500
|
+
} else injected = inject(opt);
|
|
5300
5501
|
if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
|
|
5301
5502
|
enumerable: true,
|
|
5302
5503
|
configurable: true,
|
|
@@ -5317,13 +5518,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5317
5518
|
if (isFunction(handler)) watch(getter, handler);
|
|
5318
5519
|
else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
5319
5520
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
|
|
5320
|
-
else if (isObject(raw))
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5521
|
+
else if (isObject(raw)) {
|
|
5522
|
+
if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
5523
|
+
else {
|
|
5524
|
+
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
5525
|
+
if (isFunction(handler)) watch(getter, handler, raw);
|
|
5526
|
+
else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
5527
|
+
}
|
|
5528
|
+
} else warn$1(`Invalid watch option: "${key}"`, raw);
|
|
5327
5529
|
}
|
|
5328
5530
|
/**
|
|
5329
5531
|
* Resolve merged options and cache it on the component.
|
|
@@ -5409,7 +5611,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5409
5611
|
}
|
|
5410
5612
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
5411
5613
|
if (to) {
|
|
5412
|
-
if (isArray(to) && isArray(from)) return [
|
|
5614
|
+
if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
5413
5615
|
return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
|
|
5414
5616
|
} else return from;
|
|
5415
5617
|
}
|
|
@@ -5528,8 +5730,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5528
5730
|
} else warn$1(`Cannot unmount an app that is not mounted.`);
|
|
5529
5731
|
},
|
|
5530
5732
|
provide(key, value) {
|
|
5531
|
-
if (key in context.provides)
|
|
5532
|
-
|
|
5733
|
+
if (key in context.provides) {
|
|
5734
|
+
if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
|
|
5735
|
+
else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
|
|
5736
|
+
}
|
|
5533
5737
|
context.provides[key] = value;
|
|
5534
5738
|
return app;
|
|
5535
5739
|
},
|
|
@@ -5568,13 +5772,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5568
5772
|
const modifiers = getModelModifiers(props, camelizedName, defaultPropGetter);
|
|
5569
5773
|
const res = customRef((track, trigger) => {
|
|
5570
5774
|
let localValue;
|
|
5775
|
+
let prevPropValue = EMPTY_OBJ;
|
|
5571
5776
|
let prevSetValue = EMPTY_OBJ;
|
|
5572
5777
|
let prevEmittedValue;
|
|
5573
5778
|
watchSyncEffect(() => {
|
|
5574
5779
|
const propValue = props[camelizedName];
|
|
5575
|
-
if (hasChanged(
|
|
5576
|
-
|
|
5577
|
-
|
|
5780
|
+
if (hasChanged(prevPropValue, propValue)) {
|
|
5781
|
+
prevPropValue = propValue;
|
|
5782
|
+
if (hasChanged(localValue, propValue)) {
|
|
5783
|
+
localValue = propValue;
|
|
5784
|
+
trigger();
|
|
5785
|
+
}
|
|
5578
5786
|
}
|
|
5579
5787
|
});
|
|
5580
5788
|
return {
|
|
@@ -5636,12 +5844,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5636
5844
|
if (instance.isUnmounted) return;
|
|
5637
5845
|
{
|
|
5638
5846
|
const { emitsOptions, propsOptions } = instance;
|
|
5639
|
-
if (emitsOptions)
|
|
5640
|
-
if (!
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
if (
|
|
5847
|
+
if (emitsOptions) {
|
|
5848
|
+
if (!(event in emitsOptions) && true) {
|
|
5849
|
+
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.`);
|
|
5850
|
+
} else {
|
|
5851
|
+
const validator = emitsOptions[event];
|
|
5852
|
+
if (isFunction(validator)) {
|
|
5853
|
+
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
5854
|
+
}
|
|
5645
5855
|
}
|
|
5646
5856
|
}
|
|
5647
5857
|
}
|
|
@@ -5650,7 +5860,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5650
5860
|
const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
|
|
5651
5861
|
if (modifiers) {
|
|
5652
5862
|
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
5653
|
-
if (modifiers.number) args =
|
|
5863
|
+
if (modifiers.number) args = args.map(looseToNumber);
|
|
5654
5864
|
}
|
|
5655
5865
|
devtoolsComponentEmit(instance, event, args);
|
|
5656
5866
|
{
|
|
@@ -5777,8 +5987,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5777
5987
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
5778
5988
|
}
|
|
5779
5989
|
if (vnode.transition) {
|
|
5780
|
-
|
|
5781
|
-
|
|
5990
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
5991
|
+
if (!isElementRoot(child)) warn$1("Component inside <Transition> renders non-element root node that cannot be animated.");
|
|
5992
|
+
setTransitionHooks(child, vnode.transition);
|
|
5782
5993
|
}
|
|
5783
5994
|
if (setRoot) setRoot(root);
|
|
5784
5995
|
else result = root;
|
|
@@ -5829,18 +6040,21 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5829
6040
|
for (let i = 0; i < children.length; i++) {
|
|
5830
6041
|
const child = children[i];
|
|
5831
6042
|
if (isVNode(child)) {
|
|
5832
|
-
if (child.type !== Comment || child.children === "v-if")
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
6043
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
6044
|
+
if (singleRoot) return;
|
|
6045
|
+
else {
|
|
6046
|
+
singleRoot = child;
|
|
6047
|
+
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
6048
|
+
}
|
|
5836
6049
|
}
|
|
5837
6050
|
} else return;
|
|
5838
6051
|
}
|
|
5839
6052
|
return singleRoot;
|
|
5840
6053
|
}
|
|
6054
|
+
const isFunctionalFallthroughKey = (key) => key === "class" || key === "style" || isOn(key);
|
|
5841
6055
|
const getFunctionalFallthrough = (attrs) => {
|
|
5842
6056
|
let res;
|
|
5843
|
-
for (const key in attrs) if (
|
|
6057
|
+
for (const key in attrs) if (isFunctionalFallthroughKey(key)) (res || (res = {}))[key] = attrs[key];
|
|
5844
6058
|
return res;
|
|
5845
6059
|
};
|
|
5846
6060
|
const filterModelListeners = (attrs, props) => {
|
|
@@ -5952,16 +6166,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5952
6166
|
let key = propsToUpdate[i];
|
|
5953
6167
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
5954
6168
|
const value = rawProps[key];
|
|
5955
|
-
if (options)
|
|
5956
|
-
if (
|
|
5957
|
-
attrs[key]
|
|
5958
|
-
|
|
6169
|
+
if (options) {
|
|
6170
|
+
if (hasOwn(attrs, key)) {
|
|
6171
|
+
if (value !== attrs[key]) {
|
|
6172
|
+
attrs[key] = value;
|
|
6173
|
+
hasAttrsChanged = true;
|
|
6174
|
+
}
|
|
6175
|
+
} else {
|
|
6176
|
+
const camelizedKey = camelize(key);
|
|
6177
|
+
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
5959
6178
|
}
|
|
5960
|
-
} else {
|
|
5961
|
-
const camelizedKey = camelize(key);
|
|
5962
|
-
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
5963
|
-
}
|
|
5964
|
-
else if (value !== attrs[key]) {
|
|
6179
|
+
} else if (value !== attrs[key]) {
|
|
5965
6180
|
attrs[key] = value;
|
|
5966
6181
|
hasAttrsChanged = true;
|
|
5967
6182
|
}
|
|
@@ -5970,9 +6185,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5970
6185
|
} else {
|
|
5971
6186
|
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
5972
6187
|
let kebabKey;
|
|
5973
|
-
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
|
5974
|
-
if (
|
|
5975
|
-
|
|
6188
|
+
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
6189
|
+
if (options) {
|
|
6190
|
+
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
|
|
6191
|
+
} else delete props[key];
|
|
6192
|
+
}
|
|
5976
6193
|
if (attrs !== rawCurrentProps) {
|
|
5977
6194
|
for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
|
|
5978
6195
|
delete attrs[key];
|
|
@@ -5991,9 +6208,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5991
6208
|
if (isReservedProp(key)) continue;
|
|
5992
6209
|
const value = rawProps[key];
|
|
5993
6210
|
let camelKey;
|
|
5994
|
-
if (options && hasOwn(options, camelKey = camelize(key)))
|
|
5995
|
-
|
|
5996
|
-
|
|
6211
|
+
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
6212
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
|
|
6213
|
+
else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
6214
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
5997
6215
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
5998
6216
|
attrs[key] = value;
|
|
5999
6217
|
hasAttrsChanged = true;
|
|
@@ -6040,7 +6258,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6040
6258
|
const prev = setCurrentInstance(instance);
|
|
6041
6259
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
6042
6260
|
value = factory.call(null, props);
|
|
6043
|
-
|
|
6261
|
+
restoreCurrentInstance(prev);
|
|
6044
6262
|
return value;
|
|
6045
6263
|
}
|
|
6046
6264
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -6156,7 +6374,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6156
6374
|
}
|
|
6157
6375
|
if (validator && !validator(value, /* @__PURE__ */ shallowReadonly(resolvedProps))) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
|
|
6158
6376
|
}
|
|
6159
|
-
const isSimpleType =
|
|
6377
|
+
const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
6160
6378
|
/**
|
|
6161
6379
|
* dev only
|
|
6162
6380
|
*/
|
|
@@ -6269,12 +6487,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6269
6487
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
6270
6488
|
if (vnode.shapeFlag & 32) {
|
|
6271
6489
|
const type = children._;
|
|
6272
|
-
if (type)
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6490
|
+
if (type) {
|
|
6491
|
+
if (isHmrUpdating) {
|
|
6492
|
+
assignSlots(slots, children, optimized);
|
|
6493
|
+
trigger(instance, "set", "$slots");
|
|
6494
|
+
} else if (optimized && type === 1) needDeletionCheck = false;
|
|
6495
|
+
else assignSlots(slots, children, optimized);
|
|
6496
|
+
} else {
|
|
6278
6497
|
needDeletionCheck = !children.$stable;
|
|
6279
6498
|
normalizeObjectSlots(children, slots, instance);
|
|
6280
6499
|
}
|
|
@@ -6292,7 +6511,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6292
6511
|
let supported;
|
|
6293
6512
|
let perf;
|
|
6294
6513
|
let cachedNow$1 = 0;
|
|
6295
|
-
const p$1 =
|
|
6514
|
+
const p$1 = /*@__PURE__*/ Promise.resolve();
|
|
6296
6515
|
const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
|
|
6297
6516
|
/**
|
|
6298
6517
|
* @internal
|
|
@@ -6373,6 +6592,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6373
6592
|
optimized = false;
|
|
6374
6593
|
n2.dynamicChildren = null;
|
|
6375
6594
|
}
|
|
6595
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
6596
|
+
if (n2.dynamicChildren === EMPTY_ARR) n2.dynamicChildren = [];
|
|
6597
|
+
n2.dynamicChildren.hasOnce = true;
|
|
6598
|
+
}
|
|
6376
6599
|
const { type, ref, shapeFlag } = n2;
|
|
6377
6600
|
switch (type) {
|
|
6378
6601
|
case Text:
|
|
@@ -6389,7 +6612,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6389
6612
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6390
6613
|
break;
|
|
6391
6614
|
case VaporSlot:
|
|
6392
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
|
|
6615
|
+
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
6393
6616
|
break;
|
|
6394
6617
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6395
6618
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -6508,7 +6731,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6508
6731
|
for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
|
|
6509
6732
|
};
|
|
6510
6733
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
6511
|
-
for (let i = start; i < children.length; i++)
|
|
6734
|
+
for (let i = start; i < children.length; i++) {
|
|
6735
|
+
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
6736
|
+
patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6737
|
+
}
|
|
6512
6738
|
};
|
|
6513
6739
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6514
6740
|
const el = n2.el = n1.el;
|
|
@@ -6520,6 +6746,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6520
6746
|
let vnodeHook;
|
|
6521
6747
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
6522
6748
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6749
|
+
if (n2.ibu) n2.ibu();
|
|
6523
6750
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6524
6751
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
6525
6752
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -6553,8 +6780,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6553
6780
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
6554
6781
|
}
|
|
6555
6782
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
6556
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
|
|
6783
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
6557
6784
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6785
|
+
n2.iu && n2.iu();
|
|
6558
6786
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6559
6787
|
}, void 0, parentSuspense);
|
|
6560
6788
|
};
|
|
@@ -6562,7 +6790,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6562
6790
|
for (let i = 0; i < newChildren.length; i++) {
|
|
6563
6791
|
const oldVNode = oldChildren[i];
|
|
6564
6792
|
const newVNode = newChildren[i];
|
|
6565
|
-
|
|
6793
|
+
const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
|
|
6794
|
+
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
6566
6795
|
}
|
|
6567
6796
|
};
|
|
6568
6797
|
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
@@ -6600,41 +6829,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6600
6829
|
};
|
|
6601
6830
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6602
6831
|
n2.slotScopeIds = slotScopeIds;
|
|
6603
|
-
if (n2.type.__vapor)
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
6613
|
-
});
|
|
6614
|
-
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
6615
|
-
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
6616
|
-
if (vnodeMountedHook) {
|
|
6617
|
-
const scopedVNode = n2;
|
|
6618
|
-
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
6619
|
-
}
|
|
6620
|
-
}
|
|
6621
|
-
else {
|
|
6622
|
-
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
6623
|
-
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
6624
|
-
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6625
|
-
}, () => {
|
|
6626
|
-
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
6627
|
-
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
6628
|
-
});
|
|
6629
|
-
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
6630
|
-
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
6631
|
-
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6632
|
-
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
6633
|
-
}, void 0, parentSuspense);
|
|
6634
|
-
}
|
|
6635
|
-
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
6636
|
-
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
6637
|
-
else updateComponent(n1, n2, optimized);
|
|
6832
|
+
if (n2.type.__vapor) {
|
|
6833
|
+
if (n1 == null) {
|
|
6834
|
+
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
6835
|
+
else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
|
|
6836
|
+
} else getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdateComponent(n1, n2, optimized));
|
|
6837
|
+
} else if (n1 == null) {
|
|
6838
|
+
if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
6839
|
+
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
6840
|
+
} else updateComponent(n1, n2, optimized);
|
|
6638
6841
|
};
|
|
6639
6842
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
6640
6843
|
const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
|
|
@@ -6675,16 +6878,18 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6675
6878
|
};
|
|
6676
6879
|
const updateComponent = (n1, n2, optimized) => {
|
|
6677
6880
|
const instance = n2.component = n1.component;
|
|
6678
|
-
if (shouldUpdateComponent(n1, n2, optimized))
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6881
|
+
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
6882
|
+
if (instance.asyncDep && !instance.asyncResolved) {
|
|
6883
|
+
pushWarningContext(n2);
|
|
6884
|
+
n2.el = n1.el;
|
|
6885
|
+
updateComponentPreRender(instance, n2, optimized);
|
|
6886
|
+
popWarningContext();
|
|
6887
|
+
return;
|
|
6888
|
+
} else {
|
|
6889
|
+
instance.next = n2;
|
|
6890
|
+
instance.effect.run();
|
|
6891
|
+
}
|
|
6683
6892
|
} else {
|
|
6684
|
-
instance.next = n2;
|
|
6685
|
-
instance.effect.run();
|
|
6686
|
-
}
|
|
6687
|
-
else {
|
|
6688
6893
|
n2.el = n1.el;
|
|
6689
6894
|
instance.vnode = n2;
|
|
6690
6895
|
}
|
|
@@ -6782,6 +6987,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6782
6987
|
} else next = vnode;
|
|
6783
6988
|
if (bu) invokeArrayFns(bu);
|
|
6784
6989
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
6990
|
+
if (next.ibu) next.ibu();
|
|
6785
6991
|
toggleRecurse(instance, true);
|
|
6786
6992
|
startMeasure(instance, `render`);
|
|
6787
6993
|
const nextTree = renderComponentRoot(instance);
|
|
@@ -6794,7 +7000,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6794
7000
|
next.el = nextTree.el;
|
|
6795
7001
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
6796
7002
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
6797
|
-
if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() =>
|
|
7003
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
7004
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
7005
|
+
next.iu && next.iu();
|
|
7006
|
+
}, void 0, parentSuspense);
|
|
6798
7007
|
devtoolsComponentUpdated(instance);
|
|
6799
7008
|
popWarningContext();
|
|
6800
7009
|
}
|
|
@@ -6834,9 +7043,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6834
7043
|
if (shapeFlag & 8) {
|
|
6835
7044
|
if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
|
|
6836
7045
|
if (c2 !== c1) hostSetElementText(container, c2);
|
|
6837
|
-
} else if (prevShapeFlag & 16)
|
|
6838
|
-
|
|
6839
|
-
|
|
7046
|
+
} else if (prevShapeFlag & 16) {
|
|
7047
|
+
if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7048
|
+
else unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
7049
|
+
} else {
|
|
6840
7050
|
if (prevShapeFlag & 8) hostSetElementText(container, "");
|
|
6841
7051
|
if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6842
7052
|
}
|
|
@@ -6935,15 +7145,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6935
7145
|
const anchorVNode = c2[nextIndex + 1];
|
|
6936
7146
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
6937
7147
|
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6938
|
-
else if (moved)
|
|
6939
|
-
|
|
7148
|
+
else if (moved) {
|
|
7149
|
+
if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
|
|
7150
|
+
else j--;
|
|
7151
|
+
}
|
|
6940
7152
|
}
|
|
6941
7153
|
}
|
|
6942
7154
|
};
|
|
6943
7155
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
6944
7156
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
6945
7157
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
6946
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
7158
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
6947
7159
|
return;
|
|
6948
7160
|
}
|
|
6949
7161
|
if (shapeFlag & 6) {
|
|
@@ -6968,54 +7180,37 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6968
7180
|
moveStaticNode(vnode, container, anchor);
|
|
6969
7181
|
return;
|
|
6970
7182
|
}
|
|
6971
|
-
if (moveType !== 2 && shapeFlag & 1 && transition)
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
const remove = () => {
|
|
7183
|
+
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
7184
|
+
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
7185
|
+
else performTransitionLeave(el, transition, () => {
|
|
6975
7186
|
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
6976
7187
|
else hostInsert(el, container, anchor);
|
|
6977
|
-
};
|
|
6978
|
-
|
|
6979
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
6980
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
6981
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
6982
|
-
else leave(el, () => {
|
|
6983
|
-
remove();
|
|
6984
|
-
afterLeave && afterLeave();
|
|
6985
|
-
});
|
|
6986
|
-
};
|
|
6987
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
6988
|
-
else performLeave();
|
|
6989
|
-
}
|
|
6990
|
-
else hostInsert(el, container, anchor);
|
|
7188
|
+
}, true, true);
|
|
7189
|
+
} else hostInsert(el, container, anchor);
|
|
6991
7190
|
};
|
|
6992
7191
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
6993
7192
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
6994
|
-
if (patchFlag === -2) optimized = false;
|
|
7193
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) optimized = false;
|
|
6995
7194
|
if (ref != null) {
|
|
6996
7195
|
const prevSub = setActiveSub();
|
|
6997
7196
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
6998
7197
|
setActiveSub(prevSub);
|
|
6999
7198
|
}
|
|
7000
|
-
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
7199
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
7001
7200
|
if (shapeFlag & 256) {
|
|
7002
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
7201
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
7003
7202
|
else parentComponent.ctx.deactivate(vnode);
|
|
7004
7203
|
return;
|
|
7005
7204
|
}
|
|
7205
|
+
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
7206
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7207
|
+
return;
|
|
7208
|
+
}
|
|
7006
7209
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
7007
7210
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
7008
7211
|
let vnodeHook;
|
|
7009
7212
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7010
|
-
if (shapeFlag & 6)
|
|
7011
|
-
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
7012
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
7013
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
7014
|
-
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
7015
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7016
|
-
}, void 0, parentSuspense);
|
|
7017
|
-
return;
|
|
7018
|
-
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
7213
|
+
if (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
7019
7214
|
else {
|
|
7020
7215
|
if (shapeFlag & 128) {
|
|
7021
7216
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
@@ -7026,7 +7221,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7026
7221
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
7027
7222
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
7028
7223
|
if (type === VaporSlot) {
|
|
7029
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
7224
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7030
7225
|
return;
|
|
7031
7226
|
}
|
|
7032
7227
|
if (doRemove) remove(vnode);
|
|
@@ -7050,6 +7245,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7050
7245
|
}
|
|
7051
7246
|
if (type === Static) {
|
|
7052
7247
|
removeStaticNode(vnode);
|
|
7248
|
+
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
7053
7249
|
return;
|
|
7054
7250
|
}
|
|
7055
7251
|
if (transition) performTransitionLeave(el, transition, () => hostRemove(el), !!(vnode.shapeFlag & 1));
|
|
@@ -7074,7 +7270,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7074
7270
|
if (effect) {
|
|
7075
7271
|
effect.stop();
|
|
7076
7272
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
7077
|
-
} else if (
|
|
7273
|
+
} else if (instance.vnode.el && subTree) {
|
|
7274
|
+
subTree.transition = instance.vnode.transition;
|
|
7275
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
7276
|
+
}
|
|
7078
7277
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
7079
7278
|
queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
|
|
7080
7279
|
devtoolsComponentRemoved(instance);
|
|
@@ -7148,12 +7347,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7148
7347
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
7149
7348
|
}
|
|
7150
7349
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
7151
|
-
if (!vapor)
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7350
|
+
if (!vapor) {
|
|
7351
|
+
if (allowed) {
|
|
7352
|
+
effect.flags |= 128;
|
|
7353
|
+
job.flags |= 2;
|
|
7354
|
+
} else {
|
|
7355
|
+
effect.flags &= -129;
|
|
7356
|
+
job.flags &= -3;
|
|
7357
|
+
}
|
|
7157
7358
|
}
|
|
7158
7359
|
}
|
|
7159
7360
|
function needTransition(parentSuspense, transition) {
|
|
@@ -7193,8 +7394,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7193
7394
|
}
|
|
7194
7395
|
function locateNonHydratedAsyncRoot(instance) {
|
|
7195
7396
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
7196
|
-
if (subComponent)
|
|
7197
|
-
|
|
7397
|
+
if (subComponent) {
|
|
7398
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
7399
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
7400
|
+
}
|
|
7198
7401
|
}
|
|
7199
7402
|
function invalidateMount(hooks) {
|
|
7200
7403
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
@@ -7213,13 +7416,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7213
7416
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
7214
7417
|
const performRemove = () => {
|
|
7215
7418
|
remove();
|
|
7216
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
7419
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
7217
7420
|
};
|
|
7218
7421
|
if (force || isElement && transition && !transition.persisted) {
|
|
7219
7422
|
const { leave, delayLeave } = transition;
|
|
7220
7423
|
const performLeave = () => {
|
|
7424
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7221
7425
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
7222
|
-
|
|
7426
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
7427
|
+
else leave(el, performRemove);
|
|
7223
7428
|
};
|
|
7224
7429
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
7225
7430
|
else performLeave();
|
|
@@ -7238,7 +7443,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7238
7443
|
/**
|
|
7239
7444
|
* shared between vdom and vapor
|
|
7240
7445
|
*/
|
|
7241
|
-
function getInheritedScopeIds(vnode, parentComponent) {
|
|
7446
|
+
function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
|
|
7242
7447
|
const inheritedScopeIds = [];
|
|
7243
7448
|
let currentParent = parentComponent;
|
|
7244
7449
|
let currentVNode = vnode;
|
|
@@ -7254,6 +7459,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7254
7459
|
currentParent = currentParent.parent;
|
|
7255
7460
|
} else break;
|
|
7256
7461
|
}
|
|
7462
|
+
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
7463
|
+
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
7257
7464
|
return inheritedScopeIds;
|
|
7258
7465
|
}
|
|
7259
7466
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
@@ -7272,7 +7479,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7272
7479
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
7273
7480
|
if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
|
|
7274
7481
|
else {
|
|
7275
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
7482
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
7276
7483
|
n2.suspense = n1.suspense;
|
|
7277
7484
|
n2.suspense.vnode = n2;
|
|
7278
7485
|
n2.el = n1.el;
|
|
@@ -7310,10 +7517,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7310
7517
|
if (pendingBranch) {
|
|
7311
7518
|
suspense.pendingBranch = newBranch;
|
|
7312
7519
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
7313
|
-
|
|
7520
|
+
suspense.deps++;
|
|
7521
|
+
patch(pendingBranch, newBranch, isHydrating ? container : suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
7522
|
+
suspense.deps--;
|
|
7314
7523
|
if (suspense.deps <= 0) suspense.resolve();
|
|
7315
7524
|
else if (isInFallback) {
|
|
7316
|
-
if (!isHydrating) {
|
|
7525
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
7317
7526
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7318
7527
|
setActiveBranch(suspense, newFallback);
|
|
7319
7528
|
}
|
|
@@ -7325,12 +7534,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7325
7534
|
suspense.activeBranch = pendingBranch;
|
|
7326
7535
|
} else unmount(pendingBranch, parentComponent, suspense);
|
|
7327
7536
|
suspense.deps = 0;
|
|
7537
|
+
for (let i = 0; i < suspense.effects.length; i++) {
|
|
7538
|
+
const effect = suspense.effects[i];
|
|
7539
|
+
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
7540
|
+
}
|
|
7328
7541
|
suspense.effects.length = 0;
|
|
7329
7542
|
suspense.hiddenContainer = createElement("div");
|
|
7330
7543
|
if (isInFallback) {
|
|
7331
7544
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
7332
7545
|
if (suspense.deps <= 0) suspense.resolve();
|
|
7333
|
-
else {
|
|
7546
|
+
else if (!suspense.isFallbackMountPending) {
|
|
7334
7547
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7335
7548
|
setActiveBranch(suspense, newFallback);
|
|
7336
7549
|
}
|
|
@@ -7432,7 +7645,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7432
7645
|
let hasUnresolvedAncestor = false;
|
|
7433
7646
|
while (parent) {
|
|
7434
7647
|
if (parent.pendingBranch) {
|
|
7435
|
-
parent.effects.push(
|
|
7648
|
+
for (let i = 0; i < effects.length; i++) parent.effects.push(effects[i]);
|
|
7436
7649
|
hasUnresolvedAncestor = true;
|
|
7437
7650
|
break;
|
|
7438
7651
|
}
|
|
@@ -7442,6 +7655,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7442
7655
|
suspense.effects = [];
|
|
7443
7656
|
if (isSuspensible) {
|
|
7444
7657
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
7658
|
+
parentSuspenseId = void 0;
|
|
7445
7659
|
parentSuspense.deps--;
|
|
7446
7660
|
if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
|
|
7447
7661
|
}
|
|
@@ -7456,8 +7670,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7456
7670
|
const mountFallback = () => {
|
|
7457
7671
|
suspense.isFallbackMountPending = false;
|
|
7458
7672
|
if (!suspense.isInFallback) return;
|
|
7459
|
-
|
|
7460
|
-
|
|
7673
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
7674
|
+
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7675
|
+
setActiveBranch(suspense, latestFallback);
|
|
7461
7676
|
};
|
|
7462
7677
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
7463
7678
|
if (delayEnter) {
|
|
@@ -7478,11 +7693,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7478
7693
|
registerDep(instance, onResolve) {
|
|
7479
7694
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
7480
7695
|
if (isInPendingSuspense) suspense.deps++;
|
|
7696
|
+
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
7481
7697
|
instance.asyncDep.catch((err) => {
|
|
7482
7698
|
handleError(err, instance, 0);
|
|
7483
7699
|
}).then((asyncSetupResult) => {
|
|
7484
7700
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
7485
7701
|
setCurrentInstance(null, void 0);
|
|
7702
|
+
if (hydratedEl && !instance.scope.active) {
|
|
7703
|
+
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
7704
|
+
return;
|
|
7705
|
+
}
|
|
7486
7706
|
instance.asyncResolved = true;
|
|
7487
7707
|
onResolve(asyncSetupResult);
|
|
7488
7708
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -7533,9 +7753,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7533
7753
|
return s;
|
|
7534
7754
|
}
|
|
7535
7755
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
7536
|
-
if (suspense && suspense.pendingBranch)
|
|
7537
|
-
|
|
7538
|
-
|
|
7756
|
+
if (suspense && suspense.pendingBranch) {
|
|
7757
|
+
if (isArray(fn)) suspense.effects.push(...fn);
|
|
7758
|
+
else suspense.effects.push(fn);
|
|
7759
|
+
} else queuePostFlushCb(fn, id);
|
|
7539
7760
|
}
|
|
7540
7761
|
function setActiveBranch(suspense, branch) {
|
|
7541
7762
|
suspense.activeBranch = branch;
|
|
@@ -7702,9 +7923,24 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7702
7923
|
if (shapeFlag & 128) type.normalize(vnode);
|
|
7703
7924
|
} else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
7704
7925
|
if (vnode.key !== vnode.key) warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
7926
|
+
if (props && vnode.shapeFlag & 1) {
|
|
7927
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
7928
|
+
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.`);
|
|
7929
|
+
}
|
|
7705
7930
|
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
|
|
7706
7931
|
return vnode;
|
|
7707
7932
|
}
|
|
7933
|
+
/**
|
|
7934
|
+
* dev only
|
|
7935
|
+
* Whether children would actually render something. Empty text and empty
|
|
7936
|
+
* arrays are ignored, mirroring the compiler's `node.children.length` check
|
|
7937
|
+
* for `v-html` / `v-text`.
|
|
7938
|
+
*/
|
|
7939
|
+
function hasContentChildren(children) {
|
|
7940
|
+
if (isString(children)) return children !== "";
|
|
7941
|
+
if (isArray(children)) return children.length > 0;
|
|
7942
|
+
return false;
|
|
7943
|
+
}
|
|
7708
7944
|
const createVNode = createVNodeWithArgsTransform;
|
|
7709
7945
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
7710
7946
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -7714,8 +7950,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7714
7950
|
if (isVNode(type)) {
|
|
7715
7951
|
const cloned = cloneVNode(type, props, true);
|
|
7716
7952
|
if (children) normalizeChildren(cloned, children);
|
|
7717
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock)
|
|
7718
|
-
|
|
7953
|
+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
7954
|
+
if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
7955
|
+
else currentBlock.push(cloned);
|
|
7956
|
+
}
|
|
7719
7957
|
cloned.patchFlag = -2;
|
|
7720
7958
|
return cloned;
|
|
7721
7959
|
}
|
|
@@ -7775,7 +8013,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7775
8013
|
ce: vnode.ce,
|
|
7776
8014
|
vi: vnode.vi,
|
|
7777
8015
|
vs: cloneVaporSlotMeta(vnode),
|
|
7778
|
-
vb: vnode.vb
|
|
8016
|
+
vb: vnode.vb,
|
|
8017
|
+
ibu: vnode.ibu,
|
|
8018
|
+
iu: vnode.iu,
|
|
8019
|
+
cacheIndex: vnode.cacheIndex
|
|
7779
8020
|
};
|
|
7780
8021
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
7781
8022
|
return cloned;
|
|
@@ -7785,8 +8026,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7785
8026
|
if (!vaporSlot) return vaporSlot;
|
|
7786
8027
|
const cloned = {
|
|
7787
8028
|
slot: vaporSlot.slot,
|
|
7788
|
-
|
|
7789
|
-
outletFallback: vaporSlot.outletFallback
|
|
8029
|
+
outlets: vaporSlot.outlets
|
|
7790
8030
|
};
|
|
7791
8031
|
if (vnode.el) {
|
|
7792
8032
|
cloned.state = vaporSlot.state;
|
|
@@ -7838,25 +8078,28 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7838
8078
|
const { shapeFlag } = vnode;
|
|
7839
8079
|
if (children == null) children = null;
|
|
7840
8080
|
else if (isArray(children)) type = 16;
|
|
7841
|
-
else if (typeof children === "object")
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
8081
|
+
else if (typeof children === "object") {
|
|
8082
|
+
if (shapeFlag & 65) {
|
|
8083
|
+
const slot = children.default;
|
|
8084
|
+
if (slot) {
|
|
8085
|
+
slot._c && (slot._d = false);
|
|
8086
|
+
normalizeChildren(vnode, slot());
|
|
8087
|
+
slot._c && (slot._d = true);
|
|
8088
|
+
}
|
|
8089
|
+
return;
|
|
8090
|
+
} else {
|
|
8091
|
+
type = 32;
|
|
8092
|
+
const slotFlag = children._;
|
|
8093
|
+
if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
|
|
8094
|
+
else if (slotFlag === 3 && currentRenderingInstance) {
|
|
8095
|
+
if (currentRenderingInstance.slots._ === 1) children._ = 1;
|
|
8096
|
+
else {
|
|
8097
|
+
children._ = 2;
|
|
8098
|
+
vnode.patchFlag |= 1024;
|
|
8099
|
+
}
|
|
8100
|
+
}
|
|
7857
8101
|
}
|
|
7858
|
-
}
|
|
7859
|
-
else if (isFunction(children)) {
|
|
8102
|
+
} else if (isFunction(children)) {
|
|
7860
8103
|
if (shapeFlag & 65) {
|
|
7861
8104
|
normalizeChildren(vnode, { default: children });
|
|
7862
8105
|
return;
|
|
@@ -7924,6 +8167,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7924
8167
|
simpleSetCurrentInstance(instance);
|
|
7925
8168
|
}
|
|
7926
8169
|
};
|
|
8170
|
+
/**
|
|
8171
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
8172
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
8173
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
8174
|
+
* @internal
|
|
8175
|
+
*/
|
|
8176
|
+
const restoreCurrentInstance = (prev) => {
|
|
8177
|
+
setCurrentScope(prev[1]);
|
|
8178
|
+
simpleSetCurrentInstance(prev[0]);
|
|
8179
|
+
};
|
|
7927
8180
|
const internalOptions = [
|
|
7928
8181
|
"ce",
|
|
7929
8182
|
"type",
|
|
@@ -7955,7 +8208,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7955
8208
|
};
|
|
7956
8209
|
//#endregion
|
|
7957
8210
|
//#region packages/runtime-core/src/component.ts
|
|
7958
|
-
const emptyAppContext =
|
|
8211
|
+
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
7959
8212
|
let uid = 0;
|
|
7960
8213
|
function createComponentInstance(vnode, parent, suspense) {
|
|
7961
8214
|
const type = vnode.type;
|
|
@@ -8075,7 +8328,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8075
8328
|
const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
|
|
8076
8329
|
const isAsyncSetup = isPromise(setupResult);
|
|
8077
8330
|
setActiveSub(prevSub);
|
|
8078
|
-
|
|
8331
|
+
restoreCurrentInstance(prev);
|
|
8079
8332
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
8080
8333
|
if (isAsyncSetup) {
|
|
8081
8334
|
const unsetCurrentInstance = () => {
|
|
@@ -8083,7 +8336,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8083
8336
|
};
|
|
8084
8337
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
8085
8338
|
if (isSSR) return setupResult.then((resolvedResult) => {
|
|
8086
|
-
|
|
8339
|
+
setInSSRSetupState(true);
|
|
8340
|
+
try {
|
|
8341
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
8342
|
+
} finally {
|
|
8343
|
+
setInSSRSetupState(false);
|
|
8344
|
+
}
|
|
8087
8345
|
}).catch((e) => {
|
|
8088
8346
|
handleError(e, instance, 0);
|
|
8089
8347
|
});
|
|
@@ -8144,13 +8402,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8144
8402
|
applyOptions(instance);
|
|
8145
8403
|
} finally {
|
|
8146
8404
|
setActiveSub(prevSub);
|
|
8147
|
-
|
|
8405
|
+
restoreCurrentInstance(prevInstance);
|
|
8148
8406
|
}
|
|
8149
8407
|
}
|
|
8150
|
-
if (!Component.render && instance.render === NOOP && !isSSR)
|
|
8408
|
+
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
8409
|
+
if (!compile && Component.template)
|
|
8151
8410
|
/* v8 ignore start */
|
|
8152
|
-
|
|
8153
|
-
|
|
8411
|
+
warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.global.js\" instead.");
|
|
8412
|
+
else warn$1(`Component is missing template or render function: `, Component);
|
|
8413
|
+
}
|
|
8154
8414
|
}
|
|
8155
8415
|
const attrsProxyHandlers = {
|
|
8156
8416
|
get(target, key) {
|
|
@@ -8213,14 +8473,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8213
8473
|
if (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
|
|
8214
8474
|
get(target, key) {
|
|
8215
8475
|
if (key in target) return target[key];
|
|
8216
|
-
else {
|
|
8476
|
+
else if (!instance.vapor) {
|
|
8217
8477
|
const publicPropertiesMap = getPublicPropertiesMap();
|
|
8218
8478
|
if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);
|
|
8219
8479
|
}
|
|
8220
8480
|
},
|
|
8221
8481
|
has(target, key) {
|
|
8222
|
-
|
|
8223
|
-
return key in target || key in publicPropertiesMap;
|
|
8482
|
+
return key in target || !instance.vapor && key in getPublicPropertiesMap();
|
|
8224
8483
|
}
|
|
8225
8484
|
}));
|
|
8226
8485
|
else return instance.proxy;
|
|
@@ -8258,11 +8517,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8258
8517
|
try {
|
|
8259
8518
|
setBlockTracking(-1);
|
|
8260
8519
|
const l = arguments.length;
|
|
8261
|
-
if (l === 2)
|
|
8262
|
-
if (
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8520
|
+
if (l === 2) {
|
|
8521
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
8522
|
+
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
8523
|
+
return createVNode(type, propsOrChildren);
|
|
8524
|
+
} else return createVNode(type, null, propsOrChildren);
|
|
8525
|
+
} else {
|
|
8266
8526
|
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
8267
8527
|
else if (l === 3 && isVNode(children)) children = [children];
|
|
8268
8528
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -8454,7 +8714,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8454
8714
|
}
|
|
8455
8715
|
//#endregion
|
|
8456
8716
|
//#region packages/runtime-core/src/index.ts
|
|
8457
|
-
const version = "3.6.0-rc.
|
|
8717
|
+
const version = "3.6.0-rc.11";
|
|
8458
8718
|
const warn = warn$1;
|
|
8459
8719
|
/**
|
|
8460
8720
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -8482,7 +8742,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8482
8742
|
let policy = void 0;
|
|
8483
8743
|
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
8484
8744
|
if (tt) try {
|
|
8485
|
-
policy =
|
|
8745
|
+
policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
|
|
8486
8746
|
} catch (e) {
|
|
8487
8747
|
warn(`Error creating trusted types policy: ${e}`);
|
|
8488
8748
|
}
|
|
@@ -8490,7 +8750,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8490
8750
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
8491
8751
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
8492
8752
|
const doc = typeof document !== "undefined" ? document : null;
|
|
8493
|
-
const templateContainer = doc &&
|
|
8753
|
+
const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
|
|
8494
8754
|
const nodeOps = {
|
|
8495
8755
|
insert: (child, parent, anchor) => {
|
|
8496
8756
|
parent.insertBefore(child, anchor || null);
|
|
@@ -8564,7 +8824,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8564
8824
|
leaveActiveClass: String,
|
|
8565
8825
|
leaveToClass: String
|
|
8566
8826
|
};
|
|
8567
|
-
const TransitionPropsValidators =
|
|
8827
|
+
const TransitionPropsValidators = /*@__PURE__*/ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
|
|
8568
8828
|
/**
|
|
8569
8829
|
* Wrap logic that attaches extra properties to Transition in a function
|
|
8570
8830
|
* so that it can be annotated as pure
|
|
@@ -8578,7 +8838,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8578
8838
|
* DOM Transition is a higher-order-component based on the platform-agnostic
|
|
8579
8839
|
* base Transition component, with DOM-specific logic.
|
|
8580
8840
|
*/
|
|
8581
|
-
const Transition =
|
|
8841
|
+
const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
|
|
8582
8842
|
/**
|
|
8583
8843
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
8584
8844
|
* with custom HOCs.
|
|
@@ -8800,14 +9060,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8800
9060
|
},
|
|
8801
9061
|
updated(el, { value, oldValue }, { transition }) {
|
|
8802
9062
|
if (!value === !oldValue) return;
|
|
8803
|
-
if (transition)
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
9063
|
+
if (transition) {
|
|
9064
|
+
if (value) {
|
|
9065
|
+
transition.beforeEnter(el);
|
|
9066
|
+
setDisplay(el, true);
|
|
9067
|
+
transition.enter(el);
|
|
9068
|
+
} else transition.leave(el, () => {
|
|
9069
|
+
setDisplay(el, false);
|
|
9070
|
+
});
|
|
9071
|
+
} else setDisplay(el, value);
|
|
8811
9072
|
},
|
|
8812
9073
|
beforeUnmount(el, { value }) {
|
|
8813
9074
|
setDisplay(el, value);
|
|
@@ -8826,49 +9087,20 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8826
9087
|
*/
|
|
8827
9088
|
function useCssVars(getter) {
|
|
8828
9089
|
const instance = getCurrentInstance();
|
|
8829
|
-
const getVars = () => getter(instance.proxy);
|
|
8830
|
-
const setVars = (vars) => {
|
|
8831
|
-
if (instance.ce) setVarsOnNode(instance.ce, vars);
|
|
8832
|
-
else setVarsOnVNode(instance.subTree, vars);
|
|
8833
|
-
};
|
|
8834
|
-
baseUseCssVars(instance, () => instance.subTree.el.parentNode, getVars, setVars);
|
|
8835
|
-
}
|
|
8836
|
-
function setVarsOnVNode(vnode, vars) {
|
|
8837
|
-
if (vnode.shapeFlag & 128) {
|
|
8838
|
-
const suspense = vnode.suspense;
|
|
8839
|
-
vnode = suspense.activeBranch;
|
|
8840
|
-
if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
|
|
8841
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
8842
|
-
});
|
|
8843
|
-
}
|
|
8844
|
-
while (vnode.component) vnode = vnode.component.subTree;
|
|
8845
|
-
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
8846
|
-
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
8847
|
-
else if (vnode.type === Static) {
|
|
8848
|
-
let { el, anchor } = vnode;
|
|
8849
|
-
while (el) {
|
|
8850
|
-
setVarsOnNode(el, vars);
|
|
8851
|
-
if (el === anchor) break;
|
|
8852
|
-
el = el.nextSibling;
|
|
8853
|
-
}
|
|
8854
|
-
}
|
|
8855
|
-
}
|
|
8856
|
-
/**
|
|
8857
|
-
* @internal
|
|
8858
|
-
* shared between vdom and vapor
|
|
8859
|
-
*/
|
|
8860
|
-
function baseUseCssVars(instance, getParentNode, getVars, setVars) {
|
|
8861
9090
|
/* v8 ignore start */
|
|
8862
9091
|
if (!instance) {
|
|
8863
9092
|
warn(`useCssVars is called without current active component instance.`);
|
|
8864
9093
|
return;
|
|
8865
9094
|
}
|
|
9095
|
+
/* v8 ignore stop */
|
|
9096
|
+
const getVars = () => getter(instance.proxy);
|
|
8866
9097
|
instance.getCssVars = getVars;
|
|
8867
9098
|
const updateTeleports = instance.ut = (vars = getVars()) => {
|
|
8868
9099
|
Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach((node) => setVarsOnNode(node, vars));
|
|
8869
9100
|
};
|
|
8870
9101
|
const applyCssVars = (vars = getVars()) => {
|
|
8871
|
-
|
|
9102
|
+
if (instance.ce) setVarsOnNode(instance.ce, vars);
|
|
9103
|
+
else setVarsOnVNode(instance.subTree, vars);
|
|
8872
9104
|
updateTeleports(vars);
|
|
8873
9105
|
};
|
|
8874
9106
|
onBeforeUpdate(() => {
|
|
@@ -8881,10 +9113,38 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8881
9113
|
applyCssVars(vars);
|
|
8882
9114
|
}, NOOP, { flush: "post" });
|
|
8883
9115
|
const ob = new MutationObserver(() => applyCssVars());
|
|
8884
|
-
ob.observe(
|
|
9116
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
8885
9117
|
onUnmounted(() => ob.disconnect());
|
|
8886
9118
|
});
|
|
8887
9119
|
}
|
|
9120
|
+
function setVarsOnVNode(vnode, vars) {
|
|
9121
|
+
if (vnode.shapeFlag & 128) {
|
|
9122
|
+
const suspense = vnode.suspense;
|
|
9123
|
+
vnode = suspense.activeBranch;
|
|
9124
|
+
if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
|
|
9125
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
9126
|
+
});
|
|
9127
|
+
}
|
|
9128
|
+
while (vnode.component) {
|
|
9129
|
+
const component = vnode.component;
|
|
9130
|
+
if (component.vapor) {
|
|
9131
|
+
component.appContext.vapor.applyCssVars(vnode, vars);
|
|
9132
|
+
return;
|
|
9133
|
+
}
|
|
9134
|
+
vnode = vnode.component.subTree;
|
|
9135
|
+
}
|
|
9136
|
+
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
9137
|
+
else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
9138
|
+
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
9139
|
+
else if (vnode.type === Static) {
|
|
9140
|
+
let { el, anchor } = vnode;
|
|
9141
|
+
while (el) {
|
|
9142
|
+
setVarsOnNode(el, vars);
|
|
9143
|
+
if (el === anchor) break;
|
|
9144
|
+
el = el.nextSibling;
|
|
9145
|
+
}
|
|
9146
|
+
}
|
|
9147
|
+
}
|
|
8888
9148
|
/**
|
|
8889
9149
|
* @internal
|
|
8890
9150
|
* shared between vdom and vapor
|
|
@@ -8909,11 +9169,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8909
9169
|
const isCssString = isString(next);
|
|
8910
9170
|
let hasControlledDisplay = false;
|
|
8911
9171
|
if (next && !isCssString) {
|
|
8912
|
-
if (prev)
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
9172
|
+
if (prev) {
|
|
9173
|
+
if (!isString(prev)) {
|
|
9174
|
+
for (const key in prev) if (next[key] == null) setStyle(style, key, "");
|
|
9175
|
+
} else for (const prevStyle of prev.split(";")) {
|
|
9176
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
9177
|
+
if (next[key] == null) setStyle(style, key, "");
|
|
9178
|
+
}
|
|
8917
9179
|
}
|
|
8918
9180
|
for (const key in next) {
|
|
8919
9181
|
if (key === "display") hasControlledDisplay = true;
|
|
@@ -8929,7 +9191,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8929
9191
|
style.cssText = next;
|
|
8930
9192
|
hasControlledDisplay = displayRE.test(next);
|
|
8931
9193
|
}
|
|
8932
|
-
} else if (prev)
|
|
9194
|
+
} else if (prev) {
|
|
9195
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
9196
|
+
if (cssVarText) style.cssText = cssVarText;
|
|
9197
|
+
else el.removeAttribute("style");
|
|
9198
|
+
}
|
|
8933
9199
|
if (vShowOriginalDisplay in el) {
|
|
8934
9200
|
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
8935
9201
|
if (el[vShowHidden]) style.display = "none";
|
|
@@ -8942,8 +9208,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8942
9208
|
else {
|
|
8943
9209
|
const val = rawVal == null ? "" : String(rawVal);
|
|
8944
9210
|
if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
8945
|
-
if (name.startsWith("--"))
|
|
8946
|
-
|
|
9211
|
+
if (name.startsWith("--")) {
|
|
9212
|
+
if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
|
|
9213
|
+
else style.setProperty(name, val);
|
|
9214
|
+
} else {
|
|
8947
9215
|
const prefixed = autoPrefix(style, name);
|
|
8948
9216
|
if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
|
|
8949
9217
|
else style[prefixed] = val;
|
|
@@ -8980,9 +9248,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8980
9248
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
8981
9249
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
8982
9250
|
function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
|
|
8983
|
-
if (isSVG && key.startsWith("xlink:"))
|
|
8984
|
-
|
|
8985
|
-
|
|
9251
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
9252
|
+
if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
9253
|
+
else el.setAttributeNS(xlinkNS, key, value);
|
|
9254
|
+
} else if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
|
|
8986
9255
|
else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
|
|
8987
9256
|
}
|
|
8988
9257
|
//#endregion
|
|
@@ -9055,7 +9324,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9055
9324
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
9056
9325
|
}
|
|
9057
9326
|
let cachedNow = 0;
|
|
9058
|
-
const p =
|
|
9327
|
+
const p = /*@__PURE__*/ Promise.resolve();
|
|
9059
9328
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
9060
9329
|
function createInvoker(initialValue, instance) {
|
|
9061
9330
|
const invoker = (e) => {
|
|
@@ -9123,7 +9392,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9123
9392
|
//#endregion
|
|
9124
9393
|
//#region packages/runtime-dom/src/apiCustomElement.ts
|
|
9125
9394
|
const REMOVAL = {};
|
|
9126
|
-
|
|
9395
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
9127
9396
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
9128
9397
|
let Comp = /* @__PURE__ */ defineComponent(options, extraOptions);
|
|
9129
9398
|
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
@@ -9172,12 +9441,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9172
9441
|
this._parent = parent;
|
|
9173
9442
|
break;
|
|
9174
9443
|
}
|
|
9175
|
-
if (!this._instance)
|
|
9176
|
-
|
|
9177
|
-
this._pendingResolve =
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9444
|
+
if (!this._instance) {
|
|
9445
|
+
if (this._resolved) this._mountComponent(this._def);
|
|
9446
|
+
else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
|
|
9447
|
+
this._pendingResolve = void 0;
|
|
9448
|
+
if (this.isConnected) return this._resolveDef();
|
|
9449
|
+
});
|
|
9450
|
+
else this._resolveDef();
|
|
9451
|
+
}
|
|
9181
9452
|
}
|
|
9182
9453
|
disconnectedCallback() {
|
|
9183
9454
|
this._connected = false;
|
|
@@ -9211,7 +9482,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9211
9482
|
* resolve inner component definition (handle possible async component)
|
|
9212
9483
|
*/
|
|
9213
9484
|
_resolveDef() {
|
|
9214
|
-
if (this._pendingResolve) return;
|
|
9485
|
+
if (this._pendingResolve) return this._pendingResolve;
|
|
9215
9486
|
for (let i = 0; i < this.attributes.length; i++) this._setAttr(this.attributes[i].name);
|
|
9216
9487
|
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
9217
9488
|
this._ob.observe(this, { attributes: true });
|
|
@@ -9241,6 +9512,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9241
9512
|
this._def = def;
|
|
9242
9513
|
resolve(def);
|
|
9243
9514
|
});
|
|
9515
|
+
return this._pendingResolve;
|
|
9244
9516
|
} else resolve(this._def);
|
|
9245
9517
|
}
|
|
9246
9518
|
_mountComponent(def) {
|
|
@@ -9279,14 +9551,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9279
9551
|
const { props } = def;
|
|
9280
9552
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
9281
9553
|
for (const key of Object.keys(this)) if (key[0] !== "_" && declaredPropKeys.includes(key)) this._setProp(key, this[key]);
|
|
9282
|
-
for (const key of declaredPropKeys.map(camelize))
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9554
|
+
for (const key of declaredPropKeys.map(camelize)) {
|
|
9555
|
+
if (key in Object.getPrototypeOf(this)) warn(`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`);
|
|
9556
|
+
Object.defineProperty(this, key, {
|
|
9557
|
+
get() {
|
|
9558
|
+
return this._getProp(key);
|
|
9559
|
+
},
|
|
9560
|
+
set(val) {
|
|
9561
|
+
this._setProp(key, val, true, !this._patching);
|
|
9562
|
+
}
|
|
9563
|
+
});
|
|
9564
|
+
}
|
|
9290
9565
|
}
|
|
9291
9566
|
_setAttr(key) {
|
|
9292
9567
|
if (key.startsWith("data-v-")) return;
|
|
@@ -9389,13 +9664,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9389
9664
|
_renderSlots() {
|
|
9390
9665
|
const outlets = this._getSlots();
|
|
9391
9666
|
const scopeId = this._instance.type.__scopeId;
|
|
9392
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
9393
9667
|
for (let i = 0; i < outlets.length; i++) {
|
|
9394
9668
|
const o = outlets[i];
|
|
9395
9669
|
const slotName = o.getAttribute("name") || "default";
|
|
9396
9670
|
const content = this._slots[slotName];
|
|
9397
9671
|
const parent = o.parentNode;
|
|
9398
|
-
const replacementNodes = [];
|
|
9399
9672
|
if (content) for (const n of content) {
|
|
9400
9673
|
if (scopeId && n.nodeType === 1) {
|
|
9401
9674
|
const id = scopeId + "-s";
|
|
@@ -9405,20 +9678,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9405
9678
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
9406
9679
|
}
|
|
9407
9680
|
parent.insertBefore(n, o);
|
|
9408
|
-
replacementNodes.push(n);
|
|
9409
|
-
}
|
|
9410
|
-
else while (o.firstChild) {
|
|
9411
|
-
const child = o.firstChild;
|
|
9412
|
-
parent.insertBefore(child, o);
|
|
9413
|
-
replacementNodes.push(child);
|
|
9414
9681
|
}
|
|
9682
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
9415
9683
|
parent.removeChild(o);
|
|
9416
|
-
slotReplacements.set(o, {
|
|
9417
|
-
nodes: replacementNodes,
|
|
9418
|
-
usedFallback: !content
|
|
9419
|
-
});
|
|
9420
9684
|
}
|
|
9421
|
-
this._updateSlotNodes(slotReplacements);
|
|
9422
9685
|
}
|
|
9423
9686
|
/**
|
|
9424
9687
|
* @internal
|
|
@@ -9457,7 +9720,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9457
9720
|
* @internal
|
|
9458
9721
|
*/
|
|
9459
9722
|
_hasShadowRoot() {
|
|
9460
|
-
return this.
|
|
9723
|
+
return this._root !== this;
|
|
9461
9724
|
}
|
|
9462
9725
|
/**
|
|
9463
9726
|
* @internal
|
|
@@ -9502,10 +9765,6 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9502
9765
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
9503
9766
|
this._app = this._instance = null;
|
|
9504
9767
|
}
|
|
9505
|
-
/**
|
|
9506
|
-
* Only called when shadowRoot is false
|
|
9507
|
-
*/
|
|
9508
|
-
_updateSlotNodes(replacements) {}
|
|
9509
9768
|
_createVNode() {
|
|
9510
9769
|
const baseProps = {};
|
|
9511
9770
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
@@ -9555,7 +9814,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9555
9814
|
};
|
|
9556
9815
|
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
9557
9816
|
name: "TransitionGroup",
|
|
9558
|
-
props:
|
|
9817
|
+
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
9559
9818
|
tag: String,
|
|
9560
9819
|
moveClass: String
|
|
9561
9820
|
}),
|
|
@@ -9686,13 +9945,22 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9686
9945
|
}
|
|
9687
9946
|
}
|
|
9688
9947
|
const assignKey = Symbol("_assign");
|
|
9948
|
+
const initialValueKey = Symbol("_initialValue");
|
|
9689
9949
|
const vModelText = {
|
|
9690
9950
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
9951
|
+
if (el.parentNode) {
|
|
9952
|
+
if (el.type === "text") el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
|
|
9953
|
+
else if (el.type === "textarea") el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
|
|
9954
|
+
}
|
|
9691
9955
|
el[assignKey] = getModelAssigner(vnode);
|
|
9692
9956
|
vModelTextInit(el, trim, number || !!(vnode.props && vnode.props.type === "number"), lazy);
|
|
9693
9957
|
},
|
|
9694
|
-
mounted(el, { value }) {
|
|
9695
|
-
|
|
9958
|
+
mounted(el, { value, modifiers: { trim, number } }) {
|
|
9959
|
+
const newValue = value == null ? "" : value;
|
|
9960
|
+
const initialValue = el[initialValueKey];
|
|
9961
|
+
delete el[initialValueKey];
|
|
9962
|
+
if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) el[assignKey](castValue(el.value, trim, number));
|
|
9963
|
+
else el.value = newValue;
|
|
9696
9964
|
},
|
|
9697
9965
|
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
9698
9966
|
el[assignKey] = getModelAssigner(vnode);
|
|
@@ -9827,19 +10095,39 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9827
10095
|
el._modelValue = value;
|
|
9828
10096
|
addEventListener(el, "change", () => {
|
|
9829
10097
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
9830
|
-
|
|
9831
|
-
el.
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
|
|
10098
|
+
const multiple = el.multiple;
|
|
10099
|
+
const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
|
|
10100
|
+
const pending = el._pendingValue = [multiple, multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
|
|
10101
|
+
try {
|
|
10102
|
+
(set || el[assignKey])(assignedValue);
|
|
10103
|
+
} finally {
|
|
10104
|
+
nextTick(() => {
|
|
10105
|
+
if (el._pendingValue === pending) el._pendingValue = void 0;
|
|
10106
|
+
});
|
|
10107
|
+
}
|
|
9835
10108
|
});
|
|
9836
10109
|
};
|
|
10110
|
+
function isSameSelectValue(value, assignedValue, multiple) {
|
|
10111
|
+
if (!multiple) return looseEqual(value, assignedValue);
|
|
10112
|
+
if (isArray(value)) return looseEqual(value, assignedValue);
|
|
10113
|
+
if (isSet(value)) {
|
|
10114
|
+
if (value.size !== assignedValue.length) return false;
|
|
10115
|
+
for (const item of assignedValue) if (!value.has(item)) return false;
|
|
10116
|
+
return true;
|
|
10117
|
+
}
|
|
10118
|
+
return false;
|
|
10119
|
+
}
|
|
9837
10120
|
/**
|
|
9838
10121
|
* @internal
|
|
9839
10122
|
*/
|
|
9840
10123
|
const vModelSetSelected = (el, value) => {
|
|
9841
10124
|
el._modelValue = value;
|
|
9842
|
-
|
|
10125
|
+
const pending = el._pendingValue;
|
|
10126
|
+
el._pendingValue = void 0;
|
|
10127
|
+
if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
|
|
10128
|
+
setSelected(el, value);
|
|
10129
|
+
};
|
|
10130
|
+
function setSelected(el, value) {
|
|
9843
10131
|
const isMultiple = el.multiple;
|
|
9844
10132
|
const isArrayValue = isArray(value);
|
|
9845
10133
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -9849,18 +10137,19 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9849
10137
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
9850
10138
|
const option = el.options[i];
|
|
9851
10139
|
const optionValue = getValue(option);
|
|
9852
|
-
if (isMultiple)
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
10140
|
+
if (isMultiple) {
|
|
10141
|
+
if (isArrayValue) {
|
|
10142
|
+
const optionType = typeof optionValue;
|
|
10143
|
+
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
10144
|
+
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
10145
|
+
} else option.selected = value.has(optionValue);
|
|
10146
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
9858
10147
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
9859
10148
|
return;
|
|
9860
10149
|
}
|
|
9861
10150
|
}
|
|
9862
10151
|
if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
|
|
9863
|
-
}
|
|
10152
|
+
}
|
|
9864
10153
|
/**
|
|
9865
10154
|
* @internal retrieve raw value set via :value bindings
|
|
9866
10155
|
*/
|
|
@@ -9962,7 +10251,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9962
10251
|
};
|
|
9963
10252
|
//#endregion
|
|
9964
10253
|
//#region packages/runtime-dom/src/index.ts
|
|
9965
|
-
const rendererOptions =
|
|
10254
|
+
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
9966
10255
|
let renderer;
|
|
9967
10256
|
let enabledHydration = false;
|
|
9968
10257
|
function ensureRenderer() {
|