yox
Version:
A lightweight mvvm framework
3 lines (2 loc) • 49.5 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Yox=e()}(this,(function(){"use strict";var t="else",e="else if",n="#each",r=/^!(?:\s|--)/,i="slot",o="portal",a="fragment",u="template",s="$slot_",c="children",f="lazy",p="model",l="event",v="transition",h="$keypath",d="$length",y="$event",g="$data",m=!0,x=!1,b=null,k=void 0,S="true",w="false",_="undefined",O="function",$="length",E=".",T="/",A="..",C="this",D=typeof window!==_?window:k,N=function(){},L=Object.freeze({}),V=Object.freeze([]),P="",j=/yox/.test(N.toString())?2:3,z={leftDelimiter:"{",rightDelimiter:"}",uglifyCompiled:x,minifyCompiled:x,logLevel:j};function I(t){return typeof t===O}function R(t){return Array.isArray(t)}function F(t){return t!==b&&"object"==typeof t}function K(t){return"string"==typeof t}function M(t){return"number"==typeof t&&!isNaN(t)}function W(t){return t===m||t===x}function H(t){return!isNaN(t-parseFloat(t))}var U=Object.freeze({__proto__:null,func:I,array:R,object:F,string:K,number:M,boolean:W,numeric:H});function B(t,e,n){return R(n)?t.apply(e,n):e!==k?t.call(e,n):n!==k?t(n):t()}var Y=function(t,e){this.type=t,this.phase=Y.PHASE_CURRENT,e&&(this.originalEvent=e)};function q(t,e,n){var r=t.length;if(r)if(n)for(var i=r-1;i>=0&&e(t[i],i)!==x;i--);else for(var o=0;o<r&&e(t[o],o)!==x;o++);}function G(t,e){t[t.length]=e}function Z(t,e){t.unshift(e)}function J(t,e,n){R(e)?q(e,(function(e){n(t,e)})):n(t,e)}function Q(t,e){J(t,e,G)}function X(t,e){J(t,e,Z)}function tt(t,e,n){var r=-1;return q(t,(function(t,i){if(n===x?t==e:t===e)return r=i,x})),r}function et(t){var e=t.length;if(e>0)return t[e-1]}function nt(t){if(t.length>0)return t.pop()}function rt(t,e,n){var r=0;return q(t,(function(i,o){(n===x?i==e:i===e)&&(t.splice(o,1),r++)}),m),r}function it(t,e,n){return tt(t,e,n)>=0}function ot(t,e,n){var r={};return q(t,(function(t){r[e?t[e]:t]=n||t})),r}function at(t,e){return t.join(e)}function ut(t){return!R(t)||!t.length}Y.is=function(t){return t instanceof Y},Y.prototype.preventDefault=function(){var t=this;if(!t.isPrevented){var e=t.originalEvent;e&&e.preventDefault(),t.isPrevented=m}return t},Y.prototype.stopPropagation=function(){var t=this;if(!t.isStoped){var e=t.originalEvent;e&&e.stopPropagation(),t.isStoped=m}return t},Y.prototype.prevent=function(){return this.preventDefault()},Y.prototype.stop=function(){return this.stopPropagation()},Y.PHASE_CURRENT=0,Y.PHASE_UPWARD=1,Y.PHASE_DOWNWARD=-1;var st=Object.freeze({__proto__:null,each:q,push:Q,unshift:X,indexOf:tt,last:et,pop:nt,remove:rt,has:it,toArray:function(t){return R(t)?t:B(V.slice,t)},toObject:ot,join:at,falsy:ut});function ct(t,e){return t!=b&&t.toString?t.toString():e!==k?e:P}function ft(t){return I(t)&&ct(t).indexOf("[native code]")>=0}var pt=function(){var t=Object.create(b);return{get:function(e){return t[e]},set:function(e,n){t[e]=n},has:function(e){return e in t},keys:function(){return Object.keys(t)}}};ft(Object.create)||(pt=function(){var t={};return{get:function(e){return t.hasOwnProperty(e)?t[e]:k},set:function(e,n){t[e]=n},has:function(e){return t.hasOwnProperty(e)},keys:function(){return Object.keys(t)}}});var lt=pt;function vt(t){var e=lt();return function(n){var r=e.get(n);if(r!==k)return r;var i=t(n);return e.set(n,i),i}}function ht(t){var e=lt();return function(n,r){var i=e.get(n);if(i){var o=i.get(r);if(o)return o}else i=lt(),e.set(n,i);var a=t(n,r);return i.set(r,a),a}}var dt=/-([a-z])/gi,yt=/\B([A-Z])/g,gt=/^[a-z]/,mt=vt((function(t){return t.replace(dt,(function(t,e){return Ct(e)}))})),xt=vt((function(t){return t.replace(yt,(function(t,e){return"-"+Dt(e)}))})),bt=vt((function(t){return t.replace(gt,Ct)}));function kt(t,e){return at(new Array(e+1),t)}function St(t){return Vt(t)?P:t.trim()}function wt(t,e,n){return M(n)?e===n?P:t.slice(e,n):t.slice(e)}function _t(t,e,n){return t.indexOf(e,n!==k?n:0)}function Ot(t,e,n){return t.lastIndexOf(e,n!==k?n:t.length)}function $t(t,e){return 0===_t(t,e)}function Et(t,e){var n=t.length-e.length;return n>=0&&Ot(t,e)===n}function Tt(t,e){return t.charAt(e||0)}function At(t,e){return t.charCodeAt(e||0)}function Ct(t){return t.toUpperCase()}function Dt(t){return t.toLowerCase()}function Nt(t,e){return _t(t,e)>=0}function Lt(t,e){var n=Object.create(b);return q(t.split(e||","),(function(t){n[t]=m})),n}function Vt(t){return!K(t)||!t.length}var Pt=Object.freeze({__proto__:null,camelize:mt,hyphenate:xt,capitalize:bt,repeat:kt,trim:St,slice:wt,indexOf:_t,lastIndexOf:Ot,startsWith:$t,endsWith:Et,charAt:Tt,codeAt:At,upper:Ct,lower:Dt,has:Nt,toMap:Lt,falsy:Vt}),jt=/\./g,zt=/\*/g,It=/\*\*/g,Rt=ht((function(t,e){return t===e||$t(t,e+=E)?e.length:-1})),Ft=vt((function(t){return _t(t,E)<0?[t]:t.split(E)}));function Kt(t,e){for(var n=K(t)?Ft(t):t,r=0,i=n.length-1;r<=i&&e(n[r],r,i)!==x;r++);}var Mt=ht((function(t,e){return t&&e?t+E+e:t||e})),Wt=vt((function(t){return Nt(t,"*")})),Ht=vt((function(t){return new RegExp("^"+t.replace(jt,"\\.").replace(zt,"(\\w+)").replace(It,"([.\\w]+?)")+"$")})),Ut=ht((function(t,e){var n=t.match(Ht(e));return n?n[1]:k})),Bt={value:k};function Yt(t){return Object.keys(t)}function qt(t,e){for(var n in t)if(e(t[n],n)===x)break}function Gt(t,e){return qt(e,(function(e,n){t[n]=e})),t}function Zt(t,e){var n=t;return R(t)?e?(n=[],q(t,(function(t,r){n[r]=Zt(t,e)}))):n=t.slice():F(t)&&(n={},qt(t,(function(t,r){n[r]=e?Zt(t,e):t}))),n}function Jt(t){return I(t.get)?t.get():t}function Qt(t,e,n){var r=t;return Kt(e,(function(t,e,i){if(r==b)return r=k,x;var o=r[t],a=o!==k;o&&(o=(n||Jt)(o)),e===i?a?(Bt.value=o,r=Bt):r=k:r=o})),r}var Xt=Object.freeze({__proto__:null,keys:Yt,each:qt,extend:Gt,merge:function(t,e){return t&&e?Gt(Gt({},t),e):t||e},copy:Zt,get:Qt,set:function(t,e,n,r){var i=t;Kt(e,(function(t,e,o){if(e===o)i[t]=n;else if(i[t])i=i[t];else{if(!r)return x;i=i[t]={}}}))},has:function(t,e){return t[e]!==k},falsy:function(t){return!F(t)||R(t)||!Yt(t).length}}),te=typeof console!==_?console:b,ee=D&&/edge|msie|trident/i.test(D.navigator.userAgent)?P:"%c",ne=te?ee?function(t,e,n){te.log(ee+t,n,e)}:function(t,e){te.log(t,e)}:N;function re(){var t=z.logLevel;return t>=1&&t<=5?t:j}function ie(t){return"background-color:"+t+";border-radius:12px;color:#fff;font-size:10px;padding:3px 6px;"}var oe=Object.freeze({__proto__:null,DEBUG:1,INFO:2,WARN:3,ERROR:4,FATAL:5,debug:function(t,e){re()<=1&&ne(e||"Yox debug",t,ie("#999"))},info:function(t,e){re()<=2&&ne(e||"Yox info",t,ie("#2db7f5"))},warn:function(t,e){re()<=3&&ne(e||"Yox warn",t,ie("#f90"))},error:function(t,e){re()<=4&&ne(e||"Yox error",t,ie("#ed4014"))},fatal:function(t,e){if(re()<=5)throw new Error("["+(e||"Yox fatal")+"]: "+t)}}),ae=function(t){this.ns=t||x,this.listeners={}};function ue(t,e){return t?t===e.listener:m}function se(t,e){var n=e.ns;return n&&t?n===t:m}ae.prototype.fire=function(t,e,n){var r=this,i=K(t)?r.toEvent(t):t,o=r.listeners[i.type],a=m;if(o){o=o.slice();for(var u=e&&Y.is(e[0])?e[0]:k,s=0,c=o.length;s<c;s++){var f=o[s];if(se(i.ns,f)&&it(o,f)&&(!n||n(i,e,f))){var p=B(f.listener,f.ctx,e);if(f.num=f.num?f.num+1:1,f.num===f.max&&r.off(i.type,{ns:i.ns,listener:f.listener}),u&&(p===x?u.prevent().stop():u.isStoped&&(p=x)),p===x){a=x;break}}}}return a},ae.prototype.on=function(t,e){var n=this.listeners,r=I(e)?{listener:e}:e;if(F(r)&&I(r.listener)){if(!K(r.ns)){var i=this.toEvent(t);r.ns=i.ns,t=i.type}Q(n[t]||(n[t]=[]),r)}},ae.prototype.off=function(t,e){var n=this,r=n.listeners;if(t){var i=n.toFilter(t,e),o=function(t,e){q(t,(function(e,n){ue(i.listener,e)&&se(i.ns,e)&&t.splice(n,1)}),m),t.length||delete r[e]};i.type?r[i.type]&&o(r[i.type],i.type):i.ns&&qt(r,o)}else n.listeners={}},ae.prototype.has=function(t,e){var n=this.listeners,r=this.toFilter(t,e),i=m,o=function(t){return q(t,(function(t){if(ue(r.listener,t)&&se(r.ns,t))return i=x})),i};return r.type?n[r.type]&&o(n[r.type]):r.ns&&qt(n,o),!i},ae.prototype.toEvent=function(t){var e={type:t,ns:P};if(this.ns){var n=_t(t,E);n>=0&&(e.type=wt(t,0,n),e.ns=wt(t,n+1))}return e},ae.prototype.toFilter=function(t,e){var n;if(K((n=e?I(e)?{listener:e}:e:{}).ns))n.type=t;else{var r=this.toEvent(t);n.type=r.type,n.ns=r.ns}return n},typeof setImmediate===O&&ft(setImmediate)&&setImmediate;var ce,fe=typeof MessageChannel===O&&ft(MessageChannel)?function(t){var e=new MessageChannel;e.port1.onmessage=t,e.port2.postMessage(1)}:setTimeout,pe=function(t){this.tasks=[],this.hooks=t||L};pe.shared=function(){return ce||(ce=new pe)},pe.prototype.append=function(t,e){var n=this,r=n.tasks;Q(r,{fn:t,ctx:e}),1===r.length&&fe((function(){n.run()}))},pe.prototype.prepend=function(t,e){var n=this,r=n.tasks;X(r,{fn:t,ctx:e}),1===r.length&&fe((function(){n.run()}))},pe.prototype.clear=function(){this.tasks.length=0},pe.prototype.run=function(){var t=this,e=t.tasks,n=t.hooks,r=e.length;if(r){t.tasks=[],n.beforeTask&&n.beforeTask();for(var i=0;i<r;i++)B(e[i].fn,e[i].ctx);n.afterTask&&n.afterTask()}};var le={},ve={},he={},de={};function ye(t,e){return ve[e.name]||t.tag===o&&"to"===e.name||t.tag===i&&"name"===e.name}function ge(t,e){return{type:2,isStatic:m,name:t,ns:e}}function me(t,e,n){return{type:3,ns:e,name:t,modifier:n}}function xe(t,e,n,r){return{type:9,from:t,to:e,equal:n||k,index:r,isVirtual:m}}function be(t){return{type:5,text:t,isStatic:m,isLeaf:m}}le.slot=le.portal=le.fragment=le.template=ve.key=ve.ref=ve.slot=m,he["if"]=6,he.each=9,de.fragment=5,de.portal=6,de.slot=7;var ke=/^[A-Z]|-/,Se=/&[#\w\d]{2,6};/,we=L,_e=L,Oe=L,$e=L;function Ee(t,e,n){if(t.isComponent)return ge(mt(e),n);if("style"===e)return{type:4,isStatic:m};var r=ge(e,n);return Ce(e)&&(r.defaultValue="spellcheck"===e||"img"===t.tag&&"draggable"===e),r}function Te(t,e,n){return Ae(t)?function(t,e){return ct(e)}(0,e):Ce(t)?De(t,e,n):e}function Ae(t){return Oe[t]}function Ce(t){return $e[t]}function De(t,e,n){var r=e===m||e===S||e===t;return r===n?k:r?S:w}function Ne(t,e){var n=x,r=x,o=x;return e||!(n=_e[t]!==k)&&ke.test(t)?o=m:"style"===t&&(r=m),function(t,e,n,r,o){var a=t===i,u=!o&&!a&&!!le[t],s=!o&&!a&&!u;return{type:1,tag:t,dynamicTag:e,isSvg:n,isStyle:r,isStatic:s,isNative:s,isVirtual:u,isComponent:o}}(t,e,n,r,o)}function Le(t,e){return K(e)&&Se.test(e)?t.html=e:t.text=e,m}function Ve(t){return t!==k}var Pe=61,je={};function ze(t){return t>0&&t<33||160===t}function Ie(t){return t>47&&t<58}function Re(t){return 64===t}function Fe(t){return 36===t||95===t||t>96&&t<123||t>64&&t<91}function Ke(t){return Fe(t)||Ie(t)}function Me(t,e,n,r){return{type:5,raw:r,left:t,operator:e,right:n,isStatic:Ge([t,n])}}function We(t,e,n){var r=x,i=m,o=0;return e===C?(e=P,i=x):e===A?(e=P,i=x,o=1):"~"===e?(e=P,r=m,i=x):e=qe(e),n?He(e,t):Be(t,e,r,i,o)}function He(t,e){return{type:1,raw:e,value:t,isStatic:m}}function Ue(t,e){var n=e.shift(),r=x,i=m,o=0;if(e.length>0){var a=m,u=[],s=P,c=[];if(q(e,(function(t){if(a)if(1===t.type){var e=t;if(e.raw===A)return o+=1,void(s=s?s+T+A:A);if(e.raw!==C){var n=ct(e.value);Q(u,n),s&&(s+=Et(s,A)?T:E),s+=n}}else a=x;a||Q(c,t)})),2===n.type){var f=n;r=f.root,i=f.lookup,o+=f.offset;var p=f.name;if(p&&(p=qe(p,f),X(u,p)),p=at(u,E),a)n=Be(t,p,r,i,o,u);else{var l=f.raw;if(s){var v=E;"~"!==l&&l!==A||(v=T),l+=v+s}n=Ye(t,Be(l,p,r,i,o,u),k,c,r,i,o)}}else n=a?Ye(t,n,at(u,E),k,r,i,o):Ye(t,n,k,c,r,i,o)}return n}function Be(t,e,n,r,i,o){return{type:2,raw:t,name:e,root:n,lookup:r,offset:i,literals:o&&o.length>1?o:k}}function Ye(t,e,n,r,i,o,a){return{type:3,raw:t,lead:e,keypath:n,nodes:r,root:i,lookup:o,offset:a,isStatic:e.isStatic&&(!r||Ge(r))}}function qe(t,e){return Re(At(t,0))&&(t=s+wt(t,1),e&&(e.name=t)),t}function Ge(t){var e=m;return q(t,(function(t){if(!t.isStatic)return e=x})),e}je["true"]=m,je["false"]=x,je["null"]=b,je[void 0]=k;var Ze={"+":m,"-":m,"~":m,"!":m,"!!":m},Je={"*":15,"/":15,"%":15,"+":14,"-":14,"<<":13,">>":13,">>>":13,"<":12,"<=":12,">":12,">=":12,"==":11,"!=":11,"===":11,"!==":11,"&":10,"^":9,"|":8,"&&":7,"||":6},Qe=function(t){var e=this;e.index=-1,e.end=t.length,e.code=0,e.content=t,e.go()};Qe.prototype.go=function(t){var e=this,n=e.index,r=e.end;(n+=t||1)>=0&&n<r?(e.code=e.codeAt(n),e.index=n):(e.code=0,e.index=n<0?-1:r)},Qe.prototype.skip=function(t){var e=this,n=t&&t<0;if(0===e.code){var r=e.index;if(e.go(t),!ze(e.code))return void e.go(r-e.index)}else if(!ze(e.code))return;for(;;){if(!ze(e.code)){n&&e.go();break}e.go(t)}},Qe.prototype.is=function(t){return this.code===t},Qe.prototype.pick=function(t,e){return wt(this.content,t,Ve(e)?e:this.index)},Qe.prototype.codeAt=function(t){return At(this.content,t)},Qe.prototype.scanToken=function(){var t,e,n=this,r=n.code,i=n.index,o=x;if(Re(r)&&(o=m,n.go()),Fe(n.code))return n.scanTail(i,[n.scanIdentifier(i,o)]);if(o&&n.go(-1),Ie(r))return n.scanNumber(i);switch(r){case 0:return;case 39:case 34:return n.scanTail(i,[n.scanString(i,r)]);case 46:return n.go(),Ie(n.code)?n.scanNumber(i):n.scanPath(i);case 126:if(47===n.codeAt(i+1))return n.scanPath(i);break;case 40:return n.go(),n.scanTernary(41);case 91:return n.scanTail(i,[(t=n.scanTuple(i,93),e=n.pick(i),{type:7,raw:e,nodes:t,isStatic:Ge(t)})]);case 123:return n.scanObject(i)}var a=n.scanOperator(i);if(a&&Ze[a]){var u=n.scanTernary();if(u){if(1===u.type){var s=u.value;if(M(s))return n.skip(-1),He(-s,n.pick(i))}return n.skip(-1),function(t,e,n){return{type:4,raw:n,operator:t,node:e,isStatic:e.isStatic}}(a,u,n.pick(i))}}},Qe.prototype.scanNumber=function(t){for(var e,n=this;Ie(e=n.code)||46===e;)n.go();var r=n.pick(t);if(H(r))return He(+r,r)},Qe.prototype.scanString=function(t,e){var n=this;t:for(;;)switch(n.go(),n.code){case 92:n.go();break;case e:n.go();break t;case 0:break t}var r=n.pick(t);return He(new Function("return "+r)(),r)},Qe.prototype.scanObject=function(t){var e,n=this,r=[],i=[],o=m;n.go();t:for(;;)switch(n.code){case 125:n.go();break t;case 0:break t;case 58:n.go(),o=x;break;case 44:n.go(),o=m;break;default:if(e=n.scanTernary(),o){if(e)if(n.skip(),2===e.type)Q(r,e.name);else{if(1!==e.type)break t;Q(r,e.value)}}else{if(!e)break t;n.skip(),Q(i,e)}}return function(t,e,n){return{type:8,raw:n,keys:t,values:e,isStatic:Ge(e)}}(r,i,n.pick(t))},Qe.prototype.scanTuple=function(t,e){var n,r=this,i=[];r.go();t:for(;;)switch(r.code){case e:r.go();break t;case 0:break t;case 44:r.go();break;default:(n=r.scanTernary())&&(r.skip(),Q(i,n))}return i},Qe.prototype.scanPath=function(t){for(var e,n=this,r=[];e=C,n.is(46)?(n.go(),e=A):n.is(126)&&(n.go(),e="~"),Q(r,We(e,e,r.length>0)),n.is(47);){n.go();var i=n.index,o=n.code,a=x;if(Re(o)&&(a=m,n.go()),Fe(n.code))return Q(r,n.scanIdentifier(i,a,m)),n.scanTail(t,r);if(a&&n.go(-1),!n.is(46))break;n.go()}},Qe.prototype.scanTail=function(t,e){var n,r,i,o,a=this;t:for(;;)switch(a.code){case 40:e=[(r=Ue(a.pick(t),e),i=a.scanTuple(a.index,41),o=a.pick(t),{type:9,raw:o,name:r,args:i})];break;case 46:if(a.go(),Ke(a.code)){Q(e,a.scanIdentifier(a.index,x,m));break}break t;case 91:if(a.go(),n=a.scanTernary(93)){Q(e,n);break}break t;default:break t}return Ue(a.pick(t),e)},Qe.prototype.scanIdentifier=function(t,e,n){var r=this;do{r.go()}while(Ke(r.code));var i=r.pick(t);return e&&1===i.length&&r.fatal(t,"A slot identifier must be followed by its name."),!n&&i in je?He(je[i],i):We(i,i,n)},Qe.prototype.scanOperator=function(t){var e=this;switch(e.code){case 47:case 37:case 126:case 94:case 42:case 43:case 45:e.go();break;case 33:e.go(),e.is(33)?e.go():e.is(Pe)&&(e.go(),e.is(Pe)&&e.go());break;case 38:e.go(),e.is(38)&&e.go();break;case 124:e.go(),e.is(124)&&e.go();break;case Pe:e.go(),e.is(Pe)&&(e.go(),e.is(Pe)&&e.go());break;case 60:e.go(),(e.is(Pe)||e.is(60))&&e.go();break;case 62:e.go(),e.is(Pe)?e.go():e.is(62)&&(e.go(),e.is(62)&&e.go())}if(e.index>t)return e.pick(t)},Qe.prototype.scanBinary=function(t){for(var e,n,r,i,o,a,u=this,s=[];;){if(u.skip(),Q(s,u.index),e=u.scanToken()){if(Q(s,e),Q(s,u.index),u.skip(),(r=u.scanOperator(u.index))&&(i=Je[r])){for(;(o=s[n=s.length-4])&&(a=Je[o])&&a>=i;)s.splice(n-2,5,Me(s[n-2],o,s[n+2],u.pick(s[n-3],s[n+3])));Q(s,r);continue}r=k}break}for(;;){if(!(s.length>=7))return s[1];n=s.length-4,s.splice(n-2,5,Me(s[n-2],s[n],s[n+2],u.pick(s[n-3],s[n+3])))}},Qe.prototype.scanTernary=function(t){var e=this;e.skip();var n,r,i=e.index,o=e.scanBinary(i);return e.is(63)&&(e.go(),n=e.scanTernary(),e.is(58)&&(e.go(),r=e.scanTernary()),o&&n&&r&&(e.skip(-1),o=function(t,e,n,r){return{type:6,raw:r,test:t,yes:e,no:n,isStatic:Ge([t,e,n])}}(o,n,r,e.pick(i)))),Ve(t)&&(e.skip(),e.is(t)&&e.go()),o},Qe.prototype.fatal=function(t,e){};var Xe=vt((function(t){return new Qe(t).scanTernary(0)})),tn={},en="lazy-",nn=/\s*:\s*([_$a-z]+)$/i,rn=/^\s*[\n\r]\s*|\s*[\n\r]\s*$/g,on=/\s*(=>|->)\s*/,an=/<(\/)?([a-z][-a-z0-9]*|\$[^\s]*)/i,un="\x3c!--",sn=/^\s*([-$.:\w]+)(?:=(['"]))?/,cn=/^\s*(\/)?>/;function fn(t,e){return St(wt(t,e.length))}function pn(t){if(t.safe&&1===t.expr.type)return be(ct(t.expr.value))}function ln(t,e){return t>=0&&e>=0?t<e?-1:1:t>=0?-1:e>=0?1:0}function vn(t,e,n,r){for(;;){var i=e.text.indexOf(un,e.position),o=e.text.indexOf("--\x3e",e.position);switch(ln(i,o)){case-1:e.position=i+1;var a={startIndex:i};Q(t,a),n&&n(e,a);break;case 1:e.position=o+1;var u=t.length;if(u>0){var s=nt(t);s.endIndex=o+"--\x3e".length;var c=1===u;if(r)if(r(e,s,c)===x)return;if(c)return}break;case 0:return}}}function hn(t){for(var e=[],n=x,r=function(r){var o=t[r];if(5===o.type){var a=o;vn(e,{text:a.text,position:0},(function(t,e){e.index=r,e.text=wt(a.text,0,e.startIndex)}),(function(e,i){var o=i.index,u=r,s=i.text,c=wt(a.text,i.endIndex);if(o===u)return e.text=a.text=s+c,void(e.position=i.startIndex);var f=o,p=u;s&&(t[o].text=s,f++),c&&(t[u].text=c,p--);var l=p-f+1;return l>0&&(n=m,t.splice(f,l),r=f-1),x}))}i=r},i=0;i<t.length;i++)r(i);if(n)for(var o=0;o<t.length;o++){var a=t[o];if(5===a.type){var u=t[o+1];u&&5===u.type&&(a.text+=u.text,t.splice(o+1,1))}}}function dn(i){for(var s,c,h,d,y,g=kt(z.leftDelimiter,2),b=kt(z.rightDelimiter,2),S=z.leftDelimiter,w=z.rightDelimiter,_=[],O=[],$=[],A=[],C=[],D=[],N=i.length,L=0,V=0,j=0,I=0,R=1,F=[],K=[],M=function(t){var e,n=et(O);if(n&&1===n.type){var r=n;r.tag!==t&&(e=r.tag,we[e]!==k)&&W(r.type,r.tag)}},W=function(t,e){var n=nt(O),r=1===t,i=2===t,o=4===t,a=3===t,u=et(O),s=n.children;if(s&&s.length>1&&(c||(hn(s),s.length||(s=n.children=k))),s){var f=1===s.length&&s[0];if(f)switch(f.type){case 5:r?H(n,f):c&&(i?Z(c,n,f):o?Y(c,n,f):a&&rt(c,n,f));break;case 11:r?U(n,f):c&&(i||o||a)&&J(c,n,f)}}else c&&(i?G(c,n):o?B(c,n):a&&X(c,n));return n.isVirtual&&!n.children&&ut(n),r?ot(n):c&&i&&at(c,n),u&&u.isStatic&&!n.isStatic&&(u.isStatic=x),n},H=function(t,e){t.isNative&&Le(t,e.text)&&(t.children=k)},U=function(t,e){t.isNative&&(e.safe&&Le(t,e.expr)||!e.safe&&function(t,e){return t.html=e,m}(t,e.expr))&&(t.children=k)},B=function(t,e){ut(e)},Y=function(t,e,n){n.text?(e.value=n.text,e.children=k):ut(e)},G=function(t,e){ye(t,e)||(e.value=function(t,e,n){return t.isComponent?m:Ae(e)?k:Ce(e)?De(e,m,n):P}(t,e.name,e.defaultValue))},Z=function(t,e,n){var r=n.text;t.isNative?e.value=Te(e.name,r,e.defaultValue):e.value=r,e.children=k},J=function(t,e,n){var r=n.expr;if(1===r.type){var i=r.value;t.isNative&&2===e.type&&(i=Te(e.name,i,e.defaultValue)),e.value=i}else e.expr=r;e.children=k},X=function(t,e){e.value=m},rt=function(t,e,n){var r,i,o=e.ns,a=n.text,u="o"===o;try{r=Xe(a)}catch(s){i=s}if(r)e.expr=r,e.value=1===r.type?r.value:a;else{if(!u)throw i;e.value=a}e.children=k},it=function(t){for(var e=t,n=[],r=x,i=x;Q(n,e),e.next;)e=e.next;q(n,(function(t){t.children&&(!r&&t.next&&delete t.next,i=r=m)}),m),i||ut(t)},ot=function(t){var e=t.tag;t.slot,e!==u&&e!==a&&e!==o||t.children?t.isNative&&function(t){var e=t.attrs,n=x;if(e&&q(e,(function(t){"type"===(2===t.type?t.name:k)&&(n=m)})),t.isStyle&&!n){var r=ge("type");r.value="text/css",Q(t.attrs||(t.attrs=[]),r)}}(t):ut(t)},at=function(t,e){var n=e.name,r=e.value,i="slot"===n;if(ye(t,e)){var o=i;t[n]=o?r:e,ut(e),e.isStatic&&(e.isStatic=x)}},ut=function(t,e){var n,r,i,o=et(O);(r=o?(n=c&&c===o)?o.attrs:o.children:_)&&(i=tt(r,t))>=0&&(e?r[i]=e:(r.splice(i,1),o&&!r.length&&(n?delete o.attrs:o.children=k)))},st=function(t){c||M();var e=t.type,n=et(O),r=k,i=k,o=k;if(7===e){var a=et(A);a&&(6===a.type?r=a:7===a.type&&(i=a))}else if(8===e){var u=et(A),s=et(D);u&&n===u?6===u.type?r=u:7===u.type&&(i=u):s&&n===s&&9===s.type&&(o=s)}else if(n)if(c&&1===n.type)Q(c.attrs||(c.attrs=[]),t);else{var f=n.children||(n.children=[]),p=et(f);if(11===e&&(!c||h&&f.length>0)){var l=pn(t);l&&(t=l,e=l.type)}if(p&&5===e){if(5===p.type)return void(p.text+=t.text);if(11===p.type){var v=pn(p);if(v)return f[f.length-1]=v,void(v.text+=t.text)}}Q(f,t)}else Q(_,t);6===e?(Q($,t),Q(A,t)):9===e?(Q(C,t),Q(D,t)):r?(r.next=t,A[A.length-1]=t,W(r.type)):i?(i.next=t,A[A.length-1]=t,W(i.type)):o&&(o.next=t,D[D.length-1]=t,W(o.type)),t.isLeaf?n&&n.isStatic&&!t.isStatic&&(n.isStatic=x):Q(O,t)},ct=function(t){(t=t.replace(rn,P))&&st(be(t))},ft=[function(t){if(!s&&!c){var e=t.match(an);if(e&&0===e.index){var n=e[2];if(e[1]===T)M(n),c=W(1);else{var r;"$"===Tt(n)&&(n=wt(n,1),r=Xe(n));var i=Ne(n,r);st(i),c=i}return e[0]}}},function(t){if(!s){var e=t.match(cn);return e&&c&&!h?(e[1]===T&&W(c.type,c.tag),c=k,e[0]):void 0}},function(t){if(!s&&c&&!h){var e=t.match(sn);if(e){var n,r=e[1];if(r===p||r===v)n=me(P,r);else if($t(r,"on-")){var i=fn(r,"on-"),o=mt(i).split(E);n=me(o[0],l,o[1])}else if(r===f)n=me(P,f);else if($t(r,en)){var a=fn(r,en);n=me(mt(a),f)}else if($t(r,"o-")){var u=fn(r,"o-"),d=mt(u).split(E);n=me(d[0],"o",d[1])}else{var g=r.split(":");n=2===g.length?Ee(c,g[1],g[0]):Ee(c,r)}return st(n),(y=e[2])?h=n:W(n.type),e[0]}}},function(t){var e,n=k;if(!s&&h&&y)(e=t.match(tn[y]||(tn[y]=new RegExp(y))))?(n=wt(t,0,e.index),ct(n),h.children||st(be(P)),n+=y,W(h.type),h=k):ct(n=t);else if(c)n=t;else{var r=P;if(!s&&(e=t.match(an))){var i=e.index;ln(i,t.indexOf(un))<0&&(n=wt(t,0,i),r=n)}if(!Ve(n)){var o=-1,a=-1,u=s,f=s||[];s=k,vn(f,{text:t,position:0},(function(e,i){o<0&&(o=i.startIndex,n=t,r=t,s=f)}),(function(e,i,c){c&&(s=k,a=i.endIndex,o>=0?u?(n=wt(t,0,a),r=n):(n=wt(t,0,a),r=wt(t,0,o)):(n=wt(t,0,a),r=n))}))}Ve(n)||(n=t,r=t),ct(r)}return n}],pt=[function(t){if($t(t,n)){var e=t=St(fn(t,n)),r=k,i=t.match(nn);if(i&&(r=i[1],e=wt(t,0,-1*i[0].length)),i=e.match(on)){var o=e.split(on),a=Xe(o[0]),u=Xe(o[2]);if(a&&u)return xe(a,u,"=>"===i[1],r)}else{var s=Xe(e);if(s)return xe(s,k,x,r)}}},function(t){if($t(t,">"))return t=fn(t,">"),function(t){return{type:10,expr:t,isLeaf:m}}(Xe(t))},function(t){if($t(t,"#if"))return t=fn(t,"#if"),function(t){return{type:6,expr:t,isVirtual:m}}(Xe(t))},function(t){if($t(t,e))return t=fn(t,e),function(t){return{type:7,expr:t,isVirtual:m}}(Xe(t))},function(e){if($t(e,t))return e=fn(e,t),{type:8,isVirtual:m}},function(t){if($t(t,"...")){t=fn(t,"...");var e=Xe(t);if(c&&c.isComponent)return function(t){return{type:12,expr:t,isLeaf:m}}(e)}},function(t){if(!r.test(t))return t=St(t),function(t,e){return{type:11,expr:t,safe:e,isLeaf:m,isStatic:t.isStatic}}(Xe(t),2===R)}],lt=function(t){for(;t;)q(ft,(function(e){var n=e(t);if(n)return t=wt(t,n.length),x}))},vt=function(t){if(Tt(t)===T){M();var e=wt(t,1),n=he[e],r=k,i=k;if(6===n){var o=nt(A);o&&(n=o.type,r=nt($))}else if(9===n){var a=nt(D);a&&(n=a.type,i=nt(C))}W(n),r?it(r):i&&it(i)}else q(pt,(function(e){var n=e(t);if(n)return st(n),x}))},ht=function(){if(!((L=I+b.length)<=N))return m;L<N&&Tt(i,L)===w?3===R&&(V=L+1):2===R&&(V=L),nt(F),dt(I)},dt=function(t){F.length||Q(K,t)};;)if(dt(V),j=_t(i,g,V),(I=_t(i,b,V))>=V&&(j<0||I<j)){if(ht())break}else{if(!(j>=V))break;if(R=2,dt(j),(j+=g.length)<N&&(Tt(i,j)===S&&(R=3,j++),dt(j),dt(R),Q(F,m),j<N&&(I=_t(i,b,j))>=j&&((V=_t(i,g,j))<0||I<V)&&ht()))break}R=1;for(var yt=0,gt=K.length;yt<gt;yt+=5)L=K[yt],Ve(j=K[yt+1])?(lt(wt(i,L,j)),R=K[yt+3],(d=St(wt(i,j=K[yt+2],I=K[yt+4])))&&vt(d)):(R=1,lt(wt(i,L)));return O.length&&M(),_.length>0&&hn(_),_}var yn=k,gn=k,mn=Lt("abstract,goto,native,static,enum,implements,package,super,byte,export,import,private,protected,public,synchronized,char,extends,int,throws,class,final,interface,transient,yield,let,const,float,double,boolean,long,short,volatile,default"),xn=0,bn={},kn={},Sn=P,wn=P,_n=P,On=P,$n=P,En=P,Tn=P,An=P,Cn=P,Dn=function(t){this.value=t};Dn.prototype.toString=function(){var t=this.value;return t===m?$n:t===x?En:t===b?On:t===k?_n:K(t)?ur(t):""+t};var Nn=function(t,e,n,r,i,o){this.left=t,this.right=e,this.separator=n,this.breakLine=r,this.offset=i,this.items=o||[]};Nn.prototype.unshift=function(t){X(this.items,t)},Nn.prototype.push=function(t){Q(this.items,t)},Nn.prototype.toString=function(t){var e=this,n=e.left,r=e.right,i=e.separator,o=e.breakLine,a=e.offset,u=e.items;if(!u.length)return""+n+r;var s=t||0,c=s+a,f=kt(An,s),p=kt(An,c),l=u.map((function(t){return t.toString(c)}));return n&&o&&(n+=Cn+p),r&&o&&(r=Cn+f+r),""+n+at(l,o?i+Cn+p:i+Tn)+r};var Ln=function(t){this.items=t||[]};Ln.prototype.add=function(t){Q(this.items,t)},Ln.prototype.toString=function(t){var e=this.items;return 1===e.length?e[0].toString(t):new Nn("(",")",",",m,1,e).toString(t)};var Vn=function(t){if(this.fields={},t){var e=this;qt(t,(function(t,n){e.set(n,t)}))}};Vn.prototype.set=function(t,e){e instanceof Dn&&e.value===k||(this.fields[t]=e)},Vn.prototype.isNotEmpty=function(){return Yt(this.fields).length>0},Vn.prototype.toString=function(t){var e=this.fields,n=Yt(e).sort().map((function(t){return{toString:function(n){return function(t,e){/^[\w$]+$/.test(t)&&!mn[t]||(t=ur(t));return t+":"+Tn+e}(t,e[t].toString(n))}}}));return Yn("{","}",",",m,1,n).toString(t)};var Pn=function(t,e){this.name=t,this.args=e};Pn.prototype.toString=function(t){var e=this.name,n=this.args,r=n?function(t){var e=[],n=m;return q(t,(function(t){(t instanceof Dn?t.value!==k:m)?(n=x,X(e,t)):n||X(e,Bn(k))}),m),e}(n):[];return r.length?""+e.toString(t)+Yn("(",")",",",m,1,r).toString(t):e.toString(t)+"()"};var jn=function(t){this.value=t};jn.prototype.toString=function(t){return"("+this.value.toString(t)+")"};var zn=function(){};zn.prototype.append=function(t){var e=this.buffer;this.buffer=e?tr(e instanceof Fn?Qn(e):e,"+",t instanceof Fn?Qn(t):t):t},zn.prototype.toString=function(t){return this.buffer.toString(t)};var In=function(t,e){this.operator=t,this.value=e};In.prototype.toString=function(t){return""+this.operator+this.value.toString(t)};var Rn=function(t,e,n){this.left=t,this.operator=e,this.right=n};Rn.prototype.toString=function(t){return""+this.left.toString(t)+Tn+this.operator+Tn+this.right.toString(t)};var Fn=function(t,e,n){this.test=t,this.yes=e,this.no=n};Fn.prototype.toString=function(t){return""+this.test.toString(t)+Tn+"?"+Tn+this.yes.toString(t)+Tn+":"+Tn+this.no.toString(t)};var Kn=function(t,e,n){this.args=t,this.body=e,this.returnValue=n};Kn.prototype.toString=function(t){var e=this,n=e.args,r=e.body,i=e.returnValue,o=t||0,a=o+1,u=kt(An,o),s=kt(An,a),c=n?Yn(P,P,",",x,1,n).toString(o):P,f=[];return r&&Q(f,r.toString(a)+(i?";":P)),i&&Q(f,"return "+i.toString(a)),"function"+Tn+"("+c+")"+Tn+"{"+Cn+s+at(f,Cn+s)+Cn+u+"}"};var Mn=function(t,e){this.base=t,this.props=e};Mn.prototype.toString=function(t){var e=this.base,n=this.props,r=e.toString(t);return q(n,(function(e){e instanceof Dn?H(e.value)?r+="["+Tn+e.value+Tn+"]":r+="."+e.value:r+="["+Tn+e.toString(t)+Tn+"]"})),r};var Wn=function(t,e,n){this.name=t,this.value=e,this.isDeclaration=n};Wn.prototype.toString=function(t){var e=this,n=e.name,r=e.value,i=e.isDeclaration,o=""+n.toString(t)+Tn+"="+Tn+r.toString(t);return i?"var "+o:o};var Hn=function(t,e){this.array=t,this.item=e};Hn.prototype.toString=function(t){var e=this.array,n=this.item;return Jn(rr(e,[Bn("push")]),[n]).toString(t)};var Un=function(t,e){this.value=t,this.type=e};function Bn(t){return new Dn(t)}function Yn(t,e,n,r,i,o){return new Nn(t,e,n,r,i,o)}function qn(t){return new Ln(t)}function Gn(t,e){var n=Yn("[","]",",",m,1,t);return K(e)?{toString:function(t){return n.toString(t)+".join("+Bn(e).toString()+")"}}:n}function Zn(t){return new Vn(t)}function Jn(t,e){return new Pn(t,e)}function Qn(t){return new jn(t)}function Xn(){return new zn}function tr(t,e,n){return new Rn(t,e,n)}function er(t,e,n){return new Fn(t,e,n)}function nr(t,e,n){return new Kn(t,e,n)}function rr(t,e){return new Mn(t,e)}function ir(t,e,n){return new Wn(t,e,n)}function or(t,e){return new Hn(t,e)}function ar(){return wn}function ur(t){return'"'+(t=t.replace(/\\?'/g,"\\'").replace(/\\?"/g,'\\"').replace(/\n\s*/g,"\\n"))+'"'}function sr(t,e){var n=t?t.toString():k;if(e&&n&&kn[n])return kn[n];var r=Sn+xn++;return bn[r]=t,e&&n&&(kn[n]=r),r}function cr(t){return t.split(E).filter((function(t){return t.length>0})).map(Bn)}function fr(t,e){var n=[];return qt(bn,(function(t,e){Q(n,{toString:function(n){return function(t,e){return e!==k?""+t+Tn+"="+Tn+e:t}(e,t?t.toString(n):k)}})})),"("+nr(k,Yn("var ",P,",",x,0,n),nr(t,e)).toString()+")()"}function pr(t){return 6===t.type||5===t.type}function lr(t,e,n,r,i,o,a){var u,s=x,c=function(t,o){return lr(t,e,n,r,i,x,o)},f=function(t,e){return t.map((function(t){return c(t,e)}))};switch(t.type){case 1:u=Bn(t.value);break;case 4:var p=t;u=function(t,e){return new In(t,e)}(p.operator,c(p.node));break;case 5:var l=t,v=c(l.left),h=c(l.right);u=tr(pr(l.left)?Qn(v):v,l.operator,pr(l.right)?Qn(h):h);break;case 6:var d=t;u=er(c(d.test),c(d.yes),c(d.no));break;case 7:u=Gn(f(t.nodes,a));break;case 8:var y=t,g=Zn();q(y.keys,(function(t,e){var n=y.values[e];g.set(t,c(n))})),u=g;break;case 2:s=m;var b=t;u=e(b)||n(b,b.name?cr(b.name):[],b.name,o,a);break;case 3:s=m;var S=t;if(S.isStatic)u=S.raw;else if(2===S.lead.type){var w=S.lead,_=e(w),O=f(S.nodes||[]);_?u=r(_,O,o):(w.name&&q(cr(w.name),(function(t){O.unshift(t)}),m),u=n(S,O,k,o,a))}else u=S.nodes?r(c(S.lead),f(S.nodes||[]),o):r(c(S.lead),cr(S.keypath),o);break;default:s=m;var $=t;u=i($,c($.name,$),$.args.length?f($.args):k,o)}return!o||s?u:Zn({value:u})}Un.prototype.toString=function(t){var e=this.value,n=this.type;return"typeof "+e.toString(t)+Tn+"==="+Tn+ur(n)};var vr=[m],hr=[],dr=[],yr=[],gr=[m],mr=[],xr=[],br=[h,d,y,g],kr={},Sr="nativeAttrs",wr="nativeStyles",_r="props",Or="directives",$r="events",Er="model",Tr="lazy",Ar="transition",Cr="children",Dr="operator",Nr=Bn(k),Lr=Bn(m),Vr=k,Pr=k,jr=P,zr=P,Ir=P,Rr=P,Fr=P,Kr=P,Mr=P,Wr=P,Hr=P,Ur=P,Br=P,Yr=P,qr=P,Gr=P,Zr=P,Jr=P,Qr=P,Xr=P,ti=P,ei=P,ni=P,ri=P,ii=P,oi=P,ai=P,ui=P,si=P,ci=P,fi=P,pi=P,li=P,vi=P,hi=P,di=P,yi=P,gi=P,mi=P,xi=P,bi=P,ki=P,Si=P,wi=P,_i=P;var Oi=function(t){this.text=t};Oi.prototype.toString=function(t){return Zn({type:Bn(2),isPure:Lr,operator:ni,text:this.text}).toString(t)};var $i=function(t){this.buffer=Xn(),this.append(t)};function Ei(t){if(it(br,t))switch(t){case h:return ki;case d:return Si;case y:return wi;case g:return _i;default:return t}}function Ti(t){var e=t.name,n=t.root,r=t.lookup,i=t.offset,o=t.literals;if(o){var a=Ei(o[0]);if(Ve(a)){var u=Zt(o);return u[0]=a,at(u,E)}}else{var s=Ei(e);if(Ve(s))return s}if(et(dr)&&n===x&&r===x&&0===i)return e===P?bi:rr(bi,cr(e))}function Ai(t,e){return e?t:rr(t,[Bn("value")])}function Ci(t,e,n,r,i){var o=t.root,a=t.lookup,u=t.offset,s=e.length,c=function(t,e){return t?Bn(0):tr(rr(yi,[Bn($)]),"-",Bn(1+(e||0)))}(o,u),f=Nr;i&&9===i.type&&a&&n&&s>0&&(f=s>1?rr(pi,e):Ri(fi,pi,n));var p=Jn(Zr,[yi,c,K(n)?Bn(n):Gn(e,E),Gn(e),a?Lr:Nr,f]);if(n&&1===s)if(o||u||a)if(o||u){var l=qn(),v=ar();l.add(ir(v,rr(yi,[c]))),l.add(Jn(Xr,[rr(Jn(rr(v,[Bn("getScope")])),[Bn(n)]),Jn(rr(v,[Bn("getKeypath")]),[Bn(n)])])),p=l}else p=Jn(Jr,[yi,c,Bn(n),f]);else p=Jn(Xr,[rr(bi,e),Jn(rr(rr(yi,[c]),[Bn("getKeypath")]),[Bn(n)])]);else if(!n&&!s){var h=qn(),d=ar();h.add(ir(d,rr(yi,[c]))),h.add(Jn(Xr,[Jn(rr(d,[Bn("getScope")])),rr(d,[Bn("keypath")])])),p=h}return Ai(p,r)}function Di(t,e,n){var r;switch(e.length){case 0:r=Jn(Xr,[t]);break;case 1:r=Jn(Xr,[rr(t,e)]);break;default:r=Jn(Qr,[t,Gn(e)])}return Ai(r,n)}function Ni(t,e,n,r){var i=qn(),o=ar();return i.add(ir(o,e)),i.add(er(new Un(o,"function"),Jn(o,n),Jn(rr(ci,[Bn("fatal")]),[Bn("["+t.raw+"] is not a function.")]))),Ai(Jn(Xr,[i]),r)}function Li(t,e){var n=lr(t,Ti,Ci,Di,Ni,e);return t.isStatic?sr(n,m):n}function Vi(t){var e=Xn();return Q(mr,e),q(t,(function(t){kr[t.type](t)})),nt(mr),e}function Pi(t){return Ve(t.value)?Bn(t.value):t.expr?Li(t.expr):t.children?Vi(t.children):Nr}function ji(t){Pr=k;var e=[];return q(t,(function(t){var n=kr[t.type](t);n instanceof Dn&&n.value===k||Q(e,n)})),Pr=k,e}function zi(t){return Yn(P,P,";",m,0,ji(t))}function Ii(t,e){var n=zi(t);return n.unshift(ir(xi,Gn(),m)),nr(e,n,er(rr(xi,[Bn($)]),xi,Bn(k)))}function Ri(t,e,n){return tr(tr(t,"&&",rr(t,[Bn(n)])),"||",rr(e,[Bn(n)]))}function Fi(t){return et(gr)?function(t){return Pr=t instanceof $i?t:k,or(xi,t)}(t):t}function Ki(t){return Pr?(Pr.append(t),Nr):Fi(new $i(t))}function Mi(t,e){for(var n=[],r=[],i=k,o=[],a=k,u=k,s=[],c=[],h=[],d=0,y=t.length;d<y;d++){var g=t[d];if(2===g.type){var m=g;Q(4===e||7===e?r:n,m)}else if(4===g.type)i=g;else if(3===g.type){var x=g;switch(x.ns){case f:Q(o,x);break;case v:a=x;break;case p:u=x;break;case l:Q(s,x);break;default:Q(c,x)}}else Q(h,g)}return{nativeAttributeList:n,propertyList:r,style:i,lazyList:o,transition:a,model:u,eventList:s,customDirectiveList:c,otherList:h}}function Wi(t){var e=t.name,n=Pi(t);return n instanceof Dn||(Ae(e)?n=Jn(qr,[Bn(e),n]):Ce(e)&&(n=Jn(Gr,[Bn(e),n,Bn(t.defaultValue)]))),n}function Hi(t,e){var n=k,r=k,i=e||x;return i||q(t,(function(t){if(!t.isStatic)return i=m,x})),Q(gr,i),i?n=Jn(Ii(t)):r=Gn(ji(t)),nt(gr),{dynamicChildren:n,staticChildren:r}}function Ui(t){if(Ve(t.value)){var e=Zn();return function(t,e){for(var n=t.split(";"),r=0,i=n.length;r<i;r++){var o=n[r],a=o.indexOf(":");if(a>0){var u=St(o.substring(0,a)),s=St(o.substring(a+1));u&&s&&e(mt(u),s)}}}(t.value,(function(t,n){e.set(t,Bn(n))})),sr(e,m)}return t.expr?8===t.expr.type?Li(t.expr):Jn(zr,[Li(t.expr)]):Jn(jr,[Vi(t.children)])}function Bi(t){return Bn(t.value)}function Yi(t){return Jn(Ir,[Bn(t.value),Ri(hi,di,t.value)])}function qi(t){return Jn(Rr,[Li(t.expr,m)])}function Gi(t,e){Q(t,Nr),Q(t,Nr),4===et(xr)&&("native"===e.modifier?t[t.length-1]=Lr:t[t.length-2]=Lr)}function Zi(t){var e=[];Q(e,Bn(Ji(t))),Q(e,Bn(t.value)),Q(e,Bn(t.name)),Q(e,Bn(t.modifier||P));var n=t.expr,r=n.raw;if(9===n.type){var i=n;return Q(e,Bn(i.name.name)),ut(i.args)?Q(e,Nr):Q(e,Zn({execute:nr([wi,_i],k,Gn(i.args.map((function(t){return Li(t)}))))})),Gi(e,t),{name:Fr,args:e}}var o=r.split(E);return Q(e,Bn(o[0])),Q(e,Bn(o[1])),Gi(e,t),{name:Kr,args:e}}function Ji(t){return Mt(t.name,t.modifier||P)}function Qi(t){var e=[];return Q(e,Bn(Ji(t))),Q(e,Bn(t.name)),Q(e,Bn(t.modifier)),Q(e,t.expr?Li(t.expr):Bn(t.value)),Q(e,Ri(li,vi,t.name)),e}function Xi(){return et(vr)?Fi(new Oi(Bn(P))):et(mr)?Bn(P):Nr}function to(t){if(t)return et(hr)&&(e=t,n=et(xr),r=Mi(e,n),i=r.nativeAttributeList,o=r.propertyList,a=r.style,u=r.lazyList,s=r.transition,c=r.model,f=r.eventList,p=r.customDirectiveList,l=r.otherList,Q(v=[],i),Q(v,o),a&&Q(v,a),Q(v,u),s&&Q(v,s),c&&Q(v,c),Q(v,f),Q(v,p),Q(v,l),t=v),et(mr)?Vi(t):qn(ji(t));var e,n,r,i,o,a,u,s,c,f,p,l,v}function eo(t){return Vr!==z.uglifyCompiled&&(z.uglifyCompiled?(jr="_a",zr="_b",Ir="_c",Rr="_d",Fr="_e",Kr="_f",Mr="_g",Wr="_h",Hr="_i",Ur="_j",Br="_k",Yr="_l",qr="_m",Gr="_n",Zr="_o",Jr="_p",Qr="_q",Xr="_r",ti="_s",ei="_t",ni="_u",ri="_v",ii="_w",oi="_x",ai="_y",ui="_z",si="_A",ci="_B",fi="_C",pi="_D",li="_E",vi="_F",hi="_G",di="_H",yi="_I",gi="_J",mi="_K",xi="_L",bi="_M",ki="_N",Si="_O",wi="_P",_i="_Q"):(jr="renderStyleStyle",zr="renderStyleExpr",Ir="renderTransition",Rr="renderModel",Fr="renderEventMethod",Kr="renderEventName",Mr="renderDirective",Wr="renderSpread",Hr="renderEach",Ur="renderRange",Br="renderSlot",Yr="appendVNodeProperty",qr="formatNativeAttributeNumberValue",Gr="formatNativeAttributeBooleanValue",Zr="lookupKeypath",Jr="lookupProp",Qr="readKeypath",Xr="setValueHolder",ti="toString",ei="textVNodeOperator",ni="commentVNodeOperator",ri="elementVNodeOperator",ii="componentVNodeOperator",oi="fragmentVNodeOperator",ai="portalVNodeOperator",ui="slotVNodeOperator",si="instance",ci="logger",fi="filters",pi="globalFilters",li="directives",vi="globalDirectives",hi="transition",di="globalTransitions",yi="stack",gi="parent",mi="vnode",xi="children",bi="$scope",ki=h,Si=d,wi=y,_i=g),Vr=z.uglifyCompiled),yn!==z.uglifyCompiled&&(Sn=(yn=z.uglifyCompiled)?"$":"var"),gn!==z.minifyCompiled&&((gn=z.minifyCompiled)?Tn=An=Cn=P:(Tn=" ",An=" ",Cn="\n")),xn=0,bn={},kn={},wn=sr(),_n=sr("void 0"),On=sr("null"),$n=sr("!0"),En=sr("!1"),fr([jr,zr,Ir,Rr,Fr,Kr,Mr,Wr,Hr,Ur,Br,Yr,qr,Gr,Zr,Jr,Qr,Xr,ti,ei,ni,ri,ii,oi,ai,ui,si,ci,fi,pi,li,vi,hi,di,yi,bi,ki,xi],kr[t.type](t))}$i.prototype.append=function(t){this.buffer.append(t)},$i.prototype.toString=function(t){return Zn({type:Bn(1),isPure:Lr,operator:ei,text:this.buffer}).toString(t)},kr[1]=function(t){var e=t.tag,n=t.dynamicTag,r=t.isComponent,i=t.to,o=t.ref,a=t.key,f=t.html,p=t.text,l=t.attrs,v=t.children,h=r?4:de[e]||3,d=Zn({context:si,type:Bn(h),tag:n?Li(n):Bn(e)}),y=5===h,g=6===h,b=7===h,S=k,w=k,_=k,O=k;if(Q(vr,m),Q(hr,x),Q(xr,h),v)if(r)_=function(t){var e=Zn(),n={},r=function(t,e){ut(e)||Q(n[t=s+t]||(n[t]=[]),e)};if(Q(yr,m),q(t,(function(t){if(1===t.type){var e=t;if(e.slot)return void r(e.slot,e.tag===u?e.children:[e])}r(c,[t])})),qt(n,(function(t,n){e.set(n,Ii(t,[gi]))})),nt(yr),e.isNotEmpty())return e}(v);else{var E=Hi(v),T=E.dynamicChildren,A=E.staticChildren;T?w=T:A&&(b?w=A:d.set(Cr,A))}if(vr[vr.length-1]=x,hr[hr.length-1]=m,i&&d.set("to",Pi(i)),o&&d.set("ref",Pi(o)),a&&d.set("key",Pi(a)),f&&d.set("html",K(f)?Bn(f):Jn(ti,[Li(f)])),p&&d.set("text",K(p)?Bn(p):Jn(ti,[Li(p)])),l){var C=Mi(l,h),D=C.nativeAttributeList,N=C.propertyList,L=C.style,V=C.lazyList,P=C.transition,j=C.model,z=C.eventList,I=C.customDirectiveList,R=C.otherList,F=R.length>0;if(D.length){var M=Zn(),W=F;q(D,(function(t){t.isStatic||(W=m),M.set(t.name,Wi(t))})),d.set(Sr,W?M:sr(M,m))}if(N.length){var H=Zn();q(N,(function(t){H.set(t.name,Pi(t))})),d.set(_r,H)}if(L&&d.set(wr,Ui(L)),V.length){var U=Zn();q(V,(function(t){U.set(t.name,Bi(t))})),d.set(Tr,sr(U,m))}if(P&&d.set(Ar,Yi(P)),j&&d.set(Er,qi(j)),z.length){var B=Zn();q(z,(function(t){var e=Zi(t);B.set(Ji(t),Jn(e.name,e.args))})),d.set($r,B)}if(I.length){var Y=Zn();q(I,(function(t){Y.set(Ji(t),Jn(Mr,Qi(t)))})),d.set(Or,Y)}R.length&&(S=nr([mi],zi(R),mi))}if(b){var G=t.name,Z=Bn("$slot_children");G&&(Z=Ve(G.value)?Bn(s+G.value):tr(Bn(s),"+",Qn(Pi(G)))),O=Jn(Br,[Z,et(yr)?gi:Nr])}nt(vr),nt(hr),nt(xr),3===h?d.set(Dr,ri):y?d.set(Dr,oi):g?d.set(Dr,ai):r?(d.set(Dr,ii),et(yr)&&d.set("parent",gi)):b&&(d.set(Dr,ui),w=w?tr(O,"||",w):O),t.isSvg&&d.set("isSvg",Lr),t.isStatic&&(d.set("isStatic",Lr),d.set("isPure",Lr)),w&&d.set(Cr,w),_&&d.set("slots",_);var J=S?Jn(S,[d]):d;if(y||g||b){var X=qn(),tt=ar();return X.add(ir(tt,J)),X.add(tr(tr(rr(tt,[Bn(Cr)]),"&&",rr(tt,[Bn(Cr),Bn($)])),"&&",or(xi,tt))),X}return Fi(J)},kr[2]=function(t){var e=et(xr);return Jn(Yr,[mi,Bn(4===e||7===e?_r:Sr),Bn(t.name),Wi(t)])},kr[4]=function(t){return ir(rr(mi,[Bn(wr)]),Ui(t))},kr[3]=function(t){switch(t.ns){case f:return Jn(Yr,[mi,Bn(Tr),Bn(t.name),Bi(t)]);case v:return ir(rr(mi,[Bn(Ar)]),Yi(t));case p:return ir(rr(mi,[Bn(Er)]),qi(t));case l:var e=Zi(t);return Jn(Yr,[mi,Bn($r),Bn(Ji(t)),Jn(e.name,e.args)]);default:return Jn(Yr,[mi,Bn(Or),Bn(Ji(t)),Jn(Mr,Qi(t))])}},kr[12]=function(t){return Jn(Wr,[mi,Bn(_r),Li(t.expr)])},kr[5]=function(t){var e=Bn(t.text);if(et(vr))return Ki(e);var n=et(mr);return n?(n.append(e),Nr):e},kr[11]=function(t){var e=Li(t.expr);if(et(vr))return Ki(Jn(ti,[e]));var n=et(mr);return n?(n.append(Jn(ti,[e])),Nr):e},kr[6]=function(t){var e=t.next,n=et(mr),r=Xi(),i=er(Li(t.expr),to(t.children)||r,e?kr[e.type](e):r);return n?(n.append(i),Nr):i},kr[7]=function(t){var e=t.next,n=Xi();return er(Li(t.expr),to(t.children)||n,e?kr[e.type](e):n)},kr[8]=function(t){return to(t.children)||Xi()},kr[9]=function(t){var e=t.index,n=t.from,r=t.to,i=t.equal,o=t.next,a=r||7===n.type||8===n.type,u=[yi,bi,ki,Si];e&&(Q(u,e),Q(br,e)),Q(dr,a);var s=nr(u,zi(t.children));e&&nt(br),nt(dr);var c=o?nr(k,zi(o.children)):Nr;return r?Jn(Ur,[Li(n),Li(r),Bn(i),s,c]):Jn(Hr,[Li(n,m),s,c])},kr[10]=function(t){var e=ar(),n=qn();return n.add(ir(e,Li(t.expr))),n.add(er(e,Fi(e),Nr)),n};function no(t){var e=t.input,n=t.getter;t.value=e?n.apply(k,e):n()}var ro=function(){this.map={},this.list=[]};ro.prototype.add=function(t,e){var n=this.map[t.id]||(this.map[t.id]={});n[e]||(n[e]=t,this.list.push([t,e]))},ro.prototype.watch=function(t){var e=this.list;if(e)for(var n=0,r=e.length;n<r;n++)e[n][0].watch(e[n][1],t)},ro.prototype.unwatch=function(t){var e=this.list;if(e)for(var n=0,r=e.length;n<r;n++)e[n][0].unwatch(e[n][1],t)};var io=function(t,e,n,r,i,o,a,u){var s=this;s.status=1,s.keypath=t,s.cache=e,s.input=r,s.output=i,s.setter=a,s.getter=o,s.onChange=u,s.watcherOptions={sync:n,watcher:function(){s.refresh()}}};function oo(t,e){return H(t)?+t:e!==k?e:0}function ao(t,e){if(t==b||e===P)return t;var n=Qt(t,e);return n?n.value:void 0}function uo(t,e,n,r,i,o){var a=function(e,n,a){if(n!==a){for(var u=Mt(t,e),s=0;s<i;s++){var c=r[s];Ut(u,c)!==k&&o(c,u,n,a)}uo(u,n,a,r,i,o)}};(function(t,e,n){var r=K(t),i=K(e);if(r||i)return n($,r?t.length:k,i?e.length:k),m})(e,n,a)||function(t,e,n){var r=R(t),i=R(e);if(r||i){var o=r?t.length:k,a=i?e.length:k;n($,o,a);for(var u=0,s=Math.max(o||0,a||0);u<s;u++)n(P+u,r?t[u]:k,i?e[u]:k);return m}}(e,n,a)||function(t,e,n){var r=F(t),i=F(e);if(r||i){var o=lt(),a=r?t:L,u=i?e:L;if(r)for(var s in a){var c=a[s];c!==u[s]&&(o.set(s,m),n(s,c,u[s]))}if(i)for(var f in u){var p=u[f];o.get(f)===k&&p!==a[f]&&n(f,a[f],p)}}}(e,n,a)}function so(t,e,n,r,i,o){var a;for(var u in r)if(Wt(u))Ut(t,u)!==k?o(u,t,e,n):i&&(a?a.push(u):a=[u]);else{var s=Rt(u,t);if(s>=0){var c=wt(u,s),f=ao(e,c),p=ao(n,c);f!==p&&o(u,u,f,p)}}a&&uo(t,e,n,a,a.length,o)}io.prototype.get=function(){var t=this,e=t.status,n=t.watcherOptions;if(t.cache){if(2!==e)if(t.staticDeps)no(t);else{var r=t.dynamicDeps;r&&r.unwatch(n.watcher),t.dynamicDeps=k;var i=io.current;io.current=t,no(t),io.current=i,(r=t.dynamicDeps)&&r.watch(n)}}else no(t);return 2!==e&&(t.status=2),function(t){var e=t.value,n=t.output;return n?n(e):e}(t)},io.prototype.set=function(t){var e=this.setter;e?e(t):I(t)&&(this.getter=t,this.refresh())},io.prototype.refresh=function(){var t=this.value;this.status=3;var e=this.get();e!==t&&this.onChange(this.keypath,e,t)},io.prototype.addStaticDeps=function(t,e){for(var n=this.staticDeps||(this.staticDeps=new ro),r=0,i=e.length;r<i;r++)n.add(t,e[r]);n.watch(this.watcherOptions)},io.prototype.addDynamicDep=function(t,e){(this.dynamicDeps||(this.dynamicDeps=new ro)).add(t,e)};var co={watcher:N};function fo(t,e){return I(t)?(co.watcher=t,co.immediate=e===m,co):t}var po=0,lo=function(t,e,n){var r=this;r.id=po++,r.data=t||{},r.context=e||r,r.nextTask=n||new pe,r.syncEmitter=new ae,r.asyncEmitter=new ae,r.asyncOldValues={},r.asyncKeypaths={},r.onComputedChange=function(t,e,n){r.diff(t,e,n)}};lo.prototype.get=function(t,e,n){var r=this.data,i=io.current;if(t===P)return r;i&&!n&&i.addDynamicDep(this,t);var o=Qt(r,t);return o?o.value:e},lo.prototype.set=function(t,e){var n=this,r=n.data,i=function(t,e){var i,o=n.get(t);e!==o&&(Kt(t,(function(t,n,o){if(0!==n)i&&(n===o?i[t]=e:i=i[t]||(i[t]={}));else{var a=r[t];a&&a instanceof io?0===o?a.set(e):i=a.get():0===o?r[t]=e:i=r[t]||(r[t]={})}})),n.diff(t,e,o))};if(K(t))i(t,e);else if(F(t))for(var o in t)i(o,t[o])},lo.prototype.diff=function(t,e,n){var r=this,i=r.syncEmitter,o=r.asyncEmitter,a=r.asyncOldValues,u=r.asyncKeypaths,s=36!==At(t);so(t,e,n,i.listeners,s,(function(t,e,n,r){i.fire({type:t,ns:P},[n,r,e])})),so(t,e,n,o.listeners,s,(function(t,e,n,i){for(var s=o.listeners[t],c=0,f=s.length;c<f;c++)s[c].count++;u[e]||(a[e]=i,u[e]={}),u[e][t]=m,r.pending||(r.pending=m,r.nextTask.append((function(){r.pending&&r.diffAsync()})))}))},lo.prototype.diffAsync=function(){var t=this,e=t.asyncEmitter,n=t.asyncOldValues,r=t.asyncKeypaths;t.pending=k,t.asyncOldValues={},t.asyncKeypaths={};var i=function(i){var o=[t.get(i),n[i],i],a=r[i],u=o[0]!==o[1],s=function(t,e,n){if(n.count)return n.count--,u};for(var c in a)e.fire({type:c,ns:P},o,s)};for(var o in n)i(o)},lo.prototype.addComputed=function(t,e){var n,r,i,o,a,u=this,s=u.context,c=m,f=m;if(I(e))i=e.bind(s);else if(F(e)){var p=e;W(p.cache)&&(c=p.cache),W(p.sync)&&(f=p.sync),R(p.deps)&&(n=p.deps),ut(p.input)||(r=p.input),I(p.output)&&(a=p.output),I(p.get)&&(i=p.get.bind(s)),I(p.set)&&(o=p.set.bind(s))}if(i){var l=new io(t,c,f,r,a,i,o,u.onComputedChange);return c&&n&&l.addStaticDeps(u,n),u.data[t]=l}},lo.prototype.removeComputed=function(t){delete this.data[t]},lo.prototype.watch=function(t,e,n){var r=this,i=r.context,o=r.syncEmitter,a=r.asyncEmitter,u=function(t,e){var n=e.sync?o:a,u={ns:P,listener:e.watcher,ctx:i,count:0};e.once&&(u.max=1),n.on(t,u),e.immediate&&e.watcher.call(i,r.get(t),k,t)};if(K(t))u(t,fo(e,n));else for(var s in t)u(s,fo(t[s]))},lo.prototype.unwatch=function(t,e){this.syncEmitter.off(t,e),this.asyncEmitter.off(t,e)},lo.prototype.toggle=function(t){var e=!this.get(t);return this.set(t,e),e},lo.prototype.increase=function(t,e,n){var r=oo(this.get(t),0)+(e||1);if(!M(n)||r<=n)return this.set(t,r),r},lo.prototype.decrease=function(t,e,n){var r=oo(this.get(t),0)-(e||1);if(!M(n)||r>=n)return this.set(t,r),r},lo.prototype.insert=function(t,e,n){var r=this.get(t),i=(r=R(r)?r.slice():[]).length;if(n===m||n===i)r.push(e);else if(n===x||0===n)r.unshift(e);else{if(!(n>0&&n<i))return;r.splice(n,0,e)}return this.set(t,r),m},lo.prototype.append=function(t,e){return this.insert(t,e,m)},lo.prototype.prepend=function(t,e){return this.insert(t,e,x)},lo.prototype.removeAt=function(t,e){var n=this.get(t);if(R(n)&&e>=0&&e<n.length)return(n=n.slice()).splice(e,1),this.set(t,n),m},lo.prototype.remove=function(t,e){var n=this.get(t);if(R(n)&&rt(n=n.slice(),e))return this.set(t,n),m},lo.prototype.copy=function(t,e){return Zt(t,e)},lo.prototype.destroy=function(){var t=this;t.syncEmitter.off(),t.asyncEmitter.off(),t.nextTask.clear(),t.data={}},vt((function(t){return eo(dn(t)[0])}));var vo=function(t){var e=this,n=t||L;e.$emitter=new ae(m),n.events&&e.on(n.events);var r=n.data,i=n.props;n.vnode,n.propTypes;var o=n.computed,a=n.methods,u=n.watchers,s=n.extensions;e.$options=n,s&&Gt(e,s);var c=i?Zt(i):{},f=e.$observer=new lo(c,e,e.$nextTask=new pe);o&&qt(o,(function(t,e){f.addComputed(e,t)}));var p=I(r)?r.call(e,t):r;F(p)&&qt(p,(function(t,e){c[e]=t})),a&&qt(a,(function(t,n){e[n]=t})),u&&f.watch(u)};vo.define=function(t){return t},vo.use=function(t){t.install(vo)},vo.nextTick=function(t,e){pe.shared().append(t,e)},vo.compile=function(t,e){return t},vo.directive=function(t,e){},vo.transition=function(t,e){},vo.component=function(t,e){},vo.filter=function(t,e){},vo.method=function(t,e){if(K(t)&&!e)return ho[t];!function(t,e,n,r){K(e)?yo(t,e,n,r):qt(e,(function(e,n){yo(t,n,e,r)}))}(ho,t,e)},vo.prototype.get=function(t,e){return this.$observer.get(t,e)},vo.prototype.set=function(t,e){var n=this.$observer;n&&n.set(t,e)},vo.prototype.on=function(t,e){return mo(this,t,e),this},vo.prototype.once=function(t,e){return mo(this,t,e,m),this},vo.prototype.off=function(t,e){return this.$emitter.off(t,e),this},vo.prototype.fire=function(t,e,n){var r,i=this,o=i.$emitter,a=i.$parent,u=i.$children;if(Y.is(t))r=t;else if(K(t))r=new Y(t);else{var s=t;(r=new Y(s.type)).ns=s.ns}if(r.ns===k){var c=o.toEvent(r.type);r.type=c.type,r.ns=c.ns}r.target||(r.target=i);var f,p=[r];return F(e)?Q(p,e):e===m&&(n=m),(f=n&&r.target===i?m:o.fire(r,p))&&(n?u&&(r.phase=Y.PHASE_DOWNWARD,q(u,(function(t){return f=t.fire(r,e,m)}))):a&&(r.phase=Y.PHASE_UPWARD,f=a.fire(r,e))),f},vo.prototype.watch=function(t,e,n){return this.$observer.watch(t,e,n),this},vo.prototype.unwatch=function(t,e){return this.$observer.unwatch(t,e),this},vo.prototype.loadComponent=function(t,e){},vo.prototype.createComponent=function(t,e){return this},vo.prototype.directive=function(t,e){},vo.prototype.transition=function(t,e){},vo.prototype.component=function(t,e){},vo.prototype.filter=function(t,e){},vo.prototype.forceUpdate=function(t){},vo.prototype.render=function(){},vo.prototype.update=function(t,e){},vo.prototype.checkProp=function(t,e){},vo.prototype.destroy=function(){var t=this;t.$parent,t.$options;var e=t.$emitter;t.$observer.destroy(),e.off(),t.$el=k},vo.prototype.nextTick=function(t){this.$nextTask.append(t,this)},vo.prototype.toggle=function(t){return this.$observer.toggle(t)},vo.prototype.increase=function(t,e,n){return this.$observer.increase(t,e,n)},vo.prototype.decrease=function(t,e,n){return this.$observer.decrease(t,e,n)},vo.prototype.insert=function(t,e,n){return this.$observer.insert(t,e,n)},vo.prototype.append=function(t,e){return this.$observer.append(t,e)},vo.prototype.prepend=function(t,e){return this.$observer.prepend(t,e)},vo.prototype.removeAt=function(t,e){return this.$observer.removeAt(t,e)},vo.prototype.remove=function(t,e){return this.$observer.remove(t,e)},vo.prototype.copy=function(t,e){return this.$observer.copy(t,e)},vo.version="1.0.0-alpha.408",vo.is=U,vo.array=st,vo.object=Xt,vo.string=Pt,vo.logger=oe,vo.Event=Y,vo.Emitter=ae,vo.config=z;var ho=vo.prototype;function yo(t,e,n,r){r&&r.format&&(n=r.format(n)),t[e]=n}function go(t,e,n){t.$emitter.on(e.type,{listener:e.listener,ns:e.ns,max:n?1:-1,ctx:t})}function mo(t,e,n,r){var i=t.$emitter;K(e)?go(t,i.toFilter(e,n),r):R(e)?q(e,(function(e){go(t,e,r)})):qt(e,(function(e,n){go(t,i.toFilter(n,e),r)}))}return ot(Yt(ho)),vo}));
//# sourceMappingURL=yox.min.js.map