diff --git a/bower.json b/bower.json index 3adfd0e..99a7606 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "regularjs", - "version": "0.5.1", + "version": "0.5.2", "main": "dist/regular.js", "description": "reactjs + angularjs = regularjs", "authors": "@leeluolee <87399126@163.com>", diff --git a/dist/regular.js b/dist/regular.js index acd3a36..611c42d 100644 --- a/dist/regular.js +++ b/dist/regular.js @@ -1,6 +1,6 @@ /** @author leeluolee -@version 0.5.1 +@version 0.5.2 @homepage http://regularjs.github.io */ (function webpackUniversalModuleDefinition(root, factory) { @@ -147,6 +147,12 @@ return /******/ (function(modules) { // webpackBootstrap return res; } + _.some = function(list, fn){ + for(var i =0,len = list.length; i < len; i++){ + if(fn(list[i])) return true + } + } + _.varName = 'd'; _.setName = 'p_'; _.ctxName = 'c'; @@ -176,7 +182,7 @@ return /******/ (function(modules) { // webpackBootstrap // beacuse slice and toLowerCase is expensive. we handle undefined and null in another way _.typeOf = function (o) { - return o == null ? String(o) :o2str.call(o).slice(8, -1); + return o == null ? String(o) :o2str.call(o).slice(8, -1).toLowerCase(); } @@ -528,9 +534,9 @@ return /******/ (function(modules) { // webpackBootstrap _.normListener = function( events ){ var eventListeners = []; var pType = _.typeOf( events ); - if( pType === 'Array' ){ + if( pType === 'array' ){ return events; - }else if ( pType === 'Object' ){ + }else if ( pType === 'object' ){ for( var i in events ) if ( events.hasOwnProperty(i) ){ eventListeners.push({ type: i, @@ -1663,13 +1669,13 @@ return /******/ (function(modules) { // webpackBootstrap */ $bind: function(component, expr1, expr2){ var type = _.typeOf(expr1); - if( expr1.type === 'expression' || type === 'String' ){ + if( expr1.type === 'expression' || type === 'string' ){ this._bind(component, expr1, expr2) - }else if( type === "Array" ){ // multiply same path binding through array + }else if( type === "array" ){ // multiply same path binding through array for(var i = 0, len = expr1.length; i < len; i++){ this._bind(component, expr1[i]); } - }else if(type === "Object"){ + }else if(type === "object"){ for(var i in expr1) if(expr1.hasOwnProperty(i)){ this._bind(component, i, expr1[i]); } @@ -1783,11 +1789,15 @@ return /******/ (function(modules) { // webpackBootstrap if(expr.setbody && !expr.set){ var setbody = expr.setbody; - expr.set = function(ctx, value, ext){ - expr.set = new Function(_.ctxName, _.setName , _.extName, _.prefix + setbody); - return expr.set(ctx, value, ext); + var filters = expr.filters; + var self = this; + if(!filters || !_.some(filters, function(filter){ return !self._f_(filter).set }) ){ + expr.set = function(ctx, value, ext){ + expr.set = new Function(_.ctxName, _.setName , _.extName, _.prefix + setbody); + return expr.set(ctx, value, ext); + } } - expr.setbody = null; + expr.filters = expr.setbody = null; } if(expr.set){ touched.set = !ext? expr.set : function(ctx, value){ @@ -2131,7 +2141,7 @@ return /******/ (function(modules) { // webpackBootstrap if(typeof handler === 'string'){ handler = wrapHander(handler); } - if(_.typeOf(reg) === 'RegExp') reg = reg.toString().slice(1, -1); + if(_.typeOf(reg) === 'regexp') reg = reg.toString().slice(1, -1); reg = reg.replace(/\{(\w+)\}/g, replaceFn) retain = _.findSubCapture(reg) + 1; @@ -2629,7 +2639,7 @@ return /******/ (function(modules) { // webpackBootstrap var body = buffer.get || buffer; var setbody = buffer.set; - return node.expression(body, setbody, !this.depend.length); + return node.expression(body, setbody, !this.depend.length, buffer.filters); } @@ -2638,25 +2648,34 @@ return /******/ (function(modules) { // webpackBootstrap op.filter = function(){ var left = this.assign(); var ll = this.eat('|'); - var buffer = [], setBuffer, prefix, + var buffer = [], filters,setBuffer, prefix, attr = "t", set = left.set, get, tmp = ""; if(ll){ - if(set) setBuffer = []; + if(set) { + setBuffer = []; + filters = []; + } prefix = "(function(" + attr + "){"; do{ - tmp = attr + " = " + ctxName + "._f_('" + this.match('IDENT').value+ "' ).get.call( "+_.ctxName +"," + attr ; + var filterName = this.match('IDENT').value; + tmp = attr + " = " + ctxName + "._f_('" + filterName + "' ).get.call( "+_.ctxName +"," + attr ; if(this.eat(':')){ tmp +=", "+ this.arguments("|").join(",") + ");" }else{ tmp += ');' } buffer.push(tmp); - setBuffer && setBuffer.unshift( tmp.replace(" ).get.call", " ).set.call") ); + + if(set){ + // only in runtime ,we can detect whether the filter has a set function. + filters.push(filterName); + setBuffer.unshift( tmp.replace(" ).get.call", " ).set.call") ); + } }while(ll = this.eat('|')); buffer.push("return " + attr ); @@ -2671,7 +2690,9 @@ return /******/ (function(modules) { // webpackBootstrap } // the set function is depend on the filter definition. if it have set method, the set will work - return this.getset(get, set); + var ret = getset(get, set); + ret.filters = filters; + return ret; } return left; } @@ -2682,8 +2703,8 @@ return /******/ (function(modules) { // webpackBootstrap var left = this.condition(), ll; if(ll = this.eat(['=', '+=', '-=', '*=', '/=', '%='])){ if(!left.set) this.error('invalid lefthand expression in assignment expression'); - return this.getset( left.set.replace( "," + _.setName, "," + this.condition().get ).replace("'='", "'"+ll.type+"'"), left.set); - // return this.getset('(' + left.get + ll.type + this.condition().get + ')', left.set); + return getset( left.set.replace( "," + _.setName, "," + this.condition().get ).replace("'='", "'"+ll.type+"'"), left.set); + // return getset('(' + left.get + ll.type + this.condition().get + ')', left.set); } return left; } @@ -2694,7 +2715,7 @@ return /******/ (function(modules) { // webpackBootstrap var test = this.or(); if(this.eat('?')){ - return this.getset([test.get + "?", + return getset([test.get + "?", this.assign().get, this.match(":").type, this.assign().get].join("")); @@ -2710,7 +2731,7 @@ return /******/ (function(modules) { // webpackBootstrap var left = this.and(); if(this.eat('||')){ - return this.getset(left.get + '||' + this.or().get); + return getset(left.get + '||' + this.or().get); } return left; @@ -2722,7 +2743,7 @@ return /******/ (function(modules) { // webpackBootstrap var left = this.equal(); if(this.eat('&&')){ - return this.getset(left.get + '&&' + this.and().get); + return getset(left.get + '&&' + this.and().get); } return left; } @@ -2736,7 +2757,7 @@ return /******/ (function(modules) { // webpackBootstrap var left = this.relation(), ll; // @perf; if( ll = this.eat(['==','!=', '===', '!=='])){ - return this.getset(left.get + ll.type + this.equal().get); + return getset(left.get + ll.type + this.equal().get); } return left } @@ -2749,7 +2770,7 @@ return /******/ (function(modules) { // webpackBootstrap var left = this.additive(), ll; // @perf if(ll = (this.eat(['<', '>', '>=', '<=']) || this.eat('IDENT', 'in') )){ - return this.getset(left.get + ll.value + this.relation().get); + return getset(left.get + ll.value + this.relation().get); } return left } @@ -2760,7 +2781,7 @@ return /******/ (function(modules) { // webpackBootstrap op.additive = function(){ var left = this.multive() ,ll; if(ll= this.eat(['+','-']) ){ - return this.getset(left.get + ll.value + this.additive().get); + return getset(left.get + ll.value + this.additive().get); } return left } @@ -2772,7 +2793,7 @@ return /******/ (function(modules) { // webpackBootstrap op.multive = function(){ var left = this.range() ,ll; if( ll = this.eat(['*', '/' ,'%']) ){ - return this.getset(left.get + ll.type + this.multive().get); + return getset(left.get + ll.type + this.multive().get); } return left; } @@ -2784,7 +2805,7 @@ return /******/ (function(modules) { // webpackBootstrap right = this.unary(); var body = "(function(start,end){var res = [],step=end>start?1:-1; for(var i = start; end>start?i <= end: i>=end; i=i+step){res.push(i); } return res })("+left.get+","+right.get+")" - return this.getset(body); + return getset(body); } return left; @@ -2800,7 +2821,7 @@ return /******/ (function(modules) { // webpackBootstrap op.unary = function(){ var ll; if(ll = this.eat(['+','-','~', '!'])){ - return this.getset('(' + ll.type + this.unary().get + ')') ; + return getset('(' + ll.type + this.unary().get + ')') ; }else{ return this.member() } @@ -2926,14 +2947,14 @@ return /******/ (function(modules) { // webpackBootstrap this.next(); var value = "" + ll.value; var quota = ~value.indexOf("'")? "\"": "'" ; - return this.getset(quota + value + quota); + return getset(quota + value + quota); case 'NUMBER': this.next(); - return this.getset( "" + ll.value ); + return getset( "" + ll.value ); case "IDENT": this.next(); if(isKeyWord(ll.value)){ - return this.getset( ll.value ); + return getset( ll.value ); } return ll.value; default: @@ -2990,11 +3011,12 @@ return /******/ (function(modules) { // webpackBootstrap this.match('('); var res = this.filter() res.get = '(' + res.get + ')'; + res.set = res.set; this.match(')'); return res; } - op.getset = function(get, set){ + function getset(get, set){ return { get: get, set: set @@ -3045,12 +3067,13 @@ return /******/ (function(modules) { // webpackBootstrap track: track } }, - expression: function( body, setbody, constant ){ + expression: function( body, setbody, constant, filters ){ return { type: "expression", body: body, constant: constant || false, - setbody: setbody || false + setbody: setbody || false, + filters: filters } }, text: function(text){ @@ -3772,7 +3795,7 @@ return /******/ (function(modules) { // webpackBootstrap if(altGroup.destroy) altGroup.destroy(true); } - if( nType === 'Object' ) rawNewValue = newValue; + if( nType === 'object' ) rawNewValue = newValue; if(track === true){ updateSimple( newList, oldList, rawNewValue ); @@ -3835,7 +3858,7 @@ return /******/ (function(modules) { // webpackBootstrap }; function getListFromValue(value, type){ - return type === 'Array'? value: (type === 'Object'? _.keys(value) : []); + return type === 'array'? value: (type === 'object'? _.keys(value) : []); } @@ -5004,7 +5027,7 @@ return /******/ (function(modules) { // webpackBootstrap // stable watch is dirty var stableDirty = this._digest(true); - if( n > 0 && stableDirty && this.$emit) { + if( (n > 0 || stableDirty) && this.$emit) { this.$emit("$update"); if (this.devtools) { this.devtools.emit("flush", this) @@ -5069,11 +5092,11 @@ return /******/ (function(modules) { // webpackBootstrap eq = true; // !Object - if( !(tnow === 'Object' && tlast==='Object' && watcher.deep) ){ + if( !(tnow === 'object' && tlast==='object' && watcher.deep) ){ // Array - if( tnow === 'Array' && ( tlast=='undefined' || tlast === 'Array') ){ + if( tnow === 'array' && ( tlast=='undefined' || tlast === 'array') ){ diff = diffArray(now, watcher.last || [], watcher.diff) - if( tlast !== 'Array' || diff === true || diff.length ) dirty = true; + if( tlast !== 'array' || diff === true || diff.length ) dirty = true; }else{ eq = _.equals( now, last ); if( !eq || watcher.force ){ @@ -5096,7 +5119,7 @@ return /******/ (function(modules) { // webpackBootstrap } } if(dirty && !watcher.test){ - if(tnow === 'Object' && watcher.deep || tnow === 'Array'){ + if(tnow === 'object' && watcher.deep || tnow === 'array'){ watcher.last = _.clone(now); }else{ watcher.last = now; diff --git a/dist/regular.min.js b/dist/regular.min.js index f5f64d6..83762d8 100644 --- a/dist/regular.min.js +++ b/dist/regular.min.js @@ -1,3 +1,3 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Regular=e():t.Regular=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){var r=n(1),i=n(7),o=t.exports=n(8),a=o.Parser,s=o.Lexer;r.browser&&(n(24),n(27),n(28),o.dom=n(13)),o.env=r,o.util=n(2),o.parse=function(t,e){e=e||{},(e.BEGIN||e.END)&&(e.BEGIN&&(i.BEGIN=e.BEGIN),e.END&&(i.END=e.END),s.setup());var n=new a(t).parse();return e.stringify?JSON.stringify(n):n}},function(t,e,n){var r=n(2);e.svg=function(){return"undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}(),e.browser="undefined"!=typeof document&&document.nodeType,e.exprCache=r.cache(1e3),e.isRunning=!1},function(t,e,n){(function(e,r){function i(t,e){"undefined"!=typeof console&&console[e||"log"](t)}n(5)();var o=t.exports,a=n(6),s=([].slice,{}.toString),u="undefined"!=typeof window?window:e,c=9999;o.noop=function(){},o.uid=function(){var t=0;return function(){return t++}}(),o.extend=function(t,e,n){for(var r in e)e.hasOwnProperty(r)&&(void 0===t[r]||n===!0)&&(t[r]=e[r]);return t},o.keys=Object.keys?Object.keys:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e},o.varName="d",o.setName="p_",o.ctxName="c",o.extName="e",o.rWord=/^[\$\w]+$/,o.rSimpleAccessor=/^[\$\w]+(\.[\$\w]+)*$/,o.nextTick="function"==typeof r?r.bind(u):function(t){setTimeout(t,0)},o.prefix="'use strict';var "+o.varName+"="+o.ctxName+".data;"+o.extName+"="+o.extName+"||'';",o.slice=function(t,e,n){for(var r=[],i=e||0,o=n||t.length;o>i;i++)r.push(t[i]);return r},o.typeOf=function(t){return null==t?String(t):s.call(t).slice(8,-1)},o.makePredicate=function(t,e){function n(t){if(1===t.length)return r+="return str === '"+t[0]+"';";r+="switch(str){";for(var e=0;e3){i.sort(function(t,e){return e.length-t.length}),r+="switch(str.length){";for(var o=0;or;r++){var o=(t[r]||"").length;if(n+o>e)return{num:r,line:t[r],start:e-r-n,prev:t[r-1],next:t[r+1]};n+=o}}function e(t,e,n,o){var a=t.length,s=e-r;0>s&&(s=0);var u=e+i;u>a&&(u=a);var c=t.slice(s,u),f="["+(n+1)+"] "+(s>0?"..":""),h=a>u?"..":"",l=f+c+h;return o&&(l+="\n"+new Array(e-s+f.length+1).join(" ")+"^^^"),l}var n=/\r\n|[\n\r\u2028\u2029]/g,r=20,i=20;return function(r,i){i>r.length-1&&(i=r.length-1),n.lastIndex=0;var o=r.split(n),a=t(o,i),s=a.start,u=a.num;return(a.prev?e(a.prev,s,u-1)+"\n":"")+e(a.line,s,u,!0)+"\n"+(a.next?e(a.next,s,u+1)+"\n":"")}}();var f=/\((\?\!|\?\:|\?\=)/g;o.findSubCapture=function(t){var e=0,n=0,r=t.length,i=t.match(f);for(i=i?i.length:0;r--;){var o=t.charAt(r);(0===r||"\\"!==t.charAt(r-1))&&("("===o&&e++,")"===o&&n++)}if(e!==n)throw"RegExp: "+t+"'s bracket is not marched";return e-i},o.escapeRegExp=function(t){return t.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,function(t){return"\\"+t})};var h=new RegExp("&(?:(#x[0-9a-fA-F]+)|(#[0-9]+)|("+o.keys(a).join("|")+"));","gi");o.convertEntity=function(t){return(""+t).replace(h,function(t,e,n,r){var i;return i=n?parseInt(n.slice(1),10):e?parseInt(e.slice(2),16):a[r],String.fromCharCode(i)})},o.createObject=Object.create?function(t){return Object.create(t||null)}:function(){function t(){}return function(e){if(!e)return{};t.prototype=e;var n=new t;return t.prototype=null,n}}(),o.createProto=function(t,e){function n(){this.constructor=t}return n.prototype=e,t.prototype=new n},o.removeOne=function(t,e){for(var n=t.length;n--;)if(e(t[n]))return void t.splice(n,1)},o.clone=function(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t)){for(var e=[],n=0,r=t.length;r>n;n++)e[n]=t[n];return e}var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},o.equals=function(t,e){var n=typeof t;return"number"===n&&"number"==typeof e&&isNaN(t)&&isNaN(e)?!0:t===e};var l=/-([a-z])/g;o.camelCase=function(t){return t.replace(l,function(t,e){return e.toUpperCase()})},o.throttle=function(t,e){var n,r,i,e=e||100,o=null,a=0,s=function(){a=+new Date,o=null,i=t.apply(n,r),n=r=null};return function(){var u=+new Date,c=e-(u-a);return n=this,r=arguments,0>=c||c>e?(clearTimeout(o),o=null,a=u,i=t.apply(n,r),n=r=null):o||(o=setTimeout(s,c)),i}},o.escape=function(){var t=/&/g,e=//g,r=/\'/g,i=/\"/g,o=/[&<>\"\']/;return function(a){return o.test(a)?a.replace(t,"&").replace(e,"<").replace(n,">").replace(r,"'").replace(i,"""):a}}(),o.cache=function(t){t=t||1e3;var e=[],n={};return{set:function(t,r){return e.length>this.max&&(n[e.shift()]=void 0),void 0===n[t]&&e.push(t),n[t]=r,r},get:function(t){return void 0===t?n:n[t]},max:t,len:function(){return e.length}}},o.handleEvent=function(t,e){var n,r=this;return"expression"===t.type&&(n=t.get),n?function(t){r.$update(function(){var e=this.data;e.$event=t;var i=n(r);i===!1&&t&&t.preventDefault&&t.preventDefault(),e.$event=void 0})}:function(){var e=o.slice(arguments);e.unshift(t),r.$update(function(){r.$emit.apply(r,e)})}},o.once=function(t){var e=0;return function(){0===e++&&t.apply(this,arguments)}},o.fixObjStr=function(t){return 0!==t.trim().indexOf("{")?"{"+t+"}":t},o.map=function(t,e){for(var n=[],r=0,i=t.length;i>r;r++)n.push(e(t[r],r));return n},o.log=i,o.normListener=function(t){var e=[],n=o.typeOf(t);if("Array"===n)return t;if("Object"===n)for(var r in t)t.hasOwnProperty(r)&&e.push({type:r,listener:t[r]});return e},o.isVoidTag=o.makePredicate("area base br col embed hr img input keygen link menuitem meta param source track wbr r-content"),o.isBooleanAttr=o.makePredicate("selected checked disabled readonly required open autofocus controls autoplay compact loop defer multiple"),o.isExpr=function(t){return t&&"expression"===t.type},o.isGroup=function(t){return t.inject||t.$inject},o.getCompileFn=function(t,e,n){return e.$compile.bind(e,t,n)},o.fixTagAST=function(t,e){if(!t.touched){var n=t.attrs;if(n){var r=n.length;if(r){for(var i=[],a={};r--;){var s=n[r];"type"===s.name&&(s.priority=c+1);var u=e.directive(s.name);u?(s.priority=u.priority||1,s.directive=!0,i.push(s)):"attribute"===s.type&&(a[s.name]=s.value)}i.forEach(function(t){var r=e.directive(t.name),i=r.param;i&&i.length&&(t.param={},i.forEach(function(e){e in a&&(t.param[e]=void 0===a[e]?!0:a[e],o.removeOne(n,function(t){return t.name===e}))}))}),n.sort(function(t,e){var n=t.priority,r=e.priority;return null==n&&(n=c),null==r&&(r=c),r-n}),t.touched=!0}}}},o.findItem=function(t,e){if(t&&t.length)for(var n=t.length;n--;)if(e(t[n]))return t[n]},o.getParamObj=function(t,e){var n={};if(e)for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];n[r]=i&&"expression"===i.type?t.$get(i):i}return n}}).call(e,function(){return this}(),n(3).setImmediate)},function(t,e,n){(function(t,r){function i(t,e){this._id=t,this._clearFn=e}var o=n(4).nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},c=0;e.setTimeout=function(){return new i(a.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(a.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var n=c++,r=arguments.length<2?!1:s.call(arguments,1);return u[n]=!0,o(function(){u[n]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(e,n(3).setImmediate,n(3).clearImmediate)},function(t,e){function n(t){if(u===setTimeout)return setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function r(t){if(c===clearTimeout)return clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function i(){p&&h&&(p=!1,h.length?l=h.concat(l):d=-1,l.length&&o())}function o(){if(!p){var t=n(i);p=!0;for(var e=l.length;e;){for(h=l,l=[];++d1)for(var r=1;rn;n++)if(this[n]===t)return n;return-1},forEach:function(t,e){var n=0,r=Object(this),i=r.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(;i>n;){var o;n in r&&(o=r[n],t.call(e,o,n,r)),n++}},filter:function(t,e){var n=Object(this),r=n.length>>>0;if("function"!=typeof t)throw new TypeError;for(var i=[],o=0;r>o;o++)if(o in n){var a=n[o];t.call(e,a,o,n)&&i.push(a)}return i}}),n(Function.prototype,{bind:function(t){var e=this,n=r.call(arguments,1);return function(){var i=n.concat(r.call(arguments));return e.apply(t,i)}}}),n(Array,{isArray:function(t){return"[object Array]"===i.call(t)}})}},function(t,e){var n={quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,fnof:402,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,bull:8226,hellip:8230,prime:8242,Prime:8243,oline:8254,frasl:8260,weierp:8472,image:8465,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,circ:710,tilde:732,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,permil:8240,lsaquo:8249,rsaquo:8250,euro:8364};t.exports=n},function(t,e){t.exports={BEGIN:"{",END:"}",PRECOMPILE:!1}},function(t,e,n){var r=n(1),i=n(9),o=n(10),a=n(7),s=n(2),u=n(12),c={};if(r.browser){var f=n(13),h=n(15),l=n(19),p=f.doc;c=n(17)}var d=n(20),v=n(21),m=n(22),g=n(23),y=function(t,e){var n=r.isRunning;r.isRunning=!0;var i,a;t=t||{};var u="string"==typeof this.template&&!t.template;e=e||{},t.data=t.data||{},t.computed=t.computed||{},this.data&&s.extend(t.data,this.data),this.computed&&s.extend(t.computed,this.computed);var h,l=this._eventListeners||[];t.events&&(h=s.normListener(t.events),h.length&&(l=l.concat(h)),delete t.events),s.extend(this,t,!0),this.$parent&&this.$parent._append(this),this._children=[],this.$refs={},a=this.template,"string"==typeof a&&a.length<16&&(i=f.find(a))&&(a=i.innerHTML),a&&a.nodeType&&(a=a.innerHTML),"string"==typeof a&&(a=new o(a).parse(),u?this.constructor.prototype.template=a:delete this.template),this.computed=x(this.computed),this.$root=this.$root||this,l&&l.length&&l.forEach(function(t){this.$on(t.type,t.listener)}.bind(this)),this.$emit("$config"),this.config&&this.config(this.data),this.$emit("$afterConfig");var p=this._body;this._body=null,p&&p.ast&&p.ast.length&&(this.$body=s.getCompileFn(p.ast,p.ctx,{outer:this,namespace:e.namespace,extra:e.extra,record:!0})),a&&(this.group=this.$compile(a,{namespace:e.namespace}),c.node(this)),this.$parent||this.$update(),this.$ready=!0,this.$emit("$init"),this.init&&this.init(this.data),this.$emit("$afterInit"),r.isRunning=n,this.devtools&&this.devtools.emit("init",this)},E=window.__REGULAR_DEVTOOLS_GLOBAL_HOOK__;E&&(y.prototype.devtools=E),h&&(h.Regular=y),s.extend(y,{_directives:{__regexp__:[]},_plugins:{},_protoInheritCache:["directive","use"],__after__:function(t,e){var n;if(this.__after__=t.__after__,e.name&&y.component(e.name,this),n=e.template){var r,i;"string"==typeof n&&n.length<16&&(r=f.find(n))&&(n=r),n&&n.nodeType&&((i=f.attr(n,"name"))&&y.component(i,this),n=n.innerHTML),"string"==typeof n&&(this.prototype.template=a.PRECOMPILE?new o(n).parse():n)}e.computed&&(this.prototype.computed=x(e.computed)),y._inheritConfig(this,t)},directive:function(t,e){if(t){var n=typeof t;if("object"===n&&!e){for(var r in t)t.hasOwnProperty(r)&&this.directive(r,t[r]);return this}var i,o=this._directives;if(null!=e)return"function"==typeof e&&(e={link:e}),"string"===n?o[t]=e:(e.regexp=t,o.__regexp__.push(e)),this;if("string"===n){if(i=o[t])return i;for(var a=o.__regexp__,s=0,u=a.length;u>s;s++){i=a[s];var c=i.regexp.test(t);if(c)return i}}}},plugin:function(t,e){var n=this._plugins;return null==e?n[t]:(n[t]=e,this)},use:function(t){return"string"==typeof t&&(t=y.plugin(t)),"function"!=typeof t?this:(t(this,y),this)},config:function(t,e){var n=!1;if("object"==typeof t)for(var r in t)("END"===r||"BEGIN"===r)&&(n=!0),a[r]=t[r];n&&i.setup()},expression:m.expression,Parser:o,Lexer:i,_addProtoInheritCache:function(t,e){if(Array.isArray(t))return t.forEach(y._addProtoInheritCache);var n="_"+t+"s";y._protoInheritCache.push(t),y[n]={},y[t]||(y[t]=function(r,i){var o=this[n];if("object"==typeof r){for(var a in r)r.hasOwnProperty(a)&&this[t](a,r[a]);return this}return null==i?o[r]:(o[r]=e?e(i):i,this)})},_inheritConfig:function(t,e){var n=y._protoInheritCache,r=s.slice(n);return r.forEach(function(n){t[n]=e[n];var r="_"+n+"s";e[r]&&(t[r]=s.createObject(e[r]))}),t}}),u(y),y._addProtoInheritCache("component"),y._addProtoInheritCache("filter",function(t){return"function"==typeof t?{get:t}:t}),d.mixTo(y),v.mixTo(y),y.implement({init:function(){},config:function(){},destroy:function(){this.$emit("$destroy"),this._watchers=null,this.group&&this.group.destroy(!0),this.group=null,this.parentNode=null,this._children=null,this.$root=null,this._handles=null,this.$refs=null;var t=this.$parent;if(t&&t._children){var e=t._children.indexOf(this);t._children.splice(e,1)}this.$parent=null,this.devtools&&this.devtools.emit("destroy",this)},$compile:function(t,e){e=e||{},"string"==typeof t&&(t=new o(t).parse());var n,r=this.__ext__,i=e.record;e.extra&&(this.__ext__=e.extra),i&&this._record();var a=this._walk(t,e);if(i){n=this._release();var s=this;n.length&&(a.ondestroy=function(){s.$unwatch(n)})}return e.extra&&(this.__ext__=r),a},$bind:function(t,e,n){var r=s.typeOf(e);if("expression"===e.type||"String"===r)this._bind(t,e,n);else if("Array"===r)for(var i=0,o=e.length;o>i;i++)this._bind(t,e[i]);else if("Object"===r)for(var i in e)e.hasOwnProperty(i)&&this._bind(t,i,e[i]);return t.$update(),this},$unbind:function(){},$inject:c.inject,$mute:function(t){t=!!t;var e=t===!1&&this._mute;return this._mute=!!t,e&&this.$update(),this},_bind:function(t,e,n){var r=this;if(!(t&&t instanceof y))throw"$bind() should pass Regular component as first argument";if(!e)throw"$bind() should pass as least one expression to bind";if(n||(n=e),e=m.expression(e),n=m.expression(n),n.set){var i=this.$watch(e,function(e){t.$update(n,e)});t.$on("$destroy",function(){r.$unwatch(i)})}if(e.set){var o=t.$watch(n,function(t){r.$update(e,t)});this.$on("$destroy",t.$unwatch.bind(t,o))}n.set(t,e.get(this))},_walk:function(t,e){if(Array.isArray(t)){var n=t.length;if(!n)return;for(var r=[],i=0;n>i;i++){var o=this._walk(t[i],e);o&&r.push(o)}return new l(r)}return"string"==typeof t?p.createTextNode(t):h[t.type||"default"].call(this,t,e)},_append:function(t){this._children.push(t),t.$parent=this},_handleEvent:function(t,e,n,r){var i,o=this.constructor,a="function"!=typeof n?s.handleEvent.call(this,n,e):n,u=o.event(e);return u?i=u.call(this,t,a,r):f.on(t,e,a),u?i:function(){f.off(t,e,a)}},_touchExpr:function(t){var e,n=this.__ext__,r={};if("expression"!==t.type||t.touched)return t;if(e=t.get,e||(e=t.get=new Function(s.ctxName,s.extName,s.prefix+"return ("+t.body+")"),t.body=null),r.get=n?function(t){return e(t,n)}:e,t.setbody&&!t.set){var i=t.setbody;t.set=function(e,n,r){return t.set=new Function(s.ctxName,s.setName,s.extName,s.prefix+i),t.set(e,n,r)},t.setbody=null}return t.set&&(r.set=n?function(e,r){return t.set(e,r,n)}:t.set),r.type="expression",r.touched=!0,r.once=t.once||t.constant,r},_f_:function(t){var e=this.constructor,n=e.filter(t);if(!n)throw Error("filter "+t+" is undefined");return n},_sg_:function(t,e,n){if("undefined"!=typeof n){var r=this.computed,i=r[t];if(i){if("expression"!==i.type||i.get||this._touchExpr(i),i.get)return i.get(this);s.log("the computed '"+t+"' don't define the get function, get data."+t+" altnately","warn")}}return"undefined"==typeof e||"undefined"==typeof t?void 0:n&&"undefined"!=typeof n[t]?n[t]:e[t]},_ss_:function(t,e,n,r,i){var o,i=this.computed,r=r||"=",a=i?i[t]:null;if("="!==r)switch(o=a?a.get(this):n[t],r){case"+=":e=o+e;break;case"-=":e=o-e;break;case"*=":e=o*e;break;case"/=":e=o/e;break;case"%=":e=o%e}if(a){if(a.set)return a.set(this,e);s.log("the computed '"+t+"' don't define the set function, assign data."+t+" altnately","warn")}return n[t]=e,e}}),y.prototype.inject=function(){return s.log("use $inject instead of inject","error"),this.$inject.apply(this,arguments)},y.filter(g),t.exports=y;var x=function(){function t(t){return function(e){return t.call(e,e.data)}}function e(t){return function(e,n){return t.call(e,n,e.data),n}}return function(n){if(n){var r,i,o,a={};for(var s in n)r=n[s],o=typeof r,"expression"!==r.type?"string"===o?a[s]=m.expression(r):(i=a[s]={type:"expression"},"function"===o?i.get=t(r):(r.get&&(i.get=t(r.get)),r.set&&(i.set=e(r.set)))):a[s]=r;return a}}}()},function(t,e,n){function r(t){return function(e){return{type:t,value:e}}}function i(t,e){h[f.END]&&(this.markStart=h[f.END],this.markEnd=f.END),this.input=(t||"").trim(),this.opts=e||{},this.map=2!==this.opts.mode?s:u,this.states=["INIT"],e&&e.expression&&(this.states.push("JST"),this.expression=!0)}function o(t){for(var e,n,r={},i=0,o=t.length;o>i;i++)e=t[i],n=e[2]||"INIT",(r[n]||(r[n]={rules:[],links:[]})).rules.push(e);return a(r)}function a(t){function e(t,e){return"string"==typeof l[e]?c.escapeRegExp(l[e]):String(l[e]).slice(1,-1)}var n,i,o,a,s,u,f;for(var h in t){n=t[h],n.curIndex=1,i=n.rules,o=[];for(var p=0,d=i.length;d>p;p++)f=i[p],s=f[0],a=f[1],"string"==typeof a&&(a=r(a)),"RegExp"===c.typeOf(s)&&(s=s.toString().slice(1,-1)),s=s.replace(/\{(\w+)\}/g,e),u=c.findSubCapture(s)+1,n.links.push([n.curIndex,u,a]),n.curIndex+=u,o.push(s);n.TRUNK=new RegExp("^(?:("+o.join(")|(")+"))")}return t}var s,u,c=n(2),f=n(7),h={"}":"{","]":"["},l={NAME:/(?:[:_A-Za-z][-\.:_0-9A-Za-z]*)/,IDENT:/[\$_A-Za-z][_0-9A-Za-z\$]*/,SPACE:/[\r\n\t\f ]/},p=/a|(b)/.exec("a"),d=p&&void 0===p[1]?function(t){return void 0!==t}:function(t){return!!t},v=i.prototype;v.lex=function(t){t=(t||this.input).trim();var e,n,r,i,o,a=[];this.input=t,this.marks=0,this.index=0;for(var s=0;t;)s++,o=this.state(),e=this.map[o],n=e.TRUNK.exec(t),n||this.error("Unrecoginized Token"),r=n[0].length,t=t.slice(r),i=this._process.call(this,n,e,t),i&&a.push(i),this.index+=r;return a.push({type:"EOF"}),a},v.error=function(t){throw Error("Parse Error: "+t+":\n"+c.trackErrorPos(this.input,this.index))},v._process=function(t,e,n){for(var r,i=e.links,o=!1,a=i.length,s=0;a>s;s++){var u=i[s],c=u[2],f=u[0];if(d(t[f])){o=!0,c&&(r=c.apply(this,t.slice(f,f+u[1])),r&&(r.pos=this.index));break}}if(!o)switch(n.charAt(0)){case"<":this.enter("TAG");break;default:this.enter("JST")}return r},v.enter=function(t){return this.states.push(t),this},v.state=function(){var t=this.states;return t[t.length-1]},v.leave=function(t){var e=this.states;t&&e[e.length-1]!==t||e.pop()},i.setup=function(){l.END=f.END,l.BEGIN=f.BEGIN,s=o([m.ENTER_JST,m.ENTER_TAG,m.TEXT,m.TAG_NAME,m.TAG_OPEN,m.TAG_CLOSE,m.TAG_PUNCHOR,m.TAG_ENTER_JST,m.TAG_UNQ_VALUE,m.TAG_STRING,m.TAG_SPACE,m.TAG_COMMENT,m.JST_OPEN,m.JST_CLOSE,m.JST_COMMENT,m.JST_EXPR_OPEN,m.JST_IDENT,m.JST_SPACE,m.JST_LEAVE,m.JST_NUMBER,m.JST_PUNCHOR,m.JST_STRING,m.JST_COMMENT]),u=o([m.ENTER_JST2,m.TEXT,m.JST_COMMENT,m.JST_OPEN,m.JST_CLOSE,m.JST_EXPR_OPEN,m.JST_IDENT,m.JST_SPACE,m.JST_LEAVE,m.JST_NUMBER,m.JST_PUNCHOR,m.JST_STRING,m.JST_COMMENT])};var m={ENTER_JST:[/[^\x00<]*?(?={BEGIN})/,function(t){return this.enter("JST"),t?{type:"TEXT",value:t}:void 0}],ENTER_JST2:[/[^\x00]*?(?={BEGIN})/,function(t){return this.enter("JST"),t?{type:"TEXT",value:t}:void 0}],ENTER_TAG:[/[^\x00]*?(?=<[\w\/\!])/,function(t){return this.enter("TAG"),t?{type:"TEXT",value:t}:void 0}],TEXT:[/[^\x00]+/,"TEXT"],TAG_NAME:[/{NAME}/,"NAME","TAG"],TAG_UNQ_VALUE:[/[^\{}&"'=><`\r\n\f\t ]+/,"UNQ","TAG"],TAG_OPEN:[/<({NAME})\s*/,function(t,e){return{type:"TAG_OPEN",value:e}},"TAG"],TAG_CLOSE:[/<\/({NAME})[\r\n\f\t ]*>/,function(t,e){return this.leave(),{type:"TAG_CLOSE",value:e}},"TAG"],TAG_ENTER_JST:[/(?={BEGIN})/,function(){this.enter("JST")},"TAG"],TAG_PUNCHOR:[/[\>\/=&]/,function(t){return">"===t&&this.leave(),{type:t,value:t}},"TAG"],TAG_STRING:[/'([^']*)'|"([^"]*)\"/,function(t,e,n){var r=e||n||"";return{type:"STRING",value:r}},"TAG"],TAG_SPACE:[/{SPACE}+/,null,"TAG"],TAG_COMMENT:[/<\!--([^\x00]*?)--\>/,function(t){this.leave()},"TAG"],JST_OPEN:["{BEGIN}#{SPACE}*({IDENT})",function(t,e){return{type:"OPEN",value:e}},"JST"],JST_LEAVE:[/{END}/,function(t){return this.markEnd===t&&this.expression?{type:this.markEnd,value:this.markEnd}:this.markEnd&&this.marks?(this.marks--,{type:this.markEnd,value:this.markEnd}):(this.firstEnterStart=!1,this.leave("JST"),{type:"END"})},"JST"],JST_CLOSE:[/{BEGIN}\s*\/({IDENT})\s*{END}/,function(t,e){return this.leave("JST"),{type:"CLOSE",value:e}},"JST"],JST_COMMENT:[/{BEGIN}\!([^\x00]*?)\!{END}/,function(){this.leave()},"JST"],JST_EXPR_OPEN:["{BEGIN}",function(t,e){if(t===this.markStart){if(this.expression)return{type:this.markStart,value:this.markStart};if(this.firstEnterStart||this.marks)return this.marks++,this.firstEnterStart=!1,{type:this.markStart,value:this.markStart};this.firstEnterStart=!0}return{type:"EXPR_OPEN",escape:!1}},"JST"],JST_IDENT:["{IDENT}","IDENT","JST"],JST_SPACE:[/[ \r\n\f]+/,null,"JST"],JST_PUNCHOR:[/[=!]?==|[-=><+*\/%\!]?\=|\|\||&&|\@\(|\.\.|[<\>\[\]\(\)\-\|\{}\+\*\/%?:\.!,]/,function(t){return{type:t,value:t}},"JST"],JST_STRING:[/'([^']*)'|"([^"]*)"/,function(t,e,n){return{type:"STRING",value:e||n||""}},"JST"],JST_NUMBER:[/(?:[0-9]*\.[0-9]+|[0-9]+)(e\d+)?/,function(t){return{type:"NUMBER",value:parseFloat(t,10)}},"JST"]};i.setup(),t.exports=i},function(t,e,n){function r(t,e){e=e||{},this.input=t,this.tokens=new s(t,e).lex(),this.pos=0,this.length=this.tokens.length}var i=n(2),o=n(7),a=n(11),s=n(9),u=i.varName,c=i.ctxName,f=i.extName,h=i.makePredicate("STRING IDENT NUMBER"),l=i.makePredicate("true false undefined null this Array Date JSON Math NaN RegExp decodeURI decodeURIComponent encodeURI encodeURIComponent parseFloat parseInt Object"),p=r.prototype;p.parse=function(){this.pos=0;var t=this.program();return"TAG_CLOSE"===this.ll().type&&this.error("You may got a unclosed Tag"),t},p.ll=function(t){t=t||1,0>t&&(t+=1);var e=this.pos+t-1;return e>this.length-1?this.tokens[this.length-1]:this.tokens[e]},p.la=function(t){return(this.ll(t)||"").type},p.match=function(t,e){var n;return(n=this.eat(t,e))?n:(n=this.ll(),void this.error("expect ["+t+(null==e?"":":"+e)+']" -> got "['+n.type+(null==e?"":":"+n.value)+"]",n.pos))},p.error=function(t,e){throw t="\n【 parse failed 】 "+t+":\n\n"+i.trackErrorPos(this.input,"number"==typeof e?e:this.ll().pos||0),new Error(t)},p.next=function(t){t=t||1,this.pos+=t},p.eat=function(t,e){var n=this.ll();if("string"!=typeof t){for(var r=t.length;r--;)if(n.type===t[r])return this.next(),n}else if(n.type===t&&("undefined"==typeof e||n.value===e))return this.next(),n;return!1},p.program=function(){for(var t=[],e=this.ll();"EOF"!==e.type&&"TAG_CLOSE"!==e.type;)t.push(this.statement()),e=this.ll();return t},p.statement=function(){var t=this.ll();switch(t.type){case"NAME":case"TEXT":var e=t.value;for(this.next();t=this.eat(["NAME","TEXT"]);)e+=t.value;return a.text(e);case"TAG_OPEN":return this.xml();case"OPEN":return this.directive();case"EXPR_OPEN":return this.interplation();default:this.error("Unexpected token: "+this.la())}},p.xml=function(){var t,e,n,r;return t=this.match("TAG_OPEN").value,e=this.attrs(),r=this.eat("/"),this.match(">"),r||i.isVoidTag(t)||(n=this.program(),this.eat("TAG_CLOSE",t)||this.error("expect gotno matched closeTag")),a.element(t,e,n)},p.xentity=function(t){var e,n,r=t.value;if("NAME"===t.type){if(~r.indexOf(".")){var i=r.split(".");r=i[0],n=i[1]}return this.eat("=")&&(e=this.attvalue(n)),a.attribute(r,e,n)}return"if"!==r&&this.error("current version. ONLY RULE #if #else #elseif is valid in tag, the rule #"+r+" is invalid"),this["if"](!0)},p.attrs=function(t){var e;e=t?["NAME"]:["NAME","OPEN"];for(var n,r=[];n=this.eat(e);)r.push(this.xentity(n));return r},p.attvalue=function(t){var e=this.ll();switch(e.type){case"NAME":case"UNQ":case"STRING":this.next();var n=e.value;if(~n.indexOf(o.BEGIN)&&~n.indexOf(o.END)&&"cmpl"!==t){var i=!0,s=new r(n,{mode:2}).parse();if(1===s.length&&"expression"===s[0].type)return s[0];var u=[];s.forEach(function(t){t.constant||(i=!1),u.push(t.body||"'"+t.text.replace(/'/g,"\\'")+"'")}),u="["+u.join(",")+"].join('')",n=a.expression(u,null,i)}return n;case"EXPR_OPEN":return this.interplation();default:this.error("Unexpected token: "+this.la())}},p.directive=function(){var t=this.ll().value;return this.next(),"function"==typeof this[t]?this[t]():void this.error("Undefined directive["+t+"]")},p.interplation=function(){this.match("EXPR_OPEN");var t=this.expression(!0);return this.match("END"),t},p.inc=p.include=function(){var t=this.expression();return this.match("END"),a.template(t)},p["if"]=function(t){var e=this.expression(),n=[],r=[],i=n,o=t?"attrs":"statement";this.match("END");for(var s,u;!(u=this.eat("CLOSE"));)if(s=this.ll(),"OPEN"===s.type)switch(s.value){case"else":i=r,this.next(),this.match("END");break;case"elseif":return this.next(),r.push(this["if"](t)),a["if"](e,n,r);default:i.push(this[o](!0))}else i.push(this[o](!0));return"if"!==u.value&&this.error("Unmatched if directive"),a["if"](e,n,r)},p.list=function(){var t,e,n,r=this.expression(),i=[],o=[],s=i;for(this.match("IDENT","as"),t=this.match("IDENT").value,this.eat("IDENT","by")&&(this.eat("IDENT",t+"_index")?n=!0:(n=this.expression(),n.constant&&(n=!0))),this.match("END");!(e=this.eat("CLOSE"));)this.eat("OPEN","else")?(s=o,this.match("END")):s.push(this.statement());return"list"!==e.value&&this.error("expect list got /"+e.value+" ",e.pos),a.list(r,t,i,o,n)},p.expression=function(){var t;return this.eat("@(")?(t=this.expr(),t.once=!0,this.match(")")):t=this.expr(),t},p.expr=function(){this.depend=[];var t=this.filter(),e=t.get||t,n=t.set;return a.expression(e,n,!this.depend.length)},p.filter=function(){var t,e,n,r=this.assign(),o=this.eat("|"),a=[],s="t",u=r.set,f="";if(o){u&&(t=[]),e="(function("+s+"){";do f=s+" = "+c+"._f_('"+this.match("IDENT").value+"' ).get.call( "+i.ctxName+","+s,f+=this.eat(":")?", "+this.arguments("|").join(",")+");":");",a.push(f),t&&t.unshift(f.replace(" ).get.call"," ).set.call"));while(o=this.eat("|"));return a.push("return "+s),t&&t.push("return "+s),n=e+a.join("")+"})("+r.get+")",t&&(u=u.replace(i.setName,e+t.join("")+"})("+i.setName+")")),this.getset(n,u)}return r},p.assign=function(){var t,e=this.condition();return(t=this.eat(["=","+=","-=","*=","/=","%="]))?(e.set||this.error("invalid lefthand expression in assignment expression"),this.getset(e.set.replace(","+i.setName,","+this.condition().get).replace("'='","'"+t.type+"'"),e.set)):e},p.condition=function(){var t=this.or();return this.eat("?")?this.getset([t.get+"?",this.assign().get,this.match(":").type,this.assign().get].join("")):t},p.or=function(){var t=this.and();return this.eat("||")?this.getset(t.get+"||"+this.or().get):t},p.and=function(){var t=this.equal();return this.eat("&&")?this.getset(t.get+"&&"+this.and().get):t},p.equal=function(){var t,e=this.relation();return(t=this.eat(["==","!=","===","!=="]))?this.getset(e.get+t.type+this.equal().get):e},p.relation=function(){var t,e=this.additive();return(t=this.eat(["<",">",">=","<="])||this.eat("IDENT","in"))?this.getset(e.get+t.value+this.relation().get):e},p.additive=function(){var t,e=this.multive();return(t=this.eat(["+","-"]))?this.getset(e.get+t.value+this.additive().get):e},p.multive=function(){var t,e=this.range();return(t=this.eat(["*","/","%"]))?this.getset(e.get+t.type+this.multive().get):e},p.range=function(){var t,e,n=this.unary();if(t=this.eat("..")){e=this.unary();var r="(function(start,end){var res = [],step=end>start?1:-1; for(var i = start; end>start?i <= end: i>=end; i=i+step){res.push(i); } return res })("+n.get+","+e.get+")";return this.getset(r)}return n},p.unary=function(){var t;return(t=this.eat(["+","-","~","!"]))?this.getset("("+t.type+this.unary().get+")"):this.member()},p.member=function(t,e,n,r){ -var o,a,s,l=!1;if(t)"string"==typeof e&&h(e)?n.push(e):(n&&n.length&&this.depend.push(n),n=null);else{a=this.primary();var p=typeof a;"string"===p?(n=[],n.push(a),e=a,s=f+"."+a,t=c+"._sg_('"+a+"', "+u+", "+f+")",l=!0):"this"===a.get?(t=c,n=["this"]):(n=null,t=a.get)}if(o=this.eat(["[",".","("]))switch(o.type){case".":var d=this.match("IDENT").value;return r=t,"("!==this.la()?t=c+"._sg_('"+d+"', "+t+")":t+="['"+d+"']",this.member(t,d,n,r);case"[":return a=this.assign(),r=t,"("!==this.la()?t=c+"._sg_("+a.get+", "+t+")":t+="["+a.get+"]",this.match("]"),this.member(t,a,n,r);case"(":var v=this.arguments().join(",");return t=t+"("+v+")",this.match(")"),this.member(t,null,n)}n&&n.length&&this.depend.push(n);var m={get:t};return e&&(m.set=c+"._ss_("+(e.get?e.get:"'"+e+"'")+","+i.setName+","+(r?r:i.varName)+", '=', "+(l?1:0)+")"),m},p.arguments=function(t){t=t||")";var e=[];do this.la()!==t&&e.push(this.assign().get);while(this.eat(","));return e},p.primary=function(){var t=this.ll();switch(t.type){case"{":return this.object();case"[":return this.array();case"(":return this.paren();case"STRING":this.next();var e=""+t.value,n=~e.indexOf("'")?'"':"'";return this.getset(n+e+n);case"NUMBER":return this.next(),this.getset(""+t.value);case"IDENT":return this.next(),l(t.value)?this.getset(t.value):t.value;default:this.error("Unexpected Token: "+t.type)}},p.object=function(){for(var t=[this.match("{").type],e=this.eat(["STRING","IDENT","NUMBER"]);e;){t.push("'"+e.value+"'"+this.match(":").type);var n=this.assign().get;t.push(n),e=null,this.eat(",")&&(e=this.eat(["STRING","IDENT","NUMBER"]))&&t.push(",")}return t.push(this.match("}").type),{get:t.join("")}},p.array=function(){var t,e=[this.match("[").type];if(this.eat("]"))e.push("]");else{for(;(t=this.assign())&&(e.push(t.get),this.eat(","));)e.push(",");e.push(this.match("]").type)}return{get:e.join("")}},p.paren=function(){this.match("(");var t=this.filter();return t.get="("+t.get+")",this.match(")"),t},p.getset=function(t,e){return{get:t,set:e}},t.exports=r},function(t,e){t.exports={element:function(t,e,n){return{type:"element",tag:t,attrs:e,children:n}},attribute:function(t,e,n){return{type:"attribute",name:t,value:e,mdf:n}},"if":function(t,e,n){return{type:"if",test:t,consequent:e,alternate:n}},list:function(t,e,n,r,i){return{type:"list",sequence:t,alternate:r,variable:e,body:n,track:i}},expression:function(t,e,n){return{type:"expression",body:t,constant:n||!1,setbody:e||!1}},text:function(t){return{type:"text",text:t}},template:function(t){return{type:"template",content:t}}}},function(t,e,n){function r(t,e,n){return function(){var r=this.supr;this.supr=n[t];var i=e.apply(this,arguments);return this.supr=r,i}}function i(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(u[i]&&u[i](e[i],t,n),t[i]=s(e[i])&&s(n[i])&&a.test(e[i])?r(i,e[i],n):e[i])}var o=n(2),a=/xy/.test(function(){"xy"})?/\bsupr\b/:/.*/,s=function(t){return"function"==typeof t},u={events:function(t,e){var n=e._eventListeners||[],r=o.normListener(t);r.length&&(e._eventListeners=n.concat(r)),delete e.events}},c=["data","computed"],f=c.length;t.exports=function h(t){function e(){a.apply(this,arguments)}function n(t){for(var e=f;e--;){var n=c[e];r[n]&&t.hasOwnProperty(n)&&r.hasOwnProperty(n)&&(o.extend(r[n],t[n],!0),delete t[n])}return i(r,t,s),this}t=t||{};var r,a=this,s=a&&a.prototype||{};return"function"==typeof t?(r=t.prototype,t.implement=n,t.extend=h,t):(r=o.createProto(e,s),e.implement=n,e.implement(t),a.__after__&&a.__after__.call(e,a,t),e.extend=h,e)}},function(t,e,n){function r(t){return(""+t).replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()})}function i(t,e){return"change"===e&&u.msie<9&&t&&t.tagName&&"input"===t.tagName.toLowerCase()&&("checkbox"===t.type||"radio"===t.type)?"click":e}function o(t){if(t=t||window.event,t._fixed)return t;this.event=t,this.target=t.target||t.srcElement;var e=this.type=t.type,n=this.button=t.button;if(m.test(e)&&(this.pageX=null!=t.pageX?t.pageX:t.clientX+g.scrollLeft,this.pageY=null!=t.pageX?t.pageY:t.clientY+g.scrollTop,"mouseover"===e||"mouseout"===e)){for(var r=t.relatedTarget||t[("mouseover"===e?"from":"to")+"Element"];r&&3===r.nodeType;)r=r.parentNode;this.relatedTarget=r}("DOMMouseScroll"===e||"mousewheel"===e)&&(this.wheelDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3),this.which=t.which||t.keyCode,this.which||void 0===n||(this.which=1&n?1:2&n?3:4&n?2:0),this._fixed=!0}var a,s,u=t.exports,c=n(1),f=n(2),h=n(14),l=document.createElement("div"),p=function(){},d=h.NAMESPACE;u.body=document.body,u.doc=document,u.tNode=l,l.addEventListener?(a=function(t,e,n){t.addEventListener(e,n,!1)},s=function(t,e,n){t.removeEventListener(e,n,!1)}):(a=function(t,e,n){t.attachEvent("on"+e,n)},s=function(t,e,n){t.detachEvent("on"+e,n)}),u.msie=parseInt((/msie (\d+)/.exec(navigator.userAgent.toLowerCase())||[])[1]),isNaN(u.msie)&&(u.msie=parseInt((/trident\/.*; rv:(\d+)/.exec(navigator.userAgent.toLowerCase())||[])[1])),u.find=function(t){if(document.querySelector)try{return document.querySelector(t)}catch(e){}return-1!==t.indexOf("#")?document.getElementById(t.slice(1)):void 0},u.inject=function(t,e,n){if(n=n||"bottom",t){if(Array.isArray(t)){var r=t;t=u.fragment();for(var i=0,o=r.length;o>i;i++)t.appendChild(r[i])}var a,s;switch(n){case"bottom":e.appendChild(t);break;case"top":(a=e.firstChild)?e.insertBefore(t,e.firstChild):e.appendChild(t);break;case"after":(s=e.nextSibling)?s.parentNode.insertBefore(t,s):e.parentNode.appendChild(t);break;case"before":e.parentNode.insertBefore(t,e)}}},u.id=function(t){return document.getElementById(t)},u.create=function(t,e,n){if("svg"===e){if(!c.svg)throw Error("the env need svg support");e=d.svg}return e?document.createElementNS(e,t):document.createElement(t)},u.fragment=function(){return document.createDocumentFragment()};var v={"class":function(t,e){"className"in t&&(!t.namespaceURI||t.namespaceURI===d.html)?t.className=e||"":t.setAttribute("class",e)},"for":function(t,e){"htmlFor"in t?t.htmlFor=e:t.setAttribute("for",e)},style:function(t,e){t.style?t.style.cssText=e:t.setAttribute("style",e)},value:function(t,e){t.value=null!=e?e:""}};u.attr=function(t,e,n){if(f.isBooleanAttr(e)){if("undefined"==typeof n)return t[e]||(t.attributes.getNamedItem(e)||p).specified?e:void 0;n?(t[e]=!0,t.setAttribute(e,e),u.msie&&u.msie<=7&&"checked"===e&&(t.defaultChecked=!0)):(t[e]=!1,t.removeAttribute(e))}else if("undefined"!=typeof n)v[e]?v[e](t,n):null===n?t.removeAttribute(e):t.setAttribute(e,n);else if(t.getAttribute){var r=t.getAttribute(e,2);return null===r?void 0:r}},u.on=function(t,e,n){var r=e.split(" ");return n.real=function(e){var r=new o(e);r.origin=t,n.call(t,r)},r.forEach(function(e){e=i(t,e),a(t,e,n.real)}),u},u.off=function(t,e,n){var r=e.split(" ");n=n.real||n,r.forEach(function(e){e=i(t,e),s(t,e,n)})},u.text=function(){var t={};return u.msie&&u.msie<9?(t[1]="innerText",t[3]="nodeValue"):t[1]=t[3]="textContent",function(e,n){var r=t[e.nodeType];return null==n?r?e[r]:"":void(e[r]=n)}}(),u.html=function(t,e){return"undefined"==typeof e?t.innerHTML:void(t.innerHTML=e)},u.replace=function(t,e){e.parentNode&&e.parentNode.replaceChild(t,e)},u.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)},u.css=function(t,e,n){if("object"==typeof e&&e)for(var i in e)e.hasOwnProperty(i)&&u.css(t,i,e[i]);else{if("undefined"==typeof n){var o;return u.msie<=8&&(o=t.currentStyle&&t.currentStyle[e],""===o&&(o="auto")),o=o||t.style[e],u.msie<=8&&(o=""===o?void 0:o),o}e=r(e),e&&(t.style[e]=n)}},u.addClass=function(t,e){var n=t.className||"";-1===(" "+n+" ").indexOf(" "+e+" ")&&(t.className=n?n+" "+e:e)},u.delClass=function(t,e){var n=t.className||"";t.className=(" "+n+" ").replace(" "+e+" "," ").trim()},u.hasClass=function(t,e){var n=t.className||"";return-1!==(" "+n+" ").indexOf(" "+e+" ")};var m=/^(?:click|dblclick|contextmenu|DOMMouseScroll|mouse(?:\w+))$/,g=document;g=g.compatMode&&"CSS1Compat"!==g.compatMode?g.body:g.documentElement,f.extend(o.prototype,{stop:function(){this.preventDefault().stopPropagation()},preventDefault:function(){return this.event.preventDefault?this.event.preventDefault():this.event.returnValue=!1,this},stopPropagation:function(){return this.event.stopPropagation?this.event.stopPropagation():this.event.cancelBubble=!0,this},stopImmediatePropagation:function(){this.event.stopImmediatePropagation&&this.event.stopImmediatePropagation()}}),u.nextFrame=function(){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)},e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||function(t){clearTimeout(t)};return function(n){var r=t(n);return function(){e(r)}}}();var y;u.nextReflow=u.msie?function(t){return u.nextFrame(function(){y=document.body.offsetWidth,t()})}:u.nextFrame},function(t,e){t.exports={COMPONENT_TYPE:1,ELEMENT_TYPE:2,NAMESPACE:{html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"},OPTIONS:{STABLE_INIT:{stable:!0,init:!0},FORCE_INIT:{force:!0,init:!0},STABLE:{stable:!0},INIT:{init:!0},SYNC:{sync:!0},FORCE:{force:!0}}}},function(t,e,n){function r(t,e,n){for(var r=1;e>=r;r++){var i=n[t+r];i&&i.destroy(!0)}n.splice(t+1,e)}function i(t,e){return"Array"===e?t:"Object"===e?h.keys(t):[]}function o(t,e,n){for(var r=[],i=0,o=t.length;o>i;i++){var a=this._walk(t[i],{element:e,fromElement:!0,attrs:t,extra:n});a&&r.push(a)}return r}var a=n(16).diffArray,s=n(17),u=n(18),c=(n(11),n(19)),f=n(13),h=n(2),l=n(14),p=l.OPTIONS,d=t.exports={};d.list=function(t,e){function n(n,r,i,a){for(var c=n;r>c;c++){var f=i[c],l=h.createObject(x);o(l,c,f,a);var p=T.$compile(t.body,{extra:l,namespace:E,record:!0,outer:e.outer});p.data=l;var d=s.last(_.get(c));d.parentNode&&u.inject(s.node(p),d,"after"),N.splice(c+1,0,p)}}function o(t,e,n,r){t[w]=e,r?(t[b]=n,t[$]=r[n]):(t[$]=n,t[b]=null)}function f(t,e,n,r){for(var i=t;e>i;i++){var a=_.get(i+1),s=n[i];o(a.data,i,s,r)}}function l(t,e,i,o){var s=0,u=t.length;if(i||0===u&&0===e.length||(i=a(t,e,!0)),i&&i.length){for(var c=0;cy;)m(t[l],l)!==m(p[0],l)&&(r(l,1,N),n(l,l+1,t,o)),p.shift(),d--,l++,y++;v=p.length}f(s,l,t,o),r(l,v,N),n(l,l+d,t,o),s=l+d-v,s=0>s?0:s}if(u>s)for(var c=s;u>c;c++){var E=_.get(c+1);E.data[w]=c}}}function p(t,e,i){var o=t.length,a=e.length,s=Math.min(o,a);f(0,s,t,i),a>o?r(o,a-o,N):o>a&&n(a,o,t,i)}function v(t,n,r){var o,a=h.typeOf(t),c=h.typeOf(n),f=i(t,a),d=i(n,c),v=f&&f.length,m=d&&d.length;if(!m&&v&&_.get(1)){var g=N.pop();g.destroy&&g.destroy(!0)}if("Object"===a&&(o=t),S===!0?p(f,d,o):l(f,d,r,o),!v&&A&&A.length){var w=T.$compile(A,{extra:x,record:!0,outer:e.outer,namespace:E});N.push(w),y.parentNode&&u.inject(s.node(w),y,"after")}}var m,g,y=(d.Regular,document.createComment("Regular list")),E=e.namespace,x=e.extra,T=this,_=new c([y]),N=_.children,w=t.variable+"_index",b=t.variable+"_key",$=t.variable,A=t.alternate,S=t.track;return S&&S!==!0&&(S=this._touchExpr(S),g=h.createObject(x),m=function(t,e){return g[$]=t,g[w]=e,S.get(T,g)}),this.$watch(t.sequence,v,{init:!0,diff:S!==!0,deep:!0}),_},d.template=function(t,e){var n,n,r=t.content,i=document.createComment("inlcude"),o=e.namespace,a=e.extra,s=new c([i]);if(r){var u=this;this.$watch(r,function(t){var r=s.get(1),c=typeof t;r&&(r.destroy(!0),s.children.pop()),t&&(s.push(n="function"===c?t():u.$compile("object"!==c?String(t):t,{record:!0,outer:e.outer,namespace:o,extra:a})),i.parentNode&&n.$inject(i,"before"))},p.INIT)}return s};var v=0;d["if"]=function(t,e){var n,r,i=this,o=e.extra;if(e&&e.element){var a=function(a){a?(r&&s.destroy(r),t.consequent&&(n=i.$compile(t.consequent,{record:!0,element:e.element,extra:o}))):(n&&s.destroy(n),t.alternate&&(r=i.$compile(t.alternate,{record:!0,element:e.element,extra:o})))};return this.$watch(t.test,a,p.FORCE),{destroy:function(){n?s.destroy(n):r&&s.destroy(r)}}}var n,r,f=document.createComment("Regular if"+v++),h=new c;h.push(f);var l=null,d=e.namespace,a=function(a,c){var p=!!a;p!==l&&(l=p,h.children[1]&&(h.children[1].destroy(!0),h.children.pop()),p?t.consequent&&t.consequent.length&&(n=i.$compile(t.consequent,{record:!0,outer:e.outer,namespace:d,extra:o}),h.push(n),f.parentNode&&u.inject(s.node(n),f,"before")):t.alternate&&t.alternate.length&&(r=i.$compile(t.alternate,{record:!0,outer:e.outer,namespace:d,extra:o}),h.push(r),f.parentNode&&u.inject(s.node(r),f,"before")))};return this.$watch(t.test,a,p.FORCE_INIT),h},d.expression=function(t,e){var n=document.createTextNode("");return this.$watch(t,function(t){f.text(n,null==t?"":String(t))},p.STABLE_INIT),n},d.text=function(t,e){var n=t.text,r=document.createTextNode(-1!==n.indexOf("&")?h.convertEntity(n):n);return r};var m=/^on-(.+)$/;d.element=function(t,e){var n,r,i=t.attrs,a=this.constructor,c=t.children,l=e.namespace,p=e.extra,v=t.tag,m=a.component(v);if("r-content"===v)return h.log("r-content is deprecated, use {#inc this.$body} instead (`{#include}` as same)","warn"),this.$body&&this.$body();if(m||"r-component"===v)return e.Component=m,d.component.call(this,t,e);"svg"===v&&(l="svg"),c&&c.length&&(n=this.$compile(c,{outer:e.outer,namespace:l,extra:p})),r=f.create(v,l,i),n&&!h.isVoidTag(v)&&f.inject(s.node(n),r),h.fixTagAST(t,a);var g=o.call(this,i,r,p);return{type:"element",group:n,node:function(){return r},last:function(){return r},destroy:function(t){t?u.remove(r,n?n.destroy.bind(n):h.noop):n&&n.destroy(),g.length&&g.forEach(function(t){t&&("function"==typeof t.destroy?t.destroy():t())})}}},d.component=function(t,e){for(var n,r,i,o,a=t.attrs,u=e.Component,f=this.constructor,l=e.extra,d=e.namespace,v=this,g={},y=0,E=a.length;E>y;y++){var x=a[y],T=this._touchExpr(void 0===x.value?!0:x.value);T.constant&&(T=x.value=T.get(this)),x.value&&x.value.constant===!0&&(T=T.get(this));var _=x.name;if(!x.event){var N=_.match(m);N&&(x.event=N[1])}if("cmpl"===x.mdf&&(T=h.getCompileFn(T,this,{record:!0,namespace:d,extra:l,outer:e.outer})),"is"===_&&!u){i=T;var w=this.$get(T,!0);if(u=f.component(w),"function"!=typeof u)throw new Error("component "+w+" has not registed!")}var b;(b=x.event)?(o=o||{},o[b]=h.handleEvent.call(this,T,b)):(_=x.name=h.camelCase(_),T&&"expression"===T.type?g[_]=T.get(v):g[_]=T,"ref"===_&&null!=T&&(r=T),"isolate"===_&&(n="expression"===T.type?T.get(v):parseInt(T===!0?3:T,10),g.isolate=n))}var $,A={data:g,events:o,$parent:2&n?null:this,$root:this.$root,$outer:e.outer,_body:{ctx:this,ast:t.children}},e={namespace:d,extra:e.extra},S=new u(A,e);r&&this.$refs&&($=u.directive("ref").link,this.$on("$destroy",$.call(this,S,r))),r&&v.$refs&&(v.$refs[r]=S);for(var y=0,E=a.length;E>y;y++){var x=a[y],T=x.value||!0,_=x.name;"expression"!==T.type||x.event||(T=v._touchExpr(T),2&n||this.$watch(T,function(t,e){this.data[t]=e}.bind(S,_),p.SYNC),!T.set||1&n||S.$watch(_,v.$update.bind(v,T),p.INIT))}if(i&&"expression"===i.type){var O=new c;return O.push(S),this.$watch(i,function(t){var e=f.component(t);if(!e)throw new Error("component "+t+" has not registed!");var n=new e(A),i=O.children.pop();O.push(n),n.$inject(s.last(i),"after"),i.destroy(),r&&(v.$refs[r]=n)},p.SYNC),O}return S},d.attribute=function(t,e){var n=t,r=n.name,i=n.value||"",o=i.constant,a=this.constructor,s=a.directive(r),u=e.element,c=this;if(i=this._touchExpr(i),o&&(i=i.get(this)),s&&s.link){var l={attrs:e.attrs,param:h.getParamObj(this,n.param)},d=s.link.call(c,u,i,r,l);return"function"==typeof s.update&&(h.isExpr(i)?this.$watch(i,function(t,e){s.update.call(c,u,t,e,l)}):s.update.call(c,u,i,void 0,l)),"function"==typeof d&&(d={destroy:d}),d}return"expression"===i.type?this.$watch(i,function(t,e){f.attr(u,r,t)},p.STABLE_INIT):h.isBooleanAttr(r)?f.attr(u,r,!0):f.attr(u,r,i),e.fromElement?void 0:{destroy:function(){f.attr(u,r,null)}}}},function(t,e,n){function r(t,e){var n=t.length,r=e.length;if(n!==r)return!0;for(var i=0;n>i;i++)if(t[i]!==e[i])return!0;return!1}function i(t,e){return t===e}function o(t,e,n){for(var r=t.length,o=e.length,n=n||i,a=[],s=0;r>=s;s++)a.push([s]);for(var u=1;o>=u;u++)a[0][u]=u;for(var s=1;r>=s;s++)for(var u=1;o>=u;u++)n(t[s-1],e[u-1])?a[s][u]=a[s-1][u-1]:a[s][u]=Math.min(a[s-1][u]+1,a[s][u-1]+1);return a}function a(t,e,n,i){if(!n)return r(t,e);for(var a=o(e,t,i),s=e.length,u=s,c=t.length,f=c,h=[],l=a[u][f];u>0||f>0;)if(0!==u)if(0!==f){var p=a[u-1][f-1],d=a[u-1][f],v=a[u][f-1],m=Math.min(v,d,p);m===d?(h.unshift(2),u--,l=d):m===p?(p===l?h.unshift(0):(h.unshift(1),l=p),u--,f--):(h.unshift(3),f--,l=v)}else h.unshift(2),u--;else h.unshift(3),f--;var g=0,y=3,E=2,x=1,s=0;c=0;for(var T=[],_={index:null,add:0,removed:[]},u=0;u0?null===_.index&&(_.index=c):null!=_.index&&(T.push(_),_={index:null,add:0,removed:[]}),h[u]){case g:s++,c++;break;case y:_.add++,c++;break;case E:_.removed.push(e[s]),s++;break;case x:_.add++,_.removed.push(e[s]),s++,c++}return null!=_.index&&T.push(_),T}function s(t,e,n){if(n){var r=u.keys(t),i=u.keys(e);return a(r,i,n,function(n,r){return t[r]===e[n]})}for(var o in t)if(e[o]!==t[o])return!0;for(var s in e)if(e[s]!==t[s])return!0;return!1}var u=n(2);t.exports={diffArray:a,diffObject:s}},function(t,e,n){var r=n(13),i=n(18),o=t.exports={node:function(t){var e,n;if(t){if("function"==typeof t.node)return t.node();if("number"==typeof t.nodeType)return t;if(t.group)return o.node(t.group);if(t=t.children||t,Array.isArray(t)){var r=t.length;if(1===r)return o.node(t[0]);n=[];for(var i=0,r=t.length;r>i;i++)e=o.node(t[i]),Array.isArray(e)?n.push.apply(n,e):e&&n.push(e);return n}}},inject:function(t,e){var n=this,a=o.node(n.group||n);if(t===!1)return i.remove(a),n;if(!a)return n;if("string"==typeof t&&(t=r.find(t)),!t)throw Error("injected node is not found");if(i.inject(a,t,e),n.$emit){var s=n.parentNode,u="after"===e||"before"===e?t.parentNode:t;n.parentNode=u,n.$emit("$inject",t,e,s)}return n},last:function(t){var e=t.children;return"function"==typeof t.last?t.last():"number"==typeof t.nodeType?t:e&&e.length?o.last(e[e.length-1]):t.group?o.last(t.group):void 0},destroy:function(t,e){if(t){if("number"==typeof t.nodeType)return e&&r.remove(t);if("function"==typeof t.destroy)return t.destroy(e);if(Array.isArray(t))for(var n=0,i=t.length;i>n;n++)o.destroy(t[n],e)}}};r.element=function(t,e){if(!t)return e?[]:null;var n=o.node(t);if(1===n.nodeType)return e?[n]:n;for(var r=[],i=0;in&&(n=e)}),n):0}var a=n(2),s=n(13),u={},c=n(1),f="transitionend",h="animationend",l="transition",p="animation";"ontransitionend"in window||("onwebkittransitionend"in window?(f+=" webkitTransitionEnd",l="webkitTransition"):("onotransitionend"in s.tNode||"Opera"===navigator.appName)&&(f+=" oTransitionEnd",l="oTransition")),"onanimationend"in window||("onwebkitanimationend"in window?(h+=" webkitAnimationEnd",p="webkitAnimation"):"onoanimationend"in s.tNode&&(h+=" oAnimationEnd",p="oAnimation")),u.inject=function(t,e,n,r){if(r=r||a.noop,Array.isArray(t)){for(var i=s.fragment(),o=0,u=0,c=t.length;c>u;u++)i.appendChild(t[u]);s.inject(i,e,n);var f=function(){o++,o===c&&r()};for(c===o&&r(),u=0;c>u;u++)t[u].onenter?t[u].onenter(f):f()}else s.inject(t,e,n),t.onenter?t.onenter(r):r()},u.remove=function(t,e){function n(){i++,i===a&&e&&e()}if(t){var i=0;if(Array.isArray(t))for(var o=0,a=t.length;a>o;o++)u.remove(t[o],n);else"function"==typeof t.onleave?t.onleave(function(){r(t,e)}):r(t,e)}},u.startClassAnimate=function(t,e,n,r){var o,u,l,p;return!h&&!f||c.isRunning?n():(p=4!==r?a.once(function(){l&&clearTimeout(l),2===r&&s.delClass(t,o),3!==r&&s.delClass(t,e),s.off(t,h,p),s.off(t,f,p),n()}):a.once(function(){l&&clearTimeout(l),n()}),2===r?(s.addClass(t,e),o=a.map(e.split(/\s+/),function(t){return t+"-active"}).join(" "),s.nextReflow(function(){s.addClass(t,o),u=i(t),l=setTimeout(p,u)})):4===r?s.nextReflow(function(){s.delClass(t,e),u=i(t),l=setTimeout(p,u)}):s.nextReflow(function(){s.addClass(t,e),u=i(t),l=setTimeout(p,u)}),s.on(t,h,p),s.on(t,f,p),p)},u.startStyleAnimate=function(t,e,n){var r,o,u;return s.nextReflow(function(){s.css(t,e),r=i(t),u=setTimeout(o,r)}),o=a.once(function(){u&&clearTimeout(u),s.off(t,h,o),s.off(t,f,o),n()}),s.on(t,h,o),s.on(t,f,o),o},t.exports=u},function(t,e,n){function r(t){this.children=t||[]}var i=n(2),o=n(17),a=i.extend(r.prototype,{destroy:function(t){o.destroy(this.children,t),this.ondestroy&&this.ondestroy(),this.children=null},get:function(t){return this.children[t]},push:function(t){this.children.push(t)}});a.inject=a.$inject=o.inject,t.exports=r},function(t,e,n){function r(){}var i=n(2),o={$on:function(t,e,n){if("object"==typeof t&&t)for(var r in t)this.$on(r,t[r],e);else{n=n||{};var i,o=this,a=o._handles||(o._handles={}),s=a[t]||(a[t]=[]);n.once&&(i=function(){e.apply(this,arguments),this.$off(t,e)},e.real=i),s.push(i||e)}return this},$off:function(t,e){var n=this;if(n._handles){t||(this._handles={});var r,i=n._handles;if(r=i[t]){if(!e)return i[t]=[],n;e=e.real||e;for(var o=0,a=r.length;a>o;o++)if(e===r[o])return r.splice(o,1),n}return n}},$emit:function(t){var e,n,r,o=this,a=o._handles;if(t){var n=i.slice(arguments,1),r=t;if(!a)return o;if(e=a[r.slice(1)])for(var s=0,u=e.length;u>s;s++)e[s].apply(o,n);if(!(e=a[r]))return o;for(var c=0,u=e.length;u>c;c++)e[c].apply(o,n);return o}},$once:function(t,e){var n=i.slice(arguments);return n.push({once:!0}),this.$on.apply(this,n)}};i.extend(r.prototype,o),r.mixTo=function(t){t="function"==typeof t?t.prototype:t,i.extend(t,o)},t.exports=r},function(t,e,n){function r(){}var i=n(2),o=n(22).expression,a=n(16),s=a.diffArray,u=a.diffObject,c={$watch:function(t,e,n){var r,a,s,u,c=this.__ext__;this._watchers||(this._watchers=[]),this._watchersForStable||(this._watchersForStable=[]),n=n||{},n===!0&&(n={deep:!0});var f=i.uid("w_");if(Array.isArray(t)){for(var h=[],l=0,p=t.length;p>l;l++)h.push(this.$expression(t[l]).get);var d=[];s=function(t){for(var e=!0,n=0,r=h.length;r>n;n++){var o=h[n](t,c);i.equals(o,d[n])||(e=!1,d[n]=i.clone(o))}return e?!1:d}}else"function"==typeof t?r=t.bind(this):(t=this._touchExpr(o(t)),r=t.get,a=t.once);var v={id:f,get:r,fn:e,once:a,force:n.force,diff:n.diff,test:s,deep:n.deep,last:n.sync?r(this):n.last};if(this[n.stable?"_watchersForStable":"_watchers"].push(v),u=this._records&&this._records.length,u&&this._records[u-1].push(v),n.init===!0){var m=this.$phase;this.$phase="digest",this._checkSingleWatch(v),this.$phase=m}return v},$unwatch:function(t){if(this._watchers&&t){var e=this._watchers,n=typeof t;if("object"===n){var r=t.length;if(r)for(;r-->=0;)this.$unwatch(t[r]);else t.removed=!0}else if("number"===n){var o=t;return t=i.findItem(e,function(t){return t.id===o}),t||(t=i.findItem(this._watchersForStable,function(t){return t.id===o})),this.$unwatch(t)}return this}},$expression:function(t){return this._touchExpr(o(t))},$digest:function(){if("digest"!==this.$phase&&!this._mute){this.$phase="digest";for(var t=!1,e=0;t=this._digest();)if(++e>20)throw Error("there may a circular dependencies reaches");var n=this._digest(!0);e>0&&n&&this.$emit&&(this.$emit("$update"),this.devtools&&this.devtools.emit("flush",this)),this.$phase=null}},_digest:function(t){var e,n,r,i=t?this._watchersForStable:this._watchers,o=!1,a=i&&i.length;if(a)for(var s=0,u=0,c=0;a>c;c++){n=i[c];var f=!n||n.removed;f?u+=1:(r=this._checkSingleWatch(n),r&&(o=!0)),f&&c!==a-1||(u&&(i.splice(s,u),a-=u,c-=u,u=0),s=c+1)}if(e=this._children,e&&e.length)for(var h=0,l=e.length;l>h;h++){var p=e[h];p&&p._digest(t)&&(o=!0)}return o},_checkSingleWatch:function(t){var e=!1;if(t){var n,r,o,a,c,f;if(t.test){var h=t.test(this);h&&(e=!0,t.fn.apply(this,h))}else n=t.get(this),r=t.last,(n!==r||t.force)&&(o=i.typeOf(r),a=i.typeOf(n),c=!0,"Object"===a&&"Object"===o&&t.deep?(f=u(n,r,t.diff),(f===!0||f.length)&&(e=!0)):"Array"!==a||"undefined"!=o&&"Array"!==o?(c=i.equals(n,r),(!c||t.force)&&(t.force=null,e=!0)):(f=s(n,t.last||[],t.diff),("Array"!==o||f===!0||f.length)&&(e=!0)));return e&&!t.test&&("Object"===a&&t.deep||"Array"===a?t.last=i.clone(n):t.last=n,t.fn.call(this,n,r,f),t.once&&this.$unwatch(t)),e}},$set:function(t,e){if(null!=t){var n=typeof t;if("string"===n||"expression"===t.type)t=this.$expression(t),t.set(this,e);else if("function"===n)t.call(this,this.data);else for(var r in t)this.$set(r,t[r])}},$get:function(t,e){return e&&"string"==typeof t?t:this.$expression(t).get(this)},$update:function(){var t=this;do{if(t.data.isolate||!t.$parent)break;t=t.$parent}while(t);var e=t.$phase;return t.$phase="digest",this.$set.apply(this,arguments),t.$phase=e,t.$digest(),this},_record:function(){this._records||(this._records=[]),this._records.push([])},_release:function(){return this._records.pop()}};i.extend(r.prototype,c),r.mixTo=function(t){return t="function"==typeof t?t.prototype:t,i.extend(t,c)},t.exports=r},function(t,e,n){var r=n(1).exprCache,i=(n(2),n(10));t.exports={expression:function(t,e){return"string"==typeof t&&(t=t.trim())&&(t=r.get(t)||r.set(t,new i(t,{mode:2,expression:!0}).expression())),t?t:void 0},parse:function(t){return new i(t).parse()}}},function(t,e){var n=t.exports={};n.json={get:function(t){return"undefined"!=typeof JSON?JSON.stringify(t):t},set:function(t){return"undefined"!=typeof JSON?JSON.parse(t):t}},n.last=function(t){return t&&t[t.length-1]},n.average=function(t,e){return t=t||[],t.length?n.total(t,e)/t.length:0},n.total=function(t,e){var n=0;if(t)return t.forEach(function(t){n+=e?t[e]:t}),n}},function(t,e,n){var r=n(2),i=n(13),o=(n(18),n(8)),a=n(14),s=a.NAMESPACE,u=a.OPTIONS,c=u.STABLE,f={deep:!0,stable:!0};n(25),n(26),t.exports={"r-class":function(t,e){"string"==typeof e&&(e=r.fixObjStr(e));var n=t.namespaceURI&&t.namespaceURI!==s.html;this.$watch(e,function(e){var r=n?t.getAttribute("class"):t.className;r=" "+(r||"").replace(/\s+/g," ")+" ";for(var o in e)e.hasOwnProperty(o)&&(r=r.replace(" "+o+" "," "),e[o]===!0&&(r+=o+" "));r=r.trim(),n?i.attr(t,"class",r):t.className=r},f)},"r-style":function(t,e){"string"==typeof e&&(e=r.fixObjStr(e)),this.$watch(e,function(e){for(var n in e)e.hasOwnProperty(n)&&i.css(t,n,e[n])},f)},"r-hide":function(t,e){var n,i=null;r.isExpr(e)||"string"==typeof e?this.$watch(e,function(e){var r=!!e;r!==i&&(i=r,r?t.onleave?n=t.onleave(function(){t.style.display="none",n=null}):t.style.display="none":(n&&n(),t.style.display="",t.onenter&&t.onenter()))},c):e&&(t.style.display="none")},"r-html":function(t,e){this.$watch(e,function(e){e=e||"",i.html(t,e)},{force:!0,stable:!0})},ref:{accept:a.COMPONENT_TYPE+a.ELEMENT_TYPE,link:function(t,e){var n,i=this.$refs||(this.$refs={});return r.isExpr(e)?this.$watch(e,function(e,r){n=e,i[r]===t&&(i[r]=null),n&&(i[n]=t)},c):i[n=e]=t,function(){i[n]=null}}}},o.directive(t.exports)},function(t,e,n){function r(t,e,n){if(n)for(var r,i=t.target;i&&i!==n;){for(var o=0,a=e.length;a>o;o++)r=e[o],r&&r.element===i&&r.fire(t);i=i.parentNode}}var i=n(2),o=n(13),a=n(8);a._addProtoInheritCache("event"),a.directive(/^on-\w+$/,function(t,e,n,r){if(n&&e){var i=n.split("-")[1];return this._handleEvent(t,i,e,r)}}),a.directive(/^(delegate|de)-\w+$/,function(t,e,n){function a(t){r(t,u[c],s.parentNode)}var s=this.$root,u=s._delegates||(s._delegates={});if(n&&e){var c=n.split("-")[1],f=i.handleEvent.call(this,e,c);u[c]||(u[c]=[],s.parentNode?o.on(s.parentNode,c,a):s.$on("$inject",function(t,e,n){var r=this.parentNode;n&&o.off(n,c,a),r&&o.on(this.parentNode,c,a)}),s.$on("$destroy",function(){s.parentNode&&o.off(s.parentNode,c,a),u[c]=null}));var h={element:t,fire:f};return u[c].push(h),function(){var t=u[c];if(t&&t.length)for(var e=0,n=t.length;n>e;e++)t[e]===h&&t.splice(e,1)}}})},function(t,e,n){function r(t,e,n){function r(){e.set(i,this.value),o.last=this.value,i.$update()}var i=this,o=this.$watch(e,function(e){for(var n=t.getElementsByTagName("option"),r=0,i=n.length;i>r;r++)if(n[r].value==e){t.selectedIndex=r;break}},l);return c.on(t,"change",r),void 0===e.get(i)&&t.value&&e.set(i,t.value),function(){c.off(t,"change",r)}}function i(t,e,n){var r,i=n.param,o=i.lazy;"throttle"in i&&(r=i[r]===!0?400:parseInt(i.throttle,10));var a=this,f=this.$watch(e,function(e){t.value!==e&&(t.value=null==e?"":""+e)},l),h=function(t){var n=this;if("cut"===t.type||"paste"===t.type)u.nextTick(function(){var t=n.value;e.set(a,t),f.last=t,a.$update()});else{var r=n.value;e.set(a,r),f.last=r,a.$update()}};if(r&&!o){h=u.throttle(h,r)}return void 0===s&&(s=9!==c.msie&&"oninput"in document.createElement("input")),o?c.on(t,"change",h):s?t.addEventListener("input",h):c.on(t,"paste keyup cut change",h),void 0===e.get(a)&&t.value&&e.set(a,t.value),function(){return o?c.off(t,"change",h):void(s?t.removeEventListener("input",h):c.off(t,"paste keyup cut change",h))}}function o(t,e){var n=this,r=this.$watch(e,function(e){c.attr(t,"checked",!!e)},l),i=function(){var t=this.checked;e.set(n,t),r.last=t,n.$update()};return e.set&&c.on(t,"change",i),void 0===e.get(n)&&e.set(n,!!t.checked),function(){e.set&&c.off(t,"change",i)}}function a(t,e){var n=this,r=(this.$watch(e,function(e){e==t.value?t.checked=!0:t.checked=!1},l),function(){var t=this.value;e.set(n,t),n.$update()});return e.set&&c.on(t,"change",r),void 0===e.get(n)&&t.checked&&e.set(n,t.value),function(){e.set&&c.off(t,"change",r)}}var s,u=n(2),c=n(13),f=n(8),h=n(14).OPTIONS,l=h.STABLE,p={text:i,select:r,checkbox:o,radio:a};f.directive("r-model",{param:["throttle","lazy"],link:function(t,e,n,r){var i=t.tagName.toLowerCase(),o=i;return"input"===o?o=t.type||"text":"textarea"===o&&(o="text"),"string"==typeof e&&(e=this.$expression(e)),p[o]?p[o].call(this,t,e,r):"input"===i?p.text.call(this,t,e,r):void 0}})},function(t,e,n){function r(t){var e,n=[],r=0,i=o.noop,a={type:t,start:function(t){return e=o.uid(),"function"==typeof t&&(i=t),r>0?r=0:a.step(),a.compelete},compelete:function(){e=null,i&&i(),i=o.noop,r=0},step:function(){n[r]&&n[r](a.done.bind(a,e))},done:function(t){t===e&&(rE;E++)if(u=m[E],d=u.split(":"),l=d[0]&&d[0].trim(),p=d[1]&&d[1].trim(),l)if(l!==c)if(l!==f){var v=s.animation(l);if(!v||!h)throw Error(v?"you should start with `on` or `event` in animation":"undefined animator 【"+l+"】");h.push(v.call(this,{element:t,done:h.done,param:p}))}else n(p),"leave"===p?(t.onleave=h.start,y.push(a(t))):"enter"===p?(t.onenter=h.start,y.push(a(t))):"on"+p in t?y.push(this._handleEvent(t,p,h.start)):(this.$on(p,h.start),y.push(this.$off.bind(this,p,h.start)));else n("when"),this.$watch(p,i.bind(this,h.start));return y.length?function(){y.forEach(function(t){t()})}:void 0}var o=n(2),a=n(18),s=(n(13),n(8)),u=/\s+/,c="when",f="on";s._addProtoInheritCache("animation"),s.animation({wait:function(t){var e=parseInt(t.param)||0;return function(t){setTimeout(t,e)}},"class":function(t){var e=t.param.split(","),n=e[0]||"",r=parseInt(e[1])||1;return function(e){a.startClassAnimate(t.element,n,e,r)}},call:function(t){var e=this.$expression(t.param).get,n=this;return function(t){e(n),n.$update(),t()}},emit:function(t){var e=t.param,n=e.split(","),r=n[0]||"",i=n[1]?this.$expression(n[1]).get:null;if(!r)throw Error("you shoud specified a eventname in emit command");var o=this;return function(t){o.$emit(r,i?i(o):void 0),t()}},style:function(t){var e,n={},r=t.param,i=r.split(",");return i.forEach(function(t){if(t=t.trim()){var r=t.split(u),i=r.shift(),o=r.join(" "); -if(!i||!o)throw Error("invalid style in command: style");n[i]=o,e=!0}}),function(r){e?a.startStyleAnimate(t.element,n,r):r()}}}),s.directive("r-animation",i),s.directive("r-anim",i)},function(t,e,n){function r(t){t.implement({$timeout:function(t,e){return e=e||0,setTimeout(function(){t.call(this),this.$update()}.bind(this),e)},$interval:function(t,e){return e=e||1e3/60,setInterval(function(){t.call(this),this.$update()}.bind(this),e)}})}var i=n(8);i.plugin("timeout",r),i.plugin("$timeout",r)}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Regular=e():t.Regular=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){var r=n(1),i=n(7),o=t.exports=n(8),a=o.Parser,s=o.Lexer;r.browser&&(n(24),n(27),n(28),o.dom=n(13)),o.env=r,o.util=n(2),o.parse=function(t,e){e=e||{},(e.BEGIN||e.END)&&(e.BEGIN&&(i.BEGIN=e.BEGIN),e.END&&(i.END=e.END),s.setup());var n=new a(t).parse();return e.stringify?JSON.stringify(n):n}},function(t,e,n){var r=n(2);e.svg=function(){return"undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}(),e.browser="undefined"!=typeof document&&document.nodeType,e.exprCache=r.cache(1e3),e.isRunning=!1},function(t,e,n){(function(e,r){function i(t,e){"undefined"!=typeof console&&console[e||"log"](t)}n(5)();var o=t.exports,a=n(6),s=([].slice,{}.toString),u="undefined"!=typeof window?window:e,c=9999;o.noop=function(){},o.uid=function(){var t=0;return function(){return t++}}(),o.extend=function(t,e,n){for(var r in e)e.hasOwnProperty(r)&&(void 0===t[r]||n===!0)&&(t[r]=e[r]);return t},o.keys=Object.keys?Object.keys:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e},o.some=function(t,e){for(var n=0,r=t.length;r>n;n++)if(e(t[n]))return!0},o.varName="d",o.setName="p_",o.ctxName="c",o.extName="e",o.rWord=/^[\$\w]+$/,o.rSimpleAccessor=/^[\$\w]+(\.[\$\w]+)*$/,o.nextTick="function"==typeof r?r.bind(u):function(t){setTimeout(t,0)},o.prefix="'use strict';var "+o.varName+"="+o.ctxName+".data;"+o.extName+"="+o.extName+"||'';",o.slice=function(t,e,n){for(var r=[],i=e||0,o=n||t.length;o>i;i++)r.push(t[i]);return r},o.typeOf=function(t){return null==t?String(t):s.call(t).slice(8,-1).toLowerCase()},o.makePredicate=function(t,e){function n(t){if(1===t.length)return r+="return str === '"+t[0]+"';";r+="switch(str){";for(var e=0;e3){i.sort(function(t,e){return e.length-t.length}),r+="switch(str.length){";for(var o=0;or;r++){var o=(t[r]||"").length;if(n+o>e)return{num:r,line:t[r],start:e-r-n,prev:t[r-1],next:t[r+1]};n+=o}}function e(t,e,n,o){var a=t.length,s=e-r;0>s&&(s=0);var u=e+i;u>a&&(u=a);var c=t.slice(s,u),f="["+(n+1)+"] "+(s>0?"..":""),l=a>u?"..":"",h=f+c+l;return o&&(h+="\n"+new Array(e-s+f.length+1).join(" ")+"^^^"),h}var n=/\r\n|[\n\r\u2028\u2029]/g,r=20,i=20;return function(r,i){i>r.length-1&&(i=r.length-1),n.lastIndex=0;var o=r.split(n),a=t(o,i),s=a.start,u=a.num;return(a.prev?e(a.prev,s,u-1)+"\n":"")+e(a.line,s,u,!0)+"\n"+(a.next?e(a.next,s,u+1)+"\n":"")}}();var f=/\((\?\!|\?\:|\?\=)/g;o.findSubCapture=function(t){var e=0,n=0,r=t.length,i=t.match(f);for(i=i?i.length:0;r--;){var o=t.charAt(r);(0===r||"\\"!==t.charAt(r-1))&&("("===o&&e++,")"===o&&n++)}if(e!==n)throw"RegExp: "+t+"'s bracket is not marched";return e-i},o.escapeRegExp=function(t){return t.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,function(t){return"\\"+t})};var l=new RegExp("&(?:(#x[0-9a-fA-F]+)|(#[0-9]+)|("+o.keys(a).join("|")+"));","gi");o.convertEntity=function(t){return(""+t).replace(l,function(t,e,n,r){var i;return i=n?parseInt(n.slice(1),10):e?parseInt(e.slice(2),16):a[r],String.fromCharCode(i)})},o.createObject=Object.create?function(t){return Object.create(t||null)}:function(){function t(){}return function(e){if(!e)return{};t.prototype=e;var n=new t;return t.prototype=null,n}}(),o.createProto=function(t,e){function n(){this.constructor=t}return n.prototype=e,t.prototype=new n},o.removeOne=function(t,e){for(var n=t.length;n--;)if(e(t[n]))return void t.splice(n,1)},o.clone=function(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t)){for(var e=[],n=0,r=t.length;r>n;n++)e[n]=t[n];return e}var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},o.equals=function(t,e){var n=typeof t;return"number"===n&&"number"==typeof e&&isNaN(t)&&isNaN(e)?!0:t===e};var h=/-([a-z])/g;o.camelCase=function(t){return t.replace(h,function(t,e){return e.toUpperCase()})},o.throttle=function(t,e){var n,r,i,e=e||100,o=null,a=0,s=function(){a=+new Date,o=null,i=t.apply(n,r),n=r=null};return function(){var u=+new Date,c=e-(u-a);return n=this,r=arguments,0>=c||c>e?(clearTimeout(o),o=null,a=u,i=t.apply(n,r),n=r=null):o||(o=setTimeout(s,c)),i}},o.escape=function(){var t=/&/g,e=//g,r=/\'/g,i=/\"/g,o=/[&<>\"\']/;return function(a){return o.test(a)?a.replace(t,"&").replace(e,"<").replace(n,">").replace(r,"'").replace(i,"""):a}}(),o.cache=function(t){t=t||1e3;var e=[],n={};return{set:function(t,r){return e.length>this.max&&(n[e.shift()]=void 0),void 0===n[t]&&e.push(t),n[t]=r,r},get:function(t){return void 0===t?n:n[t]},max:t,len:function(){return e.length}}},o.handleEvent=function(t,e){var n,r=this;return"expression"===t.type&&(n=t.get),n?function(t){r.$update(function(){var e=this.data;e.$event=t;var i=n(r);i===!1&&t&&t.preventDefault&&t.preventDefault(),e.$event=void 0})}:function(){var e=o.slice(arguments);e.unshift(t),r.$update(function(){r.$emit.apply(r,e)})}},o.once=function(t){var e=0;return function(){0===e++&&t.apply(this,arguments)}},o.fixObjStr=function(t){return 0!==t.trim().indexOf("{")?"{"+t+"}":t},o.map=function(t,e){for(var n=[],r=0,i=t.length;i>r;r++)n.push(e(t[r],r));return n},o.log=i,o.normListener=function(t){var e=[],n=o.typeOf(t);if("array"===n)return t;if("object"===n)for(var r in t)t.hasOwnProperty(r)&&e.push({type:r,listener:t[r]});return e},o.isVoidTag=o.makePredicate("area base br col embed hr img input keygen link menuitem meta param source track wbr r-content"),o.isBooleanAttr=o.makePredicate("selected checked disabled readonly required open autofocus controls autoplay compact loop defer multiple"),o.isExpr=function(t){return t&&"expression"===t.type},o.isGroup=function(t){return t.inject||t.$inject},o.getCompileFn=function(t,e,n){return e.$compile.bind(e,t,n)},o.fixTagAST=function(t,e){if(!t.touched){var n=t.attrs;if(n){var r=n.length;if(r){for(var i=[],a={};r--;){var s=n[r];"type"===s.name&&(s.priority=c+1);var u=e.directive(s.name);u?(s.priority=u.priority||1,s.directive=!0,i.push(s)):"attribute"===s.type&&(a[s.name]=s.value)}i.forEach(function(t){var r=e.directive(t.name),i=r.param;i&&i.length&&(t.param={},i.forEach(function(e){e in a&&(t.param[e]=void 0===a[e]?!0:a[e],o.removeOne(n,function(t){return t.name===e}))}))}),n.sort(function(t,e){var n=t.priority,r=e.priority;return null==n&&(n=c),null==r&&(r=c),r-n}),t.touched=!0}}}},o.findItem=function(t,e){if(t&&t.length)for(var n=t.length;n--;)if(e(t[n]))return t[n]},o.getParamObj=function(t,e){var n={};if(e)for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];n[r]=i&&"expression"===i.type?t.$get(i):i}return n}}).call(e,function(){return this}(),n(3).setImmediate)},function(t,e,n){(function(t,r){function i(t,e){this._id=t,this._clearFn=e}var o=n(4).nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},c=0;e.setTimeout=function(){return new i(a.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(a.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},e.setImmediate="function"==typeof t?t:function(t){var n=c++,r=arguments.length<2?!1:s.call(arguments,1);return u[n]=!0,o(function(){u[n]&&(r?t.apply(null,r):t.call(null),e.clearImmediate(n))}),n},e.clearImmediate="function"==typeof r?r:function(t){delete u[t]}}).call(e,n(3).setImmediate,n(3).clearImmediate)},function(t,e){function n(t){if(u===setTimeout)return setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function r(t){if(c===clearTimeout)return clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function i(){p&&l&&(p=!1,l.length?h=l.concat(h):d=-1,h.length&&o())}function o(){if(!p){var t=n(i);p=!0;for(var e=h.length;e;){for(l=h,h=[];++d1)for(var r=1;rn;n++)if(this[n]===t)return n;return-1},forEach:function(t,e){var n=0,r=Object(this),i=r.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(;i>n;){var o;n in r&&(o=r[n],t.call(e,o,n,r)),n++}},filter:function(t,e){var n=Object(this),r=n.length>>>0;if("function"!=typeof t)throw new TypeError;for(var i=[],o=0;r>o;o++)if(o in n){var a=n[o];t.call(e,a,o,n)&&i.push(a)}return i}}),n(Function.prototype,{bind:function(t){var e=this,n=r.call(arguments,1);return function(){var i=n.concat(r.call(arguments));return e.apply(t,i)}}}),n(Array,{isArray:function(t){return"[object Array]"===i.call(t)}})}},function(t,e){var n={quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,fnof:402,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,bull:8226,hellip:8230,prime:8242,Prime:8243,oline:8254,frasl:8260,weierp:8472,image:8465,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,circ:710,tilde:732,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,permil:8240,lsaquo:8249,rsaquo:8250,euro:8364};t.exports=n},function(t,e){t.exports={BEGIN:"{",END:"}",PRECOMPILE:!1}},function(t,e,n){var r=n(1),i=n(9),o=n(10),a=n(7),s=n(2),u=n(12),c={};if(r.browser){var f=n(13),l=n(15),h=n(19),p=f.doc;c=n(17)}var d=n(20),v=n(21),m=n(22),g=n(23),y=function(t,e){var n=r.isRunning;r.isRunning=!0;var i,a;t=t||{};var u="string"==typeof this.template&&!t.template;e=e||{},t.data=t.data||{},t.computed=t.computed||{},this.data&&s.extend(t.data,this.data),this.computed&&s.extend(t.computed,this.computed);var l,h=this._eventListeners||[];t.events&&(l=s.normListener(t.events),l.length&&(h=h.concat(l)),delete t.events),s.extend(this,t,!0),this.$parent&&this.$parent._append(this),this._children=[],this.$refs={},a=this.template,"string"==typeof a&&a.length<16&&(i=f.find(a))&&(a=i.innerHTML),a&&a.nodeType&&(a=a.innerHTML),"string"==typeof a&&(a=new o(a).parse(),u?this.constructor.prototype.template=a:delete this.template),this.computed=x(this.computed),this.$root=this.$root||this,h&&h.length&&h.forEach(function(t){this.$on(t.type,t.listener)}.bind(this)),this.$emit("$config"),this.config&&this.config(this.data),this.$emit("$afterConfig");var p=this._body;this._body=null,p&&p.ast&&p.ast.length&&(this.$body=s.getCompileFn(p.ast,p.ctx,{outer:this,namespace:e.namespace,extra:e.extra,record:!0})),a&&(this.group=this.$compile(a,{namespace:e.namespace}),c.node(this)),this.$parent||this.$update(),this.$ready=!0,this.$emit("$init"),this.init&&this.init(this.data),this.$emit("$afterInit"),r.isRunning=n,this.devtools&&this.devtools.emit("init",this)},E=window.__REGULAR_DEVTOOLS_GLOBAL_HOOK__;E&&(y.prototype.devtools=E),l&&(l.Regular=y),s.extend(y,{_directives:{__regexp__:[]},_plugins:{},_protoInheritCache:["directive","use"],__after__:function(t,e){var n;if(this.__after__=t.__after__,e.name&&y.component(e.name,this),n=e.template){var r,i;"string"==typeof n&&n.length<16&&(r=f.find(n))&&(n=r),n&&n.nodeType&&((i=f.attr(n,"name"))&&y.component(i,this),n=n.innerHTML),"string"==typeof n&&(this.prototype.template=a.PRECOMPILE?new o(n).parse():n)}e.computed&&(this.prototype.computed=x(e.computed)),y._inheritConfig(this,t)},directive:function(t,e){if(t){var n=typeof t;if("object"===n&&!e){for(var r in t)t.hasOwnProperty(r)&&this.directive(r,t[r]);return this}var i,o=this._directives;if(null!=e)return"function"==typeof e&&(e={link:e}),"string"===n?o[t]=e:(e.regexp=t,o.__regexp__.push(e)),this;if("string"===n){if(i=o[t])return i;for(var a=o.__regexp__,s=0,u=a.length;u>s;s++){i=a[s];var c=i.regexp.test(t);if(c)return i}}}},plugin:function(t,e){var n=this._plugins;return null==e?n[t]:(n[t]=e,this)},use:function(t){return"string"==typeof t&&(t=y.plugin(t)),"function"!=typeof t?this:(t(this,y),this)},config:function(t,e){var n=!1;if("object"==typeof t)for(var r in t)("END"===r||"BEGIN"===r)&&(n=!0),a[r]=t[r];n&&i.setup()},expression:m.expression,Parser:o,Lexer:i,_addProtoInheritCache:function(t,e){if(Array.isArray(t))return t.forEach(y._addProtoInheritCache);var n="_"+t+"s";y._protoInheritCache.push(t),y[n]={},y[t]||(y[t]=function(r,i){var o=this[n];if("object"==typeof r){for(var a in r)r.hasOwnProperty(a)&&this[t](a,r[a]);return this}return null==i?o[r]:(o[r]=e?e(i):i,this)})},_inheritConfig:function(t,e){var n=y._protoInheritCache,r=s.slice(n);return r.forEach(function(n){t[n]=e[n];var r="_"+n+"s";e[r]&&(t[r]=s.createObject(e[r]))}),t}}),u(y),y._addProtoInheritCache("component"),y._addProtoInheritCache("filter",function(t){return"function"==typeof t?{get:t}:t}),d.mixTo(y),v.mixTo(y),y.implement({init:function(){},config:function(){},destroy:function(){this.$emit("$destroy"),this._watchers=null,this.group&&this.group.destroy(!0),this.group=null,this.parentNode=null,this._children=null,this.$root=null,this._handles=null,this.$refs=null;var t=this.$parent;if(t&&t._children){var e=t._children.indexOf(this);t._children.splice(e,1)}this.$parent=null,this.devtools&&this.devtools.emit("destroy",this)},$compile:function(t,e){e=e||{},"string"==typeof t&&(t=new o(t).parse());var n,r=this.__ext__,i=e.record;e.extra&&(this.__ext__=e.extra),i&&this._record();var a=this._walk(t,e);if(i){n=this._release();var s=this;n.length&&(a.ondestroy=function(){s.$unwatch(n)})}return e.extra&&(this.__ext__=r),a},$bind:function(t,e,n){var r=s.typeOf(e);if("expression"===e.type||"string"===r)this._bind(t,e,n);else if("array"===r)for(var i=0,o=e.length;o>i;i++)this._bind(t,e[i]);else if("object"===r)for(var i in e)e.hasOwnProperty(i)&&this._bind(t,i,e[i]);return t.$update(),this},$unbind:function(){},$inject:c.inject,$mute:function(t){t=!!t;var e=t===!1&&this._mute;return this._mute=!!t,e&&this.$update(),this},_bind:function(t,e,n){var r=this;if(!(t&&t instanceof y))throw"$bind() should pass Regular component as first argument";if(!e)throw"$bind() should pass as least one expression to bind";if(n||(n=e),e=m.expression(e),n=m.expression(n),n.set){var i=this.$watch(e,function(e){t.$update(n,e)});t.$on("$destroy",function(){r.$unwatch(i)})}if(e.set){var o=t.$watch(n,function(t){r.$update(e,t)});this.$on("$destroy",t.$unwatch.bind(t,o))}n.set(t,e.get(this))},_walk:function(t,e){if(Array.isArray(t)){var n=t.length;if(!n)return;for(var r=[],i=0;n>i;i++){var o=this._walk(t[i],e);o&&r.push(o)}return new h(r)}return"string"==typeof t?p.createTextNode(t):l[t.type||"default"].call(this,t,e)},_append:function(t){this._children.push(t),t.$parent=this},_handleEvent:function(t,e,n,r){var i,o=this.constructor,a="function"!=typeof n?s.handleEvent.call(this,n,e):n,u=o.event(e);return u?i=u.call(this,t,a,r):f.on(t,e,a),u?i:function(){f.off(t,e,a)}},_touchExpr:function(t){var e,n=this.__ext__,r={};if("expression"!==t.type||t.touched)return t;if(e=t.get,e||(e=t.get=new Function(s.ctxName,s.extName,s.prefix+"return ("+t.body+")"),t.body=null),r.get=n?function(t){return e(t,n)}:e,t.setbody&&!t.set){var i=t.setbody,o=t.filters,a=this;o&&s.some(o,function(t){return!a._f_(t).set})||(t.set=function(e,n,r){return t.set=new Function(s.ctxName,s.setName,s.extName,s.prefix+i),t.set(e,n,r)}),t.filters=t.setbody=null}return t.set&&(r.set=n?function(e,r){return t.set(e,r,n)}:t.set),r.type="expression",r.touched=!0,r.once=t.once||t.constant,r},_f_:function(t){var e=this.constructor,n=e.filter(t);if(!n)throw Error("filter "+t+" is undefined");return n},_sg_:function(t,e,n){if("undefined"!=typeof n){var r=this.computed,i=r[t];if(i){if("expression"!==i.type||i.get||this._touchExpr(i),i.get)return i.get(this);s.log("the computed '"+t+"' don't define the get function, get data."+t+" altnately","warn")}}return"undefined"==typeof e||"undefined"==typeof t?void 0:n&&"undefined"!=typeof n[t]?n[t]:e[t]},_ss_:function(t,e,n,r,i){var o,i=this.computed,r=r||"=",a=i?i[t]:null;if("="!==r)switch(o=a?a.get(this):n[t],r){case"+=":e=o+e;break;case"-=":e=o-e;break;case"*=":e=o*e;break;case"/=":e=o/e;break;case"%=":e=o%e}if(a){if(a.set)return a.set(this,e);s.log("the computed '"+t+"' don't define the set function, assign data."+t+" altnately","warn")}return n[t]=e,e}}),y.prototype.inject=function(){return s.log("use $inject instead of inject","error"),this.$inject.apply(this,arguments)},y.filter(g),t.exports=y;var x=function(){function t(t){return function(e){return t.call(e,e.data)}}function e(t){return function(e,n){return t.call(e,n,e.data),n}}return function(n){if(n){var r,i,o,a={};for(var s in n)r=n[s],o=typeof r,"expression"!==r.type?"string"===o?a[s]=m.expression(r):(i=a[s]={type:"expression"},"function"===o?i.get=t(r):(r.get&&(i.get=t(r.get)),r.set&&(i.set=e(r.set)))):a[s]=r;return a}}}()},function(t,e,n){function r(t){return function(e){return{type:t,value:e}}}function i(t,e){l[f.END]&&(this.markStart=l[f.END],this.markEnd=f.END),this.input=(t||"").trim(),this.opts=e||{},this.map=2!==this.opts.mode?s:u,this.states=["INIT"],e&&e.expression&&(this.states.push("JST"),this.expression=!0)}function o(t){for(var e,n,r={},i=0,o=t.length;o>i;i++)e=t[i],n=e[2]||"INIT",(r[n]||(r[n]={rules:[],links:[]})).rules.push(e);return a(r)}function a(t){function e(t,e){return"string"==typeof h[e]?c.escapeRegExp(h[e]):String(h[e]).slice(1,-1)}var n,i,o,a,s,u,f;for(var l in t){n=t[l],n.curIndex=1,i=n.rules,o=[];for(var p=0,d=i.length;d>p;p++)f=i[p],s=f[0],a=f[1],"string"==typeof a&&(a=r(a)),"regexp"===c.typeOf(s)&&(s=s.toString().slice(1,-1)),s=s.replace(/\{(\w+)\}/g,e),u=c.findSubCapture(s)+1,n.links.push([n.curIndex,u,a]),n.curIndex+=u,o.push(s);n.TRUNK=new RegExp("^(?:("+o.join(")|(")+"))")}return t}var s,u,c=n(2),f=n(7),l={"}":"{","]":"["},h={NAME:/(?:[:_A-Za-z][-\.:_0-9A-Za-z]*)/,IDENT:/[\$_A-Za-z][_0-9A-Za-z\$]*/,SPACE:/[\r\n\t\f ]/},p=/a|(b)/.exec("a"),d=p&&void 0===p[1]?function(t){return void 0!==t}:function(t){return!!t},v=i.prototype;v.lex=function(t){t=(t||this.input).trim();var e,n,r,i,o,a=[];this.input=t,this.marks=0,this.index=0;for(var s=0;t;)s++,o=this.state(),e=this.map[o],n=e.TRUNK.exec(t),n||this.error("Unrecoginized Token"),r=n[0].length,t=t.slice(r),i=this._process.call(this,n,e,t),i&&a.push(i),this.index+=r;return a.push({type:"EOF"}),a},v.error=function(t){throw Error("Parse Error: "+t+":\n"+c.trackErrorPos(this.input,this.index))},v._process=function(t,e,n){for(var r,i=e.links,o=!1,a=i.length,s=0;a>s;s++){var u=i[s],c=u[2],f=u[0];if(d(t[f])){o=!0,c&&(r=c.apply(this,t.slice(f,f+u[1])),r&&(r.pos=this.index));break}}if(!o)switch(n.charAt(0)){case"<":this.enter("TAG");break;default:this.enter("JST")}return r},v.enter=function(t){return this.states.push(t),this},v.state=function(){var t=this.states;return t[t.length-1]},v.leave=function(t){var e=this.states;t&&e[e.length-1]!==t||e.pop()},i.setup=function(){h.END=f.END,h.BEGIN=f.BEGIN,s=o([m.ENTER_JST,m.ENTER_TAG,m.TEXT,m.TAG_NAME,m.TAG_OPEN,m.TAG_CLOSE,m.TAG_PUNCHOR,m.TAG_ENTER_JST,m.TAG_UNQ_VALUE,m.TAG_STRING,m.TAG_SPACE,m.TAG_COMMENT,m.JST_OPEN,m.JST_CLOSE,m.JST_COMMENT,m.JST_EXPR_OPEN,m.JST_IDENT,m.JST_SPACE,m.JST_LEAVE,m.JST_NUMBER,m.JST_PUNCHOR,m.JST_STRING,m.JST_COMMENT]),u=o([m.ENTER_JST2,m.TEXT,m.JST_COMMENT,m.JST_OPEN,m.JST_CLOSE,m.JST_EXPR_OPEN,m.JST_IDENT,m.JST_SPACE,m.JST_LEAVE,m.JST_NUMBER,m.JST_PUNCHOR,m.JST_STRING,m.JST_COMMENT])};var m={ENTER_JST:[/[^\x00<]*?(?={BEGIN})/,function(t){return this.enter("JST"),t?{type:"TEXT",value:t}:void 0}],ENTER_JST2:[/[^\x00]*?(?={BEGIN})/,function(t){return this.enter("JST"),t?{type:"TEXT",value:t}:void 0}],ENTER_TAG:[/[^\x00]*?(?=<[\w\/\!])/,function(t){return this.enter("TAG"),t?{type:"TEXT",value:t}:void 0}],TEXT:[/[^\x00]+/,"TEXT"],TAG_NAME:[/{NAME}/,"NAME","TAG"],TAG_UNQ_VALUE:[/[^\{}&"'=><`\r\n\f\t ]+/,"UNQ","TAG"],TAG_OPEN:[/<({NAME})\s*/,function(t,e){return{type:"TAG_OPEN",value:e}},"TAG"],TAG_CLOSE:[/<\/({NAME})[\r\n\f\t ]*>/,function(t,e){return this.leave(),{type:"TAG_CLOSE",value:e}},"TAG"],TAG_ENTER_JST:[/(?={BEGIN})/,function(){this.enter("JST")},"TAG"],TAG_PUNCHOR:[/[\>\/=&]/,function(t){return">"===t&&this.leave(),{type:t,value:t}},"TAG"],TAG_STRING:[/'([^']*)'|"([^"]*)\"/,function(t,e,n){var r=e||n||"";return{type:"STRING",value:r}},"TAG"],TAG_SPACE:[/{SPACE}+/,null,"TAG"],TAG_COMMENT:[/<\!--([^\x00]*?)--\>/,function(t){this.leave()},"TAG"],JST_OPEN:["{BEGIN}#{SPACE}*({IDENT})",function(t,e){return{type:"OPEN",value:e}},"JST"],JST_LEAVE:[/{END}/,function(t){return this.markEnd===t&&this.expression?{type:this.markEnd,value:this.markEnd}:this.markEnd&&this.marks?(this.marks--,{type:this.markEnd,value:this.markEnd}):(this.firstEnterStart=!1,this.leave("JST"),{type:"END"})},"JST"],JST_CLOSE:[/{BEGIN}\s*\/({IDENT})\s*{END}/,function(t,e){return this.leave("JST"),{type:"CLOSE",value:e}},"JST"],JST_COMMENT:[/{BEGIN}\!([^\x00]*?)\!{END}/,function(){this.leave()},"JST"],JST_EXPR_OPEN:["{BEGIN}",function(t,e){if(t===this.markStart){if(this.expression)return{type:this.markStart,value:this.markStart};if(this.firstEnterStart||this.marks)return this.marks++,this.firstEnterStart=!1,{type:this.markStart,value:this.markStart};this.firstEnterStart=!0}return{type:"EXPR_OPEN",escape:!1}},"JST"],JST_IDENT:["{IDENT}","IDENT","JST"],JST_SPACE:[/[ \r\n\f]+/,null,"JST"],JST_PUNCHOR:[/[=!]?==|[-=><+*\/%\!]?\=|\|\||&&|\@\(|\.\.|[<\>\[\]\(\)\-\|\{}\+\*\/%?:\.!,]/,function(t){return{type:t,value:t}},"JST"],JST_STRING:[/'([^']*)'|"([^"]*)"/,function(t,e,n){return{type:"STRING",value:e||n||""}},"JST"],JST_NUMBER:[/(?:[0-9]*\.[0-9]+|[0-9]+)(e\d+)?/,function(t){return{type:"NUMBER",value:parseFloat(t,10)}},"JST"]};i.setup(),t.exports=i},function(t,e,n){function r(t,e){e=e||{},this.input=t,this.tokens=new u(t,e).lex(),this.pos=0,this.length=this.tokens.length}function i(t,e){return{get:t,set:e}}var o=n(2),a=n(7),s=n(11),u=n(9),c=o.varName,f=o.ctxName,l=o.extName,h=o.makePredicate("STRING IDENT NUMBER"),p=o.makePredicate("true false undefined null this Array Date JSON Math NaN RegExp decodeURI decodeURIComponent encodeURI encodeURIComponent parseFloat parseInt Object"),d=r.prototype;d.parse=function(){this.pos=0;var t=this.program();return"TAG_CLOSE"===this.ll().type&&this.error("You may got a unclosed Tag"),t},d.ll=function(t){t=t||1,0>t&&(t+=1);var e=this.pos+t-1;return e>this.length-1?this.tokens[this.length-1]:this.tokens[e]},d.la=function(t){return(this.ll(t)||"").type},d.match=function(t,e){var n;return(n=this.eat(t,e))?n:(n=this.ll(),void this.error("expect ["+t+(null==e?"":":"+e)+']" -> got "['+n.type+(null==e?"":":"+n.value)+"]",n.pos))},d.error=function(t,e){throw t="\n【 parse failed 】 "+t+":\n\n"+o.trackErrorPos(this.input,"number"==typeof e?e:this.ll().pos||0),new Error(t)},d.next=function(t){t=t||1,this.pos+=t},d.eat=function(t,e){var n=this.ll();if("string"!=typeof t){for(var r=t.length;r--;)if(n.type===t[r])return this.next(),n}else if(n.type===t&&("undefined"==typeof e||n.value===e))return this.next(),n;return!1},d.program=function(){for(var t=[],e=this.ll();"EOF"!==e.type&&"TAG_CLOSE"!==e.type;)t.push(this.statement()),e=this.ll();return t},d.statement=function(){var t=this.ll();switch(t.type){case"NAME":case"TEXT":var e=t.value;for(this.next();t=this.eat(["NAME","TEXT"]);)e+=t.value;return s.text(e);case"TAG_OPEN":return this.xml();case"OPEN":return this.directive();case"EXPR_OPEN":return this.interplation();default:this.error("Unexpected token: "+this.la())}},d.xml=function(){var t,e,n,r;return t=this.match("TAG_OPEN").value,e=this.attrs(),r=this.eat("/"),this.match(">"),r||o.isVoidTag(t)||(n=this.program(),this.eat("TAG_CLOSE",t)||this.error("expect gotno matched closeTag")),s.element(t,e,n)},d.xentity=function(t){var e,n,r=t.value;if("NAME"===t.type){if(~r.indexOf(".")){var i=r.split(".");r=i[0],n=i[1]}return this.eat("=")&&(e=this.attvalue(n)),s.attribute(r,e,n)}return"if"!==r&&this.error("current version. ONLY RULE #if #else #elseif is valid in tag, the rule #"+r+" is invalid"),this["if"](!0)},d.attrs=function(t){var e;e=t?["NAME"]:["NAME","OPEN"];for(var n,r=[];n=this.eat(e);)r.push(this.xentity(n));return r},d.attvalue=function(t){var e=this.ll();switch(e.type){case"NAME":case"UNQ":case"STRING":this.next();var n=e.value;if(~n.indexOf(a.BEGIN)&&~n.indexOf(a.END)&&"cmpl"!==t){var i=!0,o=new r(n,{mode:2}).parse();if(1===o.length&&"expression"===o[0].type)return o[0];var u=[];o.forEach(function(t){t.constant||(i=!1),u.push(t.body||"'"+t.text.replace(/'/g,"\\'")+"'")}),u="["+u.join(",")+"].join('')",n=s.expression(u,null,i)}return n;case"EXPR_OPEN":return this.interplation();default:this.error("Unexpected token: "+this.la())}},d.directive=function(){var t=this.ll().value;return this.next(),"function"==typeof this[t]?this[t]():void this.error("Undefined directive["+t+"]")},d.interplation=function(){this.match("EXPR_OPEN");var t=this.expression(!0);return this.match("END"),t},d.inc=d.include=function(){var t=this.expression();return this.match("END"),s.template(t)},d["if"]=function(t){var e=this.expression(),n=[],r=[],i=n,o=t?"attrs":"statement";this.match("END");for(var a,u;!(u=this.eat("CLOSE"));)if(a=this.ll(),"OPEN"===a.type)switch(a.value){case"else":i=r,this.next(),this.match("END");break;case"elseif":return this.next(),r.push(this["if"](t)),s["if"](e,n,r);default:i.push(this[o](!0))}else i.push(this[o](!0));return"if"!==u.value&&this.error("Unmatched if directive"),s["if"](e,n,r)},d.list=function(){var t,e,n,r=this.expression(),i=[],o=[],a=i;for(this.match("IDENT","as"),t=this.match("IDENT").value,this.eat("IDENT","by")&&(this.eat("IDENT",t+"_index")?n=!0:(n=this.expression(),n.constant&&(n=!0))),this.match("END");!(e=this.eat("CLOSE"));)this.eat("OPEN","else")?(a=o,this.match("END")):a.push(this.statement());return"list"!==e.value&&this.error("expect list got /"+e.value+" ",e.pos),s.list(r,t,i,o,n)},d.expression=function(){var t;return this.eat("@(")?(t=this.expr(),t.once=!0,this.match(")")):t=this.expr(),t},d.expr=function(){this.depend=[];var t=this.filter(),e=t.get||t,n=t.set;return s.expression(e,n,!this.depend.length,t.filters)},d.filter=function(){var t,e,n,r,a=this.assign(),s=this.eat("|"),u=[],c="t",l=a.set,h="";if(s){l&&(e=[],t=[]),n="(function("+c+"){";do{var p=this.match("IDENT").value;h=c+" = "+f+"._f_('"+p+"' ).get.call( "+o.ctxName+","+c,h+=this.eat(":")?", "+this.arguments("|").join(",")+");":");",u.push(h),l&&(t.push(p),e.unshift(h.replace(" ).get.call"," ).set.call")))}while(s=this.eat("|"));u.push("return "+c),e&&e.push("return "+c),r=n+u.join("")+"})("+a.get+")",e&&(l=l.replace(o.setName,n+e.join("")+"})("+o.setName+")"));var d=i(r,l);return d.filters=t,d}return a},d.assign=function(){var t,e=this.condition();return(t=this.eat(["=","+=","-=","*=","/=","%="]))?(e.set||this.error("invalid lefthand expression in assignment expression"),i(e.set.replace(","+o.setName,","+this.condition().get).replace("'='","'"+t.type+"'"),e.set)):e},d.condition=function(){var t=this.or();return this.eat("?")?i([t.get+"?",this.assign().get,this.match(":").type,this.assign().get].join("")):t},d.or=function(){var t=this.and();return this.eat("||")?i(t.get+"||"+this.or().get):t},d.and=function(){var t=this.equal();return this.eat("&&")?i(t.get+"&&"+this.and().get):t},d.equal=function(){var t,e=this.relation();return(t=this.eat(["==","!=","===","!=="]))?i(e.get+t.type+this.equal().get):e},d.relation=function(){var t,e=this.additive();return(t=this.eat(["<",">",">=","<="])||this.eat("IDENT","in"))?i(e.get+t.value+this.relation().get):e},d.additive=function(){var t,e=this.multive();return(t=this.eat(["+","-"]))?i(e.get+t.value+this.additive().get):e},d.multive=function(){var t,e=this.range();return(t=this.eat(["*","/","%"]))?i(e.get+t.type+this.multive().get):e},d.range=function(){var t,e,n=this.unary();if(t=this.eat("..")){e=this.unary();var r="(function(start,end){var res = [],step=end>start?1:-1; for(var i = start; end>start?i <= end: i>=end; i=i+step){res.push(i); } return res })("+n.get+","+e.get+")";return i(r); +}return n},d.unary=function(){var t;return(t=this.eat(["+","-","~","!"]))?i("("+t.type+this.unary().get+")"):this.member()},d.member=function(t,e,n,r){var i,a,s,u=!1;if(t)"string"==typeof e&&h(e)?n.push(e):(n&&n.length&&this.depend.push(n),n=null);else{a=this.primary();var p=typeof a;"string"===p?(n=[],n.push(a),e=a,s=l+"."+a,t=f+"._sg_('"+a+"', "+c+", "+l+")",u=!0):"this"===a.get?(t=f,n=["this"]):(n=null,t=a.get)}if(i=this.eat(["[",".","("]))switch(i.type){case".":var d=this.match("IDENT").value;return r=t,"("!==this.la()?t=f+"._sg_('"+d+"', "+t+")":t+="['"+d+"']",this.member(t,d,n,r);case"[":return a=this.assign(),r=t,"("!==this.la()?t=f+"._sg_("+a.get+", "+t+")":t+="["+a.get+"]",this.match("]"),this.member(t,a,n,r);case"(":var v=this.arguments().join(",");return t=t+"("+v+")",this.match(")"),this.member(t,null,n)}n&&n.length&&this.depend.push(n);var m={get:t};return e&&(m.set=f+"._ss_("+(e.get?e.get:"'"+e+"'")+","+o.setName+","+(r?r:o.varName)+", '=', "+(u?1:0)+")"),m},d.arguments=function(t){t=t||")";var e=[];do this.la()!==t&&e.push(this.assign().get);while(this.eat(","));return e},d.primary=function(){var t=this.ll();switch(t.type){case"{":return this.object();case"[":return this.array();case"(":return this.paren();case"STRING":this.next();var e=""+t.value,n=~e.indexOf("'")?'"':"'";return i(n+e+n);case"NUMBER":return this.next(),i(""+t.value);case"IDENT":return this.next(),p(t.value)?i(t.value):t.value;default:this.error("Unexpected Token: "+t.type)}},d.object=function(){for(var t=[this.match("{").type],e=this.eat(["STRING","IDENT","NUMBER"]);e;){t.push("'"+e.value+"'"+this.match(":").type);var n=this.assign().get;t.push(n),e=null,this.eat(",")&&(e=this.eat(["STRING","IDENT","NUMBER"]))&&t.push(",")}return t.push(this.match("}").type),{get:t.join("")}},d.array=function(){var t,e=[this.match("[").type];if(this.eat("]"))e.push("]");else{for(;(t=this.assign())&&(e.push(t.get),this.eat(","));)e.push(",");e.push(this.match("]").type)}return{get:e.join("")}},d.paren=function(){this.match("(");var t=this.filter();return t.get="("+t.get+")",t.set=t.set,this.match(")"),t},t.exports=r},function(t,e){t.exports={element:function(t,e,n){return{type:"element",tag:t,attrs:e,children:n}},attribute:function(t,e,n){return{type:"attribute",name:t,value:e,mdf:n}},"if":function(t,e,n){return{type:"if",test:t,consequent:e,alternate:n}},list:function(t,e,n,r,i){return{type:"list",sequence:t,alternate:r,variable:e,body:n,track:i}},expression:function(t,e,n,r){return{type:"expression",body:t,constant:n||!1,setbody:e||!1,filters:r}},text:function(t){return{type:"text",text:t}},template:function(t){return{type:"template",content:t}}}},function(t,e,n){function r(t,e,n){return function(){var r=this.supr;this.supr=n[t];var i=e.apply(this,arguments);return this.supr=r,i}}function i(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(u[i]&&u[i](e[i],t,n),t[i]=s(e[i])&&s(n[i])&&a.test(e[i])?r(i,e[i],n):e[i])}var o=n(2),a=/xy/.test(function(){"xy"})?/\bsupr\b/:/.*/,s=function(t){return"function"==typeof t},u={events:function(t,e){var n=e._eventListeners||[],r=o.normListener(t);r.length&&(e._eventListeners=n.concat(r)),delete e.events}},c=["data","computed"],f=c.length;t.exports=function l(t){function e(){a.apply(this,arguments)}function n(t){for(var e=f;e--;){var n=c[e];r[n]&&t.hasOwnProperty(n)&&r.hasOwnProperty(n)&&(o.extend(r[n],t[n],!0),delete t[n])}return i(r,t,s),this}t=t||{};var r,a=this,s=a&&a.prototype||{};return"function"==typeof t?(r=t.prototype,t.implement=n,t.extend=l,t):(r=o.createProto(e,s),e.implement=n,e.implement(t),a.__after__&&a.__after__.call(e,a,t),e.extend=l,e)}},function(t,e,n){function r(t){return(""+t).replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()})}function i(t,e){return"change"===e&&u.msie<9&&t&&t.tagName&&"input"===t.tagName.toLowerCase()&&("checkbox"===t.type||"radio"===t.type)?"click":e}function o(t){if(t=t||window.event,t._fixed)return t;this.event=t,this.target=t.target||t.srcElement;var e=this.type=t.type,n=this.button=t.button;if(m.test(e)&&(this.pageX=null!=t.pageX?t.pageX:t.clientX+g.scrollLeft,this.pageY=null!=t.pageX?t.pageY:t.clientY+g.scrollTop,"mouseover"===e||"mouseout"===e)){for(var r=t.relatedTarget||t[("mouseover"===e?"from":"to")+"Element"];r&&3===r.nodeType;)r=r.parentNode;this.relatedTarget=r}("DOMMouseScroll"===e||"mousewheel"===e)&&(this.wheelDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3),this.which=t.which||t.keyCode,this.which||void 0===n||(this.which=1&n?1:2&n?3:4&n?2:0),this._fixed=!0}var a,s,u=t.exports,c=n(1),f=n(2),l=n(14),h=document.createElement("div"),p=function(){},d=l.NAMESPACE;u.body=document.body,u.doc=document,u.tNode=h,h.addEventListener?(a=function(t,e,n){t.addEventListener(e,n,!1)},s=function(t,e,n){t.removeEventListener(e,n,!1)}):(a=function(t,e,n){t.attachEvent("on"+e,n)},s=function(t,e,n){t.detachEvent("on"+e,n)}),u.msie=parseInt((/msie (\d+)/.exec(navigator.userAgent.toLowerCase())||[])[1]),isNaN(u.msie)&&(u.msie=parseInt((/trident\/.*; rv:(\d+)/.exec(navigator.userAgent.toLowerCase())||[])[1])),u.find=function(t){if(document.querySelector)try{return document.querySelector(t)}catch(e){}return-1!==t.indexOf("#")?document.getElementById(t.slice(1)):void 0},u.inject=function(t,e,n){if(n=n||"bottom",t){if(Array.isArray(t)){var r=t;t=u.fragment();for(var i=0,o=r.length;o>i;i++)t.appendChild(r[i])}var a,s;switch(n){case"bottom":e.appendChild(t);break;case"top":(a=e.firstChild)?e.insertBefore(t,e.firstChild):e.appendChild(t);break;case"after":(s=e.nextSibling)?s.parentNode.insertBefore(t,s):e.parentNode.appendChild(t);break;case"before":e.parentNode.insertBefore(t,e)}}},u.id=function(t){return document.getElementById(t)},u.create=function(t,e,n){if("svg"===e){if(!c.svg)throw Error("the env need svg support");e=d.svg}return e?document.createElementNS(e,t):document.createElement(t)},u.fragment=function(){return document.createDocumentFragment()};var v={"class":function(t,e){"className"in t&&(!t.namespaceURI||t.namespaceURI===d.html)?t.className=e||"":t.setAttribute("class",e)},"for":function(t,e){"htmlFor"in t?t.htmlFor=e:t.setAttribute("for",e)},style:function(t,e){t.style?t.style.cssText=e:t.setAttribute("style",e)},value:function(t,e){t.value=null!=e?e:""}};u.attr=function(t,e,n){if(f.isBooleanAttr(e)){if("undefined"==typeof n)return t[e]||(t.attributes.getNamedItem(e)||p).specified?e:void 0;n?(t[e]=!0,t.setAttribute(e,e),u.msie&&u.msie<=7&&"checked"===e&&(t.defaultChecked=!0)):(t[e]=!1,t.removeAttribute(e))}else if("undefined"!=typeof n)v[e]?v[e](t,n):null===n?t.removeAttribute(e):t.setAttribute(e,n);else if(t.getAttribute){var r=t.getAttribute(e,2);return null===r?void 0:r}},u.on=function(t,e,n){var r=e.split(" ");return n.real=function(e){var r=new o(e);r.origin=t,n.call(t,r)},r.forEach(function(e){e=i(t,e),a(t,e,n.real)}),u},u.off=function(t,e,n){var r=e.split(" ");n=n.real||n,r.forEach(function(e){e=i(t,e),s(t,e,n)})},u.text=function(){var t={};return u.msie&&u.msie<9?(t[1]="innerText",t[3]="nodeValue"):t[1]=t[3]="textContent",function(e,n){var r=t[e.nodeType];return null==n?r?e[r]:"":void(e[r]=n)}}(),u.html=function(t,e){return"undefined"==typeof e?t.innerHTML:void(t.innerHTML=e)},u.replace=function(t,e){e.parentNode&&e.parentNode.replaceChild(t,e)},u.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)},u.css=function(t,e,n){if("object"==typeof e&&e)for(var i in e)e.hasOwnProperty(i)&&u.css(t,i,e[i]);else{if("undefined"==typeof n){var o;return u.msie<=8&&(o=t.currentStyle&&t.currentStyle[e],""===o&&(o="auto")),o=o||t.style[e],u.msie<=8&&(o=""===o?void 0:o),o}e=r(e),e&&(t.style[e]=n)}},u.addClass=function(t,e){var n=t.className||"";-1===(" "+n+" ").indexOf(" "+e+" ")&&(t.className=n?n+" "+e:e)},u.delClass=function(t,e){var n=t.className||"";t.className=(" "+n+" ").replace(" "+e+" "," ").trim()},u.hasClass=function(t,e){var n=t.className||"";return-1!==(" "+n+" ").indexOf(" "+e+" ")};var m=/^(?:click|dblclick|contextmenu|DOMMouseScroll|mouse(?:\w+))$/,g=document;g=g.compatMode&&"CSS1Compat"!==g.compatMode?g.body:g.documentElement,f.extend(o.prototype,{stop:function(){this.preventDefault().stopPropagation()},preventDefault:function(){return this.event.preventDefault?this.event.preventDefault():this.event.returnValue=!1,this},stopPropagation:function(){return this.event.stopPropagation?this.event.stopPropagation():this.event.cancelBubble=!0,this},stopImmediatePropagation:function(){this.event.stopImmediatePropagation&&this.event.stopImmediatePropagation()}}),u.nextFrame=function(){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)},e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||function(t){clearTimeout(t)};return function(n){var r=t(n);return function(){e(r)}}}();var y;u.nextReflow=u.msie?function(t){return u.nextFrame(function(){y=document.body.offsetWidth,t()})}:u.nextFrame},function(t,e){t.exports={COMPONENT_TYPE:1,ELEMENT_TYPE:2,NAMESPACE:{html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"},OPTIONS:{STABLE_INIT:{stable:!0,init:!0},FORCE_INIT:{force:!0,init:!0},STABLE:{stable:!0},INIT:{init:!0},SYNC:{sync:!0},FORCE:{force:!0}}}},function(t,e,n){function r(t,e,n){for(var r=1;e>=r;r++){var i=n[t+r];i&&i.destroy(!0)}n.splice(t+1,e)}function i(t,e){return"array"===e?t:"object"===e?l.keys(t):[]}function o(t,e,n){for(var r=[],i=0,o=t.length;o>i;i++){var a=this._walk(t[i],{element:e,fromElement:!0,attrs:t,extra:n});a&&r.push(a)}return r}var a=n(16).diffArray,s=n(17),u=n(18),c=(n(11),n(19)),f=n(13),l=n(2),h=n(14),p=h.OPTIONS,d=t.exports={};d.list=function(t,e){function n(n,r,i,a){for(var c=n;r>c;c++){var f=i[c],h=l.createObject(x);o(h,c,f,a);var p=T.$compile(t.body,{extra:h,namespace:E,record:!0,outer:e.outer});p.data=h;var d=s.last(_.get(c));d.parentNode&&u.inject(s.node(p),d,"after"),N.splice(c+1,0,p)}}function o(t,e,n,r){t[w]=e,r?(t[b]=n,t[$]=r[n]):(t[$]=n,t[b]=null)}function f(t,e,n,r){for(var i=t;e>i;i++){var a=_.get(i+1),s=n[i];o(a.data,i,s,r)}}function h(t,e,i,o){var s=0,u=t.length;if(i||0===u&&0===e.length||(i=a(t,e,!0)),i&&i.length){for(var c=0;cy;)m(t[h],h)!==m(p[0],h)&&(r(h,1,N),n(h,h+1,t,o)),p.shift(),d--,h++,y++;v=p.length}f(s,h,t,o),r(h,v,N),n(h,h+d,t,o),s=h+d-v,s=0>s?0:s}if(u>s)for(var c=s;u>c;c++){var E=_.get(c+1);E.data[w]=c}}}function p(t,e,i){var o=t.length,a=e.length,s=Math.min(o,a);f(0,s,t,i),a>o?r(o,a-o,N):o>a&&n(a,o,t,i)}function v(t,n,r){var o,a=l.typeOf(t),c=l.typeOf(n),f=i(t,a),d=i(n,c),v=f&&f.length,m=d&&d.length;if(!m&&v&&_.get(1)){var g=N.pop();g.destroy&&g.destroy(!0)}if("object"===a&&(o=t),S===!0?p(f,d,o):h(f,d,r,o),!v&&A&&A.length){var w=T.$compile(A,{extra:x,record:!0,outer:e.outer,namespace:E});N.push(w),y.parentNode&&u.inject(s.node(w),y,"after")}}var m,g,y=(d.Regular,document.createComment("Regular list")),E=e.namespace,x=e.extra,T=this,_=new c([y]),N=_.children,w=t.variable+"_index",b=t.variable+"_key",$=t.variable,A=t.alternate,S=t.track;return S&&S!==!0&&(S=this._touchExpr(S),g=l.createObject(x),m=function(t,e){return g[$]=t,g[w]=e,S.get(T,g)}),this.$watch(t.sequence,v,{init:!0,diff:S!==!0,deep:!0}),_},d.template=function(t,e){var n,n,r=t.content,i=document.createComment("inlcude"),o=e.namespace,a=e.extra,s=new c([i]);if(r){var u=this;this.$watch(r,function(t){var r=s.get(1),c=typeof t;r&&(r.destroy(!0),s.children.pop()),t&&(s.push(n="function"===c?t():u.$compile("object"!==c?String(t):t,{record:!0,outer:e.outer,namespace:o,extra:a})),i.parentNode&&n.$inject(i,"before"))},p.INIT)}return s};var v=0;d["if"]=function(t,e){var n,r,i=this,o=e.extra;if(e&&e.element){var a=function(a){a?(r&&s.destroy(r),t.consequent&&(n=i.$compile(t.consequent,{record:!0,element:e.element,extra:o}))):(n&&s.destroy(n),t.alternate&&(r=i.$compile(t.alternate,{record:!0,element:e.element,extra:o})))};return this.$watch(t.test,a,p.FORCE),{destroy:function(){n?s.destroy(n):r&&s.destroy(r)}}}var n,r,f=document.createComment("Regular if"+v++),l=new c;l.push(f);var h=null,d=e.namespace,a=function(a,c){var p=!!a;p!==h&&(h=p,l.children[1]&&(l.children[1].destroy(!0),l.children.pop()),p?t.consequent&&t.consequent.length&&(n=i.$compile(t.consequent,{record:!0,outer:e.outer,namespace:d,extra:o}),l.push(n),f.parentNode&&u.inject(s.node(n),f,"before")):t.alternate&&t.alternate.length&&(r=i.$compile(t.alternate,{record:!0,outer:e.outer,namespace:d,extra:o}),l.push(r),f.parentNode&&u.inject(s.node(r),f,"before")))};return this.$watch(t.test,a,p.FORCE_INIT),l},d.expression=function(t,e){var n=document.createTextNode("");return this.$watch(t,function(t){f.text(n,null==t?"":String(t))},p.STABLE_INIT),n},d.text=function(t,e){var n=t.text,r=document.createTextNode(-1!==n.indexOf("&")?l.convertEntity(n):n);return r};var m=/^on-(.+)$/;d.element=function(t,e){var n,r,i=t.attrs,a=this.constructor,c=t.children,h=e.namespace,p=e.extra,v=t.tag,m=a.component(v);if("r-content"===v)return l.log("r-content is deprecated, use {#inc this.$body} instead (`{#include}` as same)","warn"),this.$body&&this.$body();if(m||"r-component"===v)return e.Component=m,d.component.call(this,t,e);"svg"===v&&(h="svg"),c&&c.length&&(n=this.$compile(c,{outer:e.outer,namespace:h,extra:p})),r=f.create(v,h,i),n&&!l.isVoidTag(v)&&f.inject(s.node(n),r),l.fixTagAST(t,a);var g=o.call(this,i,r,p);return{type:"element",group:n,node:function(){return r},last:function(){return r},destroy:function(t){t?u.remove(r,n?n.destroy.bind(n):l.noop):n&&n.destroy(),g.length&&g.forEach(function(t){t&&("function"==typeof t.destroy?t.destroy():t())})}}},d.component=function(t,e){for(var n,r,i,o,a=t.attrs,u=e.Component,f=this.constructor,h=e.extra,d=e.namespace,v=this,g={},y=0,E=a.length;E>y;y++){var x=a[y],T=this._touchExpr(void 0===x.value?!0:x.value);T.constant&&(T=x.value=T.get(this)),x.value&&x.value.constant===!0&&(T=T.get(this));var _=x.name;if(!x.event){var N=_.match(m);N&&(x.event=N[1])}if("cmpl"===x.mdf&&(T=l.getCompileFn(T,this,{record:!0,namespace:d,extra:h,outer:e.outer})),"is"===_&&!u){i=T;var w=this.$get(T,!0);if(u=f.component(w),"function"!=typeof u)throw new Error("component "+w+" has not registed!")}var b;(b=x.event)?(o=o||{},o[b]=l.handleEvent.call(this,T,b)):(_=x.name=l.camelCase(_),T&&"expression"===T.type?g[_]=T.get(v):g[_]=T,"ref"===_&&null!=T&&(r=T),"isolate"===_&&(n="expression"===T.type?T.get(v):parseInt(T===!0?3:T,10),g.isolate=n))}var $,A={data:g,events:o,$parent:2&n?null:this,$root:this.$root,$outer:e.outer,_body:{ctx:this,ast:t.children}},e={namespace:d,extra:e.extra},S=new u(A,e);r&&this.$refs&&($=u.directive("ref").link,this.$on("$destroy",$.call(this,S,r))),r&&v.$refs&&(v.$refs[r]=S);for(var y=0,E=a.length;E>y;y++){var x=a[y],T=x.value||!0,_=x.name;"expression"!==T.type||x.event||(T=v._touchExpr(T),2&n||this.$watch(T,function(t,e){this.data[t]=e}.bind(S,_),p.SYNC),!T.set||1&n||S.$watch(_,v.$update.bind(v,T),p.INIT))}if(i&&"expression"===i.type){var O=new c;return O.push(S),this.$watch(i,function(t){var e=f.component(t);if(!e)throw new Error("component "+t+" has not registed!");var n=new e(A),i=O.children.pop();O.push(n),n.$inject(s.last(i),"after"),i.destroy(),r&&(v.$refs[r]=n)},p.SYNC),O}return S},d.attribute=function(t,e){var n=t,r=n.name,i=n.value||"",o=i.constant,a=this.constructor,s=a.directive(r),u=e.element,c=this;if(i=this._touchExpr(i),o&&(i=i.get(this)),s&&s.link){var h={attrs:e.attrs,param:l.getParamObj(this,n.param)},d=s.link.call(c,u,i,r,h);return"function"==typeof s.update&&(l.isExpr(i)?this.$watch(i,function(t,e){s.update.call(c,u,t,e,h)}):s.update.call(c,u,i,void 0,h)),"function"==typeof d&&(d={destroy:d}),d}return"expression"===i.type?this.$watch(i,function(t,e){f.attr(u,r,t)},p.STABLE_INIT):l.isBooleanAttr(r)?f.attr(u,r,!0):f.attr(u,r,i),e.fromElement?void 0:{destroy:function(){f.attr(u,r,null)}}}},function(t,e,n){function r(t,e){var n=t.length,r=e.length;if(n!==r)return!0;for(var i=0;n>i;i++)if(t[i]!==e[i])return!0;return!1}function i(t,e){return t===e}function o(t,e,n){for(var r=t.length,o=e.length,n=n||i,a=[],s=0;r>=s;s++)a.push([s]);for(var u=1;o>=u;u++)a[0][u]=u;for(var s=1;r>=s;s++)for(var u=1;o>=u;u++)n(t[s-1],e[u-1])?a[s][u]=a[s-1][u-1]:a[s][u]=Math.min(a[s-1][u]+1,a[s][u-1]+1);return a}function a(t,e,n,i){if(!n)return r(t,e);for(var a=o(e,t,i),s=e.length,u=s,c=t.length,f=c,l=[],h=a[u][f];u>0||f>0;)if(0!==u)if(0!==f){var p=a[u-1][f-1],d=a[u-1][f],v=a[u][f-1],m=Math.min(v,d,p);m===d?(l.unshift(2),u--,h=d):m===p?(p===h?l.unshift(0):(l.unshift(1),h=p),u--,f--):(l.unshift(3),f--,h=v)}else l.unshift(2),u--;else l.unshift(3),f--;var g=0,y=3,E=2,x=1,s=0;c=0;for(var T=[],_={index:null,add:0,removed:[]},u=0;u0?null===_.index&&(_.index=c):null!=_.index&&(T.push(_),_={index:null,add:0,removed:[]}),l[u]){case g:s++,c++;break;case y:_.add++,c++;break;case E:_.removed.push(e[s]),s++;break;case x:_.add++,_.removed.push(e[s]),s++,c++}return null!=_.index&&T.push(_),T}function s(t,e,n){if(n){var r=u.keys(t),i=u.keys(e);return a(r,i,n,function(n,r){return t[r]===e[n]})}for(var o in t)if(e[o]!==t[o])return!0;for(var s in e)if(e[s]!==t[s])return!0;return!1}var u=n(2);t.exports={diffArray:a,diffObject:s}},function(t,e,n){var r=n(13),i=n(18),o=t.exports={node:function(t){var e,n;if(t){if("function"==typeof t.node)return t.node();if("number"==typeof t.nodeType)return t;if(t.group)return o.node(t.group);if(t=t.children||t,Array.isArray(t)){var r=t.length;if(1===r)return o.node(t[0]);n=[];for(var i=0,r=t.length;r>i;i++)e=o.node(t[i]),Array.isArray(e)?n.push.apply(n,e):e&&n.push(e);return n}}},inject:function(t,e){var n=this,a=o.node(n.group||n);if(t===!1)return i.remove(a),n;if(!a)return n;if("string"==typeof t&&(t=r.find(t)),!t)throw Error("injected node is not found");if(i.inject(a,t,e),n.$emit){var s=n.parentNode,u="after"===e||"before"===e?t.parentNode:t;n.parentNode=u,n.$emit("$inject",t,e,s)}return n},last:function(t){var e=t.children;return"function"==typeof t.last?t.last():"number"==typeof t.nodeType?t:e&&e.length?o.last(e[e.length-1]):t.group?o.last(t.group):void 0},destroy:function(t,e){if(t){if("number"==typeof t.nodeType)return e&&r.remove(t);if("function"==typeof t.destroy)return t.destroy(e);if(Array.isArray(t))for(var n=0,i=t.length;i>n;n++)o.destroy(t[n],e)}}};r.element=function(t,e){if(!t)return e?[]:null;var n=o.node(t);if(1===n.nodeType)return e?[n]:n;for(var r=[],i=0;in&&(n=e)}),n):0}var a=n(2),s=n(13),u={},c=n(1),f="transitionend",l="animationend",h="transition",p="animation";"ontransitionend"in window||("onwebkittransitionend"in window?(f+=" webkitTransitionEnd",h="webkitTransition"):("onotransitionend"in s.tNode||"Opera"===navigator.appName)&&(f+=" oTransitionEnd",h="oTransition")),"onanimationend"in window||("onwebkitanimationend"in window?(l+=" webkitAnimationEnd",p="webkitAnimation"):"onoanimationend"in s.tNode&&(l+=" oAnimationEnd",p="oAnimation")),u.inject=function(t,e,n,r){if(r=r||a.noop,Array.isArray(t)){for(var i=s.fragment(),o=0,u=0,c=t.length;c>u;u++)i.appendChild(t[u]);s.inject(i,e,n);var f=function(){o++,o===c&&r()};for(c===o&&r(),u=0;c>u;u++)t[u].onenter?t[u].onenter(f):f()}else s.inject(t,e,n),t.onenter?t.onenter(r):r()},u.remove=function(t,e){function n(){i++,i===a&&e&&e()}if(t){var i=0;if(Array.isArray(t))for(var o=0,a=t.length;a>o;o++)u.remove(t[o],n);else"function"==typeof t.onleave?t.onleave(function(){r(t,e)}):r(t,e)}},u.startClassAnimate=function(t,e,n,r){var o,u,h,p;return!l&&!f||c.isRunning?n():(p=4!==r?a.once(function(){h&&clearTimeout(h),2===r&&s.delClass(t,o),3!==r&&s.delClass(t,e),s.off(t,l,p),s.off(t,f,p),n()}):a.once(function(){h&&clearTimeout(h),n()}),2===r?(s.addClass(t,e),o=a.map(e.split(/\s+/),function(t){return t+"-active"}).join(" "),s.nextReflow(function(){s.addClass(t,o),u=i(t),h=setTimeout(p,u)})):4===r?s.nextReflow(function(){s.delClass(t,e),u=i(t),h=setTimeout(p,u)}):s.nextReflow(function(){s.addClass(t,e),u=i(t),h=setTimeout(p,u)}),s.on(t,l,p),s.on(t,f,p),p)},u.startStyleAnimate=function(t,e,n){var r,o,u;return s.nextReflow(function(){s.css(t,e),r=i(t),u=setTimeout(o,r)}),o=a.once(function(){u&&clearTimeout(u),s.off(t,l,o),s.off(t,f,o),n()}),s.on(t,l,o),s.on(t,f,o),o},t.exports=u},function(t,e,n){function r(t){this.children=t||[]}var i=n(2),o=n(17),a=i.extend(r.prototype,{destroy:function(t){o.destroy(this.children,t),this.ondestroy&&this.ondestroy(),this.children=null},get:function(t){return this.children[t]},push:function(t){this.children.push(t)}});a.inject=a.$inject=o.inject,t.exports=r},function(t,e,n){function r(){}var i=n(2),o={$on:function(t,e,n){if("object"==typeof t&&t)for(var r in t)this.$on(r,t[r],e);else{n=n||{};var i,o=this,a=o._handles||(o._handles={}),s=a[t]||(a[t]=[]);n.once&&(i=function(){e.apply(this,arguments),this.$off(t,e)},e.real=i),s.push(i||e)}return this},$off:function(t,e){var n=this;if(n._handles){t||(this._handles={});var r,i=n._handles;if(r=i[t]){if(!e)return i[t]=[],n;e=e.real||e;for(var o=0,a=r.length;a>o;o++)if(e===r[o])return r.splice(o,1),n}return n}},$emit:function(t){var e,n,r,o=this,a=o._handles;if(t){var n=i.slice(arguments,1),r=t;if(!a)return o;if(e=a[r.slice(1)])for(var s=0,u=e.length;u>s;s++)e[s].apply(o,n);if(!(e=a[r]))return o;for(var c=0,u=e.length;u>c;c++)e[c].apply(o,n);return o}},$once:function(t,e){var n=i.slice(arguments);return n.push({once:!0}),this.$on.apply(this,n)}};i.extend(r.prototype,o),r.mixTo=function(t){t="function"==typeof t?t.prototype:t,i.extend(t,o)},t.exports=r},function(t,e,n){function r(){}var i=n(2),o=n(22).expression,a=n(16),s=a.diffArray,u=a.diffObject,c={$watch:function(t,e,n){var r,a,s,u,c=this.__ext__;this._watchers||(this._watchers=[]),this._watchersForStable||(this._watchersForStable=[]),n=n||{},n===!0&&(n={deep:!0});var f=i.uid("w_");if(Array.isArray(t)){for(var l=[],h=0,p=t.length;p>h;h++)l.push(this.$expression(t[h]).get);var d=[];s=function(t){for(var e=!0,n=0,r=l.length;r>n;n++){var o=l[n](t,c);i.equals(o,d[n])||(e=!1,d[n]=i.clone(o))}return e?!1:d}}else"function"==typeof t?r=t.bind(this):(t=this._touchExpr(o(t)),r=t.get,a=t.once);var v={id:f,get:r,fn:e,once:a,force:n.force,diff:n.diff,test:s,deep:n.deep,last:n.sync?r(this):n.last};if(this[n.stable?"_watchersForStable":"_watchers"].push(v),u=this._records&&this._records.length,u&&this._records[u-1].push(v),n.init===!0){var m=this.$phase;this.$phase="digest",this._checkSingleWatch(v),this.$phase=m}return v},$unwatch:function(t){if(this._watchers&&t){var e=this._watchers,n=typeof t;if("object"===n){var r=t.length;if(r)for(;r-->=0;)this.$unwatch(t[r]);else t.removed=!0}else if("number"===n){var o=t;return t=i.findItem(e,function(t){return t.id===o}),t||(t=i.findItem(this._watchersForStable,function(t){return t.id===o})),this.$unwatch(t)}return this}},$expression:function(t){return this._touchExpr(o(t))},$digest:function(){if("digest"!==this.$phase&&!this._mute){this.$phase="digest";for(var t=!1,e=0;t=this._digest();)if(++e>20)throw Error("there may a circular dependencies reaches");var n=this._digest(!0);(e>0||n)&&this.$emit&&(this.$emit("$update"),this.devtools&&this.devtools.emit("flush",this)),this.$phase=null}},_digest:function(t){var e,n,r,i=t?this._watchersForStable:this._watchers,o=!1,a=i&&i.length;if(a)for(var s=0,u=0,c=0;a>c;c++){n=i[c];var f=!n||n.removed;f?u+=1:(r=this._checkSingleWatch(n),r&&(o=!0)),f&&c!==a-1||(u&&(i.splice(s,u),a-=u,c-=u,u=0),s=c+1)}if(e=this._children,e&&e.length)for(var l=0,h=e.length;h>l;l++){var p=e[l];p&&p._digest(t)&&(o=!0)}return o},_checkSingleWatch:function(t){var e=!1;if(t){var n,r,o,a,c,f;if(t.test){var l=t.test(this);l&&(e=!0,t.fn.apply(this,l))}else n=t.get(this),r=t.last,(n!==r||t.force)&&(o=i.typeOf(r),a=i.typeOf(n),c=!0,"object"===a&&"object"===o&&t.deep?(f=u(n,r,t.diff),(f===!0||f.length)&&(e=!0)):"array"!==a||"undefined"!=o&&"array"!==o?(c=i.equals(n,r),(!c||t.force)&&(t.force=null,e=!0)):(f=s(n,t.last||[],t.diff),("array"!==o||f===!0||f.length)&&(e=!0)));return e&&!t.test&&("object"===a&&t.deep||"array"===a?t.last=i.clone(n):t.last=n,t.fn.call(this,n,r,f),t.once&&this.$unwatch(t)),e}},$set:function(t,e){if(null!=t){var n=typeof t;if("string"===n||"expression"===t.type)t=this.$expression(t),t.set(this,e);else if("function"===n)t.call(this,this.data);else for(var r in t)this.$set(r,t[r])}},$get:function(t,e){return e&&"string"==typeof t?t:this.$expression(t).get(this)},$update:function(){var t=this;do{if(t.data.isolate||!t.$parent)break;t=t.$parent}while(t);var e=t.$phase;return t.$phase="digest",this.$set.apply(this,arguments),t.$phase=e,t.$digest(),this},_record:function(){this._records||(this._records=[]),this._records.push([])},_release:function(){return this._records.pop()}};i.extend(r.prototype,c),r.mixTo=function(t){return t="function"==typeof t?t.prototype:t,i.extend(t,c)},t.exports=r},function(t,e,n){var r=n(1).exprCache,i=(n(2),n(10));t.exports={expression:function(t,e){return"string"==typeof t&&(t=t.trim())&&(t=r.get(t)||r.set(t,new i(t,{mode:2,expression:!0}).expression())),t?t:void 0},parse:function(t){return new i(t).parse()}}},function(t,e){var n=t.exports={};n.json={get:function(t){return"undefined"!=typeof JSON?JSON.stringify(t):t},set:function(t){return"undefined"!=typeof JSON?JSON.parse(t):t}},n.last=function(t){return t&&t[t.length-1]},n.average=function(t,e){return t=t||[],t.length?n.total(t,e)/t.length:0},n.total=function(t,e){var n=0;if(t)return t.forEach(function(t){n+=e?t[e]:t}),n}},function(t,e,n){var r=n(2),i=n(13),o=(n(18),n(8)),a=n(14),s=a.NAMESPACE,u=a.OPTIONS,c=u.STABLE,f={deep:!0,stable:!0};n(25),n(26),t.exports={"r-class":function(t,e){"string"==typeof e&&(e=r.fixObjStr(e));var n=t.namespaceURI&&t.namespaceURI!==s.html;this.$watch(e,function(e){var r=n?t.getAttribute("class"):t.className;r=" "+(r||"").replace(/\s+/g," ")+" ";for(var o in e)e.hasOwnProperty(o)&&(r=r.replace(" "+o+" "," "),e[o]===!0&&(r+=o+" "));r=r.trim(),n?i.attr(t,"class",r):t.className=r},f)},"r-style":function(t,e){"string"==typeof e&&(e=r.fixObjStr(e)),this.$watch(e,function(e){for(var n in e)e.hasOwnProperty(n)&&i.css(t,n,e[n])},f)},"r-hide":function(t,e){var n,i=null;r.isExpr(e)||"string"==typeof e?this.$watch(e,function(e){var r=!!e;r!==i&&(i=r,r?t.onleave?n=t.onleave(function(){t.style.display="none",n=null}):t.style.display="none":(n&&n(),t.style.display="",t.onenter&&t.onenter()))},c):e&&(t.style.display="none")},"r-html":function(t,e){this.$watch(e,function(e){e=e||"",i.html(t,e)},{force:!0,stable:!0})},ref:{accept:a.COMPONENT_TYPE+a.ELEMENT_TYPE,link:function(t,e){var n,i=this.$refs||(this.$refs={});return r.isExpr(e)?this.$watch(e,function(e,r){n=e,i[r]===t&&(i[r]=null),n&&(i[n]=t)},c):i[n=e]=t,function(){i[n]=null}}}},o.directive(t.exports)},function(t,e,n){function r(t,e,n){if(n)for(var r,i=t.target;i&&i!==n;){for(var o=0,a=e.length;a>o;o++)r=e[o],r&&r.element===i&&r.fire(t);i=i.parentNode}}var i=n(2),o=n(13),a=n(8);a._addProtoInheritCache("event"),a.directive(/^on-\w+$/,function(t,e,n,r){if(n&&e){var i=n.split("-")[1];return this._handleEvent(t,i,e,r)}}),a.directive(/^(delegate|de)-\w+$/,function(t,e,n){function a(t){r(t,u[c],s.parentNode)}var s=this.$root,u=s._delegates||(s._delegates={});if(n&&e){var c=n.split("-")[1],f=i.handleEvent.call(this,e,c);u[c]||(u[c]=[],s.parentNode?o.on(s.parentNode,c,a):s.$on("$inject",function(t,e,n){var r=this.parentNode;n&&o.off(n,c,a),r&&o.on(this.parentNode,c,a)}),s.$on("$destroy",function(){s.parentNode&&o.off(s.parentNode,c,a),u[c]=null}));var l={element:t,fire:f};return u[c].push(l),function(){var t=u[c];if(t&&t.length)for(var e=0,n=t.length;n>e;e++)t[e]===l&&t.splice(e,1)}}})},function(t,e,n){function r(t,e,n){function r(){e.set(i,this.value),o.last=this.value,i.$update()}var i=this,o=this.$watch(e,function(e){for(var n=t.getElementsByTagName("option"),r=0,i=n.length;i>r;r++)if(n[r].value==e){t.selectedIndex=r;break}},h);return c.on(t,"change",r),void 0===e.get(i)&&t.value&&e.set(i,t.value),function(){c.off(t,"change",r)}}function i(t,e,n){var r,i=n.param,o=i.lazy;"throttle"in i&&(r=i[r]===!0?400:parseInt(i.throttle,10));var a=this,f=this.$watch(e,function(e){t.value!==e&&(t.value=null==e?"":""+e)},h),l=function(t){var n=this;if("cut"===t.type||"paste"===t.type)u.nextTick(function(){var t=n.value;e.set(a,t),f.last=t,a.$update()});else{var r=n.value;e.set(a,r),f.last=r,a.$update()}};if(r&&!o){l=u.throttle(l,r)}return void 0===s&&(s=9!==c.msie&&"oninput"in document.createElement("input")),o?c.on(t,"change",l):s?t.addEventListener("input",l):c.on(t,"paste keyup cut change",l),void 0===e.get(a)&&t.value&&e.set(a,t.value),function(){return o?c.off(t,"change",l):void(s?t.removeEventListener("input",l):c.off(t,"paste keyup cut change",l))}}function o(t,e){var n=this,r=this.$watch(e,function(e){c.attr(t,"checked",!!e)},h),i=function(){var t=this.checked;e.set(n,t),r.last=t,n.$update()};return e.set&&c.on(t,"change",i),void 0===e.get(n)&&e.set(n,!!t.checked),function(){e.set&&c.off(t,"change",i)}}function a(t,e){var n=this,r=(this.$watch(e,function(e){e==t.value?t.checked=!0:t.checked=!1},h),function(){var t=this.value;e.set(n,t),n.$update()});return e.set&&c.on(t,"change",r),void 0===e.get(n)&&t.checked&&e.set(n,t.value),function(){e.set&&c.off(t,"change",r)}}var s,u=n(2),c=n(13),f=n(8),l=n(14).OPTIONS,h=l.STABLE,p={text:i,select:r,checkbox:o,radio:a};f.directive("r-model",{param:["throttle","lazy"],link:function(t,e,n,r){var i=t.tagName.toLowerCase(),o=i;return"input"===o?o=t.type||"text":"textarea"===o&&(o="text"),"string"==typeof e&&(e=this.$expression(e)),p[o]?p[o].call(this,t,e,r):"input"===i?p.text.call(this,t,e,r):void 0}})},function(t,e,n){function r(t){var e,n=[],r=0,i=o.noop,a={type:t,start:function(t){return e=o.uid(),"function"==typeof t&&(i=t),r>0?r=0:a.step(),a.compelete},compelete:function(){e=null,i&&i(),i=o.noop,r=0},step:function(){n[r]&&n[r](a.done.bind(a,e))},done:function(t){t===e&&(rE;E++)if(u=m[E],d=u.split(":"),h=d[0]&&d[0].trim(),p=d[1]&&d[1].trim(),h)if(h!==c)if(h!==f){var v=s.animation(h);if(!v||!l)throw Error(v?"you should start with `on` or `event` in animation":"undefined animator 【"+h+"】");l.push(v.call(this,{element:t,done:l.done,param:p}))}else n(p),"leave"===p?(t.onleave=l.start,y.push(a(t))):"enter"===p?(t.onenter=l.start,y.push(a(t))):"on"+p in t?y.push(this._handleEvent(t,p,l.start)):(this.$on(p,l.start),y.push(this.$off.bind(this,p,l.start)));else n("when"),this.$watch(p,i.bind(this,l.start));return y.length?function(){y.forEach(function(t){t()})}:void 0}var o=n(2),a=n(18),s=(n(13),n(8)),u=/\s+/,c="when",f="on";s._addProtoInheritCache("animation"),s.animation({wait:function(t){var e=parseInt(t.param)||0;return function(t){setTimeout(t,e)}},"class":function(t){var e=t.param.split(","),n=e[0]||"",r=parseInt(e[1])||1;return function(e){a.startClassAnimate(t.element,n,e,r)}},call:function(t){var e=this.$expression(t.param).get,n=this;return function(t){e(n),n.$update(),t()}},emit:function(t){var e=t.param,n=e.split(","),r=n[0]||"",i=n[1]?this.$expression(n[1]).get:null;if(!r)throw Error("you shoud specified a eventname in emit command");var o=this;return function(t){o.$emit(r,i?i(o):void 0),t()}},style:function(t){var e,n={},r=t.param,i=r.split(","); +return i.forEach(function(t){if(t=t.trim()){var r=t.split(u),i=r.shift(),o=r.join(" ");if(!i||!o)throw Error("invalid style in command: style");n[i]=o,e=!0}}),function(r){e?a.startStyleAnimate(t.element,n,r):r()}}}),s.directive("r-animation",i),s.directive("r-anim",i)},function(t,e,n){function r(t){t.implement({$timeout:function(t,e){return e=e||0,setTimeout(function(){t.call(this),this.$update()}.bind(this),e)},$interval:function(t,e){return e=e||1e3/60,setInterval(function(){t.call(this),this.$update()}.bind(this),e)}})}var i=n(8);i.plugin("timeout",r),i.plugin("$timeout",r)}])}); \ No newline at end of file diff --git a/package.json b/package.json index f872282..0ab1f16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "regularjs", - "version": "0.5.1", + "version": "0.5.2", "author": { "name": "leeluolee" },