[57e58a3] | 1 | /**
|
---|
| 2 | * @vue/shared v3.5.13
|
---|
| 3 | * (c) 2018-present Yuxi (Evan) You and Vue contributors
|
---|
| 4 | * @license MIT
|
---|
| 5 | **/
|
---|
| 6 | 'use strict';
|
---|
| 7 |
|
---|
| 8 | Object.defineProperty(exports, '__esModule', { value: true });
|
---|
| 9 |
|
---|
| 10 | /*! #__NO_SIDE_EFFECTS__ */
|
---|
| 11 | // @__NO_SIDE_EFFECTS__
|
---|
| 12 | function makeMap(str) {
|
---|
| 13 | const map = /* @__PURE__ */ Object.create(null);
|
---|
| 14 | for (const key of str.split(",")) map[key] = 1;
|
---|
| 15 | return (val) => val in map;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | const EMPTY_OBJ = {};
|
---|
| 19 | const EMPTY_ARR = [];
|
---|
| 20 | const NOOP = () => {
|
---|
| 21 | };
|
---|
| 22 | const NO = () => false;
|
---|
| 23 | const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
|
---|
| 24 | (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
|
---|
| 25 | const isModelListener = (key) => key.startsWith("onUpdate:");
|
---|
| 26 | const extend = Object.assign;
|
---|
| 27 | const remove = (arr, el) => {
|
---|
| 28 | const i = arr.indexOf(el);
|
---|
| 29 | if (i > -1) {
|
---|
| 30 | arr.splice(i, 1);
|
---|
| 31 | }
|
---|
| 32 | };
|
---|
| 33 | const hasOwnProperty = Object.prototype.hasOwnProperty;
|
---|
| 34 | const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
---|
| 35 | const isArray = Array.isArray;
|
---|
| 36 | const isMap = (val) => toTypeString(val) === "[object Map]";
|
---|
| 37 | const isSet = (val) => toTypeString(val) === "[object Set]";
|
---|
| 38 | const isDate = (val) => toTypeString(val) === "[object Date]";
|
---|
| 39 | const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
|
---|
| 40 | const isFunction = (val) => typeof val === "function";
|
---|
| 41 | const isString = (val) => typeof val === "string";
|
---|
| 42 | const isSymbol = (val) => typeof val === "symbol";
|
---|
| 43 | const isObject = (val) => val !== null && typeof val === "object";
|
---|
| 44 | const isPromise = (val) => {
|
---|
| 45 | return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
|
---|
| 46 | };
|
---|
| 47 | const objectToString = Object.prototype.toString;
|
---|
| 48 | const toTypeString = (value) => objectToString.call(value);
|
---|
| 49 | const toRawType = (value) => {
|
---|
| 50 | return toTypeString(value).slice(8, -1);
|
---|
| 51 | };
|
---|
| 52 | const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
---|
| 53 | const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
---|
| 54 | const isReservedProp = /* @__PURE__ */ makeMap(
|
---|
| 55 | // the leading comma is intentional so empty string "" is also included
|
---|
| 56 | ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
---|
| 57 | );
|
---|
| 58 | const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
---|
| 59 | "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
|
---|
| 60 | );
|
---|
| 61 | const cacheStringFunction = (fn) => {
|
---|
| 62 | const cache = /* @__PURE__ */ Object.create(null);
|
---|
| 63 | return (str) => {
|
---|
| 64 | const hit = cache[str];
|
---|
| 65 | return hit || (cache[str] = fn(str));
|
---|
| 66 | };
|
---|
| 67 | };
|
---|
| 68 | const camelizeRE = /-(\w)/g;
|
---|
| 69 | const camelize = cacheStringFunction(
|
---|
| 70 | (str) => {
|
---|
| 71 | return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
---|
| 72 | }
|
---|
| 73 | );
|
---|
| 74 | const hyphenateRE = /\B([A-Z])/g;
|
---|
| 75 | const hyphenate = cacheStringFunction(
|
---|
| 76 | (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
---|
| 77 | );
|
---|
| 78 | const capitalize = cacheStringFunction((str) => {
|
---|
| 79 | return str.charAt(0).toUpperCase() + str.slice(1);
|
---|
| 80 | });
|
---|
| 81 | const toHandlerKey = cacheStringFunction(
|
---|
| 82 | (str) => {
|
---|
| 83 | const s = str ? `on${capitalize(str)}` : ``;
|
---|
| 84 | return s;
|
---|
| 85 | }
|
---|
| 86 | );
|
---|
| 87 | const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
---|
| 88 | const invokeArrayFns = (fns, ...arg) => {
|
---|
| 89 | for (let i = 0; i < fns.length; i++) {
|
---|
| 90 | fns[i](...arg);
|
---|
| 91 | }
|
---|
| 92 | };
|
---|
| 93 | const def = (obj, key, value, writable = false) => {
|
---|
| 94 | Object.defineProperty(obj, key, {
|
---|
| 95 | configurable: true,
|
---|
| 96 | enumerable: false,
|
---|
| 97 | writable,
|
---|
| 98 | value
|
---|
| 99 | });
|
---|
| 100 | };
|
---|
| 101 | const looseToNumber = (val) => {
|
---|
| 102 | const n = parseFloat(val);
|
---|
| 103 | return isNaN(n) ? val : n;
|
---|
| 104 | };
|
---|
| 105 | const toNumber = (val) => {
|
---|
| 106 | const n = isString(val) ? Number(val) : NaN;
|
---|
| 107 | return isNaN(n) ? val : n;
|
---|
| 108 | };
|
---|
| 109 | let _globalThis;
|
---|
| 110 | const getGlobalThis = () => {
|
---|
| 111 | return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
---|
| 112 | };
|
---|
| 113 | const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
|
---|
| 114 | function genPropsAccessExp(name) {
|
---|
| 115 | return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
|
---|
| 116 | }
|
---|
| 117 | function genCacheKey(source, options) {
|
---|
| 118 | return source + JSON.stringify(
|
---|
| 119 | options,
|
---|
| 120 | (_, val) => typeof val === "function" ? val.toString() : val
|
---|
| 121 | );
|
---|
| 122 | }
|
---|
| 123 |
|
---|
| 124 | const PatchFlags = {
|
---|
| 125 | "TEXT": 1,
|
---|
| 126 | "1": "TEXT",
|
---|
| 127 | "CLASS": 2,
|
---|
| 128 | "2": "CLASS",
|
---|
| 129 | "STYLE": 4,
|
---|
| 130 | "4": "STYLE",
|
---|
| 131 | "PROPS": 8,
|
---|
| 132 | "8": "PROPS",
|
---|
| 133 | "FULL_PROPS": 16,
|
---|
| 134 | "16": "FULL_PROPS",
|
---|
| 135 | "NEED_HYDRATION": 32,
|
---|
| 136 | "32": "NEED_HYDRATION",
|
---|
| 137 | "STABLE_FRAGMENT": 64,
|
---|
| 138 | "64": "STABLE_FRAGMENT",
|
---|
| 139 | "KEYED_FRAGMENT": 128,
|
---|
| 140 | "128": "KEYED_FRAGMENT",
|
---|
| 141 | "UNKEYED_FRAGMENT": 256,
|
---|
| 142 | "256": "UNKEYED_FRAGMENT",
|
---|
| 143 | "NEED_PATCH": 512,
|
---|
| 144 | "512": "NEED_PATCH",
|
---|
| 145 | "DYNAMIC_SLOTS": 1024,
|
---|
| 146 | "1024": "DYNAMIC_SLOTS",
|
---|
| 147 | "DEV_ROOT_FRAGMENT": 2048,
|
---|
| 148 | "2048": "DEV_ROOT_FRAGMENT",
|
---|
| 149 | "CACHED": -1,
|
---|
| 150 | "-1": "CACHED",
|
---|
| 151 | "BAIL": -2,
|
---|
| 152 | "-2": "BAIL"
|
---|
| 153 | };
|
---|
| 154 | const PatchFlagNames = {
|
---|
| 155 | [1]: `TEXT`,
|
---|
| 156 | [2]: `CLASS`,
|
---|
| 157 | [4]: `STYLE`,
|
---|
| 158 | [8]: `PROPS`,
|
---|
| 159 | [16]: `FULL_PROPS`,
|
---|
| 160 | [32]: `NEED_HYDRATION`,
|
---|
| 161 | [64]: `STABLE_FRAGMENT`,
|
---|
| 162 | [128]: `KEYED_FRAGMENT`,
|
---|
| 163 | [256]: `UNKEYED_FRAGMENT`,
|
---|
| 164 | [512]: `NEED_PATCH`,
|
---|
| 165 | [1024]: `DYNAMIC_SLOTS`,
|
---|
| 166 | [2048]: `DEV_ROOT_FRAGMENT`,
|
---|
| 167 | [-1]: `HOISTED`,
|
---|
| 168 | [-2]: `BAIL`
|
---|
| 169 | };
|
---|
| 170 |
|
---|
| 171 | const ShapeFlags = {
|
---|
| 172 | "ELEMENT": 1,
|
---|
| 173 | "1": "ELEMENT",
|
---|
| 174 | "FUNCTIONAL_COMPONENT": 2,
|
---|
| 175 | "2": "FUNCTIONAL_COMPONENT",
|
---|
| 176 | "STATEFUL_COMPONENT": 4,
|
---|
| 177 | "4": "STATEFUL_COMPONENT",
|
---|
| 178 | "TEXT_CHILDREN": 8,
|
---|
| 179 | "8": "TEXT_CHILDREN",
|
---|
| 180 | "ARRAY_CHILDREN": 16,
|
---|
| 181 | "16": "ARRAY_CHILDREN",
|
---|
| 182 | "SLOTS_CHILDREN": 32,
|
---|
| 183 | "32": "SLOTS_CHILDREN",
|
---|
| 184 | "TELEPORT": 64,
|
---|
| 185 | "64": "TELEPORT",
|
---|
| 186 | "SUSPENSE": 128,
|
---|
| 187 | "128": "SUSPENSE",
|
---|
| 188 | "COMPONENT_SHOULD_KEEP_ALIVE": 256,
|
---|
| 189 | "256": "COMPONENT_SHOULD_KEEP_ALIVE",
|
---|
| 190 | "COMPONENT_KEPT_ALIVE": 512,
|
---|
| 191 | "512": "COMPONENT_KEPT_ALIVE",
|
---|
| 192 | "COMPONENT": 6,
|
---|
| 193 | "6": "COMPONENT"
|
---|
| 194 | };
|
---|
| 195 |
|
---|
| 196 | const SlotFlags = {
|
---|
| 197 | "STABLE": 1,
|
---|
| 198 | "1": "STABLE",
|
---|
| 199 | "DYNAMIC": 2,
|
---|
| 200 | "2": "DYNAMIC",
|
---|
| 201 | "FORWARDED": 3,
|
---|
| 202 | "3": "FORWARDED"
|
---|
| 203 | };
|
---|
| 204 | const slotFlagsText = {
|
---|
| 205 | [1]: "STABLE",
|
---|
| 206 | [2]: "DYNAMIC",
|
---|
| 207 | [3]: "FORWARDED"
|
---|
| 208 | };
|
---|
| 209 |
|
---|
| 210 | const GLOBALS_ALLOWED = "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";
|
---|
| 211 | const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
---|
| 212 | const isGloballyWhitelisted = isGloballyAllowed;
|
---|
| 213 |
|
---|
| 214 | const range = 2;
|
---|
| 215 | function generateCodeFrame(source, start = 0, end = source.length) {
|
---|
| 216 | start = Math.max(0, Math.min(start, source.length));
|
---|
| 217 | end = Math.max(0, Math.min(end, source.length));
|
---|
| 218 | if (start > end) return "";
|
---|
| 219 | let lines = source.split(/(\r?\n)/);
|
---|
| 220 | const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
|
---|
| 221 | lines = lines.filter((_, idx) => idx % 2 === 0);
|
---|
| 222 | let count = 0;
|
---|
| 223 | const res = [];
|
---|
| 224 | for (let i = 0; i < lines.length; i++) {
|
---|
| 225 | count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);
|
---|
| 226 | if (count >= start) {
|
---|
| 227 | for (let j = i - range; j <= i + range || end > count; j++) {
|
---|
| 228 | if (j < 0 || j >= lines.length) continue;
|
---|
| 229 | const line = j + 1;
|
---|
| 230 | res.push(
|
---|
| 231 | `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`
|
---|
| 232 | );
|
---|
| 233 | const lineLength = lines[j].length;
|
---|
| 234 | const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;
|
---|
| 235 | if (j === i) {
|
---|
| 236 | const pad = start - (count - (lineLength + newLineSeqLength));
|
---|
| 237 | const length = Math.max(
|
---|
| 238 | 1,
|
---|
| 239 | end > count ? lineLength - pad : end - start
|
---|
| 240 | );
|
---|
| 241 | res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
|
---|
| 242 | } else if (j > i) {
|
---|
| 243 | if (end > count) {
|
---|
| 244 | const length = Math.max(Math.min(end - count, lineLength), 1);
|
---|
| 245 | res.push(` | ` + "^".repeat(length));
|
---|
| 246 | }
|
---|
| 247 | count += lineLength + newLineSeqLength;
|
---|
| 248 | }
|
---|
| 249 | }
|
---|
| 250 | break;
|
---|
| 251 | }
|
---|
| 252 | }
|
---|
| 253 | return res.join("\n");
|
---|
| 254 | }
|
---|
| 255 |
|
---|
| 256 | function normalizeStyle(value) {
|
---|
| 257 | if (isArray(value)) {
|
---|
| 258 | const res = {};
|
---|
| 259 | for (let i = 0; i < value.length; i++) {
|
---|
| 260 | const item = value[i];
|
---|
| 261 | const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
|
---|
| 262 | if (normalized) {
|
---|
| 263 | for (const key in normalized) {
|
---|
| 264 | res[key] = normalized[key];
|
---|
| 265 | }
|
---|
| 266 | }
|
---|
| 267 | }
|
---|
| 268 | return res;
|
---|
| 269 | } else if (isString(value) || isObject(value)) {
|
---|
| 270 | return value;
|
---|
| 271 | }
|
---|
| 272 | }
|
---|
| 273 | const listDelimiterRE = /;(?![^(]*\))/g;
|
---|
| 274 | const propertyDelimiterRE = /:([^]+)/;
|
---|
| 275 | const styleCommentRE = /\/\*[^]*?\*\//g;
|
---|
| 276 | function parseStringStyle(cssText) {
|
---|
| 277 | const ret = {};
|
---|
| 278 | cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
---|
| 279 | if (item) {
|
---|
| 280 | const tmp = item.split(propertyDelimiterRE);
|
---|
| 281 | tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
---|
| 282 | }
|
---|
| 283 | });
|
---|
| 284 | return ret;
|
---|
| 285 | }
|
---|
| 286 | function stringifyStyle(styles) {
|
---|
| 287 | if (!styles) return "";
|
---|
| 288 | if (isString(styles)) return styles;
|
---|
| 289 | let ret = "";
|
---|
| 290 | for (const key in styles) {
|
---|
| 291 | const value = styles[key];
|
---|
| 292 | if (isString(value) || typeof value === "number") {
|
---|
| 293 | const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
|
---|
| 294 | ret += `${normalizedKey}:${value};`;
|
---|
| 295 | }
|
---|
| 296 | }
|
---|
| 297 | return ret;
|
---|
| 298 | }
|
---|
| 299 | function normalizeClass(value) {
|
---|
| 300 | let res = "";
|
---|
| 301 | if (isString(value)) {
|
---|
| 302 | res = value;
|
---|
| 303 | } else if (isArray(value)) {
|
---|
| 304 | for (let i = 0; i < value.length; i++) {
|
---|
| 305 | const normalized = normalizeClass(value[i]);
|
---|
| 306 | if (normalized) {
|
---|
| 307 | res += normalized + " ";
|
---|
| 308 | }
|
---|
| 309 | }
|
---|
| 310 | } else if (isObject(value)) {
|
---|
| 311 | for (const name in value) {
|
---|
| 312 | if (value[name]) {
|
---|
| 313 | res += name + " ";
|
---|
| 314 | }
|
---|
| 315 | }
|
---|
| 316 | }
|
---|
| 317 | return res.trim();
|
---|
| 318 | }
|
---|
| 319 | function normalizeProps(props) {
|
---|
| 320 | if (!props) return null;
|
---|
| 321 | let { class: klass, style } = props;
|
---|
| 322 | if (klass && !isString(klass)) {
|
---|
| 323 | props.class = normalizeClass(klass);
|
---|
| 324 | }
|
---|
| 325 | if (style) {
|
---|
| 326 | props.style = normalizeStyle(style);
|
---|
| 327 | }
|
---|
| 328 | return props;
|
---|
| 329 | }
|
---|
| 330 |
|
---|
| 331 | const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
---|
| 332 | const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
---|
| 333 | const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
|
---|
| 334 | const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
---|
| 335 | const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
---|
| 336 | const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
---|
| 337 | const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
---|
| 338 | const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
---|
| 339 |
|
---|
| 340 | const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
---|
| 341 | const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
---|
| 342 | const isBooleanAttr = /* @__PURE__ */ makeMap(
|
---|
| 343 | specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
---|
| 344 | );
|
---|
| 345 | function includeBooleanAttr(value) {
|
---|
| 346 | return !!value || value === "";
|
---|
| 347 | }
|
---|
| 348 | const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
|
---|
| 349 | const attrValidationCache = {};
|
---|
| 350 | function isSSRSafeAttrName(name) {
|
---|
| 351 | if (attrValidationCache.hasOwnProperty(name)) {
|
---|
| 352 | return attrValidationCache[name];
|
---|
| 353 | }
|
---|
| 354 | const isUnsafe = unsafeAttrCharRE.test(name);
|
---|
| 355 | if (isUnsafe) {
|
---|
| 356 | console.error(`unsafe attribute name: ${name}`);
|
---|
| 357 | }
|
---|
| 358 | return attrValidationCache[name] = !isUnsafe;
|
---|
| 359 | }
|
---|
| 360 | const propsToAttrMap = {
|
---|
| 361 | acceptCharset: "accept-charset",
|
---|
| 362 | className: "class",
|
---|
| 363 | htmlFor: "for",
|
---|
| 364 | httpEquiv: "http-equiv"
|
---|
| 365 | };
|
---|
| 366 | const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
---|
| 367 | `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`
|
---|
| 368 | );
|
---|
| 369 | const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
---|
| 370 | `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`
|
---|
| 371 | );
|
---|
| 372 | const isKnownMathMLAttr = /* @__PURE__ */ makeMap(
|
---|
| 373 | `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`
|
---|
| 374 | );
|
---|
| 375 | function isRenderableAttrValue(value) {
|
---|
| 376 | if (value == null) {
|
---|
| 377 | return false;
|
---|
| 378 | }
|
---|
| 379 | const type = typeof value;
|
---|
| 380 | return type === "string" || type === "number" || type === "boolean";
|
---|
| 381 | }
|
---|
| 382 |
|
---|
| 383 | const escapeRE = /["'&<>]/;
|
---|
| 384 | function escapeHtml(string) {
|
---|
| 385 | const str = "" + string;
|
---|
| 386 | const match = escapeRE.exec(str);
|
---|
| 387 | if (!match) {
|
---|
| 388 | return str;
|
---|
| 389 | }
|
---|
| 390 | let html = "";
|
---|
| 391 | let escaped;
|
---|
| 392 | let index;
|
---|
| 393 | let lastIndex = 0;
|
---|
| 394 | for (index = match.index; index < str.length; index++) {
|
---|
| 395 | switch (str.charCodeAt(index)) {
|
---|
| 396 | case 34:
|
---|
| 397 | escaped = """;
|
---|
| 398 | break;
|
---|
| 399 | case 38:
|
---|
| 400 | escaped = "&";
|
---|
| 401 | break;
|
---|
| 402 | case 39:
|
---|
| 403 | escaped = "'";
|
---|
| 404 | break;
|
---|
| 405 | case 60:
|
---|
| 406 | escaped = "<";
|
---|
| 407 | break;
|
---|
| 408 | case 62:
|
---|
| 409 | escaped = ">";
|
---|
| 410 | break;
|
---|
| 411 | default:
|
---|
| 412 | continue;
|
---|
| 413 | }
|
---|
| 414 | if (lastIndex !== index) {
|
---|
| 415 | html += str.slice(lastIndex, index);
|
---|
| 416 | }
|
---|
| 417 | lastIndex = index + 1;
|
---|
| 418 | html += escaped;
|
---|
| 419 | }
|
---|
| 420 | return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
---|
| 421 | }
|
---|
| 422 | const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
|
---|
| 423 | function escapeHtmlComment(src) {
|
---|
| 424 | return src.replace(commentStripRE, "");
|
---|
| 425 | }
|
---|
| 426 | const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
|
---|
| 427 | function getEscapedCssVarName(key, doubleEscape) {
|
---|
| 428 | return key.replace(
|
---|
| 429 | cssVarNameEscapeSymbolsRE,
|
---|
| 430 | (s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
|
---|
| 431 | );
|
---|
| 432 | }
|
---|
| 433 |
|
---|
| 434 | function looseCompareArrays(a, b) {
|
---|
| 435 | if (a.length !== b.length) return false;
|
---|
| 436 | let equal = true;
|
---|
| 437 | for (let i = 0; equal && i < a.length; i++) {
|
---|
| 438 | equal = looseEqual(a[i], b[i]);
|
---|
| 439 | }
|
---|
| 440 | return equal;
|
---|
| 441 | }
|
---|
| 442 | function looseEqual(a, b) {
|
---|
| 443 | if (a === b) return true;
|
---|
| 444 | let aValidType = isDate(a);
|
---|
| 445 | let bValidType = isDate(b);
|
---|
| 446 | if (aValidType || bValidType) {
|
---|
| 447 | return aValidType && bValidType ? a.getTime() === b.getTime() : false;
|
---|
| 448 | }
|
---|
| 449 | aValidType = isSymbol(a);
|
---|
| 450 | bValidType = isSymbol(b);
|
---|
| 451 | if (aValidType || bValidType) {
|
---|
| 452 | return a === b;
|
---|
| 453 | }
|
---|
| 454 | aValidType = isArray(a);
|
---|
| 455 | bValidType = isArray(b);
|
---|
| 456 | if (aValidType || bValidType) {
|
---|
| 457 | return aValidType && bValidType ? looseCompareArrays(a, b) : false;
|
---|
| 458 | }
|
---|
| 459 | aValidType = isObject(a);
|
---|
| 460 | bValidType = isObject(b);
|
---|
| 461 | if (aValidType || bValidType) {
|
---|
| 462 | if (!aValidType || !bValidType) {
|
---|
| 463 | return false;
|
---|
| 464 | }
|
---|
| 465 | const aKeysCount = Object.keys(a).length;
|
---|
| 466 | const bKeysCount = Object.keys(b).length;
|
---|
| 467 | if (aKeysCount !== bKeysCount) {
|
---|
| 468 | return false;
|
---|
| 469 | }
|
---|
| 470 | for (const key in a) {
|
---|
| 471 | const aHasKey = a.hasOwnProperty(key);
|
---|
| 472 | const bHasKey = b.hasOwnProperty(key);
|
---|
| 473 | if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
|
---|
| 474 | return false;
|
---|
| 475 | }
|
---|
| 476 | }
|
---|
| 477 | }
|
---|
| 478 | return String(a) === String(b);
|
---|
| 479 | }
|
---|
| 480 | function looseIndexOf(arr, val) {
|
---|
| 481 | return arr.findIndex((item) => looseEqual(item, val));
|
---|
| 482 | }
|
---|
| 483 |
|
---|
| 484 | const isRef = (val) => {
|
---|
| 485 | return !!(val && val["__v_isRef"] === true);
|
---|
| 486 | };
|
---|
| 487 | const toDisplayString = (val) => {
|
---|
| 488 | return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
|
---|
| 489 | };
|
---|
| 490 | const replacer = (_key, val) => {
|
---|
| 491 | if (isRef(val)) {
|
---|
| 492 | return replacer(_key, val.value);
|
---|
| 493 | } else if (isMap(val)) {
|
---|
| 494 | return {
|
---|
| 495 | [`Map(${val.size})`]: [...val.entries()].reduce(
|
---|
| 496 | (entries, [key, val2], i) => {
|
---|
| 497 | entries[stringifySymbol(key, i) + " =>"] = val2;
|
---|
| 498 | return entries;
|
---|
| 499 | },
|
---|
| 500 | {}
|
---|
| 501 | )
|
---|
| 502 | };
|
---|
| 503 | } else if (isSet(val)) {
|
---|
| 504 | return {
|
---|
| 505 | [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
|
---|
| 506 | };
|
---|
| 507 | } else if (isSymbol(val)) {
|
---|
| 508 | return stringifySymbol(val);
|
---|
| 509 | } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
|
---|
| 510 | return String(val);
|
---|
| 511 | }
|
---|
| 512 | return val;
|
---|
| 513 | };
|
---|
| 514 | const stringifySymbol = (v, i = "") => {
|
---|
| 515 | var _a;
|
---|
| 516 | return (
|
---|
| 517 | // Symbol.description in es2019+ so we need to cast here to pass
|
---|
| 518 | // the lib: es2016 check
|
---|
| 519 | isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
---|
| 520 | );
|
---|
| 521 | };
|
---|
| 522 |
|
---|
| 523 | exports.EMPTY_ARR = EMPTY_ARR;
|
---|
| 524 | exports.EMPTY_OBJ = EMPTY_OBJ;
|
---|
| 525 | exports.NO = NO;
|
---|
| 526 | exports.NOOP = NOOP;
|
---|
| 527 | exports.PatchFlagNames = PatchFlagNames;
|
---|
| 528 | exports.PatchFlags = PatchFlags;
|
---|
| 529 | exports.ShapeFlags = ShapeFlags;
|
---|
| 530 | exports.SlotFlags = SlotFlags;
|
---|
| 531 | exports.camelize = camelize;
|
---|
| 532 | exports.capitalize = capitalize;
|
---|
| 533 | exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE;
|
---|
| 534 | exports.def = def;
|
---|
| 535 | exports.escapeHtml = escapeHtml;
|
---|
| 536 | exports.escapeHtmlComment = escapeHtmlComment;
|
---|
| 537 | exports.extend = extend;
|
---|
| 538 | exports.genCacheKey = genCacheKey;
|
---|
| 539 | exports.genPropsAccessExp = genPropsAccessExp;
|
---|
| 540 | exports.generateCodeFrame = generateCodeFrame;
|
---|
| 541 | exports.getEscapedCssVarName = getEscapedCssVarName;
|
---|
| 542 | exports.getGlobalThis = getGlobalThis;
|
---|
| 543 | exports.hasChanged = hasChanged;
|
---|
| 544 | exports.hasOwn = hasOwn;
|
---|
| 545 | exports.hyphenate = hyphenate;
|
---|
| 546 | exports.includeBooleanAttr = includeBooleanAttr;
|
---|
| 547 | exports.invokeArrayFns = invokeArrayFns;
|
---|
| 548 | exports.isArray = isArray;
|
---|
| 549 | exports.isBooleanAttr = isBooleanAttr;
|
---|
| 550 | exports.isBuiltInDirective = isBuiltInDirective;
|
---|
| 551 | exports.isDate = isDate;
|
---|
| 552 | exports.isFunction = isFunction;
|
---|
| 553 | exports.isGloballyAllowed = isGloballyAllowed;
|
---|
| 554 | exports.isGloballyWhitelisted = isGloballyWhitelisted;
|
---|
| 555 | exports.isHTMLTag = isHTMLTag;
|
---|
| 556 | exports.isIntegerKey = isIntegerKey;
|
---|
| 557 | exports.isKnownHtmlAttr = isKnownHtmlAttr;
|
---|
| 558 | exports.isKnownMathMLAttr = isKnownMathMLAttr;
|
---|
| 559 | exports.isKnownSvgAttr = isKnownSvgAttr;
|
---|
| 560 | exports.isMap = isMap;
|
---|
| 561 | exports.isMathMLTag = isMathMLTag;
|
---|
| 562 | exports.isModelListener = isModelListener;
|
---|
| 563 | exports.isObject = isObject;
|
---|
| 564 | exports.isOn = isOn;
|
---|
| 565 | exports.isPlainObject = isPlainObject;
|
---|
| 566 | exports.isPromise = isPromise;
|
---|
| 567 | exports.isRegExp = isRegExp;
|
---|
| 568 | exports.isRenderableAttrValue = isRenderableAttrValue;
|
---|
| 569 | exports.isReservedProp = isReservedProp;
|
---|
| 570 | exports.isSSRSafeAttrName = isSSRSafeAttrName;
|
---|
| 571 | exports.isSVGTag = isSVGTag;
|
---|
| 572 | exports.isSet = isSet;
|
---|
| 573 | exports.isSpecialBooleanAttr = isSpecialBooleanAttr;
|
---|
| 574 | exports.isString = isString;
|
---|
| 575 | exports.isSymbol = isSymbol;
|
---|
| 576 | exports.isVoidTag = isVoidTag;
|
---|
| 577 | exports.looseEqual = looseEqual;
|
---|
| 578 | exports.looseIndexOf = looseIndexOf;
|
---|
| 579 | exports.looseToNumber = looseToNumber;
|
---|
| 580 | exports.makeMap = makeMap;
|
---|
| 581 | exports.normalizeClass = normalizeClass;
|
---|
| 582 | exports.normalizeProps = normalizeProps;
|
---|
| 583 | exports.normalizeStyle = normalizeStyle;
|
---|
| 584 | exports.objectToString = objectToString;
|
---|
| 585 | exports.parseStringStyle = parseStringStyle;
|
---|
| 586 | exports.propsToAttrMap = propsToAttrMap;
|
---|
| 587 | exports.remove = remove;
|
---|
| 588 | exports.slotFlagsText = slotFlagsText;
|
---|
| 589 | exports.stringifyStyle = stringifyStyle;
|
---|
| 590 | exports.toDisplayString = toDisplayString;
|
---|
| 591 | exports.toHandlerKey = toHandlerKey;
|
---|
| 592 | exports.toNumber = toNumber;
|
---|
| 593 | exports.toRawType = toRawType;
|
---|
| 594 | exports.toTypeString = toTypeString;
|
---|