NRuby
11841 строка · 432.3 Кб
1/*!
2* Vue.js v2.7.8
3* (c) 2014-2022 Evan You
4* Released under the MIT License.
5*/
6(function (global, factory) {7typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :8typeof define === 'function' && define.amd ? define(factory) :9(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Vue = factory());10})(this, (function () { 'use strict';11
12var emptyObject = Object.freeze({});13var isArray = Array.isArray;14// These helpers produce better VM code in JS engines due to their15// explicitness and function inlining.16function isUndef(v) {17return v === undefined || v === null;18}19function isDef(v) {20return v !== undefined && v !== null;21}22function isTrue(v) {23return v === true;24}25function isFalse(v) {26return v === false;27}28/**29* Check if value is primitive.
30*/
31function isPrimitive(value) {32return (typeof value === 'string' ||33typeof value === 'number' ||34// $flow-disable-line35typeof value === 'symbol' ||36typeof value === 'boolean');37}38function isFunction(value) {39return typeof value === 'function';40}41/**42* Quick object check - this is primarily used to tell
43* objects from primitive values when we know the value
44* is a JSON-compliant type.
45*/
46function isObject(obj) {47return obj !== null && typeof obj === 'object';48}49/**50* Get the raw type string of a value, e.g., [object Object].
51*/
52var _toString = Object.prototype.toString;53function toRawType(value) {54return _toString.call(value).slice(8, -1);55}56/**57* Strict object type check. Only returns true
58* for plain JavaScript objects.
59*/
60function isPlainObject(obj) {61return _toString.call(obj) === '[object Object]';62}63function isRegExp(v) {64return _toString.call(v) === '[object RegExp]';65}66/**67* Check if val is a valid array index.
68*/
69function isValidArrayIndex(val) {70var n = parseFloat(String(val));71return n >= 0 && Math.floor(n) === n && isFinite(val);72}73function isPromise(val) {74return (isDef(val) &&75typeof val.then === 'function' &&76typeof val.catch === 'function');77}78/**79* Convert a value to a string that is actually rendered.
80*/
81function toString(val) {82return val == null83? ''84: Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)85? JSON.stringify(val, null, 2)86: String(val);87}88/**89* Convert an input value to a number for persistence.
90* If the conversion fails, return original string.
91*/
92function toNumber(val) {93var n = parseFloat(val);94return isNaN(n) ? val : n;95}96/**97* Make a map and return a function for checking if a key
98* is in that map.
99*/
100function makeMap(str, expectsLowerCase) {101var map = Object.create(null);102var list = str.split(',');103for (var i = 0; i < list.length; i++) {104map[list[i]] = true;105}106return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };107}108/**109* Check if a tag is a built-in tag.
110*/
111var isBuiltInTag = makeMap('slot,component', true);112/**113* Check if an attribute is a reserved attribute.
114*/
115var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');116/**117* Remove an item from an array.
118*/
119function remove$2(arr, item) {120if (arr.length) {121var index = arr.indexOf(item);122if (index > -1) {123return arr.splice(index, 1);124}125}126}127/**128* Check whether an object has the property.
129*/
130var hasOwnProperty = Object.prototype.hasOwnProperty;131function hasOwn(obj, key) {132return hasOwnProperty.call(obj, key);133}134/**135* Create a cached version of a pure function.
136*/
137function cached(fn) {138var cache = Object.create(null);139return function cachedFn(str) {140var hit = cache[str];141return hit || (cache[str] = fn(str));142};143}144/**145* Camelize a hyphen-delimited string.
146*/
147var camelizeRE = /-(\w)/g;148var camelize = cached(function (str) {149return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });150});151/**152* Capitalize a string.
153*/
154var capitalize = cached(function (str) {155return str.charAt(0).toUpperCase() + str.slice(1);156});157/**158* Hyphenate a camelCase string.
159*/
160var hyphenateRE = /\B([A-Z])/g;161var hyphenate = cached(function (str) {162return str.replace(hyphenateRE, '-$1').toLowerCase();163});164/**165* Simple bind polyfill for environments that do not support it,
166* e.g., PhantomJS 1.x. Technically, we don't need this anymore
167* since native bind is now performant enough in most browsers.
168* But removing it would mean breaking code that was able to run in
169* PhantomJS 1.x, so this must be kept for backward compatibility.
170*/
171/* istanbul ignore next */172function polyfillBind(fn, ctx) {173function boundFn(a) {174var l = arguments.length;175return l176? l > 1177? fn.apply(ctx, arguments)178: fn.call(ctx, a)179: fn.call(ctx);180}181boundFn._length = fn.length;182return boundFn;183}184function nativeBind(fn, ctx) {185return fn.bind(ctx);186}187// @ts-expect-error bind cannot be `undefined`188var bind$1 = Function.prototype.bind ? nativeBind : polyfillBind;189/**190* Convert an Array-like object to a real Array.
191*/
192function toArray(list, start) {193start = start || 0;194var i = list.length - start;195var ret = new Array(i);196while (i--) {197ret[i] = list[i + start];198}199return ret;200}201/**202* Mix properties into target object.
203*/
204function extend(to, _from) {205for (var key in _from) {206to[key] = _from[key];207}208return to;209}210/**211* Merge an Array of Objects into a single Object.
212*/
213function toObject(arr) {214var res = {};215for (var i = 0; i < arr.length; i++) {216if (arr[i]) {217extend(res, arr[i]);218}219}220return res;221}222/* eslint-disable no-unused-vars */223/**224* Perform no operation.
225* Stubbing args to make Flow happy without leaving useless transpiled code
226* with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
227*/
228function noop(a, b, c) { }229/**230* Always return false.
231*/
232var no = function (a, b, c) { return false; };233/* eslint-enable no-unused-vars */234/**235* Return the same value.
236*/
237var identity = function (_) { return _; };238/**239* Generate a string containing static keys from compiler modules.
240*/
241function genStaticKeys$1(modules) {242return modules243.reduce(function (keys, m) {244return keys.concat(m.staticKeys || []);245}, [])246.join(',');247}248/**249* Check if two values are loosely equal - that is,
250* if they are plain objects, do they have the same shape?
251*/
252function looseEqual(a, b) {253if (a === b)254return true;255var isObjectA = isObject(a);256var isObjectB = isObject(b);257if (isObjectA && isObjectB) {258try {259var isArrayA = Array.isArray(a);260var isArrayB = Array.isArray(b);261if (isArrayA && isArrayB) {262return (a.length === b.length &&263a.every(function (e, i) {264return looseEqual(e, b[i]);265}));266}267else if (a instanceof Date && b instanceof Date) {268return a.getTime() === b.getTime();269}270else if (!isArrayA && !isArrayB) {271var keysA = Object.keys(a);272var keysB = Object.keys(b);273return (keysA.length === keysB.length &&274keysA.every(function (key) {275return looseEqual(a[key], b[key]);276}));277}278else {279/* istanbul ignore next */280return false;281}282}283catch (e) {284/* istanbul ignore next */285return false;286}287}288else if (!isObjectA && !isObjectB) {289return String(a) === String(b);290}291else {292return false;293}294}295/**296* Return the first index at which a loosely equal value can be
297* found in the array (if value is a plain object, the array must
298* contain an object of the same shape), or -1 if it is not present.
299*/
300function looseIndexOf(arr, val) {301for (var i = 0; i < arr.length; i++) {302if (looseEqual(arr[i], val))303return i;304}305return -1;306}307/**308* Ensure a function is called only once.
309*/
310function once(fn) {311var called = false;312return function () {313if (!called) {314called = true;315fn.apply(this, arguments);316}317};318}319// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill320function hasChanged(x, y) {321if (x === y) {322return x === 0 && 1 / x !== 1 / y;323}324else {325return x === x || y === y;326}327}328
329var SSR_ATTR = 'data-server-rendered';330var ASSET_TYPES = ['component', 'directive', 'filter'];331var LIFECYCLE_HOOKS = [332'beforeCreate',333'created',334'beforeMount',335'mounted',336'beforeUpdate',337'updated',338'beforeDestroy',339'destroyed',340'activated',341'deactivated',342'errorCaptured',343'serverPrefetch',344'renderTracked',345'renderTriggered'346];347
348var config = {349/**350* Option merge strategies (used in core/util/options)
351*/
352// $flow-disable-line353optionMergeStrategies: Object.create(null),354/**355* Whether to suppress warnings.
356*/
357silent: false,358/**359* Show production mode tip message on boot?
360*/
361productionTip: true,362/**363* Whether to enable devtools
364*/
365devtools: true,366/**367* Whether to record perf
368*/
369performance: false,370/**371* Error handler for watcher errors
372*/
373errorHandler: null,374/**375* Warn handler for watcher warns
376*/
377warnHandler: null,378/**379* Ignore certain custom elements
380*/
381ignoredElements: [],382/**383* Custom user key aliases for v-on
384*/
385// $flow-disable-line386keyCodes: Object.create(null),387/**388* Check if a tag is reserved so that it cannot be registered as a
389* component. This is platform-dependent and may be overwritten.
390*/
391isReservedTag: no,392/**393* Check if an attribute is reserved so that it cannot be used as a component
394* prop. This is platform-dependent and may be overwritten.
395*/
396isReservedAttr: no,397/**398* Check if a tag is an unknown element.
399* Platform-dependent.
400*/
401isUnknownElement: no,402/**403* Get the namespace of an element
404*/
405getTagNamespace: noop,406/**407* Parse the real tag name for the specific platform.
408*/
409parsePlatformTagName: identity,410/**411* Check if an attribute must be bound using property, e.g. value
412* Platform-dependent.
413*/
414mustUseProp: no,415/**416* Perform updates asynchronously. Intended to be used by Vue Test Utils
417* This will significantly reduce performance if set to false.
418*/
419async: true,420/**421* Exposed for legacy reasons
422*/
423_lifecycleHooks: LIFECYCLE_HOOKS424};425
426/**427* unicode letters used for parsing html tags, component names and property paths.
428* using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
429* skipping \u10000-\uEFFFF due to it freezing up PhantomJS
430*/
431var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;432/**433* Check if a string starts with $ or _
434*/
435function isReserved(str) {436var c = (str + '').charCodeAt(0);437return c === 0x24 || c === 0x5f;438}439/**440* Define a property.
441*/
442function def(obj, key, val, enumerable) {443Object.defineProperty(obj, key, {444value: val,445enumerable: !!enumerable,446writable: true,447configurable: true448});449}450/**451* Parse simple path.
452*/
453var bailRE = new RegExp("[^".concat(unicodeRegExp.source, ".$_\\d]"));454function parsePath(path) {455if (bailRE.test(path)) {456return;457}458var segments = path.split('.');459return function (obj) {460for (var i = 0; i < segments.length; i++) {461if (!obj)462return;463obj = obj[segments[i]];464}465return obj;466};467}468
469// can we use __proto__?470var hasProto = '__proto__' in {};471// Browser environment sniffing472var inBrowser = typeof window !== 'undefined';473var UA = inBrowser && window.navigator.userAgent.toLowerCase();474var isIE = UA && /msie|trident/.test(UA);475var isIE9 = UA && UA.indexOf('msie 9.0') > 0;476var isEdge = UA && UA.indexOf('edge/') > 0;477UA && UA.indexOf('android') > 0;478var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);479UA && /chrome\/\d+/.test(UA) && !isEdge;480UA && /phantomjs/.test(UA);481var isFF = UA && UA.match(/firefox\/(\d+)/);482// Firefox has a "watch" function on Object.prototype...483// @ts-expect-error firebox support484var nativeWatch = {}.watch;485var supportsPassive = false;486if (inBrowser) {487try {488var opts = {};489Object.defineProperty(opts, 'passive', {490get: function () {491/* istanbul ignore next */492supportsPassive = true;493}494}); // https://github.com/facebook/flow/issues/285495window.addEventListener('test-passive', null, opts);496}497catch (e) { }498}499// this needs to be lazy-evaled because vue may be required before500// vue-server-renderer can set VUE_ENV501var _isServer;502var isServerRendering = function () {503if (_isServer === undefined) {504/* istanbul ignore if */505if (!inBrowser && typeof global !== 'undefined') {506// detect presence of vue-server-renderer and avoid507// Webpack shimming the process508_isServer =509global['process'] && global['process'].env.VUE_ENV === 'server';510}511else {512_isServer = false;513}514}515return _isServer;516};517// detect devtools518var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;519/* istanbul ignore next */520function isNative(Ctor) {521return typeof Ctor === 'function' && /native code/.test(Ctor.toString());522}523var hasSymbol = typeof Symbol !== 'undefined' &&524isNative(Symbol) &&525typeof Reflect !== 'undefined' &&526isNative(Reflect.ownKeys);527var _Set; // $flow-disable-line528/* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {529// use native Set when available.530_Set = Set;531}532else {533// a non-standard Set polyfill that only works with primitive keys.534_Set = /** @class */ (function () {535function Set() {536this.set = Object.create(null);537}538Set.prototype.has = function (key) {539return this.set[key] === true;540};541Set.prototype.add = function (key) {542this.set[key] = true;543};544Set.prototype.clear = function () {545this.set = Object.create(null);546};547return Set;548}());549}550
551var currentInstance = null;552/**553* This is exposed for compatibility with v3 (e.g. some functions in VueUse
554* relies on it). Do not use this internally, just use `currentInstance`.
555*
556* @internal this function needs manual type declaration because it relies
557* on previously manually authored types from Vue 2
558*/
559function getCurrentInstance() {560return currentInstance && { proxy: currentInstance };561}562/**563* @internal
564*/
565function setCurrentInstance(vm) {566if (vm === void 0) { vm = null; }567if (!vm)568currentInstance && currentInstance._scope.off();569currentInstance = vm;570vm && vm._scope.on();571}572
573/**574* @internal
575*/
576var VNode = /** @class */ (function () {577function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {578this.tag = tag;579this.data = data;580this.children = children;581this.text = text;582this.elm = elm;583this.ns = undefined;584this.context = context;585this.fnContext = undefined;586this.fnOptions = undefined;587this.fnScopeId = undefined;588this.key = data && data.key;589this.componentOptions = componentOptions;590this.componentInstance = undefined;591this.parent = undefined;592this.raw = false;593this.isStatic = false;594this.isRootInsert = true;595this.isComment = false;596this.isCloned = false;597this.isOnce = false;598this.asyncFactory = asyncFactory;599this.asyncMeta = undefined;600this.isAsyncPlaceholder = false;601}602Object.defineProperty(VNode.prototype, "child", {603// DEPRECATED: alias for componentInstance for backwards compat.604/* istanbul ignore next */605get: function () {606return this.componentInstance;607},608enumerable: false,609configurable: true610});611return VNode;612}());613var createEmptyVNode = function (text) {614if (text === void 0) { text = ''; }615var node = new VNode();616node.text = text;617node.isComment = true;618return node;619};620function createTextVNode(val) {621return new VNode(undefined, undefined, undefined, String(val));622}623// optimized shallow clone624// used for static nodes and slot nodes because they may be reused across625// multiple renders, cloning them avoids errors when DOM manipulations rely626// on their elm reference.627function cloneVNode(vnode) {628var cloned = new VNode(vnode.tag, vnode.data,629// #7975630// clone children array to avoid mutating original in case of cloning631// a child.632vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);633cloned.ns = vnode.ns;634cloned.isStatic = vnode.isStatic;635cloned.key = vnode.key;636cloned.isComment = vnode.isComment;637cloned.fnContext = vnode.fnContext;638cloned.fnOptions = vnode.fnOptions;639cloned.fnScopeId = vnode.fnScopeId;640cloned.asyncMeta = vnode.asyncMeta;641cloned.isCloned = true;642return cloned;643}644
645/* not type checking this file because flow doesn't play well with Proxy */646var initProxy;647{648var allowedGlobals_1 = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +649'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +650'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +651'require' // for Webpack/Browserify652);653var warnNonPresent_1 = function (target, key) {654warn$2("Property or method \"".concat(key, "\" is not defined on the instance but ") +655'referenced during render. Make sure that this property is reactive, ' +656'either in the data option, or for class-based components, by ' +657'initializing the property. ' +658'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);659};660var warnReservedPrefix_1 = function (target, key) {661warn$2("Property \"".concat(key, "\" must be accessed with \"$data.").concat(key, "\" because ") +662'properties starting with "$" or "_" are not proxied in the Vue instance to ' +663'prevent conflicts with Vue internals. ' +664'See: https://vuejs.org/v2/api/#data', target);665};666var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);667if (hasProxy_1) {668var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');669config.keyCodes = new Proxy(config.keyCodes, {670set: function (target, key, value) {671if (isBuiltInModifier_1(key)) {672warn$2("Avoid overwriting built-in modifier in config.keyCodes: .".concat(key));673return false;674}675else {676target[key] = value;677return true;678}679}680});681}682var hasHandler_1 = {683has: function (target, key) {684var has = key in target;685var isAllowed = allowedGlobals_1(key) ||686(typeof key === 'string' &&687key.charAt(0) === '_' &&688!(key in target.$data));689if (!has && !isAllowed) {690if (key in target.$data)691warnReservedPrefix_1(target, key);692else693warnNonPresent_1(target, key);694}695return has || !isAllowed;696}697};698var getHandler_1 = {699get: function (target, key) {700if (typeof key === 'string' && !(key in target)) {701if (key in target.$data)702warnReservedPrefix_1(target, key);703else704warnNonPresent_1(target, key);705}706return target[key];707}708};709initProxy = function initProxy(vm) {710if (hasProxy_1) {711// determine which proxy handler to use712var options = vm.$options;713var handlers = options.render && options.render._withStripped ? getHandler_1 : hasHandler_1;714vm._renderProxy = new Proxy(vm, handlers);715}716else {717vm._renderProxy = vm;718}719};720}721
722/******************************************************************************723Copyright (c) Microsoft Corporation.
724
725Permission to use, copy, modify, and/or distribute this software for any
726purpose with or without fee is hereby granted.
727
728THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
729REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
730AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
731INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
732LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
733OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
734PERFORMANCE OF THIS SOFTWARE.
735***************************************************************************** */
736
737var __assign = function() {738__assign = Object.assign || function __assign(t) {739for (var s, i = 1, n = arguments.length; i < n; i++) {740s = arguments[i];741for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];742}743return t;744};745return __assign.apply(this, arguments);746};747
748var uid$2 = 0;749/**750* A dep is an observable that can have multiple
751* directives subscribing to it.
752* @internal
753*/
754var Dep = /** @class */ (function () {755function Dep() {756this.id = uid$2++;757this.subs = [];758}759Dep.prototype.addSub = function (sub) {760this.subs.push(sub);761};762Dep.prototype.removeSub = function (sub) {763remove$2(this.subs, sub);764};765Dep.prototype.depend = function (info) {766if (Dep.target) {767Dep.target.addDep(this);768if (info && Dep.target.onTrack) {769Dep.target.onTrack(__assign({ effect: Dep.target }, info));770}771}772};773Dep.prototype.notify = function (info) {774// stabilize the subscriber list first775var subs = this.subs.slice();776if (!config.async) {777// subs aren't sorted in scheduler if not running async778// we need to sort them now to make sure they fire in correct779// order780subs.sort(function (a, b) { return a.id - b.id; });781}782for (var i = 0, l = subs.length; i < l; i++) {783if (info) {784var sub = subs[i];785sub.onTrigger &&786sub.onTrigger(__assign({ effect: subs[i] }, info));787}788subs[i].update();789}790};791return Dep;792}());793// The current target watcher being evaluated.794// This is globally unique because only one watcher795// can be evaluated at a time.796Dep.target = null;797var targetStack = [];798function pushTarget(target) {799targetStack.push(target);800Dep.target = target;801}802function popTarget() {803targetStack.pop();804Dep.target = targetStack[targetStack.length - 1];805}806
807/*808* not type checking this file because flow doesn't play well with
809* dynamically accessing methods on Array prototype
810*/
811var arrayProto = Array.prototype;812var arrayMethods = Object.create(arrayProto);813var methodsToPatch = [814'push',815'pop',816'shift',817'unshift',818'splice',819'sort',820'reverse'821];822/**823* Intercept mutating methods and emit events
824*/
825methodsToPatch.forEach(function (method) {826// cache original method827var original = arrayProto[method];828def(arrayMethods, method, function mutator() {829var args = [];830for (var _i = 0; _i < arguments.length; _i++) {831args[_i] = arguments[_i];832}833var result = original.apply(this, args);834var ob = this.__ob__;835var inserted;836switch (method) {837case 'push':838case 'unshift':839inserted = args;840break;841case 'splice':842inserted = args.slice(2);843break;844}845if (inserted)846ob.observeArray(inserted);847// notify change848{849ob.dep.notify({850type: "array mutation" /* TriggerOpTypes.ARRAY_MUTATION */,851target: this,852key: method853});854}855return result;856});857});858
859var arrayKeys = Object.getOwnPropertyNames(arrayMethods);860var NO_INIITIAL_VALUE = {};861/**862* In some cases we may want to disable observation inside a component's
863* update computation.
864*/
865var shouldObserve = true;866function toggleObserving(value) {867shouldObserve = value;868}869// ssr mock dep870var mockDep = {871notify: noop,872depend: noop,873addSub: noop,874removeSub: noop875};876/**877* Observer class that is attached to each observed
878* object. Once attached, the observer converts the target
879* object's property keys into getter/setters that
880* collect dependencies and dispatch updates.
881*/
882var Observer = /** @class */ (function () {883function Observer(value, shallow, mock) {884if (shallow === void 0) { shallow = false; }885if (mock === void 0) { mock = false; }886this.value = value;887this.shallow = shallow;888this.mock = mock;889// this.value = value890this.dep = mock ? mockDep : new Dep();891this.vmCount = 0;892def(value, '__ob__', this);893if (isArray(value)) {894if (!mock) {895if (hasProto) {896value.__proto__ = arrayMethods;897/* eslint-enable no-proto */898}899else {900for (var i = 0, l = arrayKeys.length; i < l; i++) {901var key = arrayKeys[i];902def(value, key, arrayMethods[key]);903}904}905}906if (!shallow) {907this.observeArray(value);908}909}910else {911/**912* Walk through all properties and convert them into
913* getter/setters. This method should only be called when
914* value type is Object.
915*/
916var keys = Object.keys(value);917for (var i = 0; i < keys.length; i++) {918var key = keys[i];919defineReactive(value, key, NO_INIITIAL_VALUE, undefined, shallow, mock);920}921}922}923/**924* Observe a list of Array items.
925*/
926Observer.prototype.observeArray = function (value) {927for (var i = 0, l = value.length; i < l; i++) {928observe(value[i], false, this.mock);929}930};931return Observer;932}());933// helpers934/**935* Attempt to create an observer instance for a value,
936* returns the new observer if successfully observed,
937* or the existing observer if the value already has one.
938*/
939function observe(value, shallow, ssrMockReactivity) {940if (!isObject(value) || isRef(value) || value instanceof VNode) {941return;942}943var ob;944if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {945ob = value.__ob__;946}947else if (shouldObserve &&948(ssrMockReactivity || !isServerRendering()) &&949(isArray(value) || isPlainObject(value)) &&950Object.isExtensible(value) &&951!value.__v_skip /* ReactiveFlags.SKIP */) {952ob = new Observer(value, shallow, ssrMockReactivity);953}954return ob;955}956/**957* Define a reactive property on an Object.
958*/
959function defineReactive(obj, key, val, customSetter, shallow, mock) {960var dep = new Dep();961var property = Object.getOwnPropertyDescriptor(obj, key);962if (property && property.configurable === false) {963return;964}965// cater for pre-defined getter/setters966var getter = property && property.get;967var setter = property && property.set;968if ((!getter || setter) &&969(val === NO_INIITIAL_VALUE || arguments.length === 2)) {970val = obj[key];971}972var childOb = !shallow && observe(val, false, mock);973Object.defineProperty(obj, key, {974enumerable: true,975configurable: true,976get: function reactiveGetter() {977var value = getter ? getter.call(obj) : val;978if (Dep.target) {979{980dep.depend({981target: obj,982type: "get" /* TrackOpTypes.GET */,983key: key984});985}986if (childOb) {987childOb.dep.depend();988if (isArray(value)) {989dependArray(value);990}991}992}993return isRef(value) && !shallow ? value.value : value;994},995set: function reactiveSetter(newVal) {996var value = getter ? getter.call(obj) : val;997if (!hasChanged(value, newVal)) {998return;999}1000if (customSetter) {1001customSetter();1002}1003if (setter) {1004setter.call(obj, newVal);1005}1006else if (getter) {1007// #7981: for accessor properties without setter1008return;1009}1010else if (!shallow && isRef(value) && !isRef(newVal)) {1011value.value = newVal;1012return;1013}1014else {1015val = newVal;1016}1017childOb = !shallow && observe(newVal, false, mock);1018{1019dep.notify({1020type: "set" /* TriggerOpTypes.SET */,1021target: obj,1022key: key,1023newValue: newVal,1024oldValue: value1025});1026}1027}1028});1029return dep;1030}1031function set(target, key, val) {1032if ((isUndef(target) || isPrimitive(target))) {1033warn$2("Cannot set reactive property on undefined, null, or primitive value: ".concat(target));1034}1035if (isReadonly(target)) {1036warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly."));1037return;1038}1039var ob = target.__ob__;1040if (isArray(target) && isValidArrayIndex(key)) {1041target.length = Math.max(target.length, key);1042target.splice(key, 1, val);1043// when mocking for SSR, array methods are not hijacked1044if (ob && !ob.shallow && ob.mock) {1045observe(val, false, true);1046}1047return val;1048}1049if (key in target && !(key in Object.prototype)) {1050target[key] = val;1051return val;1052}1053if (target._isVue || (ob && ob.vmCount)) {1054warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' +1055'at runtime - declare it upfront in the data option.');1056return val;1057}1058if (!ob) {1059target[key] = val;1060return val;1061}1062defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);1063{1064ob.dep.notify({1065type: "add" /* TriggerOpTypes.ADD */,1066target: target,1067key: key,1068newValue: val,1069oldValue: undefined1070});1071}1072return val;1073}1074function del(target, key) {1075if ((isUndef(target) || isPrimitive(target))) {1076warn$2("Cannot delete reactive property on undefined, null, or primitive value: ".concat(target));1077}1078if (isArray(target) && isValidArrayIndex(key)) {1079target.splice(key, 1);1080return;1081}1082var ob = target.__ob__;1083if (target._isVue || (ob && ob.vmCount)) {1084warn$2('Avoid deleting properties on a Vue instance or its root $data ' +1085'- just set it to null.');1086return;1087}1088if (isReadonly(target)) {1089warn$2("Delete operation on key \"".concat(key, "\" failed: target is readonly."));1090return;1091}1092if (!hasOwn(target, key)) {1093return;1094}1095delete target[key];1096if (!ob) {1097return;1098}1099{1100ob.dep.notify({1101type: "delete" /* TriggerOpTypes.DELETE */,1102target: target,1103key: key1104});1105}1106}1107/**1108* Collect dependencies on array elements when the array is touched, since
1109* we cannot intercept array element access like property getters.
1110*/
1111function dependArray(value) {1112for (var e = void 0, i = 0, l = value.length; i < l; i++) {1113e = value[i];1114if (e && e.__ob__) {1115e.__ob__.dep.depend();1116}1117if (isArray(e)) {1118dependArray(e);1119}1120}1121}1122
1123function reactive(target) {1124makeReactive(target, false);1125return target;1126}1127/**1128* Return a shallowly-reactive copy of the original object, where only the root
1129* level properties are reactive. It also does not auto-unwrap refs (even at the
1130* root level).
1131*/
1132function shallowReactive(target) {1133makeReactive(target, true);1134def(target, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);1135return target;1136}1137function makeReactive(target, shallow) {1138// if trying to observe a readonly proxy, return the readonly version.1139if (!isReadonly(target)) {1140{1141if (isArray(target)) {1142warn$2("Avoid using Array as root value for ".concat(shallow ? "shallowReactive()" : "reactive()", " as it cannot be tracked in watch() or watchEffect(). Use ").concat(shallow ? "shallowRef()" : "ref()", " instead. This is a Vue-2-only limitation."));1143}1144var existingOb = target && target.__ob__;1145if (existingOb && existingOb.shallow !== shallow) {1146warn$2("Target is already a ".concat(existingOb.shallow ? "" : "non-", "shallow reactive object, and cannot be converted to ").concat(shallow ? "" : "non-", "shallow."));1147}1148}1149var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);1150if (!ob) {1151if (target == null || isPrimitive(target)) {1152warn$2("value cannot be made reactive: ".concat(String(target)));1153}1154if (isCollectionType(target)) {1155warn$2("Vue 2 does not support reactive collection types such as Map or Set.");1156}1157}1158}1159}1160function isReactive(value) {1161if (isReadonly(value)) {1162return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);1163}1164return !!(value && value.__ob__);1165}1166function isShallow(value) {1167return !!(value && value.__v_isShallow);1168}1169function isReadonly(value) {1170return !!(value && value.__v_isReadonly);1171}1172function isProxy(value) {1173return isReactive(value) || isReadonly(value);1174}1175function toRaw(observed) {1176var raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];1177return raw ? toRaw(raw) : observed;1178}1179function markRaw(value) {1180def(value, "__v_skip" /* ReactiveFlags.SKIP */, true);1181return value;1182}1183/**1184* @internal
1185*/
1186function isCollectionType(value) {1187var type = toRawType(value);1188return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');1189}1190
1191/**1192* @internal
1193*/
1194var RefFlag = "__v_isRef";1195function isRef(r) {1196return !!(r && r.__v_isRef === true);1197}1198function ref$1(value) {1199return createRef(value, false);1200}1201function shallowRef(value) {1202return createRef(value, true);1203}1204function createRef(rawValue, shallow) {1205if (isRef(rawValue)) {1206return rawValue;1207}1208var ref = {};1209def(ref, RefFlag, true);1210def(ref, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, shallow);1211def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));1212return ref;1213}1214function triggerRef(ref) {1215if (!ref.dep) {1216warn$2("received object is not a triggerable ref.");1217}1218{1219ref.dep &&1220ref.dep.notify({1221type: "set" /* TriggerOpTypes.SET */,1222target: ref,1223key: 'value'1224});1225}1226}1227function unref(ref) {1228return isRef(ref) ? ref.value : ref;1229}1230function proxyRefs(objectWithRefs) {1231if (isReactive(objectWithRefs)) {1232return objectWithRefs;1233}1234var proxy = {};1235var keys = Object.keys(objectWithRefs);1236for (var i = 0; i < keys.length; i++) {1237proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);1238}1239return proxy;1240}1241function proxyWithRefUnwrap(target, source, key) {1242Object.defineProperty(target, key, {1243enumerable: true,1244configurable: true,1245get: function () {1246var val = source[key];1247if (isRef(val)) {1248return val.value;1249}1250else {1251var ob = val && val.__ob__;1252if (ob)1253ob.dep.depend();1254return val;1255}1256},1257set: function (value) {1258var oldValue = source[key];1259if (isRef(oldValue) && !isRef(value)) {1260oldValue.value = value;1261}1262else {1263source[key] = value;1264}1265}1266});1267}1268function customRef(factory) {1269var dep = new Dep();1270var _a = factory(function () {1271{1272dep.depend({1273target: ref,1274type: "get" /* TrackOpTypes.GET */,1275key: 'value'1276});1277}1278}, function () {1279{1280dep.notify({1281target: ref,1282type: "set" /* TriggerOpTypes.SET */,1283key: 'value'1284});1285}1286}), get = _a.get, set = _a.set;1287var ref = {1288get value() {1289return get();1290},1291set value(newVal) {1292set(newVal);1293}1294};1295def(ref, RefFlag, true);1296return ref;1297}1298function toRefs(object) {1299if (!isReactive(object)) {1300warn$2("toRefs() expects a reactive object but received a plain one.");1301}1302var ret = isArray(object) ? new Array(object.length) : {};1303for (var key in object) {1304ret[key] = toRef(object, key);1305}1306return ret;1307}1308function toRef(object, key, defaultValue) {1309var val = object[key];1310if (isRef(val)) {1311return val;1312}1313var ref = {1314get value() {1315var val = object[key];1316return val === undefined ? defaultValue : val;1317},1318set value(newVal) {1319object[key] = newVal;1320}1321};1322def(ref, RefFlag, true);1323return ref;1324}1325
1326var rawToReadonlyFlag = "__v_rawToReadonly";1327var rawToShallowReadonlyFlag = "__v_rawToShallowReadonly";1328function readonly(target) {1329return createReadonly(target, false);1330}1331function createReadonly(target, shallow) {1332if (!isPlainObject(target)) {1333{1334if (isArray(target)) {1335warn$2("Vue 2 does not support readonly arrays.");1336}1337else if (isCollectionType(target)) {1338warn$2("Vue 2 does not support readonly collection types such as Map or Set.");1339}1340else {1341warn$2("value cannot be made readonly: ".concat(typeof target));1342}1343}1344return target;1345}1346// already a readonly object1347if (isReadonly(target)) {1348return target;1349}1350// already has a readonly proxy1351var existingFlag = shallow ? rawToShallowReadonlyFlag : rawToReadonlyFlag;1352var existingProxy = target[existingFlag];1353if (existingProxy) {1354return existingProxy;1355}1356var proxy = Object.create(Object.getPrototypeOf(target));1357def(target, existingFlag, proxy);1358def(proxy, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, true);1359def(proxy, "__v_raw" /* ReactiveFlags.RAW */, target);1360if (isRef(target)) {1361def(proxy, RefFlag, true);1362}1363if (shallow || isShallow(target)) {1364def(proxy, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);1365}1366var keys = Object.keys(target);1367for (var i = 0; i < keys.length; i++) {1368defineReadonlyProperty(proxy, target, keys[i], shallow);1369}1370return proxy;1371}1372function defineReadonlyProperty(proxy, target, key, shallow) {1373Object.defineProperty(proxy, key, {1374enumerable: true,1375configurable: true,1376get: function () {1377var val = target[key];1378return shallow || !isPlainObject(val) ? val : readonly(val);1379},1380set: function () {1381warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly."));1382}1383});1384}1385/**1386* Returns a reactive-copy of the original object, where only the root level
1387* properties are readonly, and does NOT unwrap refs nor recursively convert
1388* returned properties.
1389* This is used for creating the props proxy object for stateful components.
1390*/
1391function shallowReadonly(target) {1392return createReadonly(target, true);1393}1394
1395function computed(getterOrOptions, debugOptions) {1396var getter;1397var setter;1398var onlyGetter = isFunction(getterOrOptions);1399if (onlyGetter) {1400getter = getterOrOptions;1401setter = function () {1402warn$2('Write operation failed: computed value is readonly');1403}1404;1405}1406else {1407getter = getterOrOptions.get;1408setter = getterOrOptions.set;1409}1410var watcher = isServerRendering()1411? null1412: new Watcher(currentInstance, getter, noop, { lazy: true });1413if (watcher && debugOptions) {1414watcher.onTrack = debugOptions.onTrack;1415watcher.onTrigger = debugOptions.onTrigger;1416}1417var ref = {1418// some libs rely on the presence effect for checking computed refs1419// from normal refs, but the implementation doesn't matter1420effect: watcher,1421get value() {1422if (watcher) {1423if (watcher.dirty) {1424watcher.evaluate();1425}1426if (Dep.target) {1427if (Dep.target.onTrack) {1428Dep.target.onTrack({1429effect: Dep.target,1430target: ref,1431type: "get" /* TrackOpTypes.GET */,1432key: 'value'1433});1434}1435watcher.depend();1436}1437return watcher.value;1438}1439else {1440return getter();1441}1442},1443set value(newVal) {1444setter(newVal);1445}1446};1447def(ref, RefFlag, true);1448def(ref, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, onlyGetter);1449return ref;1450}1451
1452var mark;1453var measure;1454{1455var perf_1 = inBrowser && window.performance;1456/* istanbul ignore if */1457if (perf_1 &&1458// @ts-ignore1459perf_1.mark &&1460// @ts-ignore1461perf_1.measure &&1462// @ts-ignore1463perf_1.clearMarks &&1464// @ts-ignore1465perf_1.clearMeasures) {1466mark = function (tag) { return perf_1.mark(tag); };1467measure = function (name, startTag, endTag) {1468perf_1.measure(name, startTag, endTag);1469perf_1.clearMarks(startTag);1470perf_1.clearMarks(endTag);1471// perf.clearMeasures(name)1472};1473}1474}1475
1476var normalizeEvent = cached(function (name) {1477var passive = name.charAt(0) === '&';1478name = passive ? name.slice(1) : name;1479var once = name.charAt(0) === '~'; // Prefixed last, checked first1480name = once ? name.slice(1) : name;1481var capture = name.charAt(0) === '!';1482name = capture ? name.slice(1) : name;1483return {1484name: name,1485once: once,1486capture: capture,1487passive: passive1488};1489});1490function createFnInvoker(fns, vm) {1491function invoker() {1492var fns = invoker.fns;1493if (isArray(fns)) {1494var cloned = fns.slice();1495for (var i = 0; i < cloned.length; i++) {1496invokeWithErrorHandling(cloned[i], null, arguments, vm, "v-on handler");1497}1498}1499else {1500// return handler return value for single handlers1501return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler");1502}1503}1504invoker.fns = fns;1505return invoker;1506}1507function updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {1508var name, cur, old, event;1509for (name in on) {1510cur = on[name];1511old = oldOn[name];1512event = normalizeEvent(name);1513if (isUndef(cur)) {1514warn$2("Invalid handler for event \"".concat(event.name, "\": got ") + String(cur), vm);1515}1516else if (isUndef(old)) {1517if (isUndef(cur.fns)) {1518cur = on[name] = createFnInvoker(cur, vm);1519}1520if (isTrue(event.once)) {1521cur = on[name] = createOnceHandler(event.name, cur, event.capture);1522}1523add(event.name, cur, event.capture, event.passive, event.params);1524}1525else if (cur !== old) {1526old.fns = cur;1527on[name] = old;1528}1529}1530for (name in oldOn) {1531if (isUndef(on[name])) {1532event = normalizeEvent(name);1533remove(event.name, oldOn[name], event.capture);1534}1535}1536}1537
1538function mergeVNodeHook(def, hookKey, hook) {1539if (def instanceof VNode) {1540def = def.data.hook || (def.data.hook = {});1541}1542var invoker;1543var oldHook = def[hookKey];1544function wrappedHook() {1545hook.apply(this, arguments);1546// important: remove merged hook to ensure it's called only once1547// and prevent memory leak1548remove$2(invoker.fns, wrappedHook);1549}1550if (isUndef(oldHook)) {1551// no existing hook1552invoker = createFnInvoker([wrappedHook]);1553}1554else {1555/* istanbul ignore if */1556if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {1557// already a merged invoker1558invoker = oldHook;1559invoker.fns.push(wrappedHook);1560}1561else {1562// existing plain hook1563invoker = createFnInvoker([oldHook, wrappedHook]);1564}1565}1566invoker.merged = true;1567def[hookKey] = invoker;1568}1569
1570function extractPropsFromVNodeData(data, Ctor, tag) {1571// we are only extracting raw values here.1572// validation and default values are handled in the child1573// component itself.1574var propOptions = Ctor.options.props;1575if (isUndef(propOptions)) {1576return;1577}1578var res = {};1579var attrs = data.attrs, props = data.props;1580if (isDef(attrs) || isDef(props)) {1581for (var key in propOptions) {1582var altKey = hyphenate(key);1583{1584var keyInLowerCase = key.toLowerCase();1585if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {1586tip("Prop \"".concat(keyInLowerCase, "\" is passed to component ") +1587"".concat(formatComponentName(1588// @ts-expect-error tag is string1589tag || Ctor), ", but the declared prop name is") +1590" \"".concat(key, "\". ") +1591"Note that HTML attributes are case-insensitive and camelCased " +1592"props need to use their kebab-case equivalents when using in-DOM " +1593"templates. You should probably use \"".concat(altKey, "\" instead of \"").concat(key, "\"."));1594}1595}1596checkProp(res, props, key, altKey, true) ||1597checkProp(res, attrs, key, altKey, false);1598}1599}1600return res;1601}1602function checkProp(res, hash, key, altKey, preserve) {1603if (isDef(hash)) {1604if (hasOwn(hash, key)) {1605res[key] = hash[key];1606if (!preserve) {1607delete hash[key];1608}1609return true;1610}1611else if (hasOwn(hash, altKey)) {1612res[key] = hash[altKey];1613if (!preserve) {1614delete hash[altKey];1615}1616return true;1617}1618}1619return false;1620}1621
1622// The template compiler attempts to minimize the need for normalization by1623// statically analyzing the template at compile time.1624//1625// For plain HTML markup, normalization can be completely skipped because the1626// generated render function is guaranteed to return Array<VNode>. There are1627// two cases where extra normalization is needed:1628// 1. When the children contains components - because a functional component1629// may return an Array instead of a single root. In this case, just a simple1630// normalization is needed - if any child is an Array, we flatten the whole1631// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep1632// because functional components already normalize their own children.1633function simpleNormalizeChildren(children) {1634for (var i = 0; i < children.length; i++) {1635if (isArray(children[i])) {1636return Array.prototype.concat.apply([], children);1637}1638}1639return children;1640}1641// 2. When the children contains constructs that always generated nested Arrays,1642// e.g. <template>, <slot>, v-for, or when the children is provided by user1643// with hand-written render functions / JSX. In such cases a full normalization1644// is needed to cater to all possible types of children values.1645function normalizeChildren(children) {1646return isPrimitive(children)1647? [createTextVNode(children)]1648: isArray(children)1649? normalizeArrayChildren(children)1650: undefined;1651}1652function isTextNode(node) {1653return isDef(node) && isDef(node.text) && isFalse(node.isComment);1654}1655function normalizeArrayChildren(children, nestedIndex) {1656var res = [];1657var i, c, lastIndex, last;1658for (i = 0; i < children.length; i++) {1659c = children[i];1660if (isUndef(c) || typeof c === 'boolean')1661continue;1662lastIndex = res.length - 1;1663last = res[lastIndex];1664// nested1665if (isArray(c)) {1666if (c.length > 0) {1667c = normalizeArrayChildren(c, "".concat(nestedIndex || '', "_").concat(i));1668// merge adjacent text nodes1669if (isTextNode(c[0]) && isTextNode(last)) {1670res[lastIndex] = createTextVNode(last.text + c[0].text);1671c.shift();1672}1673res.push.apply(res, c);1674}1675}1676else if (isPrimitive(c)) {1677if (isTextNode(last)) {1678// merge adjacent text nodes1679// this is necessary for SSR hydration because text nodes are1680// essentially merged when rendered to HTML strings1681res[lastIndex] = createTextVNode(last.text + c);1682}1683else if (c !== '') {1684// convert primitive to vnode1685res.push(createTextVNode(c));1686}1687}1688else {1689if (isTextNode(c) && isTextNode(last)) {1690// merge adjacent text nodes1691res[lastIndex] = createTextVNode(last.text + c.text);1692}1693else {1694// default key for nested array children (likely generated by v-for)1695if (isTrue(children._isVList) &&1696isDef(c.tag) &&1697isUndef(c.key) &&1698isDef(nestedIndex)) {1699c.key = "__vlist".concat(nestedIndex, "_").concat(i, "__");1700}1701res.push(c);1702}1703}1704}1705return res;1706}1707
1708var SIMPLE_NORMALIZE = 1;1709var ALWAYS_NORMALIZE = 2;1710// wrapper function for providing a more flexible interface1711// without getting yelled at by flow1712function createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {1713if (isArray(data) || isPrimitive(data)) {1714normalizationType = children;1715children = data;1716data = undefined;1717}1718if (isTrue(alwaysNormalize)) {1719normalizationType = ALWAYS_NORMALIZE;1720}1721return _createElement(context, tag, data, children, normalizationType);1722}1723function _createElement(context, tag, data, children, normalizationType) {1724if (isDef(data) && isDef(data.__ob__)) {1725warn$2("Avoid using observed data object as vnode data: ".concat(JSON.stringify(data), "\n") + 'Always create fresh vnode data objects in each render!', context);1726return createEmptyVNode();1727}1728// object syntax in v-bind1729if (isDef(data) && isDef(data.is)) {1730tag = data.is;1731}1732if (!tag) {1733// in case of component :is set to falsy value1734return createEmptyVNode();1735}1736// warn against non-primitive key1737if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {1738warn$2('Avoid using non-primitive value as key, ' +1739'use string/number value instead.', context);1740}1741// support single function children as default scoped slot1742if (isArray(children) && isFunction(children[0])) {1743data = data || {};1744data.scopedSlots = { default: children[0] };1745children.length = 0;1746}1747if (normalizationType === ALWAYS_NORMALIZE) {1748children = normalizeChildren(children);1749}1750else if (normalizationType === SIMPLE_NORMALIZE) {1751children = simpleNormalizeChildren(children);1752}1753var vnode, ns;1754if (typeof tag === 'string') {1755var Ctor = void 0;1756ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);1757if (config.isReservedTag(tag)) {1758// platform built-in elements1759if (isDef(data) &&1760isDef(data.nativeOn) &&1761data.tag !== 'component') {1762warn$2("The .native modifier for v-on is only valid on components but it was used on <".concat(tag, ">."), context);1763}1764vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);1765}1766else if ((!data || !data.pre) &&1767isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {1768// component1769vnode = createComponent(Ctor, data, context, children, tag);1770}1771else {1772// unknown or unlisted namespaced elements1773// check at runtime because it may get assigned a namespace when its1774// parent normalizes children1775vnode = new VNode(tag, data, children, undefined, undefined, context);1776}1777}1778else {1779// direct component options / constructor1780vnode = createComponent(tag, data, context, children);1781}1782if (isArray(vnode)) {1783return vnode;1784}1785else if (isDef(vnode)) {1786if (isDef(ns))1787applyNS(vnode, ns);1788if (isDef(data))1789registerDeepBindings(data);1790return vnode;1791}1792else {1793return createEmptyVNode();1794}1795}1796function applyNS(vnode, ns, force) {1797vnode.ns = ns;1798if (vnode.tag === 'foreignObject') {1799// use default namespace inside foreignObject1800ns = undefined;1801force = true;1802}1803if (isDef(vnode.children)) {1804for (var i = 0, l = vnode.children.length; i < l; i++) {1805var child = vnode.children[i];1806if (isDef(child.tag) &&1807(isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {1808applyNS(child, ns, force);1809}1810}1811}1812}1813// ref #53181814// necessary to ensure parent re-render when deep bindings like :style and1815// :class are used on slot nodes1816function registerDeepBindings(data) {1817if (isObject(data.style)) {1818traverse(data.style);1819}1820if (isObject(data.class)) {1821traverse(data.class);1822}1823}1824
1825/**1826* Runtime helper for rendering v-for lists.
1827*/
1828function renderList(val, render) {1829var ret = null, i, l, keys, key;1830if (isArray(val) || typeof val === 'string') {1831ret = new Array(val.length);1832for (i = 0, l = val.length; i < l; i++) {1833ret[i] = render(val[i], i);1834}1835}1836else if (typeof val === 'number') {1837ret = new Array(val);1838for (i = 0; i < val; i++) {1839ret[i] = render(i + 1, i);1840}1841}1842else if (isObject(val)) {1843if (hasSymbol && val[Symbol.iterator]) {1844ret = [];1845var iterator = val[Symbol.iterator]();1846var result = iterator.next();1847while (!result.done) {1848ret.push(render(result.value, ret.length));1849result = iterator.next();1850}1851}1852else {1853keys = Object.keys(val);1854ret = new Array(keys.length);1855for (i = 0, l = keys.length; i < l; i++) {1856key = keys[i];1857ret[i] = render(val[key], key, i);1858}1859}1860}1861if (!isDef(ret)) {1862ret = [];1863}1864ret._isVList = true;1865return ret;1866}1867
1868/**1869* Runtime helper for rendering <slot>
1870*/
1871function renderSlot(name, fallbackRender, props, bindObject) {1872var scopedSlotFn = this.$scopedSlots[name];1873var nodes;1874if (scopedSlotFn) {1875// scoped slot1876props = props || {};1877if (bindObject) {1878if (!isObject(bindObject)) {1879warn$2('slot v-bind without argument expects an Object', this);1880}1881props = extend(extend({}, bindObject), props);1882}1883nodes =1884scopedSlotFn(props) ||1885(isFunction(fallbackRender) ? fallbackRender() : fallbackRender);1886}1887else {1888nodes =1889this.$slots[name] ||1890(isFunction(fallbackRender) ? fallbackRender() : fallbackRender);1891}1892var target = props && props.slot;1893if (target) {1894return this.$createElement('template', { slot: target }, nodes);1895}1896else {1897return nodes;1898}1899}1900
1901/**1902* Runtime helper for resolving filters
1903*/
1904function resolveFilter(id) {1905return resolveAsset(this.$options, 'filters', id, true) || identity;1906}1907
1908function isKeyNotMatch(expect, actual) {1909if (isArray(expect)) {1910return expect.indexOf(actual) === -1;1911}1912else {1913return expect !== actual;1914}1915}1916/**1917* Runtime helper for checking keyCodes from config.
1918* exposed as Vue.prototype._k
1919* passing in eventKeyName as last argument separately for backwards compat
1920*/
1921function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {1922var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;1923if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {1924return isKeyNotMatch(builtInKeyName, eventKeyName);1925}1926else if (mappedKeyCode) {1927return isKeyNotMatch(mappedKeyCode, eventKeyCode);1928}1929else if (eventKeyName) {1930return hyphenate(eventKeyName) !== key;1931}1932return eventKeyCode === undefined;1933}1934
1935/**1936* Runtime helper for merging v-bind="object" into a VNode's data.
1937*/
1938function bindObjectProps(data, tag, value, asProp, isSync) {1939if (value) {1940if (!isObject(value)) {1941warn$2('v-bind without argument expects an Object or Array value', this);1942}1943else {1944if (isArray(value)) {1945value = toObject(value);1946}1947var hash = void 0;1948var _loop_1 = function (key) {1949if (key === 'class' || key === 'style' || isReservedAttribute(key)) {1950hash = data;1951}1952else {1953var type = data.attrs && data.attrs.type;1954hash =1955asProp || config.mustUseProp(tag, type, key)1956? data.domProps || (data.domProps = {})1957: data.attrs || (data.attrs = {});1958}1959var camelizedKey = camelize(key);1960var hyphenatedKey = hyphenate(key);1961if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {1962hash[key] = value[key];1963if (isSync) {1964var on = data.on || (data.on = {});1965on["update:".concat(key)] = function ($event) {1966value[key] = $event;1967};1968}1969}1970};1971for (var key in value) {1972_loop_1(key);1973}1974}1975}1976return data;1977}1978
1979/**1980* Runtime helper for rendering static trees.
1981*/
1982function renderStatic(index, isInFor) {1983var cached = this._staticTrees || (this._staticTrees = []);1984var tree = cached[index];1985// if has already-rendered static tree and not inside v-for,1986// we can reuse the same tree.1987if (tree && !isInFor) {1988return tree;1989}1990// otherwise, render a fresh tree.1991tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates1992);1993markStatic$1(tree, "__static__".concat(index), false);1994return tree;1995}1996/**1997* Runtime helper for v-once.
1998* Effectively it means marking the node as static with a unique key.
1999*/
2000function markOnce(tree, index, key) {2001markStatic$1(tree, "__once__".concat(index).concat(key ? "_".concat(key) : ""), true);2002return tree;2003}2004function markStatic$1(tree, key, isOnce) {2005if (isArray(tree)) {2006for (var i = 0; i < tree.length; i++) {2007if (tree[i] && typeof tree[i] !== 'string') {2008markStaticNode(tree[i], "".concat(key, "_").concat(i), isOnce);2009}2010}2011}2012else {2013markStaticNode(tree, key, isOnce);2014}2015}2016function markStaticNode(node, key, isOnce) {2017node.isStatic = true;2018node.key = key;2019node.isOnce = isOnce;2020}2021
2022function bindObjectListeners(data, value) {2023if (value) {2024if (!isPlainObject(value)) {2025warn$2('v-on without argument expects an Object value', this);2026}2027else {2028var on = (data.on = data.on ? extend({}, data.on) : {});2029for (var key in value) {2030var existing = on[key];2031var ours = value[key];2032on[key] = existing ? [].concat(existing, ours) : ours;2033}2034}2035}2036return data;2037}2038
2039function resolveScopedSlots(fns, res,2040// the following are added in 2.62041hasDynamicKeys, contentHashKey) {2042res = res || { $stable: !hasDynamicKeys };2043for (var i = 0; i < fns.length; i++) {2044var slot = fns[i];2045if (isArray(slot)) {2046resolveScopedSlots(slot, res, hasDynamicKeys);2047}2048else if (slot) {2049// marker for reverse proxying v-slot without scope on this.$slots2050// @ts-expect-error2051if (slot.proxy) {2052// @ts-expect-error2053slot.fn.proxy = true;2054}2055res[slot.key] = slot.fn;2056}2057}2058if (contentHashKey) {2059res.$key = contentHashKey;2060}2061return res;2062}2063
2064// helper to process dynamic keys for dynamic arguments in v-bind and v-on.2065function bindDynamicKeys(baseObj, values) {2066for (var i = 0; i < values.length; i += 2) {2067var key = values[i];2068if (typeof key === 'string' && key) {2069baseObj[values[i]] = values[i + 1];2070}2071else if (key !== '' && key !== null) {2072// null is a special value for explicitly removing a binding2073warn$2("Invalid value for dynamic directive argument (expected string or null): ".concat(key), this);2074}2075}2076return baseObj;2077}2078// helper to dynamically append modifier runtime markers to event names.2079// ensure only append when value is already string, otherwise it will be cast2080// to string and cause the type check to miss.2081function prependModifier(value, symbol) {2082return typeof value === 'string' ? symbol + value : value;2083}2084
2085function installRenderHelpers(target) {2086target._o = markOnce;2087target._n = toNumber;2088target._s = toString;2089target._l = renderList;2090target._t = renderSlot;2091target._q = looseEqual;2092target._i = looseIndexOf;2093target._m = renderStatic;2094target._f = resolveFilter;2095target._k = checkKeyCodes;2096target._b = bindObjectProps;2097target._v = createTextVNode;2098target._e = createEmptyVNode;2099target._u = resolveScopedSlots;2100target._g = bindObjectListeners;2101target._d = bindDynamicKeys;2102target._p = prependModifier;2103}2104
2105/**2106* Runtime helper for resolving raw children VNodes into a slot object.
2107*/
2108function resolveSlots(children, context) {2109if (!children || !children.length) {2110return {};2111}2112var slots = {};2113for (var i = 0, l = children.length; i < l; i++) {2114var child = children[i];2115var data = child.data;2116// remove slot attribute if the node is resolved as a Vue slot node2117if (data && data.attrs && data.attrs.slot) {2118delete data.attrs.slot;2119}2120// named slots should only be respected if the vnode was rendered in the2121// same context.2122if ((child.context === context || child.fnContext === context) &&2123data &&2124data.slot != null) {2125var name_1 = data.slot;2126var slot = slots[name_1] || (slots[name_1] = []);2127if (child.tag === 'template') {2128slot.push.apply(slot, child.children || []);2129}2130else {2131slot.push(child);2132}2133}2134else {2135(slots.default || (slots.default = [])).push(child);2136}2137}2138// ignore slots that contains only whitespace2139for (var name_2 in slots) {2140if (slots[name_2].every(isWhitespace)) {2141delete slots[name_2];2142}2143}2144return slots;2145}2146function isWhitespace(node) {2147return (node.isComment && !node.asyncFactory) || node.text === ' ';2148}2149
2150function isAsyncPlaceholder(node) {2151// @ts-expect-error not really boolean type2152return node.isComment && node.asyncFactory;2153}2154
2155function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {2156var res;2157var hasNormalSlots = Object.keys(normalSlots).length > 0;2158var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;2159var key = scopedSlots && scopedSlots.$key;2160if (!scopedSlots) {2161res = {};2162}2163else if (scopedSlots._normalized) {2164// fast path 1: child component re-render only, parent did not change2165return scopedSlots._normalized;2166}2167else if (isStable &&2168prevScopedSlots &&2169prevScopedSlots !== emptyObject &&2170key === prevScopedSlots.$key &&2171!hasNormalSlots &&2172!prevScopedSlots.$hasNormal) {2173// fast path 2: stable scoped slots w/ no normal slots to proxy,2174// only need to normalize once2175return prevScopedSlots;2176}2177else {2178res = {};2179for (var key_1 in scopedSlots) {2180if (scopedSlots[key_1] && key_1[0] !== '$') {2181res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);2182}2183}2184}2185// expose normal slots on scopedSlots2186for (var key_2 in normalSlots) {2187if (!(key_2 in res)) {2188res[key_2] = proxyNormalSlot(normalSlots, key_2);2189}2190}2191// avoriaz seems to mock a non-extensible $scopedSlots object2192// and when that is passed down this would cause an error2193if (scopedSlots && Object.isExtensible(scopedSlots)) {2194scopedSlots._normalized = res;2195}2196def(res, '$stable', isStable);2197def(res, '$key', key);2198def(res, '$hasNormal', hasNormalSlots);2199return res;2200}2201function normalizeScopedSlot(vm, normalSlots, key, fn) {2202var normalized = function () {2203var cur = currentInstance;2204setCurrentInstance(vm);2205var res = arguments.length ? fn.apply(null, arguments) : fn({});2206res =2207res && typeof res === 'object' && !isArray(res)2208? [res] // single vnode2209: normalizeChildren(res);2210var vnode = res && res[0];2211setCurrentInstance(cur);2212return res &&2213(!vnode ||2214(res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #103912215? undefined2216: res;2217};2218// this is a slot using the new v-slot syntax without scope. although it is2219// compiled as a scoped slot, render fn users would expect it to be present2220// on this.$slots because the usage is semantically a normal slot.2221if (fn.proxy) {2222Object.defineProperty(normalSlots, key, {2223get: normalized,2224enumerable: true,2225configurable: true2226});2227}2228return normalized;2229}2230function proxyNormalSlot(slots, key) {2231return function () { return slots[key]; };2232}2233
2234function initSetup(vm) {2235var options = vm.$options;2236var setup = options.setup;2237if (setup) {2238var ctx = (vm._setupContext = createSetupContext(vm));2239setCurrentInstance(vm);2240pushTarget();2241var setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, "setup");2242popTarget();2243setCurrentInstance();2244if (isFunction(setupResult)) {2245// render function2246// @ts-ignore2247options.render = setupResult;2248}2249else if (isObject(setupResult)) {2250// bindings2251if (setupResult instanceof VNode) {2252warn$2("setup() should not return VNodes directly - " +2253"return a render function instead.");2254}2255vm._setupState = setupResult;2256// __sfc indicates compiled bindings from <script setup>2257if (!setupResult.__sfc) {2258for (var key in setupResult) {2259if (!isReserved(key)) {2260proxyWithRefUnwrap(vm, setupResult, key);2261}2262else {2263warn$2("Avoid using variables that start with _ or $ in setup().");2264}2265}2266}2267else {2268// exposed for compiled render fn2269var proxy = (vm._setupProxy = {});2270for (var key in setupResult) {2271if (key !== '__sfc') {2272proxyWithRefUnwrap(proxy, setupResult, key);2273}2274}2275}2276}2277else if (setupResult !== undefined) {2278warn$2("setup() should return an object. Received: ".concat(setupResult === null ? 'null' : typeof setupResult));2279}2280}2281}2282function createSetupContext(vm) {2283var exposeCalled = false;2284return {2285get attrs() {2286if (!vm._attrsProxy) {2287var proxy = (vm._attrsProxy = {});2288def(proxy, '_v_attr_proxy', true);2289syncSetupProxy(proxy, vm.$attrs, emptyObject, vm, '$attrs');2290}2291return vm._attrsProxy;2292},2293get listeners() {2294if (!vm._listenersProxy) {2295var proxy = (vm._listenersProxy = {});2296syncSetupProxy(proxy, vm.$listeners, emptyObject, vm, '$listeners');2297}2298return vm._listenersProxy;2299},2300get slots() {2301return initSlotsProxy(vm);2302},2303emit: bind$1(vm.$emit, vm),2304expose: function (exposed) {2305{2306if (exposeCalled) {2307warn$2("expose() should be called only once per setup().", vm);2308}2309exposeCalled = true;2310}2311if (exposed) {2312Object.keys(exposed).forEach(function (key) {2313return proxyWithRefUnwrap(vm, exposed, key);2314});2315}2316}2317};2318}2319function syncSetupProxy(to, from, prev, instance, type) {2320var changed = false;2321for (var key in from) {2322if (!(key in to)) {2323changed = true;2324defineProxyAttr(to, key, instance, type);2325}2326else if (from[key] !== prev[key]) {2327changed = true;2328}2329}2330for (var key in to) {2331if (!(key in from)) {2332changed = true;2333delete to[key];2334}2335}2336return changed;2337}2338function defineProxyAttr(proxy, key, instance, type) {2339Object.defineProperty(proxy, key, {2340enumerable: true,2341configurable: true,2342get: function () {2343return instance[type][key];2344}2345});2346}2347function initSlotsProxy(vm) {2348if (!vm._slotsProxy) {2349syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots);2350}2351return vm._slotsProxy;2352}2353function syncSetupSlots(to, from) {2354for (var key in from) {2355to[key] = from[key];2356}2357for (var key in to) {2358if (!(key in from)) {2359delete to[key];2360}2361}2362}2363/**2364* @internal use manual type def because public setup context type relies on
2365* legacy VNode types
2366*/
2367function useSlots() {2368return getContext().slots;2369}2370/**2371* @internal use manual type def because public setup context type relies on
2372* legacy VNode types
2373*/
2374function useAttrs() {2375return getContext().attrs;2376}2377/**2378* Vue 2 only
2379* @internal use manual type def because public setup context type relies on
2380* legacy VNode types
2381*/
2382function useListeners() {2383return getContext().listeners;2384}2385function getContext() {2386if (!currentInstance) {2387warn$2("useContext() called without active instance.");2388}2389var vm = currentInstance;2390return vm._setupContext || (vm._setupContext = createSetupContext(vm));2391}2392/**2393* Runtime helper for merging default declarations. Imported by compiled code
2394* only.
2395* @internal
2396*/
2397function mergeDefaults(raw, defaults) {2398var props = isArray(raw)2399? raw.reduce(function (normalized, p) { return ((normalized[p] = {}), normalized); }, {})2400: raw;2401for (var key in defaults) {2402var opt = props[key];2403if (opt) {2404if (isArray(opt) || isFunction(opt)) {2405props[key] = { type: opt, default: defaults[key] };2406}2407else {2408opt.default = defaults[key];2409}2410}2411else if (opt === null) {2412props[key] = { default: defaults[key] };2413}2414else {2415warn$2("props default key \"".concat(key, "\" has no corresponding declaration."));2416}2417}2418return props;2419}2420
2421function initRender(vm) {2422vm._vnode = null; // the root of the child tree2423vm._staticTrees = null; // v-once cached trees2424var options = vm.$options;2425var parentVnode = (vm.$vnode = options._parentVnode); // the placeholder node in parent tree2426var renderContext = parentVnode && parentVnode.context;2427vm.$slots = resolveSlots(options._renderChildren, renderContext);2428vm.$scopedSlots = parentVnode2429? normalizeScopedSlots(vm.$parent, parentVnode.data.scopedSlots, vm.$slots)2430: emptyObject;2431// bind the createElement fn to this instance2432// so that we get proper render context inside it.2433// args order: tag, data, children, normalizationType, alwaysNormalize2434// internal version is used by render functions compiled from templates2435// @ts-expect-error2436vm._c = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, false); };2437// normalization is always applied for the public version, used in2438// user-written render functions.2439// @ts-expect-error2440vm.$createElement = function (a, b, c, d) { return createElement$1(vm, a, b, c, d, true); };2441// $attrs & $listeners are exposed for easier HOC creation.2442// they need to be reactive so that HOCs using them are always updated2443var parentData = parentVnode && parentVnode.data;2444/* istanbul ignore else */2445{2446defineReactive(vm, '$attrs', (parentData && parentData.attrs) || emptyObject, function () {2447!isUpdatingChildComponent && warn$2("$attrs is readonly.", vm);2448}, true);2449defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {2450!isUpdatingChildComponent && warn$2("$listeners is readonly.", vm);2451}, true);2452}2453}2454var currentRenderingInstance = null;2455function renderMixin(Vue) {2456// install runtime convenience helpers2457installRenderHelpers(Vue.prototype);2458Vue.prototype.$nextTick = function (fn) {2459return nextTick(fn, this);2460};2461Vue.prototype._render = function () {2462var vm = this;2463var _a = vm.$options, render = _a.render, _parentVnode = _a._parentVnode;2464if (_parentVnode && vm._isMounted) {2465vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);2466if (vm._slotsProxy) {2467syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);2468}2469}2470// set parent vnode. this allows render functions to have access2471// to the data on the placeholder node.2472vm.$vnode = _parentVnode;2473// render self2474var vnode;2475try {2476// There's no need to maintain a stack because all render fns are called2477// separately from one another. Nested component's render fns are called2478// when parent component is patched.2479setCurrentInstance(vm);2480currentRenderingInstance = vm;2481vnode = render.call(vm._renderProxy, vm.$createElement);2482}2483catch (e) {2484handleError(e, vm, "render");2485// return error render result,2486// or previous vnode to prevent render error causing blank component2487/* istanbul ignore else */2488if (vm.$options.renderError) {2489try {2490vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);2491}2492catch (e) {2493handleError(e, vm, "renderError");2494vnode = vm._vnode;2495}2496}2497else {2498vnode = vm._vnode;2499}2500}2501finally {2502currentRenderingInstance = null;2503setCurrentInstance();2504}2505// if the returned array contains only a single node, allow it2506if (isArray(vnode) && vnode.length === 1) {2507vnode = vnode[0];2508}2509// return empty vnode in case the render function errored out2510if (!(vnode instanceof VNode)) {2511if (isArray(vnode)) {2512warn$2('Multiple root nodes returned from render function. Render function ' +2513'should return a single root node.', vm);2514}2515vnode = createEmptyVNode();2516}2517// set parent2518vnode.parent = _parentVnode;2519return vnode;2520};2521}2522
2523function ensureCtor(comp, base) {2524if (comp.__esModule || (hasSymbol && comp[Symbol.toStringTag] === 'Module')) {2525comp = comp.default;2526}2527return isObject(comp) ? base.extend(comp) : comp;2528}2529function createAsyncPlaceholder(factory, data, context, children, tag) {2530var node = createEmptyVNode();2531node.asyncFactory = factory;2532node.asyncMeta = { data: data, context: context, children: children, tag: tag };2533return node;2534}2535function resolveAsyncComponent(factory, baseCtor) {2536if (isTrue(factory.error) && isDef(factory.errorComp)) {2537return factory.errorComp;2538}2539if (isDef(factory.resolved)) {2540return factory.resolved;2541}2542var owner = currentRenderingInstance;2543if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {2544// already pending2545factory.owners.push(owner);2546}2547if (isTrue(factory.loading) && isDef(factory.loadingComp)) {2548return factory.loadingComp;2549}2550if (owner && !isDef(factory.owners)) {2551var owners_1 = (factory.owners = [owner]);2552var sync_1 = true;2553var timerLoading_1 = null;2554var timerTimeout_1 = null;2555owner.$on('hook:destroyed', function () { return remove$2(owners_1, owner); });2556var forceRender_1 = function (renderCompleted) {2557for (var i = 0, l = owners_1.length; i < l; i++) {2558owners_1[i].$forceUpdate();2559}2560if (renderCompleted) {2561owners_1.length = 0;2562if (timerLoading_1 !== null) {2563clearTimeout(timerLoading_1);2564timerLoading_1 = null;2565}2566if (timerTimeout_1 !== null) {2567clearTimeout(timerTimeout_1);2568timerTimeout_1 = null;2569}2570}2571};2572var resolve = once(function (res) {2573// cache resolved2574factory.resolved = ensureCtor(res, baseCtor);2575// invoke callbacks only if this is not a synchronous resolve2576// (async resolves are shimmed as synchronous during SSR)2577if (!sync_1) {2578forceRender_1(true);2579}2580else {2581owners_1.length = 0;2582}2583});2584var reject_1 = once(function (reason) {2585warn$2("Failed to resolve async component: ".concat(String(factory)) +2586(reason ? "\nReason: ".concat(reason) : ''));2587if (isDef(factory.errorComp)) {2588factory.error = true;2589forceRender_1(true);2590}2591});2592var res_1 = factory(resolve, reject_1);2593if (isObject(res_1)) {2594if (isPromise(res_1)) {2595// () => Promise2596if (isUndef(factory.resolved)) {2597res_1.then(resolve, reject_1);2598}2599}2600else if (isPromise(res_1.component)) {2601res_1.component.then(resolve, reject_1);2602if (isDef(res_1.error)) {2603factory.errorComp = ensureCtor(res_1.error, baseCtor);2604}2605if (isDef(res_1.loading)) {2606factory.loadingComp = ensureCtor(res_1.loading, baseCtor);2607if (res_1.delay === 0) {2608factory.loading = true;2609}2610else {2611// @ts-expect-error NodeJS timeout type2612timerLoading_1 = setTimeout(function () {2613timerLoading_1 = null;2614if (isUndef(factory.resolved) && isUndef(factory.error)) {2615factory.loading = true;2616forceRender_1(false);2617}2618}, res_1.delay || 200);2619}2620}2621if (isDef(res_1.timeout)) {2622// @ts-expect-error NodeJS timeout type2623timerTimeout_1 = setTimeout(function () {2624timerTimeout_1 = null;2625if (isUndef(factory.resolved)) {2626reject_1("timeout (".concat(res_1.timeout, "ms)") );2627}2628}, res_1.timeout);2629}2630}2631}2632sync_1 = false;2633// return in case resolved synchronously2634return factory.loading ? factory.loadingComp : factory.resolved;2635}2636}2637
2638function getFirstComponentChild(children) {2639if (isArray(children)) {2640for (var i = 0; i < children.length; i++) {2641var c = children[i];2642if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {2643return c;2644}2645}2646}2647}2648
2649function initEvents(vm) {2650vm._events = Object.create(null);2651vm._hasHookEvent = false;2652// init parent attached events2653var listeners = vm.$options._parentListeners;2654if (listeners) {2655updateComponentListeners(vm, listeners);2656}2657}2658var target$1;2659function add$1(event, fn) {2660target$1.$on(event, fn);2661}2662function remove$1(event, fn) {2663target$1.$off(event, fn);2664}2665function createOnceHandler$1(event, fn) {2666var _target = target$1;2667return function onceHandler() {2668var res = fn.apply(null, arguments);2669if (res !== null) {2670_target.$off(event, onceHandler);2671}2672};2673}2674function updateComponentListeners(vm, listeners, oldListeners) {2675target$1 = vm;2676updateListeners(listeners, oldListeners || {}, add$1, remove$1, createOnceHandler$1, vm);2677target$1 = undefined;2678}2679function eventsMixin(Vue) {2680var hookRE = /^hook:/;2681Vue.prototype.$on = function (event, fn) {2682var vm = this;2683if (isArray(event)) {2684for (var i = 0, l = event.length; i < l; i++) {2685vm.$on(event[i], fn);2686}2687}2688else {2689(vm._events[event] || (vm._events[event] = [])).push(fn);2690// optimize hook:event cost by using a boolean flag marked at registration2691// instead of a hash lookup2692if (hookRE.test(event)) {2693vm._hasHookEvent = true;2694}2695}2696return vm;2697};2698Vue.prototype.$once = function (event, fn) {2699var vm = this;2700function on() {2701vm.$off(event, on);2702fn.apply(vm, arguments);2703}2704on.fn = fn;2705vm.$on(event, on);2706return vm;2707};2708Vue.prototype.$off = function (event, fn) {2709var vm = this;2710// all2711if (!arguments.length) {2712vm._events = Object.create(null);2713return vm;2714}2715// array of events2716if (isArray(event)) {2717for (var i_1 = 0, l = event.length; i_1 < l; i_1++) {2718vm.$off(event[i_1], fn);2719}2720return vm;2721}2722// specific event2723var cbs = vm._events[event];2724if (!cbs) {2725return vm;2726}2727if (!fn) {2728vm._events[event] = null;2729return vm;2730}2731// specific handler2732var cb;2733var i = cbs.length;2734while (i--) {2735cb = cbs[i];2736if (cb === fn || cb.fn === fn) {2737cbs.splice(i, 1);2738break;2739}2740}2741return vm;2742};2743Vue.prototype.$emit = function (event) {2744var vm = this;2745{2746var lowerCaseEvent = event.toLowerCase();2747if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {2748tip("Event \"".concat(lowerCaseEvent, "\" is emitted in component ") +2749"".concat(formatComponentName(vm), " but the handler is registered for \"").concat(event, "\". ") +2750"Note that HTML attributes are case-insensitive and you cannot use " +2751"v-on to listen to camelCase events when using in-DOM templates. " +2752"You should probably use \"".concat(hyphenate(event), "\" instead of \"").concat(event, "\"."));2753}2754}2755var cbs = vm._events[event];2756if (cbs) {2757cbs = cbs.length > 1 ? toArray(cbs) : cbs;2758var args = toArray(arguments, 1);2759var info = "event handler for \"".concat(event, "\"");2760for (var i = 0, l = cbs.length; i < l; i++) {2761invokeWithErrorHandling(cbs[i], vm, args, vm, info);2762}2763}2764return vm;2765};2766}2767
2768var activeInstance = null;2769var isUpdatingChildComponent = false;2770function setActiveInstance(vm) {2771var prevActiveInstance = activeInstance;2772activeInstance = vm;2773return function () {2774activeInstance = prevActiveInstance;2775};2776}2777function initLifecycle(vm) {2778var options = vm.$options;2779// locate first non-abstract parent2780var parent = options.parent;2781if (parent && !options.abstract) {2782while (parent.$options.abstract && parent.$parent) {2783parent = parent.$parent;2784}2785parent.$children.push(vm);2786}2787vm.$parent = parent;2788vm.$root = parent ? parent.$root : vm;2789vm.$children = [];2790vm.$refs = {};2791vm._provided = parent ? parent._provided : Object.create(null);2792vm._watcher = null;2793vm._inactive = null;2794vm._directInactive = false;2795vm._isMounted = false;2796vm._isDestroyed = false;2797vm._isBeingDestroyed = false;2798}2799function lifecycleMixin(Vue) {2800Vue.prototype._update = function (vnode, hydrating) {2801var vm = this;2802var prevEl = vm.$el;2803var prevVnode = vm._vnode;2804var restoreActiveInstance = setActiveInstance(vm);2805vm._vnode = vnode;2806// Vue.prototype.__patch__ is injected in entry points2807// based on the rendering backend used.2808if (!prevVnode) {2809// initial render2810vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);2811}2812else {2813// updates2814vm.$el = vm.__patch__(prevVnode, vnode);2815}2816restoreActiveInstance();2817// update __vue__ reference2818if (prevEl) {2819prevEl.__vue__ = null;2820}2821if (vm.$el) {2822vm.$el.__vue__ = vm;2823}2824// if parent is an HOC, update its $el as well2825if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {2826vm.$parent.$el = vm.$el;2827}2828// updated hook is called by the scheduler to ensure that children are2829// updated in a parent's updated hook.2830};2831Vue.prototype.$forceUpdate = function () {2832var vm = this;2833if (vm._watcher) {2834vm._watcher.update();2835}2836};2837Vue.prototype.$destroy = function () {2838var vm = this;2839if (vm._isBeingDestroyed) {2840return;2841}2842callHook$1(vm, 'beforeDestroy');2843vm._isBeingDestroyed = true;2844// remove self from parent2845var parent = vm.$parent;2846if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {2847remove$2(parent.$children, vm);2848}2849// teardown scope. this includes both the render watcher and other2850// watchers created2851vm._scope.stop();2852// remove reference from data ob2853// frozen object may not have observer.2854if (vm._data.__ob__) {2855vm._data.__ob__.vmCount--;2856}2857// call the last hook...2858vm._isDestroyed = true;2859// invoke destroy hooks on current rendered tree2860vm.__patch__(vm._vnode, null);2861// fire destroyed hook2862callHook$1(vm, 'destroyed');2863// turn off all instance listeners.2864vm.$off();2865// remove __vue__ reference2866if (vm.$el) {2867vm.$el.__vue__ = null;2868}2869// release circular reference (#6759)2870if (vm.$vnode) {2871vm.$vnode.parent = null;2872}2873};2874}2875function mountComponent(vm, el, hydrating) {2876vm.$el = el;2877if (!vm.$options.render) {2878// @ts-expect-error invalid type2879vm.$options.render = createEmptyVNode;2880{2881/* istanbul ignore if */2882if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||2883vm.$options.el ||2884el) {2885warn$2('You are using the runtime-only build of Vue where the template ' +2886'compiler is not available. Either pre-compile the templates into ' +2887'render functions, or use the compiler-included build.', vm);2888}2889else {2890warn$2('Failed to mount component: template or render function not defined.', vm);2891}2892}2893}2894callHook$1(vm, 'beforeMount');2895var updateComponent;2896/* istanbul ignore if */2897if (config.performance && mark) {2898updateComponent = function () {2899var name = vm._name;2900var id = vm._uid;2901var startTag = "vue-perf-start:".concat(id);2902var endTag = "vue-perf-end:".concat(id);2903mark(startTag);2904var vnode = vm._render();2905mark(endTag);2906measure("vue ".concat(name, " render"), startTag, endTag);2907mark(startTag);2908vm._update(vnode, hydrating);2909mark(endTag);2910measure("vue ".concat(name, " patch"), startTag, endTag);2911};2912}2913else {2914updateComponent = function () {2915vm._update(vm._render(), hydrating);2916};2917}2918var watcherOptions = {2919before: function () {2920if (vm._isMounted && !vm._isDestroyed) {2921callHook$1(vm, 'beforeUpdate');2922}2923}2924};2925{2926watcherOptions.onTrack = function (e) { return callHook$1(vm, 'renderTracked', [e]); };2927watcherOptions.onTrigger = function (e) { return callHook$1(vm, 'renderTriggered', [e]); };2928}2929// we set this to vm._watcher inside the watcher's constructor2930// since the watcher's initial patch may call $forceUpdate (e.g. inside child2931// component's mounted hook), which relies on vm._watcher being already defined2932new Watcher(vm, updateComponent, noop, watcherOptions, true /* isRenderWatcher */);2933hydrating = false;2934// flush buffer for flush: "pre" watchers queued in setup()2935var preWatchers = vm._preWatchers;2936if (preWatchers) {2937for (var i = 0; i < preWatchers.length; i++) {2938preWatchers[i].run();2939}2940}2941// manually mounted instance, call mounted on self2942// mounted is called for render-created child components in its inserted hook2943if (vm.$vnode == null) {2944vm._isMounted = true;2945callHook$1(vm, 'mounted');2946}2947return vm;2948}2949function updateChildComponent(vm, propsData, listeners, parentVnode, renderChildren) {2950{2951isUpdatingChildComponent = true;2952}2953// determine whether component has slot children2954// we need to do this before overwriting $options._renderChildren.2955// check if there are dynamic scopedSlots (hand-written or compiled but with2956// dynamic slot names). Static scoped slots compiled from template has the2957// "$stable" marker.2958var newScopedSlots = parentVnode.data.scopedSlots;2959var oldScopedSlots = vm.$scopedSlots;2960var hasDynamicScopedSlot = !!((newScopedSlots && !newScopedSlots.$stable) ||2961(oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||2962(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key) ||2963(!newScopedSlots && vm.$scopedSlots.$key));2964// Any static slot children from the parent may have changed during parent's2965// update. Dynamic scoped slots may also have changed. In such cases, a forced2966// update is necessary to ensure correctness.2967var needsForceUpdate = !!(renderChildren || // has new static slots2968vm.$options._renderChildren || // has old static slots2969hasDynamicScopedSlot);2970var prevVNode = vm.$vnode;2971vm.$options._parentVnode = parentVnode;2972vm.$vnode = parentVnode; // update vm's placeholder node without re-render2973if (vm._vnode) {2974// update child tree's parent2975vm._vnode.parent = parentVnode;2976}2977vm.$options._renderChildren = renderChildren;2978// update $attrs and $listeners hash2979// these are also reactive so they may trigger child update if the child2980// used them during render2981var attrs = parentVnode.data.attrs || emptyObject;2982if (vm._attrsProxy) {2983// force update if attrs are accessed and has changed since it may be2984// passed to a child component.2985if (syncSetupProxy(vm._attrsProxy, attrs, (prevVNode.data && prevVNode.data.attrs) || emptyObject, vm, '$attrs')) {2986needsForceUpdate = true;2987}2988}2989vm.$attrs = attrs;2990// update listeners2991listeners = listeners || emptyObject;2992var prevListeners = vm.$options._parentListeners;2993if (vm._listenersProxy) {2994syncSetupProxy(vm._listenersProxy, listeners, prevListeners || emptyObject, vm, '$listeners');2995}2996vm.$listeners = vm.$options._parentListeners = listeners;2997updateComponentListeners(vm, listeners, prevListeners);2998// update props2999if (propsData && vm.$options.props) {3000toggleObserving(false);3001var props = vm._props;3002var propKeys = vm.$options._propKeys || [];3003for (var i = 0; i < propKeys.length; i++) {3004var key = propKeys[i];3005var propOptions = vm.$options.props; // wtf flow?3006props[key] = validateProp(key, propOptions, propsData, vm);3007}3008toggleObserving(true);3009// keep a copy of raw propsData3010vm.$options.propsData = propsData;3011}3012// resolve slots + force update if has children3013if (needsForceUpdate) {3014vm.$slots = resolveSlots(renderChildren, parentVnode.context);3015vm.$forceUpdate();3016}3017{3018isUpdatingChildComponent = false;3019}3020}3021function isInInactiveTree(vm) {3022while (vm && (vm = vm.$parent)) {3023if (vm._inactive)3024return true;3025}3026return false;3027}3028function activateChildComponent(vm, direct) {3029if (direct) {3030vm._directInactive = false;3031if (isInInactiveTree(vm)) {3032return;3033}3034}3035else if (vm._directInactive) {3036return;3037}3038if (vm._inactive || vm._inactive === null) {3039vm._inactive = false;3040for (var i = 0; i < vm.$children.length; i++) {3041activateChildComponent(vm.$children[i]);3042}3043callHook$1(vm, 'activated');3044}3045}3046function deactivateChildComponent(vm, direct) {3047if (direct) {3048vm._directInactive = true;3049if (isInInactiveTree(vm)) {3050return;3051}3052}3053if (!vm._inactive) {3054vm._inactive = true;3055for (var i = 0; i < vm.$children.length; i++) {3056deactivateChildComponent(vm.$children[i]);3057}3058callHook$1(vm, 'deactivated');3059}3060}3061function callHook$1(vm, hook, args, setContext) {3062if (setContext === void 0) { setContext = true; }3063// #7573 disable dep collection when invoking lifecycle hooks3064pushTarget();3065var prev = currentInstance;3066setContext && setCurrentInstance(vm);3067var handlers = vm.$options[hook];3068var info = "".concat(hook, " hook");3069if (handlers) {3070for (var i = 0, j = handlers.length; i < j; i++) {3071invokeWithErrorHandling(handlers[i], vm, args || null, vm, info);3072}3073}3074if (vm._hasHookEvent) {3075vm.$emit('hook:' + hook);3076}3077setContext && setCurrentInstance(prev);3078popTarget();3079}3080
3081var MAX_UPDATE_COUNT = 100;3082var queue = [];3083var activatedChildren = [];3084var has = {};3085var circular = {};3086var waiting = false;3087var flushing = false;3088var index$1 = 0;3089/**3090* Reset the scheduler's state.
3091*/
3092function resetSchedulerState() {3093index$1 = queue.length = activatedChildren.length = 0;3094has = {};3095{3096circular = {};3097}3098waiting = flushing = false;3099}3100// Async edge case #6566 requires saving the timestamp when event listeners are3101// attached. However, calling performance.now() has a perf overhead especially3102// if the page has thousands of event listeners. Instead, we take a timestamp3103// every time the scheduler flushes and use that for all event listeners3104// attached during that flush.3105var currentFlushTimestamp = 0;3106// Async edge case fix requires storing an event listener's attach timestamp.3107var getNow = Date.now;3108// Determine what event timestamp the browser is using. Annoyingly, the3109// timestamp can either be hi-res (relative to page load) or low-res3110// (relative to UNIX epoch), so in order to compare time we have to use the3111// same timestamp type when saving the flush timestamp.3112// All IE versions use low-res event timestamps, and have problematic clock3113// implementations (#9632)3114if (inBrowser && !isIE) {3115var performance_1 = window.performance;3116if (performance_1 &&3117typeof performance_1.now === 'function' &&3118getNow() > document.createEvent('Event').timeStamp) {3119// if the event timestamp, although evaluated AFTER the Date.now(), is3120// smaller than it, it means the event is using a hi-res timestamp,3121// and we need to use the hi-res version for event listener timestamps as3122// well.3123getNow = function () { return performance_1.now(); };3124}3125}3126var sortCompareFn = function (a, b) {3127if (a.post) {3128if (!b.post)3129return 1;3130}3131else if (b.post) {3132return -1;3133}3134return a.id - b.id;3135};3136/**3137* Flush both queues and run the watchers.
3138*/
3139function flushSchedulerQueue() {3140currentFlushTimestamp = getNow();3141flushing = true;3142var watcher, id;3143// Sort queue before flush.3144// This ensures that:3145// 1. Components are updated from parent to child. (because parent is always3146// created before the child)3147// 2. A component's user watchers are run before its render watcher (because3148// user watchers are created before the render watcher)3149// 3. If a component is destroyed during a parent component's watcher run,3150// its watchers can be skipped.3151queue.sort(sortCompareFn);3152// do not cache length because more watchers might be pushed3153// as we run existing watchers3154for (index$1 = 0; index$1 < queue.length; index$1++) {3155watcher = queue[index$1];3156if (watcher.before) {3157watcher.before();3158}3159id = watcher.id;3160has[id] = null;3161watcher.run();3162// in dev build, check and stop circular updates.3163if (has[id] != null) {3164circular[id] = (circular[id] || 0) + 1;3165if (circular[id] > MAX_UPDATE_COUNT) {3166warn$2('You may have an infinite update loop ' +3167(watcher.user3168? "in watcher with expression \"".concat(watcher.expression, "\"")3169: "in a component render function."), watcher.vm);3170break;3171}3172}3173}3174// keep copies of post queues before resetting state3175var activatedQueue = activatedChildren.slice();3176var updatedQueue = queue.slice();3177resetSchedulerState();3178// call component updated and activated hooks3179callActivatedHooks(activatedQueue);3180callUpdatedHooks(updatedQueue);3181// devtool hook3182/* istanbul ignore if */3183if (devtools && config.devtools) {3184devtools.emit('flush');3185}3186}3187function callUpdatedHooks(queue) {3188var i = queue.length;3189while (i--) {3190var watcher = queue[i];3191var vm = watcher.vm;3192if (vm && vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {3193callHook$1(vm, 'updated');3194}3195}3196}3197/**3198* Queue a kept-alive component that was activated during patch.
3199* The queue will be processed after the entire tree has been patched.
3200*/
3201function queueActivatedComponent(vm) {3202// setting _inactive to false here so that a render function can3203// rely on checking whether it's in an inactive tree (e.g. router-view)3204vm._inactive = false;3205activatedChildren.push(vm);3206}3207function callActivatedHooks(queue) {3208for (var i = 0; i < queue.length; i++) {3209queue[i]._inactive = true;3210activateChildComponent(queue[i], true /* true */);3211}3212}3213/**3214* Push a watcher into the watcher queue.
3215* Jobs with duplicate IDs will be skipped unless it's
3216* pushed when the queue is being flushed.
3217*/
3218function queueWatcher(watcher) {3219var id = watcher.id;3220if (has[id] != null) {3221return;3222}3223if (watcher === Dep.target && watcher.noRecurse) {3224return;3225}3226has[id] = true;3227if (!flushing) {3228queue.push(watcher);3229}3230else {3231// if already flushing, splice the watcher based on its id3232// if already past its id, it will be run next immediately.3233var i = queue.length - 1;3234while (i > index$1 && queue[i].id > watcher.id) {3235i--;3236}3237queue.splice(i + 1, 0, watcher);3238}3239// queue the flush3240if (!waiting) {3241waiting = true;3242if (!config.async) {3243flushSchedulerQueue();3244return;3245}3246nextTick(flushSchedulerQueue);3247}3248}3249
3250var WATCHER = "watcher";3251var WATCHER_CB = "".concat(WATCHER, " callback");3252var WATCHER_GETTER = "".concat(WATCHER, " getter");3253var WATCHER_CLEANUP = "".concat(WATCHER, " cleanup");3254// Simple effect.3255function watchEffect(effect, options) {3256return doWatch(effect, null, options);3257}3258function watchPostEffect(effect, options) {3259return doWatch(effect, null, (__assign(__assign({}, options), { flush: 'post' }) ));3260}3261function watchSyncEffect(effect, options) {3262return doWatch(effect, null, (__assign(__assign({}, options), { flush: 'sync' }) ));3263}3264// initial value for watchers to trigger on undefined initial values3265var INITIAL_WATCHER_VALUE = {};3266// implementation3267function watch(source, cb, options) {3268if (typeof cb !== 'function') {3269warn$2("`watch(fn, options?)` signature has been moved to a separate API. " +3270"Use `watchEffect(fn, options?)` instead. `watch` now only " +3271"supports `watch(source, cb, options?) signature.");3272}3273return doWatch(source, cb, options);3274}3275function doWatch(source, cb, _a) {3276var _b = _a === void 0 ? emptyObject : _a, immediate = _b.immediate, deep = _b.deep, _c = _b.flush, flush = _c === void 0 ? 'pre' : _c, onTrack = _b.onTrack, onTrigger = _b.onTrigger;3277if (!cb) {3278if (immediate !== undefined) {3279warn$2("watch() \"immediate\" option is only respected when using the " +3280"watch(source, callback, options?) signature.");3281}3282if (deep !== undefined) {3283warn$2("watch() \"deep\" option is only respected when using the " +3284"watch(source, callback, options?) signature.");3285}3286}3287var warnInvalidSource = function (s) {3288warn$2("Invalid watch source: ".concat(s, ". A watch source can only be a getter/effect ") +3289"function, a ref, a reactive object, or an array of these types.");3290};3291var instance = currentInstance;3292var call = function (fn, type, args) {3293if (args === void 0) { args = null; }3294return invokeWithErrorHandling(fn, null, args, instance, type);3295};3296var getter;3297var forceTrigger = false;3298var isMultiSource = false;3299if (isRef(source)) {3300getter = function () { return source.value; };3301forceTrigger = isShallow(source);3302}3303else if (isReactive(source)) {3304getter = function () {3305source.__ob__.dep.depend();3306return source;3307};3308deep = true;3309}3310else if (isArray(source)) {3311isMultiSource = true;3312forceTrigger = source.some(function (s) { return isReactive(s) || isShallow(s); });3313getter = function () {3314return source.map(function (s) {3315if (isRef(s)) {3316return s.value;3317}3318else if (isReactive(s)) {3319return traverse(s);3320}3321else if (isFunction(s)) {3322return call(s, WATCHER_GETTER);3323}3324else {3325warnInvalidSource(s);3326}3327});3328};3329}3330else if (isFunction(source)) {3331if (cb) {3332// getter with cb3333getter = function () { return call(source, WATCHER_GETTER); };3334}3335else {3336// no cb -> simple effect3337getter = function () {3338if (instance && instance._isDestroyed) {3339return;3340}3341if (cleanup) {3342cleanup();3343}3344return call(source, WATCHER, [onCleanup]);3345};3346}3347}3348else {3349getter = noop;3350warnInvalidSource(source);3351}3352if (cb && deep) {3353var baseGetter_1 = getter;3354getter = function () { return traverse(baseGetter_1()); };3355}3356var cleanup;3357var onCleanup = function (fn) {3358cleanup = watcher.onStop = function () {3359call(fn, WATCHER_CLEANUP);3360};3361};3362// in SSR there is no need to setup an actual effect, and it should be noop3363// unless it's eager3364if (isServerRendering()) {3365// we will also not call the invalidate callback (+ runner is not set up)3366onCleanup = noop;3367if (!cb) {3368getter();3369}3370else if (immediate) {3371call(cb, WATCHER_CB, [3372getter(),3373isMultiSource ? [] : undefined,3374onCleanup
3375]);3376}3377return noop;3378}3379var watcher = new Watcher(currentInstance, getter, noop, {3380lazy: true3381});3382watcher.noRecurse = !cb;3383var oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;3384// overwrite default run3385watcher.run = function () {3386if (!watcher.active &&3387!(flush === 'pre' && instance && instance._isBeingDestroyed)) {3388return;3389}3390if (cb) {3391// watch(source, cb)3392var newValue = watcher.get();3393if (deep ||3394forceTrigger ||3395(isMultiSource3396? newValue.some(function (v, i) {3397return hasChanged(v, oldValue[i]);3398})3399: hasChanged(newValue, oldValue))) {3400// cleanup before running cb again3401if (cleanup) {3402cleanup();3403}3404call(cb, WATCHER_CB, [3405newValue,3406// pass undefined as the old value when it's changed for the first time3407oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,3408onCleanup
3409]);3410oldValue = newValue;3411}3412}3413else {3414// watchEffect3415watcher.get();3416}3417};3418if (flush === 'sync') {3419watcher.update = watcher.run;3420}3421else if (flush === 'post') {3422watcher.post = true;3423watcher.update = function () { return queueWatcher(watcher); };3424}3425else {3426// pre3427watcher.update = function () {3428if (instance && instance === currentInstance && !instance._isMounted) {3429// pre-watcher triggered before3430var buffer = instance._preWatchers || (instance._preWatchers = []);3431if (buffer.indexOf(watcher) < 0)3432buffer.push(watcher);3433}3434else {3435queueWatcher(watcher);3436}3437};3438}3439{3440watcher.onTrack = onTrack;3441watcher.onTrigger = onTrigger;3442}3443// initial run3444if (cb) {3445if (immediate) {3446watcher.run();3447}3448else {3449oldValue = watcher.get();3450}3451}3452else if (flush === 'post' && instance) {3453instance.$once('hook:mounted', function () { return watcher.get(); });3454}3455else {3456watcher.get();3457}3458return function () {3459watcher.teardown();3460};3461}3462
3463var activeEffectScope;3464var EffectScope = /** @class */ (function () {3465function EffectScope(detached) {3466if (detached === void 0) { detached = false; }3467/**3468* @internal
3469*/
3470this.active = true;3471/**3472* @internal
3473*/
3474this.effects = [];3475/**3476* @internal
3477*/
3478this.cleanups = [];3479if (!detached && activeEffectScope) {3480this.parent = activeEffectScope;3481this.index =3482(activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;3483}3484}3485EffectScope.prototype.run = function (fn) {3486if (this.active) {3487var currentEffectScope = activeEffectScope;3488try {3489activeEffectScope = this;3490return fn();3491}3492finally {3493activeEffectScope = currentEffectScope;3494}3495}3496else {3497warn$2("cannot run an inactive effect scope.");3498}3499};3500/**3501* This should only be called on non-detached scopes
3502* @internal
3503*/
3504EffectScope.prototype.on = function () {3505activeEffectScope = this;3506};3507/**3508* This should only be called on non-detached scopes
3509* @internal
3510*/
3511EffectScope.prototype.off = function () {3512activeEffectScope = this.parent;3513};3514EffectScope.prototype.stop = function (fromParent) {3515if (this.active) {3516var i = void 0, l = void 0;3517for (i = 0, l = this.effects.length; i < l; i++) {3518this.effects[i].teardown();3519}3520for (i = 0, l = this.cleanups.length; i < l; i++) {3521this.cleanups[i]();3522}3523if (this.scopes) {3524for (i = 0, l = this.scopes.length; i < l; i++) {3525this.scopes[i].stop(true);3526}3527}3528// nested scope, dereference from parent to avoid memory leaks3529if (this.parent && !fromParent) {3530// optimized O(1) removal3531var last = this.parent.scopes.pop();3532if (last && last !== this) {3533this.parent.scopes[this.index] = last;3534last.index = this.index;3535}3536}3537this.active = false;3538}3539};3540return EffectScope;3541}());3542function effectScope(detached) {3543return new EffectScope(detached);3544}3545/**3546* @internal
3547*/
3548function recordEffectScope(effect, scope) {3549if (scope === void 0) { scope = activeEffectScope; }3550if (scope && scope.active) {3551scope.effects.push(effect);3552}3553}3554function getCurrentScope() {3555return activeEffectScope;3556}3557function onScopeDispose(fn) {3558if (activeEffectScope) {3559activeEffectScope.cleanups.push(fn);3560}3561else {3562warn$2("onScopeDispose() is called when there is no active effect scope" +3563" to be associated with.");3564}3565}3566
3567function provide(key, value) {3568if (!currentInstance) {3569{3570warn$2("provide() can only be used inside setup().");3571}3572}3573else {3574// TS doesn't allow symbol as index type3575resolveProvided(currentInstance)[key] = value;3576}3577}3578function resolveProvided(vm) {3579// by default an instance inherits its parent's provides object3580// but when it needs to provide values of its own, it creates its3581// own provides object using parent provides object as prototype.3582// this way in `inject` we can simply look up injections from direct3583// parent and let the prototype chain do the work.3584var existing = vm._provided;3585var parentProvides = vm.$parent && vm.$parent._provided;3586if (parentProvides === existing) {3587return (vm._provided = Object.create(parentProvides));3588}3589else {3590return existing;3591}3592}3593function inject(key, defaultValue, treatDefaultAsFactory) {3594if (treatDefaultAsFactory === void 0) { treatDefaultAsFactory = false; }3595// fallback to `currentRenderingInstance` so that this can be called in3596// a functional component3597var instance = currentInstance;3598if (instance) {3599// #24003600// to support `app.use` plugins,3601// fallback to appContext's `provides` if the instance is at root3602var provides = instance.$parent && instance.$parent._provided;3603if (provides && key in provides) {3604// TS doesn't allow symbol as index type3605return provides[key];3606}3607else if (arguments.length > 1) {3608return treatDefaultAsFactory && isFunction(defaultValue)3609? defaultValue.call(instance)3610: defaultValue;3611}3612else {3613warn$2("injection \"".concat(String(key), "\" not found."));3614}3615}3616else {3617warn$2("inject() can only be used inside setup() or functional components.");3618}3619}3620
3621/**3622* @internal this function needs manual public type declaration because it relies
3623* on previously manually authored types from Vue 2
3624*/
3625function h(type, props, children) {3626if (!currentInstance) {3627warn$2("globally imported h() can only be invoked when there is an active " +3628"component instance, e.g. synchronously in a component's render or setup function.");3629}3630return createElement$1(currentInstance, type, props, children, 2, true);3631}3632
3633function handleError(err, vm, info) {3634// Deactivate deps tracking while processing error handler to avoid possible infinite rendering.3635// See: https://github.com/vuejs/vuex/issues/15053636pushTarget();3637try {3638if (vm) {3639var cur = vm;3640while ((cur = cur.$parent)) {3641var hooks = cur.$options.errorCaptured;3642if (hooks) {3643for (var i = 0; i < hooks.length; i++) {3644try {3645var capture = hooks[i].call(cur, err, vm, info) === false;3646if (capture)3647return;3648}3649catch (e) {3650globalHandleError(e, cur, 'errorCaptured hook');3651}3652}3653}3654}3655}3656globalHandleError(err, vm, info);3657}3658finally {3659popTarget();3660}3661}3662function invokeWithErrorHandling(handler, context, args, vm, info) {3663var res;3664try {3665res = args ? handler.apply(context, args) : handler.call(context);3666if (res && !res._isVue && isPromise(res) && !res._handled) {3667res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });3668res._handled = true;3669}3670}3671catch (e) {3672handleError(e, vm, info);3673}3674return res;3675}3676function globalHandleError(err, vm, info) {3677if (config.errorHandler) {3678try {3679return config.errorHandler.call(null, err, vm, info);3680}3681catch (e) {3682// if the user intentionally throws the original error in the handler,3683// do not log it twice3684if (e !== err) {3685logError(e, null, 'config.errorHandler');3686}3687}3688}3689logError(err, vm, info);3690}3691function logError(err, vm, info) {3692{3693warn$2("Error in ".concat(info, ": \"").concat(err.toString(), "\""), vm);3694}3695/* istanbul ignore else */3696if (inBrowser && typeof console !== 'undefined') {3697console.error(err);3698}3699else {3700throw err;3701}3702}3703
3704/* globals MutationObserver */3705var isUsingMicroTask = false;3706var callbacks = [];3707var pending = false;3708function flushCallbacks() {3709pending = false;3710var copies = callbacks.slice(0);3711callbacks.length = 0;3712for (var i = 0; i < copies.length; i++) {3713copies[i]();3714}3715}3716// Here we have async deferring wrappers using microtasks.3717// In 2.5 we used (macro) tasks (in combination with microtasks).3718// However, it has subtle problems when state is changed right before repaint3719// (e.g. #6813, out-in transitions).3720// Also, using (macro) tasks in event handler would cause some weird behaviors3721// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).3722// So we now use microtasks everywhere, again.3723// A major drawback of this tradeoff is that there are some scenarios3724// where microtasks have too high a priority and fire in between supposedly3725// sequential events (e.g. #4521, #6690, which have workarounds)3726// or even between bubbling of the same event (#6566).3727var timerFunc;3728// The nextTick behavior leverages the microtask queue, which can be accessed3729// via either native Promise.then or MutationObserver.3730// MutationObserver has wider support, however it is seriously bugged in3731// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It3732// completely stops working after triggering a few times... so, if native3733// Promise is available, we will use it:3734/* istanbul ignore next, $flow-disable-line */3735if (typeof Promise !== 'undefined' && isNative(Promise)) {3736var p_1 = Promise.resolve();3737timerFunc = function () {3738p_1.then(flushCallbacks);3739// In problematic UIWebViews, Promise.then doesn't completely break, but3740// it can get stuck in a weird state where callbacks are pushed into the3741// microtask queue but the queue isn't being flushed, until the browser3742// needs to do some other work, e.g. handle a timer. Therefore we can3743// "force" the microtask queue to be flushed by adding an empty timer.3744if (isIOS)3745setTimeout(noop);3746};3747isUsingMicroTask = true;3748}3749else if (!isIE &&3750typeof MutationObserver !== 'undefined' &&3751(isNative(MutationObserver) ||3752// PhantomJS and iOS 7.x3753MutationObserver.toString() === '[object MutationObserverConstructor]')) {3754// Use MutationObserver where native Promise is not available,3755// e.g. PhantomJS, iOS7, Android 4.43756// (#6466 MutationObserver is unreliable in IE11)3757var counter_1 = 1;3758var observer = new MutationObserver(flushCallbacks);3759var textNode_1 = document.createTextNode(String(counter_1));3760observer.observe(textNode_1, {3761characterData: true3762});3763timerFunc = function () {3764counter_1 = (counter_1 + 1) % 2;3765textNode_1.data = String(counter_1);3766};3767isUsingMicroTask = true;3768}3769else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {3770// Fallback to setImmediate.3771// Technically it leverages the (macro) task queue,3772// but it is still a better choice than setTimeout.3773timerFunc = function () {3774setImmediate(flushCallbacks);3775};3776}3777else {3778// Fallback to setTimeout.3779timerFunc = function () {3780setTimeout(flushCallbacks, 0);3781};3782}3783/**3784* @internal
3785*/
3786function nextTick(cb, ctx) {3787var _resolve;3788callbacks.push(function () {3789if (cb) {3790try {3791cb.call(ctx);3792}3793catch (e) {3794handleError(e, ctx, 'nextTick');3795}3796}3797else if (_resolve) {3798_resolve(ctx);3799}3800});3801if (!pending) {3802pending = true;3803timerFunc();3804}3805// $flow-disable-line3806if (!cb && typeof Promise !== 'undefined') {3807return new Promise(function (resolve) {3808_resolve = resolve;3809});3810}3811}3812
3813function useCssModule(name) {3814/* istanbul ignore else */3815{3816{3817warn$2("useCssModule() is not supported in the global build.");3818}3819return emptyObject;3820}3821}3822
3823/**3824* Runtime helper for SFC's CSS variable injection feature.
3825* @private
3826*/
3827function useCssVars(getter) {3828if (!inBrowser && !false)3829return;3830var instance = currentInstance;3831if (!instance) {3832warn$2("useCssVars is called without current active component instance.");3833return;3834}3835watchPostEffect(function () {3836var el = instance.$el;3837var vars = getter(instance, instance._setupProxy);3838if (el && el.nodeType === 1) {3839var style = el.style;3840for (var key in vars) {3841style.setProperty("--".concat(key), vars[key]);3842}3843}3844});3845}3846
3847/**3848* v3-compatible async component API.
3849* @internal the type is manually declared in <root>/types/v3-define-async-component.d.ts
3850* because it relies on existing manual types
3851*/
3852function defineAsyncComponent(source) {3853if (isFunction(source)) {3854source = { loader: source };3855}3856var loader = source.loader, loadingComponent = source.loadingComponent, errorComponent = source.errorComponent, _a = source.delay, delay = _a === void 0 ? 200 : _a, timeout = source.timeout, // undefined = never times out3857_b = source.suspensible, // undefined = never times out3858suspensible = _b === void 0 ? false : _b, // in Vue 3 default is true3859userOnError = source.onError;3860if (suspensible) {3861warn$2("The suspensiblbe option for async components is not supported in Vue2. It is ignored.");3862}3863var pendingRequest = null;3864var retries = 0;3865var retry = function () {3866retries++;3867pendingRequest = null;3868return load();3869};3870var load = function () {3871var thisRequest;3872return (pendingRequest ||3873(thisRequest = pendingRequest =3874loader()3875.catch(function (err) {3876err = err instanceof Error ? err : new Error(String(err));3877if (userOnError) {3878return new Promise(function (resolve, reject) {3879var userRetry = function () { return resolve(retry()); };3880var userFail = function () { return reject(err); };3881userOnError(err, userRetry, userFail, retries + 1);3882});3883}3884else {3885throw err;3886}3887})3888.then(function (comp) {3889if (thisRequest !== pendingRequest && pendingRequest) {3890return pendingRequest;3891}3892if (!comp) {3893warn$2("Async component loader resolved to undefined. " +3894"If you are using retry(), make sure to return its return value.");3895}3896// interop module default3897if (comp &&3898(comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {3899comp = comp.default;3900}3901if (comp && !isObject(comp) && !isFunction(comp)) {3902throw new Error("Invalid async component load result: ".concat(comp));3903}3904return comp;3905})));3906};3907return function () {3908var component = load();3909return {3910component: component,3911delay: delay,3912timeout: timeout,3913error: errorComponent,3914loading: loadingComponent3915};3916};3917}3918
3919function createLifeCycle(hookName) {3920return function (fn, target) {3921if (target === void 0) { target = currentInstance; }3922if (!target) {3923warn$2("".concat(formatName(hookName), " is called when there is no active component instance to be ") +3924"associated with. " +3925"Lifecycle injection APIs can only be used during execution of setup().");3926return;3927}3928return injectHook(target, hookName, fn);3929};3930}3931function formatName(name) {3932if (name === 'beforeDestroy') {3933name = 'beforeUnmount';3934}3935else if (name === 'destroyed') {3936name = 'unmounted';3937}3938return "on".concat(name[0].toUpperCase() + name.slice(1));3939}3940function injectHook(instance, hookName, fn) {3941var options = instance.$options;3942options[hookName] = mergeLifecycleHook(options[hookName], fn);3943}3944var onBeforeMount = createLifeCycle('beforeMount');3945var onMounted = createLifeCycle('mounted');3946var onBeforeUpdate = createLifeCycle('beforeUpdate');3947var onUpdated = createLifeCycle('updated');3948var onBeforeUnmount = createLifeCycle('beforeDestroy');3949var onUnmounted = createLifeCycle('destroyed');3950var onErrorCaptured = createLifeCycle('errorCaptured');3951var onActivated = createLifeCycle('activated');3952var onDeactivated = createLifeCycle('deactivated');3953var onServerPrefetch = createLifeCycle('serverPrefetch');3954var onRenderTracked = createLifeCycle('renderTracked');3955var onRenderTriggered = createLifeCycle('renderTriggered');3956
3957/**3958* Note: also update dist/vue.runtime.mjs when adding new exports to this file.
3959*/
3960var version = '2.7.8';3961/**3962* @internal type is manually declared in <root>/types/v3-define-component.d.ts
3963*/
3964function defineComponent(options) {3965return options;3966}3967
3968var vca = /*#__PURE__*/Object.freeze({3969__proto__: null,3970version: version,3971defineComponent: defineComponent,3972ref: ref$1,3973shallowRef: shallowRef,3974isRef: isRef,3975toRef: toRef,3976toRefs: toRefs,3977unref: unref,3978proxyRefs: proxyRefs,3979customRef: customRef,3980triggerRef: triggerRef,3981reactive: reactive,3982isReactive: isReactive,3983isReadonly: isReadonly,3984isShallow: isShallow,3985isProxy: isProxy,3986shallowReactive: shallowReactive,3987markRaw: markRaw,3988toRaw: toRaw,3989readonly: readonly,3990shallowReadonly: shallowReadonly,3991computed: computed,3992watch: watch,3993watchEffect: watchEffect,3994watchPostEffect: watchPostEffect,3995watchSyncEffect: watchSyncEffect,3996EffectScope: EffectScope,3997effectScope: effectScope,3998onScopeDispose: onScopeDispose,3999getCurrentScope: getCurrentScope,4000provide: provide,4001inject: inject,4002h: h,4003getCurrentInstance: getCurrentInstance,4004useSlots: useSlots,4005useAttrs: useAttrs,4006useListeners: useListeners,4007mergeDefaults: mergeDefaults,4008nextTick: nextTick,4009set: set,4010del: del,4011useCssModule: useCssModule,4012useCssVars: useCssVars,4013defineAsyncComponent: defineAsyncComponent,4014onBeforeMount: onBeforeMount,4015onMounted: onMounted,4016onBeforeUpdate: onBeforeUpdate,4017onUpdated: onUpdated,4018onBeforeUnmount: onBeforeUnmount,4019onUnmounted: onUnmounted,4020onErrorCaptured: onErrorCaptured,4021onActivated: onActivated,4022onDeactivated: onDeactivated,4023onServerPrefetch: onServerPrefetch,4024onRenderTracked: onRenderTracked,4025onRenderTriggered: onRenderTriggered4026});4027
4028var seenObjects = new _Set();4029/**4030* Recursively traverse an object to evoke all converted
4031* getters, so that every nested property inside the object
4032* is collected as a "deep" dependency.
4033*/
4034function traverse(val) {4035_traverse(val, seenObjects);4036seenObjects.clear();4037return val;4038}4039function _traverse(val, seen) {4040var i, keys;4041var isA = isArray(val);4042if ((!isA && !isObject(val)) ||4043Object.isFrozen(val) ||4044val instanceof VNode) {4045return;4046}4047if (val.__ob__) {4048var depId = val.__ob__.dep.id;4049if (seen.has(depId)) {4050return;4051}4052seen.add(depId);4053}4054if (isA) {4055i = val.length;4056while (i--)4057_traverse(val[i], seen);4058}4059else if (isRef(val)) {4060_traverse(val.value, seen);4061}4062else {4063keys = Object.keys(val);4064i = keys.length;4065while (i--)4066_traverse(val[keys[i]], seen);4067}4068}4069
4070var uid$1 = 0;4071/**4072* A watcher parses an expression, collects dependencies,
4073* and fires callback when the expression value changes.
4074* This is used for both the $watch() api and directives.
4075* @internal
4076*/
4077var Watcher = /** @class */ (function () {4078function Watcher(vm, expOrFn, cb, options, isRenderWatcher) {4079recordEffectScope(this, activeEffectScope || (vm ? vm._scope : undefined));4080if ((this.vm = vm)) {4081if (isRenderWatcher) {4082vm._watcher = this;4083}4084}4085// options4086if (options) {4087this.deep = !!options.deep;4088this.user = !!options.user;4089this.lazy = !!options.lazy;4090this.sync = !!options.sync;4091this.before = options.before;4092{4093this.onTrack = options.onTrack;4094this.onTrigger = options.onTrigger;4095}4096}4097else {4098this.deep = this.user = this.lazy = this.sync = false;4099}4100this.cb = cb;4101this.id = ++uid$1; // uid for batching4102this.active = true;4103this.post = false;4104this.dirty = this.lazy; // for lazy watchers4105this.deps = [];4106this.newDeps = [];4107this.depIds = new _Set();4108this.newDepIds = new _Set();4109this.expression = expOrFn.toString() ;4110// parse expression for getter4111if (isFunction(expOrFn)) {4112this.getter = expOrFn;4113}4114else {4115this.getter = parsePath(expOrFn);4116if (!this.getter) {4117this.getter = noop;4118warn$2("Failed watching path: \"".concat(expOrFn, "\" ") +4119'Watcher only accepts simple dot-delimited paths. ' +4120'For full control, use a function instead.', vm);4121}4122}4123this.value = this.lazy ? undefined : this.get();4124}4125/**4126* Evaluate the getter, and re-collect dependencies.
4127*/
4128Watcher.prototype.get = function () {4129pushTarget(this);4130var value;4131var vm = this.vm;4132try {4133value = this.getter.call(vm, vm);4134}4135catch (e) {4136if (this.user) {4137handleError(e, vm, "getter for watcher \"".concat(this.expression, "\""));4138}4139else {4140throw e;4141}4142}4143finally {4144// "touch" every property so they are all tracked as4145// dependencies for deep watching4146if (this.deep) {4147traverse(value);4148}4149popTarget();4150this.cleanupDeps();4151}4152return value;4153};4154/**4155* Add a dependency to this directive.
4156*/
4157Watcher.prototype.addDep = function (dep) {4158var id = dep.id;4159if (!this.newDepIds.has(id)) {4160this.newDepIds.add(id);4161this.newDeps.push(dep);4162if (!this.depIds.has(id)) {4163dep.addSub(this);4164}4165}4166};4167/**4168* Clean up for dependency collection.
4169*/
4170Watcher.prototype.cleanupDeps = function () {4171var i = this.deps.length;4172while (i--) {4173var dep = this.deps[i];4174if (!this.newDepIds.has(dep.id)) {4175dep.removeSub(this);4176}4177}4178var tmp = this.depIds;4179this.depIds = this.newDepIds;4180this.newDepIds = tmp;4181this.newDepIds.clear();4182tmp = this.deps;4183this.deps = this.newDeps;4184this.newDeps = tmp;4185this.newDeps.length = 0;4186};4187/**4188* Subscriber interface.
4189* Will be called when a dependency changes.
4190*/
4191Watcher.prototype.update = function () {4192/* istanbul ignore else */4193if (this.lazy) {4194this.dirty = true;4195}4196else if (this.sync) {4197this.run();4198}4199else {4200queueWatcher(this);4201}4202};4203/**4204* Scheduler job interface.
4205* Will be called by the scheduler.
4206*/
4207Watcher.prototype.run = function () {4208if (this.active) {4209var value = this.get();4210if (value !== this.value ||4211// Deep watchers and watchers on Object/Arrays should fire even4212// when the value is the same, because the value may4213// have mutated.4214isObject(value) ||4215this.deep) {4216// set new value4217var oldValue = this.value;4218this.value = value;4219if (this.user) {4220var info = "callback for watcher \"".concat(this.expression, "\"");4221invokeWithErrorHandling(this.cb, this.vm, [value, oldValue], this.vm, info);4222}4223else {4224this.cb.call(this.vm, value, oldValue);4225}4226}4227}4228};4229/**4230* Evaluate the value of the watcher.
4231* This only gets called for lazy watchers.
4232*/
4233Watcher.prototype.evaluate = function () {4234this.value = this.get();4235this.dirty = false;4236};4237/**4238* Depend on all deps collected by this watcher.
4239*/
4240Watcher.prototype.depend = function () {4241var i = this.deps.length;4242while (i--) {4243this.deps[i].depend();4244}4245};4246/**4247* Remove self from all dependencies' subscriber list.
4248*/
4249Watcher.prototype.teardown = function () {4250if (this.vm && !this.vm._isBeingDestroyed) {4251remove$2(this.vm._scope.effects, this);4252}4253if (this.active) {4254var i = this.deps.length;4255while (i--) {4256this.deps[i].removeSub(this);4257}4258this.active = false;4259if (this.onStop) {4260this.onStop();4261}4262}4263};4264return Watcher;4265}());4266
4267var sharedPropertyDefinition = {4268enumerable: true,4269configurable: true,4270get: noop,4271set: noop4272};4273function proxy(target, sourceKey, key) {4274sharedPropertyDefinition.get = function proxyGetter() {4275return this[sourceKey][key];4276};4277sharedPropertyDefinition.set = function proxySetter(val) {4278this[sourceKey][key] = val;4279};4280Object.defineProperty(target, key, sharedPropertyDefinition);4281}4282function initState(vm) {4283var opts = vm.$options;4284if (opts.props)4285initProps$1(vm, opts.props);4286// Composition API4287initSetup(vm);4288if (opts.methods)4289initMethods(vm, opts.methods);4290if (opts.data) {4291initData(vm);4292}4293else {4294var ob = observe((vm._data = {}));4295ob && ob.vmCount++;4296}4297if (opts.computed)4298initComputed$1(vm, opts.computed);4299if (opts.watch && opts.watch !== nativeWatch) {4300initWatch(vm, opts.watch);4301}4302}4303function initProps$1(vm, propsOptions) {4304var propsData = vm.$options.propsData || {};4305var props = (vm._props = shallowReactive({}));4306// cache prop keys so that future props updates can iterate using Array4307// instead of dynamic object key enumeration.4308var keys = (vm.$options._propKeys = []);4309var isRoot = !vm.$parent;4310// root instance props should be converted4311if (!isRoot) {4312toggleObserving(false);4313}4314var _loop_1 = function (key) {4315keys.push(key);4316var value = validateProp(key, propsOptions, propsData, vm);4317/* istanbul ignore else */4318{4319var hyphenatedKey = hyphenate(key);4320if (isReservedAttribute(hyphenatedKey) ||4321config.isReservedAttr(hyphenatedKey)) {4322warn$2("\"".concat(hyphenatedKey, "\" is a reserved attribute and cannot be used as component prop."), vm);4323}4324defineReactive(props, key, value, function () {4325if (!isRoot && !isUpdatingChildComponent) {4326warn$2("Avoid mutating a prop directly since the value will be " +4327"overwritten whenever the parent component re-renders. " +4328"Instead, use a data or computed property based on the prop's " +4329"value. Prop being mutated: \"".concat(key, "\""), vm);4330}4331});4332}4333// static props are already proxied on the component's prototype4334// during Vue.extend(). We only need to proxy props defined at4335// instantiation here.4336if (!(key in vm)) {4337proxy(vm, "_props", key);4338}4339};4340for (var key in propsOptions) {4341_loop_1(key);4342}4343toggleObserving(true);4344}4345function initData(vm) {4346var data = vm.$options.data;4347data = vm._data = isFunction(data) ? getData(data, vm) : data || {};4348if (!isPlainObject(data)) {4349data = {};4350warn$2('data functions should return an object:\n' +4351'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', vm);4352}4353// proxy data on instance4354var keys = Object.keys(data);4355var props = vm.$options.props;4356var methods = vm.$options.methods;4357var i = keys.length;4358while (i--) {4359var key = keys[i];4360{4361if (methods && hasOwn(methods, key)) {4362warn$2("Method \"".concat(key, "\" has already been defined as a data property."), vm);4363}4364}4365if (props && hasOwn(props, key)) {4366warn$2("The data property \"".concat(key, "\" is already declared as a prop. ") +4367"Use prop default value instead.", vm);4368}4369else if (!isReserved(key)) {4370proxy(vm, "_data", key);4371}4372}4373// observe data4374var ob = observe(data);4375ob && ob.vmCount++;4376}4377function getData(data, vm) {4378// #7573 disable dep collection when invoking data getters4379pushTarget();4380try {4381return data.call(vm, vm);4382}4383catch (e) {4384handleError(e, vm, "data()");4385return {};4386}4387finally {4388popTarget();4389}4390}4391var computedWatcherOptions = { lazy: true };4392function initComputed$1(vm, computed) {4393// $flow-disable-line4394var watchers = (vm._computedWatchers = Object.create(null));4395// computed properties are just getters during SSR4396var isSSR = isServerRendering();4397for (var key in computed) {4398var userDef = computed[key];4399var getter = isFunction(userDef) ? userDef : userDef.get;4400if (getter == null) {4401warn$2("Getter is missing for computed property \"".concat(key, "\"."), vm);4402}4403if (!isSSR) {4404// create internal watcher for the computed property.4405watchers[key] = new Watcher(vm, getter || noop, noop, computedWatcherOptions);4406}4407// component-defined computed properties are already defined on the4408// component prototype. We only need to define computed properties defined4409// at instantiation here.4410if (!(key in vm)) {4411defineComputed(vm, key, userDef);4412}4413else {4414if (key in vm.$data) {4415warn$2("The computed property \"".concat(key, "\" is already defined in data."), vm);4416}4417else if (vm.$options.props && key in vm.$options.props) {4418warn$2("The computed property \"".concat(key, "\" is already defined as a prop."), vm);4419}4420else if (vm.$options.methods && key in vm.$options.methods) {4421warn$2("The computed property \"".concat(key, "\" is already defined as a method."), vm);4422}4423}4424}4425}4426function defineComputed(target, key, userDef) {4427var shouldCache = !isServerRendering();4428if (isFunction(userDef)) {4429sharedPropertyDefinition.get = shouldCache4430? createComputedGetter(key)4431: createGetterInvoker(userDef);4432sharedPropertyDefinition.set = noop;4433}4434else {4435sharedPropertyDefinition.get = userDef.get4436? shouldCache && userDef.cache !== false4437? createComputedGetter(key)4438: createGetterInvoker(userDef.get)4439: noop;4440sharedPropertyDefinition.set = userDef.set || noop;4441}4442if (sharedPropertyDefinition.set === noop) {4443sharedPropertyDefinition.set = function () {4444warn$2("Computed property \"".concat(key, "\" was assigned to but it has no setter."), this);4445};4446}4447Object.defineProperty(target, key, sharedPropertyDefinition);4448}4449function createComputedGetter(key) {4450return function computedGetter() {4451var watcher = this._computedWatchers && this._computedWatchers[key];4452if (watcher) {4453if (watcher.dirty) {4454watcher.evaluate();4455}4456if (Dep.target) {4457if (Dep.target.onTrack) {4458Dep.target.onTrack({4459effect: Dep.target,4460target: this,4461type: "get" /* TrackOpTypes.GET */,4462key: key4463});4464}4465watcher.depend();4466}4467return watcher.value;4468}4469};4470}4471function createGetterInvoker(fn) {4472return function computedGetter() {4473return fn.call(this, this);4474};4475}4476function initMethods(vm, methods) {4477var props = vm.$options.props;4478for (var key in methods) {4479{4480if (typeof methods[key] !== 'function') {4481warn$2("Method \"".concat(key, "\" has type \"").concat(typeof methods[key], "\" in the component definition. ") +4482"Did you reference the function correctly?", vm);4483}4484if (props && hasOwn(props, key)) {4485warn$2("Method \"".concat(key, "\" has already been defined as a prop."), vm);4486}4487if (key in vm && isReserved(key)) {4488warn$2("Method \"".concat(key, "\" conflicts with an existing Vue instance method. ") +4489"Avoid defining component methods that start with _ or $.");4490}4491}4492vm[key] = typeof methods[key] !== 'function' ? noop : bind$1(methods[key], vm);4493}4494}4495function initWatch(vm, watch) {4496for (var key in watch) {4497var handler = watch[key];4498if (isArray(handler)) {4499for (var i = 0; i < handler.length; i++) {4500createWatcher(vm, key, handler[i]);4501}4502}4503else {4504createWatcher(vm, key, handler);4505}4506}4507}4508function createWatcher(vm, expOrFn, handler, options) {4509if (isPlainObject(handler)) {4510options = handler;4511handler = handler.handler;4512}4513if (typeof handler === 'string') {4514handler = vm[handler];4515}4516return vm.$watch(expOrFn, handler, options);4517}4518function stateMixin(Vue) {4519// flow somehow has problems with directly declared definition object4520// when using Object.defineProperty, so we have to procedurally build up4521// the object here.4522var dataDef = {};4523dataDef.get = function () {4524return this._data;4525};4526var propsDef = {};4527propsDef.get = function () {4528return this._props;4529};4530{4531dataDef.set = function () {4532warn$2('Avoid replacing instance root $data. ' +4533'Use nested data properties instead.', this);4534};4535propsDef.set = function () {4536warn$2("$props is readonly.", this);4537};4538}4539Object.defineProperty(Vue.prototype, '$data', dataDef);4540Object.defineProperty(Vue.prototype, '$props', propsDef);4541Vue.prototype.$set = set;4542Vue.prototype.$delete = del;4543Vue.prototype.$watch = function (expOrFn, cb, options) {4544var vm = this;4545if (isPlainObject(cb)) {4546return createWatcher(vm, expOrFn, cb, options);4547}4548options = options || {};4549options.user = true;4550var watcher = new Watcher(vm, expOrFn, cb, options);4551if (options.immediate) {4552var info = "callback for immediate watcher \"".concat(watcher.expression, "\"");4553pushTarget();4554invokeWithErrorHandling(cb, vm, [watcher.value], vm, info);4555popTarget();4556}4557return function unwatchFn() {4558watcher.teardown();4559};4560};4561}4562
4563function initProvide(vm) {4564var provideOption = vm.$options.provide;4565if (provideOption) {4566var provided = isFunction(provideOption)4567? provideOption.call(vm)4568: provideOption;4569if (!isObject(provided)) {4570return;4571}4572var source = resolveProvided(vm);4573// IE9 doesn't support Object.getOwnPropertyDescriptors so we have to4574// iterate the keys ourselves.4575var keys = hasSymbol ? Reflect.ownKeys(provided) : Object.keys(provided);4576for (var i = 0; i < keys.length; i++) {4577var key = keys[i];4578Object.defineProperty(source, key, Object.getOwnPropertyDescriptor(provided, key));4579}4580}4581}4582function initInjections(vm) {4583var result = resolveInject(vm.$options.inject, vm);4584if (result) {4585toggleObserving(false);4586Object.keys(result).forEach(function (key) {4587/* istanbul ignore else */4588{4589defineReactive(vm, key, result[key], function () {4590warn$2("Avoid mutating an injected value directly since the changes will be " +4591"overwritten whenever the provided component re-renders. " +4592"injection being mutated: \"".concat(key, "\""), vm);4593});4594}4595});4596toggleObserving(true);4597}4598}4599function resolveInject(inject, vm) {4600if (inject) {4601// inject is :any because flow is not smart enough to figure out cached4602var result = Object.create(null);4603var keys = hasSymbol ? Reflect.ownKeys(inject) : Object.keys(inject);4604for (var i = 0; i < keys.length; i++) {4605var key = keys[i];4606// #6574 in case the inject object is observed...4607if (key === '__ob__')4608continue;4609var provideKey = inject[key].from;4610if (provideKey in vm._provided) {4611result[key] = vm._provided[provideKey];4612}4613else if ('default' in inject[key]) {4614var provideDefault = inject[key].default;4615result[key] = isFunction(provideDefault)4616? provideDefault.call(vm)4617: provideDefault;4618}4619else {4620warn$2("Injection \"".concat(key, "\" not found"), vm);4621}4622}4623return result;4624}4625}4626
4627var uid = 0;4628function initMixin$1(Vue) {4629Vue.prototype._init = function (options) {4630var vm = this;4631// a uid4632vm._uid = uid++;4633var startTag, endTag;4634/* istanbul ignore if */4635if (config.performance && mark) {4636startTag = "vue-perf-start:".concat(vm._uid);4637endTag = "vue-perf-end:".concat(vm._uid);4638mark(startTag);4639}4640// a flag to mark this as a Vue instance without having to do instanceof4641// check4642vm._isVue = true;4643// avoid instances from being observed4644vm.__v_skip = true;4645// effect scope4646vm._scope = new EffectScope(true /* detached */);4647// merge options4648if (options && options._isComponent) {4649// optimize internal component instantiation4650// since dynamic options merging is pretty slow, and none of the4651// internal component options needs special treatment.4652initInternalComponent(vm, options);4653}4654else {4655vm.$options = mergeOptions(resolveConstructorOptions(vm.constructor), options || {}, vm);4656}4657/* istanbul ignore else */4658{4659initProxy(vm);4660}4661// expose real self4662vm._self = vm;4663initLifecycle(vm);4664initEvents(vm);4665initRender(vm);4666callHook$1(vm, 'beforeCreate', undefined, false /* setContext */);4667initInjections(vm); // resolve injections before data/props4668initState(vm);4669initProvide(vm); // resolve provide after data/props4670callHook$1(vm, 'created');4671/* istanbul ignore if */4672if (config.performance && mark) {4673vm._name = formatComponentName(vm, false);4674mark(endTag);4675measure("vue ".concat(vm._name, " init"), startTag, endTag);4676}4677if (vm.$options.el) {4678vm.$mount(vm.$options.el);4679}4680};4681}4682function initInternalComponent(vm, options) {4683var opts = (vm.$options = Object.create(vm.constructor.options));4684// doing this because it's faster than dynamic enumeration.4685var parentVnode = options._parentVnode;4686opts.parent = options.parent;4687opts._parentVnode = parentVnode;4688var vnodeComponentOptions = parentVnode.componentOptions;4689opts.propsData = vnodeComponentOptions.propsData;4690opts._parentListeners = vnodeComponentOptions.listeners;4691opts._renderChildren = vnodeComponentOptions.children;4692opts._componentTag = vnodeComponentOptions.tag;4693if (options.render) {4694opts.render = options.render;4695opts.staticRenderFns = options.staticRenderFns;4696}4697}4698function resolveConstructorOptions(Ctor) {4699var options = Ctor.options;4700if (Ctor.super) {4701var superOptions = resolveConstructorOptions(Ctor.super);4702var cachedSuperOptions = Ctor.superOptions;4703if (superOptions !== cachedSuperOptions) {4704// super option changed,4705// need to resolve new options.4706Ctor.superOptions = superOptions;4707// check if there are any late-modified/attached options (#4976)4708var modifiedOptions = resolveModifiedOptions(Ctor);4709// update base extend options4710if (modifiedOptions) {4711extend(Ctor.extendOptions, modifiedOptions);4712}4713options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);4714if (options.name) {4715options.components[options.name] = Ctor;4716}4717}4718}4719return options;4720}4721function resolveModifiedOptions(Ctor) {4722var modified;4723var latest = Ctor.options;4724var sealed = Ctor.sealedOptions;4725for (var key in latest) {4726if (latest[key] !== sealed[key]) {4727if (!modified)4728modified = {};4729modified[key] = latest[key];4730}4731}4732return modified;4733}4734
4735function FunctionalRenderContext(data, props, children, parent, Ctor) {4736var _this = this;4737var options = Ctor.options;4738// ensure the createElement function in functional components4739// gets a unique context - this is necessary for correct named slot check4740var contextVm;4741if (hasOwn(parent, '_uid')) {4742contextVm = Object.create(parent);4743contextVm._original = parent;4744}4745else {4746// the context vm passed in is a functional context as well.4747// in this case we want to make sure we are able to get a hold to the4748// real context instance.4749contextVm = parent;4750// @ts-ignore4751parent = parent._original;4752}4753var isCompiled = isTrue(options._compiled);4754var needNormalization = !isCompiled;4755this.data = data;4756this.props = props;4757this.children = children;4758this.parent = parent;4759this.listeners = data.on || emptyObject;4760this.injections = resolveInject(options.inject, parent);4761this.slots = function () {4762if (!_this.$slots) {4763normalizeScopedSlots(parent, data.scopedSlots, (_this.$slots = resolveSlots(children, parent)));4764}4765return _this.$slots;4766};4767Object.defineProperty(this, 'scopedSlots', {4768enumerable: true,4769get: function () {4770return normalizeScopedSlots(parent, data.scopedSlots, this.slots());4771}4772});4773// support for compiled functional template4774if (isCompiled) {4775// exposing $options for renderStatic()4776this.$options = options;4777// pre-resolve slots for renderSlot()4778this.$slots = this.slots();4779this.$scopedSlots = normalizeScopedSlots(parent, data.scopedSlots, this.$slots);4780}4781if (options._scopeId) {4782this._c = function (a, b, c, d) {4783var vnode = createElement$1(contextVm, a, b, c, d, needNormalization);4784if (vnode && !isArray(vnode)) {4785vnode.fnScopeId = options._scopeId;4786vnode.fnContext = parent;4787}4788return vnode;4789};4790}4791else {4792this._c = function (a, b, c, d) {4793return createElement$1(contextVm, a, b, c, d, needNormalization);4794};4795}4796}4797installRenderHelpers(FunctionalRenderContext.prototype);4798function createFunctionalComponent(Ctor, propsData, data, contextVm, children) {4799var options = Ctor.options;4800var props = {};4801var propOptions = options.props;4802if (isDef(propOptions)) {4803for (var key in propOptions) {4804props[key] = validateProp(key, propOptions, propsData || emptyObject);4805}4806}4807else {4808if (isDef(data.attrs))4809mergeProps(props, data.attrs);4810if (isDef(data.props))4811mergeProps(props, data.props);4812}4813var renderContext = new FunctionalRenderContext(data, props, children, contextVm, Ctor);4814var vnode = options.render.call(null, renderContext._c, renderContext);4815if (vnode instanceof VNode) {4816return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext);4817}4818else if (isArray(vnode)) {4819var vnodes = normalizeChildren(vnode) || [];4820var res = new Array(vnodes.length);4821for (var i = 0; i < vnodes.length; i++) {4822res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);4823}4824return res;4825}4826}4827function cloneAndMarkFunctionalResult(vnode, data, contextVm, options, renderContext) {4828// #7817 clone node before setting fnContext, otherwise if the node is reused4829// (e.g. it was from a cached normal slot) the fnContext causes named slots4830// that should not be matched to match.4831var clone = cloneVNode(vnode);4832clone.fnContext = contextVm;4833clone.fnOptions = options;4834{4835(clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext =4836renderContext;4837}4838if (data.slot) {4839(clone.data || (clone.data = {})).slot = data.slot;4840}4841return clone;4842}4843function mergeProps(to, from) {4844for (var key in from) {4845to[camelize(key)] = from[key];4846}4847}4848
4849function getComponentName(options) {4850return options.name || options.__name || options._componentTag;4851}4852// inline hooks to be invoked on component VNodes during patch4853var componentVNodeHooks = {4854init: function (vnode, hydrating) {4855if (vnode.componentInstance &&4856!vnode.componentInstance._isDestroyed &&4857vnode.data.keepAlive) {4858// kept-alive components, treat as a patch4859var mountedNode = vnode; // work around flow4860componentVNodeHooks.prepatch(mountedNode, mountedNode);4861}4862else {4863var child = (vnode.componentInstance = createComponentInstanceForVnode(vnode, activeInstance));4864child.$mount(hydrating ? vnode.elm : undefined, hydrating);4865}4866},4867prepatch: function (oldVnode, vnode) {4868var options = vnode.componentOptions;4869var child = (vnode.componentInstance = oldVnode.componentInstance);4870updateChildComponent(child, options.propsData, // updated props4871options.listeners, // updated listeners4872vnode, // new parent vnode4873options.children // new children4874);4875},4876insert: function (vnode) {4877var context = vnode.context, componentInstance = vnode.componentInstance;4878if (!componentInstance._isMounted) {4879componentInstance._isMounted = true;4880callHook$1(componentInstance, 'mounted');4881}4882if (vnode.data.keepAlive) {4883if (context._isMounted) {4884// vue-router#12124885// During updates, a kept-alive component's child components may4886// change, so directly walking the tree here may call activated hooks4887// on incorrect children. Instead we push them into a queue which will4888// be processed after the whole patch process ended.4889queueActivatedComponent(componentInstance);4890}4891else {4892activateChildComponent(componentInstance, true /* direct */);4893}4894}4895},4896destroy: function (vnode) {4897var componentInstance = vnode.componentInstance;4898if (!componentInstance._isDestroyed) {4899if (!vnode.data.keepAlive) {4900componentInstance.$destroy();4901}4902else {4903deactivateChildComponent(componentInstance, true /* direct */);4904}4905}4906}4907};4908var hooksToMerge = Object.keys(componentVNodeHooks);4909function createComponent(Ctor, data, context, children, tag) {4910if (isUndef(Ctor)) {4911return;4912}4913var baseCtor = context.$options._base;4914// plain options object: turn it into a constructor4915if (isObject(Ctor)) {4916Ctor = baseCtor.extend(Ctor);4917}4918// if at this stage it's not a constructor or an async component factory,4919// reject.4920if (typeof Ctor !== 'function') {4921{4922warn$2("Invalid Component definition: ".concat(String(Ctor)), context);4923}4924return;4925}4926// async component4927var asyncFactory;4928// @ts-expect-error4929if (isUndef(Ctor.cid)) {4930asyncFactory = Ctor;4931Ctor = resolveAsyncComponent(asyncFactory, baseCtor);4932if (Ctor === undefined) {4933// return a placeholder node for async component, which is rendered4934// as a comment node but preserves all the raw information for the node.4935// the information will be used for async server-rendering and hydration.4936return createAsyncPlaceholder(asyncFactory, data, context, children, tag);4937}4938}4939data = data || {};4940// resolve constructor options in case global mixins are applied after4941// component constructor creation4942resolveConstructorOptions(Ctor);4943// transform component v-model data into props & events4944if (isDef(data.model)) {4945// @ts-expect-error4946transformModel(Ctor.options, data);4947}4948// extract props4949// @ts-expect-error4950var propsData = extractPropsFromVNodeData(data, Ctor, tag);4951// functional component4952// @ts-expect-error4953if (isTrue(Ctor.options.functional)) {4954return createFunctionalComponent(Ctor, propsData, data, context, children);4955}4956// extract listeners, since these needs to be treated as4957// child component listeners instead of DOM listeners4958var listeners = data.on;4959// replace with listeners with .native modifier4960// so it gets processed during parent component patch.4961data.on = data.nativeOn;4962// @ts-expect-error4963if (isTrue(Ctor.options.abstract)) {4964// abstract components do not keep anything4965// other than props & listeners & slot4966// work around flow4967var slot = data.slot;4968data = {};4969if (slot) {4970data.slot = slot;4971}4972}4973// install component management hooks onto the placeholder node4974installComponentHooks(data);4975// return a placeholder vnode4976// @ts-expect-error4977var name = getComponentName(Ctor.options) || tag;4978var vnode = new VNode(4979// @ts-expect-error4980"vue-component-".concat(Ctor.cid).concat(name ? "-".concat(name) : ''), data, undefined, undefined, undefined, context,4981// @ts-expect-error4982{ Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, asyncFactory);4983return vnode;4984}4985function createComponentInstanceForVnode(4986// we know it's MountedComponentVNode but flow doesn't4987vnode,4988// activeInstance in lifecycle state4989parent) {4990var options = {4991_isComponent: true,4992_parentVnode: vnode,4993parent: parent4994};4995// check inline-template render functions4996var inlineTemplate = vnode.data.inlineTemplate;4997if (isDef(inlineTemplate)) {4998options.render = inlineTemplate.render;4999options.staticRenderFns = inlineTemplate.staticRenderFns;5000}5001return new vnode.componentOptions.Ctor(options);5002}5003function installComponentHooks(data) {5004var hooks = data.hook || (data.hook = {});5005for (var i = 0; i < hooksToMerge.length; i++) {5006var key = hooksToMerge[i];5007var existing = hooks[key];5008var toMerge = componentVNodeHooks[key];5009// @ts-expect-error5010if (existing !== toMerge && !(existing && existing._merged)) {5011hooks[key] = existing ? mergeHook(toMerge, existing) : toMerge;5012}5013}5014}5015function mergeHook(f1, f2) {5016var merged = function (a, b) {5017// flow complains about extra args which is why we use any5018f1(a, b);5019f2(a, b);5020};5021merged._merged = true;5022return merged;5023}5024// transform component v-model info (value and callback) into5025// prop and event handler respectively.5026function transformModel(options, data) {5027var prop = (options.model && options.model.prop) || 'value';5028var event = (options.model && options.model.event) || 'input';5029(data.attrs || (data.attrs = {}))[prop] = data.model.value;5030var on = data.on || (data.on = {});5031var existing = on[event];5032var callback = data.model.callback;5033if (isDef(existing)) {5034if (isArray(existing)5035? existing.indexOf(callback) === -15036: existing !== callback) {5037on[event] = [callback].concat(existing);5038}5039}5040else {5041on[event] = callback;5042}5043}5044
5045var warn$2 = noop;5046var tip = noop;5047var generateComponentTrace; // work around flow check5048var formatComponentName;5049{5050var hasConsole_1 = typeof console !== 'undefined';5051var classifyRE_1 = /(?:^|[-_])(\w)/g;5052var classify_1 = function (str) {5053return str.replace(classifyRE_1, function (c) { return c.toUpperCase(); }).replace(/[-_]/g, '');5054};5055warn$2 = function (msg, vm) {5056if (vm === void 0) { vm = currentInstance; }5057var trace = vm ? generateComponentTrace(vm) : '';5058if (config.warnHandler) {5059config.warnHandler.call(null, msg, vm, trace);5060}5061else if (hasConsole_1 && !config.silent) {5062console.error("[Vue warn]: ".concat(msg).concat(trace));5063}5064};5065tip = function (msg, vm) {5066if (hasConsole_1 && !config.silent) {5067console.warn("[Vue tip]: ".concat(msg) + (vm ? generateComponentTrace(vm) : ''));5068}5069};5070formatComponentName = function (vm, includeFile) {5071if (vm.$root === vm) {5072return '<Root>';5073}5074var options = isFunction(vm) && vm.cid != null5075? vm.options5076: vm._isVue5077? vm.$options || vm.constructor.options5078: vm;5079var name = getComponentName(options);5080var file = options.__file;5081if (!name && file) {5082var match = file.match(/([^/\\]+)\.vue$/);5083name = match && match[1];5084}5085return ((name ? "<".concat(classify_1(name), ">") : "<Anonymous>") +5086(file && includeFile !== false ? " at ".concat(file) : ''));5087};5088var repeat_1 = function (str, n) {5089var res = '';5090while (n) {5091if (n % 2 === 1)5092res += str;5093if (n > 1)5094str += str;5095n >>= 1;5096}5097return res;5098};5099generateComponentTrace = function (vm) {5100if (vm._isVue && vm.$parent) {5101var tree = [];5102var currentRecursiveSequence = 0;5103while (vm) {5104if (tree.length > 0) {5105var last = tree[tree.length - 1];5106if (last.constructor === vm.constructor) {5107currentRecursiveSequence++;5108vm = vm.$parent;5109continue;5110}5111else if (currentRecursiveSequence > 0) {5112tree[tree.length - 1] = [last, currentRecursiveSequence];5113currentRecursiveSequence = 0;5114}5115}5116tree.push(vm);5117vm = vm.$parent;5118}5119return ('\n\nfound in\n\n' +5120tree
5121.map(function (vm, i) {5122return "".concat(i === 0 ? '---> ' : repeat_1(' ', 5 + i * 2)).concat(isArray(vm)5123? "".concat(formatComponentName(vm[0]), "... (").concat(vm[1], " recursive calls)")5124: formatComponentName(vm));5125})5126.join('\n'));5127}5128else {5129return "\n\n(found in ".concat(formatComponentName(vm), ")");5130}5131};5132}5133
5134/**5135* Option overwriting strategies are functions that handle
5136* how to merge a parent option value and a child option
5137* value into the final value.
5138*/
5139var strats = config.optionMergeStrategies;5140/**5141* Options with restrictions
5142*/
5143{5144strats.el = strats.propsData = function (parent, child, vm, key) {5145if (!vm) {5146warn$2("option \"".concat(key, "\" can only be used during instance ") +5147'creation with the `new` keyword.');5148}5149return defaultStrat(parent, child);5150};5151}5152/**5153* Helper that recursively merges two data objects together.
5154*/
5155function mergeData(to, from) {5156if (!from)5157return to;5158var key, toVal, fromVal;5159var keys = hasSymbol5160? Reflect.ownKeys(from)5161: Object.keys(from);5162for (var i = 0; i < keys.length; i++) {5163key = keys[i];5164// in case the object is already observed...5165if (key === '__ob__')5166continue;5167toVal = to[key];5168fromVal = from[key];5169if (!hasOwn(to, key)) {5170set(to, key, fromVal);5171}5172else if (toVal !== fromVal &&5173isPlainObject(toVal) &&5174isPlainObject(fromVal)) {5175mergeData(toVal, fromVal);5176}5177}5178return to;5179}5180/**5181* Data
5182*/
5183function mergeDataOrFn(parentVal, childVal, vm) {5184if (!vm) {5185// in a Vue.extend merge, both should be functions5186if (!childVal) {5187return parentVal;5188}5189if (!parentVal) {5190return childVal;5191}5192// when parentVal & childVal are both present,5193// we need to return a function that returns the5194// merged result of both functions... no need to5195// check if parentVal is a function here because5196// it has to be a function to pass previous merges.5197return function mergedDataFn() {5198return mergeData(isFunction(childVal) ? childVal.call(this, this) : childVal, isFunction(parentVal) ? parentVal.call(this, this) : parentVal);5199};5200}5201else {5202return function mergedInstanceDataFn() {5203// instance merge5204var instanceData = isFunction(childVal)5205? childVal.call(vm, vm)5206: childVal;5207var defaultData = isFunction(parentVal)5208? parentVal.call(vm, vm)5209: parentVal;5210if (instanceData) {5211return mergeData(instanceData, defaultData);5212}5213else {5214return defaultData;5215}5216};5217}5218}5219strats.data = function (parentVal, childVal, vm) {5220if (!vm) {5221if (childVal && typeof childVal !== 'function') {5222warn$2('The "data" option should be a function ' +5223'that returns a per-instance value in component ' +5224'definitions.', vm);5225return parentVal;5226}5227return mergeDataOrFn(parentVal, childVal);5228}5229return mergeDataOrFn(parentVal, childVal, vm);5230};5231/**5232* Hooks and props are merged as arrays.
5233*/
5234function mergeLifecycleHook(parentVal, childVal) {5235var res = childVal5236? parentVal5237? parentVal.concat(childVal)5238: isArray(childVal)5239? childVal5240: [childVal]5241: parentVal;5242return res ? dedupeHooks(res) : res;5243}5244function dedupeHooks(hooks) {5245var res = [];5246for (var i = 0; i < hooks.length; i++) {5247if (res.indexOf(hooks[i]) === -1) {5248res.push(hooks[i]);5249}5250}5251return res;5252}5253LIFECYCLE_HOOKS.forEach(function (hook) {5254strats[hook] = mergeLifecycleHook;5255});5256/**5257* Assets
5258*
5259* When a vm is present (instance creation), we need to do
5260* a three-way merge between constructor options, instance
5261* options and parent options.
5262*/
5263function mergeAssets(parentVal, childVal, vm, key) {5264var res = Object.create(parentVal || null);5265if (childVal) {5266assertObjectType(key, childVal, vm);5267return extend(res, childVal);5268}5269else {5270return res;5271}5272}5273ASSET_TYPES.forEach(function (type) {5274strats[type + 's'] = mergeAssets;5275});5276/**5277* Watchers.
5278*
5279* Watchers hashes should not overwrite one
5280* another, so we merge them as arrays.
5281*/
5282strats.watch = function (parentVal, childVal, vm, key) {5283// work around Firefox's Object.prototype.watch...5284//@ts-expect-error work around5285if (parentVal === nativeWatch)5286parentVal = undefined;5287//@ts-expect-error work around5288if (childVal === nativeWatch)5289childVal = undefined;5290/* istanbul ignore if */5291if (!childVal)5292return Object.create(parentVal || null);5293{5294assertObjectType(key, childVal, vm);5295}5296if (!parentVal)5297return childVal;5298var ret = {};5299extend(ret, parentVal);5300for (var key_1 in childVal) {5301var parent_1 = ret[key_1];5302var child = childVal[key_1];5303if (parent_1 && !isArray(parent_1)) {5304parent_1 = [parent_1];5305}5306ret[key_1] = parent_1 ? parent_1.concat(child) : isArray(child) ? child : [child];5307}5308return ret;5309};5310/**5311* Other object hashes.
5312*/
5313strats.props =5314strats.methods =5315strats.inject =5316strats.computed =5317function (parentVal, childVal, vm, key) {5318if (childVal && true) {5319assertObjectType(key, childVal, vm);5320}5321if (!parentVal)5322return childVal;5323var ret = Object.create(null);5324extend(ret, parentVal);5325if (childVal)5326extend(ret, childVal);5327return ret;5328};5329strats.provide = mergeDataOrFn;5330/**5331* Default strategy.
5332*/
5333var defaultStrat = function (parentVal, childVal) {5334return childVal === undefined ? parentVal : childVal;5335};5336/**5337* Validate component names
5338*/
5339function checkComponents(options) {5340for (var key in options.components) {5341validateComponentName(key);5342}5343}5344function validateComponentName(name) {5345if (!new RegExp("^[a-zA-Z][\\-\\.0-9_".concat(unicodeRegExp.source, "]*$")).test(name)) {5346warn$2('Invalid component name: "' +5347name +5348'". Component names ' +5349'should conform to valid custom element name in html5 specification.');5350}5351if (isBuiltInTag(name) || config.isReservedTag(name)) {5352warn$2('Do not use built-in or reserved HTML elements as component ' +5353'id: ' +5354name);5355}5356}5357/**5358* Ensure all props option syntax are normalized into the
5359* Object-based format.
5360*/
5361function normalizeProps(options, vm) {5362var props = options.props;5363if (!props)5364return;5365var res = {};5366var i, val, name;5367if (isArray(props)) {5368i = props.length;5369while (i--) {5370val = props[i];5371if (typeof val === 'string') {5372name = camelize(val);5373res[name] = { type: null };5374}5375else {5376warn$2('props must be strings when using array syntax.');5377}5378}5379}5380else if (isPlainObject(props)) {5381for (var key in props) {5382val = props[key];5383name = camelize(key);5384res[name] = isPlainObject(val) ? val : { type: val };5385}5386}5387else {5388warn$2("Invalid value for option \"props\": expected an Array or an Object, " +5389"but got ".concat(toRawType(props), "."), vm);5390}5391options.props = res;5392}5393/**5394* Normalize all injections into Object-based format
5395*/
5396function normalizeInject(options, vm) {5397var inject = options.inject;5398if (!inject)5399return;5400var normalized = (options.inject = {});5401if (isArray(inject)) {5402for (var i = 0; i < inject.length; i++) {5403normalized[inject[i]] = { from: inject[i] };5404}5405}5406else if (isPlainObject(inject)) {5407for (var key in inject) {5408var val = inject[key];5409normalized[key] = isPlainObject(val)5410? extend({ from: key }, val)5411: { from: val };5412}5413}5414else {5415warn$2("Invalid value for option \"inject\": expected an Array or an Object, " +5416"but got ".concat(toRawType(inject), "."), vm);5417}5418}5419/**5420* Normalize raw function directives into object format.
5421*/
5422function normalizeDirectives$1(options) {5423var dirs = options.directives;5424if (dirs) {5425for (var key in dirs) {5426var def = dirs[key];5427if (isFunction(def)) {5428dirs[key] = { bind: def, update: def };5429}5430}5431}5432}5433function assertObjectType(name, value, vm) {5434if (!isPlainObject(value)) {5435warn$2("Invalid value for option \"".concat(name, "\": expected an Object, ") +5436"but got ".concat(toRawType(value), "."), vm);5437}5438}5439/**5440* Merge two option objects into a new one.
5441* Core utility used in both instantiation and inheritance.
5442*/
5443function mergeOptions(parent, child, vm) {5444{5445checkComponents(child);5446}5447if (isFunction(child)) {5448// @ts-expect-error5449child = child.options;5450}5451normalizeProps(child, vm);5452normalizeInject(child, vm);5453normalizeDirectives$1(child);5454// Apply extends and mixins on the child options,5455// but only if it is a raw options object that isn't5456// the result of another mergeOptions call.5457// Only merged options has the _base property.5458if (!child._base) {5459if (child.extends) {5460parent = mergeOptions(parent, child.extends, vm);5461}5462if (child.mixins) {5463for (var i = 0, l = child.mixins.length; i < l; i++) {5464parent = mergeOptions(parent, child.mixins[i], vm);5465}5466}5467}5468var options = {};5469var key;5470for (key in parent) {5471mergeField(key);5472}5473for (key in child) {5474if (!hasOwn(parent, key)) {5475mergeField(key);5476}5477}5478function mergeField(key) {5479var strat = strats[key] || defaultStrat;5480options[key] = strat(parent[key], child[key], vm, key);5481}5482return options;5483}5484/**5485* Resolve an asset.
5486* This function is used because child instances need access
5487* to assets defined in its ancestor chain.
5488*/
5489function resolveAsset(options, type, id, warnMissing) {5490/* istanbul ignore if */5491if (typeof id !== 'string') {5492return;5493}5494var assets = options[type];5495// check local registration variations first5496if (hasOwn(assets, id))5497return assets[id];5498var camelizedId = camelize(id);5499if (hasOwn(assets, camelizedId))5500return assets[camelizedId];5501var PascalCaseId = capitalize(camelizedId);5502if (hasOwn(assets, PascalCaseId))5503return assets[PascalCaseId];5504// fallback to prototype chain5505var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];5506if (warnMissing && !res) {5507warn$2('Failed to resolve ' + type.slice(0, -1) + ': ' + id);5508}5509return res;5510}5511
5512function validateProp(key, propOptions, propsData, vm) {5513var prop = propOptions[key];5514var absent = !hasOwn(propsData, key);5515var value = propsData[key];5516// boolean casting5517var booleanIndex = getTypeIndex(Boolean, prop.type);5518if (booleanIndex > -1) {5519if (absent && !hasOwn(prop, 'default')) {5520value = false;5521}5522else if (value === '' || value === hyphenate(key)) {5523// only cast empty string / same name to boolean if5524// boolean has higher priority5525var stringIndex = getTypeIndex(String, prop.type);5526if (stringIndex < 0 || booleanIndex < stringIndex) {5527value = true;5528}5529}5530}5531// check default value5532if (value === undefined) {5533value = getPropDefaultValue(vm, prop, key);5534// since the default value is a fresh copy,5535// make sure to observe it.5536var prevShouldObserve = shouldObserve;5537toggleObserving(true);5538observe(value);5539toggleObserving(prevShouldObserve);5540}5541{5542assertProp(prop, key, value, vm, absent);5543}5544return value;5545}5546/**5547* Get the default value of a prop.
5548*/
5549function getPropDefaultValue(vm, prop, key) {5550// no default, return undefined5551if (!hasOwn(prop, 'default')) {5552return undefined;5553}5554var def = prop.default;5555// warn against non-factory defaults for Object & Array5556if (isObject(def)) {5557warn$2('Invalid default value for prop "' +5558key +5559'": ' +5560'Props with type Object/Array must use a factory function ' +5561'to return the default value.', vm);5562}5563// the raw prop value was also undefined from previous render,5564// return previous default value to avoid unnecessary watcher trigger5565if (vm &&5566vm.$options.propsData &&5567vm.$options.propsData[key] === undefined &&5568vm._props[key] !== undefined) {5569return vm._props[key];5570}5571// call factory function for non-Function types5572// a value is Function if its prototype is function even across different execution context5573return isFunction(def) && getType(prop.type) !== 'Function'5574? def.call(vm)5575: def;5576}5577/**5578* Assert whether a prop is valid.
5579*/
5580function assertProp(prop, name, value, vm, absent) {5581if (prop.required && absent) {5582warn$2('Missing required prop: "' + name + '"', vm);5583return;5584}5585if (value == null && !prop.required) {5586return;5587}5588var type = prop.type;5589var valid = !type || type === true;5590var expectedTypes = [];5591if (type) {5592if (!isArray(type)) {5593type = [type];5594}5595for (var i = 0; i < type.length && !valid; i++) {5596var assertedType = assertType(value, type[i], vm);5597expectedTypes.push(assertedType.expectedType || '');5598valid = assertedType.valid;5599}5600}5601var haveExpectedTypes = expectedTypes.some(function (t) { return t; });5602if (!valid && haveExpectedTypes) {5603warn$2(getInvalidTypeMessage(name, value, expectedTypes), vm);5604return;5605}5606var validator = prop.validator;5607if (validator) {5608if (!validator(value)) {5609warn$2('Invalid prop: custom validator check failed for prop "' + name + '".', vm);5610}5611}5612}5613var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/;5614function assertType(value, type, vm) {5615var valid;5616var expectedType = getType(type);5617if (simpleCheckRE.test(expectedType)) {5618var t = typeof value;5619valid = t === expectedType.toLowerCase();5620// for primitive wrapper objects5621if (!valid && t === 'object') {5622valid = value instanceof type;5623}5624}5625else if (expectedType === 'Object') {5626valid = isPlainObject(value);5627}5628else if (expectedType === 'Array') {5629valid = isArray(value);5630}5631else {5632try {5633valid = value instanceof type;5634}5635catch (e) {5636warn$2('Invalid prop type: "' + String(type) + '" is not a constructor', vm);5637valid = false;5638}5639}5640return {5641valid: valid,5642expectedType: expectedType5643};5644}5645var functionTypeCheckRE = /^\s*function (\w+)/;5646/**5647* Use function string name to check built-in types,
5648* because a simple equality check will fail when running
5649* across different vms / iframes.
5650*/
5651function getType(fn) {5652var match = fn && fn.toString().match(functionTypeCheckRE);5653return match ? match[1] : '';5654}5655function isSameType(a, b) {5656return getType(a) === getType(b);5657}5658function getTypeIndex(type, expectedTypes) {5659if (!isArray(expectedTypes)) {5660return isSameType(expectedTypes, type) ? 0 : -1;5661}5662for (var i = 0, len = expectedTypes.length; i < len; i++) {5663if (isSameType(expectedTypes[i], type)) {5664return i;5665}5666}5667return -1;5668}5669function getInvalidTypeMessage(name, value, expectedTypes) {5670var message = "Invalid prop: type check failed for prop \"".concat(name, "\".") +5671" Expected ".concat(expectedTypes.map(capitalize).join(', '));5672var expectedType = expectedTypes[0];5673var receivedType = toRawType(value);5674// check if we need to specify expected value5675if (expectedTypes.length === 1 &&5676isExplicable(expectedType) &&5677isExplicable(typeof value) &&5678!isBoolean(expectedType, receivedType)) {5679message += " with value ".concat(styleValue(value, expectedType));5680}5681message += ", got ".concat(receivedType, " ");5682// check if we need to specify received value5683if (isExplicable(receivedType)) {5684message += "with value ".concat(styleValue(value, receivedType), ".");5685}5686return message;5687}5688function styleValue(value, type) {5689if (type === 'String') {5690return "\"".concat(value, "\"");5691}5692else if (type === 'Number') {5693return "".concat(Number(value));5694}5695else {5696return "".concat(value);5697}5698}5699var EXPLICABLE_TYPES = ['string', 'number', 'boolean'];5700function isExplicable(value) {5701return EXPLICABLE_TYPES.some(function (elem) { return value.toLowerCase() === elem; });5702}5703function isBoolean() {5704var args = [];5705for (var _i = 0; _i < arguments.length; _i++) {5706args[_i] = arguments[_i];5707}5708return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; });5709}5710
5711function Vue(options) {5712if (!(this instanceof Vue)) {5713warn$2('Vue is a constructor and should be called with the `new` keyword');5714}5715this._init(options);5716}5717//@ts-expect-error Vue has function type5718initMixin$1(Vue);5719//@ts-expect-error Vue has function type5720stateMixin(Vue);5721//@ts-expect-error Vue has function type5722eventsMixin(Vue);5723//@ts-expect-error Vue has function type5724lifecycleMixin(Vue);5725//@ts-expect-error Vue has function type5726renderMixin(Vue);5727
5728function initUse(Vue) {5729Vue.use = function (plugin) {5730var installedPlugins = this._installedPlugins || (this._installedPlugins = []);5731if (installedPlugins.indexOf(plugin) > -1) {5732return this;5733}5734// additional parameters5735var args = toArray(arguments, 1);5736args.unshift(this);5737if (isFunction(plugin.install)) {5738plugin.install.apply(plugin, args);5739}5740else if (isFunction(plugin)) {5741plugin.apply(null, args);5742}5743installedPlugins.push(plugin);5744return this;5745};5746}5747
5748function initMixin(Vue) {5749Vue.mixin = function (mixin) {5750this.options = mergeOptions(this.options, mixin);5751return this;5752};5753}5754
5755function initExtend(Vue) {5756/**5757* Each instance constructor, including Vue, has a unique
5758* cid. This enables us to create wrapped "child
5759* constructors" for prototypal inheritance and cache them.
5760*/
5761Vue.cid = 0;5762var cid = 1;5763/**5764* Class inheritance
5765*/
5766Vue.extend = function (extendOptions) {5767extendOptions = extendOptions || {};5768var Super = this;5769var SuperId = Super.cid;5770var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});5771if (cachedCtors[SuperId]) {5772return cachedCtors[SuperId];5773}5774var name = getComponentName(extendOptions) || getComponentName(Super.options);5775if (name) {5776validateComponentName(name);5777}5778var Sub = function VueComponent(options) {5779this._init(options);5780};5781Sub.prototype = Object.create(Super.prototype);5782Sub.prototype.constructor = Sub;5783Sub.cid = cid++;5784Sub.options = mergeOptions(Super.options, extendOptions);5785Sub['super'] = Super;5786// For props and computed properties, we define the proxy getters on5787// the Vue instances at extension time, on the extended prototype. This5788// avoids Object.defineProperty calls for each instance created.5789if (Sub.options.props) {5790initProps(Sub);5791}5792if (Sub.options.computed) {5793initComputed(Sub);5794}5795// allow further extension/mixin/plugin usage5796Sub.extend = Super.extend;5797Sub.mixin = Super.mixin;5798Sub.use = Super.use;5799// create asset registers, so extended classes5800// can have their private assets too.5801ASSET_TYPES.forEach(function (type) {5802Sub[type] = Super[type];5803});5804// enable recursive self-lookup5805if (name) {5806Sub.options.components[name] = Sub;5807}5808// keep a reference to the super options at extension time.5809// later at instantiation we can check if Super's options have5810// been updated.5811Sub.superOptions = Super.options;5812Sub.extendOptions = extendOptions;5813Sub.sealedOptions = extend({}, Sub.options);5814// cache constructor5815cachedCtors[SuperId] = Sub;5816return Sub;5817};5818}5819function initProps(Comp) {5820var props = Comp.options.props;5821for (var key in props) {5822proxy(Comp.prototype, "_props", key);5823}5824}5825function initComputed(Comp) {5826var computed = Comp.options.computed;5827for (var key in computed) {5828defineComputed(Comp.prototype, key, computed[key]);5829}5830}5831
5832function initAssetRegisters(Vue) {5833/**5834* Create asset registration methods.
5835*/
5836ASSET_TYPES.forEach(function (type) {5837// @ts-expect-error function is not exact same type5838Vue[type] = function (id, definition) {5839if (!definition) {5840return this.options[type + 's'][id];5841}5842else {5843/* istanbul ignore if */5844if (type === 'component') {5845validateComponentName(id);5846}5847if (type === 'component' && isPlainObject(definition)) {5848// @ts-expect-error5849definition.name = definition.name || id;5850definition = this.options._base.extend(definition);5851}5852if (type === 'directive' && isFunction(definition)) {5853definition = { bind: definition, update: definition };5854}5855this.options[type + 's'][id] = definition;5856return definition;5857}5858};5859});5860}5861
5862function _getComponentName(opts) {5863return opts && (getComponentName(opts.Ctor.options) || opts.tag);5864}5865function matches(pattern, name) {5866if (isArray(pattern)) {5867return pattern.indexOf(name) > -1;5868}5869else if (typeof pattern === 'string') {5870return pattern.split(',').indexOf(name) > -1;5871}5872else if (isRegExp(pattern)) {5873return pattern.test(name);5874}5875/* istanbul ignore next */5876return false;5877}5878function pruneCache(keepAliveInstance, filter) {5879var cache = keepAliveInstance.cache, keys = keepAliveInstance.keys, _vnode = keepAliveInstance._vnode;5880for (var key in cache) {5881var entry = cache[key];5882if (entry) {5883var name_1 = entry.name;5884if (name_1 && !filter(name_1)) {5885pruneCacheEntry(cache, key, keys, _vnode);5886}5887}5888}5889}5890function pruneCacheEntry(cache, key, keys, current) {5891var entry = cache[key];5892if (entry && (!current || entry.tag !== current.tag)) {5893// @ts-expect-error can be undefined5894entry.componentInstance.$destroy();5895}5896cache[key] = null;5897remove$2(keys, key);5898}5899var patternTypes = [String, RegExp, Array];5900// TODO defineComponent5901var KeepAlive = {5902name: 'keep-alive',5903abstract: true,5904props: {5905include: patternTypes,5906exclude: patternTypes,5907max: [String, Number]5908},5909methods: {5910cacheVNode: function () {5911var _a = this, cache = _a.cache, keys = _a.keys, vnodeToCache = _a.vnodeToCache, keyToCache = _a.keyToCache;5912if (vnodeToCache) {5913var tag = vnodeToCache.tag, componentInstance = vnodeToCache.componentInstance, componentOptions = vnodeToCache.componentOptions;5914cache[keyToCache] = {5915name: _getComponentName(componentOptions),5916tag: tag,5917componentInstance: componentInstance5918};5919keys.push(keyToCache);5920// prune oldest entry5921if (this.max && keys.length > parseInt(this.max)) {5922pruneCacheEntry(cache, keys[0], keys, this._vnode);5923}5924this.vnodeToCache = null;5925}5926}5927},5928created: function () {5929this.cache = Object.create(null);5930this.keys = [];5931},5932destroyed: function () {5933for (var key in this.cache) {5934pruneCacheEntry(this.cache, key, this.keys);5935}5936},5937mounted: function () {5938var _this = this;5939this.cacheVNode();5940this.$watch('include', function (val) {5941pruneCache(_this, function (name) { return matches(val, name); });5942});5943this.$watch('exclude', function (val) {5944pruneCache(_this, function (name) { return !matches(val, name); });5945});5946},5947updated: function () {5948this.cacheVNode();5949},5950render: function () {5951var slot = this.$slots.default;5952var vnode = getFirstComponentChild(slot);5953var componentOptions = vnode && vnode.componentOptions;5954if (componentOptions) {5955// check pattern5956var name_2 = _getComponentName(componentOptions);5957var _a = this, include = _a.include, exclude = _a.exclude;5958if (5959// not included5960(include && (!name_2 || !matches(include, name_2))) ||5961// excluded5962(exclude && name_2 && matches(exclude, name_2))) {5963return vnode;5964}5965var _b = this, cache = _b.cache, keys = _b.keys;5966var key = vnode.key == null5967? // same constructor may get registered as different local components5968// so cid alone is not enough (#3269)5969componentOptions.Ctor.cid +5970(componentOptions.tag ? "::".concat(componentOptions.tag) : '')5971: vnode.key;5972if (cache[key]) {5973vnode.componentInstance = cache[key].componentInstance;5974// make current key freshest5975remove$2(keys, key);5976keys.push(key);5977}5978else {5979// delay setting the cache until update5980this.vnodeToCache = vnode;5981this.keyToCache = key;5982}5983// @ts-expect-error can vnode.data can be undefined5984vnode.data.keepAlive = true;5985}5986return vnode || (slot && slot[0]);5987}5988};5989
5990var builtInComponents = {5991KeepAlive: KeepAlive5992};5993
5994function initGlobalAPI(Vue) {5995// config5996var configDef = {};5997configDef.get = function () { return config; };5998{5999configDef.set = function () {6000warn$2('Do not replace the Vue.config object, set individual fields instead.');6001};6002}6003Object.defineProperty(Vue, 'config', configDef);6004// exposed util methods.6005// NOTE: these are not considered part of the public API - avoid relying on6006// them unless you are aware of the risk.6007Vue.util = {6008warn: warn$2,6009extend: extend,6010mergeOptions: mergeOptions,6011defineReactive: defineReactive6012};6013Vue.set = set;6014Vue.delete = del;6015Vue.nextTick = nextTick;6016// 2.6 explicit observable API6017Vue.observable = function (obj) {6018observe(obj);6019return obj;6020};6021Vue.options = Object.create(null);6022ASSET_TYPES.forEach(function (type) {6023Vue.options[type + 's'] = Object.create(null);6024});6025// this is used to identify the "base" constructor to extend all plain-object6026// components with in Weex's multi-instance scenarios.6027Vue.options._base = Vue;6028extend(Vue.options.components, builtInComponents);6029initUse(Vue);6030initMixin(Vue);6031initExtend(Vue);6032initAssetRegisters(Vue);6033}6034
6035initGlobalAPI(Vue);6036Object.defineProperty(Vue.prototype, '$isServer', {6037get: isServerRendering6038});6039Object.defineProperty(Vue.prototype, '$ssrContext', {6040get: function () {6041/* istanbul ignore next */6042return this.$vnode && this.$vnode.ssrContext;6043}6044});6045// expose FunctionalRenderContext for ssr runtime helper installation6046Object.defineProperty(Vue, 'FunctionalRenderContext', {6047value: FunctionalRenderContext6048});6049Vue.version = version;6050
6051// these are reserved for web because they are directly compiled away6052// during template compilation6053var isReservedAttr = makeMap('style,class');6054// attributes that should be using props for binding6055var acceptValue = makeMap('input,textarea,option,select,progress');6056var mustUseProp = function (tag, type, attr) {6057return ((attr === 'value' && acceptValue(tag) && type !== 'button') ||6058(attr === 'selected' && tag === 'option') ||6059(attr === 'checked' && tag === 'input') ||6060(attr === 'muted' && tag === 'video'));6061};6062var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');6063var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');6064var convertEnumeratedValue = function (key, value) {6065return isFalsyAttrValue(value) || value === 'false'6066? 'false'6067: // allow arbitrary string value for contenteditable6068key === 'contenteditable' && isValidContentEditableValue(value)6069? value6070: 'true';6071};6072var isBooleanAttr = makeMap('allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +6073'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +6074'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +6075'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +6076'required,reversed,scoped,seamless,selected,sortable,' +6077'truespeed,typemustmatch,visible');6078var xlinkNS = 'http://www.w3.org/1999/xlink';6079var isXlink = function (name) {6080return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink';6081};6082var getXlinkProp = function (name) {6083return isXlink(name) ? name.slice(6, name.length) : '';6084};6085var isFalsyAttrValue = function (val) {6086return val == null || val === false;6087};6088
6089function genClassForVnode(vnode) {6090var data = vnode.data;6091var parentNode = vnode;6092var childNode = vnode;6093while (isDef(childNode.componentInstance)) {6094childNode = childNode.componentInstance._vnode;6095if (childNode && childNode.data) {6096data = mergeClassData(childNode.data, data);6097}6098}6099// @ts-expect-error parentNode.parent not VNodeWithData6100while (isDef((parentNode = parentNode.parent))) {6101if (parentNode && parentNode.data) {6102data = mergeClassData(data, parentNode.data);6103}6104}6105return renderClass(data.staticClass, data.class);6106}6107function mergeClassData(child, parent) {6108return {6109staticClass: concat(child.staticClass, parent.staticClass),6110class: isDef(child.class) ? [child.class, parent.class] : parent.class6111};6112}6113function renderClass(staticClass, dynamicClass) {6114if (isDef(staticClass) || isDef(dynamicClass)) {6115return concat(staticClass, stringifyClass(dynamicClass));6116}6117/* istanbul ignore next */6118return '';6119}6120function concat(a, b) {6121return a ? (b ? a + ' ' + b : a) : b || '';6122}6123function stringifyClass(value) {6124if (Array.isArray(value)) {6125return stringifyArray(value);6126}6127if (isObject(value)) {6128return stringifyObject(value);6129}6130if (typeof value === 'string') {6131return value;6132}6133/* istanbul ignore next */6134return '';6135}6136function stringifyArray(value) {6137var res = '';6138var stringified;6139for (var i = 0, l = value.length; i < l; i++) {6140if (isDef((stringified = stringifyClass(value[i]))) && stringified !== '') {6141if (res)6142res += ' ';6143res += stringified;6144}6145}6146return res;6147}6148function stringifyObject(value) {6149var res = '';6150for (var key in value) {6151if (value[key]) {6152if (res)6153res += ' ';6154res += key;6155}6156}6157return res;6158}6159
6160var namespaceMap = {6161svg: 'http://www.w3.org/2000/svg',6162math: 'http://www.w3.org/1998/Math/MathML'6163};6164var isHTMLTag = makeMap('html,body,base,head,link,meta,style,title,' +6165'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +6166'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +6167'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +6168's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +6169'embed,object,param,source,canvas,script,noscript,del,ins,' +6170'caption,col,colgroup,table,thead,tbody,td,th,tr,' +6171'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +6172'output,progress,select,textarea,' +6173'details,dialog,menu,menuitem,summary,' +6174'content,element,shadow,template,blockquote,iframe,tfoot');6175// this map is intentionally selective, only covering SVG elements that may6176// contain child elements.6177var isSVG = makeMap('svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +6178'foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +6179'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', true);6180var isPreTag = function (tag) { return tag === 'pre'; };6181var isReservedTag = function (tag) {6182return isHTMLTag(tag) || isSVG(tag);6183};6184function getTagNamespace(tag) {6185if (isSVG(tag)) {6186return 'svg';6187}6188// basic support for MathML6189// note it doesn't support other MathML elements being component roots6190if (tag === 'math') {6191return 'math';6192}6193}6194var unknownElementCache = Object.create(null);6195function isUnknownElement(tag) {6196/* istanbul ignore if */6197if (!inBrowser) {6198return true;6199}6200if (isReservedTag(tag)) {6201return false;6202}6203tag = tag.toLowerCase();6204/* istanbul ignore if */6205if (unknownElementCache[tag] != null) {6206return unknownElementCache[tag];6207}6208var el = document.createElement(tag);6209if (tag.indexOf('-') > -1) {6210// http://stackoverflow.com/a/28210364/10702446211return (unknownElementCache[tag] =6212el.constructor === window.HTMLUnknownElement ||6213el.constructor === window.HTMLElement);6214}6215else {6216return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()));6217}6218}6219var isTextInputType = makeMap('text,number,password,search,email,tel,url');6220
6221/**6222* Query an element selector if it's not an element already.
6223*/
6224function query(el) {6225if (typeof el === 'string') {6226var selected = document.querySelector(el);6227if (!selected) {6228warn$2('Cannot find element: ' + el);6229return document.createElement('div');6230}6231return selected;6232}6233else {6234return el;6235}6236}6237
6238function createElement(tagName, vnode) {6239var elm = document.createElement(tagName);6240if (tagName !== 'select') {6241return elm;6242}6243// false or null will remove the attribute but undefined will not6244if (vnode.data &&6245vnode.data.attrs &&6246vnode.data.attrs.multiple !== undefined) {6247elm.setAttribute('multiple', 'multiple');6248}6249return elm;6250}6251function createElementNS(namespace, tagName) {6252return document.createElementNS(namespaceMap[namespace], tagName);6253}6254function createTextNode(text) {6255return document.createTextNode(text);6256}6257function createComment(text) {6258return document.createComment(text);6259}6260function insertBefore(parentNode, newNode, referenceNode) {6261parentNode.insertBefore(newNode, referenceNode);6262}6263function removeChild(node, child) {6264node.removeChild(child);6265}6266function appendChild(node, child) {6267node.appendChild(child);6268}6269function parentNode(node) {6270return node.parentNode;6271}6272function nextSibling(node) {6273return node.nextSibling;6274}6275function tagName(node) {6276return node.tagName;6277}6278function setTextContent(node, text) {6279node.textContent = text;6280}6281function setStyleScope(node, scopeId) {6282node.setAttribute(scopeId, '');6283}6284
6285var nodeOps = /*#__PURE__*/Object.freeze({6286__proto__: null,6287createElement: createElement,6288createElementNS: createElementNS,6289createTextNode: createTextNode,6290createComment: createComment,6291insertBefore: insertBefore,6292removeChild: removeChild,6293appendChild: appendChild,6294parentNode: parentNode,6295nextSibling: nextSibling,6296tagName: tagName,6297setTextContent: setTextContent,6298setStyleScope: setStyleScope6299});6300
6301var ref = {6302create: function (_, vnode) {6303registerRef(vnode);6304},6305update: function (oldVnode, vnode) {6306if (oldVnode.data.ref !== vnode.data.ref) {6307registerRef(oldVnode, true);6308registerRef(vnode);6309}6310},6311destroy: function (vnode) {6312registerRef(vnode, true);6313}6314};6315function registerRef(vnode, isRemoval) {6316var ref = vnode.data.ref;6317if (!isDef(ref))6318return;6319var vm = vnode.context;6320var refValue = vnode.componentInstance || vnode.elm;6321var value = isRemoval ? null : refValue;6322var $refsValue = isRemoval ? undefined : refValue;6323if (isFunction(ref)) {6324invokeWithErrorHandling(ref, vm, [value], vm, "template ref function");6325return;6326}6327var isFor = vnode.data.refInFor;6328var _isString = typeof ref === 'string' || typeof ref === 'number';6329var _isRef = isRef(ref);6330var refs = vm.$refs;6331if (_isString || _isRef) {6332if (isFor) {6333var existing = _isString ? refs[ref] : ref.value;6334if (isRemoval) {6335isArray(existing) && remove$2(existing, refValue);6336}6337else {6338if (!isArray(existing)) {6339if (_isString) {6340refs[ref] = [refValue];6341setSetupRef(vm, ref, refs[ref]);6342}6343else {6344ref.value = [refValue];6345}6346}6347else if (!existing.includes(refValue)) {6348existing.push(refValue);6349}6350}6351}6352else if (_isString) {6353if (isRemoval && refs[ref] !== refValue) {6354return;6355}6356refs[ref] = $refsValue;6357setSetupRef(vm, ref, value);6358}6359else if (_isRef) {6360if (isRemoval && ref.value !== refValue) {6361return;6362}6363ref.value = value;6364}6365else {6366warn$2("Invalid template ref type: ".concat(typeof ref));6367}6368}6369}6370function setSetupRef(_a, key, val) {6371var _setupState = _a._setupState;6372if (_setupState && hasOwn(_setupState, key)) {6373if (isRef(_setupState[key])) {6374_setupState[key].value = val;6375}6376else {6377_setupState[key] = val;6378}6379}6380}6381
6382/**6383* Virtual DOM patching algorithm based on Snabbdom by
6384* Simon Friis Vindum (@paldepind)
6385* Licensed under the MIT License
6386* https://github.com/paldepind/snabbdom/blob/master/LICENSE
6387*
6388* modified by Evan You (@yyx990803)
6389*
6390* Not type-checking this because this file is perf-critical and the cost
6391* of making flow understand it is not worth it.
6392*/
6393var emptyNode = new VNode('', {}, []);6394var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];6395function sameVnode(a, b) {6396return (a.key === b.key &&6397a.asyncFactory === b.asyncFactory &&6398((a.tag === b.tag &&6399a.isComment === b.isComment &&6400isDef(a.data) === isDef(b.data) &&6401sameInputType(a, b)) ||6402(isTrue(a.isAsyncPlaceholder) && isUndef(b.asyncFactory.error))));6403}6404function sameInputType(a, b) {6405if (a.tag !== 'input')6406return true;6407var i;6408var typeA = isDef((i = a.data)) && isDef((i = i.attrs)) && i.type;6409var typeB = isDef((i = b.data)) && isDef((i = i.attrs)) && i.type;6410return typeA === typeB || (isTextInputType(typeA) && isTextInputType(typeB));6411}6412function createKeyToOldIdx(children, beginIdx, endIdx) {6413var i, key;6414var map = {};6415for (i = beginIdx; i <= endIdx; ++i) {6416key = children[i].key;6417if (isDef(key))6418map[key] = i;6419}6420return map;6421}6422function createPatchFunction(backend) {6423var i, j;6424var cbs = {};6425var modules = backend.modules, nodeOps = backend.nodeOps;6426for (i = 0; i < hooks.length; ++i) {6427cbs[hooks[i]] = [];6428for (j = 0; j < modules.length; ++j) {6429if (isDef(modules[j][hooks[i]])) {6430cbs[hooks[i]].push(modules[j][hooks[i]]);6431}6432}6433}6434function emptyNodeAt(elm) {6435return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm);6436}6437function createRmCb(childElm, listeners) {6438function remove() {6439if (--remove.listeners === 0) {6440removeNode(childElm);6441}6442}6443remove.listeners = listeners;6444return remove;6445}6446function removeNode(el) {6447var parent = nodeOps.parentNode(el);6448// element may have already been removed due to v-html / v-text6449if (isDef(parent)) {6450nodeOps.removeChild(parent, el);6451}6452}6453function isUnknownElement(vnode, inVPre) {6454return (!inVPre &&6455!vnode.ns &&6456!(config.ignoredElements.length &&6457config.ignoredElements.some(function (ignore) {6458return isRegExp(ignore)6459? ignore.test(vnode.tag)6460: ignore === vnode.tag;6461})) &&6462config.isUnknownElement(vnode.tag));6463}6464var creatingElmInVPre = 0;6465function createElm(vnode, insertedVnodeQueue, parentElm, refElm, nested, ownerArray, index) {6466if (isDef(vnode.elm) && isDef(ownerArray)) {6467// This vnode was used in a previous render!6468// now it's used as a new node, overwriting its elm would cause6469// potential patch errors down the road when it's used as an insertion6470// reference node. Instead, we clone the node on-demand before creating6471// associated DOM element for it.6472vnode = ownerArray[index] = cloneVNode(vnode);6473}6474vnode.isRootInsert = !nested; // for transition enter check6475if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {6476return;6477}6478var data = vnode.data;6479var children = vnode.children;6480var tag = vnode.tag;6481if (isDef(tag)) {6482{6483if (data && data.pre) {6484creatingElmInVPre++;6485}6486if (isUnknownElement(vnode, creatingElmInVPre)) {6487warn$2('Unknown custom element: <' +6488tag +6489'> - did you ' +6490'register the component correctly? For recursive components, ' +6491'make sure to provide the "name" option.', vnode.context);6492}6493}6494vnode.elm = vnode.ns6495? nodeOps.createElementNS(vnode.ns, tag)6496: nodeOps.createElement(tag, vnode);6497setScope(vnode);6498createChildren(vnode, children, insertedVnodeQueue);6499if (isDef(data)) {6500invokeCreateHooks(vnode, insertedVnodeQueue);6501}6502insert(parentElm, vnode.elm, refElm);6503if (data && data.pre) {6504creatingElmInVPre--;6505}6506}6507else if (isTrue(vnode.isComment)) {6508vnode.elm = nodeOps.createComment(vnode.text);6509insert(parentElm, vnode.elm, refElm);6510}6511else {6512vnode.elm = nodeOps.createTextNode(vnode.text);6513insert(parentElm, vnode.elm, refElm);6514}6515}6516function createComponent(vnode, insertedVnodeQueue, parentElm, refElm) {6517var i = vnode.data;6518if (isDef(i)) {6519var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;6520if (isDef((i = i.hook)) && isDef((i = i.init))) {6521i(vnode, false /* hydrating */);6522}6523// after calling the init hook, if the vnode is a child component6524// it should've created a child instance and mounted it. the child6525// component also has set the placeholder vnode's elm.6526// in that case we can just return the element and be done.6527if (isDef(vnode.componentInstance)) {6528initComponent(vnode, insertedVnodeQueue);6529insert(parentElm, vnode.elm, refElm);6530if (isTrue(isReactivated)) {6531reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);6532}6533return true;6534}6535}6536}6537function initComponent(vnode, insertedVnodeQueue) {6538if (isDef(vnode.data.pendingInsert)) {6539insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);6540vnode.data.pendingInsert = null;6541}6542vnode.elm = vnode.componentInstance.$el;6543if (isPatchable(vnode)) {6544invokeCreateHooks(vnode, insertedVnodeQueue);6545setScope(vnode);6546}6547else {6548// empty component root.6549// skip all element-related modules except for ref (#3455)6550registerRef(vnode);6551// make sure to invoke the insert hook6552insertedVnodeQueue.push(vnode);6553}6554}6555function reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm) {6556var i;6557// hack for #4339: a reactivated component with inner transition6558// does not trigger because the inner node's created hooks are not called6559// again. It's not ideal to involve module-specific logic in here but6560// there doesn't seem to be a better way to do it.6561var innerNode = vnode;6562while (innerNode.componentInstance) {6563innerNode = innerNode.componentInstance._vnode;6564if (isDef((i = innerNode.data)) && isDef((i = i.transition))) {6565for (i = 0; i < cbs.activate.length; ++i) {6566cbs.activate[i](emptyNode, innerNode);6567}6568insertedVnodeQueue.push(innerNode);6569break;6570}6571}6572// unlike a newly created component,6573// a reactivated keep-alive component doesn't insert itself6574insert(parentElm, vnode.elm, refElm);6575}6576function insert(parent, elm, ref) {6577if (isDef(parent)) {6578if (isDef(ref)) {6579if (nodeOps.parentNode(ref) === parent) {6580nodeOps.insertBefore(parent, elm, ref);6581}6582}6583else {6584nodeOps.appendChild(parent, elm);6585}6586}6587}6588function createChildren(vnode, children, insertedVnodeQueue) {6589if (isArray(children)) {6590{6591checkDuplicateKeys(children);6592}6593for (var i_1 = 0; i_1 < children.length; ++i_1) {6594createElm(children[i_1], insertedVnodeQueue, vnode.elm, null, true, children, i_1);6595}6596}6597else if (isPrimitive(vnode.text)) {6598nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));6599}6600}6601function isPatchable(vnode) {6602while (vnode.componentInstance) {6603vnode = vnode.componentInstance._vnode;6604}6605return isDef(vnode.tag);6606}6607function invokeCreateHooks(vnode, insertedVnodeQueue) {6608for (var i_2 = 0; i_2 < cbs.create.length; ++i_2) {6609cbs.create[i_2](emptyNode, vnode);6610}6611i = vnode.data.hook; // Reuse variable6612if (isDef(i)) {6613if (isDef(i.create))6614i.create(emptyNode, vnode);6615if (isDef(i.insert))6616insertedVnodeQueue.push(vnode);6617}6618}6619// set scope id attribute for scoped CSS.6620// this is implemented as a special case to avoid the overhead6621// of going through the normal attribute patching process.6622function setScope(vnode) {6623var i;6624if (isDef((i = vnode.fnScopeId))) {6625nodeOps.setStyleScope(vnode.elm, i);6626}6627else {6628var ancestor = vnode;6629while (ancestor) {6630if (isDef((i = ancestor.context)) && isDef((i = i.$options._scopeId))) {6631nodeOps.setStyleScope(vnode.elm, i);6632}6633ancestor = ancestor.parent;6634}6635}6636// for slot content they should also get the scopeId from the host instance.6637if (isDef((i = activeInstance)) &&6638i !== vnode.context &&6639i !== vnode.fnContext &&6640isDef((i = i.$options._scopeId))) {6641nodeOps.setStyleScope(vnode.elm, i);6642}6643}6644function addVnodes(parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {6645for (; startIdx <= endIdx; ++startIdx) {6646createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);6647}6648}6649function invokeDestroyHook(vnode) {6650var i, j;6651var data = vnode.data;6652if (isDef(data)) {6653if (isDef((i = data.hook)) && isDef((i = i.destroy)))6654i(vnode);6655for (i = 0; i < cbs.destroy.length; ++i)6656cbs.destroy[i](vnode);6657}6658if (isDef((i = vnode.children))) {6659for (j = 0; j < vnode.children.length; ++j) {6660invokeDestroyHook(vnode.children[j]);6661}6662}6663}6664function removeVnodes(vnodes, startIdx, endIdx) {6665for (; startIdx <= endIdx; ++startIdx) {6666var ch = vnodes[startIdx];6667if (isDef(ch)) {6668if (isDef(ch.tag)) {6669removeAndInvokeRemoveHook(ch);6670invokeDestroyHook(ch);6671}6672else {6673// Text node6674removeNode(ch.elm);6675}6676}6677}6678}6679function removeAndInvokeRemoveHook(vnode, rm) {6680if (isDef(rm) || isDef(vnode.data)) {6681var i_3;6682var listeners = cbs.remove.length + 1;6683if (isDef(rm)) {6684// we have a recursively passed down rm callback6685// increase the listeners count6686rm.listeners += listeners;6687}6688else {6689// directly removing6690rm = createRmCb(vnode.elm, listeners);6691}6692// recursively invoke hooks on child component root node6693if (isDef((i_3 = vnode.componentInstance)) &&6694isDef((i_3 = i_3._vnode)) &&6695isDef(i_3.data)) {6696removeAndInvokeRemoveHook(i_3, rm);6697}6698for (i_3 = 0; i_3 < cbs.remove.length; ++i_3) {6699cbs.remove[i_3](vnode, rm);6700}6701if (isDef((i_3 = vnode.data.hook)) && isDef((i_3 = i_3.remove))) {6702i_3(vnode, rm);6703}6704else {6705rm();6706}6707}6708else {6709removeNode(vnode.elm);6710}6711}6712function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {6713var oldStartIdx = 0;6714var newStartIdx = 0;6715var oldEndIdx = oldCh.length - 1;6716var oldStartVnode = oldCh[0];6717var oldEndVnode = oldCh[oldEndIdx];6718var newEndIdx = newCh.length - 1;6719var newStartVnode = newCh[0];6720var newEndVnode = newCh[newEndIdx];6721var oldKeyToIdx, idxInOld, vnodeToMove, refElm;6722// removeOnly is a special flag used only by <transition-group>6723// to ensure removed elements stay in correct relative positions6724// during leaving transitions6725var canMove = !removeOnly;6726{6727checkDuplicateKeys(newCh);6728}6729while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {6730if (isUndef(oldStartVnode)) {6731oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left6732}6733else if (isUndef(oldEndVnode)) {6734oldEndVnode = oldCh[--oldEndIdx];6735}6736else if (sameVnode(oldStartVnode, newStartVnode)) {6737patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);6738oldStartVnode = oldCh[++oldStartIdx];6739newStartVnode = newCh[++newStartIdx];6740}6741else if (sameVnode(oldEndVnode, newEndVnode)) {6742patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);6743oldEndVnode = oldCh[--oldEndIdx];6744newEndVnode = newCh[--newEndIdx];6745}6746else if (sameVnode(oldStartVnode, newEndVnode)) {6747// Vnode moved right6748patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);6749canMove &&6750nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));6751oldStartVnode = oldCh[++oldStartIdx];6752newEndVnode = newCh[--newEndIdx];6753}6754else if (sameVnode(oldEndVnode, newStartVnode)) {6755// Vnode moved left6756patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);6757canMove &&6758nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);6759oldEndVnode = oldCh[--oldEndIdx];6760newStartVnode = newCh[++newStartIdx];6761}6762else {6763if (isUndef(oldKeyToIdx))6764oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);6765idxInOld = isDef(newStartVnode.key)6766? oldKeyToIdx[newStartVnode.key]6767: findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);6768if (isUndef(idxInOld)) {6769// New element6770createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);6771}6772else {6773vnodeToMove = oldCh[idxInOld];6774if (sameVnode(vnodeToMove, newStartVnode)) {6775patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);6776oldCh[idxInOld] = undefined;6777canMove &&6778nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);6779}6780else {6781// same key but different element. treat as new element6782createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);6783}6784}6785newStartVnode = newCh[++newStartIdx];6786}6787}6788if (oldStartIdx > oldEndIdx) {6789refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;6790addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);6791}6792else if (newStartIdx > newEndIdx) {6793removeVnodes(oldCh, oldStartIdx, oldEndIdx);6794}6795}6796function checkDuplicateKeys(children) {6797var seenKeys = {};6798for (var i_4 = 0; i_4 < children.length; i_4++) {6799var vnode = children[i_4];6800var key = vnode.key;6801if (isDef(key)) {6802if (seenKeys[key]) {6803warn$2("Duplicate keys detected: '".concat(key, "'. This may cause an update error."), vnode.context);6804}6805else {6806seenKeys[key] = true;6807}6808}6809}6810}6811function findIdxInOld(node, oldCh, start, end) {6812for (var i_5 = start; i_5 < end; i_5++) {6813var c = oldCh[i_5];6814if (isDef(c) && sameVnode(node, c))6815return i_5;6816}6817}6818function patchVnode(oldVnode, vnode, insertedVnodeQueue, ownerArray, index, removeOnly) {6819if (oldVnode === vnode) {6820return;6821}6822if (isDef(vnode.elm) && isDef(ownerArray)) {6823// clone reused vnode6824vnode = ownerArray[index] = cloneVNode(vnode);6825}6826var elm = (vnode.elm = oldVnode.elm);6827if (isTrue(oldVnode.isAsyncPlaceholder)) {6828if (isDef(vnode.asyncFactory.resolved)) {6829hydrate(oldVnode.elm, vnode, insertedVnodeQueue);6830}6831else {6832vnode.isAsyncPlaceholder = true;6833}6834return;6835}6836// reuse element for static trees.6837// note we only do this if the vnode is cloned -6838// if the new node is not cloned it means the render functions have been6839// reset by the hot-reload-api and we need to do a proper re-render.6840if (isTrue(vnode.isStatic) &&6841isTrue(oldVnode.isStatic) &&6842vnode.key === oldVnode.key &&6843(isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) {6844vnode.componentInstance = oldVnode.componentInstance;6845return;6846}6847var i;6848var data = vnode.data;6849if (isDef(data) && isDef((i = data.hook)) && isDef((i = i.prepatch))) {6850i(oldVnode, vnode);6851}6852var oldCh = oldVnode.children;6853var ch = vnode.children;6854if (isDef(data) && isPatchable(vnode)) {6855for (i = 0; i < cbs.update.length; ++i)6856cbs.update[i](oldVnode, vnode);6857if (isDef((i = data.hook)) && isDef((i = i.update)))6858i(oldVnode, vnode);6859}6860if (isUndef(vnode.text)) {6861if (isDef(oldCh) && isDef(ch)) {6862if (oldCh !== ch)6863updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly);6864}6865else if (isDef(ch)) {6866{6867checkDuplicateKeys(ch);6868}6869if (isDef(oldVnode.text))6870nodeOps.setTextContent(elm, '');6871addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);6872}6873else if (isDef(oldCh)) {6874removeVnodes(oldCh, 0, oldCh.length - 1);6875}6876else if (isDef(oldVnode.text)) {6877nodeOps.setTextContent(elm, '');6878}6879}6880else if (oldVnode.text !== vnode.text) {6881nodeOps.setTextContent(elm, vnode.text);6882}6883if (isDef(data)) {6884if (isDef((i = data.hook)) && isDef((i = i.postpatch)))6885i(oldVnode, vnode);6886}6887}6888function invokeInsertHook(vnode, queue, initial) {6889// delay insert hooks for component root nodes, invoke them after the6890// element is really inserted6891if (isTrue(initial) && isDef(vnode.parent)) {6892vnode.parent.data.pendingInsert = queue;6893}6894else {6895for (var i_6 = 0; i_6 < queue.length; ++i_6) {6896queue[i_6].data.hook.insert(queue[i_6]);6897}6898}6899}6900var hydrationBailed = false;6901// list of modules that can skip create hook during hydration because they6902// are already rendered on the client or has no need for initialization6903// Note: style is excluded because it relies on initial clone for future6904// deep updates (#7063).6905var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');6906// Note: this is a browser-only function so we can assume elms are DOM nodes.6907function hydrate(elm, vnode, insertedVnodeQueue, inVPre) {6908var i;6909var tag = vnode.tag, data = vnode.data, children = vnode.children;6910inVPre = inVPre || (data && data.pre);6911vnode.elm = elm;6912if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {6913vnode.isAsyncPlaceholder = true;6914return true;6915}6916// assert node match6917{6918if (!assertNodeMatch(elm, vnode, inVPre)) {6919return false;6920}6921}6922if (isDef(data)) {6923if (isDef((i = data.hook)) && isDef((i = i.init)))6924i(vnode, true /* hydrating */);6925if (isDef((i = vnode.componentInstance))) {6926// child component. it should have hydrated its own tree.6927initComponent(vnode, insertedVnodeQueue);6928return true;6929}6930}6931if (isDef(tag)) {6932if (isDef(children)) {6933// empty element, allow client to pick up and populate children6934if (!elm.hasChildNodes()) {6935createChildren(vnode, children, insertedVnodeQueue);6936}6937else {6938// v-html and domProps: innerHTML6939if (isDef((i = data)) &&6940isDef((i = i.domProps)) &&6941isDef((i = i.innerHTML))) {6942if (i !== elm.innerHTML) {6943/* istanbul ignore if */6944if (typeof console !== 'undefined' &&6945!hydrationBailed) {6946hydrationBailed = true;6947console.warn('Parent: ', elm);6948console.warn('server innerHTML: ', i);6949console.warn('client innerHTML: ', elm.innerHTML);6950}6951return false;6952}6953}6954else {6955// iterate and compare children lists6956var childrenMatch = true;6957var childNode = elm.firstChild;6958for (var i_7 = 0; i_7 < children.length; i_7++) {6959if (!childNode ||6960!hydrate(childNode, children[i_7], insertedVnodeQueue, inVPre)) {6961childrenMatch = false;6962break;6963}6964childNode = childNode.nextSibling;6965}6966// if childNode is not null, it means the actual childNodes list is6967// longer than the virtual children list.6968if (!childrenMatch || childNode) {6969/* istanbul ignore if */6970if (typeof console !== 'undefined' &&6971!hydrationBailed) {6972hydrationBailed = true;6973console.warn('Parent: ', elm);6974console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);6975}6976return false;6977}6978}6979}6980}6981if (isDef(data)) {6982var fullInvoke = false;6983for (var key in data) {6984if (!isRenderedModule(key)) {6985fullInvoke = true;6986invokeCreateHooks(vnode, insertedVnodeQueue);6987break;6988}6989}6990if (!fullInvoke && data['class']) {6991// ensure collecting deps for deep class bindings for future updates6992traverse(data['class']);6993}6994}6995}6996else if (elm.data !== vnode.text) {6997elm.data = vnode.text;6998}6999return true;7000}7001function assertNodeMatch(node, vnode, inVPre) {7002if (isDef(vnode.tag)) {7003return (vnode.tag.indexOf('vue-component') === 0 ||7004(!isUnknownElement(vnode, inVPre) &&7005vnode.tag.toLowerCase() ===7006(node.tagName && node.tagName.toLowerCase())));7007}7008else {7009return node.nodeType === (vnode.isComment ? 8 : 3);7010}7011}7012return function patch(oldVnode, vnode, hydrating, removeOnly) {7013if (isUndef(vnode)) {7014if (isDef(oldVnode))7015invokeDestroyHook(oldVnode);7016return;7017}7018var isInitialPatch = false;7019var insertedVnodeQueue = [];7020if (isUndef(oldVnode)) {7021// empty mount (likely as component), create new root element7022isInitialPatch = true;7023createElm(vnode, insertedVnodeQueue);7024}7025else {7026var isRealElement = isDef(oldVnode.nodeType);7027if (!isRealElement && sameVnode(oldVnode, vnode)) {7028// patch existing root node7029patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);7030}7031else {7032if (isRealElement) {7033// mounting to a real element7034// check if this is server-rendered content and if we can perform7035// a successful hydration.7036if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {7037oldVnode.removeAttribute(SSR_ATTR);7038hydrating = true;7039}7040if (isTrue(hydrating)) {7041if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {7042invokeInsertHook(vnode, insertedVnodeQueue, true);7043return oldVnode;7044}7045else {7046warn$2('The client-side rendered virtual DOM tree is not matching ' +7047'server-rendered content. This is likely caused by incorrect ' +7048'HTML markup, for example nesting block-level elements inside ' +7049'<p>, or missing <tbody>. Bailing hydration and performing ' +7050'full client-side render.');7051}7052}7053// either not server-rendered, or hydration failed.7054// create an empty node and replace it7055oldVnode = emptyNodeAt(oldVnode);7056}7057// replacing existing element7058var oldElm = oldVnode.elm;7059var parentElm = nodeOps.parentNode(oldElm);7060// create new node7061createElm(vnode, insertedVnodeQueue,7062// extremely rare edge case: do not insert if old element is in a7063// leaving transition. Only happens when combining transition +7064// keep-alive + HOCs. (#4590)7065oldElm._leaveCb ? null : parentElm, nodeOps.nextSibling(oldElm));7066// update parent placeholder node element, recursively7067if (isDef(vnode.parent)) {7068var ancestor = vnode.parent;7069var patchable = isPatchable(vnode);7070while (ancestor) {7071for (var i_8 = 0; i_8 < cbs.destroy.length; ++i_8) {7072cbs.destroy[i_8](ancestor);7073}7074ancestor.elm = vnode.elm;7075if (patchable) {7076for (var i_9 = 0; i_9 < cbs.create.length; ++i_9) {7077cbs.create[i_9](emptyNode, ancestor);7078}7079// #65137080// invoke insert hooks that may have been merged by create hooks.7081// e.g. for directives that uses the "inserted" hook.7082var insert_1 = ancestor.data.hook.insert;7083if (insert_1.merged) {7084// start at index 1 to avoid re-invoking component mounted hook7085for (var i_10 = 1; i_10 < insert_1.fns.length; i_10++) {7086insert_1.fns[i_10]();7087}7088}7089}7090else {7091registerRef(ancestor);7092}7093ancestor = ancestor.parent;7094}7095}7096// destroy old node7097if (isDef(parentElm)) {7098removeVnodes([oldVnode], 0, 0);7099}7100else if (isDef(oldVnode.tag)) {7101invokeDestroyHook(oldVnode);7102}7103}7104}7105invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);7106return vnode.elm;7107};7108}7109
7110var directives$1 = {7111create: updateDirectives,7112update: updateDirectives,7113destroy: function unbindDirectives(vnode) {7114// @ts-expect-error emptyNode is not VNodeWithData7115updateDirectives(vnode, emptyNode);7116}7117};7118function updateDirectives(oldVnode, vnode) {7119if (oldVnode.data.directives || vnode.data.directives) {7120_update(oldVnode, vnode);7121}7122}7123function _update(oldVnode, vnode) {7124var isCreate = oldVnode === emptyNode;7125var isDestroy = vnode === emptyNode;7126var oldDirs = normalizeDirectives(oldVnode.data.directives, oldVnode.context);7127var newDirs = normalizeDirectives(vnode.data.directives, vnode.context);7128var dirsWithInsert = [];7129var dirsWithPostpatch = [];7130var key, oldDir, dir;7131for (key in newDirs) {7132oldDir = oldDirs[key];7133dir = newDirs[key];7134if (!oldDir) {7135// new directive, bind7136callHook(dir, 'bind', vnode, oldVnode);7137if (dir.def && dir.def.inserted) {7138dirsWithInsert.push(dir);7139}7140}7141else {7142// existing directive, update7143dir.oldValue = oldDir.value;7144dir.oldArg = oldDir.arg;7145callHook(dir, 'update', vnode, oldVnode);7146if (dir.def && dir.def.componentUpdated) {7147dirsWithPostpatch.push(dir);7148}7149}7150}7151if (dirsWithInsert.length) {7152var callInsert = function () {7153for (var i = 0; i < dirsWithInsert.length; i++) {7154callHook(dirsWithInsert[i], 'inserted', vnode, oldVnode);7155}7156};7157if (isCreate) {7158mergeVNodeHook(vnode, 'insert', callInsert);7159}7160else {7161callInsert();7162}7163}7164if (dirsWithPostpatch.length) {7165mergeVNodeHook(vnode, 'postpatch', function () {7166for (var i = 0; i < dirsWithPostpatch.length; i++) {7167callHook(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);7168}7169});7170}7171if (!isCreate) {7172for (key in oldDirs) {7173if (!newDirs[key]) {7174// no longer present, unbind7175callHook(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);7176}7177}7178}7179}7180var emptyModifiers = Object.create(null);7181function normalizeDirectives(dirs, vm) {7182var res = Object.create(null);7183if (!dirs) {7184// $flow-disable-line7185return res;7186}7187var i, dir;7188for (i = 0; i < dirs.length; i++) {7189dir = dirs[i];7190if (!dir.modifiers) {7191// $flow-disable-line7192dir.modifiers = emptyModifiers;7193}7194res[getRawDirName(dir)] = dir;7195if (vm._setupState && vm._setupState.__sfc) {7196dir.def = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name);7197}7198dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true);7199}7200// $flow-disable-line7201return res;7202}7203function getRawDirName(dir) {7204return (dir.rawName || "".concat(dir.name, ".").concat(Object.keys(dir.modifiers || {}).join('.')));7205}7206function callHook(dir, hook, vnode, oldVnode, isDestroy) {7207var fn = dir.def && dir.def[hook];7208if (fn) {7209try {7210fn(vnode.elm, dir, vnode, oldVnode, isDestroy);7211}7212catch (e) {7213handleError(e, vnode.context, "directive ".concat(dir.name, " ").concat(hook, " hook"));7214}7215}7216}7217
7218var baseModules = [ref, directives$1];7219
7220function updateAttrs(oldVnode, vnode) {7221var opts = vnode.componentOptions;7222if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {7223return;7224}7225if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {7226return;7227}7228var key, cur, old;7229var elm = vnode.elm;7230var oldAttrs = oldVnode.data.attrs || {};7231var attrs = vnode.data.attrs || {};7232// clone observed objects, as the user probably wants to mutate it7233if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) {7234attrs = vnode.data.attrs = extend({}, attrs);7235}7236for (key in attrs) {7237cur = attrs[key];7238old = oldAttrs[key];7239if (old !== cur) {7240setAttr(elm, key, cur, vnode.data.pre);7241}7242}7243// #4391: in IE9, setting type can reset value for input[type=radio]7244// #6666: IE/Edge forces progress value down to 1 before setting a max7245/* istanbul ignore if */7246if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {7247setAttr(elm, 'value', attrs.value);7248}7249for (key in oldAttrs) {7250if (isUndef(attrs[key])) {7251if (isXlink(key)) {7252elm.removeAttributeNS(xlinkNS, getXlinkProp(key));7253}7254else if (!isEnumeratedAttr(key)) {7255elm.removeAttribute(key);7256}7257}7258}7259}7260function setAttr(el, key, value, isInPre) {7261if (isInPre || el.tagName.indexOf('-') > -1) {7262baseSetAttr(el, key, value);7263}7264else if (isBooleanAttr(key)) {7265// set attribute for blank value7266// e.g. <option disabled>Select one</option>7267if (isFalsyAttrValue(value)) {7268el.removeAttribute(key);7269}7270else {7271// technically allowfullscreen is a boolean attribute for <iframe>,7272// but Flash expects a value of "true" when used on <embed> tag7273value = key === 'allowfullscreen' && el.tagName === 'EMBED' ? 'true' : key;7274el.setAttribute(key, value);7275}7276}7277else if (isEnumeratedAttr(key)) {7278el.setAttribute(key, convertEnumeratedValue(key, value));7279}7280else if (isXlink(key)) {7281if (isFalsyAttrValue(value)) {7282el.removeAttributeNS(xlinkNS, getXlinkProp(key));7283}7284else {7285el.setAttributeNS(xlinkNS, key, value);7286}7287}7288else {7289baseSetAttr(el, key, value);7290}7291}7292function baseSetAttr(el, key, value) {7293if (isFalsyAttrValue(value)) {7294el.removeAttribute(key);7295}7296else {7297// #7138: IE10 & 11 fires input event when setting placeholder on7298// <textarea>... block the first input event and remove the blocker7299// immediately.7300/* istanbul ignore if */7301if (isIE &&7302!isIE9 &&7303el.tagName === 'TEXTAREA' &&7304key === 'placeholder' &&7305value !== '' &&7306!el.__ieph) {7307var blocker_1 = function (e) {7308e.stopImmediatePropagation();7309el.removeEventListener('input', blocker_1);7310};7311el.addEventListener('input', blocker_1);7312// $flow-disable-line7313el.__ieph = true; /* IE placeholder patched */7314}7315el.setAttribute(key, value);7316}7317}7318var attrs = {7319create: updateAttrs,7320update: updateAttrs7321};7322
7323function updateClass(oldVnode, vnode) {7324var el = vnode.elm;7325var data = vnode.data;7326var oldData = oldVnode.data;7327if (isUndef(data.staticClass) &&7328isUndef(data.class) &&7329(isUndef(oldData) ||7330(isUndef(oldData.staticClass) && isUndef(oldData.class)))) {7331return;7332}7333var cls = genClassForVnode(vnode);7334// handle transition classes7335var transitionClass = el._transitionClasses;7336if (isDef(transitionClass)) {7337cls = concat(cls, stringifyClass(transitionClass));7338}7339// set the class7340if (cls !== el._prevClass) {7341el.setAttribute('class', cls);7342el._prevClass = cls;7343}7344}7345var klass$1 = {7346create: updateClass,7347update: updateClass7348};7349
7350var validDivisionCharRE = /[\w).+\-_$\]]/;7351function parseFilters(exp) {7352var inSingle = false;7353var inDouble = false;7354var inTemplateString = false;7355var inRegex = false;7356var curly = 0;7357var square = 0;7358var paren = 0;7359var lastFilterIndex = 0;7360var c, prev, i, expression, filters;7361for (i = 0; i < exp.length; i++) {7362prev = c;7363c = exp.charCodeAt(i);7364if (inSingle) {7365if (c === 0x27 && prev !== 0x5c)7366inSingle = false;7367}7368else if (inDouble) {7369if (c === 0x22 && prev !== 0x5c)7370inDouble = false;7371}7372else if (inTemplateString) {7373if (c === 0x60 && prev !== 0x5c)7374inTemplateString = false;7375}7376else if (inRegex) {7377if (c === 0x2f && prev !== 0x5c)7378inRegex = false;7379}7380else if (c === 0x7c && // pipe7381exp.charCodeAt(i + 1) !== 0x7c &&7382exp.charCodeAt(i - 1) !== 0x7c &&7383!curly &&7384!square &&7385!paren) {7386if (expression === undefined) {7387// first filter, end of expression7388lastFilterIndex = i + 1;7389expression = exp.slice(0, i).trim();7390}7391else {7392pushFilter();7393}7394}7395else {7396switch (c) {7397case 0x22:7398inDouble = true;7399break; // "7400case 0x27:7401inSingle = true;7402break; // '7403case 0x60:7404inTemplateString = true;7405break; // `7406case 0x28:7407paren++;7408break; // (7409case 0x29:7410paren--;7411break; // )7412case 0x5b:7413square++;7414break; // [7415case 0x5d:7416square--;7417break; // ]7418case 0x7b:7419curly++;7420break; // {7421case 0x7d:7422curly--;7423break; // }7424}7425if (c === 0x2f) {7426// /7427var j = i - 1;7428var p7429// find first non-whitespace prev char7430= void 0;7431// find first non-whitespace prev char7432for (; j >= 0; j--) {7433p = exp.charAt(j);7434if (p !== ' ')7435break;7436}7437if (!p || !validDivisionCharRE.test(p)) {7438inRegex = true;7439}7440}7441}7442}7443if (expression === undefined) {7444expression = exp.slice(0, i).trim();7445}7446else if (lastFilterIndex !== 0) {7447pushFilter();7448}7449function pushFilter() {7450(filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());7451lastFilterIndex = i + 1;7452}7453if (filters) {7454for (i = 0; i < filters.length; i++) {7455expression = wrapFilter(expression, filters[i]);7456}7457}7458return expression;7459}7460function wrapFilter(exp, filter) {7461var i = filter.indexOf('(');7462if (i < 0) {7463// _f: resolveFilter7464return "_f(\"".concat(filter, "\")(").concat(exp, ")");7465}7466else {7467var name_1 = filter.slice(0, i);7468var args = filter.slice(i + 1);7469return "_f(\"".concat(name_1, "\")(").concat(exp).concat(args !== ')' ? ',' + args : args);7470}7471}7472
7473/* eslint-disable no-unused-vars */7474function baseWarn(msg, range) {7475console.error("[Vue compiler]: ".concat(msg));7476}7477/* eslint-enable no-unused-vars */7478function pluckModuleFunction(modules, key) {7479return modules ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) : [];7480}7481function addProp(el, name, value, range, dynamic) {7482(el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));7483el.plain = false;7484}7485function addAttr(el, name, value, range, dynamic) {7486var attrs = dynamic7487? el.dynamicAttrs || (el.dynamicAttrs = [])7488: el.attrs || (el.attrs = []);7489attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));7490el.plain = false;7491}7492// add a raw attr (use this in preTransforms)7493function addRawAttr(el, name, value, range) {7494el.attrsMap[name] = value;7495el.attrsList.push(rangeSetItem({ name: name, value: value }, range));7496}7497function addDirective(el, name, rawName, value, arg, isDynamicArg, modifiers, range) {7498(el.directives || (el.directives = [])).push(rangeSetItem({7499name: name,7500rawName: rawName,7501value: value,7502arg: arg,7503isDynamicArg: isDynamicArg,7504modifiers: modifiers7505}, range));7506el.plain = false;7507}7508function prependModifierMarker(symbol, name, dynamic) {7509return dynamic ? "_p(".concat(name, ",\"").concat(symbol, "\")") : symbol + name; // mark the event as captured7510}7511function addHandler(el, name, value, modifiers, important, warn, range, dynamic) {7512modifiers = modifiers || emptyObject;7513// warn prevent and passive modifier7514/* istanbul ignore if */7515if (warn && modifiers.prevent && modifiers.passive) {7516warn("passive and prevent can't be used together. " +7517"Passive handler can't prevent default event.", range);7518}7519// normalize click.right and click.middle since they don't actually fire7520// this is technically browser-specific, but at least for now browsers are7521// the only target envs that have right/middle clicks.7522if (modifiers.right) {7523if (dynamic) {7524name = "(".concat(name, ")==='click'?'contextmenu':(").concat(name, ")");7525}7526else if (name === 'click') {7527name = 'contextmenu';7528delete modifiers.right;7529}7530}7531else if (modifiers.middle) {7532if (dynamic) {7533name = "(".concat(name, ")==='click'?'mouseup':(").concat(name, ")");7534}7535else if (name === 'click') {7536name = 'mouseup';7537}7538}7539// check capture modifier7540if (modifiers.capture) {7541delete modifiers.capture;7542name = prependModifierMarker('!', name, dynamic);7543}7544if (modifiers.once) {7545delete modifiers.once;7546name = prependModifierMarker('~', name, dynamic);7547}7548/* istanbul ignore if */7549if (modifiers.passive) {7550delete modifiers.passive;7551name = prependModifierMarker('&', name, dynamic);7552}7553var events;7554if (modifiers.native) {7555delete modifiers.native;7556events = el.nativeEvents || (el.nativeEvents = {});7557}7558else {7559events = el.events || (el.events = {});7560}7561var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);7562if (modifiers !== emptyObject) {7563newHandler.modifiers = modifiers;7564}7565var handlers = events[name];7566/* istanbul ignore if */7567if (Array.isArray(handlers)) {7568important ? handlers.unshift(newHandler) : handlers.push(newHandler);7569}7570else if (handlers) {7571events[name] = important ? [newHandler, handlers] : [handlers, newHandler];7572}7573else {7574events[name] = newHandler;7575}7576el.plain = false;7577}7578function getRawBindingAttr(el, name) {7579return (el.rawAttrsMap[':' + name] ||7580el.rawAttrsMap['v-bind:' + name] ||7581el.rawAttrsMap[name]);7582}7583function getBindingAttr(el, name, getStatic) {7584var dynamicValue = getAndRemoveAttr(el, ':' + name) || getAndRemoveAttr(el, 'v-bind:' + name);7585if (dynamicValue != null) {7586return parseFilters(dynamicValue);7587}7588else if (getStatic !== false) {7589var staticValue = getAndRemoveAttr(el, name);7590if (staticValue != null) {7591return JSON.stringify(staticValue);7592}7593}7594}7595// note: this only removes the attr from the Array (attrsList) so that it7596// doesn't get processed by processAttrs.7597// By default it does NOT remove it from the map (attrsMap) because the map is7598// needed during codegen.7599function getAndRemoveAttr(el, name, removeFromMap) {7600var val;7601if ((val = el.attrsMap[name]) != null) {7602var list = el.attrsList;7603for (var i = 0, l = list.length; i < l; i++) {7604if (list[i].name === name) {7605list.splice(i, 1);7606break;7607}7608}7609}7610if (removeFromMap) {7611delete el.attrsMap[name];7612}7613return val;7614}7615function getAndRemoveAttrByRegex(el, name) {7616var list = el.attrsList;7617for (var i = 0, l = list.length; i < l; i++) {7618var attr = list[i];7619if (name.test(attr.name)) {7620list.splice(i, 1);7621return attr;7622}7623}7624}7625function rangeSetItem(item, range) {7626if (range) {7627if (range.start != null) {7628item.start = range.start;7629}7630if (range.end != null) {7631item.end = range.end;7632}7633}7634return item;7635}7636
7637/**7638* Cross-platform code generation for component v-model
7639*/
7640function genComponentModel(el, value, modifiers) {7641var _a = modifiers || {}, number = _a.number, trim = _a.trim;7642var baseValueExpression = '$$v';7643var valueExpression = baseValueExpression;7644if (trim) {7645valueExpression =7646"(typeof ".concat(baseValueExpression, " === 'string'") +7647"? ".concat(baseValueExpression, ".trim()") +7648": ".concat(baseValueExpression, ")");7649}7650if (number) {7651valueExpression = "_n(".concat(valueExpression, ")");7652}7653var assignment = genAssignmentCode(value, valueExpression);7654el.model = {7655value: "(".concat(value, ")"),7656expression: JSON.stringify(value),7657callback: "function (".concat(baseValueExpression, ") {").concat(assignment, "}")7658};7659}7660/**7661* Cross-platform codegen helper for generating v-model value assignment code.
7662*/
7663function genAssignmentCode(value, assignment) {7664var res = parseModel(value);7665if (res.key === null) {7666return "".concat(value, "=").concat(assignment);7667}7668else {7669return "$set(".concat(res.exp, ", ").concat(res.key, ", ").concat(assignment, ")");7670}7671}7672/**7673* Parse a v-model expression into a base path and a final key segment.
7674* Handles both dot-path and possible square brackets.
7675*
7676* Possible cases:
7677*
7678* - test
7679* - test[key]
7680* - test[test1[key]]
7681* - test["a"][key]
7682* - xxx.test[a[a].test1[key]]
7683* - test.xxx.a["asa"][test1[key]]
7684*
7685*/
7686var len, str, chr, index, expressionPos, expressionEndPos;7687function parseModel(val) {7688// Fix https://github.com/vuejs/vue/pull/77307689// allow v-model="obj.val " (trailing whitespace)7690val = val.trim();7691len = val.length;7692if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {7693index = val.lastIndexOf('.');7694if (index > -1) {7695return {7696exp: val.slice(0, index),7697key: '"' + val.slice(index + 1) + '"'7698};7699}7700else {7701return {7702exp: val,7703key: null7704};7705}7706}7707str = val;7708index = expressionPos = expressionEndPos = 0;7709while (!eof()) {7710chr = next();7711/* istanbul ignore if */7712if (isStringStart(chr)) {7713parseString(chr);7714}7715else if (chr === 0x5b) {7716parseBracket(chr);7717}7718}7719return {7720exp: val.slice(0, expressionPos),7721key: val.slice(expressionPos + 1, expressionEndPos)7722};7723}7724function next() {7725return str.charCodeAt(++index);7726}7727function eof() {7728return index >= len;7729}7730function isStringStart(chr) {7731return chr === 0x22 || chr === 0x27;7732}7733function parseBracket(chr) {7734var inBracket = 1;7735expressionPos = index;7736while (!eof()) {7737chr = next();7738if (isStringStart(chr)) {7739parseString(chr);7740continue;7741}7742if (chr === 0x5b)7743inBracket++;7744if (chr === 0x5d)7745inBracket--;7746if (inBracket === 0) {7747expressionEndPos = index;7748break;7749}7750}7751}7752function parseString(chr) {7753var stringQuote = chr;7754while (!eof()) {7755chr = next();7756if (chr === stringQuote) {7757break;7758}7759}7760}7761
7762var warn$1;7763// in some cases, the event used has to be determined at runtime7764// so we used some reserved tokens during compile.7765var RANGE_TOKEN = '__r';7766var CHECKBOX_RADIO_TOKEN = '__c';7767function model$1(el, dir, _warn) {7768warn$1 = _warn;7769var value = dir.value;7770var modifiers = dir.modifiers;7771var tag = el.tag;7772var type = el.attrsMap.type;7773{7774// inputs with type="file" are read only and setting the input's7775// value will throw an error.7776if (tag === 'input' && type === 'file') {7777warn$1("<".concat(el.tag, " v-model=\"").concat(value, "\" type=\"file\">:\n") +7778"File inputs are read only. Use a v-on:change listener instead.", el.rawAttrsMap['v-model']);7779}7780}7781if (el.component) {7782genComponentModel(el, value, modifiers);7783// component v-model doesn't need extra runtime7784return false;7785}7786else if (tag === 'select') {7787genSelect(el, value, modifiers);7788}7789else if (tag === 'input' && type === 'checkbox') {7790genCheckboxModel(el, value, modifiers);7791}7792else if (tag === 'input' && type === 'radio') {7793genRadioModel(el, value, modifiers);7794}7795else if (tag === 'input' || tag === 'textarea') {7796genDefaultModel(el, value, modifiers);7797}7798else if (!config.isReservedTag(tag)) {7799genComponentModel(el, value, modifiers);7800// component v-model doesn't need extra runtime7801return false;7802}7803else {7804warn$1("<".concat(el.tag, " v-model=\"").concat(value, "\">: ") +7805"v-model is not supported on this element type. " +7806"If you are working with contenteditable, it's recommended to " +7807'wrap a library dedicated for that purpose inside a custom component.', el.rawAttrsMap['v-model']);7808}7809// ensure runtime directive metadata7810return true;7811}7812function genCheckboxModel(el, value, modifiers) {7813var number = modifiers && modifiers.number;7814var valueBinding = getBindingAttr(el, 'value') || 'null';7815var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';7816var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';7817addProp(el, 'checked', "Array.isArray(".concat(value, ")") +7818"?_i(".concat(value, ",").concat(valueBinding, ")>-1") +7819(trueValueBinding === 'true'7820? ":(".concat(value, ")")7821: ":_q(".concat(value, ",").concat(trueValueBinding, ")")));7822addHandler(el, 'change', "var $$a=".concat(value, ",") +7823'$$el=$event.target,' +7824"$$c=$$el.checked?(".concat(trueValueBinding, "):(").concat(falseValueBinding, ");") +7825'if(Array.isArray($$a)){' +7826"var $$v=".concat(number ? '_n(' + valueBinding + ')' : valueBinding, ",") +7827'$$i=_i($$a,$$v);' +7828"if($$el.checked){$$i<0&&(".concat(genAssignmentCode(value, '$$a.concat([$$v])'), ")}") +7829"else{$$i>-1&&(".concat(genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))'), ")}") +7830"}else{".concat(genAssignmentCode(value, '$$c'), "}"), null, true);7831}7832function genRadioModel(el, value, modifiers) {7833var number = modifiers && modifiers.number;7834var valueBinding = getBindingAttr(el, 'value') || 'null';7835valueBinding = number ? "_n(".concat(valueBinding, ")") : valueBinding;7836addProp(el, 'checked', "_q(".concat(value, ",").concat(valueBinding, ")"));7837addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);7838}7839function genSelect(el, value, modifiers) {7840var number = modifiers && modifiers.number;7841var selectedVal = "Array.prototype.filter" +7842".call($event.target.options,function(o){return o.selected})" +7843".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +7844"return ".concat(number ? '_n(val)' : 'val', "})");7845var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';7846var code = "var $$selectedVal = ".concat(selectedVal, ";");7847code = "".concat(code, " ").concat(genAssignmentCode(value, assignment));7848addHandler(el, 'change', code, null, true);7849}7850function genDefaultModel(el, value, modifiers) {7851var type = el.attrsMap.type;7852// warn if v-bind:value conflicts with v-model7853// except for inputs with v-bind:type7854{7855var value_1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];7856var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];7857if (value_1 && !typeBinding) {7858var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';7859warn$1("".concat(binding, "=\"").concat(value_1, "\" conflicts with v-model on the same element ") +7860'because the latter already expands to a value binding internally', el.rawAttrsMap[binding]);7861}7862}7863var _a = modifiers || {}, lazy = _a.lazy, number = _a.number, trim = _a.trim;7864var needCompositionGuard = !lazy && type !== 'range';7865var event = lazy ? 'change' : type === 'range' ? RANGE_TOKEN : 'input';7866var valueExpression = '$event.target.value';7867if (trim) {7868valueExpression = "$event.target.value.trim()";7869}7870if (number) {7871valueExpression = "_n(".concat(valueExpression, ")");7872}7873var code = genAssignmentCode(value, valueExpression);7874if (needCompositionGuard) {7875code = "if($event.target.composing)return;".concat(code);7876}7877addProp(el, 'value', "(".concat(value, ")"));7878addHandler(el, event, code, null, true);7879if (trim || number) {7880addHandler(el, 'blur', '$forceUpdate()');7881}7882}7883
7884// normalize v-model event tokens that can only be determined at runtime.7885// it's important to place the event as the first in the array because7886// the whole point is ensuring the v-model callback gets called before7887// user-attached handlers.7888function normalizeEvents(on) {7889/* istanbul ignore if */7890if (isDef(on[RANGE_TOKEN])) {7891// IE input[type=range] only supports `change` event7892var event_1 = isIE ? 'change' : 'input';7893on[event_1] = [].concat(on[RANGE_TOKEN], on[event_1] || []);7894delete on[RANGE_TOKEN];7895}7896// This was originally intended to fix #4521 but no longer necessary7897// after 2.5. Keeping it for backwards compat with generated code from < 2.47898/* istanbul ignore if */7899if (isDef(on[CHECKBOX_RADIO_TOKEN])) {7900on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);7901delete on[CHECKBOX_RADIO_TOKEN];7902}7903}7904var target;7905function createOnceHandler(event, handler, capture) {7906var _target = target; // save current target element in closure7907return function onceHandler() {7908var res = handler.apply(null, arguments);7909if (res !== null) {7910remove(event, onceHandler, capture, _target);7911}7912};7913}7914// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp7915// implementation and does not fire microtasks in between event propagation, so7916// safe to exclude.7917var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);7918function add(name, handler, capture, passive) {7919// async edge case #6566: inner click event triggers patch, event handler7920// attached to outer element during patch, and triggered again. This7921// happens because browsers fire microtask ticks between event propagation.7922// the solution is simple: we save the timestamp when a handler is attached,7923// and the handler would only fire if the event passed to it was fired7924// AFTER it was attached.7925if (useMicrotaskFix) {7926var attachedTimestamp_1 = currentFlushTimestamp;7927var original_1 = handler;7928//@ts-expect-error7929handler = original_1._wrapper = function (e) {7930if (7931// no bubbling, should always fire.7932// this is just a safety net in case event.timeStamp is unreliable in7933// certain weird environments...7934e.target === e.currentTarget ||7935// event is fired after handler attachment7936e.timeStamp >= attachedTimestamp_1 ||7937// bail for environments that have buggy event.timeStamp implementations7938// #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState7939// #9681 QtWebEngine event.timeStamp is negative value7940e.timeStamp <= 0 ||7941// #9448 bail if event is fired in another document in a multi-page7942// electron/nw.js app, since event.timeStamp will be using a different7943// starting reference7944e.target.ownerDocument !== document) {7945return original_1.apply(this, arguments);7946}7947};7948}7949target.addEventListener(name, handler, supportsPassive ? { capture: capture, passive: passive } : capture);7950}7951function remove(name, handler, capture, _target) {7952(_target || target).removeEventListener(name,7953//@ts-expect-error7954handler._wrapper || handler, capture);7955}7956function updateDOMListeners(oldVnode, vnode) {7957if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {7958return;7959}7960var on = vnode.data.on || {};7961var oldOn = oldVnode.data.on || {};7962// vnode is empty when removing all listeners,7963// and use old vnode dom element7964target = vnode.elm || oldVnode.elm;7965normalizeEvents(on);7966updateListeners(on, oldOn, add, remove, createOnceHandler, vnode.context);7967target = undefined;7968}7969var events = {7970create: updateDOMListeners,7971update: updateDOMListeners,7972// @ts-expect-error emptyNode has actually data7973destroy: function (vnode) { return updateDOMListeners(vnode, emptyNode); }7974};7975
7976var svgContainer;7977function updateDOMProps(oldVnode, vnode) {7978if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {7979return;7980}7981var key, cur;7982var elm = vnode.elm;7983var oldProps = oldVnode.data.domProps || {};7984var props = vnode.data.domProps || {};7985// clone observed objects, as the user probably wants to mutate it7986if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) {7987props = vnode.data.domProps = extend({}, props);7988}7989for (key in oldProps) {7990if (!(key in props)) {7991elm[key] = '';7992}7993}7994for (key in props) {7995cur = props[key];7996// ignore children if the node has textContent or innerHTML,7997// as these will throw away existing DOM nodes and cause removal errors7998// on subsequent patches (#3360)7999if (key === 'textContent' || key === 'innerHTML') {8000if (vnode.children)8001vnode.children.length = 0;8002if (cur === oldProps[key])8003continue;8004// #6601 work around Chrome version <= 55 bug where single textNode8005// replaced by innerHTML/textContent retains its parentNode property8006if (elm.childNodes.length === 1) {8007elm.removeChild(elm.childNodes[0]);8008}8009}8010if (key === 'value' && elm.tagName !== 'PROGRESS') {8011// store value as _value as well since8012// non-string values will be stringified8013elm._value = cur;8014// avoid resetting cursor position when value is the same8015var strCur = isUndef(cur) ? '' : String(cur);8016if (shouldUpdateValue(elm, strCur)) {8017elm.value = strCur;8018}8019}8020else if (key === 'innerHTML' &&8021isSVG(elm.tagName) &&8022isUndef(elm.innerHTML)) {8023// IE doesn't support innerHTML for SVG elements8024svgContainer = svgContainer || document.createElement('div');8025svgContainer.innerHTML = "<svg>".concat(cur, "</svg>");8026var svg = svgContainer.firstChild;8027while (elm.firstChild) {8028elm.removeChild(elm.firstChild);8029}8030while (svg.firstChild) {8031elm.appendChild(svg.firstChild);8032}8033}8034else if (8035// skip the update if old and new VDOM state is the same.8036// `value` is handled separately because the DOM value may be temporarily8037// out of sync with VDOM state due to focus, composition and modifiers.8038// This #4521 by skipping the unnecessary `checked` update.8039cur !== oldProps[key]) {8040// some property updates can throw8041// e.g. `value` on <progress> w/ non-finite value8042try {8043elm[key] = cur;8044}8045catch (e) { }8046}8047}8048}8049function shouldUpdateValue(elm, checkVal) {8050return (8051//@ts-expect-error8052!elm.composing &&8053(elm.tagName === 'OPTION' ||8054isNotInFocusAndDirty(elm, checkVal) ||8055isDirtyWithModifiers(elm, checkVal)));8056}8057function isNotInFocusAndDirty(elm, checkVal) {8058// return true when textbox (.number and .trim) loses focus and its value is8059// not equal to the updated value8060var notInFocus = true;8061// #61578062// work around IE bug when accessing document.activeElement in an iframe8063try {8064notInFocus = document.activeElement !== elm;8065}8066catch (e) { }8067return notInFocus && elm.value !== checkVal;8068}8069function isDirtyWithModifiers(elm, newVal) {8070var value = elm.value;8071var modifiers = elm._vModifiers; // injected by v-model runtime8072if (isDef(modifiers)) {8073if (modifiers.number) {8074return toNumber(value) !== toNumber(newVal);8075}8076if (modifiers.trim) {8077return value.trim() !== newVal.trim();8078}8079}8080return value !== newVal;8081}8082var domProps = {8083create: updateDOMProps,8084update: updateDOMProps8085};8086
8087var parseStyleText = cached(function (cssText) {8088var res = {};8089var listDelimiter = /;(?![^(]*\))/g;8090var propertyDelimiter = /:(.+)/;8091cssText.split(listDelimiter).forEach(function (item) {8092if (item) {8093var tmp = item.split(propertyDelimiter);8094tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());8095}8096});8097return res;8098});8099// merge static and dynamic style data on the same vnode8100function normalizeStyleData(data) {8101var style = normalizeStyleBinding(data.style);8102// static style is pre-processed into an object during compilation8103// and is always a fresh object, so it's safe to merge into it8104return data.staticStyle ? extend(data.staticStyle, style) : style;8105}8106// normalize possible array / string values into Object8107function normalizeStyleBinding(bindingStyle) {8108if (Array.isArray(bindingStyle)) {8109return toObject(bindingStyle);8110}8111if (typeof bindingStyle === 'string') {8112return parseStyleText(bindingStyle);8113}8114return bindingStyle;8115}8116/**8117* parent component style should be after child's
8118* so that parent component's style could override it
8119*/
8120function getStyle(vnode, checkChild) {8121var res = {};8122var styleData;8123if (checkChild) {8124var childNode = vnode;8125while (childNode.componentInstance) {8126childNode = childNode.componentInstance._vnode;8127if (childNode &&8128childNode.data &&8129(styleData = normalizeStyleData(childNode.data))) {8130extend(res, styleData);8131}8132}8133}8134if ((styleData = normalizeStyleData(vnode.data))) {8135extend(res, styleData);8136}8137var parentNode = vnode;8138// @ts-expect-error parentNode.parent not VNodeWithData8139while ((parentNode = parentNode.parent)) {8140if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {8141extend(res, styleData);8142}8143}8144return res;8145}8146
8147var cssVarRE = /^--/;8148var importantRE = /\s*!important$/;8149var setProp = function (el, name, val) {8150/* istanbul ignore if */8151if (cssVarRE.test(name)) {8152el.style.setProperty(name, val);8153}8154else if (importantRE.test(val)) {8155el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');8156}8157else {8158var normalizedName = normalize(name);8159if (Array.isArray(val)) {8160// Support values array created by autoprefixer, e.g.8161// {display: ["-webkit-box", "-ms-flexbox", "flex"]}8162// Set them one by one, and the browser will only set those it can recognize8163for (var i = 0, len = val.length; i < len; i++) {8164el.style[normalizedName] = val[i];8165}8166}8167else {8168el.style[normalizedName] = val;8169}8170}8171};8172var vendorNames = ['Webkit', 'Moz', 'ms'];8173var emptyStyle;8174var normalize = cached(function (prop) {8175emptyStyle = emptyStyle || document.createElement('div').style;8176prop = camelize(prop);8177if (prop !== 'filter' && prop in emptyStyle) {8178return prop;8179}8180var capName = prop.charAt(0).toUpperCase() + prop.slice(1);8181for (var i = 0; i < vendorNames.length; i++) {8182var name_1 = vendorNames[i] + capName;8183if (name_1 in emptyStyle) {8184return name_1;8185}8186}8187});8188function updateStyle(oldVnode, vnode) {8189var data = vnode.data;8190var oldData = oldVnode.data;8191if (isUndef(data.staticStyle) &&8192isUndef(data.style) &&8193isUndef(oldData.staticStyle) &&8194isUndef(oldData.style)) {8195return;8196}8197var cur, name;8198var el = vnode.elm;8199var oldStaticStyle = oldData.staticStyle;8200var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};8201// if static style exists, stylebinding already merged into it when doing normalizeStyleData8202var oldStyle = oldStaticStyle || oldStyleBinding;8203var style = normalizeStyleBinding(vnode.data.style) || {};8204// store normalized style under a different key for next diff8205// make sure to clone it if it's reactive, since the user likely wants8206// to mutate it.8207vnode.data.normalizedStyle = isDef(style.__ob__) ? extend({}, style) : style;8208var newStyle = getStyle(vnode, true);8209for (name in oldStyle) {8210if (isUndef(newStyle[name])) {8211setProp(el, name, '');8212}8213}8214for (name in newStyle) {8215cur = newStyle[name];8216if (cur !== oldStyle[name]) {8217// ie9 setting to null has no effect, must use empty string8218setProp(el, name, cur == null ? '' : cur);8219}8220}8221}8222var style$1 = {8223create: updateStyle,8224update: updateStyle8225};8226
8227var whitespaceRE$1 = /\s+/;8228/**8229* Add class with compatibility for SVG since classList is not supported on
8230* SVG elements in IE
8231*/
8232function addClass(el, cls) {8233/* istanbul ignore if */8234if (!cls || !(cls = cls.trim())) {8235return;8236}8237/* istanbul ignore else */8238if (el.classList) {8239if (cls.indexOf(' ') > -1) {8240cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.add(c); });8241}8242else {8243el.classList.add(cls);8244}8245}8246else {8247var cur = " ".concat(el.getAttribute('class') || '', " ");8248if (cur.indexOf(' ' + cls + ' ') < 0) {8249el.setAttribute('class', (cur + cls).trim());8250}8251}8252}8253/**8254* Remove class with compatibility for SVG since classList is not supported on
8255* SVG elements in IE
8256*/
8257function removeClass(el, cls) {8258/* istanbul ignore if */8259if (!cls || !(cls = cls.trim())) {8260return;8261}8262/* istanbul ignore else */8263if (el.classList) {8264if (cls.indexOf(' ') > -1) {8265cls.split(whitespaceRE$1).forEach(function (c) { return el.classList.remove(c); });8266}8267else {8268el.classList.remove(cls);8269}8270if (!el.classList.length) {8271el.removeAttribute('class');8272}8273}8274else {8275var cur = " ".concat(el.getAttribute('class') || '', " ");8276var tar = ' ' + cls + ' ';8277while (cur.indexOf(tar) >= 0) {8278cur = cur.replace(tar, ' ');8279}8280cur = cur.trim();8281if (cur) {8282el.setAttribute('class', cur);8283}8284else {8285el.removeAttribute('class');8286}8287}8288}8289
8290function resolveTransition(def) {8291if (!def) {8292return;8293}8294/* istanbul ignore else */8295if (typeof def === 'object') {8296var res = {};8297if (def.css !== false) {8298extend(res, autoCssTransition(def.name || 'v'));8299}8300extend(res, def);8301return res;8302}8303else if (typeof def === 'string') {8304return autoCssTransition(def);8305}8306}8307var autoCssTransition = cached(function (name) {8308return {8309enterClass: "".concat(name, "-enter"),8310enterToClass: "".concat(name, "-enter-to"),8311enterActiveClass: "".concat(name, "-enter-active"),8312leaveClass: "".concat(name, "-leave"),8313leaveToClass: "".concat(name, "-leave-to"),8314leaveActiveClass: "".concat(name, "-leave-active")8315};8316});8317var hasTransition = inBrowser && !isIE9;8318var TRANSITION = 'transition';8319var ANIMATION = 'animation';8320// Transition property/event sniffing8321var transitionProp = 'transition';8322var transitionEndEvent = 'transitionend';8323var animationProp = 'animation';8324var animationEndEvent = 'animationend';8325if (hasTransition) {8326/* istanbul ignore if */8327if (window.ontransitionend === undefined &&8328window.onwebkittransitionend !== undefined) {8329transitionProp = 'WebkitTransition';8330transitionEndEvent = 'webkitTransitionEnd';8331}8332if (window.onanimationend === undefined &&8333window.onwebkitanimationend !== undefined) {8334animationProp = 'WebkitAnimation';8335animationEndEvent = 'webkitAnimationEnd';8336}8337}8338// binding to window is necessary to make hot reload work in IE in strict mode8339var raf = inBrowser8340? window.requestAnimationFrame8341? window.requestAnimationFrame.bind(window)8342: setTimeout8343: /* istanbul ignore next */ function (/* istanbul ignore next */ fn) { return fn(); };8344function nextFrame(fn) {8345raf(function () {8346// @ts-expect-error8347raf(fn);8348});8349}8350function addTransitionClass(el, cls) {8351var transitionClasses = el._transitionClasses || (el._transitionClasses = []);8352if (transitionClasses.indexOf(cls) < 0) {8353transitionClasses.push(cls);8354addClass(el, cls);8355}8356}8357function removeTransitionClass(el, cls) {8358if (el._transitionClasses) {8359remove$2(el._transitionClasses, cls);8360}8361removeClass(el, cls);8362}8363function whenTransitionEnds(el, expectedType, cb) {8364var _a = getTransitionInfo(el, expectedType), type = _a.type, timeout = _a.timeout, propCount = _a.propCount;8365if (!type)8366return cb();8367var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;8368var ended = 0;8369var end = function () {8370el.removeEventListener(event, onEnd);8371cb();8372};8373var onEnd = function (e) {8374if (e.target === el) {8375if (++ended >= propCount) {8376end();8377}8378}8379};8380setTimeout(function () {8381if (ended < propCount) {8382end();8383}8384}, timeout + 1);8385el.addEventListener(event, onEnd);8386}8387var transformRE = /\b(transform|all)(,|$)/;8388function getTransitionInfo(el, expectedType) {8389var styles = window.getComputedStyle(el);8390// JSDOM may return undefined for transition properties8391var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');8392var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');8393var transitionTimeout = getTimeout(transitionDelays, transitionDurations);8394var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');8395var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');8396var animationTimeout = getTimeout(animationDelays, animationDurations);8397var type;8398var timeout = 0;8399var propCount = 0;8400/* istanbul ignore if */8401if (expectedType === TRANSITION) {8402if (transitionTimeout > 0) {8403type = TRANSITION;8404timeout = transitionTimeout;8405propCount = transitionDurations.length;8406}8407}8408else if (expectedType === ANIMATION) {8409if (animationTimeout > 0) {8410type = ANIMATION;8411timeout = animationTimeout;8412propCount = animationDurations.length;8413}8414}8415else {8416timeout = Math.max(transitionTimeout, animationTimeout);8417type =8418timeout > 08419? transitionTimeout > animationTimeout8420? TRANSITION8421: ANIMATION8422: null;8423propCount = type8424? type === TRANSITION8425? transitionDurations.length8426: animationDurations.length8427: 0;8428}8429var hasTransform = type === TRANSITION && transformRE.test(styles[transitionProp + 'Property']);8430return {8431type: type,8432timeout: timeout,8433propCount: propCount,8434hasTransform: hasTransform8435};8436}8437function getTimeout(delays, durations) {8438/* istanbul ignore next */8439while (delays.length < durations.length) {8440delays = delays.concat(delays);8441}8442return Math.max.apply(null, durations.map(function (d, i) {8443return toMs(d) + toMs(delays[i]);8444}));8445}8446// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers8447// in a locale-dependent way, using a comma instead of a dot.8448// If comma is not replaced with a dot, the input will be rounded down (i.e. acting8449// as a floor function) causing unexpected behaviors8450function toMs(s) {8451return Number(s.slice(0, -1).replace(',', '.')) * 1000;8452}8453
8454function enter(vnode, toggleDisplay) {8455var el = vnode.elm;8456// call leave callback now8457if (isDef(el._leaveCb)) {8458el._leaveCb.cancelled = true;8459el._leaveCb();8460}8461var data = resolveTransition(vnode.data.transition);8462if (isUndef(data)) {8463return;8464}8465/* istanbul ignore if */8466if (isDef(el._enterCb) || el.nodeType !== 1) {8467return;8468}8469var css = data.css, type = data.type, enterClass = data.enterClass, enterToClass = data.enterToClass, enterActiveClass = data.enterActiveClass, appearClass = data.appearClass, appearToClass = data.appearToClass, appearActiveClass = data.appearActiveClass, beforeEnter = data.beforeEnter, enter = data.enter, afterEnter = data.afterEnter, enterCancelled = data.enterCancelled, beforeAppear = data.beforeAppear, appear = data.appear, afterAppear = data.afterAppear, appearCancelled = data.appearCancelled, duration = data.duration;8470// activeInstance will always be the <transition> component managing this8471// transition. One edge case to check is when the <transition> is placed8472// as the root node of a child component. In that case we need to check8473// <transition>'s parent for appear check.8474var context = activeInstance;8475var transitionNode = activeInstance.$vnode;8476while (transitionNode && transitionNode.parent) {8477context = transitionNode.context;8478transitionNode = transitionNode.parent;8479}8480var isAppear = !context._isMounted || !vnode.isRootInsert;8481if (isAppear && !appear && appear !== '') {8482return;8483}8484var startClass = isAppear && appearClass ? appearClass : enterClass;8485var activeClass = isAppear && appearActiveClass ? appearActiveClass : enterActiveClass;8486var toClass = isAppear && appearToClass ? appearToClass : enterToClass;8487var beforeEnterHook = isAppear ? beforeAppear || beforeEnter : beforeEnter;8488var enterHook = isAppear ? (isFunction(appear) ? appear : enter) : enter;8489var afterEnterHook = isAppear ? afterAppear || afterEnter : afterEnter;8490var enterCancelledHook = isAppear8491? appearCancelled || enterCancelled8492: enterCancelled;8493var explicitEnterDuration = toNumber(isObject(duration) ? duration.enter : duration);8494if (explicitEnterDuration != null) {8495checkDuration(explicitEnterDuration, 'enter', vnode);8496}8497var expectsCSS = css !== false && !isIE9;8498var userWantsControl = getHookArgumentsLength(enterHook);8499var cb = (el._enterCb = once(function () {8500if (expectsCSS) {8501removeTransitionClass(el, toClass);8502removeTransitionClass(el, activeClass);8503}8504// @ts-expect-error8505if (cb.cancelled) {8506if (expectsCSS) {8507removeTransitionClass(el, startClass);8508}8509enterCancelledHook && enterCancelledHook(el);8510}8511else {8512afterEnterHook && afterEnterHook(el);8513}8514el._enterCb = null;8515}));8516if (!vnode.data.show) {8517// remove pending leave element on enter by injecting an insert hook8518mergeVNodeHook(vnode, 'insert', function () {8519var parent = el.parentNode;8520var pendingNode = parent && parent._pending && parent._pending[vnode.key];8521if (pendingNode &&8522pendingNode.tag === vnode.tag &&8523pendingNode.elm._leaveCb) {8524pendingNode.elm._leaveCb();8525}8526enterHook && enterHook(el, cb);8527});8528}8529// start enter transition8530beforeEnterHook && beforeEnterHook(el);8531if (expectsCSS) {8532addTransitionClass(el, startClass);8533addTransitionClass(el, activeClass);8534nextFrame(function () {8535removeTransitionClass(el, startClass);8536// @ts-expect-error8537if (!cb.cancelled) {8538addTransitionClass(el, toClass);8539if (!userWantsControl) {8540if (isValidDuration(explicitEnterDuration)) {8541setTimeout(cb, explicitEnterDuration);8542}8543else {8544whenTransitionEnds(el, type, cb);8545}8546}8547}8548});8549}8550if (vnode.data.show) {8551toggleDisplay && toggleDisplay();8552enterHook && enterHook(el, cb);8553}8554if (!expectsCSS && !userWantsControl) {8555cb();8556}8557}8558function leave(vnode, rm) {8559var el = vnode.elm;8560// call enter callback now8561if (isDef(el._enterCb)) {8562el._enterCb.cancelled = true;8563el._enterCb();8564}8565var data = resolveTransition(vnode.data.transition);8566if (isUndef(data) || el.nodeType !== 1) {8567return rm();8568}8569/* istanbul ignore if */8570if (isDef(el._leaveCb)) {8571return;8572}8573var css = data.css, type = data.type, leaveClass = data.leaveClass, leaveToClass = data.leaveToClass, leaveActiveClass = data.leaveActiveClass, beforeLeave = data.beforeLeave, leave = data.leave, afterLeave = data.afterLeave, leaveCancelled = data.leaveCancelled, delayLeave = data.delayLeave, duration = data.duration;8574var expectsCSS = css !== false && !isIE9;8575var userWantsControl = getHookArgumentsLength(leave);8576var explicitLeaveDuration = toNumber(isObject(duration) ? duration.leave : duration);8577if (isDef(explicitLeaveDuration)) {8578checkDuration(explicitLeaveDuration, 'leave', vnode);8579}8580var cb = (el._leaveCb = once(function () {8581if (el.parentNode && el.parentNode._pending) {8582el.parentNode._pending[vnode.key] = null;8583}8584if (expectsCSS) {8585removeTransitionClass(el, leaveToClass);8586removeTransitionClass(el, leaveActiveClass);8587}8588// @ts-expect-error8589if (cb.cancelled) {8590if (expectsCSS) {8591removeTransitionClass(el, leaveClass);8592}8593leaveCancelled && leaveCancelled(el);8594}8595else {8596rm();8597afterLeave && afterLeave(el);8598}8599el._leaveCb = null;8600}));8601if (delayLeave) {8602delayLeave(performLeave);8603}8604else {8605performLeave();8606}8607function performLeave() {8608// the delayed leave may have already been cancelled8609// @ts-expect-error8610if (cb.cancelled) {8611return;8612}8613// record leaving element8614if (!vnode.data.show && el.parentNode) {8615(el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] =8616vnode;8617}8618beforeLeave && beforeLeave(el);8619if (expectsCSS) {8620addTransitionClass(el, leaveClass);8621addTransitionClass(el, leaveActiveClass);8622nextFrame(function () {8623removeTransitionClass(el, leaveClass);8624// @ts-expect-error8625if (!cb.cancelled) {8626addTransitionClass(el, leaveToClass);8627if (!userWantsControl) {8628if (isValidDuration(explicitLeaveDuration)) {8629setTimeout(cb, explicitLeaveDuration);8630}8631else {8632whenTransitionEnds(el, type, cb);8633}8634}8635}8636});8637}8638leave && leave(el, cb);8639if (!expectsCSS && !userWantsControl) {8640cb();8641}8642}8643}8644// only used in dev mode8645function checkDuration(val, name, vnode) {8646if (typeof val !== 'number') {8647warn$2("<transition> explicit ".concat(name, " duration is not a valid number - ") +8648"got ".concat(JSON.stringify(val), "."), vnode.context);8649}8650else if (isNaN(val)) {8651warn$2("<transition> explicit ".concat(name, " duration is NaN - ") +8652'the duration expression might be incorrect.', vnode.context);8653}8654}8655function isValidDuration(val) {8656return typeof val === 'number' && !isNaN(val);8657}8658/**8659* Normalize a transition hook's argument length. The hook may be:
8660* - a merged hook (invoker) with the original in .fns
8661* - a wrapped component method (check ._length)
8662* - a plain function (.length)
8663*/
8664function getHookArgumentsLength(fn) {8665if (isUndef(fn)) {8666return false;8667}8668// @ts-expect-error8669var invokerFns = fn.fns;8670if (isDef(invokerFns)) {8671// invoker8672return getHookArgumentsLength(Array.isArray(invokerFns) ? invokerFns[0] : invokerFns);8673}8674else {8675// @ts-expect-error8676return (fn._length || fn.length) > 1;8677}8678}8679function _enter(_, vnode) {8680if (vnode.data.show !== true) {8681enter(vnode);8682}8683}8684var transition = inBrowser8685? {8686create: _enter,8687activate: _enter,8688remove: function (vnode, rm) {8689/* istanbul ignore else */8690if (vnode.data.show !== true) {8691// @ts-expect-error8692leave(vnode, rm);8693}8694else {8695rm();8696}8697}8698}8699: {};8700
8701var platformModules = [attrs, klass$1, events, domProps, style$1, transition];8702
8703// the directive module should be applied last, after all8704// built-in modules have been applied.8705var modules$1 = platformModules.concat(baseModules);8706var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules$1 });8707
8708/**8709* Not type checking this file because flow doesn't like attaching
8710* properties to Elements.
8711*/
8712/* istanbul ignore if */8713if (isIE9) {8714// http://www.matts411.com/post/internet-explorer-9-oninput/8715document.addEventListener('selectionchange', function () {8716var el = document.activeElement;8717// @ts-expect-error8718if (el && el.vmodel) {8719trigger(el, 'input');8720}8721});8722}8723var directive = {8724inserted: function (el, binding, vnode, oldVnode) {8725if (vnode.tag === 'select') {8726// #69038727if (oldVnode.elm && !oldVnode.elm._vOptions) {8728mergeVNodeHook(vnode, 'postpatch', function () {8729directive.componentUpdated(el, binding, vnode);8730});8731}8732else {8733setSelected(el, binding, vnode.context);8734}8735el._vOptions = [].map.call(el.options, getValue);8736}8737else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {8738el._vModifiers = binding.modifiers;8739if (!binding.modifiers.lazy) {8740el.addEventListener('compositionstart', onCompositionStart);8741el.addEventListener('compositionend', onCompositionEnd);8742// Safari < 10.2 & UIWebView doesn't fire compositionend when8743// switching focus before confirming composition choice8744// this also fixes the issue where some browsers e.g. iOS Chrome8745// fires "change" instead of "input" on autocomplete.8746el.addEventListener('change', onCompositionEnd);8747/* istanbul ignore if */8748if (isIE9) {8749el.vmodel = true;8750}8751}8752}8753},8754componentUpdated: function (el, binding, vnode) {8755if (vnode.tag === 'select') {8756setSelected(el, binding, vnode.context);8757// in case the options rendered by v-for have changed,8758// it's possible that the value is out-of-sync with the rendered options.8759// detect such cases and filter out values that no longer has a matching8760// option in the DOM.8761var prevOptions_1 = el._vOptions;8762var curOptions_1 = (el._vOptions = [].map.call(el.options, getValue));8763if (curOptions_1.some(function (o, i) { return !looseEqual(o, prevOptions_1[i]); })) {8764// trigger change event if8765// no matching option found for at least one value8766var needReset = el.multiple8767? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions_1); })8768: binding.value !== binding.oldValue &&8769hasNoMatchingOption(binding.value, curOptions_1);8770if (needReset) {8771trigger(el, 'change');8772}8773}8774}8775}8776};8777function setSelected(el, binding, vm) {8778actuallySetSelected(el, binding, vm);8779/* istanbul ignore if */8780if (isIE || isEdge) {8781setTimeout(function () {8782actuallySetSelected(el, binding, vm);8783}, 0);8784}8785}8786function actuallySetSelected(el, binding, vm) {8787var value = binding.value;8788var isMultiple = el.multiple;8789if (isMultiple && !Array.isArray(value)) {8790warn$2("<select multiple v-model=\"".concat(binding.expression, "\"> ") +8791"expects an Array value for its binding, but got ".concat(Object.prototype.toString8792.call(value)8793.slice(8, -1)), vm);8794return;8795}8796var selected, option;8797for (var i = 0, l = el.options.length; i < l; i++) {8798option = el.options[i];8799if (isMultiple) {8800selected = looseIndexOf(value, getValue(option)) > -1;8801if (option.selected !== selected) {8802option.selected = selected;8803}8804}8805else {8806if (looseEqual(getValue(option), value)) {8807if (el.selectedIndex !== i) {8808el.selectedIndex = i;8809}8810return;8811}8812}8813}8814if (!isMultiple) {8815el.selectedIndex = -1;8816}8817}8818function hasNoMatchingOption(value, options) {8819return options.every(function (o) { return !looseEqual(o, value); });8820}8821function getValue(option) {8822return '_value' in option ? option._value : option.value;8823}8824function onCompositionStart(e) {8825e.target.composing = true;8826}8827function onCompositionEnd(e) {8828// prevent triggering an input event for no reason8829if (!e.target.composing)8830return;8831e.target.composing = false;8832trigger(e.target, 'input');8833}8834function trigger(el, type) {8835var e = document.createEvent('HTMLEvents');8836e.initEvent(type, true, true);8837el.dispatchEvent(e);8838}8839
8840// recursively search for possible transition defined inside the component root8841function locateNode(vnode) {8842// @ts-expect-error8843return vnode.componentInstance && (!vnode.data || !vnode.data.transition)8844? locateNode(vnode.componentInstance._vnode)8845: vnode;8846}8847var show = {8848bind: function (el, _a, vnode) {8849var value = _a.value;8850vnode = locateNode(vnode);8851var transition = vnode.data && vnode.data.transition;8852var originalDisplay = (el.__vOriginalDisplay =8853el.style.display === 'none' ? '' : el.style.display);8854if (value && transition) {8855vnode.data.show = true;8856enter(vnode, function () {8857el.style.display = originalDisplay;8858});8859}8860else {8861el.style.display = value ? originalDisplay : 'none';8862}8863},8864update: function (el, _a, vnode) {8865var value = _a.value, oldValue = _a.oldValue;8866/* istanbul ignore if */8867if (!value === !oldValue)8868return;8869vnode = locateNode(vnode);8870var transition = vnode.data && vnode.data.transition;8871if (transition) {8872vnode.data.show = true;8873if (value) {8874enter(vnode, function () {8875el.style.display = el.__vOriginalDisplay;8876});8877}8878else {8879leave(vnode, function () {8880el.style.display = 'none';8881});8882}8883}8884else {8885el.style.display = value ? el.__vOriginalDisplay : 'none';8886}8887},8888unbind: function (el, binding, vnode, oldVnode, isDestroy) {8889if (!isDestroy) {8890el.style.display = el.__vOriginalDisplay;8891}8892}8893};8894
8895var platformDirectives = {8896model: directive,8897show: show8898};8899
8900// Provides transition support for a single element/component.8901var transitionProps = {8902name: String,8903appear: Boolean,8904css: Boolean,8905mode: String,8906type: String,8907enterClass: String,8908leaveClass: String,8909enterToClass: String,8910leaveToClass: String,8911enterActiveClass: String,8912leaveActiveClass: String,8913appearClass: String,8914appearActiveClass: String,8915appearToClass: String,8916duration: [Number, String, Object]8917};8918// in case the child is also an abstract component, e.g. <keep-alive>8919// we want to recursively retrieve the real component to be rendered8920function getRealChild(vnode) {8921var compOptions = vnode && vnode.componentOptions;8922if (compOptions && compOptions.Ctor.options.abstract) {8923return getRealChild(getFirstComponentChild(compOptions.children));8924}8925else {8926return vnode;8927}8928}8929function extractTransitionData(comp) {8930var data = {};8931var options = comp.$options;8932// props8933for (var key in options.propsData) {8934data[key] = comp[key];8935}8936// events.8937// extract listeners and pass them directly to the transition methods8938var listeners = options._parentListeners;8939for (var key in listeners) {8940data[camelize(key)] = listeners[key];8941}8942return data;8943}8944function placeholder(h, rawChild) {8945// @ts-expect-error8946if (/\d-keep-alive$/.test(rawChild.tag)) {8947return h('keep-alive', {8948props: rawChild.componentOptions.propsData8949});8950}8951}8952function hasParentTransition(vnode) {8953while ((vnode = vnode.parent)) {8954if (vnode.data.transition) {8955return true;8956}8957}8958}8959function isSameChild(child, oldChild) {8960return oldChild.key === child.key && oldChild.tag === child.tag;8961}8962var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };8963var isVShowDirective = function (d) { return d.name === 'show'; };8964var Transition = {8965name: 'transition',8966props: transitionProps,8967abstract: true,8968render: function (h) {8969var _this = this;8970var children = this.$slots.default;8971if (!children) {8972return;8973}8974// filter out text nodes (possible whitespaces)8975children = children.filter(isNotTextNode);8976/* istanbul ignore if */8977if (!children.length) {8978return;8979}8980// warn multiple elements8981if (children.length > 1) {8982warn$2('<transition> can only be used on a single element. Use ' +8983'<transition-group> for lists.', this.$parent);8984}8985var mode = this.mode;8986// warn invalid mode8987if (mode && mode !== 'in-out' && mode !== 'out-in') {8988warn$2('invalid <transition> mode: ' + mode, this.$parent);8989}8990var rawChild = children[0];8991// if this is a component root node and the component's8992// parent container node also has transition, skip.8993if (hasParentTransition(this.$vnode)) {8994return rawChild;8995}8996// apply transition data to child8997// use getRealChild() to ignore abstract components e.g. keep-alive8998var child = getRealChild(rawChild);8999/* istanbul ignore if */9000if (!child) {9001return rawChild;9002}9003if (this._leaving) {9004return placeholder(h, rawChild);9005}9006// ensure a key that is unique to the vnode type and to this transition9007// component instance. This key will be used to remove pending leaving nodes9008// during entering.9009var id = "__transition-".concat(this._uid, "-");9010child.key =9011child.key == null9012? child.isComment9013? id + 'comment'9014: id + child.tag9015: isPrimitive(child.key)9016? String(child.key).indexOf(id) === 09017? child.key9018: id + child.key9019: child.key;9020var data = ((child.data || (child.data = {})).transition =9021extractTransitionData(this));9022var oldRawChild = this._vnode;9023var oldChild = getRealChild(oldRawChild);9024// mark v-show9025// so that the transition module can hand over the control to the directive9026if (child.data.directives && child.data.directives.some(isVShowDirective)) {9027child.data.show = true;9028}9029if (oldChild &&9030oldChild.data &&9031!isSameChild(child, oldChild) &&9032!isAsyncPlaceholder(oldChild) &&9033// #6687 component root is a comment node9034!(oldChild.componentInstance &&9035oldChild.componentInstance._vnode.isComment)) {9036// replace old child transition data with fresh one9037// important for dynamic transitions!9038var oldData = (oldChild.data.transition = extend({}, data));9039// handle transition mode9040if (mode === 'out-in') {9041// return placeholder node and queue update when leave finishes9042this._leaving = true;9043mergeVNodeHook(oldData, 'afterLeave', function () {9044_this._leaving = false;9045_this.$forceUpdate();9046});9047return placeholder(h, rawChild);9048}9049else if (mode === 'in-out') {9050if (isAsyncPlaceholder(child)) {9051return oldRawChild;9052}9053var delayedLeave_1;9054var performLeave = function () {9055delayedLeave_1();9056};9057mergeVNodeHook(data, 'afterEnter', performLeave);9058mergeVNodeHook(data, 'enterCancelled', performLeave);9059mergeVNodeHook(oldData, 'delayLeave', function (leave) {9060delayedLeave_1 = leave;9061});9062}9063}9064return rawChild;9065}9066};9067
9068// Provides transition support for list items.9069var props = extend({9070tag: String,9071moveClass: String9072}, transitionProps);9073delete props.mode;9074var TransitionGroup = {9075props: props,9076beforeMount: function () {9077var _this = this;9078var update = this._update;9079this._update = function (vnode, hydrating) {9080var restoreActiveInstance = setActiveInstance(_this);9081// force removing pass9082_this.__patch__(_this._vnode, _this.kept, false, // hydrating9083true // removeOnly (!important, avoids unnecessary moves)9084);9085_this._vnode = _this.kept;9086restoreActiveInstance();9087update.call(_this, vnode, hydrating);9088};9089},9090render: function (h) {9091var tag = this.tag || this.$vnode.data.tag || 'span';9092var map = Object.create(null);9093var prevChildren = (this.prevChildren = this.children);9094var rawChildren = this.$slots.default || [];9095var children = (this.children = []);9096var transitionData = extractTransitionData(this);9097for (var i = 0; i < rawChildren.length; i++) {9098var c = rawChildren[i];9099if (c.tag) {9100if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {9101children.push(c);9102map[c.key] = c;9103(c.data || (c.data = {})).transition = transitionData;9104}9105else {9106var opts = c.componentOptions;9107var name_1 = opts9108? getComponentName(opts.Ctor.options) || opts.tag || ''9109: c.tag;9110warn$2("<transition-group> children must be keyed: <".concat(name_1, ">"));9111}9112}9113}9114if (prevChildren) {9115var kept = [];9116var removed = [];9117for (var i = 0; i < prevChildren.length; i++) {9118var c = prevChildren[i];9119c.data.transition = transitionData;9120// @ts-expect-error .getBoundingClientRect is not typed in Node9121c.data.pos = c.elm.getBoundingClientRect();9122if (map[c.key]) {9123kept.push(c);9124}9125else {9126removed.push(c);9127}9128}9129this.kept = h(tag, null, kept);9130this.removed = removed;9131}9132return h(tag, null, children);9133},9134updated: function () {9135var children = this.prevChildren;9136var moveClass = this.moveClass || (this.name || 'v') + '-move';9137if (!children.length || !this.hasMove(children[0].elm, moveClass)) {9138return;9139}9140// we divide the work into three loops to avoid mixing DOM reads and writes9141// in each iteration - which helps prevent layout thrashing.9142children.forEach(callPendingCbs);9143children.forEach(recordPosition);9144children.forEach(applyTranslation);9145// force reflow to put everything in position9146// assign to this to avoid being removed in tree-shaking9147// $flow-disable-line9148this._reflow = document.body.offsetHeight;9149children.forEach(function (c) {9150if (c.data.moved) {9151var el_1 = c.elm;9152var s = el_1.style;9153addTransitionClass(el_1, moveClass);9154s.transform = s.WebkitTransform = s.transitionDuration = '';9155el_1.addEventListener(transitionEndEvent, (el_1._moveCb = function cb(e) {9156if (e && e.target !== el_1) {9157return;9158}9159if (!e || /transform$/.test(e.propertyName)) {9160el_1.removeEventListener(transitionEndEvent, cb);9161el_1._moveCb = null;9162removeTransitionClass(el_1, moveClass);9163}9164}));9165}9166});9167},9168methods: {9169hasMove: function (el, moveClass) {9170/* istanbul ignore if */9171if (!hasTransition) {9172return false;9173}9174/* istanbul ignore if */9175if (this._hasMove) {9176return this._hasMove;9177}9178// Detect whether an element with the move class applied has9179// CSS transitions. Since the element may be inside an entering9180// transition at this very moment, we make a clone of it and remove9181// all other transition classes applied to ensure only the move class9182// is applied.9183var clone = el.cloneNode();9184if (el._transitionClasses) {9185el._transitionClasses.forEach(function (cls) {9186removeClass(clone, cls);9187});9188}9189addClass(clone, moveClass);9190clone.style.display = 'none';9191this.$el.appendChild(clone);9192var info = getTransitionInfo(clone);9193this.$el.removeChild(clone);9194return (this._hasMove = info.hasTransform);9195}9196}9197};9198function callPendingCbs(c) {9199/* istanbul ignore if */9200if (c.elm._moveCb) {9201c.elm._moveCb();9202}9203/* istanbul ignore if */9204if (c.elm._enterCb) {9205c.elm._enterCb();9206}9207}9208function recordPosition(c) {9209c.data.newPos = c.elm.getBoundingClientRect();9210}9211function applyTranslation(c) {9212var oldPos = c.data.pos;9213var newPos = c.data.newPos;9214var dx = oldPos.left - newPos.left;9215var dy = oldPos.top - newPos.top;9216if (dx || dy) {9217c.data.moved = true;9218var s = c.elm.style;9219s.transform = s.WebkitTransform = "translate(".concat(dx, "px,").concat(dy, "px)");9220s.transitionDuration = '0s';9221}9222}9223
9224var platformComponents = {9225Transition: Transition,9226TransitionGroup: TransitionGroup9227};9228
9229// install platform specific utils9230Vue.config.mustUseProp = mustUseProp;9231Vue.config.isReservedTag = isReservedTag;9232Vue.config.isReservedAttr = isReservedAttr;9233Vue.config.getTagNamespace = getTagNamespace;9234Vue.config.isUnknownElement = isUnknownElement;9235// install platform runtime directives & components9236extend(Vue.options.directives, platformDirectives);9237extend(Vue.options.components, platformComponents);9238// install platform patch function9239Vue.prototype.__patch__ = inBrowser ? patch : noop;9240// public mount method9241Vue.prototype.$mount = function (el, hydrating) {9242el = el && inBrowser ? query(el) : undefined;9243return mountComponent(this, el, hydrating);9244};9245// devtools global hook9246/* istanbul ignore next */9247if (inBrowser) {9248setTimeout(function () {9249if (config.devtools) {9250if (devtools) {9251devtools.emit('init', Vue);9252}9253else {9254// @ts-expect-error9255console[console.info ? 'info' : 'log']('Download the Vue Devtools extension for a better development experience:\n' +9256'https://github.com/vuejs/vue-devtools');9257}9258}9259if (config.productionTip !== false &&9260typeof console !== 'undefined') {9261// @ts-expect-error9262console[console.info ? 'info' : 'log']("You are running Vue in development mode.\n" +9263"Make sure to turn on production mode when deploying for production.\n" +9264"See more tips at https://vuejs.org/guide/deployment.html");9265}9266}, 0);9267}9268
9269var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;9270var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;9271var buildRegex = cached(function (delimiters) {9272var open = delimiters[0].replace(regexEscapeRE, '\\$&');9273var close = delimiters[1].replace(regexEscapeRE, '\\$&');9274return new RegExp(open + '((?:.|\\n)+?)' + close, 'g');9275});9276function parseText(text, delimiters) {9277//@ts-expect-error9278var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;9279if (!tagRE.test(text)) {9280return;9281}9282var tokens = [];9283var rawTokens = [];9284var lastIndex = (tagRE.lastIndex = 0);9285var match, index, tokenValue;9286while ((match = tagRE.exec(text))) {9287index = match.index;9288// push text token9289if (index > lastIndex) {9290rawTokens.push((tokenValue = text.slice(lastIndex, index)));9291tokens.push(JSON.stringify(tokenValue));9292}9293// tag token9294var exp = parseFilters(match[1].trim());9295tokens.push("_s(".concat(exp, ")"));9296rawTokens.push({ '@binding': exp });9297lastIndex = index + match[0].length;9298}9299if (lastIndex < text.length) {9300rawTokens.push((tokenValue = text.slice(lastIndex)));9301tokens.push(JSON.stringify(tokenValue));9302}9303return {9304expression: tokens.join('+'),9305tokens: rawTokens9306};9307}9308
9309function transformNode$1(el, options) {9310var warn = options.warn || baseWarn;9311var staticClass = getAndRemoveAttr(el, 'class');9312if (staticClass) {9313var res = parseText(staticClass, options.delimiters);9314if (res) {9315warn("class=\"".concat(staticClass, "\": ") +9316'Interpolation inside attributes has been removed. ' +9317'Use v-bind or the colon shorthand instead. For example, ' +9318'instead of <div class="{{ val }}">, use <div :class="val">.', el.rawAttrsMap['class']);9319}9320}9321if (staticClass) {9322el.staticClass = JSON.stringify(staticClass.replace(/\s+/g, ' ').trim());9323}9324var classBinding = getBindingAttr(el, 'class', false /* getStatic */);9325if (classBinding) {9326el.classBinding = classBinding;9327}9328}9329function genData$2(el) {9330var data = '';9331if (el.staticClass) {9332data += "staticClass:".concat(el.staticClass, ",");9333}9334if (el.classBinding) {9335data += "class:".concat(el.classBinding, ",");9336}9337return data;9338}9339var klass = {9340staticKeys: ['staticClass'],9341transformNode: transformNode$1,9342genData: genData$29343};9344
9345function transformNode(el, options) {9346var warn = options.warn || baseWarn;9347var staticStyle = getAndRemoveAttr(el, 'style');9348if (staticStyle) {9349/* istanbul ignore if */9350{9351var res = parseText(staticStyle, options.delimiters);9352if (res) {9353warn("style=\"".concat(staticStyle, "\": ") +9354'Interpolation inside attributes has been removed. ' +9355'Use v-bind or the colon shorthand instead. For example, ' +9356'instead of <div style="{{ val }}">, use <div :style="val">.', el.rawAttrsMap['style']);9357}9358}9359el.staticStyle = JSON.stringify(parseStyleText(staticStyle));9360}9361var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);9362if (styleBinding) {9363el.styleBinding = styleBinding;9364}9365}9366function genData$1(el) {9367var data = '';9368if (el.staticStyle) {9369data += "staticStyle:".concat(el.staticStyle, ",");9370}9371if (el.styleBinding) {9372data += "style:(".concat(el.styleBinding, "),");9373}9374return data;9375}9376var style = {9377staticKeys: ['staticStyle'],9378transformNode: transformNode,9379genData: genData$19380};9381
9382var decoder;9383var he = {9384decode: function (html) {9385decoder = decoder || document.createElement('div');9386decoder.innerHTML = html;9387return decoder.textContent;9388}9389};9390
9391var isUnaryTag = makeMap('area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +9392'link,meta,param,source,track,wbr');9393// Elements that you can, intentionally, leave open9394// (and which close themselves)9395var canBeLeftOpenTag = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source');9396// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-39397// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content9398var isNonPhrasingTag = makeMap('address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +9399'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +9400'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +9401'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +9402'title,tr,track');9403
9404/**9405* Not type-checking this file because it's mostly vendor code.
9406*/
9407// Regular Expressions for parsing tags and attributes9408var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;9409var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;9410var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(unicodeRegExp.source, "]*");9411var qnameCapture = "((?:".concat(ncname, "\\:)?").concat(ncname, ")");9412var startTagOpen = new RegExp("^<".concat(qnameCapture));9413var startTagClose = /^\s*(\/?)>/;9414var endTag = new RegExp("^<\\/".concat(qnameCapture, "[^>]*>"));9415var doctype = /^<!DOCTYPE [^>]+>/i;9416// #7298: escape - to avoid being passed as HTML comment when inlined in page9417var comment = /^<!\--/;9418var conditionalComment = /^<!\[/;9419// Special Elements (can contain anything)9420var isPlainTextElement = makeMap('script,style,textarea', true);9421var reCache = {};9422var decodingMap = {9423'<': '<',9424'>': '>',9425'"': '"',9426'&': '&',9427' ': '\n',9428'	': '\t',9429''': "'"9430};9431var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;9432var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;9433// #59929434var isIgnoreNewlineTag = makeMap('pre,textarea', true);9435var shouldIgnoreFirstNewline = function (tag, html) {9436return tag && isIgnoreNewlineTag(tag) && html[0] === '\n';9437};9438function decodeAttr(value, shouldDecodeNewlines) {9439var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;9440return value.replace(re, function (match) { return decodingMap[match]; });9441}9442function parseHTML(html, options) {9443var stack = [];9444var expectHTML = options.expectHTML;9445var isUnaryTag = options.isUnaryTag || no;9446var canBeLeftOpenTag = options.canBeLeftOpenTag || no;9447var index = 0;9448var last, lastTag;9449var _loop_1 = function () {9450last = html;9451// Make sure we're not in a plaintext content element like script/style9452if (!lastTag || !isPlainTextElement(lastTag)) {9453var textEnd = html.indexOf('<');9454if (textEnd === 0) {9455// Comment:9456if (comment.test(html)) {9457var commentEnd = html.indexOf('-->');9458if (commentEnd >= 0) {9459if (options.shouldKeepComment && options.comment) {9460options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);9461}9462advance(commentEnd + 3);9463return "continue";9464}9465}9466// http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment9467if (conditionalComment.test(html)) {9468var conditionalEnd = html.indexOf(']>');9469if (conditionalEnd >= 0) {9470advance(conditionalEnd + 2);9471return "continue";9472}9473}9474// Doctype:9475var doctypeMatch = html.match(doctype);9476if (doctypeMatch) {9477advance(doctypeMatch[0].length);9478return "continue";9479}9480// End tag:9481var endTagMatch = html.match(endTag);9482if (endTagMatch) {9483var curIndex = index;9484advance(endTagMatch[0].length);9485parseEndTag(endTagMatch[1], curIndex, index);9486return "continue";9487}9488// Start tag:9489var startTagMatch = parseStartTag();9490if (startTagMatch) {9491handleStartTag(startTagMatch);9492if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {9493advance(1);9494}9495return "continue";9496}9497}9498var text = void 0, rest = void 0, next = void 0;9499if (textEnd >= 0) {9500rest = html.slice(textEnd);9501while (!endTag.test(rest) &&9502!startTagOpen.test(rest) &&9503!comment.test(rest) &&9504!conditionalComment.test(rest)) {9505// < in plain text, be forgiving and treat it as text9506next = rest.indexOf('<', 1);9507if (next < 0)9508break;9509textEnd += next;9510rest = html.slice(textEnd);9511}9512text = html.substring(0, textEnd);9513}9514if (textEnd < 0) {9515text = html;9516}9517if (text) {9518advance(text.length);9519}9520if (options.chars && text) {9521options.chars(text, index - text.length, index);9522}9523}9524else {9525var endTagLength_1 = 0;9526var stackedTag_1 = lastTag.toLowerCase();9527var reStackedTag = reCache[stackedTag_1] ||9528(reCache[stackedTag_1] = new RegExp('([\\s\\S]*?)(</' + stackedTag_1 + '[^>]*>)', 'i'));9529var rest = html.replace(reStackedTag, function (all, text, endTag) {9530endTagLength_1 = endTag.length;9531if (!isPlainTextElement(stackedTag_1) && stackedTag_1 !== 'noscript') {9532text = text9533.replace(/<!\--([\s\S]*?)-->/g, '$1') // #72989534.replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');9535}9536if (shouldIgnoreFirstNewline(stackedTag_1, text)) {9537text = text.slice(1);9538}9539if (options.chars) {9540options.chars(text);9541}9542return '';9543});9544index += html.length - rest.length;9545html = rest;9546parseEndTag(stackedTag_1, index - endTagLength_1, index);9547}9548if (html === last) {9549options.chars && options.chars(html);9550if (!stack.length && options.warn) {9551options.warn("Mal-formatted tag at end of template: \"".concat(html, "\""), {9552start: index + html.length9553});9554}9555return "break";9556}9557};9558while (html) {9559var state_1 = _loop_1();9560if (state_1 === "break")9561break;9562}9563// Clean up any remaining tags9564parseEndTag();9565function advance(n) {9566index += n;9567html = html.substring(n);9568}9569function parseStartTag() {9570var start = html.match(startTagOpen);9571if (start) {9572var match = {9573tagName: start[1],9574attrs: [],9575start: index9576};9577advance(start[0].length);9578var end = void 0, attr = void 0;9579while (!(end = html.match(startTagClose)) &&9580(attr = html.match(dynamicArgAttribute) || html.match(attribute))) {9581attr.start = index;9582advance(attr[0].length);9583attr.end = index;9584match.attrs.push(attr);9585}9586if (end) {9587match.unarySlash = end[1];9588advance(end[0].length);9589match.end = index;9590return match;9591}9592}9593}9594function handleStartTag(match) {9595var tagName = match.tagName;9596var unarySlash = match.unarySlash;9597if (expectHTML) {9598if (lastTag === 'p' && isNonPhrasingTag(tagName)) {9599parseEndTag(lastTag);9600}9601if (canBeLeftOpenTag(tagName) && lastTag === tagName) {9602parseEndTag(tagName);9603}9604}9605var unary = isUnaryTag(tagName) || !!unarySlash;9606var l = match.attrs.length;9607var attrs = new Array(l);9608for (var i = 0; i < l; i++) {9609var args = match.attrs[i];9610var value = args[3] || args[4] || args[5] || '';9611var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'9612? options.shouldDecodeNewlinesForHref9613: options.shouldDecodeNewlines;9614attrs[i] = {9615name: args[1],9616value: decodeAttr(value, shouldDecodeNewlines)9617};9618if (options.outputSourceRange) {9619attrs[i].start = args.start + args[0].match(/^\s*/).length;9620attrs[i].end = args.end;9621}9622}9623if (!unary) {9624stack.push({9625tag: tagName,9626lowerCasedTag: tagName.toLowerCase(),9627attrs: attrs,9628start: match.start,9629end: match.end9630});9631lastTag = tagName;9632}9633if (options.start) {9634options.start(tagName, attrs, unary, match.start, match.end);9635}9636}9637function parseEndTag(tagName, start, end) {9638var pos, lowerCasedTagName;9639if (start == null)9640start = index;9641if (end == null)9642end = index;9643// Find the closest opened tag of the same type9644if (tagName) {9645lowerCasedTagName = tagName.toLowerCase();9646for (pos = stack.length - 1; pos >= 0; pos--) {9647if (stack[pos].lowerCasedTag === lowerCasedTagName) {9648break;9649}9650}9651}9652else {9653// If no tag name is provided, clean shop9654pos = 0;9655}9656if (pos >= 0) {9657// Close all the open elements, up the stack9658for (var i = stack.length - 1; i >= pos; i--) {9659if ((i > pos || !tagName) && options.warn) {9660options.warn("tag <".concat(stack[i].tag, "> has no matching end tag."), {9661start: stack[i].start,9662end: stack[i].end9663});9664}9665if (options.end) {9666options.end(stack[i].tag, start, end);9667}9668}9669// Remove the open elements from the stack9670stack.length = pos;9671lastTag = pos && stack[pos - 1].tag;9672}9673else if (lowerCasedTagName === 'br') {9674if (options.start) {9675options.start(tagName, [], true, start, end);9676}9677}9678else if (lowerCasedTagName === 'p') {9679if (options.start) {9680options.start(tagName, [], false, start, end);9681}9682if (options.end) {9683options.end(tagName, start, end);9684}9685}9686}9687}9688
9689var onRE = /^@|^v-on:/;9690var dirRE = /^v-|^@|^:|^#/;9691var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;9692var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;9693var stripParensRE = /^\(|\)$/g;9694var dynamicArgRE = /^\[.*\]$/;9695var argRE = /:(.*)$/;9696var bindRE = /^:|^\.|^v-bind:/;9697var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;9698var slotRE = /^v-slot(:|$)|^#/;9699var lineBreakRE = /[\r\n]/;9700var whitespaceRE = /[ \f\t\r\n]+/g;9701var invalidAttributeRE = /[\s"'<>\/=]/;9702var decodeHTMLCached = cached(he.decode);9703var emptySlotScopeToken = "_empty_";9704// configurable state9705var warn;9706var delimiters;9707var transforms;9708var preTransforms;9709var postTransforms;9710var platformIsPreTag;9711var platformMustUseProp;9712var platformGetTagNamespace;9713var maybeComponent;9714function createASTElement(tag, attrs, parent) {9715return {9716type: 1,9717tag: tag,9718attrsList: attrs,9719attrsMap: makeAttrsMap(attrs),9720rawAttrsMap: {},9721parent: parent,9722children: []9723};9724}9725/**9726* Convert HTML string to AST.
9727*/
9728function parse(template, options) {9729warn = options.warn || baseWarn;9730platformIsPreTag = options.isPreTag || no;9731platformMustUseProp = options.mustUseProp || no;9732platformGetTagNamespace = options.getTagNamespace || no;9733var isReservedTag = options.isReservedTag || no;9734maybeComponent = function (el) {9735return !!(el.component ||9736el.attrsMap[':is'] ||9737el.attrsMap['v-bind:is'] ||9738!(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag)));9739};9740transforms = pluckModuleFunction(options.modules, 'transformNode');9741preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');9742postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');9743delimiters = options.delimiters;9744var stack = [];9745var preserveWhitespace = options.preserveWhitespace !== false;9746var whitespaceOption = options.whitespace;9747var root;9748var currentParent;9749var inVPre = false;9750var inPre = false;9751var warned = false;9752function warnOnce(msg, range) {9753if (!warned) {9754warned = true;9755warn(msg, range);9756}9757}9758function closeElement(element) {9759trimEndingWhitespace(element);9760if (!inVPre && !element.processed) {9761element = processElement(element, options);9762}9763// tree management9764if (!stack.length && element !== root) {9765// allow root elements with v-if, v-else-if and v-else9766if (root.if && (element.elseif || element.else)) {9767{9768checkRootConstraints(element);9769}9770addIfCondition(root, {9771exp: element.elseif,9772block: element9773});9774}9775else {9776warnOnce("Component template should contain exactly one root element. " +9777"If you are using v-if on multiple elements, " +9778"use v-else-if to chain them instead.", { start: element.start });9779}9780}9781if (currentParent && !element.forbidden) {9782if (element.elseif || element.else) {9783processIfConditions(element, currentParent);9784}9785else {9786if (element.slotScope) {9787// scoped slot9788// keep it in the children list so that v-else(-if) conditions can9789// find it as the prev node.9790var name_1 = element.slotTarget || '"default"';9791(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name_1] = element;9792}9793currentParent.children.push(element);9794element.parent = currentParent;9795}9796}9797// final children cleanup9798// filter out scoped slots9799element.children = element.children.filter(function (c) { return !c.slotScope; });9800// remove trailing whitespace node again9801trimEndingWhitespace(element);9802// check pre state9803if (element.pre) {9804inVPre = false;9805}9806if (platformIsPreTag(element.tag)) {9807inPre = false;9808}9809// apply post-transforms9810for (var i = 0; i < postTransforms.length; i++) {9811postTransforms[i](element, options);9812}9813}9814function trimEndingWhitespace(el) {9815// remove trailing whitespace node9816if (!inPre) {9817var lastNode = void 0;9818while ((lastNode = el.children[el.children.length - 1]) &&9819lastNode.type === 3 &&9820lastNode.text === ' ') {9821el.children.pop();9822}9823}9824}9825function checkRootConstraints(el) {9826if (el.tag === 'slot' || el.tag === 'template') {9827warnOnce("Cannot use <".concat(el.tag, "> as component root element because it may ") +9828'contain multiple nodes.', { start: el.start });9829}9830if (el.attrsMap.hasOwnProperty('v-for')) {9831warnOnce('Cannot use v-for on stateful component root element because ' +9832'it renders multiple elements.', el.rawAttrsMap['v-for']);9833}9834}9835parseHTML(template, {9836warn: warn,9837expectHTML: options.expectHTML,9838isUnaryTag: options.isUnaryTag,9839canBeLeftOpenTag: options.canBeLeftOpenTag,9840shouldDecodeNewlines: options.shouldDecodeNewlines,9841shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,9842shouldKeepComment: options.comments,9843outputSourceRange: options.outputSourceRange,9844start: function (tag, attrs, unary, start, end) {9845// check namespace.9846// inherit parent ns if there is one9847var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);9848// handle IE svg bug9849/* istanbul ignore if */9850if (isIE && ns === 'svg') {9851attrs = guardIESVGBug(attrs);9852}9853var element = createASTElement(tag, attrs, currentParent);9854if (ns) {9855element.ns = ns;9856}9857{9858if (options.outputSourceRange) {9859element.start = start;9860element.end = end;9861element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {9862cumulated[attr.name] = attr;9863return cumulated;9864}, {});9865}9866attrs.forEach(function (attr) {9867if (invalidAttributeRE.test(attr.name)) {9868warn("Invalid dynamic argument expression: attribute names cannot contain " +9869"spaces, quotes, <, >, / or =.", options.outputSourceRange9870? {9871start: attr.start + attr.name.indexOf("["),9872end: attr.start + attr.name.length9873}9874: undefined);9875}9876});9877}9878if (isForbiddenTag(element) && !isServerRendering()) {9879element.forbidden = true;9880warn('Templates should only be responsible for mapping the state to the ' +9881'UI. Avoid placing tags with side-effects in your templates, such as ' +9882"<".concat(tag, ">") +9883', as they will not be parsed.', { start: element.start });9884}9885// apply pre-transforms9886for (var i = 0; i < preTransforms.length; i++) {9887element = preTransforms[i](element, options) || element;9888}9889if (!inVPre) {9890processPre(element);9891if (element.pre) {9892inVPre = true;9893}9894}9895if (platformIsPreTag(element.tag)) {9896inPre = true;9897}9898if (inVPre) {9899processRawAttrs(element);9900}9901else if (!element.processed) {9902// structural directives9903processFor(element);9904processIf(element);9905processOnce(element);9906}9907if (!root) {9908root = element;9909{9910checkRootConstraints(root);9911}9912}9913if (!unary) {9914currentParent = element;9915stack.push(element);9916}9917else {9918closeElement(element);9919}9920},9921end: function (tag, start, end) {9922var element = stack[stack.length - 1];9923// pop stack9924stack.length -= 1;9925currentParent = stack[stack.length - 1];9926if (options.outputSourceRange) {9927element.end = end;9928}9929closeElement(element);9930},9931chars: function (text, start, end) {9932if (!currentParent) {9933{9934if (text === template) {9935warnOnce('Component template requires a root element, rather than just text.', { start: start });9936}9937else if ((text = text.trim())) {9938warnOnce("text \"".concat(text, "\" outside root element will be ignored."), {9939start: start9940});9941}9942}9943return;9944}9945// IE textarea placeholder bug9946/* istanbul ignore if */9947if (isIE &&9948currentParent.tag === 'textarea' &&9949currentParent.attrsMap.placeholder === text) {9950return;9951}9952var children = currentParent.children;9953if (inPre || text.trim()) {9954text = isTextTag(currentParent)9955? text9956: decodeHTMLCached(text);9957}9958else if (!children.length) {9959// remove the whitespace-only node right after an opening tag9960text = '';9961}9962else if (whitespaceOption) {9963if (whitespaceOption === 'condense') {9964// in condense mode, remove the whitespace node if it contains9965// line break, otherwise condense to a single space9966text = lineBreakRE.test(text) ? '' : ' ';9967}9968else {9969text = ' ';9970}9971}9972else {9973text = preserveWhitespace ? ' ' : '';9974}9975if (text) {9976if (!inPre && whitespaceOption === 'condense') {9977// condense consecutive whitespaces into single space9978text = text.replace(whitespaceRE, ' ');9979}9980var res = void 0;9981var child = void 0;9982if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {9983child = {9984type: 2,9985expression: res.expression,9986tokens: res.tokens,9987text: text9988};9989}9990else if (text !== ' ' ||9991!children.length ||9992children[children.length - 1].text !== ' ') {9993child = {9994type: 3,9995text: text9996};9997}9998if (child) {9999if (options.outputSourceRange) {10000child.start = start;10001child.end = end;10002}10003children.push(child);10004}10005}10006},10007comment: function (text, start, end) {10008// adding anything as a sibling to the root node is forbidden10009// comments should still be allowed, but ignored10010if (currentParent) {10011var child = {10012type: 3,10013text: text,10014isComment: true10015};10016if (options.outputSourceRange) {10017child.start = start;10018child.end = end;10019}10020currentParent.children.push(child);10021}10022}10023});10024return root;10025}10026function processPre(el) {10027if (getAndRemoveAttr(el, 'v-pre') != null) {10028el.pre = true;10029}10030}10031function processRawAttrs(el) {10032var list = el.attrsList;10033var len = list.length;10034if (len) {10035var attrs = (el.attrs = new Array(len));10036for (var i = 0; i < len; i++) {10037attrs[i] = {10038name: list[i].name,10039value: JSON.stringify(list[i].value)10040};10041if (list[i].start != null) {10042attrs[i].start = list[i].start;10043attrs[i].end = list[i].end;10044}10045}10046}10047else if (!el.pre) {10048// non root node in pre blocks with no attributes10049el.plain = true;10050}10051}10052function processElement(element, options) {10053processKey(element);10054// determine whether this is a plain element after10055// removing structural attributes10056element.plain =10057!element.key && !element.scopedSlots && !element.attrsList.length;10058processRef(element);10059processSlotContent(element);10060processSlotOutlet(element);10061processComponent(element);10062for (var i = 0; i < transforms.length; i++) {10063element = transforms[i](element, options) || element;10064}10065processAttrs(element);10066return element;10067}10068function processKey(el) {10069var exp = getBindingAttr(el, 'key');10070if (exp) {10071{10072if (el.tag === 'template') {10073warn("<template> cannot be keyed. Place the key on real elements instead.", getRawBindingAttr(el, 'key'));10074}10075if (el.for) {10076var iterator = el.iterator2 || el.iterator1;10077var parent_1 = el.parent;10078if (iterator &&10079iterator === exp &&10080parent_1 &&10081parent_1.tag === 'transition-group') {10082warn("Do not use v-for index as key on <transition-group> children, " +10083"this is the same as not using keys.", getRawBindingAttr(el, 'key'), true /* tip */);10084}10085}10086}10087el.key = exp;10088}10089}10090function processRef(el) {10091var ref = getBindingAttr(el, 'ref');10092if (ref) {10093el.ref = ref;10094el.refInFor = checkInFor(el);10095}10096}10097function processFor(el) {10098var exp;10099if ((exp = getAndRemoveAttr(el, 'v-for'))) {10100var res = parseFor(exp);10101if (res) {10102extend(el, res);10103}10104else {10105warn("Invalid v-for expression: ".concat(exp), el.rawAttrsMap['v-for']);10106}10107}10108}10109function parseFor(exp) {10110var inMatch = exp.match(forAliasRE);10111if (!inMatch)10112return;10113var res = {};10114res.for = inMatch[2].trim();10115var alias = inMatch[1].trim().replace(stripParensRE, '');10116var iteratorMatch = alias.match(forIteratorRE);10117if (iteratorMatch) {10118res.alias = alias.replace(forIteratorRE, '').trim();10119res.iterator1 = iteratorMatch[1].trim();10120if (iteratorMatch[2]) {10121res.iterator2 = iteratorMatch[2].trim();10122}10123}10124else {10125res.alias = alias;10126}10127return res;10128}10129function processIf(el) {10130var exp = getAndRemoveAttr(el, 'v-if');10131if (exp) {10132el.if = exp;10133addIfCondition(el, {10134exp: exp,10135block: el10136});10137}10138else {10139if (getAndRemoveAttr(el, 'v-else') != null) {10140el.else = true;10141}10142var elseif = getAndRemoveAttr(el, 'v-else-if');10143if (elseif) {10144el.elseif = elseif;10145}10146}10147}10148function processIfConditions(el, parent) {10149var prev = findPrevElement(parent.children);10150if (prev && prev.if) {10151addIfCondition(prev, {10152exp: el.elseif,10153block: el10154});10155}10156else {10157warn("v-".concat(el.elseif ? 'else-if="' + el.elseif + '"' : 'else', " ") +10158"used on element <".concat(el.tag, "> without corresponding v-if."), el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']);10159}10160}10161function findPrevElement(children) {10162var i = children.length;10163while (i--) {10164if (children[i].type === 1) {10165return children[i];10166}10167else {10168if (children[i].text !== ' ') {10169warn("text \"".concat(children[i].text.trim(), "\" between v-if and v-else(-if) ") +10170"will be ignored.", children[i]);10171}10172children.pop();10173}10174}10175}10176function addIfCondition(el, condition) {10177if (!el.ifConditions) {10178el.ifConditions = [];10179}10180el.ifConditions.push(condition);10181}10182function processOnce(el) {10183var once = getAndRemoveAttr(el, 'v-once');10184if (once != null) {10185el.once = true;10186}10187}10188// handle content being passed to a component as slot,10189// e.g. <template slot="xxx">, <div slot-scope="xxx">10190function processSlotContent(el) {10191var slotScope;10192if (el.tag === 'template') {10193slotScope = getAndRemoveAttr(el, 'scope');10194/* istanbul ignore if */10195if (slotScope) {10196warn("the \"scope\" attribute for scoped slots have been deprecated and " +10197"replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +10198"can also be used on plain elements in addition to <template> to " +10199"denote scoped slots.", el.rawAttrsMap['scope'], true);10200}10201el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');10202}10203else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {10204/* istanbul ignore if */10205if (el.attrsMap['v-for']) {10206warn("Ambiguous combined usage of slot-scope and v-for on <".concat(el.tag, "> ") +10207"(v-for takes higher priority). Use a wrapper <template> for the " +10208"scoped slot to make it clearer.", el.rawAttrsMap['slot-scope'], true);10209}10210el.slotScope = slotScope;10211}10212// slot="xxx"10213var slotTarget = getBindingAttr(el, 'slot');10214if (slotTarget) {10215el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;10216el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);10217// preserve slot as an attribute for native shadow DOM compat10218// only for non-scoped slots.10219if (el.tag !== 'template' && !el.slotScope) {10220addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));10221}10222}10223// 2.6 v-slot syntax10224{10225if (el.tag === 'template') {10226// v-slot on <template>10227var slotBinding = getAndRemoveAttrByRegex(el, slotRE);10228if (slotBinding) {10229{10230if (el.slotTarget || el.slotScope) {10231warn("Unexpected mixed usage of different slot syntaxes.", el);10232}10233if (el.parent && !maybeComponent(el.parent)) {10234warn("<template v-slot> can only appear at the root level inside " +10235"the receiving component", el);10236}10237}10238var _a = getSlotName(slotBinding), name_2 = _a.name, dynamic = _a.dynamic;10239el.slotTarget = name_2;10240el.slotTargetDynamic = dynamic;10241el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf10242}10243}10244else {10245// v-slot on component, denotes default slot10246var slotBinding = getAndRemoveAttrByRegex(el, slotRE);10247if (slotBinding) {10248{10249if (!maybeComponent(el)) {10250warn("v-slot can only be used on components or <template>.", slotBinding);10251}10252if (el.slotScope || el.slotTarget) {10253warn("Unexpected mixed usage of different slot syntaxes.", el);10254}10255if (el.scopedSlots) {10256warn("To avoid scope ambiguity, the default slot should also use " +10257"<template> syntax when there are other named slots.", slotBinding);10258}10259}10260// add the component's children to its default slot10261var slots = el.scopedSlots || (el.scopedSlots = {});10262var _b = getSlotName(slotBinding), name_3 = _b.name, dynamic = _b.dynamic;10263var slotContainer_1 = (slots[name_3] = createASTElement('template', [], el));10264slotContainer_1.slotTarget = name_3;10265slotContainer_1.slotTargetDynamic = dynamic;10266slotContainer_1.children = el.children.filter(function (c) {10267if (!c.slotScope) {10268c.parent = slotContainer_1;10269return true;10270}10271});10272slotContainer_1.slotScope = slotBinding.value || emptySlotScopeToken;10273// remove children as they are returned from scopedSlots now10274el.children = [];10275// mark el non-plain so data gets generated10276el.plain = false;10277}10278}10279}10280}10281function getSlotName(binding) {10282var name = binding.name.replace(slotRE, '');10283if (!name) {10284if (binding.name[0] !== '#') {10285name = 'default';10286}10287else {10288warn("v-slot shorthand syntax requires a slot name.", binding);10289}10290}10291return dynamicArgRE.test(name)10292? // dynamic [name]10293{ name: name.slice(1, -1), dynamic: true }10294: // static name10295{ name: "\"".concat(name, "\""), dynamic: false };10296}10297// handle <slot/> outlets10298function processSlotOutlet(el) {10299if (el.tag === 'slot') {10300el.slotName = getBindingAttr(el, 'name');10301if (el.key) {10302warn("`key` does not work on <slot> because slots are abstract outlets " +10303"and can possibly expand into multiple elements. " +10304"Use the key on a wrapping element instead.", getRawBindingAttr(el, 'key'));10305}10306}10307}10308function processComponent(el) {10309var binding;10310if ((binding = getBindingAttr(el, 'is'))) {10311el.component = binding;10312}10313if (getAndRemoveAttr(el, 'inline-template') != null) {10314el.inlineTemplate = true;10315}10316}10317function processAttrs(el) {10318var list = el.attrsList;10319var i, l, name, rawName, value, modifiers, syncGen, isDynamic;10320for (i = 0, l = list.length; i < l; i++) {10321name = rawName = list[i].name;10322value = list[i].value;10323if (dirRE.test(name)) {10324// mark element as dynamic10325el.hasBindings = true;10326// modifiers10327modifiers = parseModifiers(name.replace(dirRE, ''));10328// support .foo shorthand syntax for the .prop modifier10329if (modifiers) {10330name = name.replace(modifierRE, '');10331}10332if (bindRE.test(name)) {10333// v-bind10334name = name.replace(bindRE, '');10335value = parseFilters(value);10336isDynamic = dynamicArgRE.test(name);10337if (isDynamic) {10338name = name.slice(1, -1);10339}10340if (value.trim().length === 0) {10341warn("The value for a v-bind expression cannot be empty. Found in \"v-bind:".concat(name, "\""));10342}10343if (modifiers) {10344if (modifiers.prop && !isDynamic) {10345name = camelize(name);10346if (name === 'innerHtml')10347name = 'innerHTML';10348}10349if (modifiers.camel && !isDynamic) {10350name = camelize(name);10351}10352if (modifiers.sync) {10353syncGen = genAssignmentCode(value, "$event");10354if (!isDynamic) {10355addHandler(el, "update:".concat(camelize(name)), syncGen, null, false, warn, list[i]);10356if (hyphenate(name) !== camelize(name)) {10357addHandler(el, "update:".concat(hyphenate(name)), syncGen, null, false, warn, list[i]);10358}10359}10360else {10361// handler w/ dynamic event name10362addHandler(el, "\"update:\"+(".concat(name, ")"), syncGen, null, false, warn, list[i], true // dynamic10363);10364}10365}10366}10367if ((modifiers && modifiers.prop) ||10368(!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name))) {10369addProp(el, name, value, list[i], isDynamic);10370}10371else {10372addAttr(el, name, value, list[i], isDynamic);10373}10374}10375else if (onRE.test(name)) {10376// v-on10377name = name.replace(onRE, '');10378isDynamic = dynamicArgRE.test(name);10379if (isDynamic) {10380name = name.slice(1, -1);10381}10382addHandler(el, name, value, modifiers, false, warn, list[i], isDynamic);10383}10384else {10385// normal directives10386name = name.replace(dirRE, '');10387// parse arg10388var argMatch = name.match(argRE);10389var arg = argMatch && argMatch[1];10390isDynamic = false;10391if (arg) {10392name = name.slice(0, -(arg.length + 1));10393if (dynamicArgRE.test(arg)) {10394arg = arg.slice(1, -1);10395isDynamic = true;10396}10397}10398addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);10399if (name === 'model') {10400checkForAliasModel(el, value);10401}10402}10403}10404else {10405// literal attribute10406{10407var res = parseText(value, delimiters);10408if (res) {10409warn("".concat(name, "=\"").concat(value, "\": ") +10410'Interpolation inside attributes has been removed. ' +10411'Use v-bind or the colon shorthand instead. For example, ' +10412'instead of <div id="{{ val }}">, use <div :id="val">.', list[i]);10413}10414}10415addAttr(el, name, JSON.stringify(value), list[i]);10416// #6887 firefox doesn't update muted state if set via attribute10417// even immediately after element creation10418if (!el.component &&10419name === 'muted' &&10420platformMustUseProp(el.tag, el.attrsMap.type, name)) {10421addProp(el, name, 'true', list[i]);10422}10423}10424}10425}10426function checkInFor(el) {10427var parent = el;10428while (parent) {10429if (parent.for !== undefined) {10430return true;10431}10432parent = parent.parent;10433}10434return false;10435}10436function parseModifiers(name) {10437var match = name.match(modifierRE);10438if (match) {10439var ret_1 = {};10440match.forEach(function (m) {10441ret_1[m.slice(1)] = true;10442});10443return ret_1;10444}10445}10446function makeAttrsMap(attrs) {10447var map = {};10448for (var i = 0, l = attrs.length; i < l; i++) {10449if (map[attrs[i].name] && !isIE && !isEdge) {10450warn('duplicate attribute: ' + attrs[i].name, attrs[i]);10451}10452map[attrs[i].name] = attrs[i].value;10453}10454return map;10455}10456// for script (e.g. type="x/template") or style, do not decode content10457function isTextTag(el) {10458return el.tag === 'script' || el.tag === 'style';10459}10460function isForbiddenTag(el) {10461return (el.tag === 'style' ||10462(el.tag === 'script' &&10463(!el.attrsMap.type || el.attrsMap.type === 'text/javascript')));10464}10465var ieNSBug = /^xmlns:NS\d+/;10466var ieNSPrefix = /^NS\d+:/;10467/* istanbul ignore next */10468function guardIESVGBug(attrs) {10469var res = [];10470for (var i = 0; i < attrs.length; i++) {10471var attr = attrs[i];10472if (!ieNSBug.test(attr.name)) {10473attr.name = attr.name.replace(ieNSPrefix, '');10474res.push(attr);10475}10476}10477return res;10478}10479function checkForAliasModel(el, value) {10480var _el = el;10481while (_el) {10482if (_el.for && _el.alias === value) {10483warn("<".concat(el.tag, " v-model=\"").concat(value, "\">: ") +10484"You are binding v-model directly to a v-for iteration alias. " +10485"This will not be able to modify the v-for source array because " +10486"writing to the alias is like modifying a function local variable. " +10487"Consider using an array of objects and use v-model on an object property instead.", el.rawAttrsMap['v-model']);10488}10489_el = _el.parent;10490}10491}10492
10493/**10494* Expand input[v-model] with dynamic type bindings into v-if-else chains
10495* Turn this:
10496* <input v-model="data[type]" :type="type">
10497* into this:
10498* <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]">
10499* <input v-else-if="type === 'radio'" type="radio" v-model="data[type]">
10500* <input v-else :type="type" v-model="data[type]">
10501*/
10502function preTransformNode(el, options) {10503if (el.tag === 'input') {10504var map = el.attrsMap;10505if (!map['v-model']) {10506return;10507}10508var typeBinding = void 0;10509if (map[':type'] || map['v-bind:type']) {10510typeBinding = getBindingAttr(el, 'type');10511}10512if (!map.type && !typeBinding && map['v-bind']) {10513typeBinding = "(".concat(map['v-bind'], ").type");10514}10515if (typeBinding) {10516var ifCondition = getAndRemoveAttr(el, 'v-if', true);10517var ifConditionExtra = ifCondition ? "&&(".concat(ifCondition, ")") : "";10518var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;10519var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);10520// 1. checkbox10521var branch0 = cloneASTElement(el);10522// process for on the main node10523processFor(branch0);10524addRawAttr(branch0, 'type', 'checkbox');10525processElement(branch0, options);10526branch0.processed = true; // prevent it from double-processed10527branch0.if = "(".concat(typeBinding, ")==='checkbox'") + ifConditionExtra;10528addIfCondition(branch0, {10529exp: branch0.if,10530block: branch010531});10532// 2. add radio else-if condition10533var branch1 = cloneASTElement(el);10534getAndRemoveAttr(branch1, 'v-for', true);10535addRawAttr(branch1, 'type', 'radio');10536processElement(branch1, options);10537addIfCondition(branch0, {10538exp: "(".concat(typeBinding, ")==='radio'") + ifConditionExtra,10539block: branch110540});10541// 3. other10542var branch2 = cloneASTElement(el);10543getAndRemoveAttr(branch2, 'v-for', true);10544addRawAttr(branch2, ':type', typeBinding);10545processElement(branch2, options);10546addIfCondition(branch0, {10547exp: ifCondition,10548block: branch210549});10550if (hasElse) {10551branch0.else = true;10552}10553else if (elseIfCondition) {10554branch0.elseif = elseIfCondition;10555}10556return branch0;10557}10558}10559}10560function cloneASTElement(el) {10561return createASTElement(el.tag, el.attrsList.slice(), el.parent);10562}10563var model = {10564preTransformNode: preTransformNode10565};10566
10567var modules = [klass, style, model];10568
10569function text(el, dir) {10570if (dir.value) {10571addProp(el, 'textContent', "_s(".concat(dir.value, ")"), dir);10572}10573}10574
10575function html(el, dir) {10576if (dir.value) {10577addProp(el, 'innerHTML', "_s(".concat(dir.value, ")"), dir);10578}10579}10580
10581var directives = {10582model: model$1,10583text: text,10584html: html10585};10586
10587var baseOptions = {10588expectHTML: true,10589modules: modules,10590directives: directives,10591isPreTag: isPreTag,10592isUnaryTag: isUnaryTag,10593mustUseProp: mustUseProp,10594canBeLeftOpenTag: canBeLeftOpenTag,10595isReservedTag: isReservedTag,10596getTagNamespace: getTagNamespace,10597staticKeys: genStaticKeys$1(modules)10598};10599
10600var isStaticKey;10601var isPlatformReservedTag;10602var genStaticKeysCached = cached(genStaticKeys);10603/**10604* Goal of the optimizer: walk the generated template AST tree
10605* and detect sub-trees that are purely static, i.e. parts of
10606* the DOM that never needs to change.
10607*
10608* Once we detect these sub-trees, we can:
10609*
10610* 1. Hoist them into constants, so that we no longer need to
10611* create fresh nodes for them on each re-render;
10612* 2. Completely skip them in the patching process.
10613*/
10614function optimize(root, options) {10615if (!root)10616return;10617isStaticKey = genStaticKeysCached(options.staticKeys || '');10618isPlatformReservedTag = options.isReservedTag || no;10619// first pass: mark all non-static nodes.10620markStatic(root);10621// second pass: mark static roots.10622markStaticRoots(root, false);10623}10624function genStaticKeys(keys) {10625return makeMap('type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +10626(keys ? ',' + keys : ''));10627}10628function markStatic(node) {10629node.static = isStatic(node);10630if (node.type === 1) {10631// do not make component slot content static. this avoids10632// 1. components not able to mutate slot nodes10633// 2. static slot content fails for hot-reloading10634if (!isPlatformReservedTag(node.tag) &&10635node.tag !== 'slot' &&10636node.attrsMap['inline-template'] == null) {10637return;10638}10639for (var i = 0, l = node.children.length; i < l; i++) {10640var child = node.children[i];10641markStatic(child);10642if (!child.static) {10643node.static = false;10644}10645}10646if (node.ifConditions) {10647for (var i = 1, l = node.ifConditions.length; i < l; i++) {10648var block = node.ifConditions[i].block;10649markStatic(block);10650if (!block.static) {10651node.static = false;10652}10653}10654}10655}10656}10657function markStaticRoots(node, isInFor) {10658if (node.type === 1) {10659if (node.static || node.once) {10660node.staticInFor = isInFor;10661}10662// For a node to qualify as a static root, it should have children that10663// are not just static text. Otherwise the cost of hoisting out will10664// outweigh the benefits and it's better off to just always render it fresh.10665if (node.static &&10666node.children.length &&10667!(node.children.length === 1 && node.children[0].type === 3)) {10668node.staticRoot = true;10669return;10670}10671else {10672node.staticRoot = false;10673}10674if (node.children) {10675for (var i = 0, l = node.children.length; i < l; i++) {10676markStaticRoots(node.children[i], isInFor || !!node.for);10677}10678}10679if (node.ifConditions) {10680for (var i = 1, l = node.ifConditions.length; i < l; i++) {10681markStaticRoots(node.ifConditions[i].block, isInFor);10682}10683}10684}10685}10686function isStatic(node) {10687if (node.type === 2) {10688// expression10689return false;10690}10691if (node.type === 3) {10692// text10693return true;10694}10695return !!(node.pre ||10696(!node.hasBindings && // no dynamic bindings10697!node.if &&10698!node.for && // not v-if or v-for or v-else10699!isBuiltInTag(node.tag) && // not a built-in10700isPlatformReservedTag(node.tag) && // not a component10701!isDirectChildOfTemplateFor(node) &&10702Object.keys(node).every(isStaticKey)));10703}10704function isDirectChildOfTemplateFor(node) {10705while (node.parent) {10706node = node.parent;10707if (node.tag !== 'template') {10708return false;10709}10710if (node.for) {10711return true;10712}10713}10714return false;10715}10716
10717var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;10718var fnInvokeRE = /\([^)]*?\);*$/;10719var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;10720// KeyboardEvent.keyCode aliases10721var keyCodes = {10722esc: 27,10723tab: 9,10724enter: 13,10725space: 32,10726up: 38,10727left: 37,10728right: 39,10729down: 40,10730delete: [8, 46]10731};10732// KeyboardEvent.key aliases10733var keyNames = {10734// #7880: IE11 and Edge use `Esc` for Escape key name.10735esc: ['Esc', 'Escape'],10736tab: 'Tab',10737enter: 'Enter',10738// #9112: IE11 uses `Spacebar` for Space key name.10739space: [' ', 'Spacebar'],10740// #7806: IE11 uses key names without `Arrow` prefix for arrow keys.10741up: ['Up', 'ArrowUp'],10742left: ['Left', 'ArrowLeft'],10743right: ['Right', 'ArrowRight'],10744down: ['Down', 'ArrowDown'],10745// #9112: IE11 uses `Del` for Delete key name.10746delete: ['Backspace', 'Delete', 'Del']10747};10748// #4868: modifiers that prevent the execution of the listener10749// need to explicitly return null so that we can determine whether to remove10750// the listener for .once10751var genGuard = function (condition) { return "if(".concat(condition, ")return null;"); };10752var modifierCode = {10753stop: '$event.stopPropagation();',10754prevent: '$event.preventDefault();',10755self: genGuard("$event.target !== $event.currentTarget"),10756ctrl: genGuard("!$event.ctrlKey"),10757shift: genGuard("!$event.shiftKey"),10758alt: genGuard("!$event.altKey"),10759meta: genGuard("!$event.metaKey"),10760left: genGuard("'button' in $event && $event.button !== 0"),10761middle: genGuard("'button' in $event && $event.button !== 1"),10762right: genGuard("'button' in $event && $event.button !== 2")10763};10764function genHandlers(events, isNative) {10765var prefix = isNative ? 'nativeOn:' : 'on:';10766var staticHandlers = "";10767var dynamicHandlers = "";10768for (var name_1 in events) {10769var handlerCode = genHandler(events[name_1]);10770//@ts-expect-error10771if (events[name_1] && events[name_1].dynamic) {10772dynamicHandlers += "".concat(name_1, ",").concat(handlerCode, ",");10773}10774else {10775staticHandlers += "\"".concat(name_1, "\":").concat(handlerCode, ",");10776}10777}10778staticHandlers = "{".concat(staticHandlers.slice(0, -1), "}");10779if (dynamicHandlers) {10780return prefix + "_d(".concat(staticHandlers, ",[").concat(dynamicHandlers.slice(0, -1), "])");10781}10782else {10783return prefix + staticHandlers;10784}10785}10786function genHandler(handler) {10787if (!handler) {10788return 'function(){}';10789}10790if (Array.isArray(handler)) {10791return "[".concat(handler.map(function (handler) { return genHandler(handler); }).join(','), "]");10792}10793var isMethodPath = simplePathRE.test(handler.value);10794var isFunctionExpression = fnExpRE.test(handler.value);10795var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));10796if (!handler.modifiers) {10797if (isMethodPath || isFunctionExpression) {10798return handler.value;10799}10800return "function($event){".concat(isFunctionInvocation ? "return ".concat(handler.value) : handler.value, "}"); // inline statement10801}10802else {10803var code = '';10804var genModifierCode = '';10805var keys = [];10806var _loop_1 = function (key) {10807if (modifierCode[key]) {10808genModifierCode += modifierCode[key];10809// left/right10810if (keyCodes[key]) {10811keys.push(key);10812}10813}10814else if (key === 'exact') {10815var modifiers_1 = handler.modifiers;10816genModifierCode += genGuard(['ctrl', 'shift', 'alt', 'meta']10817.filter(function (keyModifier) { return !modifiers_1[keyModifier]; })10818.map(function (keyModifier) { return "$event.".concat(keyModifier, "Key"); })10819.join('||'));10820}10821else {10822keys.push(key);10823}10824};10825for (var key in handler.modifiers) {10826_loop_1(key);10827}10828if (keys.length) {10829code += genKeyFilter(keys);10830}10831// Make sure modifiers like prevent and stop get executed after key filtering10832if (genModifierCode) {10833code += genModifierCode;10834}10835var handlerCode = isMethodPath10836? "return ".concat(handler.value, ".apply(null, arguments)")10837: isFunctionExpression10838? "return (".concat(handler.value, ").apply(null, arguments)")10839: isFunctionInvocation10840? "return ".concat(handler.value)10841: handler.value;10842return "function($event){".concat(code).concat(handlerCode, "}");10843}10844}10845function genKeyFilter(keys) {10846return (10847// make sure the key filters only apply to KeyboardEvents10848// #9441: can't use 'keyCode' in $event because Chrome autofill fires fake10849// key events that do not have keyCode property...10850"if(!$event.type.indexOf('key')&&" +10851"".concat(keys.map(genFilterCode).join('&&'), ")return null;"));10852}10853function genFilterCode(key) {10854var keyVal = parseInt(key, 10);10855if (keyVal) {10856return "$event.keyCode!==".concat(keyVal);10857}10858var keyCode = keyCodes[key];10859var keyName = keyNames[key];10860return ("_k($event.keyCode," +10861"".concat(JSON.stringify(key), ",") +10862"".concat(JSON.stringify(keyCode), ",") +10863"$event.key," +10864"".concat(JSON.stringify(keyName)) +10865")");10866}10867
10868function on(el, dir) {10869if (dir.modifiers) {10870warn$2("v-on without argument does not support modifiers.");10871}10872el.wrapListeners = function (code) { return "_g(".concat(code, ",").concat(dir.value, ")"); };10873}10874
10875function bind(el, dir) {10876el.wrapData = function (code) {10877return "_b(".concat(code, ",'").concat(el.tag, "',").concat(dir.value, ",").concat(dir.modifiers && dir.modifiers.prop ? 'true' : 'false').concat(dir.modifiers && dir.modifiers.sync ? ',true' : '', ")");10878};10879}10880
10881var baseDirectives = {10882on: on,10883bind: bind,10884cloak: noop10885};10886
10887var CodegenState = /** @class */ (function () {10888function CodegenState(options) {10889this.options = options;10890this.warn = options.warn || baseWarn;10891this.transforms = pluckModuleFunction(options.modules, 'transformCode');10892this.dataGenFns = pluckModuleFunction(options.modules, 'genData');10893this.directives = extend(extend({}, baseDirectives), options.directives);10894var isReservedTag = options.isReservedTag || no;10895this.maybeComponent = function (el) {10896return !!el.component || !isReservedTag(el.tag);10897};10898this.onceId = 0;10899this.staticRenderFns = [];10900this.pre = false;10901}10902return CodegenState;10903}());10904function generate(ast, options) {10905var state = new CodegenState(options);10906// fix #11483, Root level <script> tags should not be rendered.10907var code = ast10908? ast.tag === 'script'10909? 'null'10910: genElement(ast, state)10911: '_c("div")';10912return {10913render: "with(this){return ".concat(code, "}"),10914staticRenderFns: state.staticRenderFns10915};10916}10917function genElement(el, state) {10918if (el.parent) {10919el.pre = el.pre || el.parent.pre;10920}10921if (el.staticRoot && !el.staticProcessed) {10922return genStatic(el, state);10923}10924else if (el.once && !el.onceProcessed) {10925return genOnce(el, state);10926}10927else if (el.for && !el.forProcessed) {10928return genFor(el, state);10929}10930else if (el.if && !el.ifProcessed) {10931return genIf(el, state);10932}10933else if (el.tag === 'template' && !el.slotTarget && !state.pre) {10934return genChildren(el, state) || 'void 0';10935}10936else if (el.tag === 'slot') {10937return genSlot(el, state);10938}10939else {10940// component or element10941var code = void 0;10942if (el.component) {10943code = genComponent(el.component, el, state);10944}10945else {10946var data = void 0;10947var maybeComponent = state.maybeComponent(el);10948if (!el.plain || (el.pre && maybeComponent)) {10949data = genData(el, state);10950}10951var tag10952// check if this is a component in <script setup>10953= void 0;10954// check if this is a component in <script setup>10955var bindings = state.options.bindings;10956if (maybeComponent && bindings && bindings.__isScriptSetup !== false) {10957tag = checkBindingType(bindings, el.tag);10958}10959if (!tag)10960tag = "'".concat(el.tag, "'");10961var children = el.inlineTemplate ? null : genChildren(el, state, true);10962code = "_c(".concat(tag).concat(data ? ",".concat(data) : '' // data10963).concat(children ? ",".concat(children) : '' // children10964, ")");10965}10966// module transforms10967for (var i = 0; i < state.transforms.length; i++) {10968code = state.transforms[i](el, code);10969}10970return code;10971}10972}10973function checkBindingType(bindings, key) {10974var camelName = camelize(key);10975var PascalName = capitalize(camelName);10976var checkType = function (type) {10977if (bindings[key] === type) {10978return key;10979}10980if (bindings[camelName] === type) {10981return camelName;10982}10983if (bindings[PascalName] === type) {10984return PascalName;10985}10986};10987var fromConst = checkType("setup-const" /* BindingTypes.SETUP_CONST */) ||10988checkType("setup-reactive-const" /* BindingTypes.SETUP_REACTIVE_CONST */);10989if (fromConst) {10990return fromConst;10991}10992var fromMaybeRef = checkType("setup-let" /* BindingTypes.SETUP_LET */) ||10993checkType("setup-ref" /* BindingTypes.SETUP_REF */) ||10994checkType("setup-maybe-ref" /* BindingTypes.SETUP_MAYBE_REF */);10995if (fromMaybeRef) {10996return fromMaybeRef;10997}10998}10999// hoist static sub-trees out11000function genStatic(el, state) {11001el.staticProcessed = true;11002// Some elements (templates) need to behave differently inside of a v-pre11003// node. All pre nodes are static roots, so we can use this as a location to11004// wrap a state change and reset it upon exiting the pre node.11005var originalPreState = state.pre;11006if (el.pre) {11007state.pre = el.pre;11008}11009state.staticRenderFns.push("with(this){return ".concat(genElement(el, state), "}"));11010state.pre = originalPreState;11011return "_m(".concat(state.staticRenderFns.length - 1).concat(el.staticInFor ? ',true' : '', ")");11012}11013// v-once11014function genOnce(el, state) {11015el.onceProcessed = true;11016if (el.if && !el.ifProcessed) {11017return genIf(el, state);11018}11019else if (el.staticInFor) {11020var key = '';11021var parent_1 = el.parent;11022while (parent_1) {11023if (parent_1.for) {11024key = parent_1.key;11025break;11026}11027parent_1 = parent_1.parent;11028}11029if (!key) {11030state.warn("v-once can only be used inside v-for that is keyed. ", el.rawAttrsMap['v-once']);11031return genElement(el, state);11032}11033return "_o(".concat(genElement(el, state), ",").concat(state.onceId++, ",").concat(key, ")");11034}11035else {11036return genStatic(el, state);11037}11038}11039function genIf(el, state, altGen, altEmpty) {11040el.ifProcessed = true; // avoid recursion11041return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty);11042}11043function genIfConditions(conditions, state, altGen, altEmpty) {11044if (!conditions.length) {11045return altEmpty || '_e()';11046}11047var condition = conditions.shift();11048if (condition.exp) {11049return "(".concat(condition.exp, ")?").concat(genTernaryExp(condition.block), ":").concat(genIfConditions(conditions, state, altGen, altEmpty));11050}11051else {11052return "".concat(genTernaryExp(condition.block));11053}11054// v-if with v-once should generate code like (a)?_m(0):_m(1)11055function genTernaryExp(el) {11056return altGen11057? altGen(el, state)11058: el.once11059? genOnce(el, state)11060: genElement(el, state);11061}11062}11063function genFor(el, state, altGen, altHelper) {11064var exp = el.for;11065var alias = el.alias;11066var iterator1 = el.iterator1 ? ",".concat(el.iterator1) : '';11067var iterator2 = el.iterator2 ? ",".concat(el.iterator2) : '';11068if (state.maybeComponent(el) &&11069el.tag !== 'slot' &&11070el.tag !== 'template' &&11071!el.key) {11072state.warn("<".concat(el.tag, " v-for=\"").concat(alias, " in ").concat(exp, "\">: component lists rendered with ") +11073"v-for should have explicit keys. " +11074"See https://vuejs.org/guide/list.html#key for more info.", el.rawAttrsMap['v-for'], true /* tip */);11075}11076el.forProcessed = true; // avoid recursion11077return ("".concat(altHelper || '_l', "((").concat(exp, "),") +11078"function(".concat(alias).concat(iterator1).concat(iterator2, "){") +11079"return ".concat((altGen || genElement)(el, state)) +11080'})');11081}11082function genData(el, state) {11083var data = '{';11084// directives first.11085// directives may mutate the el's other properties before they are generated.11086var dirs = genDirectives(el, state);11087if (dirs)11088data += dirs + ',';11089// key11090if (el.key) {11091data += "key:".concat(el.key, ",");11092}11093// ref11094if (el.ref) {11095data += "ref:".concat(el.ref, ",");11096}11097if (el.refInFor) {11098data += "refInFor:true,";11099}11100// pre11101if (el.pre) {11102data += "pre:true,";11103}11104// record original tag name for components using "is" attribute11105if (el.component) {11106data += "tag:\"".concat(el.tag, "\",");11107}11108// module data generation functions11109for (var i = 0; i < state.dataGenFns.length; i++) {11110data += state.dataGenFns[i](el);11111}11112// attributes11113if (el.attrs) {11114data += "attrs:".concat(genProps(el.attrs), ",");11115}11116// DOM props11117if (el.props) {11118data += "domProps:".concat(genProps(el.props), ",");11119}11120// event handlers11121if (el.events) {11122data += "".concat(genHandlers(el.events, false), ",");11123}11124if (el.nativeEvents) {11125data += "".concat(genHandlers(el.nativeEvents, true), ",");11126}11127// slot target11128// only for non-scoped slots11129if (el.slotTarget && !el.slotScope) {11130data += "slot:".concat(el.slotTarget, ",");11131}11132// scoped slots11133if (el.scopedSlots) {11134data += "".concat(genScopedSlots(el, el.scopedSlots, state), ",");11135}11136// component v-model11137if (el.model) {11138data += "model:{value:".concat(el.model.value, ",callback:").concat(el.model.callback, ",expression:").concat(el.model.expression, "},");11139}11140// inline-template11141if (el.inlineTemplate) {11142var inlineTemplate = genInlineTemplate(el, state);11143if (inlineTemplate) {11144data += "".concat(inlineTemplate, ",");11145}11146}11147data = data.replace(/,$/, '') + '}';11148// v-bind dynamic argument wrap11149// v-bind with dynamic arguments must be applied using the same v-bind object11150// merge helper so that class/style/mustUseProp attrs are handled correctly.11151if (el.dynamicAttrs) {11152data = "_b(".concat(data, ",\"").concat(el.tag, "\",").concat(genProps(el.dynamicAttrs), ")");11153}11154// v-bind data wrap11155if (el.wrapData) {11156data = el.wrapData(data);11157}11158// v-on data wrap11159if (el.wrapListeners) {11160data = el.wrapListeners(data);11161}11162return data;11163}11164function genDirectives(el, state) {11165var dirs = el.directives;11166if (!dirs)11167return;11168var res = 'directives:[';11169var hasRuntime = false;11170var i, l, dir, needRuntime;11171for (i = 0, l = dirs.length; i < l; i++) {11172dir = dirs[i];11173needRuntime = true;11174var gen = state.directives[dir.name];11175if (gen) {11176// compile-time directive that manipulates AST.11177// returns true if it also needs a runtime counterpart.11178needRuntime = !!gen(el, dir, state.warn);11179}11180if (needRuntime) {11181hasRuntime = true;11182res += "{name:\"".concat(dir.name, "\",rawName:\"").concat(dir.rawName, "\"").concat(dir.value11183? ",value:(".concat(dir.value, "),expression:").concat(JSON.stringify(dir.value))11184: '').concat(dir.arg ? ",arg:".concat(dir.isDynamicArg ? dir.arg : "\"".concat(dir.arg, "\"")) : '').concat(dir.modifiers ? ",modifiers:".concat(JSON.stringify(dir.modifiers)) : '', "},");11185}11186}11187if (hasRuntime) {11188return res.slice(0, -1) + ']';11189}11190}11191function genInlineTemplate(el, state) {11192var ast = el.children[0];11193if ((el.children.length !== 1 || ast.type !== 1)) {11194state.warn('Inline-template components must have exactly one child element.', { start: el.start });11195}11196if (ast && ast.type === 1) {11197var inlineRenderFns = generate(ast, state.options);11198return "inlineTemplate:{render:function(){".concat(inlineRenderFns.render, "},staticRenderFns:[").concat(inlineRenderFns.staticRenderFns11199.map(function (code) { return "function(){".concat(code, "}"); })11200.join(','), "]}");11201}11202}11203function genScopedSlots(el, slots, state) {11204// by default scoped slots are considered "stable", this allows child11205// components with only scoped slots to skip forced updates from parent.11206// but in some cases we have to bail-out of this optimization11207// for example if the slot contains dynamic names, has v-if or v-for on them...11208var needsForceUpdate = el.for ||11209Object.keys(slots).some(function (key) {11210var slot = slots[key];11211return (slot.slotTargetDynamic || slot.if || slot.for || containsSlotChild(slot) // is passing down slot from parent which may be dynamic11212);11213});11214// #9534: if a component with scoped slots is inside a conditional branch,11215// it's possible for the same component to be reused but with different11216// compiled slot content. To avoid that, we generate a unique key based on11217// the generated code of all the slot contents.11218var needsKey = !!el.if;11219// OR when it is inside another scoped slot or v-for (the reactivity may be11220// disconnected due to the intermediate scope variable)11221// #9438, #950611222// TODO: this can be further optimized by properly analyzing in-scope bindings11223// and skip force updating ones that do not actually use scope variables.11224if (!needsForceUpdate) {11225var parent_2 = el.parent;11226while (parent_2) {11227if ((parent_2.slotScope && parent_2.slotScope !== emptySlotScopeToken) ||11228parent_2.for) {11229needsForceUpdate = true;11230break;11231}11232if (parent_2.if) {11233needsKey = true;11234}11235parent_2 = parent_2.parent;11236}11237}11238var generatedSlots = Object.keys(slots)11239.map(function (key) { return genScopedSlot(slots[key], state); })11240.join(',');11241return "scopedSlots:_u([".concat(generatedSlots, "]").concat(needsForceUpdate ? ",null,true" : "").concat(!needsForceUpdate && needsKey ? ",null,false,".concat(hash(generatedSlots)) : "", ")");11242}11243function hash(str) {11244var hash = 5381;11245var i = str.length;11246while (i) {11247hash = (hash * 33) ^ str.charCodeAt(--i);11248}11249return hash >>> 0;11250}11251function containsSlotChild(el) {11252if (el.type === 1) {11253if (el.tag === 'slot') {11254return true;11255}11256return el.children.some(containsSlotChild);11257}11258return false;11259}11260function genScopedSlot(el, state) {11261var isLegacySyntax = el.attrsMap['slot-scope'];11262if (el.if && !el.ifProcessed && !isLegacySyntax) {11263return genIf(el, state, genScopedSlot, "null");11264}11265if (el.for && !el.forProcessed) {11266return genFor(el, state, genScopedSlot);11267}11268var slotScope = el.slotScope === emptySlotScopeToken ? "" : String(el.slotScope);11269var fn = "function(".concat(slotScope, "){") +11270"return ".concat(el.tag === 'template'11271? el.if && isLegacySyntax11272? "(".concat(el.if, ")?").concat(genChildren(el, state) || 'undefined', ":undefined")11273: genChildren(el, state) || 'undefined'11274: genElement(el, state), "}");11275// reverse proxy v-slot without scope on this.$slots11276var reverseProxy = slotScope ? "" : ",proxy:true";11277return "{key:".concat(el.slotTarget || "\"default\"", ",fn:").concat(fn).concat(reverseProxy, "}");11278}11279function genChildren(el, state, checkSkip, altGenElement, altGenNode) {11280var children = el.children;11281if (children.length) {11282var el_1 = children[0];11283// optimize single v-for11284if (children.length === 1 &&11285el_1.for &&11286el_1.tag !== 'template' &&11287el_1.tag !== 'slot') {11288var normalizationType_1 = checkSkip11289? state.maybeComponent(el_1)11290? ",1"11291: ",0"11292: "";11293return "".concat((altGenElement || genElement)(el_1, state)).concat(normalizationType_1);11294}11295var normalizationType = checkSkip11296? getNormalizationType(children, state.maybeComponent)11297: 0;11298var gen_1 = altGenNode || genNode;11299return "[".concat(children.map(function (c) { return gen_1(c, state); }).join(','), "]").concat(normalizationType ? ",".concat(normalizationType) : '');11300}11301}11302// determine the normalization needed for the children array.11303// 0: no normalization needed11304// 1: simple normalization needed (possible 1-level deep nested array)11305// 2: full normalization needed11306function getNormalizationType(children, maybeComponent) {11307var res = 0;11308for (var i = 0; i < children.length; i++) {11309var el = children[i];11310if (el.type !== 1) {11311continue;11312}11313if (needsNormalization(el) ||11314(el.ifConditions &&11315el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {11316res = 2;11317break;11318}11319if (maybeComponent(el) ||11320(el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {11321res = 1;11322}11323}11324return res;11325}11326function needsNormalization(el) {11327return el.for !== undefined || el.tag === 'template' || el.tag === 'slot';11328}11329function genNode(node, state) {11330if (node.type === 1) {11331return genElement(node, state);11332}11333else if (node.type === 3 && node.isComment) {11334return genComment(node);11335}11336else {11337return genText(node);11338}11339}11340function genText(text) {11341return "_v(".concat(text.type === 211342? text.expression // no need for () because already wrapped in _s()11343: transformSpecialNewlines(JSON.stringify(text.text)), ")");11344}11345function genComment(comment) {11346return "_e(".concat(JSON.stringify(comment.text), ")");11347}11348function genSlot(el, state) {11349var slotName = el.slotName || '"default"';11350var children = genChildren(el, state);11351var res = "_t(".concat(slotName).concat(children ? ",function(){return ".concat(children, "}") : '');11352var attrs = el.attrs || el.dynamicAttrs11353? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({11354// slot props are camelized11355name: camelize(attr.name),11356value: attr.value,11357dynamic: attr.dynamic11358}); }))11359: null;11360var bind = el.attrsMap['v-bind'];11361if ((attrs || bind) && !children) {11362res += ",null";11363}11364if (attrs) {11365res += ",".concat(attrs);11366}11367if (bind) {11368res += "".concat(attrs ? '' : ',null', ",").concat(bind);11369}11370return res + ')';11371}11372// componentName is el.component, take it as argument to shun flow's pessimistic refinement11373function genComponent(componentName, el, state) {11374var children = el.inlineTemplate ? null : genChildren(el, state, true);11375return "_c(".concat(componentName, ",").concat(genData(el, state)).concat(children ? ",".concat(children) : '', ")");11376}11377function genProps(props) {11378var staticProps = "";11379var dynamicProps = "";11380for (var i = 0; i < props.length; i++) {11381var prop = props[i];11382var value = transformSpecialNewlines(prop.value);11383if (prop.dynamic) {11384dynamicProps += "".concat(prop.name, ",").concat(value, ",");11385}11386else {11387staticProps += "\"".concat(prop.name, "\":").concat(value, ",");11388}11389}11390staticProps = "{".concat(staticProps.slice(0, -1), "}");11391if (dynamicProps) {11392return "_d(".concat(staticProps, ",[").concat(dynamicProps.slice(0, -1), "])");11393}11394else {11395return staticProps;11396}11397}11398// #3895, #426811399function transformSpecialNewlines(text) {11400return text.replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');11401}11402
11403// these keywords should not appear inside expressions, but operators like11404// typeof, instanceof and in are allowed11405var prohibitedKeywordRE = new RegExp('\\b' +11406('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +11407'super,throw,while,yield,delete,export,import,return,switch,default,' +11408'extends,finally,continue,debugger,function,arguments')11409.split(',')11410.join('\\b|\\b') +11411'\\b');11412// these unary operators should not be used as property/method names11413var unaryOperatorsRE = new RegExp('\\b' +11414'delete,typeof,void'.split(',').join('\\s*\\([^\\)]*\\)|\\b') +11415'\\s*\\([^\\)]*\\)');11416// strip strings in expressions11417var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;11418// detect problematic expressions in a template11419function detectErrors(ast, warn) {11420if (ast) {11421checkNode(ast, warn);11422}11423}11424function checkNode(node, warn) {11425if (node.type === 1) {11426for (var name_1 in node.attrsMap) {11427if (dirRE.test(name_1)) {11428var value = node.attrsMap[name_1];11429if (value) {11430var range = node.rawAttrsMap[name_1];11431if (name_1 === 'v-for') {11432checkFor(node, "v-for=\"".concat(value, "\""), warn, range);11433}11434else if (name_1 === 'v-slot' || name_1[0] === '#') {11435checkFunctionParameterExpression(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);11436}11437else if (onRE.test(name_1)) {11438checkEvent(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);11439}11440else {11441checkExpression(value, "".concat(name_1, "=\"").concat(value, "\""), warn, range);11442}11443}11444}11445}11446if (node.children) {11447for (var i = 0; i < node.children.length; i++) {11448checkNode(node.children[i], warn);11449}11450}11451}11452else if (node.type === 2) {11453checkExpression(node.expression, node.text, warn, node);11454}11455}11456function checkEvent(exp, text, warn, range) {11457var stripped = exp.replace(stripStringRE, '');11458var keywordMatch = stripped.match(unaryOperatorsRE);11459if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {11460warn("avoid using JavaScript unary operator as property name: " +11461"\"".concat(keywordMatch[0], "\" in expression ").concat(text.trim()), range);11462}11463checkExpression(exp, text, warn, range);11464}11465function checkFor(node, text, warn, range) {11466checkExpression(node.for || '', text, warn, range);11467checkIdentifier(node.alias, 'v-for alias', text, warn, range);11468checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);11469checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);11470}11471function checkIdentifier(ident, type, text, warn, range) {11472if (typeof ident === 'string') {11473try {11474new Function("var ".concat(ident, "=_"));11475}11476catch (e) {11477warn("invalid ".concat(type, " \"").concat(ident, "\" in expression: ").concat(text.trim()), range);11478}11479}11480}11481function checkExpression(exp, text, warn, range) {11482try {11483new Function("return ".concat(exp));11484}11485catch (e) {11486var keywordMatch = exp11487.replace(stripStringRE, '')11488.match(prohibitedKeywordRE);11489if (keywordMatch) {11490warn("avoid using JavaScript keyword as property name: " +11491"\"".concat(keywordMatch[0], "\"\n Raw expression: ").concat(text.trim()), range);11492}11493else {11494warn("invalid expression: ".concat(e.message, " in\n\n") +11495" ".concat(exp, "\n\n") +11496" Raw expression: ".concat(text.trim(), "\n"), range);11497}11498}11499}11500function checkFunctionParameterExpression(exp, text, warn, range) {11501try {11502new Function(exp, '');11503}11504catch (e) {11505warn("invalid function parameter expression: ".concat(e.message, " in\n\n") +11506" ".concat(exp, "\n\n") +11507" Raw expression: ".concat(text.trim(), "\n"), range);11508}11509}11510
11511var range = 2;11512function generateCodeFrame(source, start, end) {11513if (start === void 0) { start = 0; }11514if (end === void 0) { end = source.length; }11515var lines = source.split(/\r?\n/);11516var count = 0;11517var res = [];11518for (var i = 0; i < lines.length; i++) {11519count += lines[i].length + 1;11520if (count >= start) {11521for (var j = i - range; j <= i + range || end > count; j++) {11522if (j < 0 || j >= lines.length)11523continue;11524res.push("".concat(j + 1).concat(repeat(" ", 3 - String(j + 1).length), "| ").concat(lines[j]));11525var lineLength = lines[j].length;11526if (j === i) {11527// push underline11528var pad = start - (count - lineLength) + 1;11529var length_1 = end > count ? lineLength - pad : end - start;11530res.push(" | " + repeat(" ", pad) + repeat("^", length_1));11531}11532else if (j > i) {11533if (end > count) {11534var length_2 = Math.min(end - count, lineLength);11535res.push(" | " + repeat("^", length_2));11536}11537count += lineLength + 1;11538}11539}11540break;11541}11542}11543return res.join('\n');11544}11545function repeat(str, n) {11546var result = '';11547if (n > 0) {11548// eslint-disable-next-line no-constant-condition11549while (true) {11550// eslint-disable-line11551if (n & 1)11552result += str;11553n >>>= 1;11554if (n <= 0)11555break;11556str += str;11557}11558}11559return result;11560}11561
11562function createFunction(code, errors) {11563try {11564return new Function(code);11565}11566catch (err) {11567errors.push({ err: err, code: code });11568return noop;11569}11570}11571function createCompileToFunctionFn(compile) {11572var cache = Object.create(null);11573return function compileToFunctions(template, options, vm) {11574options = extend({}, options);11575var warn = options.warn || warn$2;11576delete options.warn;11577/* istanbul ignore if */11578{11579// detect possible CSP restriction11580try {11581new Function('return 1');11582}11583catch (e) {11584if (e.toString().match(/unsafe-eval|CSP/)) {11585warn('It seems you are using the standalone build of Vue.js in an ' +11586'environment with Content Security Policy that prohibits unsafe-eval. ' +11587'The template compiler cannot work in this environment. Consider ' +11588'relaxing the policy to allow unsafe-eval or pre-compiling your ' +11589'templates into render functions.');11590}11591}11592}11593// check cache11594var key = options.delimiters11595? String(options.delimiters) + template11596: template;11597if (cache[key]) {11598return cache[key];11599}11600// compile11601var compiled = compile(template, options);11602// check compilation errors/tips11603{11604if (compiled.errors && compiled.errors.length) {11605if (options.outputSourceRange) {11606compiled.errors.forEach(function (e) {11607warn("Error compiling template:\n\n".concat(e.msg, "\n\n") +11608generateCodeFrame(template, e.start, e.end), vm);11609});11610}11611else {11612warn("Error compiling template:\n\n".concat(template, "\n\n") +11613compiled.errors.map(function (e) { return "- ".concat(e); }).join('\n') +11614'\n', vm);11615}11616}11617if (compiled.tips && compiled.tips.length) {11618if (options.outputSourceRange) {11619compiled.tips.forEach(function (e) { return tip(e.msg, vm); });11620}11621else {11622compiled.tips.forEach(function (msg) { return tip(msg, vm); });11623}11624}11625}11626// turn code into functions11627var res = {};11628var fnGenErrors = [];11629res.render = createFunction(compiled.render, fnGenErrors);11630res.staticRenderFns = compiled.staticRenderFns.map(function (code) {11631return createFunction(code, fnGenErrors);11632});11633// check function generation errors.11634// this should only happen if there is a bug in the compiler itself.11635// mostly for codegen development use11636/* istanbul ignore if */11637{11638if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {11639warn("Failed to generate render function:\n\n" +11640fnGenErrors
11641.map(function (_a) {11642var err = _a.err, code = _a.code;11643return "".concat(err.toString(), " in\n\n").concat(code, "\n");11644})11645.join('\n'), vm);11646}11647}11648return (cache[key] = res);11649};11650}11651
11652function createCompilerCreator(baseCompile) {11653return function createCompiler(baseOptions) {11654function compile(template, options) {11655var finalOptions = Object.create(baseOptions);11656var errors = [];11657var tips = [];11658var warn = function (msg, range, tip) {11659(tip ? tips : errors).push(msg);11660};11661if (options) {11662if (options.outputSourceRange) {11663// $flow-disable-line11664var leadingSpaceLength_1 = template.match(/^\s*/)[0].length;11665warn = function (msg, range, tip) {11666var data = typeof msg === 'string' ? { msg: msg } : msg;11667if (range) {11668if (range.start != null) {11669data.start = range.start + leadingSpaceLength_1;11670}11671if (range.end != null) {11672data.end = range.end + leadingSpaceLength_1;11673}11674}11675(tip ? tips : errors).push(data);11676};11677}11678// merge custom modules11679if (options.modules) {11680finalOptions.modules = (baseOptions.modules || []).concat(options.modules);11681}11682// merge custom directives11683if (options.directives) {11684finalOptions.directives = extend(Object.create(baseOptions.directives || null), options.directives);11685}11686// copy other options11687for (var key in options) {11688if (key !== 'modules' && key !== 'directives') {11689finalOptions[key] = options[key];11690}11691}11692}11693finalOptions.warn = warn;11694var compiled = baseCompile(template.trim(), finalOptions);11695{11696detectErrors(compiled.ast, warn);11697}11698compiled.errors = errors;11699compiled.tips = tips;11700return compiled;11701}11702return {11703compile: compile,11704compileToFunctions: createCompileToFunctionFn(compile)11705};11706};11707}11708
11709// `createCompilerCreator` allows creating compilers that use alternative11710// parser/optimizer/codegen, e.g the SSR optimizing compiler.11711// Here we just export a default compiler using the default parts.11712var createCompiler = createCompilerCreator(function baseCompile(template, options) {11713var ast = parse(template.trim(), options);11714if (options.optimize !== false) {11715optimize(ast, options);11716}11717var code = generate(ast, options);11718return {11719ast: ast,11720render: code.render,11721staticRenderFns: code.staticRenderFns11722};11723});11724
11725var _a = createCompiler(baseOptions), compileToFunctions = _a.compileToFunctions;11726
11727// check whether current browser encodes a char inside attribute values11728var div;11729function getShouldDecode(href) {11730div = div || document.createElement('div');11731div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>";11732return div.innerHTML.indexOf(' ') > 0;11733}11734// #3663: IE encodes newlines inside attribute values while other browsers don't11735var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;11736// #6828: chrome encodes content in a[href]11737var shouldDecodeNewlinesForHref = inBrowser11738? getShouldDecode(true)11739: false;11740
11741var idToTemplate = cached(function (id) {11742var el = query(id);11743return el && el.innerHTML;11744});11745var mount = Vue.prototype.$mount;11746Vue.prototype.$mount = function (el, hydrating) {11747el = el && query(el);11748/* istanbul ignore if */11749if (el === document.body || el === document.documentElement) {11750warn$2("Do not mount Vue to <html> or <body> - mount to normal elements instead.");11751return this;11752}11753var options = this.$options;11754// resolve template/el and convert to render function11755if (!options.render) {11756var template = options.template;11757if (template) {11758if (typeof template === 'string') {11759if (template.charAt(0) === '#') {11760template = idToTemplate(template);11761/* istanbul ignore if */11762if (!template) {11763warn$2("Template element not found or is empty: ".concat(options.template), this);11764}11765}11766}11767else if (template.nodeType) {11768template = template.innerHTML;11769}11770else {11771{11772warn$2('invalid template option:' + template, this);11773}11774return this;11775}11776}11777else if (el) {11778// @ts-expect-error11779template = getOuterHTML(el);11780}11781if (template) {11782/* istanbul ignore if */11783if (config.performance && mark) {11784mark('compile');11785}11786var _a = compileToFunctions(template, {11787outputSourceRange: true,11788shouldDecodeNewlines: shouldDecodeNewlines,11789shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,11790delimiters: options.delimiters,11791comments: options.comments11792}, this), render = _a.render, staticRenderFns = _a.staticRenderFns;11793options.render = render;11794options.staticRenderFns = staticRenderFns;11795/* istanbul ignore if */11796if (config.performance && mark) {11797mark('compile end');11798measure("vue ".concat(this._name, " compile"), 'compile', 'compile end');11799}11800}11801}11802return mount.call(this, el, hydrating);11803};11804/**11805* Get outerHTML of elements, taking care
11806* of SVG elements in IE as well.
11807*/
11808function getOuterHTML(el) {11809if (el.outerHTML) {11810return el.outerHTML;11811}11812else {11813var container = document.createElement('div');11814container.appendChild(el.cloneNode(true));11815return container.innerHTML;11816}11817}11818Vue.compile = compileToFunctions;11819
11820// export type EffectScheduler = (...args: any[]) => any11821/**11822* @internal since we are not exposing this in Vue 2, it's used only for
11823* internal testing.
11824*/
11825function effect(fn, scheduler) {11826var watcher = new Watcher(currentInstance, fn, noop, {11827sync: true11828});11829if (scheduler) {11830watcher.update = function () {11831scheduler(function () { return watcher.run(); });11832};11833}11834}11835
11836extend(Vue, vca);11837Vue.effect = effect;11838
11839return Vue;11840
11841}));11842