.',
- el.rawAttrsMap['style']
- );
- }
- }
- el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
- }
-
- var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
- if (styleBinding) {
- el.styleBinding = styleBinding;
- }
- }
-
- function genData$1 (el) {
- var data = '';
- if (el.staticStyle) {
- data += "staticStyle:" + (el.staticStyle) + ",";
- }
- if (el.styleBinding) {
- data += "style:(" + (el.styleBinding) + "),";
- }
- return data
- }
-
- var style$1 = {
- staticKeys: ['staticStyle'],
- transformNode: transformNode$1,
- genData: genData$1
- };
-
- /* */
-
- var decoder;
-
- var he = {
- decode: function decode (html) {
- decoder = decoder || document.createElement('div');
- decoder.innerHTML = html;
- return decoder.textContent
- }
- };
-
- /* */
-
- var isUnaryTag = makeMap(
- 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
- 'link,meta,param,source,track,wbr'
- );
-
- // Elements that you can, intentionally, leave open
- // (and which close themselves)
- var canBeLeftOpenTag = makeMap(
- 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
- );
-
- // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
- // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
- var isNonPhrasingTag = makeMap(
- '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'
- );
-
- /**
- * Not type-checking this file because it's mostly vendor code.
- */
-
- // Regular Expressions for parsing tags and attributes
- var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
- var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
- var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
- var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
- var startTagOpen = new RegExp(("^<" + qnameCapture));
- var startTagClose = /^\s*(\/?)>/;
- var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
- var doctype = /^]+>/i;
- // #7298: escape - to avoid being passed as HTML comment when inlined in page
- var comment = /^',
- '"': '"',
- '&': '&',
- '
': '\n',
- ' ': '\t',
- ''': "'"
- };
- var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;
- var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;
-
- // #5992
- var isIgnoreNewlineTag = makeMap('pre,textarea', true);
- var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
-
- function decodeAttr (value, shouldDecodeNewlines) {
- var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
- return value.replace(re, function (match) { return decodingMap[match]; })
- }
-
- function parseHTML (html, options) {
- var stack = [];
- var expectHTML = options.expectHTML;
- var isUnaryTag$$1 = options.isUnaryTag || no;
- var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
- var index = 0;
- var last, lastTag;
- while (html) {
- last = html;
- // Make sure we're not in a plaintext content element like script/style
- if (!lastTag || !isPlainTextElement(lastTag)) {
- var textEnd = html.indexOf('<');
- if (textEnd === 0) {
- // Comment:
- if (comment.test(html)) {
- var commentEnd = html.indexOf('-->');
-
- if (commentEnd >= 0) {
- if (options.shouldKeepComment) {
- options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
- }
- advance(commentEnd + 3);
- continue
- }
- }
-
- // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
- if (conditionalComment.test(html)) {
- var conditionalEnd = html.indexOf(']>');
-
- if (conditionalEnd >= 0) {
- advance(conditionalEnd + 2);
- continue
- }
- }
-
- // Doctype:
- var doctypeMatch = html.match(doctype);
- if (doctypeMatch) {
- advance(doctypeMatch[0].length);
- continue
- }
-
- // End tag:
- var endTagMatch = html.match(endTag);
- if (endTagMatch) {
- var curIndex = index;
- advance(endTagMatch[0].length);
- parseEndTag(endTagMatch[1], curIndex, index);
- continue
- }
-
- // Start tag:
- var startTagMatch = parseStartTag();
- if (startTagMatch) {
- handleStartTag(startTagMatch);
- if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
- advance(1);
- }
- continue
- }
- }
-
- var text = (void 0), rest = (void 0), next = (void 0);
- if (textEnd >= 0) {
- rest = html.slice(textEnd);
- while (
- !endTag.test(rest) &&
- !startTagOpen.test(rest) &&
- !comment.test(rest) &&
- !conditionalComment.test(rest)
- ) {
- // < in plain text, be forgiving and treat it as text
- next = rest.indexOf('<', 1);
- if (next < 0) { break }
- textEnd += next;
- rest = html.slice(textEnd);
- }
- text = html.substring(0, textEnd);
- }
-
- if (textEnd < 0) {
- text = html;
- }
-
- if (text) {
- advance(text.length);
- }
-
- if (options.chars && text) {
- options.chars(text, index - text.length, index);
- }
- } else {
- var endTagLength = 0;
- var stackedTag = lastTag.toLowerCase();
- var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(' + stackedTag + '[^>]*>)', 'i'));
- var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
- endTagLength = endTag.length;
- if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
- text = text
- .replace(//g, '$1') // #7298
- .replace(//g, '$1');
- }
- if (shouldIgnoreFirstNewline(stackedTag, text)) {
- text = text.slice(1);
- }
- if (options.chars) {
- options.chars(text);
- }
- return ''
- });
- index += html.length - rest$1.length;
- html = rest$1;
- parseEndTag(stackedTag, index - endTagLength, index);
- }
-
- if (html === last) {
- options.chars && options.chars(html);
- if (!stack.length && options.warn) {
- options.warn(("Mal-formatted tag at end of template: \"" + html + "\""), { start: index + html.length });
- }
- break
- }
- }
-
- // Clean up any remaining tags
- parseEndTag();
-
- function advance (n) {
- index += n;
- html = html.substring(n);
- }
-
- function parseStartTag () {
- var start = html.match(startTagOpen);
- if (start) {
- var match = {
- tagName: start[1],
- attrs: [],
- start: index
- };
- advance(start[0].length);
- var end, attr;
- while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
- attr.start = index;
- advance(attr[0].length);
- attr.end = index;
- match.attrs.push(attr);
- }
- if (end) {
- match.unarySlash = end[1];
- advance(end[0].length);
- match.end = index;
- return match
- }
- }
- }
-
- function handleStartTag (match) {
- var tagName = match.tagName;
- var unarySlash = match.unarySlash;
-
- if (expectHTML) {
- if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
- parseEndTag(lastTag);
- }
- if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
- parseEndTag(tagName);
- }
- }
-
- var unary = isUnaryTag$$1(tagName) || !!unarySlash;
-
- var l = match.attrs.length;
- var attrs = new Array(l);
- for (var i = 0; i < l; i++) {
- var args = match.attrs[i];
- var value = args[3] || args[4] || args[5] || '';
- var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
- ? options.shouldDecodeNewlinesForHref
- : options.shouldDecodeNewlines;
- attrs[i] = {
- name: args[1],
- value: decodeAttr(value, shouldDecodeNewlines)
- };
- if (options.outputSourceRange) {
- attrs[i].start = args.start + args[0].match(/^\s*/).length;
- attrs[i].end = args.end;
- }
- }
-
- if (!unary) {
- stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs, start: match.start, end: match.end });
- lastTag = tagName;
- }
-
- if (options.start) {
- options.start(tagName, attrs, unary, match.start, match.end);
- }
- }
-
- function parseEndTag (tagName, start, end) {
- var pos, lowerCasedTagName;
- if (start == null) { start = index; }
- if (end == null) { end = index; }
-
- // Find the closest opened tag of the same type
- if (tagName) {
- lowerCasedTagName = tagName.toLowerCase();
- for (pos = stack.length - 1; pos >= 0; pos--) {
- if (stack[pos].lowerCasedTag === lowerCasedTagName) {
- break
- }
- }
- } else {
- // If no tag name is provided, clean shop
- pos = 0;
- }
-
- if (pos >= 0) {
- // Close all the open elements, up the stack
- for (var i = stack.length - 1; i >= pos; i--) {
- if (i > pos || !tagName &&
- options.warn
- ) {
- options.warn(
- ("tag <" + (stack[i].tag) + "> has no matching end tag."),
- { start: stack[i].start, end: stack[i].end }
- );
- }
- if (options.end) {
- options.end(stack[i].tag, start, end);
- }
- }
-
- // Remove the open elements from the stack
- stack.length = pos;
- lastTag = pos && stack[pos - 1].tag;
- } else if (lowerCasedTagName === 'br') {
- if (options.start) {
- options.start(tagName, [], true, start, end);
- }
- } else if (lowerCasedTagName === 'p') {
- if (options.start) {
- options.start(tagName, [], false, start, end);
- }
- if (options.end) {
- options.end(tagName, start, end);
- }
- }
- }
- }
-
- /* */
-
- var onRE = /^@|^v-on:/;
- var dirRE = /^v-|^@|^:|^#/;
- var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
- var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
- var stripParensRE = /^\(|\)$/g;
- var dynamicArgRE = /^\[.*\]$/;
-
- var argRE = /:(.*)$/;
- var bindRE = /^:|^\.|^v-bind:/;
- var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
-
- var slotRE = /^v-slot(:|$)|^#/;
-
- var lineBreakRE = /[\r\n]/;
- var whitespaceRE$1 = /\s+/g;
-
- var invalidAttributeRE = /[\s"'<>\/=]/;
-
- var decodeHTMLCached = cached(he.decode);
-
- var emptySlotScopeToken = "_empty_";
-
- // configurable state
- var warn$2;
- var delimiters;
- var transforms;
- var preTransforms;
- var postTransforms;
- var platformIsPreTag;
- var platformMustUseProp;
- var platformGetTagNamespace;
- var maybeComponent;
-
- function createASTElement (
- tag,
- attrs,
- parent
- ) {
- return {
- type: 1,
- tag: tag,
- attrsList: attrs,
- attrsMap: makeAttrsMap(attrs),
- rawAttrsMap: {},
- parent: parent,
- children: []
- }
- }
-
- /**
- * Convert HTML string to AST.
- */
- function parse (
- template,
- options
- ) {
- warn$2 = options.warn || baseWarn;
-
- platformIsPreTag = options.isPreTag || no;
- platformMustUseProp = options.mustUseProp || no;
- platformGetTagNamespace = options.getTagNamespace || no;
- var isReservedTag = options.isReservedTag || no;
- maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); };
-
- transforms = pluckModuleFunction(options.modules, 'transformNode');
- preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
- postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
-
- delimiters = options.delimiters;
-
- var stack = [];
- var preserveWhitespace = options.preserveWhitespace !== false;
- var whitespaceOption = options.whitespace;
- var root;
- var currentParent;
- var inVPre = false;
- var inPre = false;
- var warned = false;
-
- function warnOnce (msg, range) {
- if (!warned) {
- warned = true;
- warn$2(msg, range);
- }
- }
-
- function closeElement (element) {
- trimEndingWhitespace(element);
- if (!inVPre && !element.processed) {
- element = processElement(element, options);
- }
- // tree management
- if (!stack.length && element !== root) {
- // allow root elements with v-if, v-else-if and v-else
- if (root.if && (element.elseif || element.else)) {
- {
- checkRootConstraints(element);
- }
- addIfCondition(root, {
- exp: element.elseif,
- block: element
- });
- } else {
- warnOnce(
- "Component template should contain exactly one root element. " +
- "If you are using v-if on multiple elements, " +
- "use v-else-if to chain them instead.",
- { start: element.start }
- );
- }
- }
- if (currentParent && !element.forbidden) {
- if (element.elseif || element.else) {
- processIfConditions(element, currentParent);
- } else {
- if (element.slotScope) {
- // scoped slot
- // keep it in the children list so that v-else(-if) conditions can
- // find it as the prev node.
- var name = element.slotTarget || '"default"'
- ;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
- }
- currentParent.children.push(element);
- element.parent = currentParent;
- }
- }
-
- // final children cleanup
- // filter out scoped slots
- element.children = element.children.filter(function (c) { return !(c).slotScope; });
- // remove trailing whitespace node again
- trimEndingWhitespace(element);
-
- // check pre state
- if (element.pre) {
- inVPre = false;
- }
- if (platformIsPreTag(element.tag)) {
- inPre = false;
- }
- // apply post-transforms
- for (var i = 0; i < postTransforms.length; i++) {
- postTransforms[i](element, options);
- }
- }
-
- function trimEndingWhitespace (el) {
- // remove trailing whitespace node
- if (!inPre) {
- var lastNode;
- while (
- (lastNode = el.children[el.children.length - 1]) &&
- lastNode.type === 3 &&
- lastNode.text === ' '
- ) {
- el.children.pop();
- }
- }
- }
-
- function checkRootConstraints (el) {
- if (el.tag === 'slot' || el.tag === 'template') {
- warnOnce(
- "Cannot use <" + (el.tag) + "> as component root element because it may " +
- 'contain multiple nodes.',
- { start: el.start }
- );
- }
- if (el.attrsMap.hasOwnProperty('v-for')) {
- warnOnce(
- 'Cannot use v-for on stateful component root element because ' +
- 'it renders multiple elements.',
- el.rawAttrsMap['v-for']
- );
- }
- }
-
- parseHTML(template, {
- warn: warn$2,
- expectHTML: options.expectHTML,
- isUnaryTag: options.isUnaryTag,
- canBeLeftOpenTag: options.canBeLeftOpenTag,
- shouldDecodeNewlines: options.shouldDecodeNewlines,
- shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
- shouldKeepComment: options.comments,
- outputSourceRange: options.outputSourceRange,
- start: function start (tag, attrs, unary, start$1, end) {
- // check namespace.
- // inherit parent ns if there is one
- var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
-
- // handle IE svg bug
- /* istanbul ignore if */
- if (isIE && ns === 'svg') {
- attrs = guardIESVGBug(attrs);
- }
-
- var element = createASTElement(tag, attrs, currentParent);
- if (ns) {
- element.ns = ns;
- }
-
- {
- if (options.outputSourceRange) {
- element.start = start$1;
- element.end = end;
- element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
- cumulated[attr.name] = attr;
- return cumulated
- }, {});
- }
- attrs.forEach(function (attr) {
- if (invalidAttributeRE.test(attr.name)) {
- warn$2(
- "Invalid dynamic argument expression: attribute names cannot contain " +
- "spaces, quotes, <, >, / or =.",
- {
- start: attr.start + attr.name.indexOf("["),
- end: attr.start + attr.name.length
- }
- );
- }
- });
- }
-
- if (isForbiddenTag(element) && !isServerRendering()) {
- element.forbidden = true;
- warn$2(
- 'Templates should only be responsible for mapping the state to the ' +
- 'UI. Avoid placing tags with side-effects in your templates, such as ' +
- "<" + tag + ">" + ', as they will not be parsed.',
- { start: element.start }
- );
- }
-
- // apply pre-transforms
- for (var i = 0; i < preTransforms.length; i++) {
- element = preTransforms[i](element, options) || element;
- }
-
- if (!inVPre) {
- processPre(element);
- if (element.pre) {
- inVPre = true;
- }
- }
- if (platformIsPreTag(element.tag)) {
- inPre = true;
- }
- if (inVPre) {
- processRawAttrs(element);
- } else if (!element.processed) {
- // structural directives
- processFor(element);
- processIf(element);
- processOnce(element);
- }
-
- if (!root) {
- root = element;
- {
- checkRootConstraints(root);
- }
- }
-
- if (!unary) {
- currentParent = element;
- stack.push(element);
- } else {
- closeElement(element);
- }
- },
-
- end: function end (tag, start, end$1) {
- var element = stack[stack.length - 1];
- // pop stack
- stack.length -= 1;
- currentParent = stack[stack.length - 1];
- if (options.outputSourceRange) {
- element.end = end$1;
- }
- closeElement(element);
- },
-
- chars: function chars (text, start, end) {
- if (!currentParent) {
- {
- if (text === template) {
- warnOnce(
- 'Component template requires a root element, rather than just text.',
- { start: start }
- );
- } else if ((text = text.trim())) {
- warnOnce(
- ("text \"" + text + "\" outside root element will be ignored."),
- { start: start }
- );
- }
- }
- return
- }
- // IE textarea placeholder bug
- /* istanbul ignore if */
- if (isIE &&
- currentParent.tag === 'textarea' &&
- currentParent.attrsMap.placeholder === text
- ) {
- return
- }
- var children = currentParent.children;
- if (inPre || text.trim()) {
- text = isTextTag(currentParent) ? text : decodeHTMLCached(text);
- } else if (!children.length) {
- // remove the whitespace-only node right after an opening tag
- text = '';
- } else if (whitespaceOption) {
- if (whitespaceOption === 'condense') {
- // in condense mode, remove the whitespace node if it contains
- // line break, otherwise condense to a single space
- text = lineBreakRE.test(text) ? '' : ' ';
- } else {
- text = ' ';
- }
- } else {
- text = preserveWhitespace ? ' ' : '';
- }
- if (text) {
- if (!inPre && whitespaceOption === 'condense') {
- // condense consecutive whitespaces into single space
- text = text.replace(whitespaceRE$1, ' ');
- }
- var res;
- var child;
- if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
- child = {
- type: 2,
- expression: res.expression,
- tokens: res.tokens,
- text: text
- };
- } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
- child = {
- type: 3,
- text: text
- };
- }
- if (child) {
- if (options.outputSourceRange) {
- child.start = start;
- child.end = end;
- }
- children.push(child);
- }
- }
- },
- comment: function comment (text, start, end) {
- // adding anything as a sibling to the root node is forbidden
- // comments should still be allowed, but ignored
- if (currentParent) {
- var child = {
- type: 3,
- text: text,
- isComment: true
- };
- if (options.outputSourceRange) {
- child.start = start;
- child.end = end;
- }
- currentParent.children.push(child);
- }
- }
- });
- return root
- }
-
- function processPre (el) {
- if (getAndRemoveAttr(el, 'v-pre') != null) {
- el.pre = true;
- }
- }
-
- function processRawAttrs (el) {
- var list = el.attrsList;
- var len = list.length;
- if (len) {
- var attrs = el.attrs = new Array(len);
- for (var i = 0; i < len; i++) {
- attrs[i] = {
- name: list[i].name,
- value: JSON.stringify(list[i].value)
- };
- if (list[i].start != null) {
- attrs[i].start = list[i].start;
- attrs[i].end = list[i].end;
- }
- }
- } else if (!el.pre) {
- // non root node in pre blocks with no attributes
- el.plain = true;
- }
- }
-
- function processElement (
- element,
- options
- ) {
- processKey(element);
-
- // determine whether this is a plain element after
- // removing structural attributes
- element.plain = (
- !element.key &&
- !element.scopedSlots &&
- !element.attrsList.length
- );
-
- processRef(element);
- processSlotContent(element);
- processSlotOutlet(element);
- processComponent(element);
- for (var i = 0; i < transforms.length; i++) {
- element = transforms[i](element, options) || element;
- }
- processAttrs(element);
- return element
- }
-
- function processKey (el) {
- var exp = getBindingAttr(el, 'key');
- if (exp) {
- {
- if (el.tag === 'template') {
- warn$2(
- "
cannot be keyed. Place the key on real elements instead.",
- getRawBindingAttr(el, 'key')
- );
- }
- if (el.for) {
- var iterator = el.iterator2 || el.iterator1;
- var parent = el.parent;
- if (iterator && iterator === exp && parent && parent.tag === 'transition-group') {
- warn$2(
- "Do not use v-for index as key on children, " +
- "this is the same as not using keys.",
- getRawBindingAttr(el, 'key'),
- true /* tip */
- );
- }
- }
- }
- el.key = exp;
- }
- }
-
- function processRef (el) {
- var ref = getBindingAttr(el, 'ref');
- if (ref) {
- el.ref = ref;
- el.refInFor = checkInFor(el);
- }
- }
-
- function processFor (el) {
- var exp;
- if ((exp = getAndRemoveAttr(el, 'v-for'))) {
- var res = parseFor(exp);
- if (res) {
- extend(el, res);
- } else {
- warn$2(
- ("Invalid v-for expression: " + exp),
- el.rawAttrsMap['v-for']
- );
- }
- }
- }
-
-
-
- function parseFor (exp) {
- var inMatch = exp.match(forAliasRE);
- if (!inMatch) { return }
- var res = {};
- res.for = inMatch[2].trim();
- var alias = inMatch[1].trim().replace(stripParensRE, '');
- var iteratorMatch = alias.match(forIteratorRE);
- if (iteratorMatch) {
- res.alias = alias.replace(forIteratorRE, '').trim();
- res.iterator1 = iteratorMatch[1].trim();
- if (iteratorMatch[2]) {
- res.iterator2 = iteratorMatch[2].trim();
- }
- } else {
- res.alias = alias;
- }
- return res
- }
-
- function processIf (el) {
- var exp = getAndRemoveAttr(el, 'v-if');
- if (exp) {
- el.if = exp;
- addIfCondition(el, {
- exp: exp,
- block: el
- });
- } else {
- if (getAndRemoveAttr(el, 'v-else') != null) {
- el.else = true;
- }
- var elseif = getAndRemoveAttr(el, 'v-else-if');
- if (elseif) {
- el.elseif = elseif;
- }
- }
- }
-
- function processIfConditions (el, parent) {
- var prev = findPrevElement(parent.children);
- if (prev && prev.if) {
- addIfCondition(prev, {
- exp: el.elseif,
- block: el
- });
- } else {
- warn$2(
- "v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
- "used on element <" + (el.tag) + "> without corresponding v-if.",
- el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']
- );
- }
- }
-
- function findPrevElement (children) {
- var i = children.length;
- while (i--) {
- if (children[i].type === 1) {
- return children[i]
- } else {
- if (children[i].text !== ' ') {
- warn$2(
- "text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
- "will be ignored.",
- children[i]
- );
- }
- children.pop();
- }
- }
- }
-
- function addIfCondition (el, condition) {
- if (!el.ifConditions) {
- el.ifConditions = [];
- }
- el.ifConditions.push(condition);
- }
-
- function processOnce (el) {
- var once$$1 = getAndRemoveAttr(el, 'v-once');
- if (once$$1 != null) {
- el.once = true;
- }
- }
-
- // handle content being passed to a component as slot,
- // e.g. ,