diff --git a/dist/vue.common.dev.js b/dist/vue.common.dev.js index ef511fc906e..943ccf68082 100644 --- a/dist/vue.common.dev.js +++ b/dist/vue.common.dev.js @@ -276,15 +276,6 @@ var no = function (a, b, c) { return false; }; */ var identity = function (_) { return _; }; -/** - * Generate a string containing static keys from compiler modules. - */ -function genStaticKeys (modules) { - return modules.reduce(function (keys, m) { - return keys.concat(m.staticKeys || []) - }, []).join(',') -} - /** * Check if two values are loosely equal - that is, * if they are plain objects, do they have the same shape? @@ -2004,29 +1995,6 @@ function nextTick (cb, ctx) { /* */ -var mark; -var measure; - -{ - var perf = inBrowser && window.performance; - /* istanbul ignore if */ - if ( - perf && - perf.mark && - perf.measure && - perf.clearMarks && - perf.clearMeasures - ) { - mark = function (tag) { return perf.mark(tag); }; - measure = function (name, startTag, endTag) { - perf.measure(name, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - // perf.clearMeasures(name) - }; - } -} - /* not type checking this file because flow doesn't play well with Proxy */ var initProxy; @@ -2152,6 +2120,29 @@ function _traverse (val, seen) { } } +var mark; +var measure; + +{ + var perf = inBrowser && window.performance; + /* istanbul ignore if */ + if ( + perf && + perf.mark && + perf.measure && + perf.clearMarks && + perf.clearMeasures + ) { + mark = function (tag) { return perf.mark(tag); }; + measure = function (name, startTag, endTag) { + perf.measure(name, startTag, endTag); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + // perf.clearMeasures(name) + }; + } +} + /* */ var normalizeEvent = cached(function (name) { @@ -5599,8 +5590,6 @@ var isSVG = makeMap( true ); -var isPreTag = function (tag) { return tag === 'pre'; }; - var isReservedTag = function (tag) { return isHTMLTag(tag) || isSVG(tag) }; @@ -6814,776 +6803,139 @@ var klass = { /* */ -var validDivisionCharRE = /[\w).+\-_$\]]/; - -function parseFilters (exp) { - var inSingle = false; - var inDouble = false; - var inTemplateString = false; - var inRegex = false; - var curly = 0; - var square = 0; - var paren = 0; - var lastFilterIndex = 0; - var c, prev, i, expression, filters; - - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 0x27 && prev !== 0x5C) { inSingle = false; } - } else if (inDouble) { - if (c === 0x22 && prev !== 0x5C) { inDouble = false; } - } else if (inTemplateString) { - if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; } - } else if (inRegex) { - if (c === 0x2f && prev !== 0x5C) { inRegex = false; } - } else if ( - c === 0x7C && // pipe - exp.charCodeAt(i + 1) !== 0x7C && - exp.charCodeAt(i - 1) !== 0x7C && - !curly && !square && !paren - ) { - if (expression === undefined) { - // first filter, end of expression - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } else { - pushFilter(); - } - } else { - switch (c) { - case 0x22: inDouble = true; break // " - case 0x27: inSingle = true; break // ' - case 0x60: inTemplateString = true; break // ` - case 0x28: paren++; break // ( - case 0x29: paren--; break // ) - case 0x5B: square++; break // [ - case 0x5D: square--; break // ] - case 0x7B: curly++; break // { - case 0x7D: curly--; break // } - } - if (c === 0x2f) { // / - var j = i - 1; - var p = (void 0); - // find first non-whitespace prev char - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== ' ') { break } - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - - if (expression === undefined) { - expression = exp.slice(0, i).trim(); - } else if (lastFilterIndex !== 0) { - pushFilter(); - } - - function pushFilter () { - (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim()); - lastFilterIndex = i + 1; - } - - if (filters) { - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i]); - } - } - - return expression -} - -function wrapFilter (exp, filter) { - var i = filter.indexOf('('); - if (i < 0) { - // _f: resolveFilter - return ("_f(\"" + filter + "\")(" + exp + ")") - } else { - var name = filter.slice(0, i); - var args = filter.slice(i + 1); - return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args)) - } -} - /* */ +/* */ +/* */ -/* eslint-disable no-unused-vars */ -function baseWarn (msg, range) { - console.error(("[Vue compiler]: " + msg)); -} -/* eslint-enable no-unused-vars */ - -function pluckModuleFunction ( - modules, - key -) { - return modules - ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) - : [] -} - -function addProp (el, name, value, range, dynamic) { - (el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range)); - el.plain = false; -} - -function addAttr (el, name, value, range, dynamic) { - var attrs = dynamic - ? (el.dynamicAttrs || (el.dynamicAttrs = [])) - : (el.attrs || (el.attrs = [])); - attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range)); - el.plain = false; -} - -// add a raw attr (use this in preTransforms) -function addRawAttr (el, name, value, range) { - el.attrsMap[name] = value; - el.attrsList.push(rangeSetItem({ name: name, value: value }, range)); -} - -function addDirective ( - el, - name, - rawName, - value, - arg, - isDynamicArg, - modifiers, - range -) { - (el.directives || (el.directives = [])).push(rangeSetItem({ - name: name, - rawName: rawName, - value: value, - arg: arg, - isDynamicArg: isDynamicArg, - modifiers: modifiers - }, range)); - el.plain = false; -} - -function prependModifierMarker (symbol, name, dynamic) { - return dynamic - ? ("_p(" + name + ",\"" + symbol + "\")") - : symbol + name // mark the event as captured -} - -function addHandler ( - el, - name, - value, - modifiers, - important, - warn, - range, - dynamic -) { - modifiers = modifiers || emptyObject; - // warn prevent and passive modifier - /* istanbul ignore if */ - if ( - warn && - modifiers.prevent && modifiers.passive - ) { - warn( - 'passive and prevent can\'t be used together. ' + - 'Passive handler can\'t prevent default event.', - range - ); - } +// in some cases, the event used has to be determined at runtime +// so we used some reserved tokens during compile. +var RANGE_TOKEN = '__r'; +var CHECKBOX_RADIO_TOKEN = '__c'; - // normalize click.right and click.middle since they don't actually fire - // this is technically browser-specific, but at least for now browsers are - // the only target envs that have right/middle clicks. - if (modifiers.right) { - if (dynamic) { - name = "(" + name + ")==='click'?'contextmenu':(" + name + ")"; - } else if (name === 'click') { - name = 'contextmenu'; - delete modifiers.right; - } - } else if (modifiers.middle) { - if (dynamic) { - name = "(" + name + ")==='click'?'mouseup':(" + name + ")"; - } else if (name === 'click') { - name = 'mouseup'; - } - } +/* */ - // check capture modifier - if (modifiers.capture) { - delete modifiers.capture; - name = prependModifierMarker('!', name, dynamic); - } - if (modifiers.once) { - delete modifiers.once; - name = prependModifierMarker('~', name, dynamic); - } +// normalize v-model event tokens that can only be determined at runtime. +// it's important to place the event as the first in the array because +// the whole point is ensuring the v-model callback gets called before +// user-attached handlers. +function normalizeEvents (on) { /* istanbul ignore if */ - if (modifiers.passive) { - delete modifiers.passive; - name = prependModifierMarker('&', name, dynamic); - } - - var events; - if (modifiers.native) { - delete modifiers.native; - events = el.nativeEvents || (el.nativeEvents = {}); - } else { - events = el.events || (el.events = {}); - } - - var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range); - if (modifiers !== emptyObject) { - newHandler.modifiers = modifiers; + if (isDef(on[RANGE_TOKEN])) { + // IE input[type=range] only supports `change` event + var event = isIE ? 'change' : 'input'; + on[event] = [].concat(on[RANGE_TOKEN], on[event] || []); + delete on[RANGE_TOKEN]; } - - var handlers = events[name]; + // This was originally intended to fix #4521 but no longer necessary + // after 2.5. Keeping it for backwards compat with generated code from < 2.4 /* istanbul ignore if */ - if (Array.isArray(handlers)) { - important ? handlers.unshift(newHandler) : handlers.push(newHandler); - } else if (handlers) { - events[name] = important ? [newHandler, handlers] : [handlers, newHandler]; - } else { - events[name] = newHandler; + if (isDef(on[CHECKBOX_RADIO_TOKEN])) { + on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []); + delete on[CHECKBOX_RADIO_TOKEN]; } - - el.plain = false; } -function getRawBindingAttr ( - el, - name -) { - return el.rawAttrsMap[':' + name] || - el.rawAttrsMap['v-bind:' + name] || - el.rawAttrsMap[name] -} +var target$1; -function getBindingAttr ( - el, - name, - getStatic -) { - var dynamicValue = - getAndRemoveAttr(el, ':' + name) || - getAndRemoveAttr(el, 'v-bind:' + name); - if (dynamicValue != null) { - return parseFilters(dynamicValue) - } else if (getStatic !== false) { - var staticValue = getAndRemoveAttr(el, name); - if (staticValue != null) { - return JSON.stringify(staticValue) +function createOnceHandler$1 (event, handler, capture) { + var _target = target$1; // save current target element in closure + return function onceHandler () { + var res = handler.apply(null, arguments); + if (res !== null) { + remove$2(event, onceHandler, capture, _target); } } } -// note: this only removes the attr from the Array (attrsList) so that it -// doesn't get processed by processAttrs. -// By default it does NOT remove it from the map (attrsMap) because the map is -// needed during codegen. -function getAndRemoveAttr ( - el, +// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp +// implementation and does not fire microtasks in between event propagation, so +// safe to exclude. +var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53); + +function add$1 ( name, - removeFromMap + handler, + capture, + passive ) { - var val; - if ((val = el.attrsMap[name]) != null) { - var list = el.attrsList; - for (var i = 0, l = list.length; i < l; i++) { - if (list[i].name === name) { - list.splice(i, 1); - break + // async edge case #6566: inner click event triggers patch, event handler + // attached to outer element during patch, and triggered again. This + // happens because browsers fire microtask ticks between event propagation. + // the solution is simple: we save the timestamp when a handler is attached, + // and the handler would only fire if the event passed to it was fired + // AFTER it was attached. + if (useMicrotaskFix) { + var attachedTimestamp = currentFlushTimestamp; + var original = handler; + handler = original._wrapper = function (e) { + if ( + // no bubbling, should always fire. + // this is just a safety net in case event.timeStamp is unreliable in + // certain weird environments... + e.target === e.currentTarget || + // event is fired after handler attachment + e.timeStamp >= attachedTimestamp || + // bail for environments that have buggy event.timeStamp implementations + // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState + // #9681 QtWebEngine event.timeStamp is negative value + e.timeStamp <= 0 || + // #9448 bail if event is fired in another document in a multi-page + // electron/nw.js app, since event.timeStamp will be using a different + // starting reference + e.target.ownerDocument !== document + ) { + return original.apply(this, arguments) } - } - } - if (removeFromMap) { - delete el.attrsMap[name]; + }; } - return val + target$1.addEventListener( + name, + handler, + supportsPassive + ? { capture: capture, passive: passive } + : capture + ); } -function getAndRemoveAttrByRegex ( - el, - name +function remove$2 ( + name, + handler, + capture, + _target ) { - var list = el.attrsList; - for (var i = 0, l = list.length; i < l; i++) { - var attr = list[i]; - if (name.test(attr.name)) { - list.splice(i, 1); - return attr - } - } + (_target || target$1).removeEventListener( + name, + handler._wrapper || handler, + capture + ); } -function rangeSetItem ( - item, - range -) { - if (range) { - if (range.start != null) { - item.start = range.start; - } - if (range.end != null) { - item.end = range.end; - } +function updateDOMListeners (oldVnode, vnode) { + if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) { + return } - return item + var on = vnode.data.on || {}; + var oldOn = oldVnode.data.on || {}; + target$1 = vnode.elm; + normalizeEvents(on); + updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context); + target$1 = undefined; } +var events = { + create: updateDOMListeners, + update: updateDOMListeners +}; + /* */ -/** - * Cross-platform code generation for component v-model - */ -function genComponentModel ( - el, - value, - modifiers -) { - var ref = modifiers || {}; - var number = ref.number; - var trim = ref.trim; - - var baseValueExpression = '$$v'; - var valueExpression = baseValueExpression; - if (trim) { - valueExpression = - "(typeof " + baseValueExpression + " === 'string'" + - "? " + baseValueExpression + ".trim()" + - ": " + baseValueExpression + ")"; - } - if (number) { - valueExpression = "_n(" + valueExpression + ")"; - } - var assignment = genAssignmentCode(value, valueExpression); - - el.model = { - value: ("(" + value + ")"), - expression: JSON.stringify(value), - callback: ("function (" + baseValueExpression + ") {" + assignment + "}") - }; -} +var svgContainer; -/** - * Cross-platform codegen helper for generating v-model value assignment code. - */ -function genAssignmentCode ( - value, - assignment -) { - var res = parseModel(value); - if (res.key === null) { - return (value + "=" + assignment) - } else { - return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")") - } -} - -/** - * Parse a v-model expression into a base path and a final key segment. - * Handles both dot-path and possible square brackets. - * - * Possible cases: - * - * - test - * - test[key] - * - test[test1[key]] - * - test["a"][key] - * - xxx.test[a[a].test1[key]] - * - test.xxx.a["asa"][test1[key]] - * - */ - -var len, str, chr, index$1, expressionPos, expressionEndPos; - - - -function parseModel (val) { - // Fix https://github.com/vuejs/vue/pull/7730 - // allow v-model="obj.val " (trailing whitespace) - val = val.trim(); - len = val.length; - - if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) { - index$1 = val.lastIndexOf('.'); - if (index$1 > -1) { - return { - exp: val.slice(0, index$1), - key: '"' + val.slice(index$1 + 1) + '"' - } - } else { - return { - exp: val, - key: null - } - } - } - - str = val; - index$1 = expressionPos = expressionEndPos = 0; - - while (!eof()) { - chr = next(); - /* istanbul ignore if */ - if (isStringStart(chr)) { - parseString(chr); - } else if (chr === 0x5B) { - parseBracket(chr); - } - } - - return { - exp: val.slice(0, expressionPos), - key: val.slice(expressionPos + 1, expressionEndPos) - } -} - -function next () { - return str.charCodeAt(++index$1) -} - -function eof () { - return index$1 >= len -} - -function isStringStart (chr) { - return chr === 0x22 || chr === 0x27 -} - -function parseBracket (chr) { - var inBracket = 1; - expressionPos = index$1; - while (!eof()) { - chr = next(); - if (isStringStart(chr)) { - parseString(chr); - continue - } - if (chr === 0x5B) { inBracket++; } - if (chr === 0x5D) { inBracket--; } - if (inBracket === 0) { - expressionEndPos = index$1; - break - } - } -} - -function parseString (chr) { - var stringQuote = chr; - while (!eof()) { - chr = next(); - if (chr === stringQuote) { - break - } - } -} - -/* */ - -var warn$1; - -// in some cases, the event used has to be determined at runtime -// so we used some reserved tokens during compile. -var RANGE_TOKEN = '__r'; -var CHECKBOX_RADIO_TOKEN = '__c'; - -function model ( - el, - dir, - _warn -) { - warn$1 = _warn; - var value = dir.value; - var modifiers = dir.modifiers; - var tag = el.tag; - var type = el.attrsMap.type; - - { - // inputs with type="file" are read only and setting the input's - // value will throw an error. - if (tag === 'input' && type === 'file') { - warn$1( - "<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" + - "File inputs are read only. Use a v-on:change listener instead.", - el.rawAttrsMap['v-model'] - ); - } - } - - if (el.component) { - genComponentModel(el, value, modifiers); - // component v-model doesn't need extra runtime - return false - } else if (tag === 'select') { - genSelect(el, value, modifiers); - } else if (tag === 'input' && type === 'checkbox') { - genCheckboxModel(el, value, modifiers); - } else if (tag === 'input' && type === 'radio') { - genRadioModel(el, value, modifiers); - } else if (tag === 'input' || tag === 'textarea') { - genDefaultModel(el, value, modifiers); - } else if (!config.isReservedTag(tag)) { - genComponentModel(el, value, modifiers); - // component v-model doesn't need extra runtime - return false - } else { - warn$1( - "<" + (el.tag) + " v-model=\"" + value + "\">: " + - "v-model is not supported on this element type. " + - 'If you are working with contenteditable, it\'s recommended to ' + - 'wrap a library dedicated for that purpose inside a custom component.', - el.rawAttrsMap['v-model'] - ); - } - - // ensure runtime directive metadata - return true -} - -function genCheckboxModel ( - el, - value, - modifiers -) { - var number = modifiers && modifiers.number; - var valueBinding = getBindingAttr(el, 'value') || 'null'; - var trueValueBinding = getBindingAttr(el, 'true-value') || 'true'; - var falseValueBinding = getBindingAttr(el, 'false-value') || 'false'; - addProp(el, 'checked', - "Array.isArray(" + value + ")" + - "?_i(" + value + "," + valueBinding + ")>-1" + ( - trueValueBinding === 'true' - ? (":(" + value + ")") - : (":_q(" + value + "," + trueValueBinding + ")") - ) - ); - addHandler(el, 'change', - "var $$a=" + value + "," + - '$$el=$event.target,' + - "$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" + - 'if(Array.isArray($$a)){' + - "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," + - '$$i=_i($$a,$$v);' + - "if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" + - "else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" + - "}else{" + (genAssignmentCode(value, '$$c')) + "}", - null, true - ); -} - -function genRadioModel ( - el, - value, - modifiers -) { - var number = modifiers && modifiers.number; - var valueBinding = getBindingAttr(el, 'value') || 'null'; - valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding; - addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")")); - addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true); -} - -function genSelect ( - el, - value, - modifiers -) { - var number = modifiers && modifiers.number; - var selectedVal = "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 " + (number ? '_n(val)' : 'val') + "})"; - - var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]'; - var code = "var $$selectedVal = " + selectedVal + ";"; - code = code + " " + (genAssignmentCode(value, assignment)); - addHandler(el, 'change', code, null, true); -} - -function genDefaultModel ( - el, - value, - modifiers -) { - var type = el.attrsMap.type; - - // warn if v-bind:value conflicts with v-model - // except for inputs with v-bind:type - { - var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value']; - var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type']; - if (value$1 && !typeBinding) { - var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value'; - warn$1( - binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " + - 'because the latter already expands to a value binding internally', - el.rawAttrsMap[binding] - ); - } - } - - var ref = modifiers || {}; - var lazy = ref.lazy; - var number = ref.number; - var trim = ref.trim; - var needCompositionGuard = !lazy && type !== 'range'; - var event = lazy - ? 'change' - : type === 'range' - ? RANGE_TOKEN - : 'input'; - - var valueExpression = '$event.target.value'; - if (trim) { - valueExpression = "$event.target.value.trim()"; - } - if (number) { - valueExpression = "_n(" + valueExpression + ")"; - } - - var code = genAssignmentCode(value, valueExpression); - if (needCompositionGuard) { - code = "if($event.target.composing)return;" + code; - } - - addProp(el, 'value', ("(" + value + ")")); - addHandler(el, event, code, null, true); - if (trim || number) { - addHandler(el, 'blur', '$forceUpdate()'); - } -} - -/* */ - -// normalize v-model event tokens that can only be determined at runtime. -// it's important to place the event as the first in the array because -// the whole point is ensuring the v-model callback gets called before -// user-attached handlers. -function normalizeEvents (on) { - /* istanbul ignore if */ - if (isDef(on[RANGE_TOKEN])) { - // IE input[type=range] only supports `change` event - var event = isIE ? 'change' : 'input'; - on[event] = [].concat(on[RANGE_TOKEN], on[event] || []); - delete on[RANGE_TOKEN]; - } - // This was originally intended to fix #4521 but no longer necessary - // after 2.5. Keeping it for backwards compat with generated code from < 2.4 - /* istanbul ignore if */ - if (isDef(on[CHECKBOX_RADIO_TOKEN])) { - on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []); - delete on[CHECKBOX_RADIO_TOKEN]; - } -} - -var target$1; - -function createOnceHandler$1 (event, handler, capture) { - var _target = target$1; // save current target element in closure - return function onceHandler () { - var res = handler.apply(null, arguments); - if (res !== null) { - remove$2(event, onceHandler, capture, _target); - } - } -} - -// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp -// implementation and does not fire microtasks in between event propagation, so -// safe to exclude. -var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53); - -function add$1 ( - name, - handler, - capture, - passive -) { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - if (useMicrotaskFix) { - var attachedTimestamp = currentFlushTimestamp; - var original = handler; - handler = original._wrapper = function (e) { - if ( - // no bubbling, should always fire. - // this is just a safety net in case event.timeStamp is unreliable in - // certain weird environments... - e.target === e.currentTarget || - // event is fired after handler attachment - e.timeStamp >= attachedTimestamp || - // bail for environments that have buggy event.timeStamp implementations - // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState - // #9681 QtWebEngine event.timeStamp is negative value - e.timeStamp <= 0 || - // #9448 bail if event is fired in another document in a multi-page - // electron/nw.js app, since event.timeStamp will be using a different - // starting reference - e.target.ownerDocument !== document - ) { - return original.apply(this, arguments) - } - }; - } - target$1.addEventListener( - name, - handler, - supportsPassive - ? { capture: capture, passive: passive } - : capture - ); -} - -function remove$2 ( - name, - handler, - capture, - _target -) { - (_target || target$1).removeEventListener( - name, - handler._wrapper || handler, - capture - ); -} - -function updateDOMListeners (oldVnode, vnode) { - if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) { - return - } - var on = vnode.data.on || {}; - var oldOn = oldVnode.data.on || {}; - target$1 = vnode.elm; - normalizeEvents(on); - updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context); - target$1 = undefined; -} - -var events = { - create: updateDOMListeners, - update: updateDOMListeners -}; - -/* */ - -var svgContainer; - -function updateDOMProps (oldVnode, vnode) { - if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) { - return +function updateDOMProps (oldVnode, vnode) { + if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) { + return } var key, cur; var elm = vnode.elm; @@ -9062,2877 +8414,4 @@ if (inBrowser) { /* */ -var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g; -var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g; - -var buildRegex = cached(function (delimiters) { - var open = delimiters[0].replace(regexEscapeRE, '\\$&'); - var close = delimiters[1].replace(regexEscapeRE, '\\$&'); - return new RegExp(open + '((?:.|\\n)+?)' + close, 'g') -}); - - - -function parseText ( - text, - delimiters -) { - var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE; - if (!tagRE.test(text)) { - return - } - var tokens = []; - var rawTokens = []; - var lastIndex = tagRE.lastIndex = 0; - var match, index, tokenValue; - while ((match = tagRE.exec(text))) { - index = match.index; - // push text token - if (index > lastIndex) { - rawTokens.push(tokenValue = text.slice(lastIndex, index)); - tokens.push(JSON.stringify(tokenValue)); - } - // tag token - var exp = parseFilters(match[1].trim()); - tokens.push(("_s(" + exp + ")")); - rawTokens.push({ '@binding': exp }); - lastIndex = index + match[0].length; - } - if (lastIndex < text.length) { - rawTokens.push(tokenValue = text.slice(lastIndex)); - tokens.push(JSON.stringify(tokenValue)); - } - return { - expression: tokens.join('+'), - tokens: rawTokens - } -} - -/* */ - -function transformNode (el, options) { - var warn = options.warn || baseWarn; - var staticClass = getAndRemoveAttr(el, 'class'); - if (staticClass) { - var res = parseText(staticClass, options.delimiters); - if (res) { - warn( - "class=\"" + staticClass + "\": " + - 'Interpolation inside attributes has been removed. ' + - 'Use v-bind or the colon shorthand instead. For example, ' + - 'instead of