@vue/compat 3.4.34 → 3.4.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.34
2
+ * @vue/compat v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7,7 +7,7 @@
7
7
 
8
8
  var parser = require('@babel/parser');
9
9
  var estreeWalker = require('estree-walker');
10
- var decode_js = require('entities/lib/decode.js');
10
+ var decode_js = require('entities/dist/decode.js');
11
11
  var sourceMapJs = require('source-map-js');
12
12
 
13
13
  /*! #__NO_SIDE_EFFECTS__ */
@@ -5303,7 +5303,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5303
5303
  return vm;
5304
5304
  }
5305
5305
  }
5306
- Vue.version = `2.6.14-compat:${"3.4.34"}`;
5306
+ Vue.version = `2.6.14-compat:${"3.4.36"}`;
5307
5307
  Vue.config = singletonApp.config;
5308
5308
  Vue.use = (plugin, ...options) => {
5309
5309
  if (plugin && isFunction(plugin.install)) {
@@ -6220,14 +6220,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
6220
6220
  if (validatePropName(normalizedKey)) {
6221
6221
  const opt = raw[key];
6222
6222
  const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
6223
- if (prop) {
6224
- const booleanIndex = getTypeIndex(Boolean, prop.type);
6225
- const stringIndex = getTypeIndex(String, prop.type);
6226
- prop[0 /* shouldCast */] = booleanIndex > -1;
6227
- prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex;
6228
- if (booleanIndex > -1 || hasOwn(prop, "default")) {
6229
- needCastKeys.push(normalizedKey);
6223
+ const propType = prop.type;
6224
+ let shouldCast = false;
6225
+ let shouldCastTrue = true;
6226
+ if (isArray(propType)) {
6227
+ for (let index = 0; index < propType.length; ++index) {
6228
+ const type = propType[index];
6229
+ const typeName = isFunction(type) && type.name;
6230
+ if (typeName === "Boolean") {
6231
+ shouldCast = true;
6232
+ break;
6233
+ } else if (typeName === "String") {
6234
+ shouldCastTrue = false;
6235
+ }
6230
6236
  }
6237
+ } else {
6238
+ shouldCast = isFunction(propType) && propType.name === "Boolean";
6239
+ }
6240
+ prop[0 /* shouldCast */] = shouldCast;
6241
+ prop[1 /* shouldCastTrue */] = shouldCastTrue;
6242
+ if (shouldCast || hasOwn(prop, "default")) {
6243
+ needCastKeys.push(normalizedKey);
6231
6244
  }
6232
6245
  }
6233
6246
  }
@@ -6258,17 +6271,6 @@ function getType(ctor) {
6258
6271
  }
6259
6272
  return "";
6260
6273
  }
6261
- function isSameType(a, b) {
6262
- return getType(a) === getType(b);
6263
- }
6264
- function getTypeIndex(type, expectedTypes) {
6265
- if (isArray(expectedTypes)) {
6266
- return expectedTypes.findIndex((t) => isSameType(t, type));
6267
- } else if (isFunction(expectedTypes)) {
6268
- return isSameType(expectedTypes, type) ? 0 : -1;
6269
- }
6270
- return -1;
6271
- }
6272
6274
  function validateProps(rawProps, props, instance) {
6273
6275
  const resolvedValues = toRaw(props);
6274
6276
  const options = instance.propsOptions[0];
@@ -6608,15 +6610,11 @@ const TeleportImpl = {
6608
6610
  if (n1 == null) {
6609
6611
  const placeholder = n2.el = createComment("teleport start") ;
6610
6612
  const mainAnchor = n2.anchor = createComment("teleport end") ;
6611
- const target = n2.target = resolveTarget(n2.props, querySelector);
6612
- const targetStart = n2.targetStart = createText("");
6613
- const targetAnchor = n2.targetAnchor = createText("");
6614
6613
  insert(placeholder, container, anchor);
6615
6614
  insert(mainAnchor, container, anchor);
6616
- targetStart[TeleportEndKey] = targetAnchor;
6615
+ const target = n2.target = resolveTarget(n2.props, querySelector);
6616
+ const targetAnchor = prepareAnchor(target, n2, createText, insert);
6617
6617
  if (target) {
6618
- insert(targetStart, target);
6619
- insert(targetAnchor, target);
6620
6618
  if (namespace === "svg" || isTargetSVG(target)) {
6621
6619
  namespace = "svg";
6622
6620
  } else if (namespace === "mathml" || isTargetMathML(target)) {
@@ -6788,7 +6786,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
6788
6786
  }
6789
6787
  }
6790
6788
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
6791
- o: { nextSibling, parentNode, querySelector }
6789
+ o: { nextSibling, parentNode, querySelector, insert, createText }
6792
6790
  }, hydrateChildren) {
6793
6791
  const target = vnode.target = resolveTarget(
6794
6792
  vnode.props,
@@ -6807,20 +6805,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
6807
6805
  slotScopeIds,
6808
6806
  optimized
6809
6807
  );
6810
- vnode.targetAnchor = targetNode;
6808
+ vnode.targetStart = targetNode;
6809
+ vnode.targetAnchor = targetNode && nextSibling(targetNode);
6811
6810
  } else {
6812
6811
  vnode.anchor = nextSibling(node);
6813
6812
  let targetAnchor = targetNode;
6814
6813
  while (targetAnchor) {
6815
- targetAnchor = nextSibling(targetAnchor);
6816
- if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
6817
- vnode.targetAnchor = targetAnchor;
6818
- target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
6819
- break;
6814
+ if (targetAnchor && targetAnchor.nodeType === 8) {
6815
+ if (targetAnchor.data === "teleport start anchor") {
6816
+ vnode.targetStart = targetAnchor;
6817
+ } else if (targetAnchor.data === "teleport anchor") {
6818
+ vnode.targetAnchor = targetAnchor;
6819
+ target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
6820
+ break;
6821
+ }
6820
6822
  }
6823
+ targetAnchor = nextSibling(targetAnchor);
6824
+ }
6825
+ if (!vnode.targetAnchor) {
6826
+ prepareAnchor(target, vnode, createText, insert);
6821
6827
  }
6822
6828
  hydrateChildren(
6823
- targetNode,
6829
+ targetNode && nextSibling(targetNode),
6824
6830
  vnode,
6825
6831
  target,
6826
6832
  parentComponent,
@@ -6846,6 +6852,16 @@ function updateCssVars(vnode) {
6846
6852
  ctx.ut();
6847
6853
  }
6848
6854
  }
6855
+ function prepareAnchor(target, vnode, createText, insert) {
6856
+ const targetStart = vnode.targetStart = createText("");
6857
+ const targetAnchor = vnode.targetAnchor = createText("");
6858
+ targetStart[TeleportEndKey] = targetAnchor;
6859
+ if (target) {
6860
+ insert(targetStart, target);
6861
+ insert(targetAnchor, target);
6862
+ }
6863
+ return targetAnchor;
6864
+ }
6849
6865
 
6850
6866
  let hasLoggedMismatchError = false;
6851
6867
  const logMismatchError = () => {
@@ -7129,6 +7145,7 @@ Server rendered element contains more child nodes than client vdom.`
7129
7145
  }
7130
7146
  if (props) {
7131
7147
  {
7148
+ const isCustomElement = el.tagName.includes("-");
7132
7149
  for (const key in props) {
7133
7150
  if (// #11189 skip if this node has directives that have created hooks
7134
7151
  // as it could have mutated the DOM in any possible way
@@ -7136,7 +7153,7 @@ Server rendered element contains more child nodes than client vdom.`
7136
7153
  logMismatchError();
7137
7154
  }
7138
7155
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
7139
- key[0] === ".") {
7156
+ key[0] === "." || isCustomElement) {
7140
7157
  patchProp(el, key, null, props[key], void 0, parentComponent);
7141
7158
  }
7142
7159
  }
@@ -11508,7 +11525,7 @@ function isMemoSame(cached, memo) {
11508
11525
  return true;
11509
11526
  }
11510
11527
 
11511
- const version = "3.4.34";
11528
+ const version = "3.4.36";
11512
11529
  const warn = warn$1 ;
11513
11530
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11514
11531
  const devtools = devtools$1 ;
@@ -14670,6 +14687,16 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
14670
14687
  (id) => markScopeIdentifier(node, id, knownIds)
14671
14688
  );
14672
14689
  }
14690
+ } else if (node.type === "CatchClause" && node.param) {
14691
+ for (const id of extractIdentifiers(node.param)) {
14692
+ markScopeIdentifier(node, id, knownIds);
14693
+ }
14694
+ } else if (isForStatement(node)) {
14695
+ walkForStatement(
14696
+ node,
14697
+ false,
14698
+ (id) => markScopeIdentifier(node, id, knownIds)
14699
+ );
14673
14700
  }
14674
14701
  },
14675
14702
  leave(node, parent) {
@@ -14750,14 +14777,20 @@ function walkBlockDeclarations(block, onIdent) {
14750
14777
  } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
14751
14778
  if (stmt.declare || !stmt.id) continue;
14752
14779
  onIdent(stmt.id);
14753
- } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
14754
- const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
14755
- if (variable && variable.type === "VariableDeclaration") {
14756
- for (const decl of variable.declarations) {
14757
- for (const id of extractIdentifiers(decl.id)) {
14758
- onIdent(id);
14759
- }
14760
- }
14780
+ } else if (isForStatement(stmt)) {
14781
+ walkForStatement(stmt, true, onIdent);
14782
+ }
14783
+ }
14784
+ }
14785
+ function isForStatement(stmt) {
14786
+ return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement";
14787
+ }
14788
+ function walkForStatement(stmt, isVar, onIdent) {
14789
+ const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
14790
+ if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) {
14791
+ for (const decl of variable.declarations) {
14792
+ for (const id of extractIdentifiers(decl.id)) {
14793
+ onIdent(id);
14761
14794
  }
14762
14795
  }
14763
14796
  }
@@ -14844,7 +14877,7 @@ function isReferenced(node, parent, grandparent) {
14844
14877
  if (parent.key === node) {
14845
14878
  return !!parent.computed;
14846
14879
  }
14847
- return !grandparent ;
14880
+ return !grandparent;
14848
14881
  case "ClassProperty":
14849
14882
  if (parent.key === node) {
14850
14883
  return !!parent.computed;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.34
2
+ * @vue/compat v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7,7 +7,7 @@
7
7
 
8
8
  var parser = require('@babel/parser');
9
9
  var estreeWalker = require('estree-walker');
10
- var decode_js = require('entities/lib/decode.js');
10
+ var decode_js = require('entities/dist/decode.js');
11
11
  var sourceMapJs = require('source-map-js');
12
12
 
13
13
  /*! #__NO_SIDE_EFFECTS__ */
@@ -4151,7 +4151,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
4151
4151
  return vm;
4152
4152
  }
4153
4153
  }
4154
- Vue.version = `2.6.14-compat:${"3.4.34"}`;
4154
+ Vue.version = `2.6.14-compat:${"3.4.36"}`;
4155
4155
  Vue.config = singletonApp.config;
4156
4156
  Vue.use = (plugin, ...options) => {
4157
4157
  if (plugin && isFunction(plugin.install)) {
@@ -4940,14 +4940,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
4940
4940
  if (validatePropName(normalizedKey)) {
4941
4941
  const opt = raw[key];
4942
4942
  const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
4943
- if (prop) {
4944
- const booleanIndex = getTypeIndex(Boolean, prop.type);
4945
- const stringIndex = getTypeIndex(String, prop.type);
4946
- prop[0 /* shouldCast */] = booleanIndex > -1;
4947
- prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex;
4948
- if (booleanIndex > -1 || hasOwn(prop, "default")) {
4949
- needCastKeys.push(normalizedKey);
4943
+ const propType = prop.type;
4944
+ let shouldCast = false;
4945
+ let shouldCastTrue = true;
4946
+ if (isArray(propType)) {
4947
+ for (let index = 0; index < propType.length; ++index) {
4948
+ const type = propType[index];
4949
+ const typeName = isFunction(type) && type.name;
4950
+ if (typeName === "Boolean") {
4951
+ shouldCast = true;
4952
+ break;
4953
+ } else if (typeName === "String") {
4954
+ shouldCastTrue = false;
4955
+ }
4950
4956
  }
4957
+ } else {
4958
+ shouldCast = isFunction(propType) && propType.name === "Boolean";
4959
+ }
4960
+ prop[0 /* shouldCast */] = shouldCast;
4961
+ prop[1 /* shouldCastTrue */] = shouldCastTrue;
4962
+ if (shouldCast || hasOwn(prop, "default")) {
4963
+ needCastKeys.push(normalizedKey);
4951
4964
  }
4952
4965
  }
4953
4966
  }
@@ -4964,29 +4977,6 @@ function validatePropName(key) {
4964
4977
  }
4965
4978
  return false;
4966
4979
  }
4967
- function getType(ctor) {
4968
- if (ctor === null) {
4969
- return "null";
4970
- }
4971
- if (typeof ctor === "function") {
4972
- return ctor.name || "";
4973
- } else if (typeof ctor === "object") {
4974
- const name = ctor.constructor && ctor.constructor.name;
4975
- return name || "";
4976
- }
4977
- return "";
4978
- }
4979
- function isSameType(a, b) {
4980
- return getType(a) === getType(b);
4981
- }
4982
- function getTypeIndex(type, expectedTypes) {
4983
- if (isArray(expectedTypes)) {
4984
- return expectedTypes.findIndex((t) => isSameType(t, type));
4985
- } else if (isFunction(expectedTypes)) {
4986
- return isSameType(expectedTypes, type) ? 0 : -1;
4987
- }
4988
- return -1;
4989
- }
4990
4980
 
4991
4981
  const isInternalKey = (key) => key[0] === "_" || key === "$stable";
4992
4982
  const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
@@ -5182,15 +5172,11 @@ const TeleportImpl = {
5182
5172
  if (n1 == null) {
5183
5173
  const placeholder = n2.el = createText("");
5184
5174
  const mainAnchor = n2.anchor = createText("");
5185
- const target = n2.target = resolveTarget(n2.props, querySelector);
5186
- const targetStart = n2.targetStart = createText("");
5187
- const targetAnchor = n2.targetAnchor = createText("");
5188
5175
  insert(placeholder, container, anchor);
5189
5176
  insert(mainAnchor, container, anchor);
5190
- targetStart[TeleportEndKey] = targetAnchor;
5177
+ const target = n2.target = resolveTarget(n2.props, querySelector);
5178
+ const targetAnchor = prepareAnchor(target, n2, createText, insert);
5191
5179
  if (target) {
5192
- insert(targetStart, target);
5193
- insert(targetAnchor, target);
5194
5180
  if (namespace === "svg" || isTargetSVG(target)) {
5195
5181
  namespace = "svg";
5196
5182
  } else if (namespace === "mathml" || isTargetMathML(target)) {
@@ -5354,7 +5340,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
5354
5340
  }
5355
5341
  }
5356
5342
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
5357
- o: { nextSibling, parentNode, querySelector }
5343
+ o: { nextSibling, parentNode, querySelector, insert, createText }
5358
5344
  }, hydrateChildren) {
5359
5345
  const target = vnode.target = resolveTarget(
5360
5346
  vnode.props,
@@ -5373,20 +5359,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
5373
5359
  slotScopeIds,
5374
5360
  optimized
5375
5361
  );
5376
- vnode.targetAnchor = targetNode;
5362
+ vnode.targetStart = targetNode;
5363
+ vnode.targetAnchor = targetNode && nextSibling(targetNode);
5377
5364
  } else {
5378
5365
  vnode.anchor = nextSibling(node);
5379
5366
  let targetAnchor = targetNode;
5380
5367
  while (targetAnchor) {
5381
- targetAnchor = nextSibling(targetAnchor);
5382
- if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
5383
- vnode.targetAnchor = targetAnchor;
5384
- target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
5385
- break;
5368
+ if (targetAnchor && targetAnchor.nodeType === 8) {
5369
+ if (targetAnchor.data === "teleport start anchor") {
5370
+ vnode.targetStart = targetAnchor;
5371
+ } else if (targetAnchor.data === "teleport anchor") {
5372
+ vnode.targetAnchor = targetAnchor;
5373
+ target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
5374
+ break;
5375
+ }
5386
5376
  }
5377
+ targetAnchor = nextSibling(targetAnchor);
5378
+ }
5379
+ if (!vnode.targetAnchor) {
5380
+ prepareAnchor(target, vnode, createText, insert);
5387
5381
  }
5388
5382
  hydrateChildren(
5389
- targetNode,
5383
+ targetNode && nextSibling(targetNode),
5390
5384
  vnode,
5391
5385
  target,
5392
5386
  parentComponent,
@@ -5412,6 +5406,16 @@ function updateCssVars(vnode) {
5412
5406
  ctx.ut();
5413
5407
  }
5414
5408
  }
5409
+ function prepareAnchor(target, vnode, createText, insert) {
5410
+ const targetStart = vnode.targetStart = createText("");
5411
+ const targetAnchor = vnode.targetAnchor = createText("");
5412
+ targetStart[TeleportEndKey] = targetAnchor;
5413
+ if (target) {
5414
+ insert(targetStart, target);
5415
+ insert(targetAnchor, target);
5416
+ }
5417
+ return targetAnchor;
5418
+ }
5415
5419
 
5416
5420
  let hasLoggedMismatchError = false;
5417
5421
  const logMismatchError = () => {
@@ -5660,9 +5664,10 @@ function createHydrationFunctions(rendererInternals) {
5660
5664
  }
5661
5665
  if (props) {
5662
5666
  if (forcePatch || !optimized || patchFlag & (16 | 32)) {
5667
+ const isCustomElement = el.tagName.includes("-");
5663
5668
  for (const key in props) {
5664
5669
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
5665
- key[0] === ".") {
5670
+ key[0] === "." || isCustomElement) {
5666
5671
  patchProp(el, key, null, props[key], void 0, parentComponent);
5667
5672
  }
5668
5673
  }
@@ -9167,7 +9172,7 @@ function isMemoSame(cached, memo) {
9167
9172
  return true;
9168
9173
  }
9169
9174
 
9170
- const version = "3.4.34";
9175
+ const version = "3.4.36";
9171
9176
  const warn$1 = NOOP;
9172
9177
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9173
9178
  const devtools = void 0;
@@ -12146,6 +12151,16 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
12146
12151
  (id) => markScopeIdentifier(node, id, knownIds)
12147
12152
  );
12148
12153
  }
12154
+ } else if (node.type === "CatchClause" && node.param) {
12155
+ for (const id of extractIdentifiers(node.param)) {
12156
+ markScopeIdentifier(node, id, knownIds);
12157
+ }
12158
+ } else if (isForStatement(node)) {
12159
+ walkForStatement(
12160
+ node,
12161
+ false,
12162
+ (id) => markScopeIdentifier(node, id, knownIds)
12163
+ );
12149
12164
  }
12150
12165
  },
12151
12166
  leave(node, parent) {
@@ -12226,14 +12241,20 @@ function walkBlockDeclarations(block, onIdent) {
12226
12241
  } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
12227
12242
  if (stmt.declare || !stmt.id) continue;
12228
12243
  onIdent(stmt.id);
12229
- } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
12230
- const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
12231
- if (variable && variable.type === "VariableDeclaration") {
12232
- for (const decl of variable.declarations) {
12233
- for (const id of extractIdentifiers(decl.id)) {
12234
- onIdent(id);
12235
- }
12236
- }
12244
+ } else if (isForStatement(stmt)) {
12245
+ walkForStatement(stmt, true, onIdent);
12246
+ }
12247
+ }
12248
+ }
12249
+ function isForStatement(stmt) {
12250
+ return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement";
12251
+ }
12252
+ function walkForStatement(stmt, isVar, onIdent) {
12253
+ const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
12254
+ if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) {
12255
+ for (const decl of variable.declarations) {
12256
+ for (const id of extractIdentifiers(decl.id)) {
12257
+ onIdent(id);
12237
12258
  }
12238
12259
  }
12239
12260
  }
@@ -12320,7 +12341,7 @@ function isReferenced(node, parent, grandparent) {
12320
12341
  if (parent.key === node) {
12321
12342
  return !!parent.computed;
12322
12343
  }
12323
- return !grandparent ;
12344
+ return !grandparent;
12324
12345
  case "ClassProperty":
12325
12346
  if (parent.key === node) {
12326
12347
  return !!parent.computed;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.4.34
2
+ * @vue/compat v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -5246,7 +5246,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5246
5246
  return vm;
5247
5247
  }
5248
5248
  }
5249
- Vue.version = `2.6.14-compat:${"3.4.34"}`;
5249
+ Vue.version = `2.6.14-compat:${"3.4.36"}`;
5250
5250
  Vue.config = singletonApp.config;
5251
5251
  Vue.use = (plugin, ...options) => {
5252
5252
  if (plugin && isFunction(plugin.install)) {
@@ -6163,14 +6163,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
6163
6163
  if (validatePropName(normalizedKey)) {
6164
6164
  const opt = raw[key];
6165
6165
  const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
6166
- if (prop) {
6167
- const booleanIndex = getTypeIndex(Boolean, prop.type);
6168
- const stringIndex = getTypeIndex(String, prop.type);
6169
- prop[0 /* shouldCast */] = booleanIndex > -1;
6170
- prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex;
6171
- if (booleanIndex > -1 || hasOwn(prop, "default")) {
6172
- needCastKeys.push(normalizedKey);
6166
+ const propType = prop.type;
6167
+ let shouldCast = false;
6168
+ let shouldCastTrue = true;
6169
+ if (isArray(propType)) {
6170
+ for (let index = 0; index < propType.length; ++index) {
6171
+ const type = propType[index];
6172
+ const typeName = isFunction(type) && type.name;
6173
+ if (typeName === "Boolean") {
6174
+ shouldCast = true;
6175
+ break;
6176
+ } else if (typeName === "String") {
6177
+ shouldCastTrue = false;
6178
+ }
6173
6179
  }
6180
+ } else {
6181
+ shouldCast = isFunction(propType) && propType.name === "Boolean";
6182
+ }
6183
+ prop[0 /* shouldCast */] = shouldCast;
6184
+ prop[1 /* shouldCastTrue */] = shouldCastTrue;
6185
+ if (shouldCast || hasOwn(prop, "default")) {
6186
+ needCastKeys.push(normalizedKey);
6174
6187
  }
6175
6188
  }
6176
6189
  }
@@ -6201,17 +6214,6 @@ function getType(ctor) {
6201
6214
  }
6202
6215
  return "";
6203
6216
  }
6204
- function isSameType(a, b) {
6205
- return getType(a) === getType(b);
6206
- }
6207
- function getTypeIndex(type, expectedTypes) {
6208
- if (isArray(expectedTypes)) {
6209
- return expectedTypes.findIndex((t) => isSameType(t, type));
6210
- } else if (isFunction(expectedTypes)) {
6211
- return isSameType(expectedTypes, type) ? 0 : -1;
6212
- }
6213
- return -1;
6214
- }
6215
6217
  function validateProps(rawProps, props, instance) {
6216
6218
  const resolvedValues = toRaw(props);
6217
6219
  const options = instance.propsOptions[0];
@@ -6551,15 +6553,11 @@ const TeleportImpl = {
6551
6553
  if (n1 == null) {
6552
6554
  const placeholder = n2.el = createComment("teleport start") ;
6553
6555
  const mainAnchor = n2.anchor = createComment("teleport end") ;
6554
- const target = n2.target = resolveTarget(n2.props, querySelector);
6555
- const targetStart = n2.targetStart = createText("");
6556
- const targetAnchor = n2.targetAnchor = createText("");
6557
6556
  insert(placeholder, container, anchor);
6558
6557
  insert(mainAnchor, container, anchor);
6559
- targetStart[TeleportEndKey] = targetAnchor;
6558
+ const target = n2.target = resolveTarget(n2.props, querySelector);
6559
+ const targetAnchor = prepareAnchor(target, n2, createText, insert);
6560
6560
  if (target) {
6561
- insert(targetStart, target);
6562
- insert(targetAnchor, target);
6563
6561
  if (namespace === "svg" || isTargetSVG(target)) {
6564
6562
  namespace = "svg";
6565
6563
  } else if (namespace === "mathml" || isTargetMathML(target)) {
@@ -6731,7 +6729,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
6731
6729
  }
6732
6730
  }
6733
6731
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
6734
- o: { nextSibling, parentNode, querySelector }
6732
+ o: { nextSibling, parentNode, querySelector, insert, createText }
6735
6733
  }, hydrateChildren) {
6736
6734
  const target = vnode.target = resolveTarget(
6737
6735
  vnode.props,
@@ -6750,20 +6748,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
6750
6748
  slotScopeIds,
6751
6749
  optimized
6752
6750
  );
6753
- vnode.targetAnchor = targetNode;
6751
+ vnode.targetStart = targetNode;
6752
+ vnode.targetAnchor = targetNode && nextSibling(targetNode);
6754
6753
  } else {
6755
6754
  vnode.anchor = nextSibling(node);
6756
6755
  let targetAnchor = targetNode;
6757
6756
  while (targetAnchor) {
6758
- targetAnchor = nextSibling(targetAnchor);
6759
- if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
6760
- vnode.targetAnchor = targetAnchor;
6761
- target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
6762
- break;
6757
+ if (targetAnchor && targetAnchor.nodeType === 8) {
6758
+ if (targetAnchor.data === "teleport start anchor") {
6759
+ vnode.targetStart = targetAnchor;
6760
+ } else if (targetAnchor.data === "teleport anchor") {
6761
+ vnode.targetAnchor = targetAnchor;
6762
+ target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
6763
+ break;
6764
+ }
6763
6765
  }
6766
+ targetAnchor = nextSibling(targetAnchor);
6767
+ }
6768
+ if (!vnode.targetAnchor) {
6769
+ prepareAnchor(target, vnode, createText, insert);
6764
6770
  }
6765
6771
  hydrateChildren(
6766
- targetNode,
6772
+ targetNode && nextSibling(targetNode),
6767
6773
  vnode,
6768
6774
  target,
6769
6775
  parentComponent,
@@ -6789,6 +6795,16 @@ function updateCssVars(vnode) {
6789
6795
  ctx.ut();
6790
6796
  }
6791
6797
  }
6798
+ function prepareAnchor(target, vnode, createText, insert) {
6799
+ const targetStart = vnode.targetStart = createText("");
6800
+ const targetAnchor = vnode.targetAnchor = createText("");
6801
+ targetStart[TeleportEndKey] = targetAnchor;
6802
+ if (target) {
6803
+ insert(targetStart, target);
6804
+ insert(targetAnchor, target);
6805
+ }
6806
+ return targetAnchor;
6807
+ }
6792
6808
 
6793
6809
  let hasLoggedMismatchError = false;
6794
6810
  const logMismatchError = () => {
@@ -7072,6 +7088,7 @@ Server rendered element contains more child nodes than client vdom.`
7072
7088
  }
7073
7089
  if (props) {
7074
7090
  {
7091
+ const isCustomElement = el.tagName.includes("-");
7075
7092
  for (const key in props) {
7076
7093
  if (// #11189 skip if this node has directives that have created hooks
7077
7094
  // as it could have mutated the DOM in any possible way
@@ -7079,7 +7096,7 @@ Server rendered element contains more child nodes than client vdom.`
7079
7096
  logMismatchError();
7080
7097
  }
7081
7098
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
7082
- key[0] === ".") {
7099
+ key[0] === "." || isCustomElement) {
7083
7100
  patchProp(el, key, null, props[key], void 0, parentComponent);
7084
7101
  }
7085
7102
  }
@@ -11417,7 +11434,7 @@ function isMemoSame(cached, memo) {
11417
11434
  return true;
11418
11435
  }
11419
11436
 
11420
- const version = "3.4.34";
11437
+ const version = "3.4.36";
11421
11438
  const warn = warn$1 ;
11422
11439
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11423
11440
  const devtools = devtools$1 ;