text: !function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Eve=b()}(this,function(){"use strict";function a(a,b,c){return void 0===a&&(a={}),void 0===b&&(b={}),void 0===c&&(c=function(){}),Object.assign(c,b),Object.assign(c.prototype,a),c.extend=d(b),c.implement=e(c.prototype),c.proto=f.bind(c),c}function d(a){return function b(c){var d,g,h;return void 0===c&&(c={}),d=this,g=this.prototype,h=function(){d.apply(this,arguments)},h.prototype=Object.create(g),h.prototype.constructor=h,h.extend=b,h.implement=e(g),h.proto=f.bind(h),Object.assign(h,a),h.implement(c),h.parent=d,h.definition=c,h}}function e(a){return function(d){var f,g,i,e=this.prototype;for(f in d)c.call(d,f)&&(g=d[f],i=a[f],"function"==typeof g&&"function"==typeof i&&b.test(g)&&(g=h(g,i)),e[f]=g);return this}}function f(a){return g(this,a)}function g(a,b){void 0===a&&(a={}),void 0===b&&(b="");var c=a.prototype&&a.prototype[b]||{};return a.parent?Object.assign({},g(a.parent,b),c):c}function h(a,b){return function(){var d,c=this.supr;return this.supr=b,d=a.apply(this,arguments),this.supr=c,d}}function j(a){var d,e,b=a.split("."),c=[];for(d=0;d<b.length;d++){for(e=b[d];"\\"===e[e.length-1]&&void 0!==b[d+1];)e=e.slice(0,-1)+".",e+=b[++d];c.push(e)}return c}function l(a,b){return b={exports:{}},a(b,b.exports),b.exports}function p(){function b(b,c){return"undefined"==typeof a[b]&&(a[b]=[]),"undefined"==typeof c?a[b]:(a[b]=c,a[b])}var a={};return{"_(:з」∠)_":a,$on:function(a,c,d){var g,h,e=arguments,f=this;return void 0===d&&(d={once:!1}),g=b(a),d.once&&(h=function(){c.apply(f,e)},h.origin=c,h.once=!0),g.push(h||c),this},$off:function(a,c){var d=b(a),e=[];return"function"==typeof c&&(e=d.filter(function(a){return c===a||a.origin===c?!1:!0})),b(a,e),this},$once:function(a,b){return this.$on(a,b,{once:!0})},$emit:function(a,c){var d=this,e=b(a),f=e.filter(function(a){return a.call(d,c),!a.once});return b(a,f),this}}}function q(a){void 0===a&&(a={}),"function"==typeof a?Object.assign(a.prototype,p()):Object.assign(a,p())}function r(){}function u(){return s+"_"+t++}function w(a,b){var c,d,e;void 0===a&&(a={}),c={};for(d in a)e=a[d]||{},c[d]="function"==typeof e?{get:e,set:function(){}}:e,"function"==typeof c[d].get&&(c[d].get=c[d].get.bind(b)),"function"==typeof c[d].get&&(c[d].set=c[d].set.bind(b));return c}function x(a,b){var c=a[b];return"function"==typeof c?c.call(a):(console.warn("hook "+b+" doesn't exist"),void 0)}function C(a){return!!~B.indexOf(a)}function E(a,b,c,d){var e,f,g;for(e in b)e in d||a.removeAttribute(e);for(f in d)g=d[f],f in D?D[f](a,c,g):a.setAttribute(f,g)}function G(a,b,c){var d,e,f,g,h;void 0===b&&(b={}),d=b.attrs||{},e=b.events||{},f=new c({data:d}),g=function(a){f.$on(a,function(b){var d,g,h,c=e[a];if("function"==typeof c)return c.call(f,b);for(d=0,g=c.length;g>d;d++)h=c[d],h.call(f,b)})};for(h in e)g(h);f.$mount(a)}function H(a){var b,c,d,e,f;if(a)return b=a.name,"#text"===b?J(a.value):(c=a.meta.ctor,c?(e=document.createDocumentFragment(),f=document.createElement("div"),e.appendChild(f),G(f,a,c),e):(d=K(b),F(d,a),E(d,{},a,a.attrs),Object.keys(a.events||{}).forEach(function(a){return I(d,a)}),a.children.forEach(function(a){var b=H(a);d.appendChild(b)}),d))}function I(a,b){a.addEventListener(b,function(c){var h,i,j,d=a.__vnode__,e=d.events||{},f=e[b],g=d.meta.instance;if("function"==typeof f)return f.call(g,c);for(h=0,i=f.length;i>h;h++)j=f[h],j.call(g,c)})}function J(a){return document.createTextNode(a)}function K(a){return C(a)?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a)}function L(a,b){var c,d,e,f,g,h,i,j,k;for(F(a,b),c=[],[].concat(a.attributes||[]).forEach(function(a){c[a.name]=a.value}),E(a,c,b,b.attrs),M(),d=0,e=a.firstChild,f=b.children[d];e||f;)e?(g=e.nextSibling,f?(h=e.nodeName.toLowerCase(),i=f.name,j=f.meta.ctor,j?(k=e.__vnode__&&e.__vnode__.meta&&e.__vnode__.meta.instance,k&&k instanceof j?(console.log("[[hydrate]] reuse instance:",i),Object.assign(k.data,f.attrs),e.__vnode__.meta.instance.$update()):(console.log("[hydrate] create instance:",i),G(e,f,j))):h!==i?(a.replaceChild(H(f),e),console.log("[hydrate] replace")):"#text"===h?e.textContent!==f.value&&(e.textContent=f.value,console.log("[hydrate] update text")):L(e,f)):(a.removeChild(e),console.log("[hydrate] remove")),e=g):(a.appendChild(H(f)),console.log("[hydrate] append")),f=b.children[++d]}function M(){}function O(a,b,c){this.type=a,b&&(this.value=b),c&&Object.assign(this,c)}function Q(a,b){function i(a,b){return a.start<=b&&b<a.end}function j(a,b){return{line:c+a.line,column:d+b-a.start,character:b}}function k(b){var c,d;for("string"==typeof b&&(b=a.indexOf(b,startIndex||0)),c=g[h],d=b>=c.end?1:-1;c;){if(i(c,b))return j(c,b);h+=d,c=g[h]}}var c,d,e,f,g,h;return void 0===b&&(b={}),c=b.offsetLine||0,d=b.offsetColumn||0,e=a.split("\n"),f=0,g=e.map(function(a,b){var c=f+a.length+1,d={start:f,end:c,line:b};return f=c,d}),h=0,k}function R(a){for(var b="";a--;)b+=" ";return b}function S(a){return a.replace(/^\t+/,function(a){return a.split("	").join("  ")})}function T(a,b){var j,c=Q(a,{offsetLine:1}),d=c(b),e=d.line,f=d.column,g=a.split("\n"),h=Math.max(0,e-3),i=Math.min(e+2,g.length);for(g=g.slice(h,i);!/\S/.test(g[g.length-1]);)g.pop(),i-=1;return j=String(i).length,"\n"+g.map(function(a,b){for(var g,c=h+b+1===e,d=String(b+h+1);d.length<j;)d=" "+d;return c?(g=R(j+2+S(a.slice(0,f)).length)+"^",d+": "+S(a)+"\n"+g):d+": "+S(a)}).join("\n")}function cb(a){return _[a]?!0:!1}function db(a){var d,b=a.test,c=a.consequent;return void 0===c&&(c=[]),d=a.alternate,void 0===d&&(d=[]),{type:"IfStatement",test:b,consequent:c,alternate:d}}function mb(a,b){return a?a.type===b||"symbol"===a.type&&a.value===b?!0:!1:!1}function pb(a,b,c){return void 0===a&&(a=""),void 0===b&&(b=[]),void 0===c&&(c={}),ob.parse(a,b,c),ob.compile()}function sb(a,b,c,d){return void 0===b&&(b={}),void 0===c&&(c=[]),void 0===d&&(d={}),Object.assign({},{name:a,attrs:b,children:c},d)}function tb(a,b){return void 0===b&&(b=this),b.$get(a)}function ub(a,b){var c,d,e,f,g,h,i,j;for(void 0===a&&(a=[]),c=[],d=0,e=0,f=a;e<f.length;e+=1){for(g=f[e],h=0,i=b(g,d);h<i.length;h+=1)j=i[h],c.push(j);d++}return c}function vb(a){var b=wb(a);return b}function wb(a){var b=a.children||[],c=[],d=[];return b.forEach(function(a){a&&("#text"===a.name?d.push(a):(d.length>0&&xb(d,c),wb(a),c.push(a)))}),d.length>0&&xb(d,c),a.children=c,a}function xb(a,b){b.push(sb("#text",{},[],{meta:{},value:a.map(function(a){return a.value}).join("")})),a.length=0}function zb(a,b){var c=rb(a||""),d=c.render;return d.bind(b,sb,tb,ub,vb)}var s,t,v,y,z,A,B,D,F,N,P,U,V,W,X,Y,Z,$,_,ab,bb,eb,fb,gb,hb,ib,jb,kb,lb,nb,ob,qb,rb,yb,Ab,Bb,b=/xyz/.test(function(){"xyz"})?/\bsupr\b/:/.*/,c=Object.prototype.hasOwnProperty,i=function(a){var b=typeof a;return null!==a&&("object"===b||"function"===b)},k={get:function(a,b,c){var d,e;if(!i(a)||"string"!=typeof b)return void 0===c?a:c;for(d=j(b),e=0;e<d.length;e++){if(!Object.prototype.propertyIsEnumerable.call(a,d[e]))return c;if(a=a[d[e]],void 0===a||null===a){if(e!==d.length-1)return c;break}}return a},set:function(a,b,c){var d,e,f,g;if(!i(a)||"string"!=typeof b)return a;for(d=a,e=j(b),f=0;f<e.length;f++)g=e[f],i(a[g])||(a[g]={}),f===e.length-1&&(a[g]=c),a=a[g];return d},"delete":function(a,b){var c,d,e;if(i(a)&&"string"==typeof b)for(c=j(b),d=0;d<c.length;d++){if(e=c[d],d===c.length-1)return delete a[e],void 0;if(a=a[e],!i(a))return}},has:function(a,b){var c,d;if(!i(a)||"string"!=typeof b)return!1;for(c=j(b),d=0;d<c.length;d++){if(!i(a))return!1;if(!(c[d]in a))return!1;a=a[c[d]]}return!0}},m=l(function(a,b){function c(a){var c,b=[];for(c in a)b.push(c);return b}b=a.exports="function"==typeof Object.keys?Object.keys:c,b.shim=c}),n=l(function(a,b){function d(a){return"[object Arguments]"==Object.prototype.toString.call(a)}function e(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Object.prototype.hasOwnProperty.call(a,"callee")&&!Object.prototype.propertyIsEnumerable.call(a,"callee")||!1}var c="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();b=a.exports=c?d:e,b.supported=d,b.unsupported=e}),o=l(function(a){function d(a){return null===a||void 0===a}function e(a){return a&&"object"==typeof a&&"number"==typeof a.length?"function"!=typeof a.copy||"function"!=typeof a.slice?!1:a.length>0&&"number"!=typeof a[0]?!1:!0:!1}function f(a,f,g){var h,i,j,k;if(d(a)||d(f))return!1;if(a.prototype!==f.prototype)return!1;if(n(a))return n(f)?(a=b.call(a),f=b.call(f),c(a,f,g)):!1;if(e(a)){if(!e(f))return!1;if(a.length!==f.length)return!1;for(h=0;h<a.length;h++)if(a[h]!==f[h])return!1;return!0}try{j=m(a),k=m(f)}catch(l){return!1}if(j.length!=k.length)return!1;for(j.sort(),k.sort(),h=j.length-1;h>=0;h--)if(j[h]!=k[h])return!1;for(h=j.length-1;h>=0;h--)if(i=j[h],!c(a[i],f[i],g))return!1;return typeof a==typeof f}var b=Array.prototype.slice,c=a.exports=function(a,b,c){return c||(c={}),a===b?!0:a instanceof Date&&b instanceof Date?a.getTime()===b.getTime():!a||!b||"object"!=typeof a&&"object"!=typeof b?c.strict?a===b:a==b:f(a,b,c)}});q(r),s="(>ε<)",t=0,v=function(a){var c,b=a.context;void 0===b&&(b={}),c=a.path,void 0===c&&(c="data"),q(this),this._context=b,this._path=c,this._computed=w(b.computed,b),this._computedCache={},this._watchers=[]},v.prototype.$watch=function(a,b,c){var d=this;return void 0===c&&(c={}),Array.isArray(a)?a.map(function(a){return d._watchOne(a,b,c)}):this._watchOne(a,b,c)},v.prototype.$unwatch=function(a){var b=this;return Array.isArray(a)?a.forEach(function(a){return b._unwatchOne(a)}):this._unwatchOne(a)},v.prototype.$update=function(){this._digest({ttl:20}),this.$emit("update")},v.prototype.$get=function(a){return this._get(a,{fromCache:!0})},v.prototype._get=function(a,b){return void 0===b&&(b={}),this._isComputed(a)?(b.fromCache||this._compute(a),this._computedCache[a]):k.get(this._data(),a)},v.prototype._isComputed=function(a){return a in this._computed},v.prototype._compute=function(a){var d,b=this,c=this._computed;if("undefined"==typeof a)for(d in c)b._cacheComputedByPath(d);else this._cacheComputedByPath(a)},v.prototype._cacheComputedByPath=function(a){this._computedCache[a]=this._computed[a].get()},v.prototype._digest=function(a){for(var e,f,g,h,i,b=a.ttl,c=this._watchers,d=this._context;b--;){for(e=!1,f=0,g=c.length;g>f;f++)h=c[f],i=h.getter(),h.last===i&&("object"!=typeof h.last&&"object"!=typeof i||o(h.last,i))||(e=!0,h.observer.call(d,i,h.last)),h.last=i;if(e&&!b)throw new Error("digest too many times");if(!e)break}},v.prototype._watchOne=function(a,b,c){var d,e;return void 0===c&&(c={}),d=this._get.bind(this,a),e={id:u(),path:a,observer:b,getter:d,last:d()},this._watchers=this._watchers||[],this._watchers.push(e),e},v.prototype._data=function(){return this._context[this._path]||{}},v.prototype._unwatchOne=function(a){var b=this._watchers.indexOf(a);this._watchers.splice(b,1)},y=function(a){var b,c,d;void 0===a&&(a={}),b=a.data,void 0===b&&(b={}),q(this),this.$refs={},c=Object.create(null),this.data="function"==typeof this.data?this.data(c):c,Object.assign(this.data,b),Object.assign(this,this.constructor.proto("methods")),d=new v({context:this,path:"data"}),this._watcher=d,x(this,"created")},z=function(){},z=function(a,b,c){var f,g,h,d=arguments,e=arguments.length;for(c=new Array(e>2?e-2:0),f=2;e>f;f++)c[f-2]=d[f];if(void 0===b)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(b.length<10||/^[s\W]*$/.test(b))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+b);if(!a){g=0,h="Warning: "+b.replace(/%s/g,function(){return c[g++]}),"undefined"!=typeof console&&console.error(h);try{throw new Error(h)}catch(i){}}},A=z,B="svg,g,defs,desc,metadata,symbol,use,image,path,rect,circle,line,ellipse,polyline,polygon,text,tspan,tref,textpath,marker,pattern,clippath,mask,filter,cursor,view,animate,font,font-face,glyph,missing-glyph".split(","),D={checked:function(a,b,c){a.checked=!!c},ref:function(a,b,c){b.meta.instance.$refs[c]=a}},F=function(a,b){a.__vnode__=b},N=function(){this._=[]},N.prototype.enter=function(a){this._.push(a)},N.prototype.leave=function(a){return a?this.is(a)?this._.pop():void 0:this._.pop()},N.prototype.last=function(){return this._[this._.length-1]},N.prototype.is=function(a){return this.last()===a},P=function(a){function b(b){var c,d;void 0===b&&(b={}),c=b.message,void 0===c&&(c=""),d=b.codeframe,void 0===d&&(d=""),a.call(this),this.name="LexerError",this.message=c,this.codeframe=d,d&&console.error(d)}return a&&(b.__proto__=a),b.prototype=Object.create(a&&a.prototype),b.prototype.constructor=b,b}(Error),U=function(a){return function(b){void 0===b&&(b=new RegExp("")),a=Object.assign({},a);var c=b.source.replace(/{{([_-\w]+)}}/g,function(b,c){return a[c]});return new RegExp(c,b.flags)}},V=function(){var a="[a-zA-Z_][\\w\\-\\.]*",b={TAG_NAME:"(?:"+a+"\\:)?"+a,IDENT:"[\\$_a-zA-Z][\\$_0-9a-zA-Z]*",BEGIN:"{",END:"}"};return U(b)}(),W={TAG_OPEN:V(/^<({{TAG_NAME}})\s*/),ATTRIBUTE_KEY:/^([-@:\.0-9a-z\(\)\[\]]+)/,ATTRIBUTE_VALUE:/^(=(['"])*([^\3]*?)\2)?\s*/,TAG_END:/^(\/?)>/,TAG_CLOSE:V(/^<\/({{TAG_NAME}})>/),TAG_COMMENT:/^<\!--([^\x00]*?)--\>/,MUSTACHE_OPEN:V(/^{{BEGIN}}#({{IDENT}})\s*/),MUSTACHE_END:V(/^{{END}}/),MUSTACHE_CLOSE:V(/^{{BEGIN}}\/({{IDENT}}){{END}}/),MUSTACHE_EXPRESSION_OPEN:V(/^{{BEGIN}}/),MUSTACHE_EXPRESSION_IDENT:V(/^({{IDENT}})/),MUSTACHE_EXPRESSION_NUMBER:/^((?:\d*\.\d+|\d+)(?:e\d+)?)/,MUSTACHE_EXPRESSION_STRING:/^(['"])([^\1]*?)\1/,MUSTACHE_EXPRESSION_SYMBOL:/^([=!]?==|[-=><+*\/%\!]?\=|\|\||&&|[<\>\[\]\(\)\-\|\+\*\/%?:\.!,])/,MUSTACHE_EXPRESSION_BRACE_OPEN:/^([{])/,MUSTACHE_EXPRESSION_BRACE_END:/^([}])/,TEXT:/^[^\x00]/,WHITESPACE:/^\s+/},X=Object.hasOwnProperty,Y=function(a,b){if(void 0===a&&(a=""),void 0===b&&(b={}),this.source=a,this.rest=a,this.options=b,this.stash=[],this.marker={brace:0},this.state=new N,this.state.enter(b.initialState||"data"),this.pos=0,b.trim){var c=/^\s*/.exec(a);this.pos=c?c[0].length:0,this.rest=a.trim()}"number"==typeof b.startIndex&&(this.pos=b.startIndex,"number"==typeof b.endIndex&&(this.rest=a.substring(b.startIndex,b.endIndex)))},Y.prototype.lookahead=function(a){for(var b=this,c=a-this.stash.length;c-->0;)b.stash.push(b.advance());return this.stash[--a]},Y.prototype.peek=function(a){return void 0===a&&(a=1),this.lookahead(a)},Y.prototype.next=function(){var a=this.stashed()||this.advance();return a},Y.prototype.stashed=function(){return this.stash.shift()},Y.prototype.match=function(a){return W[a]?W[a].exec(this.rest):void 0},Y.prototype.skip=function(a){var b=a[0];a=b?b.length:a,this.rest=this.rest.substr(a),this.pos=this.pos+a},Y.prototype.error=function(a){var b,c,d;throw"string"==typeof a?(b=a,c=this.pos):(b=a.message,c="undefined"!=typeof a.pos?a.pos:this.pos),d=T(this.source,c),new P({message:b,codeframe:d})},Y.prototype.advance=function(){var a=this.pos,b=this.eos()||this.whitespace()||this.tagOpen()||this.tagEnd()||this.tagClose()||this.attributeKey()||this.attributeValue()||this.mustacheOpen()||this.mustacheClose()||this.interpolationOpen()||this.expression()||this.comment()||this.text(),c=this.pos;return b.pos=a,b.endPos=c,b.frame=this.source.substring(a,c),b},Y.prototype.comment=function(){var b,a=this.match("TAG_COMMENT");return a?(this.skip(a),b=a[1],new O("comment",{content:b})):void 0},Y.prototype.tagOpen=function(){var b,a=this.match("TAG_OPEN");return a?(this.skip(a),b=a[1],this.state.enter("tagOpen"),new O("tagOpen",{name:b})):void 0},Y.prototype.attributeKey=function(){var a,b;if(this.state.is("tagOpen"))return a=this.match("ATTRIBUTE_KEY"),a?(this.skip(a),b=a[1],new O("attributeKey",{value:b})):void 0},Y.prototype.attributeValue=function(){var a,b,c,d;if(this.state.is("tagOpen"))return a=this.match("ATTRIBUTE_VALUE"),a?(b=a[3],c=this.pos+a[0].indexOf(b),d=c+b.length,this.skip(a),new O("attributeValue",{value:b,start:c,end:d})):void 0},Y.prototype.tagEnd=function(){var a,b;if(!this.state.is("mustacheOpen"))return a=this.match("TAG_END"),a?(this.skip(a),this.state.leave("tagOpen"),b=Boolean(a[1]),new O("tagEnd",{isSelfClosed:b})):void 0},Y.prototype.tagClose=function(){var b,a=this.match("TAG_CLOSE");return a?(this.skip(a),b=a[1],new O("tagClose",{name:b})):void 0},Y.prototype.mustacheOpen=function(){var b,a=this.match("MUSTACHE_OPEN");return a?(b=a[1],this.skip(a),this.state.enter("mustacheOpen"),new O("mustacheOpen",b)):void 0},Y.prototype.mustacheEnd=function(){var a,b,c;if(this.state.is("mustacheOpen")&&(a=this.match("MUSTACHE_END"))){this.skip(a),this.state.leave("mustacheOpen"),b=this.marker;for(c in b)X.call(b,c)&&(b[c]=0);return new O("mustacheEnd")}},Y.prototype.mustacheClose=function(){var b,a=this.match("MUSTACHE_CLOSE");return a?(b=a[1],this.skip(a),new O("mustacheClose",b)):void 0},Y.prototype.interpolationOpen=function(){if(!this.state.is("tagOpen")&&!this.state.is("mustacheOpen")){var a=this.match("MUSTACHE_EXPRESSION_OPEN");return a?(this.skip(a),this.state.enter("mustacheOpen"),new O("interpolationOpen")):void 0}},Y.prototype.expression=function(){return this.state.is("mustacheOpen")?this.ident()||this.number()||this.string()||this.symbol()||this.brace():void 0},Y.prototype.ident=function tc(){var tc,a=this.match("MUSTACHE_EXPRESSION_IDENT");return a?(this.skip(a),tc=a[1],new O("ident",tc)):void 0},Y.prototype.number=function uc(){var uc,a=this.match("MUSTACHE_EXPRESSION_NUMBER");return a?(this.skip(a),uc=a[1],new O("number",parseFloat(uc))):void 0},Y.prototype.string=function vc(){var vc,a=this.match("MUSTACHE_EXPRESSION_STRING");return a?(this.skip(a),vc=a[2]||"",new O("string",vc)):void 0},Y.prototype.symbol=function wc(){var wc,a=this.match("MUSTACHE_EXPRESSION_SYMBOL");return a?(this.skip(a),wc=a[1],new O("symbol",wc)):void 0},Y.prototype.brace=function(){return this.braceOpen()||this.braceEnd()},Y.prototype.braceOpen=function(){var b,a=this.match("MUSTACHE_EXPRESSION_BRACE_OPEN");return a?(this.skip(a),b=a[1],this.marker.brace++,new O("symbol",b)):void 0},Y.prototype.braceEnd=function(){var b,c,a=this.match("MUSTACHE_EXPRESSION_BRACE_END");if(a){if(b=a[1],this.marker.brace--,this.marker.brace>=0)return this.skip(a),new O("symbol",b);if(c=this.mustacheEnd(),c&&"mustacheEnd"===c.type)return c;this.error("Unexpected }")}},Y.prototype.text=function Ac(){var Ac,a=this.match("TEXT");return a?this.state.is("tagOpen")||this.state.is("mustacheOpen")?this.error("text appears in unexpected state"):(this.skip(a),Ac=a[0],new O("text",Ac)):void 0},Y.prototype.whitespace=function Bc(){var a,Bc;if(!this.state.is("data"))return a=this.match("WHITESPACE"),a?(this.skip(a),Bc=a[0],new O("whitespace",Bc)):void 0},Y.prototype.eos=function(){return this.rest.length>0?void 0:new O("eos")},Z=function(a){function b(b){var c,d;void 0===b&&(b={}),c=b.message,void 0===c&&(c=""),d=b.codeframe,void 0===d&&(d=""),a.call(this),this.name="ParserError",this.message=c,this.codeframe=d,d&&console.error(d)}return a&&(b.__proto__=a),b.prototype=Object.create(a&&a.prototype),b.prototype.constructor=b,b}(Error),$="area,base,br,col,embed,hr,img,input,keygen,link,menuitem,meta,param,source,track,wbr".split(","),_={};for(ab=0,bb=$.length;bb>ab;ab++)_[$[ab]]=!0;return eb=function(a){var c,d,b=a.sequence;return void 0===b&&(b={}),c=a.item,void 0===c&&(c=""),d=a.body,void 0===d&&(d=[]),{type:"EachStatement",sequence:b,item:c,body:d}},fb=function(a){var c,d,e,b=a.name;return void 0===b&&(b=""),c=a.attributes,void 0===c&&(c={}),d=a.children,void 0===d&&(d=[]),e=a.isSelfClosed,void 0===e&&(e=!1),{type:"Tag",name:b,attributes:c,children:d,isSelfClosed:e}},gb=function(a){return void 0===a&&(a={}),Object.assign({},{type:"Expression"},a)},hb=function(a){return{type:"Text",value:a}},ib={Tag:fb,IfStatement:db,EachStatement:eb,Expression:gb,Text:hb},jb=function(a,b){void 0===a&&(a=""),void 0===b&&(b={}),this.source=a,this.options=b},jb.prototype.parse=function(a,b){var c=b||this.options||{};return this.scanned=[],this.globals=c.globals||{},this.source=a||this.source,this.lexer=new Y(this.source,c),this.statements()},jb.prototype.peek=function(){return this.lexer.peek()},jb.prototype.peekBefore=function(){return this.scanned[this.scanned.length-1]},jb.prototype.next=function(){var a=this.lexer.next();return this.scanned.push(a),a},jb.prototype.skip=function(a){for(var b=this;~a.indexOf(this.peek().type);)b.next()},jb.prototype.skipWhitespace=function(){this.skip(["whitespace"])},jb.prototype.accept=function(a){var b=this.peek();return b.type===a?this.next():void 0},jb.prototype.expect=function(a){var b=this.peek();return b.type===a?this.next():(this.error({message:"Expect "+a+", but got "+b.type,pos:b.pos}),void 0)},jb.prototype.error=function(a){if("string"==typeof a)throw new Z({message:a});if("object"==typeof a)throw new Z({message:a.message,codeframe:T(this.source,a.pos)})},jb.prototype.statements=function(){for(var c,a=this,b=[];"tagClose"!==this.peek().type&&"eos"!==this.peek().type&&(a.skipWhitespace(),"tagClose"!==a.peek().type&&"eos"!==a.peek().type);)c=a.statement(),c&&b.push(c);return b},jb.prototype.statement=function(){var a=this.peek();switch(a.type){case"whitespace":return this.next(),void 0;case"text":return this.text();case"tagOpen":return this.tag();case"mustacheOpen":return this.command();case"interpolationOpen":return this.interpolation();case"comment":return this.next(),void 0;default:return this.error({message:"Unexpected token "+a.type,pos:a.pos})}},jb.prototype.text=function(){for(var a,b="";a=this.accept("text")||this.accept("whitespace");)b+=a.value;return ib.Text(b)},jb.prototype.tag=function(){for(var e,f,g,h,i,j,k,a=this,b=this.next(),c=b.value.name,d=ib.Tag({name:c});;){if(a.skipWhitespace(),"tagEnd"===a.peek().type||"eos"===a.peek().type)break;e=a.accept("attributeKey"),f=a.accept("attributeValue"),f?(g=a.globals,0===e.value.value.indexOf("@")&&(g=Object.assign({},{$e:!0},a.globals)),h=new jb,i=h.parse(a.source,{startIndex:f.value.start,endIndex:f.value.end,globals:g}),d.attributes[e.value.value]=i):d.attributes[e.value.value]=[]}return j=this.expect("tagEnd"),j.value.isSelfClosed?d:(d.children=this.statements()||[],k=this.accept("tagClose"),cb(c)||k&&k.value.name===c||this.error({message:"Unclosed tag <"+c+">",pos:b.pos+Math.ceil(c.length/2)}),d)},jb.prototype.command=function(){var a=this.accept("mustacheOpen");switch(a.value){case"if":return this.if();case"each":return this.each();default:this.error({message:"Unrecoginized Command {#"+a.value+" ...}",pos:a.pos+2})}},jb.prototype["if"]=function(){var g,h,a=this,b=this.peekBefore(),c=ib.IfStatement({test:this.expression(),consequent:[],alternate:[]}),d=function(){function b(b){b&&a.push(b)}function c(b){a=b}var a;return{receive:b,changeReceiver:c}}(),e=d.receive,f=d.changeReceiver;for(f(c.consequent),this.accept("mustacheEnd"),this.skipWhitespace();"mustacheClose"!==this.peek().type&&"eos"!==this.peek().type;)if(g=a.peek(),"mustacheOpen"===g.type)switch(g.value){case"elseif":a.next(),c.alternate=a.if();break;case"else":a.next(),a.accept("mustacheEnd"),f(c.alternate);break;default:e(a.statement())}else e(a.statement());return h=this.accept("mustacheClose"),h&&"if"===h.value||this.error({message:"Unclosed {#if}",pos:b.pos+2}),c},jb.prototype.each=function(){function g(a){a&&c.body.push(a)}var h,i,j,a=this,b=this.peekBefore(),c=ib.EachStatement({sequence:null,item:null,body:[]}),d=this.expression(),e=d.tokens[d.tokens.length-2],f=d.tokens[d.tokens.length-1];for(e&&"ident"===e.type&&"as"===e.value||this.error({message:"Expect 'as' in expression",pos:b.pos}),f&&"ident"===f.type?(c.sequence=ib.Expression({tokens:d.tokens.slice(0,-2)}),c.item=f.value):this.error({message:"Expect right value in 'as' expression to be simple ident",pos:b.pos+7}),this.expect("mustacheEnd"),h=this.globals,i={},i[f.value]=!0,i[f.value+"_index"]=!0,i[f.value+"_key"]=!0,this.globals=Object.assign({},this.globals,i);"mustacheClose"!==this.peek().type&&"eos"!==this.peek().type;)g(a.statement());return this.globals=h,j=this.accept("mustacheClose"),j&&"each"===j.value||this.error({message:"Unclosed {#each}",pos:b.pos+2}),c},jb.prototype.expression=function(){var c,a=this,b=[];for(this.skipWhitespace();c=this.accept("ident")||this.accept("string")||this.accept("number")||this.accept("symbol");)a.skipWhitespace(),b.push(c);return ib.Expression({tokens:b,globals:this.globals})},jb.prototype.interpolation=function(){this.accept("interpolationOpen");var a=this.expression();return this.accept("mustacheEnd"),a},kb={console:!0,window:!0,"this":!0,Math:!0,Object:!0,Array:!0,String:!0,Number:!0,isNaN:!0,"null":!0,undefined:!0,NaN:!0},lb=function(){},lb.prototype.parse=function(a,b,c){void 0===a&&(a=""),void 0===b&&(b=[]),void 0===c&&(c={});var d=c.globals;return void 0===d&&(d={}),b.forEach(function(a,b){a.index=b}),this.source=a,this.tokens=b,this.index=0,this.globals=Object.assign({},d,kb),this.inserts={},this.state=new N,this.ternary()},lb.prototype.compile=function(){return this._mergeInserts(this.tokens,this.inserts)},lb.prototype._mergeInserts=function(a,b){var d,e,f,g,h,c=[];for(d=0,e=a;d<e.length;d+=1)f=e[d],g=f.index,h=b[g]||[],h.filter(function(a){return"before"===a.pos}).map(function(a){return a.tokens}).forEach(function(a){c.push.apply(c,a)}),c.push(f),h.filter(function(a){return"after"===a.pos}).map(function(a){return a.tokens}).forEach(function(a){c.push.apply(c,a)});return c.map(function(a){return a.frame}).join("")},lb.prototype.ternary=function(){var b,c,a=this.binary();return this.accept("?")?(b=this.ternary(),this.expect(":"),c=this.ternary(),{type:"ternary",test:a,consequent:b,alternate:c}):a},lb.prototype.binary=function(){var b,c,a=this.unary();if(b=this.accept("+")||this.accept("-")||this.accept("*")||this.accept("/")||this.accept("%")||this.accept("^")||this.accept("===")||this.accept("!==")||this.accept("==")||this.accept("!=")||this.accept(">=")||this.accept("<=")||this.accept("<")||this.accept(">")||this.accept("&&")||this.accept("||"))return{type:"binary",op:b.value,left:a,right:this.ternary()};if(b=this.accept("ident"))switch(b.value){case"in":case"instanceof":return this.insertWhitespaceBefore(b.index),this.insertWhitespaceAfter(b.index),c=this.ternary(),{type:"binary",op:b.value,left:a,right:c};case"as":return this.insertWhitespaceBefore(b.index),this.insertWhitespaceAfter(b.index),this.state.enter("disable_prefix_g"),c=this.unary(),this.state.leave("disable_prefix_g"),{type:"binary",op:b.value,left:a,right:c}}return a},lb.prototype.unary=function(){var a,b;return(a=this.accept("!")||this.accept("~"))?{type:"unary",op:a.value,body:this.unary()}:"ident"===this.peek().type&&"typeof"===this.peek().value?(b=this.next(),this.insertWhitespaceAfter(b.index),{type:"unary",op:"typeof",body:this.unary()}):(a=this.accept("string")||this.accept("number"))?a:this.member()},lb.prototype.member=function(a){var b,c,d,e,f,g;{if(a)return c=a[0],1!==a.length||"ident"!==c.type||c.value in this.globals||this.state.is("disable_prefix_g")||(d=c.index,this.insertBefore(d,[new O("ident","_g",{frame:"_g"}),new O("symbol","(",{frame:"("}),new O("symbol","'",{frame:"'"})]),this.insertAfter(d,[new O("symbol","'",{frame:"'"}),new O("symbol",",",{frame:","}),new O("ident","this",{frame:"this"}),new O("symbol",")",{frame:")"})])),this.accept(".")?(e=this.primary(),a.push(e),this.member(a)):this.accept("[")?(f=this.ternary(),this.expect("]"),a.push(f),this.member(a)):this.accept("(")?(g=this.arguments(),this.expect(")"),{type:"call",callee:{type:"member",paths:a},arguments:g}):1===a.length?a[0]:{type:"member",paths:a};if(b=this.primary())return this.member([b])}},lb.prototype.arguments=function(){var c,d,a=this;if(c=this.ternary()){for(d=[c];this.accept(",");)(c=a.ternary())?d.push(c):d.push(void 0);return{type:"arguments",body:d}}return{type:"arguments",body:[]}},lb.prototype.primary=function(){var a=this.peek();if(a)switch(a.type){case"ident":case"string":case"number":return this.next();case"symbol":switch(a.value){case"(":return this.parenthesis();case"[":return this.array();case"{":return this.object()}}},lb.prototype.object=function(){var c,d,a=this,b=[];for(this.accept("{");(c=this.accept("ident")||this.accept("string")||this.accept("number"))&&(a.accept(":"),d=a.ternary(),b.push({key:String(c.value),value:d}),a.accept(",")););return this.expect("}"),{type:"object",properties:b}},lb.prototype.array=function(){var c,a=this,b=[];if(this.accept("["),this.accept("]"))return{type:"array",elements:b};for(b.push(this.ternary());c=this.accept(",");)b.push(a.ternary());return this.expect("]"),{type:"array",elements:b}},lb.prototype.parenthesis=function(){this.expect("(");var a=this.ternary();return this.expect(")"),a},lb.prototype.peek=function(a){return void 0===a&&(a=1),this.tokens[this.index+a-1]},lb.prototype.next=function(){return this.tokens[this.index++]},lb.prototype.insert=function(a,b,c){void 0===b&&(b=[]),void 0===c&&(c="after");var d=a;this.inserts[d]=this.inserts[d]||[],this.inserts[d].push({pos:c,tokens:b})},lb.prototype.insertBefore=function(a,b){void 0===b&&(b=[]),this.insert(a,b,"before")},lb.prototype.insertAfter=function(a,b){void 0===b&&(b=[]),this.insert(a,b,"after")},lb.prototype.insertWhitespaceBefore=function(a){this.insertBefore(a,[new O("whitespace"," ",{frame:" "})])},lb.prototype.insertWhitespaceAfter=function(a){this.insertAfter(a,[new O("whitespace"," ",{frame:" "})])},lb.prototype.accept=function(a){var b=this.peek();return mb(b,a)?this.next():void 0},lb.prototype.expect=function(a){var c,b=this.peek();return mb(b,a)?this.next():(c=T(this.source,b.pos),this.error({message:"Expect "+a+", but got "+b.type,codeframe:c}),void 0)},lb.prototype.error=function(a){throw new Z({message:a.message,codeframe:a.codeframe})},nb=function(){this._parser=new jb("",{trim:!0}),this._source=""},nb.prototype.compile=function(a){this._source=a;var b=this._parser.parse(a);if(b.length>1)throw console.error(a),new Error("Expect one root element in template");return this._render(b[0],{isChildren:!0})},nb.prototype._render=function(a,b){var c=this;return void 0===b&&(b={}),b.punctuation=b.punctuation||",",Array.isArray(a)?a.map(function(a){return c._render(a,b)}).join(b.punctuation):this[a.type]?this[a.type](a,b):""},nb.prototype.Tag=function(a){var f,g,h,i,j,b=this,c=a.name,d=a.attributes,e=a.children;c=JSON.stringify(c),f=this._render(e,{isChildren:!0}),g="{",h="{";for(i in d)j=b._render(d[i],{isAttribute:!0,punctuation:"+"}),0!==i.indexOf("@")?(g+=JSON.stringify(i)+":",g+=j?j:'""',g+=","):(h+=JSON.stringify(i.slice(1))+":",h+=j?"function ( $e ) { return ( "+j+" ) }.bind( this )":"function () {}",h+=",");return g=g.replace(/,$/,""),h=h.replace(/,$/,""),g+="}",h+="}","_h(\n			"+c+",\n			"+g+",\n			[].concat( "+f+" ),\n			{\n				events: "+h+",\n				meta: {\n					instance: this,\n					isComponent: ( "+c+" in components ),\n					components: components,\n					ctor: components[ "+c+" ]\n				}\n			}\n		)"},nb.prototype.IfStatement=function(a){var b=a.test,c=a.consequent,d=a.alternate,e=this._render(b),f=c.length>0?"["+this._render(c,{isChildren:!0})+"]":"null",g=d.length>0?"["+this._render(d,{isChildren:!0})+"]":"null";return"\n			"+e+" ? "+f+" : "+g+"\n		"},nb.prototype.EachStatement=function(a){var b=a.sequence,c=a.item,d=a.body,e=this._render(b),f="["+this._render(d,{isChildren:!0})+"]",g=c;return"\n			_l( "+e+", function ( "+g+", "+g+"_index ) {\n				return "+f+"\n			}.bind( this ) )\n		"},nb.prototype.Text=function(a,b){var c=a.value;return b.isAttribute?JSON.stringify(c):"\n			_h( '#text', {}, [], { meta: {}, value: '"+c.replace(/\n/g,"\\n").replace(/\r/g,"\\r")+"' } )\n		"},nb.prototype.Expression=function(a,b){var c=pb(this._source,a.tokens,{globals:a.globals});return b.isChildren?"_h( '#text', {}, [], { meta: {}, value: "+c+" } )":"( "+c+" )"},ob=new lb,qb=new nb,rb=function(a){var b=qb.compile(a);return{dependencies:[],render:new Function("_h","_g","_l","_o","\n				var components = this.constructor.proto( 'components' );\n				return _o( "+b+" )\n			")}
  },yb={$patch:function(){var a=this.$render();L(this.$root,a)},$mount:function(a){var c,d,e,f,g,b=this;"string"==typeof a?c=document.querySelector(a):a instanceof Node&&(c=a),A(c,"mount node is not found"),this.$update(),this.$render=zb(this.template,this),d=this.$render(),e=c.nodeName.toLowerCase(),f=d.name,e===f?(L(c,d),this.$root=c):(g=H(d),c.parentNode.replaceChild(g,c),this.$root=g),this._watcher.$on("update",function(){b.$patch()}),x(this,"attached")},$unmount:function(){x(this,"disposed")},$dispose:function(){},$watch:function(){for(var d,a=arguments,b=[],c=arguments.length;c--;)b[c]=a[c];return(d=this._watcher).$watch.apply(d,b)},$unwatch:function(){for(var d,a=arguments,b=[],c=arguments.length;c--;)b[c]=a[c];return(d=this._watcher).$unwatch.apply(d,b)},$update:function(){for(var d,a=arguments,b=[],c=arguments.length;c--;)b[c]=a[c];return(d=this._watcher).$update.apply(d,b)},$get:function(){for(var d,a=arguments,b=[],c=arguments.length;c--;)b[c]=a[c];return(d=this._watcher).$get.apply(d,b)}},Ab={component:function(a,b){this.prototype.components=this.prototype.components||{},this.prototype.components[a]=b},filter:function(){},directive:function(){},command:function(){}},Bb=a(yb,Ab,y),console.log("Using Eve v0.0.0 👏"),Bb});
  