text: "use strict";!function(t,e){var n=function(t){function e(t){this.named=t}function n(t){return y.test(t)}function r(t){return b.test(t)}function i(t){return t.replace(w,"\n")}function o(t,e){this.delegate=t,this.entityParser=e,this.state=null,this.input=null,this.index=-1,this.line=-1,this.column=-1,this.tagLine=-1,this.tagColumn=-1,this.reset()}function a(t,e){this.token=null,this.startLine=1,this.startColumn=0,this.options=e||{},this.tokenizer=new o(this,t)}function s(t,n){var r=new a(new e(d),n);return r.tokenize(t)}function u(e){var n,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=x.tokenize(e),o=[],a=[];for(r=t.options.normalize(r),n=0;n<i.length;n++){var s=i[n];if(s.type!==C)if(s.type===S){var u=l(s.chars,r);o.push.apply(o,u)}else o.push(s);else{o.push(s);var p=s.tagName.toUpperCase(),d="A"===p||_.contains(r.ignoreTags,p);if(!d)continue;var m=o.length;c(p,i,++n,o),n+=o.length-m-1}}for(n=0;n<o.length;n++){var g=o[n];switch(g.type){case C:var v=f(g.attributes),y="<"+g.tagName;v.length>0&&(y+=" "+v.join(" ")),y+=">",a.push(y);break;case E:a.push("</"+g.tagName+">");break;case S:a.push(h(g.chars));break;case k:a.push("<!--"+h(g.chars)+"-->")}}return a.join("")}function l(e,n){for(var r=t.tokenize(e),i=[],o=0;o<r.length;o++){var a=r[o],s=a.isLink&&t.options.resolve(n.validate,a.toString(),a.type);if("nl"===a.type&&n.nl2br)i.push({type:C,tagName:"br",attributes:[],selfClosing:!0});else if(a.isLink&&s){var u=a.toHref(n.defaultProtocol),l=t.options.resolve(n.format,a.toString(),a.type),c=t.options.resolve(n.formatHref,u,a.type),h=t.options.resolve(n.attributes,u,a.type),p=t.options.resolve(n.tagName,u,a.type),f=t.options.resolve(n.linkClass,u,a.type),d=t.options.resolve(n.target,u,a.type),m=[["href",c],["class",f]];d&&m.push(["target",d]);for(var g in h)m.push([g,h[g]]);i.push({type:C,tagName:p,attributes:m,selfClosing:!1}),i.push({type:S,chars:l}),i.push({type:E,tagName:p})}else i.push({type:S,chars:a.toString()})}return i}function c(t,e,n,r){for(var i=1;n<e.length&&i>0;){var o=e[n];o.type===C&&o.tagName.toUpperCase()===t?i++:o.type===E&&o.tagName.toUpperCase()===t&&i--,r.push(o),n++}return r}function h(t){return t}function p(t){return t.replace(/"/g,"&quot;")}function f(t){for(var e=[],n=0;n<t.length;n++){var r=t[n],i=r[0],o=r[1];e.push(i+'="'+p(o)+'"')}return e}var d={},m=/^#[xX]([A-Fa-f0-9]+)$/,g=/^#([0-9]+)$/,v=/^([A-Za-z0-9]+)$/;e.prototype.parse=function(t){if(t){var e=t.match(m);return e?"&#x"+e[1]+";":(e=t.match(g))?"&#"+e[1]+";":(e=t.match(v),e?"&"+e[1]+";":void 0)}};var y=/[\t\n\f ]/,b=/[A-Za-z]/,w=/\r\n?/g;o.prototype={reset:function(){this.state="beforeData",this.input="",this.index=0,this.line=1,this.column=0,this.tagLine=-1,this.tagColumn=-1,this.delegate.reset()},tokenize:function(t){this.reset(),this.tokenizePart(t),this.tokenizeEOF()},tokenizePart:function(t){for(this.input+=i(t);this.index<this.input.length;)this.states[this.state].call(this)},tokenizeEOF:function(){this.flushData()},flushData:function(){"data"===this.state&&(this.delegate.finishData(),this.state="beforeData")},peek:function(){return this.input.charAt(this.index)},consume:function(){var t=this.peek();return this.index++,"\n"===t?(this.line++,this.column=0):this.column++,t},consumeCharRef:function(){var t=this.input.indexOf(";",this.index);if(-1!==t){var e=this.input.slice(this.index,t),n=this.entityParser.parse(e);return n?(this.index=t+1,n):void 0}},markTagStart:function(){this.tagLine=this.line,this.tagColumn=this.column},states:{beforeData:function(){var t=this.peek();"<"===t?(this.state="tagOpen",this.markTagStart(),this.consume()):(this.state="data",this.delegate.beginData())},data:function(){var t=this.peek();"<"===t?(this.delegate.finishData(),this.state="tagOpen",this.markTagStart(),this.consume()):"&"===t?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(t))},tagOpen:function(){var t=this.consume();"!"===t?this.state="markupDeclaration":"/"===t?this.state="endTagOpen":r(t)&&(this.state="tagName",this.delegate.beginStartTag(),this.delegate.appendToTagName(t.toLowerCase()))},markupDeclaration:function(){var t=this.consume();"-"===t&&"-"===this.input.charAt(this.index)&&(this.index++,this.state="commentStart",this.delegate.beginComment())},commentStart:function(){var t=this.consume();"-"===t?this.state="commentStartDash":">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData(t),this.state="comment")},commentStartDash:function(){var t=this.consume();"-"===t?this.state="commentEnd":">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("-"),this.state="comment")},comment:function(){var t=this.consume();"-"===t?this.state="commentEndDash":this.delegate.appendToCommentData(t)},commentEndDash:function(){var t=this.consume();"-"===t?this.state="commentEnd":(this.delegate.appendToCommentData("-"+t),this.state="comment")},commentEnd:function(){var t=this.consume();">"===t?(this.delegate.finishComment(),this.state="beforeData"):(this.delegate.appendToCommentData("--"+t),this.state="comment")},tagName:function(){var t=this.consume();n(t)?this.state="beforeAttributeName":"/"===t?this.state="selfClosingStartTag":">"===t?(this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToTagName(t)},beforeAttributeName:function(){var t=this.consume();n(t)||("/"===t?this.state="selfClosingStartTag":">"===t?(this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeName",this.delegate.beginAttribute(),this.delegate.appendToAttributeName(t)))},attributeName:function(){var t=this.consume();n(t)?this.state="afterAttributeName":"/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.state="selfClosingStartTag"):"="===t?this.state="beforeAttributeValue":">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToAttributeName(t)},afterAttributeName:function(){var t=this.consume();n(t)||("/"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.state="selfClosingStartTag"):"="===t?this.state="beforeAttributeValue":">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.delegate.finishTag(),this.state="beforeData"):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.state="attributeName",this.delegate.beginAttribute(),this.delegate.appendToAttributeName(t)))},beforeAttributeValue:function(){var t=this.consume();n(t)||('"'===t?(this.state="attributeValueDoubleQuoted",this.delegate.beginAttributeValue(!0)):"'"===t?(this.state="attributeValueSingleQuoted",this.delegate.beginAttributeValue(!0)):">"===t?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.delegate.finishTag(),this.state="beforeData"):(this.state="attributeValueUnquoted",this.delegate.beginAttributeValue(!1),this.delegate.appendToAttributeValue(t)))},attributeValueDoubleQuoted:function(){var t=this.consume();'"'===t?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef('"')||"&"):this.delegate.appendToAttributeValue(t)},attributeValueSingleQuoted:function(){var t=this.consume();"'"===t?(this.delegate.finishAttributeValue(),this.state="afterAttributeValueQuoted"):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef("'")||"&"):this.delegate.appendToAttributeValue(t)},attributeValueUnquoted:function(){var t=this.consume();n(t)?(this.delegate.finishAttributeValue(),this.state="beforeAttributeName"):"&"===t?this.delegate.appendToAttributeValue(this.consumeCharRef(">")||"&"):">"===t?(this.delegate.finishAttributeValue(),this.delegate.finishTag(),this.state="beforeData"):this.delegate.appendToAttributeValue(t)},afterAttributeValueQuoted:function(){var t=this.peek();n(t)?(this.consume(),this.state="beforeAttributeName"):"/"===t?(this.consume(),this.state="selfClosingStartTag"):">"===t?(this.consume(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},selfClosingStartTag:function(){var t=this.peek();">"===t?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.state="beforeData"):this.state="beforeAttributeName"},endTagOpen:function(){var t=this.consume();r(t)&&(this.state="tagName",this.delegate.beginEndTag(),this.delegate.appendToTagName(t.toLowerCase()))}}},a.prototype={tokenize:function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},tokenizePart:function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},tokenizeEOF:function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},reset:function(){this.token=null,this.startLine=1,this.startColumn=0},addLocInfo:function(){this.options.loc&&(this.token.loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},beginData:function(){this.token={type:"Chars",chars:""},this.tokens.push(this.token)},appendToData:function(t){this.token.chars+=t},finishData:function(){this.addLocInfo()},beginComment:function(){this.token={type:"Comment",chars:""},this.tokens.push(this.token)},appendToCommentData:function(t){this.token.chars+=t},finishComment:function(){this.addLocInfo()},beginStartTag:function(){this.token={type:"StartTag",tagName:"",attributes:[],selfClosing:!1},this.tokens.push(this.token)},beginEndTag:function(){this.token={type:"EndTag",tagName:""},this.tokens.push(this.token)},finishTag:function(){this.addLocInfo()},markTagAsSelfClosing:function(){this.token.selfClosing=!0},appendToTagName:function(t){this.token.tagName+=t},beginAttribute:function(){this._currentAttribute=["","",null],this.token.attributes.push(this._currentAttribute)},appendToAttributeName:function(t){this._currentAttribute[0]+=t},beginAttributeValue:function(t){this._currentAttribute[2]=t},appendToAttributeValue:function(t){this._currentAttribute[1]=this._currentAttribute[1]||"",this._currentAttribute[1]+=t},finishAttributeValue:function(){}};var x={HTML5NamedCharRefs:d,EntityParser:e,EventedTokenizer:o,Tokenizer:a,tokenize:s},_=t.options,C="StartTag",E="EndTag",S="Chars",k="Comment";return u}(e);t.linkifyHtml=n}(window,linkify);