From 6bdaeb04441af7aac4ec4c6967841cb2a3ccb855 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 10 May 2017 00:57:07 +0800 Subject: [PATCH] [build] 2.3.3 --- dist/vue.common.js | 162 ++++++++++++++------ dist/vue.esm.js | 162 ++++++++++++++------ dist/vue.js | 158 +++++++++++++------ dist/vue.min.js | 8 +- dist/vue.runtime.common.js | 116 +++++++++----- dist/vue.runtime.esm.js | 116 +++++++++----- dist/vue.runtime.js | 112 +++++++++----- dist/vue.runtime.min.js | 6 +- packages/vue-server-renderer/build.js | 65 +++++--- packages/vue-server-renderer/package.json | 2 +- packages/vue-template-compiler/build.js | 47 ++++-- packages/vue-template-compiler/package.json | 2 +- 12 files changed, 651 insertions(+), 305 deletions(-) diff --git a/dist/vue.common.js b/dist/vue.common.js index 65647156e3b..97907e17c5b 100644 --- a/dist/vue.common.js +++ b/dist/vue.common.js @@ -1,5 +1,5 @@ /*! - * Vue.js v2.3.2 + * Vue.js v2.3.3 * (c) 2014-2017 Evan You * Released under the MIT License. */ @@ -21,6 +21,9 @@ function isTrue (v) { return v === true } +function isFalse (v) { + return v === false +} /** * Check if value is primitive */ @@ -1416,7 +1419,8 @@ function getPropDefaultValue (vm, prop, key) { // return previous default value to avoid unnecessary watcher trigger if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && - vm._props[key] !== undefined) { + vm._props[key] !== undefined + ) { return vm._props[key] } // call factory function for non-Function types @@ -1690,6 +1694,7 @@ function cloneVNode (vnode) { cloned.ns = vnode.ns; cloned.isStatic = vnode.isStatic; cloned.key = vnode.key; + cloned.isComment = vnode.isComment; cloned.isCloned = true; return cloned } @@ -1908,6 +1913,10 @@ function normalizeChildren (children) { : undefined } +function isTextNode (node) { + return isDef(node) && isDef(node.text) && isFalse(node.isComment) +} + function normalizeArrayChildren (children, nestedIndex) { var res = []; var i, c, last; @@ -1919,18 +1928,25 @@ function normalizeArrayChildren (children, nestedIndex) { if (Array.isArray(c)) { res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i))); } else if (isPrimitive(c)) { - if (isDef(last) && isDef(last.text)) { - last.text += String(c); + if (isTextNode(last)) { + // merge adjacent text nodes + // this is necessary for SSR hydration because text nodes are + // essentially merged when rendered to HTML strings + (last).text += String(c); } else if (c !== '') { // convert primitive to vnode res.push(createTextVNode(c)); } } else { - if (isDef(c.text) && isDef(last) && isDef(last.text)) { + if (isTextNode(c) && isTextNode(last)) { + // merge adjacent text nodes res[res.length - 1] = createTextVNode(last.text + c.text); } else { // default key for nested array children (likely generated by v-for) - if (isDef(c.tag) && isUndef(c.key) && isDef(nestedIndex)) { + if (isTrue(children._isVList) && + isDef(c.tag) && + isUndef(c.key) && + isDef(nestedIndex)) { c.key = "__vlist" + nestedIndex + "_" + i + "__"; } res.push(c); @@ -2030,11 +2046,13 @@ function resolveAsyncComponent ( if (isDef(res.timeout)) { setTimeout(function () { - reject( - process.env.NODE_ENV !== 'production' - ? ("timeout (" + (res.timeout) + "ms)") - : null - ); + if (isUndef(factory.resolved)) { + reject( + process.env.NODE_ENV !== 'production' + ? ("timeout (" + (res.timeout) + "ms)") + : null + ); + } }, res.timeout); } } @@ -2213,7 +2231,8 @@ function resolveSlots ( // named slots should only be respected if the vnode was rendered in the // same context. if ((child.context === context || child.functionalContext === context) && - child.data && child.data.slot != null) { + child.data && child.data.slot != null + ) { var name = child.data.slot; var slot = (slots[name] || (slots[name] = [])); if (child.tag === 'template') { @@ -2237,11 +2256,16 @@ function isWhitespace (node) { } function resolveScopedSlots ( - fns + fns, // see flow/vnode + res ) { - var res = {}; + res = res || {}; for (var i = 0; i < fns.length; i++) { - res[fns[i][0]] = fns[i][1]; + if (Array.isArray(fns[i])) { + resolveScopedSlots(fns[i], res); + } else { + res[fns[i].key] = fns[i].fn; + } } return res } @@ -2559,7 +2583,7 @@ var index = 0; * Reset the scheduler's state. */ function resetSchedulerState () { - queue.length = activatedChildren.length = 0; + index = queue.length = activatedChildren.length = 0; has = {}; if (process.env.NODE_ENV !== 'production') { circular = {}; @@ -2669,10 +2693,10 @@ function queueWatcher (watcher) { // if already flushing, splice the watcher based on its id // if already past its id, it will be run next immediately. var i = queue.length - 1; - while (i >= 0 && queue[i].id > watcher.id) { + while (i > index && queue[i].id > watcher.id) { i--; } - queue.splice(Math.max(i, index) + 1, 0, watcher); + queue.splice(i + 1, 0, watcher); } // queue the flush if (!waiting) { @@ -3575,7 +3599,8 @@ function _createElement ( } // support single function children as default scoped slot if (Array.isArray(children) && - typeof children[0] === 'function') { + typeof children[0] === 'function' + ) { data = data || {}; data.scopedSlots = { default: children[0] }; children.length = 0; @@ -3663,6 +3688,9 @@ function renderList ( ret[i] = render(val[key], key, i); } } + if (isDef(ret)) { + (ret)._isVList = true; + } return ret } @@ -4062,7 +4090,8 @@ function dedupe (latest, extended, sealed) { function Vue$3 (options) { if (process.env.NODE_ENV !== 'production' && - !(this instanceof Vue$3)) { + !(this instanceof Vue$3) + ) { warn('Vue is a constructor and should be called with the `new` keyword'); } this._init(options); @@ -4080,7 +4109,7 @@ function initUse (Vue) { Vue.use = function (plugin) { /* istanbul ignore if */ if (plugin.installed) { - return + return this } // additional parameters var args = toArray(arguments, 1); @@ -4100,6 +4129,7 @@ function initUse (Vue) { function initMixin$1 (Vue) { Vue.mixin = function (mixin) { this.options = mergeOptions(this.options, mixin); + return this }; } @@ -4393,11 +4423,12 @@ Object.defineProperty(Vue$3.prototype, '$isServer', { Object.defineProperty(Vue$3.prototype, '$ssrContext', { get: function get () { + /* istanbul ignore next */ return this.$vnode.ssrContext } }); -Vue$3.version = '2.3.2'; +Vue$3.version = '2.3.3'; /* */ @@ -4978,8 +5009,9 @@ function createPatchFunction (backend) { } // for slot content they should also get the scopeId from the host instance. if (isDef(i = activeInstance) && - i !== vnode.context && - isDef(i = i.$options._scopeId)) { + i !== vnode.context && + isDef(i = i.$options._scopeId) + ) { nodeOps.setAttribute(vnode.elm, i, ''); } } @@ -5131,9 +5163,10 @@ function createPatchFunction (backend) { // if the new node is not cloned it means the render functions have been // reset by the hot-reload-api and we need to do a proper re-render. if (isTrue(vnode.isStatic) && - isTrue(oldVnode.isStatic) && - vnode.key === oldVnode.key && - (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) { + isTrue(oldVnode.isStatic) && + vnode.key === oldVnode.key && + (isTrue(vnode.isCloned) || isTrue(vnode.isOnce)) + ) { vnode.elm = oldVnode.elm; vnode.componentInstance = oldVnode.componentInstance; return @@ -5224,8 +5257,9 @@ function createPatchFunction (backend) { // longer than the virtual children list. if (!childrenMatch || childNode) { if (process.env.NODE_ENV !== 'production' && - typeof console !== 'undefined' && - !bailed) { + typeof console !== 'undefined' && + !bailed + ) { bailed = true; console.warn('Parent: ', elm); console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children); @@ -6362,7 +6396,8 @@ function updateStyle (oldVnode, vnode) { var oldData = oldVnode.data; if (isUndef(data.staticStyle) && isUndef(data.style) && - isUndef(oldData.staticStyle) && isUndef(oldData.style)) { + isUndef(oldData.staticStyle) && isUndef(oldData.style) + ) { return } @@ -6500,12 +6535,14 @@ var animationEndEvent = 'animationend'; if (hasTransition) { /* istanbul ignore if */ if (window.ontransitionend === undefined && - window.onwebkittransitionend !== undefined) { + window.onwebkittransitionend !== undefined + ) { transitionProp = 'WebkitTransition'; transitionEndEvent = 'webkitTransitionEnd'; } if (window.onanimationend === undefined && - window.onwebkitanimationend !== undefined) { + window.onwebkitanimationend !== undefined + ) { animationProp = 'WebkitAnimation'; animationEndEvent = 'webkitAnimationEnd'; } @@ -6745,8 +6782,9 @@ function enter (vnode, toggleDisplay) { var parent = el.parentNode; var pendingNode = parent && parent._pending && parent._pending[vnode.key]; if (pendingNode && - pendingNode.tag === vnode.tag && - pendingNode.elm._leaveCb) { + pendingNode.tag === vnode.tag && + pendingNode.elm._leaveCb + ) { pendingNode.elm._leaveCb(); } enterHook && enterHook(el, cb); @@ -7079,6 +7117,8 @@ function onCompositionStart (e) { } function onCompositionEnd (e) { + // prevent triggering an input event for no reason + if (!e.target.composing) { return } e.target.composing = false; trigger(e.target, 'input'); } @@ -7261,7 +7301,8 @@ var Transition = { // warn invalid mode if (process.env.NODE_ENV !== 'production' && - mode && mode !== 'in-out' && mode !== 'out-in') { + mode && mode !== 'in-out' && mode !== 'out-in' + ) { warn( 'invalid mode: ' + mode, this.$parent @@ -7545,8 +7586,9 @@ setTimeout(function () { } } if (process.env.NODE_ENV !== 'production' && - config.productionTip !== false && - inBrowser && typeof console !== 'undefined') { + config.productionTip !== false && + inBrowser && typeof console !== 'undefined' + ) { console[console.info ? 'info' : 'log']( "You are running Vue in development mode.\n" + "Make sure to turn on production mode when deploying for production.\n" + @@ -7879,8 +7921,9 @@ function parseHTML (html, options) { // Close all the open elements, up the stack for (var i = stack.length - 1; i >= pos; i--) { if (process.env.NODE_ENV !== 'production' && - (i > pos || !tagName) && - options.warn) { + (i > pos || !tagName) && + options.warn + ) { options.warn( ("tag <" + (stack[i].tag) + "> has no matching end tag.") ); @@ -8175,8 +8218,9 @@ function parse ( // IE textarea placeholder bug /* istanbul ignore if */ if (isIE && - currentParent.tag === 'textarea' && - currentParent.attrsMap.placeholder === text) { + currentParent.tag === 'textarea' && + currentParent.attrsMap.placeholder === text + ) { return } var children = currentParent.children; @@ -8680,17 +8724,17 @@ var modifierCode = { function genHandlers ( events, - native, + isNative, warn ) { - var res = native ? 'nativeOn:{' : 'on:{'; + var res = isNative ? 'nativeOn:{' : 'on:{'; for (var name in events) { var handler = events[name]; // #5330: warn click.right, since right clicks do not actually fire click events. if (process.env.NODE_ENV !== 'production' && - name === 'click' && - handler && handler.modifiers && handler.modifiers.right - ) { + name === 'click' && + handler && handler.modifiers && handler.modifiers.right + ) { warn( "Use \"contextmenu\" instead of \"click.right\" since right clicks " + "do not actually fire \"click\" events." @@ -9045,10 +9089,25 @@ function genScopedSlots (slots) { } function genScopedSlot (key, el) { - return "[" + key + ",function(" + (String(el.attrsMap.scope)) + "){" + + if (el.for && !el.forProcessed) { + return genForScopedSlot(key, el) + } + return "{key:" + key + ",fn:function(" + (String(el.attrsMap.scope)) + "){" + "return " + (el.tag === 'template' ? genChildren(el) || 'void 0' - : genElement(el)) + "}]" + : genElement(el)) + "}}" +} + +function genForScopedSlot (key, el) { + var exp = el.for; + var alias = el.alias; + var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : ''; + var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : ''; + el.forProcessed = true; // avoid recursion + return "_l((" + exp + ")," + + "function(" + alias + iterator1 + iterator2 + "){" + + "return " + (genScopedSlot(key, el)) + + '})' } function genChildren (el, checkSkip) { @@ -9057,9 +9116,10 @@ function genChildren (el, checkSkip) { var el$1 = children[0]; // optimize single v-for if (children.length === 1 && - el$1.for && - el$1.tag !== 'template' && - el$1.tag !== 'slot') { + el$1.for && + el$1.tag !== 'template' && + el$1.tag !== 'slot' + ) { return genElement(el$1) } var normalizationType = checkSkip ? getNormalizationType(children) : 0; diff --git a/dist/vue.esm.js b/dist/vue.esm.js index f5367f6c1f0..c9ee7df6f09 100644 --- a/dist/vue.esm.js +++ b/dist/vue.esm.js @@ -1,5 +1,5 @@ /*! - * Vue.js v2.3.2 + * Vue.js v2.3.3 * (c) 2014-2017 Evan You * Released under the MIT License. */ @@ -19,6 +19,9 @@ function isTrue (v) { return v === true } +function isFalse (v) { + return v === false +} /** * Check if value is primitive */ @@ -1414,7 +1417,8 @@ function getPropDefaultValue (vm, prop, key) { // return previous default value to avoid unnecessary watcher trigger if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && - vm._props[key] !== undefined) { + vm._props[key] !== undefined + ) { return vm._props[key] } // call factory function for non-Function types @@ -1688,6 +1692,7 @@ function cloneVNode (vnode) { cloned.ns = vnode.ns; cloned.isStatic = vnode.isStatic; cloned.key = vnode.key; + cloned.isComment = vnode.isComment; cloned.isCloned = true; return cloned } @@ -1906,6 +1911,10 @@ function normalizeChildren (children) { : undefined } +function isTextNode (node) { + return isDef(node) && isDef(node.text) && isFalse(node.isComment) +} + function normalizeArrayChildren (children, nestedIndex) { var res = []; var i, c, last; @@ -1917,18 +1926,25 @@ function normalizeArrayChildren (children, nestedIndex) { if (Array.isArray(c)) { res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i))); } else if (isPrimitive(c)) { - if (isDef(last) && isDef(last.text)) { - last.text += String(c); + if (isTextNode(last)) { + // merge adjacent text nodes + // this is necessary for SSR hydration because text nodes are + // essentially merged when rendered to HTML strings + (last).text += String(c); } else if (c !== '') { // convert primitive to vnode res.push(createTextVNode(c)); } } else { - if (isDef(c.text) && isDef(last) && isDef(last.text)) { + if (isTextNode(c) && isTextNode(last)) { + // merge adjacent text nodes res[res.length - 1] = createTextVNode(last.text + c.text); } else { // default key for nested array children (likely generated by v-for) - if (isDef(c.tag) && isUndef(c.key) && isDef(nestedIndex)) { + if (isTrue(children._isVList) && + isDef(c.tag) && + isUndef(c.key) && + isDef(nestedIndex)) { c.key = "__vlist" + nestedIndex + "_" + i + "__"; } res.push(c); @@ -2028,11 +2044,13 @@ function resolveAsyncComponent ( if (isDef(res.timeout)) { setTimeout(function () { - reject( - process.env.NODE_ENV !== 'production' - ? ("timeout (" + (res.timeout) + "ms)") - : null - ); + if (isUndef(factory.resolved)) { + reject( + process.env.NODE_ENV !== 'production' + ? ("timeout (" + (res.timeout) + "ms)") + : null + ); + } }, res.timeout); } } @@ -2211,7 +2229,8 @@ function resolveSlots ( // named slots should only be respected if the vnode was rendered in the // same context. if ((child.context === context || child.functionalContext === context) && - child.data && child.data.slot != null) { + child.data && child.data.slot != null + ) { var name = child.data.slot; var slot = (slots[name] || (slots[name] = [])); if (child.tag === 'template') { @@ -2235,11 +2254,16 @@ function isWhitespace (node) { } function resolveScopedSlots ( - fns + fns, // see flow/vnode + res ) { - var res = {}; + res = res || {}; for (var i = 0; i < fns.length; i++) { - res[fns[i][0]] = fns[i][1]; + if (Array.isArray(fns[i])) { + resolveScopedSlots(fns[i], res); + } else { + res[fns[i].key] = fns[i].fn; + } } return res } @@ -2557,7 +2581,7 @@ var index = 0; * Reset the scheduler's state. */ function resetSchedulerState () { - queue.length = activatedChildren.length = 0; + index = queue.length = activatedChildren.length = 0; has = {}; if (process.env.NODE_ENV !== 'production') { circular = {}; @@ -2667,10 +2691,10 @@ function queueWatcher (watcher) { // if already flushing, splice the watcher based on its id // if already past its id, it will be run next immediately. var i = queue.length - 1; - while (i >= 0 && queue[i].id > watcher.id) { + while (i > index && queue[i].id > watcher.id) { i--; } - queue.splice(Math.max(i, index) + 1, 0, watcher); + queue.splice(i + 1, 0, watcher); } // queue the flush if (!waiting) { @@ -3573,7 +3597,8 @@ function _createElement ( } // support single function children as default scoped slot if (Array.isArray(children) && - typeof children[0] === 'function') { + typeof children[0] === 'function' + ) { data = data || {}; data.scopedSlots = { default: children[0] }; children.length = 0; @@ -3661,6 +3686,9 @@ function renderList ( ret[i] = render(val[key], key, i); } } + if (isDef(ret)) { + (ret)._isVList = true; + } return ret } @@ -4060,7 +4088,8 @@ function dedupe (latest, extended, sealed) { function Vue$3 (options) { if (process.env.NODE_ENV !== 'production' && - !(this instanceof Vue$3)) { + !(this instanceof Vue$3) + ) { warn('Vue is a constructor and should be called with the `new` keyword'); } this._init(options); @@ -4078,7 +4107,7 @@ function initUse (Vue) { Vue.use = function (plugin) { /* istanbul ignore if */ if (plugin.installed) { - return + return this } // additional parameters var args = toArray(arguments, 1); @@ -4098,6 +4127,7 @@ function initUse (Vue) { function initMixin$1 (Vue) { Vue.mixin = function (mixin) { this.options = mergeOptions(this.options, mixin); + return this }; } @@ -4391,11 +4421,12 @@ Object.defineProperty(Vue$3.prototype, '$isServer', { Object.defineProperty(Vue$3.prototype, '$ssrContext', { get: function get () { + /* istanbul ignore next */ return this.$vnode.ssrContext } }); -Vue$3.version = '2.3.2'; +Vue$3.version = '2.3.3'; /* */ @@ -4976,8 +5007,9 @@ function createPatchFunction (backend) { } // for slot content they should also get the scopeId from the host instance. if (isDef(i = activeInstance) && - i !== vnode.context && - isDef(i = i.$options._scopeId)) { + i !== vnode.context && + isDef(i = i.$options._scopeId) + ) { nodeOps.setAttribute(vnode.elm, i, ''); } } @@ -5129,9 +5161,10 @@ function createPatchFunction (backend) { // if the new node is not cloned it means the render functions have been // reset by the hot-reload-api and we need to do a proper re-render. if (isTrue(vnode.isStatic) && - isTrue(oldVnode.isStatic) && - vnode.key === oldVnode.key && - (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) { + isTrue(oldVnode.isStatic) && + vnode.key === oldVnode.key && + (isTrue(vnode.isCloned) || isTrue(vnode.isOnce)) + ) { vnode.elm = oldVnode.elm; vnode.componentInstance = oldVnode.componentInstance; return @@ -5222,8 +5255,9 @@ function createPatchFunction (backend) { // longer than the virtual children list. if (!childrenMatch || childNode) { if (process.env.NODE_ENV !== 'production' && - typeof console !== 'undefined' && - !bailed) { + typeof console !== 'undefined' && + !bailed + ) { bailed = true; console.warn('Parent: ', elm); console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children); @@ -6360,7 +6394,8 @@ function updateStyle (oldVnode, vnode) { var oldData = oldVnode.data; if (isUndef(data.staticStyle) && isUndef(data.style) && - isUndef(oldData.staticStyle) && isUndef(oldData.style)) { + isUndef(oldData.staticStyle) && isUndef(oldData.style) + ) { return } @@ -6498,12 +6533,14 @@ var animationEndEvent = 'animationend'; if (hasTransition) { /* istanbul ignore if */ if (window.ontransitionend === undefined && - window.onwebkittransitionend !== undefined) { + window.onwebkittransitionend !== undefined + ) { transitionProp = 'WebkitTransition'; transitionEndEvent = 'webkitTransitionEnd'; } if (window.onanimationend === undefined && - window.onwebkitanimationend !== undefined) { + window.onwebkitanimationend !== undefined + ) { animationProp = 'WebkitAnimation'; animationEndEvent = 'webkitAnimationEnd'; } @@ -6743,8 +6780,9 @@ function enter (vnode, toggleDisplay) { var parent = el.parentNode; var pendingNode = parent && parent._pending && parent._pending[vnode.key]; if (pendingNode && - pendingNode.tag === vnode.tag && - pendingNode.elm._leaveCb) { + pendingNode.tag === vnode.tag && + pendingNode.elm._leaveCb + ) { pendingNode.elm._leaveCb(); } enterHook && enterHook(el, cb); @@ -7077,6 +7115,8 @@ function onCompositionStart (e) { } function onCompositionEnd (e) { + // prevent triggering an input event for no reason + if (!e.target.composing) { return } e.target.composing = false; trigger(e.target, 'input'); } @@ -7259,7 +7299,8 @@ var Transition = { // warn invalid mode if (process.env.NODE_ENV !== 'production' && - mode && mode !== 'in-out' && mode !== 'out-in') { + mode && mode !== 'in-out' && mode !== 'out-in' + ) { warn( 'invalid mode: ' + mode, this.$parent @@ -7543,8 +7584,9 @@ setTimeout(function () { } } if (process.env.NODE_ENV !== 'production' && - config.productionTip !== false && - inBrowser && typeof console !== 'undefined') { + config.productionTip !== false && + inBrowser && typeof console !== 'undefined' + ) { console[console.info ? 'info' : 'log']( "You are running Vue in development mode.\n" + "Make sure to turn on production mode when deploying for production.\n" + @@ -7877,8 +7919,9 @@ function parseHTML (html, options) { // Close all the open elements, up the stack for (var i = stack.length - 1; i >= pos; i--) { if (process.env.NODE_ENV !== 'production' && - (i > pos || !tagName) && - options.warn) { + (i > pos || !tagName) && + options.warn + ) { options.warn( ("tag <" + (stack[i].tag) + "> has no matching end tag.") ); @@ -8173,8 +8216,9 @@ function parse ( // IE textarea placeholder bug /* istanbul ignore if */ if (isIE && - currentParent.tag === 'textarea' && - currentParent.attrsMap.placeholder === text) { + currentParent.tag === 'textarea' && + currentParent.attrsMap.placeholder === text + ) { return } var children = currentParent.children; @@ -8678,17 +8722,17 @@ var modifierCode = { function genHandlers ( events, - native, + isNative, warn ) { - var res = native ? 'nativeOn:{' : 'on:{'; + var res = isNative ? 'nativeOn:{' : 'on:{'; for (var name in events) { var handler = events[name]; // #5330: warn click.right, since right clicks do not actually fire click events. if (process.env.NODE_ENV !== 'production' && - name === 'click' && - handler && handler.modifiers && handler.modifiers.right - ) { + name === 'click' && + handler && handler.modifiers && handler.modifiers.right + ) { warn( "Use \"contextmenu\" instead of \"click.right\" since right clicks " + "do not actually fire \"click\" events." @@ -9043,10 +9087,25 @@ function genScopedSlots (slots) { } function genScopedSlot (key, el) { - return "[" + key + ",function(" + (String(el.attrsMap.scope)) + "){" + + if (el.for && !el.forProcessed) { + return genForScopedSlot(key, el) + } + return "{key:" + key + ",fn:function(" + (String(el.attrsMap.scope)) + "){" + "return " + (el.tag === 'template' ? genChildren(el) || 'void 0' - : genElement(el)) + "}]" + : genElement(el)) + "}}" +} + +function genForScopedSlot (key, el) { + var exp = el.for; + var alias = el.alias; + var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : ''; + var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : ''; + el.forProcessed = true; // avoid recursion + return "_l((" + exp + ")," + + "function(" + alias + iterator1 + iterator2 + "){" + + "return " + (genScopedSlot(key, el)) + + '})' } function genChildren (el, checkSkip) { @@ -9055,9 +9114,10 @@ function genChildren (el, checkSkip) { var el$1 = children[0]; // optimize single v-for if (children.length === 1 && - el$1.for && - el$1.tag !== 'template' && - el$1.tag !== 'slot') { + el$1.for && + el$1.tag !== 'template' && + el$1.tag !== 'slot' + ) { return genElement(el$1) } var normalizationType = checkSkip ? getNormalizationType(children) : 0; diff --git a/dist/vue.js b/dist/vue.js index 84cabb40efb..6a7bedc6568 100644 --- a/dist/vue.js +++ b/dist/vue.js @@ -1,5 +1,5 @@ /*! - * Vue.js v2.3.2 + * Vue.js v2.3.3 * (c) 2014-2017 Evan You * Released under the MIT License. */ @@ -25,6 +25,9 @@ function isTrue (v) { return v === true } +function isFalse (v) { + return v === false +} /** * Check if value is primitive */ @@ -1420,7 +1423,8 @@ function getPropDefaultValue (vm, prop, key) { // return previous default value to avoid unnecessary watcher trigger if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && - vm._props[key] !== undefined) { + vm._props[key] !== undefined + ) { return vm._props[key] } // call factory function for non-Function types @@ -1694,6 +1698,7 @@ function cloneVNode (vnode) { cloned.ns = vnode.ns; cloned.isStatic = vnode.isStatic; cloned.key = vnode.key; + cloned.isComment = vnode.isComment; cloned.isCloned = true; return cloned } @@ -1912,6 +1917,10 @@ function normalizeChildren (children) { : undefined } +function isTextNode (node) { + return isDef(node) && isDef(node.text) && isFalse(node.isComment) +} + function normalizeArrayChildren (children, nestedIndex) { var res = []; var i, c, last; @@ -1923,18 +1932,25 @@ function normalizeArrayChildren (children, nestedIndex) { if (Array.isArray(c)) { res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i))); } else if (isPrimitive(c)) { - if (isDef(last) && isDef(last.text)) { - last.text += String(c); + if (isTextNode(last)) { + // merge adjacent text nodes + // this is necessary for SSR hydration because text nodes are + // essentially merged when rendered to HTML strings + (last).text += String(c); } else if (c !== '') { // convert primitive to vnode res.push(createTextVNode(c)); } } else { - if (isDef(c.text) && isDef(last) && isDef(last.text)) { + if (isTextNode(c) && isTextNode(last)) { + // merge adjacent text nodes res[res.length - 1] = createTextVNode(last.text + c.text); } else { // default key for nested array children (likely generated by v-for) - if (isDef(c.tag) && isUndef(c.key) && isDef(nestedIndex)) { + if (isTrue(children._isVList) && + isDef(c.tag) && + isUndef(c.key) && + isDef(nestedIndex)) { c.key = "__vlist" + nestedIndex + "_" + i + "__"; } res.push(c); @@ -2034,9 +2050,11 @@ function resolveAsyncComponent ( if (isDef(res.timeout)) { setTimeout(function () { - reject( - "timeout (" + (res.timeout) + "ms)" - ); + if (isUndef(factory.resolved)) { + reject( + "timeout (" + (res.timeout) + "ms)" + ); + } }, res.timeout); } } @@ -2215,7 +2233,8 @@ function resolveSlots ( // named slots should only be respected if the vnode was rendered in the // same context. if ((child.context === context || child.functionalContext === context) && - child.data && child.data.slot != null) { + child.data && child.data.slot != null + ) { var name = child.data.slot; var slot = (slots[name] || (slots[name] = [])); if (child.tag === 'template') { @@ -2239,11 +2258,16 @@ function isWhitespace (node) { } function resolveScopedSlots ( - fns + fns, // see flow/vnode + res ) { - var res = {}; + res = res || {}; for (var i = 0; i < fns.length; i++) { - res[fns[i][0]] = fns[i][1]; + if (Array.isArray(fns[i])) { + resolveScopedSlots(fns[i], res); + } else { + res[fns[i].key] = fns[i].fn; + } } return res } @@ -2561,7 +2585,7 @@ var index = 0; * Reset the scheduler's state. */ function resetSchedulerState () { - queue.length = activatedChildren.length = 0; + index = queue.length = activatedChildren.length = 0; has = {}; { circular = {}; @@ -2671,10 +2695,10 @@ function queueWatcher (watcher) { // if already flushing, splice the watcher based on its id // if already past its id, it will be run next immediately. var i = queue.length - 1; - while (i >= 0 && queue[i].id > watcher.id) { + while (i > index && queue[i].id > watcher.id) { i--; } - queue.splice(Math.max(i, index) + 1, 0, watcher); + queue.splice(i + 1, 0, watcher); } // queue the flush if (!waiting) { @@ -3571,7 +3595,8 @@ function _createElement ( } // support single function children as default scoped slot if (Array.isArray(children) && - typeof children[0] === 'function') { + typeof children[0] === 'function' + ) { data = data || {}; data.scopedSlots = { default: children[0] }; children.length = 0; @@ -3659,6 +3684,9 @@ function renderList ( ret[i] = render(val[key], key, i); } } + if (isDef(ret)) { + (ret)._isVList = true; + } return ret } @@ -4054,7 +4082,8 @@ function dedupe (latest, extended, sealed) { function Vue$3 (options) { if ("development" !== 'production' && - !(this instanceof Vue$3)) { + !(this instanceof Vue$3) + ) { warn('Vue is a constructor and should be called with the `new` keyword'); } this._init(options); @@ -4072,7 +4101,7 @@ function initUse (Vue) { Vue.use = function (plugin) { /* istanbul ignore if */ if (plugin.installed) { - return + return this } // additional parameters var args = toArray(arguments, 1); @@ -4092,6 +4121,7 @@ function initUse (Vue) { function initMixin$1 (Vue) { Vue.mixin = function (mixin) { this.options = mergeOptions(this.options, mixin); + return this }; } @@ -4385,11 +4415,12 @@ Object.defineProperty(Vue$3.prototype, '$isServer', { Object.defineProperty(Vue$3.prototype, '$ssrContext', { get: function get () { + /* istanbul ignore next */ return this.$vnode.ssrContext } }); -Vue$3.version = '2.3.2'; +Vue$3.version = '2.3.3'; /* */ @@ -4970,8 +5001,9 @@ function createPatchFunction (backend) { } // for slot content they should also get the scopeId from the host instance. if (isDef(i = activeInstance) && - i !== vnode.context && - isDef(i = i.$options._scopeId)) { + i !== vnode.context && + isDef(i = i.$options._scopeId) + ) { nodeOps.setAttribute(vnode.elm, i, ''); } } @@ -5123,9 +5155,10 @@ function createPatchFunction (backend) { // if the new node is not cloned it means the render functions have been // reset by the hot-reload-api and we need to do a proper re-render. if (isTrue(vnode.isStatic) && - isTrue(oldVnode.isStatic) && - vnode.key === oldVnode.key && - (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))) { + isTrue(oldVnode.isStatic) && + vnode.key === oldVnode.key && + (isTrue(vnode.isCloned) || isTrue(vnode.isOnce)) + ) { vnode.elm = oldVnode.elm; vnode.componentInstance = oldVnode.componentInstance; return @@ -5216,8 +5249,9 @@ function createPatchFunction (backend) { // longer than the virtual children list. if (!childrenMatch || childNode) { if ("development" !== 'production' && - typeof console !== 'undefined' && - !bailed) { + typeof console !== 'undefined' && + !bailed + ) { bailed = true; console.warn('Parent: ', elm); console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children); @@ -6354,7 +6388,8 @@ function updateStyle (oldVnode, vnode) { var oldData = oldVnode.data; if (isUndef(data.staticStyle) && isUndef(data.style) && - isUndef(oldData.staticStyle) && isUndef(oldData.style)) { + isUndef(oldData.staticStyle) && isUndef(oldData.style) + ) { return } @@ -6492,12 +6527,14 @@ var animationEndEvent = 'animationend'; if (hasTransition) { /* istanbul ignore if */ if (window.ontransitionend === undefined && - window.onwebkittransitionend !== undefined) { + window.onwebkittransitionend !== undefined + ) { transitionProp = 'WebkitTransition'; transitionEndEvent = 'webkitTransitionEnd'; } if (window.onanimationend === undefined && - window.onwebkitanimationend !== undefined) { + window.onwebkitanimationend !== undefined + ) { animationProp = 'WebkitAnimation'; animationEndEvent = 'webkitAnimationEnd'; } @@ -6737,8 +6774,9 @@ function enter (vnode, toggleDisplay) { var parent = el.parentNode; var pendingNode = parent && parent._pending && parent._pending[vnode.key]; if (pendingNode && - pendingNode.tag === vnode.tag && - pendingNode.elm._leaveCb) { + pendingNode.tag === vnode.tag && + pendingNode.elm._leaveCb + ) { pendingNode.elm._leaveCb(); } enterHook && enterHook(el, cb); @@ -7071,6 +7109,8 @@ function onCompositionStart (e) { } function onCompositionEnd (e) { + // prevent triggering an input event for no reason + if (!e.target.composing) { return } e.target.composing = false; trigger(e.target, 'input'); } @@ -7253,7 +7293,8 @@ var Transition = { // warn invalid mode if ("development" !== 'production' && - mode && mode !== 'in-out' && mode !== 'out-in') { + mode && mode !== 'in-out' && mode !== 'out-in' + ) { warn( 'invalid mode: ' + mode, this.$parent @@ -7537,8 +7578,9 @@ setTimeout(function () { } } if ("development" !== 'production' && - config.productionTip !== false && - inBrowser && typeof console !== 'undefined') { + config.productionTip !== false && + inBrowser && typeof console !== 'undefined' + ) { console[console.info ? 'info' : 'log']( "You are running Vue in development mode.\n" + "Make sure to turn on production mode when deploying for production.\n" + @@ -7871,8 +7913,9 @@ function parseHTML (html, options) { // Close all the open elements, up the stack for (var i = stack.length - 1; i >= pos; i--) { if ("development" !== 'production' && - (i > pos || !tagName) && - options.warn) { + (i > pos || !tagName) && + options.warn + ) { options.warn( ("tag <" + (stack[i].tag) + "> has no matching end tag.") ); @@ -8167,8 +8210,9 @@ function parse ( // IE textarea placeholder bug /* istanbul ignore if */ if (isIE && - currentParent.tag === 'textarea' && - currentParent.attrsMap.placeholder === text) { + currentParent.tag === 'textarea' && + currentParent.attrsMap.placeholder === text + ) { return } var children = currentParent.children; @@ -8672,17 +8716,17 @@ var modifierCode = { function genHandlers ( events, - native, + isNative, warn ) { - var res = native ? 'nativeOn:{' : 'on:{'; + var res = isNative ? 'nativeOn:{' : 'on:{'; for (var name in events) { var handler = events[name]; // #5330: warn click.right, since right clicks do not actually fire click events. if ("development" !== 'production' && - name === 'click' && - handler && handler.modifiers && handler.modifiers.right - ) { + name === 'click' && + handler && handler.modifiers && handler.modifiers.right + ) { warn( "Use \"contextmenu\" instead of \"click.right\" since right clicks " + "do not actually fire \"click\" events." @@ -9037,10 +9081,25 @@ function genScopedSlots (slots) { } function genScopedSlot (key, el) { - return "[" + key + ",function(" + (String(el.attrsMap.scope)) + "){" + + if (el.for && !el.forProcessed) { + return genForScopedSlot(key, el) + } + return "{key:" + key + ",fn:function(" + (String(el.attrsMap.scope)) + "){" + "return " + (el.tag === 'template' ? genChildren(el) || 'void 0' - : genElement(el)) + "}]" + : genElement(el)) + "}}" +} + +function genForScopedSlot (key, el) { + var exp = el.for; + var alias = el.alias; + var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : ''; + var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : ''; + el.forProcessed = true; // avoid recursion + return "_l((" + exp + ")," + + "function(" + alias + iterator1 + iterator2 + "){" + + "return " + (genScopedSlot(key, el)) + + '})' } function genChildren (el, checkSkip) { @@ -9049,9 +9108,10 @@ function genChildren (el, checkSkip) { var el$1 = children[0]; // optimize single v-for if (children.length === 1 && - el$1.for && - el$1.tag !== 'template' && - el$1.tag !== 'slot') { + el$1.for && + el$1.tag !== 'template' && + el$1.tag !== 'slot' + ) { return genElement(el$1) } var normalizationType = checkSkip ? getNormalizationType(children) : 0; diff --git a/dist/vue.min.js b/dist/vue.min.js index 645530932e6..757d5aa96f2 100644 --- a/dist/vue.min.js +++ b/dist/vue.min.js @@ -1,8 +1,8 @@ /*! - * Vue.js v2.3.2 + * Vue.js v2.3.3 * (c) 2014-2017 Evan You * Released under the MIT License. */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";function e(e){return void 0===e||null===e}function t(e){return void 0!==e&&null!==e}function n(e){return!0===e}function r(e){return"string"==typeof e||"number"==typeof e}function i(e){return null!==e&&"object"==typeof e}function o(e){return"[object Object]"===Ai.call(e)}function a(e){return"[object RegExp]"===Ai.call(e)}function s(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function c(e){var t=parseFloat(e);return isNaN(t)?e:t}function u(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}function f(e,t){return Si.call(e,t)}function p(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function d(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function v(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function h(e,t){for(var n in t)e[n]=t[n];return e}function m(e){for(var t={},n=0;n=0&&$o[n].id>e.id;)n--;$o.splice(Math.max(n,Ao)+1,0,e)}else $o.push(e);Co||(Co=!0,ro($e))}}function Ae(e){To.clear(),Oe(e,To)}function Oe(e,t){var n,r,o=Array.isArray(e);if((o||i(e))&&Object.isExtensible(e)){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(o)for(n=e.length;n--;)Oe(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)Oe(e[r[n]],t)}}function Se(e,t,n){Eo.get=function(){return this[t][n]},Eo.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Eo)}function Te(e){e._watchers=[];var t=e.$options;t.props&&Ee(e,t.props),t.methods&&Me(e,t.methods),t.data?je(e):E(e._data={},!0),t.computed&&Le(e,t.computed),t.watch&&Pe(e,t.watch)}function Ee(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;lo.shouldConvert=o;for(var a in t)!function(o){i.push(o);var a=U(o,t,n,e);j(r,o,a),o in e||Se(e,"_props",o)}(a);lo.shouldConvert=!0}function je(e){var t=e.$options.data;t=e._data="function"==typeof t?Ne(t,e):t||{},o(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,i=n.length;i--;)r&&f(r,n[i])||$(n[i])||Se(e,"_data",n[i]);E(t,!0)}function Ne(e,t){try{return e.call(t)}catch(e){return C(e,t,"data()"),{}}}function Le(e,t){var n=e._computedWatchers=Object.create(null);for(var r in t){var i=t[r],o="function"==typeof i?i:i.get;n[r]=new So(e,o,g,jo),r in e||Ie(e,r,i)}}function Ie(e,t,n){"function"==typeof n?(Eo.get=De(t),Eo.set=g):(Eo.get=n.get?!1!==n.cache?De(t):n.get:g,Eo.set=n.set?n.set:g),Object.defineProperty(e,t,Eo)}function De(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),oo.target&&t.depend(),t.value}}function Me(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?g:d(t[n],e)}function Pe(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function pt(e){this._init(e)}function dt(e){e.use=function(e){if(!e.installed){var t=v(arguments,1);return t.unshift(this),"function"==typeof e.install?e.install.apply(e,t):"function"==typeof e&&e.apply(null,t),e.installed=!0,this}}}function vt(e){e.mixin=function(e){this.options=B(this.options,e)}}function ht(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=B(n.options,e),a.super=n,a.options.props&&mt(a),a.options.computed&>(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Di.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=h({},a.options),i[r]=a,a}}function mt(e){var t=e.options.props;for(var n in t)Se(e.prototype,"_props",n)}function gt(e){var t=e.options.computed;for(var n in t)Ie(e.prototype,n,t[n])}function yt(e){Di.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&o(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function _t(e){return e&&(e.Ctor.options.name||e.tag)}function bt(e,t){return"string"==typeof e?e.split(",").indexOf(t)>-1:!!a(e)&&e.test(t)}function $t(e,t,n){for(var r in e){var i=e[r];if(i){var o=_t(i.componentOptions);o&&!n(o)&&(i!==t&&xt(i),e[r]=null)}}}function xt(e){e&&e.componentInstance.$destroy()}function wt(e){for(var n=e.data,r=e,i=e;t(i.componentInstance);)i=i.componentInstance._vnode,i.data&&(n=Ct(i.data,n));for(;t(r=r.parent);)r.data&&(n=Ct(n,r.data));return kt(n)}function Ct(e,n){return{staticClass:At(e.staticClass,n.staticClass),class:t(e.class)?[e.class,n.class]:n.class}}function kt(e){var n=e.class,r=e.staticClass;return t(r)||t(n)?At(r,Ot(n)):""}function At(e,t){return e?t?e+" "+t:e:t||""}function Ot(n){if(e(n))return"";if("string"==typeof n)return n;var r="";if(Array.isArray(n)){for(var o,a=0,s=n.length;a-1?ua[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:ua[e]=/HTMLUnknownElement/.test(t.toString())}function Et(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}function jt(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function Nt(e,t){return document.createElementNS(ia[e],t)}function Lt(e){return document.createTextNode(e)}function It(e){return document.createComment(e)}function Dt(e,t,n){e.insertBefore(t,n)}function Mt(e,t){e.removeChild(t)}function Pt(e,t){e.appendChild(t)}function Rt(e){return e.parentNode}function Ft(e){return e.nextSibling}function Bt(e){return e.tagName}function Ht(e,t){e.textContent=t}function Ut(e,t,n){e.setAttribute(t,n)}function Vt(e,t){var n=e.data.ref;if(n){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?l(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])&&o[n].indexOf(i)<0?o[n].push(i):o[n]=[i]:o[n]=i}}function zt(e,n){return e.key===n.key&&e.tag===n.tag&&e.isComment===n.isComment&&t(e.data)===t(n.data)&&Jt(e,n)}function Jt(e,n){if("input"!==e.tag)return!0;var r;return(t(r=e.data)&&t(r=r.attrs)&&r.type)===(t(r=n.data)&&t(r=r.attrs)&&r.type)}function Kt(e,n,r){var i,o,a={};for(i=n;i<=r;++i)o=e[i].key,t(o)&&(a[o]=i);return a}function qt(e,t){(e.data.directives||t.data.directives)&&Wt(e,t)}function Wt(e,t){var n,r,i,o=e===pa,a=t===pa,s=Zt(e.data.directives,e.context),c=Zt(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,Yt(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(Yt(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n=0&&" "===(m=e.charAt(h));h--);m&&_a.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=e.slice(0,i).trim()):t();if(void 0===o?o=e.slice(0,i).trim():0!==v&&t(),a)for(i=0;i=Bo}function gn(e){return 34===e||39===e}function yn(e){var t=1;for(zo=Vo;!mn();)if(e=hn(),gn(e))_n(e);else if(91===e&&t++,93===e&&t--,0===t){Jo=Vo;break}}function _n(e){for(var t=e;!mn()&&(e=hn())!==t;);}function bn(e,t,n){Ko=n;var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if("select"===o)wn(e,r,i);else if("input"===o&&"checkbox"===a)$n(e,r,i);else if("input"===o&&"radio"===a)xn(e,r,i);else if("input"===o||"textarea"===o)Cn(e,r,i);else if(!Pi.isReservedTag(o))return pn(e,r,i),!1;return!0}function $n(e,t,n){var r=n&&n.number,i=ln(e,"value")||"null",o=ln(e,"true-value")||"true",a=ln(e,"false-value")||"false";an(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),un(e,$a,"var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+t+"=$$a.concat($$v))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+dn(t,"$$c")+"}",null,!0)}function xn(e,t,n){var r=n&&n.number,i=ln(e,"value")||"null";i=r?"_n("+i+")":i,an(e,"checked","_q("+t+","+i+")"),un(e,$a,dn(t,i),null,!0)}function wn(e,t,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+dn(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),un(e,"change",o,null,!0)}function Cn(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?ba:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=dn(t,l);c&&(f="if($event.target.composing)return;"+f),an(e,"value","("+t+")"),un(e,u,f,null,!0),(s||a||"number"===r)&&un(e,"blur","$forceUpdate()")}function kn(e){var n;t(e[ba])&&(n=zi?"change":"input",e[n]=[].concat(e[ba],e[n]||[]),delete e[ba]),t(e[$a])&&(n=Zi?"click":"change",e[n]=[].concat(e[$a],e[n]||[]),delete e[$a])}function An(e,t,n,r,i){if(n){var o=t,a=qo;t=function(n){null!==(1===arguments.length?o(n):o.apply(null,arguments))&&On(e,t,r,a)}}qo.addEventListener(e,t,Gi?{capture:r,passive:i}:r)}function On(e,t,n,r){(r||qo).removeEventListener(e,t,n)}function Sn(t,n){if(!e(t.data.on)||!e(n.data.on)){var r=n.data.on||{},i=t.data.on||{};qo=n.elm,kn(r),G(r,i,An,On,n.context)}}function Tn(n,r){if(!e(n.data.domProps)||!e(r.data.domProps)){var i,o,a=r.elm,s=n.data.domProps||{},c=r.data.domProps||{};t(c.__ob__)&&(c=r.data.domProps=h({},c));for(i in s)e(c[i])&&(a[i]="");for(i in c)if(o=c[i],"textContent"!==i&&"innerHTML"!==i||(r.children&&(r.children.length=0),o!==s[i]))if("value"===i){a._value=o;var u=e(o)?"":String(o);En(a,r,u)&&(a.value=u)}else a[i]=o}}function En(e,t,n){return!e.composing&&("option"===t.tag||jn(e,n)||Nn(e,n))}function jn(e,t){return document.activeElement!==e&&e.value!==t}function Nn(e,n){var r=e.value,i=e._vModifiers;return t(i)&&i.number||"number"===e.type?c(r)!==c(n):t(i)&&i.trim?r.trim()!==n.trim():r!==n}function Ln(e){var t=In(e.style);return e.staticStyle?h(e.staticStyle,t):t}function In(e){return Array.isArray(e)?m(e):"string"==typeof e?Ca(e):e}function Dn(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)i=i.componentInstance._vnode,i.data&&(n=Ln(i.data))&&h(r,n);(n=Ln(e.data))&&h(r,n);for(var o=e;o=o.parent;)o.data&&(n=Ln(o.data))&&h(r,n);return r}function Mn(n,r){var i=r.data,o=n.data;if(!(e(i.staticStyle)&&e(i.style)&&e(o.staticStyle)&&e(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,p=In(r.data.style)||{};r.data.normalizedStyle=t(p.__ob__)?h({},p):p;var d=Dn(r,!0);for(s in f)e(d[s])&&Oa(c,s,"");for(s in d)(a=d[s])!==f[s]&&Oa(c,s,null==a?"":a)}}function Pn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Rn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t);else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");e.setAttribute("class",n.trim())}}function Fn(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&h(t,ja(e.name||"v")),h(t,e),t}return"string"==typeof e?ja(e):void 0}}function Bn(e){Fa(function(){Fa(e)})}function Hn(e,t){(e._transitionClasses||(e._transitionClasses=[])).push(t),Pn(e,t)}function Un(e,t){e._transitionClasses&&l(e._transitionClasses,t),Rn(e,t)}function Vn(e,t,n){var r=zn(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===La?Ma:Ra,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=La,l=a,f=o.length):t===Ia?u>0&&(n=Ia,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?La:Ia:null,f=n?n===La?o.length:c.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===La&&Ba.test(r[Da+"Property"])}}function Jn(e,t){for(;e.length1}function Yn(e,t){!0!==t.data.show&&qn(t)}function Qn(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s-1,a.selected!==o&&(a.selected=o);else if(y(er(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Xn(e,t){for(var n=0,r=t.length;n=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)t.end&&t.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,r):"p"===s&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}for(var i,o,a=[],s=t.expectHTML,c=t.isUnaryTag||Ni,u=t.canBeLeftOpenTag||Ni,l=0;e;){if(i=e,o&&Ns(o)){var f=o.toLowerCase(),p=Ls[f]||(Ls[f]=new RegExp("([\\s\\S]*?)(]*>)","i")),d=0,v=e.replace(p,function(e,n,r){return d=r.length,Ns(f)||"noscript"===f||(n=n.replace(//g,"$1").replace(//g,"$1")),t.chars&&t.chars(n),""});l+=e.length-v.length,e=v,r(f,l-d,l)}else{var h=e.indexOf("<");if(0===h){if(fs.test(e)){var m=e.indexOf("--\x3e");if(m>=0){n(m+3);continue}}if(ps.test(e)){var g=e.indexOf("]>");if(g>=0){n(g+2);continue}}var y=e.match(ls);if(y){n(y[0].length);continue}var _=e.match(us);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var t=e.match(ss);if(t){var r={tagName:t[1],attrs:[],start:l};n(t[0].length);for(var i,o;!(i=e.match(cs))&&(o=e.match(os));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(e){var n=e.tagName,i=e.unarySlash;s&&("p"===o&&rs(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||"html"===n&&"head"===o||!!i,f=e.attrs.length,p=new Array(f),d=0;d=0){for(w=e.slice(h);!(us.test(w)||ss.test(w)||fs.test(w)||ps.test(w)||(C=w.indexOf("<",1))<0);)h+=C,w=e.slice(h);x=e.substring(0,h),n(h)}h<0&&(x=e,e=""),t.chars&&x&&t.chars(x)}if(e===i){t.chars&&t.chars(e);break}}r()}function mr(e,t){var n=t?Rs(t):Ps;if(n.test(e)){for(var r,i,o=[],a=n.lastIndex=0;r=n.exec(e);){i=r.index,i>a&&o.push(JSON.stringify(e.slice(a,i)));var s=tn(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a0,Ki=Vi&&Vi.indexOf("edge/")>0,qi=Vi&&Vi.indexOf("android")>0,Wi=Vi&&/iphone|ipad|ipod|ios/.test(Vi),Zi=Vi&&/chrome\/\d+/.test(Vi)&&!Ki,Gi=!1;if(Ui)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){Gi=!0}}),window.addEventListener("test-passive",null,Yi)}catch(e){}var Qi,Xi,eo=function(){return void 0===Qi&&(Qi=!Ui&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),Qi},to=Ui&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,no="undefined"!=typeof Symbol&&k(Symbol)&&"undefined"!=typeof Reflect&&k(Reflect.ownKeys),ro=function(){function e(){r=!1;var e=n.slice(0);n.length=0;for(var t=0;t1?v(n):n;for(var r=v(arguments,1),i=0,o=n.length;i1&&(t[n[0].trim()]=n[1].trim())}}),t}),ka=/^--/,Aa=/\s*!important$/,Oa=function(e,t,n){if(ka.test(t))e.style.setProperty(t,n);else if(Aa.test(n))e.style.setProperty(t,n.replace(Aa,""),"important");else{var r=Ta(t);if(Array.isArray(n))for(var i=0,o=n.length;iv?(f=e(i[g+1])?null:i[g+1].elm,y(n,f,i,d,g,o)):d>g&&b(n,r,p,v)}function w(r,i,o,a){if(r!==i){if(n(i.isStatic)&&n(r.isStatic)&&i.key===r.key&&(n(i.isCloned)||n(i.isOnce)))return i.elm=r.elm,void(i.componentInstance=r.componentInstance);var s,c=i.data;t(c)&&t(s=c.hook)&&t(s=s.prepatch)&&s(r,i);var u=i.elm=r.elm,l=r.children,f=i.children;if(t(c)&&h(i)){for(s=0;s',n.innerHTML.indexOf(t)>0}("\n"," "),ts=u("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ns=u("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),rs=u("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),is=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],os=new RegExp("^\\s*"+/([^\s"'<>\/=]+)/.source+"(?:\\s*("+/(?:=)/.source+")\\s*(?:"+is.join("|")+"))?"),as="[a-zA-Z_][\\w\\-\\.]*",ss=new RegExp("^<((?:"+as+"\\:)?"+as+")"),cs=/^\s*(\/?)>/,us=new RegExp("^<\\/((?:"+as+"\\:)?"+as+")[^>]*>"),ls=/^]+>/i,fs=/^/g,"$1").replace(//g,"$1")),t.chars&&t.chars(n),""});l+=e.length-v.length,e=v,r(f,l-d,l)}else{var h=e.indexOf("<");if(0===h){if(vs.test(e)){var m=e.indexOf("--\x3e");if(m>=0){n(m+3);continue}}if(hs.test(e)){var g=e.indexOf("]>");if(g>=0){n(g+2);continue}}var y=e.match(ds);if(y){n(y[0].length);continue}var _=e.match(ps);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var t=e.match(ls);if(t){var r={tagName:t[1],attrs:[],start:l};n(t[0].length);for(var i,o;!(i=e.match(fs))&&(o=e.match(cs));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(e){var n=e.tagName,i=e.unarySlash;s&&("p"===o&&as(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||"html"===n&&"head"===o||!!i,f=e.attrs.length,p=new Array(f),d=0;d=0){for(x=e.slice(h);!(ps.test(x)||ls.test(x)||vs.test(x)||hs.test(x)||(w=x.indexOf("<",1))<0);)h+=w,x=e.slice(h);C=e.substring(0,h),n(h)}h<0&&(C=e,e=""),t.chars&&C&&t.chars(C)}if(e===i){t.chars&&t.chars(e);break}}r()}function yr(e,t){var n=t?Hs(t):Bs;if(n.test(e)){for(var r,i,o=[],a=n.lastIndex=0;r=n.exec(e);){i=r.index,i>a&&o.push(JSON.stringify(e.slice(a,i)));var s=rn(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a0,Zi=Ki&&Ki.indexOf("edge/")>0,Gi=Ki&&Ki.indexOf("android")>0,Yi=Ki&&/iphone|ipad|ipod|ios/.test(Ki),Qi=Ki&&/chrome\/\d+/.test(Ki)&&!Zi,Xi=!1;if(Ji)try{var eo={};Object.defineProperty(eo,"passive",{get:function(){Xi=!0}}),window.addEventListener("test-passive",null,eo)}catch(e){}var to,no,ro=function(){return void 0===to&&(to=!Ji&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),to},io=Ji&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,oo="undefined"!=typeof Symbol&&A(Symbol)&&"undefined"!=typeof Reflect&&A(Reflect.ownKeys),ao=function(){function e(){r=!1;var e=n.slice(0);n.length=0;for(var t=0;t1?h(n):n;for(var r=h(arguments,1),i=0,o=n.length;i1&&(t[n[0].trim()]=n[1].trim())}}),t}),Sa=/^--/,Ta=/\s*!important$/,Ea=function(e,t,n){if(Sa.test(t))e.style.setProperty(t,n);else if(Ta.test(n))e.style.setProperty(t,n.replace(Ta,""),"important");else{var r=Na(t);if(Array.isArray(n))for(var i=0,o=n.length;iv?(f=e(i[g+1])?null:i[g+1].elm,y(n,f,i,d,g,o)):d>g&&b(n,r,p,v)}function x(r,i,o,a){if(r!==i){if(n(i.isStatic)&&n(r.isStatic)&&i.key===r.key&&(n(i.isCloned)||n(i.isOnce)))return i.elm=r.elm,void(i.componentInstance=r.componentInstance);var s,c=i.data;t(c)&&t(s=c.hook)&&t(s=s.prepatch)&&s(r,i);var u=i.elm=r.elm,l=r.children,f=i.children;if(t(c)&&h(i)){for(s=0;s',n.innerHTML.indexOf(t)>0}("\n"," "),is=l("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),os=l("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),as=l("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),ss=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],cs=new RegExp("^\\s*"+/([^\s"'<>\/=]+)/.source+"(?:\\s*("+/(?:=)/.source+")\\s*(?:"+ss.join("|")+"))?"),us="[a-zA-Z_][\\w\\-\\.]*",ls=new RegExp("^<((?:"+us+"\\:)?"+us+")"),fs=/^\s*(\/?)>/,ps=new RegExp("^<\\/((?:"+us+"\\:)?"+us+")[^>]*>"),ds=/^]+>/i,vs=/^