From e1d12027586832cc5bbf8e0586e542b808d2bb34 Mon Sep 17 00:00:00 2001 From: qitmac000408 Date: Thu, 17 Sep 2015 10:22:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- avalon.js | 4 ++-- dist/avalon.js | 4 ++-- dist/avalon.modern.js | 4 ++-- dist/avalon.modern.min.js | 2 +- dist/avalon.modern.shim.js | 4 ++-- dist/avalon.shim.js | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/avalon.js b/avalon.js index 204069e95..5091e8b47 100644 --- a/avalon.js +++ b/avalon.js @@ -5,7 +5,7 @@ http://weibo.com/jslouvre/ Released under the MIT license - avalon.js 1.5.1 built in 2015.9.17 + avalon.js 1.5.2 built in 2015.9.17 support IE6+ and other browsers ==================================================*/ (function(global, factory) { @@ -292,7 +292,7 @@ function _number(a, len) { //用于模拟slice, splice的效果 avalon.mix({ rword: rword, subscribers: subscribers, - version: 1.51, + version: 1.52, ui: {}, log: log, slice: W3C ? function (nodes, start, end) { diff --git a/dist/avalon.js b/dist/avalon.js index 204069e95..5091e8b47 100644 --- a/dist/avalon.js +++ b/dist/avalon.js @@ -5,7 +5,7 @@ http://weibo.com/jslouvre/ Released under the MIT license - avalon.js 1.5.1 built in 2015.9.17 + avalon.js 1.5.2 built in 2015.9.17 support IE6+ and other browsers ==================================================*/ (function(global, factory) { @@ -292,7 +292,7 @@ function _number(a, len) { //用于模拟slice, splice的效果 avalon.mix({ rword: rword, subscribers: subscribers, - version: 1.51, + version: 1.52, ui: {}, log: log, slice: W3C ? function (nodes, start, end) { diff --git a/dist/avalon.modern.js b/dist/avalon.modern.js index 9d465f5b9..a1bd460af 100644 --- a/dist/avalon.modern.js +++ b/dist/avalon.modern.js @@ -5,7 +5,7 @@ http://weibo.com/jslouvre/ Released under the MIT license - avalon.modern.js 1.5.1 built in 2015.9.17 + avalon.modern.js 1.5.2 built in 2015.9.17 support IE10+ and other browsers ==================================================*/ (function(global, factory) { @@ -257,7 +257,7 @@ function _number(a, len) { //用于模拟slice, splice的效果 avalon.mix({ rword: rword, subscribers: subscribers, - version: 1.51, + version: 1.52, ui: {}, log: log, slice: function(nodes, start, end) { diff --git a/dist/avalon.modern.min.js b/dist/avalon.modern.min.js index cf38da343..b35e903a6 100644 --- a/dist/avalon.modern.min.js +++ b/dist/avalon.modern.min.js @@ -1,3 +1,3 @@ -!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("Avalon requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(){e.console&&avalon.config.debug&&Function.apply.call(console.log,console,arguments)}function r(){}function i(e,t){"string"==typeof e&&(e=e.match(Kt)||[]);for(var n={},r=void 0!==t?t:1,a=0,i=e.length;i>a;a++)n[e[a]]=r;return n}function o(){if(e.VBArray){var t=document.documentMode;return t?t:e.XMLHttpRequest?7:6}return 0/0}function l(e){return tn.test(an.call(e))}function s(e,t){return e=Math.floor(e)||0,0>e?Math.max(t+e,0):Math.min(e,t)}function c(e){if(!e)return!1;var t=e.length;if(t===t>>>0){var n=an.call(e).slice(8,-1);if(/(?:regexp|string|function|window|global)$/i.test(n))return!1;if("Array"===n)return!0;try{return{}.propertyIsEnumerable.call(e,"length")===!1?/^\s?function/.test(e.item||e.callee):!0}catch(r){return!e.window}}return!1}function u(e,t,n){var r="for(var "+e+"i=0,n = this.length; i < n; i++){"+t.replace("_","((i in this) && fn.call(scope,this[i],i,this))")+"}"+n;return Function("fn,scope",r)}function f(e,t){try{for(;t=t.parentNode;)if(t===e)return!0;return!1}catch(n){return!1}}function d(){return(new XMLSerializer).serializeToString(this)}function p(e,t){if(e&&e.childNodes)for(var n,r=e.childNodes,a=0;n=r[a++];)if(n.tagName){var i=Vt.createElementNS(An,n.tagName.toLowerCase());on.forEach.call(n.attributes,function(e){i.setAttribute(e.name,e.value)}),p(n,i),t.appendChild(i)}}function v(e){var t={};for(var n in e)t[n]=e[n];var r=t.target=e.srcElement;if(0===e.type.indexOf("key"))t.which=null!=e.charCode?e.charCode:e.keyCode;else if(On.test(e.type)){var a=r.ownerDocument||Vt,i="BackCompat"===a.compatMode?a.body:a.documentElement;t.pageX=e.clientX+(i.scrollLeft>>0)-(i.clientLeft>>0),t.pageY=e.clientY+(i.scrollTop>>0)-(i.clientTop>>0),t.wheelDeltaY=t.wheelDelta,t.wheelDeltaX=0}return t.timeStamp=new Date-0,t.originalEvent=e,t.preventDefault=function(){e.returnValue=!1},t.stopPropagation=function(){e.cancelBubble=!0},t}function h(e){for(var t in e)if(rn.call(e,t)){var n=e[t];"function"==typeof h.plugins[t]?h.plugins[t](n):"object"==typeof h[t]?avalon.mix(h[t],n):h[t]=n}return this}function m(e){return(e+"").replace(Fn,"\\$&")}function g(e,t){var n=this.$events||(this.$events={}),a=n[e]||(n[e]=[]);if("function"==typeof t){var i=t;i.uuid=Math.random(),t={element:cn,type:"user-watcher",handler:r,vmodels:[this],expr:e,uuid:i.uuid},t.wildcard=/\*/.test(e)}if(t.update)t.oneTime||avalon.Array.ensure(a,t);else{if(/\w\.*\B/.test(e)){t.getter=r;var o=this;t.update=function(){var e=this.fireArgs||[];e[2]&&t.handler.apply(o,e),delete this.fireArgs},a.sync=!0,avalon.Array.ensure(a,t)}else avalon.injectBinding(t);i&&(t.handler=i)}return function(){t.update=t.getter=t.handler=r,t.element=Vt.createElement("a")}}function y(e,t){var n=this.$events;if(n&&n[e]){t&&(t[2]=e),x(n[e],t);var r=this.$up;r&&r.$event&&(this.$pathname&&y.call(r,this.$pathname+"."+e,t),y.call(r,"*."+e,t))}else if(r=this.$up){var a=this.$pathname+"."+e,i=a.split(".");-1===i.indexOf("*")?(y.call(r,a,t),i[1]="*",y.call(r,i.join("."),t)):y.call(r,a,t)}}function b(e,t){for(;;){if(e.$watch){var n=e.$events||(e.$events={}),r=n[t]||(n[t]=[]);return void Qn.collectDependency(r)}if(e=e.$up,!e)break;t=e.$pathname+"."+t}}function x(e,t){if(e){new Date-nr>444&&"object"==typeof e[0]&&F();for(var n,r=[],a=[],i=0;n=e[i++];)"user-watcher"===n.type?r.push(n):a.push(n);if(h.async){for(ua.render(),i=0;n=a[i++];)if(n.update){var o=H(n);ua.queue[o]||(ua.queue[o]=1,ua.queue.push(n))}}else for(i=0;n=a[i++];)n.update&&n.update();for(i=0;n=r[i++];)(t&&t[2]===n.expr||n.wildcard)&&(n.fireArgs=t),n.update()}}function $(e,t){return t=t||{},t.watch=!0,C(e,t)}function w(){}function C(e,t){function r(e){return u[e]===!0}if(!e||e.$id&&e.$accessors)return e;t=t||Zt;var a=t.force||Zt,o=t.old,l="object"==typeof o?o.$accessors:Zt,s=new w,c={},u={},f=[],d=[],p={};e.$skipArray&&(p=i(e.$skipArray),delete e.$skipArray);var v=e.$computed;if(v){delete e.$computed;for(var h in v)u[h]=!0,function(e,t){var n;c[e]={get:function(){return n=t.get.call(this)},set:function(r){if("function"==typeof t.set){var a=n;t.set.call(this,r);var i=this[e];this.$fire&&i!==a&&this.$fire(e,i,a)}},enumerable:!0,configurable:!0}}(h,v[h])}for(h in e){var m=e[h];qn[h]||(u[h]=!0),"function"==typeof m||m&&m.nodeType||!a[h]&&("$"===h.charAt(0)||qn[h]||p[h])?f.push(h):k(m)?(n("warning:计算属性建议放在$computed对象中统一定义"),function(e,t){var n;c[e]={get:function(){return n=t.get.call(this)},set:function(r){if("function"==typeof t.set){var a=n;t.set.call(this,r);var i=this[e];this.$fire&&i!==a&&this.$fire(e,i,a)}},enumerable:!0,configurable:!0}}(h,m)):(d.push(h),c[h]=l[h]?l[h]:N(h,m))}c.$model=Xn,s=Un(s,c,e),f.forEach(function(t){s[t]=e[t]}),E(s,"$id","anonymous"),E(s,"$up",o?o.$up:null),E(s,"$track",Object.keys(u)),E(s,"$active",!1),E(s,"$pathname",o?o.$pathname:""),E(s,"$accessors",c),E(s,"hasOwnProperty",r),t.watch&&(E(s,"$watch",function(){return g.apply(s,arguments)}),E(s,"$fire",function(e,t){if(0===e.indexOf("all!")){var n=e.slice(4);for(var r in avalon.vmodels){var a=avalon.vmodels[r];a.$fire&&a.$fire.apply(a,[n,t])}}else y.call(s,e,[t])})),d.forEach(function(t){var n=s[t]=e[t];n&&"object"==typeof n&&(n.$up=s,n.$pathname=t),y.call(s,t)});for(h in v)m=s[h];return s.$active=!0,s}function k(e){if(e&&"object"==typeof e){for(var t in e)if("get"!==t&&"set"!==t)return!1;return"function"==typeof e.get}}function N(e,t){var n;return t=0/0,{get:function(){return this.$active&&b(this,e),t},set:function(r){if(t!==r){var a=t;n=T(r,t),n?t=n:(n=void 0,t=r),Object(n)===n&&(n.$pathname=e,n.$up=this),this.$active&&y.call(this,e,[t,a])}},enumerable:!0,configurable:!0}}function T(e,t,n,r){if(Array.isArray(e))return A(e,t,r);if(avalon.isPlainObject(e)){if(t){var a=Wn(e),i=Wn(t);if(a.join(";")===i.join(";")){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t}t.$active=!1}return C(e,{old:t,watch:r})}return n?e:void 0}function A(e,t,n){if(t){var r=[0,t.length].concat(e);return t.splice.apply(t,r),t}for(var a in Zn)e[a]=Zn[a];E(e,"$up",null),E(e,"$pathname",""),E(e,"$track",M(e.length)),e._=C({length:0/0},{watch:!0}),e._.length=e.length,e._.$watch("length",function(t,n){y.call(e.$up,e.$pathname+".length",[t,n])}),n&&E(e,"$watch",function(){return g.apply(e,arguments)}),sn?Object.defineProperty(e,"$model",Xn):e.$model=O(e);for(var i=0,o=e.length;o>i;i++){var l=e[i]=T(e[i],0,1,1);Object(l)&&(l.$up=e)}return e}function E(e,t,n){Vn?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!1,configurable:!0}):e[t]=n}function O(e){var t=avalon.type(e);if("array"===t){for(var n=[],r=0;rr;r++){n[r]=e[r];var i=t[r];i in n?(e[r]=n[i],delete n[i]):e[r]=e[i]}}function M(e){for(var t=[],n=0;e>n;n++)t[n]=pn("$proxy$each");return t}function j(e,t,n){switch(t){case"push":case"unshift":n=M(n.length);break;case"splice":if(n.length>2){{n[1],n.length-2}n=[n[0],n[1]].concat(M(n.length-2))}}Array.prototype[t].apply(e,n)}function L(e,t){t.oneTime||e&&avalon.Array.ensure(e,t)&&t.element&&(P(t,e),new Date-nr>444&&F())}function D(e,t){for(var n,r=[],a=0;n=e[a++];)r.push(t?n.$id:n.$key);return r.join(";")}function H(e){if(!e.uuid){var t=e.element;e.uuid=t?1!==t.nodeType?e.type+(e.pos||0)+"-"+H(t.parentNode):e.name+"-"+H(t):++er}return e.uuid}function P(e,t){var n=e.lists||(e.lists=[]),r=H(e);avalon.Array.ensure(n,t),t.$uuid=t.$uuid||pn(),tr[r]||(tr[r]=1,tr.push(e))}function F(e){for(var t=tr.length,n=t,r=[],a={},i={};e=tr[--t];){var o=e.type;i[o]?i[o]++:(i[o]=1,r.push(o))}var l=!1;if(r.forEach(function(e){rr[e]!==i[e]&&(a[e]=1,l=!0)}),t=n,l)for(;e=tr[--t];)if(null!==e.element){if(a[e.type]&&B(e.element)){tr.splice(t,1),delete tr[e.uuid];for(var s,c=e.lists,u=0;s=c[u++];)avalon.Array.remove(c,s),avalon.Array.remove(s,e);R(e)}}else tr.splice(t,1);rr=i,nr=new Date}function R(e){delete tr[e.uuid],e.element=null,e.rollback&&e.rollback();for(var t in e)e[t]=null}function B(e){try{{e.parentNode.nodeType}}catch(t){return!0}return e.ifRemove&&!cn.contains(e.ifRemove)&&zt===e.parentNode?(e.parentNode&&e.parentNode.removeChild(e),!0):e.msRetain?0:1===e.nodeType?!cn.contains(e):!avalon.contains(cn,e)}function q(e){var t=e.nodeName;return t.toLowerCase()===t&&e.scopeName&&""===e.outerText}function I(e){"url(#default#VML)"!==e.currentStyle.behavior&&(e.style.behavior="url(#default#VML)",e.style.display="inline-block",e.style.zoom=1)}function V(e){return e.replace(/([a-z\d])([A-Z]+)/g,"$1-$2").toLowerCase()}function U(e){return!e||e.indexOf("-")<0&&e.indexOf("_")<0?e:e.replace(/[-_][^-_]/g,function(e){return e.charAt(1).toUpperCase()})}function z(e){if(!("classList"in e)){e.classList={node:e};for(var t in dr)e.classList[t.slice(1)]=dr[t]}return e.classList}function W(e){try{if("object"==typeof e)return e;e="true"===e?!0:"false"===e?!1:"null"===e?null:+e+""===e?+e:pr.test(e)?avalon.parseJSON(e):e}catch(t){}return e}function X(e){return e.window&&e.document?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}function Y(e,t){if(e.offsetWidth<=0){if(Er.test(yr["@:get"](e,"display"))){var n={node:e};for(var r in Ar)n[r]=e.style[r],e.style[r]=Ar[r];t.push(n)}var a=e.parentNode;a&&1===a.nodeType&&Y(a,t)}}function G(e){var t=e.tagName.toLowerCase();return"input"===t&&/checkbox|radio/.test(e.type)?"checked":t}function J(e,t,n,r){return e.slice(0,t)+"."+e.slice(t).replace("["+n+"]",r)}function Z(e){for(var t=0,n=0,r={},a="",i=[],o=!1,l=function(a){if(!(0>n)){var i=t,o=e.slice(n,i),l=n+"-"+(i-1);r[l]=o,_r[o]&&"."!==e.charAt(n-1)&&delete r[l],a&&(r[n]="*"),n=-1}},s=function(a){var o=i.pop(),l=a?t-1:t,s=e.slice(o,l);try{var u=Function("return "+s)();u+="",e=J(e,o-1,s,u),t=o+u.length-1,r[o+"-"+t]=u,c="word",n=-1}catch(f){e=J(e,o-1,s,"*"),t=o,r[o]="*",c="word",n=-1}},c="unknown",u={unknown:function(){jr(d)?(c="word",n=t):34===d||39===d?(c="string",a=d):93===d&&s()},word:function(){/\B/.test(p)&&(c="unknown",e=e.slice(0,t)+e.slice(t).replace(/\s*(\.|\[)\s*/,function(e,t){return t}),p=e.charAt(t),46===d?(c="dot",l(),r[t]="."):91===d?(r[t]=".",l(),i.push(t+1)):93===d?n>0?l(!0):s(!0):l())},dot:function(){c="unknown",(d>=48&&57>=d||42===d||jr(d))&&(c="word",n=t)},string:function(){o?o=!1:(92===d&&(o=!0),d===a&&(c="unknown"))}},f=e.length;;){var d=e.charCodeAt(t);if(d!==d){l();break}if(0===f--)break;var p=e.charAt(t);u[c](),t++}var v=[];for(t in r){var h=r[t],m=t.split("-");v.push({first:~~m[0],last:~~m[1]||~~m[0],text:h})}v.sort(function(e,t){return e.first-t.first});for(var g={};;){var y=v.shift();if(!y)break;var b=!0;e:for(t in g)if(m=t.split("-"),Number(m[1])+1===y.first){g[m[0]+"-"+y.last]=g[t]+y.text,delete g[t],b=!1;break e}b&&(g[y.first+"-"+y.last]=y.text)}var x=[],$={};for(t in g){var w=g[t];$[w]||($[w]=!0,x.push(w))}return x}function K(e,t,n,r){for(var a,i=[],o=" = "+n+".",l=e.length;a=e[--l];)for(var s,c=a.split("."),u=c[0];s=c.shift();)t.hasOwnProperty(s)&&(i.push(u+o+u),r.observers.push({v:t,p:a}),e.splice(l,1));return i}function Q(e){e=e.trim();var t=Dr.get(e);return t?t.concat():(t=Z(e),Dr.put(e,t).concat())}function et(e,t,n){var a=n.filters;"string"==typeof a&&a.trim()&&!n._filters&&(n._filters=nt(a.trim()));var i=Q(e),o=new Date-0,l=[],s=[],c=[];n.observers=[];for(var u=0,f=t.length;f>u;u++)if(i.length){var d="vm"+o+"_"+u;s.push(d),c.push(t[u]),l.push.apply(l,K(i,t[u],d,n))}n.args=c;var p=n.type,v=t.map(function(e){return String(e.$id).replace(Lr,"$1")})+e+p,h=Hr.get(v);if(h){if("duplex"===p){var m=Hr.get(v+"setter");n.setter=m.apply(m,n.args)}return n.getter=h}if(l.length||l.push("fix"+o),"duplex"===p){var g={};l.forEach(function(e){var t=e.split("=");g[t[0].trim()]=t[1].trim()}),e=e.replace(/[\$\w]+/,function(e){return g[e]?g[e]:e});var y=Function.apply(r,s.concat("'use strict';return function(vvv){"+e+" = vvv\n}\n"));Hr.put(v+"setter",y),n.setter=y.apply(y,n.args)}if("on"===p){-1===e.indexOf("(")?e+=".call(this, $event)":e=e.replace("(",".call(this,"),s.push("$event"),e="\nreturn "+e+";";var b=e.lastIndexOf("\nreturn"),x=e.slice(0,b),$=e.slice(b);e=x+"\n"+$}else e="\nreturn "+e+";";return h=Function.apply(r,s.concat("'use strict';\nvar "+l.join(",\n")+e)),Hr.put(v,h)}function tt(e){var t=Dn.test(e);if(t){var n=pt(e);return 1===n.length?n[0].expr:n.map(function(e){return e.type?"("+e.expr+")":Vr(e.expr)}).join(" + ")}return e}function nt(e){return e=e.replace(Pr,"").replace(Fr,function(){return"],|"}).replace(Rr,function(e,t){return"["+Vr(t)}).replace(Br,function(){return'"],["'}).replace(qr,function(){return'",'})+"]",Function("return ["+e+"]")()}function rt(e,t,n){var r=setTimeout(function(){var a=e.innerHTML;clearTimeout(r),a===n?t():rt(e,t,a)})}function at(e,t){var n=e.getAttribute("avalonctrl")||t.$id;e.setAttribute("avalonctrl",n),t.$events&&(t.$events.expr=e.tagName+'[avalonctrl="'+n+'"]')}function it(e,t){for(var n,r=0;n=e[r++];)n.vmodels=t,xn[n.type].init(n),avalon.injectBinding(n),n.getter&&1===n.element.nodeType&&n.element.removeAttribute(n.name);e.length=0}function ot(e,t){return e.priority-t.priority}function lt(e,t,r){var a=!0;if(t.length){for(var i,o=aa?aa(e):e.attributes,l=[],s=[],c={},u={},f=0;i=o[f++];)if(i.specified&&(r=i.name.match(Yr))){var d=r[1],p=r[2]||"",v=i.value,h=i.name;if(u[h])continue;if(u[h]=1,Gr[d]?(p=d,d="on"):Jr[d]&&("enabled"===d&&(n("warning!ms-enabled或ms-attr-enabled已经被废弃"),d="disabled",v="!("+v+")"),p=d,d="attr",h="ms-"+d+"-"+p,s.push([i.name,h,v])),c[h]=v,xn[d]){var m=v.replace(Xr,""),g=v!==m,y={type:d,param:p,element:e,name:h,expr:m,oneTime:g,uuid:i.name+"-"+H(e),priority:(xn[d].priority||10*d.charCodeAt(0))+(Number(p.replace(/\D/g,""))||0)};if("html"===d||"text"===d){var b=dt(v).filters;y.expr=y.expr.replace(b,""),y.filters=b.replace(oa,function(){return y.type="html",y.group=1,""}).trim()}else if("duplex"===d)var x=h;else"ms-if-loop"===h&&(y.priority+=100);l.push(y),"widget"===d&&(e.msData=e.msData||c)}}if(l.length){for(l.sort(ot),s.forEach(function(t){n("warning!请改用"+t[1]+"代替"+t[0]+"!"),e.removeAttribute(t[0]),e.setAttribute(t[1],t[2])}),x&&c["ms-attr-value"]&&"INPUT"===e.nodeName&&"text"===e.type&&n("warning!一个控件不能同时定义ms-attr-value与"+x),f=0;y=l[f];f++){if(d=y.type,Zr.test(d))return it(l.slice(0,f+1),t);a&&(a=!Kr.test(d))}it(l,t)}}a&&!Ur[e.tagName]&&(mt(e)?e.msResolved:1)&&(Wr&&Wr(e),ct(e,t))}function st(e){for(var t,n=aa?aa(e):e.attributes,r={},a=0;t=n[a++];)t.specified&&!ia.test(t.name)&&(r[U(t.name)]=W(t.value));return r}function ct(e,t){var n=avalon.slice(e.childNodes);ut(n,t)}function ut(e,t){for(var n,r=0;n=e[r++];)switch(n.nodeType){case 1:var a=n;if(ft(n,t),!a.msResolved&&a.parentNode&&1===a.parentNode.nodeType){var i=mt(a);if(i){var o=a.localName?a.localName.replace(i+":",""):a.nodeName,l=i+":"+U(o);fa.push({library:i,element:a,fullName:l,widget:o,vmodels:t,name:"widget"}),avalon.components[l]&&avalon.component(l)}}n.msHasEvent&&avalon.fireDom(n,"datasetchanged",{bubble:n.msHasEvent});break;case 3:Dn.test(n.nodeValue)&&vt(n,t,r)}}function ft(e,t,r){var a=e.getAttribute("ms-skip");if(!e.getAttributeNode)return n("warning "+e.tagName+" no getAttributeNode method");var i=e.getAttributeNode("ms-important"),o=e.getAttributeNode("ms-controller");if("string"!=typeof a){if(r=i||o){var l=avalon.vmodels[r.value];if(!l)return;t=r===i?[l]:[l].concat(t);var s=r.name;e.removeAttribute(s),avalon(e).removeClass(s),at(e,l)}lt(e,t)}}function dt(e){if(e.indexOf("|")>0){var t=e.replace(sa,function(e){return Array(e.length+1).join("1")}),n=t.replace(la,"ᄢ㍄").indexOf("|");if(n>-1)return{type:"text",filters:e.slice(n).trim(),expr:e.slice(0,n)}}return{type:"text",expr:e,filters:""}}function pt(e){for(var t,n,r=[],a=0;;){if(n=e.indexOf(jn,a),-1===n)break;if(t=e.slice(a,n),t&&r.push({expr:t}),a=n+jn.length,n=e.indexOf(Ln,a),-1===n)break;t=e.slice(a,n),t&&r.push(dt(t,a)),a=n+Ln.length}return t=e.slice(a),t&&r.push({expr:t}),r}function vt(e,t,n){var r=[];if(tokens=pt(e.data),tokens.length){for(var a=0;token=tokens[a++];){var i=Vt.createTextNode(token.expr);token.type&&(token.expr=token.expr.replace(Xr,function(){return token.oneTime=!0,""}),token.element=i,token.filters=token.filters.replace(oa,function(){return token.type="html",""}),token.pos=1e3*n+a,r.push(token)),un.appendChild(i)}e.parentNode.replaceChild(un,e),r.length&&it(r,t)}}function ht(e,t){if(t)for(var n,r=0;n=e[r++];)if(n.hasOwnProperty(t)&&"object"==typeof n[t]){var a=n[t];return a.$model||a}return{}}function mt(e){if(e.scopeName&&"HTML"!==e.scopeName)return e.scopeName;var t=e.nodeName.toLowerCase(),n=t.indexOf(":");return n>0?t.slice(0,n):void 0}function gt(e){return null==e?"":e}function yt(e,t,n){return t.param.replace(Qt,function(r){var a=avalon.duplexHooks[r];a&&"function"==typeof a[n]&&(e=a[n](e,t))}),e}function bt(){for(var e=wa.length-1;e>=0;e--){var t=wa[e];t()===!1&&wa.splice(e,1)}wa.length||clearInterval($a)}function xt(e,t){if(!e||1!==e.nodeType)return null;if(t)var n=t.effectName,r=t.effectDriver;else n=e.getAttribute("data-effect-name"),r=e.getAttribute("data-effect-driver");if(!n||!r)return null;var a=Sa.pop()||new Ct;return a.el=e,a.driver=r,a.useCss="j"!==r,a.useCss&&(t&&avalon(e).addClass(t.effectClass),a.cssEvent="t"===r?ka:Na),a.name=n,a.callbacks=avalon.effects[n]||{},a}function $t(e,t){var n=e.getAttribute("data-effect-name");if(n){t.effectName=n,t.effectDriver=e.getAttribute("data-effect-driver");var r=+e.getAttribute("data-effect-stagger");t.effectLeaveStagger=+e.getAttribute("data-effect-leave-stagger")||r,t.effectEnterStagger=+e.getAttribute("data-effect-enter-stagger")||r,t.effectClass=e.className||0/0}}function wt(e){return e.replace(/^[\S]/g,function(e){return e.toUpperCase()})}function Ct(){}function kt(e,t){var n=e.callbacks[t+"Class"];return"string"==typeof n?n:"function"==typeof n?n():e.name+"-"+t}function Nt(e,t,n){var r=e.callbacks[t];r&&r.call(e,e.el,n)}function Tt(e,t,n){var r=e.templateCache&&e.templateCache[t];if(r){for(var a,i=Vt.createDocumentFragment();a=r.firstChild;)i.appendChild(a);return i}return avalon.parseHTML(n)}function At(e){for(var t=Vt.createDocumentFragment(),n=0,r=e.length;r>n;n++)t.appendChild(e[n]);return t}function Et(e,t,n){for(var a,i=0;a=e[i++];)a.className===n.effectClass&&avalon.effect.apply(a,t,r,r,n)}function Ot(e,t,n){return e?setTimeout(t,++n*e):t(),n}function St(e,t){for(var n=un.cloneNode(!1),a=e,i=a.nodeValue,o=t&&Math.max(+t.staggerIndex,0),l=avalon.slice(a.parentNode.childNodes),s=l.indexOf(a);;){var c=l[--s];if(!c||0===String(c.nodeValue).indexOf(i))break;t&&c.className===t.effectClass?(e=c,function(e){t.staggerIndex=Ot(t.effectLeaveStagger,function(){avalon.effect.apply(e,0,r,function(){n.appendChild(e)},t)},o)}(c)):n.insertBefore(c,n.firstChild)}return n.appendChild(a),n}function _t(e,t,n,r,a){var i=e.template.cloneNode(!0),o=avalon.slice(i.childNodes);i.appendChild(n.$anchor),a&&t.appendChild(i);var l=[n].concat(e.vmodels),s={nodes:o,vmodels:l,content:i};r.push(s)}function Mt(e){var t="object"===e.xtype?Ht:jt,n=t(e),r=n.$anchor||(n.$anchor=e.element.cloneNode(!1));return r.nodeValue=e.signature,n.$outer=e.$outer,n}function jt(e,t){for(var n=e.param||"el",r=0,a=Ra.length;a>r;r++){var i=Ra[r];if(i&&i.hasOwnProperty(n)){Ra.splice(r,1),t=i;break}}return t||(t=Lt(n)),t}function Lt(e){var t={$outer:{},$index:0,$oldIndex:0,$anchor:null,$first:!1,$last:!1,$remove:avalon.noop};t[e]=0/0;var n={$last:1,$first:1,$index:1};n[e]=1;var r=$(t,{force:n});return r.$id=pn("$proxy$each"),r}function Dt(e,t,n){if("array"===n){e.$remove=function(){t.$repeat.removeAt(e.$index)};var r=t.param;e.$watch(r,function(n){var r=e.$index;t.$repeat[r]=n})}else e.$watch("$val",function(n){t.$repeat[e.$key]=n})}function Ht(){return Ba.pop()||Pt()}function Pt(){var e=$({$key:"",$val:0/0,$index:0,$oldIndex:0,$outer:{},$anchor:null},{force:{$key:1,$val:1,$index:1}});return e.$id=pn("$proxy$with"),e}function Ft(e,t,n){var r=e[t];if(r){var a=0===r.$id.indexOf("$proxy$each")?Ra:Ba;r.$outer={};for(var i in r.$events){var o=r.$events[i];Array.isArray(o)&&(o.length=0,i===n?r[n]=0/0:"$val"===i&&(r.$val=0/0))}a.unshift(r)>h.maxRepeatSize&&a.pop(),delete e[t]}}function Rt(e,t){var n="_"+e;if(!Rt[n]){var r=Vt.createElement(e);cn.appendChild(r),t=sn?getComputedStyle(r,null).display:r.currentStyle.display,cn.removeChild(r),Rt[n]=t}return Rt[n]}function Bt(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):3,o=r||",",l=n||".",s="",c=function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)};return s=(i?c(a,i):""+Math.round(a)).split("."),s[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)),(s[1]||"").length.avalonHide{ display: none!important }",zt.setAttribute("ms-skip","1"),zt.className="avalonHide";var Wt,Xt=/\[native code\]/,Yt="$"+It,Gt=e.require,Jt=e.define,Zt={},Kt=/[^, ]+/g,Qt=/\w+/g,en=/^\[object SVG\w*Element\]$/,tn=/^\[object (?:Window|DOMWindow|global)\]$/,nn=Object.prototype,rn=nn.hasOwnProperty,an=nn.toString,on=Array.prototype,ln=on.slice,sn=e.dispatchEvent,cn=Vt.documentElement,un=Vt.createDocumentFragment(),fn=Vt.createElement("div"),dn={};"Boolean Number String Function Array Date RegExp Object Error".replace(Kt,function(e){dn["[object "+e+"]"]=e.toLowerCase()});var pn=function(e){return e=e||"avalon",String(Math.random()+Math.random()).replace(/\d\.\d{4}/,e)},vn=o();avalon=function(e){return new avalon.init(e)},avalon.profile=function(){e.console&&avalon.config.profile&&Function.apply.call(console.log,console,arguments)},avalon.nextTick=new function(){function t(){for(var e=a.length,t=0;e>t;t++)a[t]();a=a.slice(e)}var n=e.setImmediate,r=e.MutationObserver;if(n)return n.bind(e);var a=[];if(r){var i=document.createTextNode("avalon");new r(t).observe(i,{characterData:!0});var o=!1;return function(e){a.push(e),o=!o,i.data=o}}return function(e){setTimeout(e,4)}},avalon.init=function(e){this[0]=this.element=e},avalon.fn=avalon.prototype=avalon.init.prototype,avalon.type=function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?dn[an.call(e)]||"object":typeof e};var hn="object"==typeof alert?function(e){try{return/^\s*\bfunction\b/.test(e+"")}catch(t){return!1}}:function(e){return"[object Function]"===an.call(e)};avalon.isFunction=hn,avalon.isWindow=function(e){return e?e==e.document&&e.document!=e:!1},l(e)&&(avalon.isWindow=l);var mn;for(mn in avalon({}))break;var gn="0"!==mn;avalon.isPlainObject=function(e,t){if(!e||"object"!==avalon.type(e)||e.nodeType||avalon.isWindow(e))return!1;try{if(e.constructor&&!rn.call(e,"constructor")&&!rn.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(gn)for(t in e)return rn.call(e,t);for(t in e);return void 0===t||rn.call(e,t)},Xt.test(Object.getPrototypeOf)&&(avalon.isPlainObject=function(e){return"[object Object]"===an.call(e)&&Object.getPrototypeOf(e)===nn}),avalon.mix=avalon.fn.mix=function(){var e,t,n,r,a,i,o=arguments[0]||{},l=1,s=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[1]||{},l++),"object"==typeof o||hn(o)||(o={}),l===s&&(o=this,l--);s>l;l++)if(null!=(e=arguments[l]))for(t in e){n=o[t];try{r=e[t]}catch(u){continue}o!==r&&(c&&r&&(avalon.isPlainObject(r)||(a=Array.isArray(r)))?(a?(a=!1,i=n&&Array.isArray(n)?n:[]):i=n&&avalon.isPlainObject(n)?n:{},o[t]=avalon.mix(c,i,r)):void 0!==r&&(o[t]=r))}return o},avalon.mix({rword:Kt,subscribers:Yt,version:1.51,ui:{},log:n,slice:sn?function(e,t,n){return ln.call(e,t,n)}:function(e,t,n){var r=[],a=e.length;if(void 0===n&&(n=a),"number"==typeof n&&isFinite(n)){t=s(t,a),n=s(n,a);for(var i=t;n>i;++i)r[i-t]=e[i]}return r},noop:r,error:function(e,t){throw(t||Error)(e)},oneObject:i,range:function(e,t,n){n||(n=1),null==t&&(t=e||0,e=0);for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n)),i=new Array(a);++rn&&t(n,e[n])!==!1;n++);else for(n in e)if(e.hasOwnProperty(n)&&t(n,e[n])===!1)break}},getWidgetData:function(e,t){var n=avalon(e).data(),r={};for(var a in n)0===a.indexOf(t)&&(r[a.replace(t,"").replace(/\w/,function(e){return e.toLowerCase()})]=n[a]);return r},Array:{ensure:function(e,t){return-1===e.indexOf(t)?e.push(t):void 0},removeAt:function(e,t){return!!e.splice(t,1).length},remove:function(e,t){var n=e.indexOf(t);return~n?avalon.Array.removeAt(e,n):!1}}});var yn=avalon.bindingHandlers={},bn=avalon.bindingExecutors={},xn=avalon.directives={};avalon.directive=function(e,t){return yn[e]=t.init=t.init||r,bn[e]=t.update=t.update||r,xn[e]=t};var $n=new function(){function e(e){this.size=0,this.limit=e,this.head=this.tail=void 0,this._keymap={}}var t=e.prototype;return t.put=function(e,t){var n={key:e,value:t};return this._keymap[e]=n,this.tail?(this.tail.newer=n,n.older=this.tail):this.head=n,this.tail=n,this.size===this.limit?this.shift():this.size++,t},t.shift=function(){var e=this.head;e&&(this.head=this.head.newer,this.head.older=e.newer=e.older=this._keymap[e.key]=void 0,delete this._keymap[e.key])},t.get=function(e){var t=this._keymap[e];if(void 0!==t)return t===this.tail?t.value:(t.newer&&(t===this.head&&(this.head=t.newer),t.newer.older=t.older),t.older&&(t.older.newer=t.newer),t.newer=void 0,t.older=this.tail,this.tail&&(this.tail.newer=t),this.tail=t,t.value)},e};if(!"司徒正美".trim){var wn=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(wn,"")}}var Cn=!{toString:null}.propertyIsEnumerable("toString"),kn=function(){}.propertyIsEnumerable("prototype"),Nn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Tn=Nn.length;if(Object.keys||(Object.keys=function(e){var t=[],n=kn&&"function"==typeof e;if("string"==typeof e||e&&e.callee)for(var r=0;rl;l++){var s=Nn[l];o&&"constructor"===s||!rn.call(e,s)||t.push(s)}return t}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===an.call(e)}),r.bind||(Function.prototype.bind=function(e){if(arguments.length<2&&void 0===e)return this;var t=this,n=arguments;return function(){var r,a=[];for(r=1;rr&&(r+=n);n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var n=this.length,r=null==t?n-1:t;for(0>r&&(r=Math.max(0,n+r));r>=0;r--)if(this[r]===e)return r;return-1},forEach:u("","_",""),filter:u("r=[],j=0,","if(_)r[j++]=this[i]","return r"),map:u("r=[],","r[i]=_","return r"),some:u("","if(_)return true","return false"),every:u("","if(!_)return false","return true")}),avalon.contains=f,Vt.contains||(Vt.contains=function(e){return f(Vt,e)}),e.SVGElement){Vt.createTextNode("x").contains||(Node.prototype.contains=function(e){return!!(16&this.compareDocumentPosition(e))});var An="http://www.w3.org/2000/svg",En=Vt.createElementNS(An,"svg");En.innerHTML='',en.test(En.firstChild)||Object.defineProperties(SVGElement.prototype,{outerHTML:{enumerable:!0,configurable:!0,get:d,set:function(e){var t=this.tagName.toLowerCase(),n=this.parentNode,r=avalon.parseHTML(e);if("svg"===t)n.insertBefore(r,this);else{var a=Vt.createDocumentFragment();p(r,a),n.insertBefore(a,this)}n.removeChild(this)}},innerHTML:{enumerable:!0,configurable:!0,get:function(){var e=this.outerHTML,t=new RegExp("<"+this.nodeName+'\\b(?:(["\'])[^"]*?(\\1)|[^>])*>',"i"),n=new RegExp("$","i");return e.replace(t,"").replace(n,"")},set:function(e){if(avalon.clearHTML){avalon.clearHTML(this);var t=avalon.parseHTML(e);p(t,this)}}}})}!cn.outerHTML&&e.HTMLElement&&HTMLElement.prototype.__defineGetter__("outerHTML",d);var On=/^(?:mouse|contextmenu|drag)|click/,Sn=avalon.eventHooks;if("onmouseenter"in cn||avalon.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){Sn[e]={type:t,deel:function(t,n,r){return function(n){var a=n.relatedTarget;return a&&(a===t||16&t.compareDocumentPosition(a))?void 0:(delete n.type,n.type=e,r.call(t,n))}}}}),avalon.each({AnimationEvent:"animationend",WebKitAnimationEvent:"webkitAnimationEnd"},function(t,n){e[t]&&!Sn.animationend&&(Sn.animationend={type:n})}),"oninput"in Vt.createElement("input")||(Sn.input={type:"propertychange",deel:function(e,t,n){return function(t){return"value"===t.propertyName?(t.type="input",n.call(e,t)):void 0}}}),void 0===Vt.onmousewheel){var _n=void 0!==Vt.onwheel?"wheel":"DOMMouseScroll",Mn="wheel"===_n?"deltaY":"detail";Sn.mousewheel={type:_n,deel:function(e,t,n){return function(t){t.wheelDeltaY=t.wheelDelta=t[Mn]>0?-120:120,t.wheelDeltaX=0,Object.defineProperty&&Object.defineProperty(t,"type",{value:"mousewheel"}),n.call(e,t)}}}}var jn,Ln,Dn,Hn,Pn,Fn=/[-.*+?^${}()|[\]\/\\]/g,Rn={loader:function(t){var n=Wt&&t;e.require=n?Wt:Gt,e.define=n?Wt.define:Jt},interpolate:function(e){if(jn=e[0],Ln=e[1],jn===Ln){throw new SyntaxError("openTag!==closeTag")}h.openTag=jn,h.closeTag=Ln;var t=m(jn),n=m(Ln);Dn=new RegExp(t+"(.*?)"+n),Hn=new RegExp(t+"(.*?)"+n,"g"),Pn=new RegExp(t+".*?"+n+"|\\sms-")}};h.async=!0,h.debug=!0,h.plugins=Rn,h.plugins.interpolate(["{{","}}"]),h.paths={},h.shim={},h.maxRepeatSize=100,avalon.config=h;var Bn=avalon.vmodels={};avalon.define=function(e){var t=e.$id;t||n("warning: vm必须指定$id");var r=$(e);return r.$id=t,Bn[t]=r};var qn=i("$id,$watch,$fire,$events,$model,$skipArray,$active,$pathname,$up,$track,$accessors"),In=Object.defineProperty,Vn=!0;try{In({},"_",{value:"x"});var Un=Object.defineProperties}catch(zn){Vn=!1}var Wn=Xt.test(Object.key)?Object.key:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&!qn[n]&&t.push(n);return t},Xn={get:function(){return O(this)},set:r,enumerable:!1,configurable:!0};if(!Vn&&("__defineGetter__"in avalon&&(In=function(e,t,n){return"value"in n&&(e[t]=n.value),"get"in n&&e.__defineGetter__(t,n.get),"set"in n&&e.__defineSetter__(t,n.set),e},Un=function(e,t){for(var n in t)t.hasOwnProperty(n)&&In(e,n,t[n]);return e}),vn)){var Yn={};e.execScript(["Function parseVB(code)"," ExecuteGlobal(code)","End Function"].join("\n"),"VBScript"),Un=function(t,n,r){var a=[];a.push("\r\n Private [__data__], [__proxy__]"," Public Default Function [__const__](d"+It+", p"+It+")"," Set [__data__] = d"+It+": set [__proxy__] = p"+It," Set [__const__] = Me"," End Function");var i={};for(t in n)i[t]=!0,a.push(" Public Property Let ["+t+"](val"+It+")",' Call [__proxy__](Me,[__data__], "'+t+'", val'+It+")"," End Property"," Public Property Set ["+t+"](val"+It+")",' Call [__proxy__](Me,[__data__], "'+t+'", val'+It+")"," End Property"," Public Property Get ["+t+"]"," On Error Resume Next"," Set["+t+'] = [__proxy__](Me,[__data__],"'+t+'")'," If Err.Number <> 0 Then"," ["+t+'] = [__proxy__](Me,[__data__],"'+t+'")'," End If"," On Error Goto 0"," End Property"); +!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("Avalon requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(){e.console&&avalon.config.debug&&Function.apply.call(console.log,console,arguments)}function r(){}function i(e,t){"string"==typeof e&&(e=e.match(Kt)||[]);for(var n={},r=void 0!==t?t:1,a=0,i=e.length;i>a;a++)n[e[a]]=r;return n}function o(){if(e.VBArray){var t=document.documentMode;return t?t:e.XMLHttpRequest?7:6}return 0/0}function l(e){return tn.test(an.call(e))}function s(e,t){return e=Math.floor(e)||0,0>e?Math.max(t+e,0):Math.min(e,t)}function c(e){if(!e)return!1;var t=e.length;if(t===t>>>0){var n=an.call(e).slice(8,-1);if(/(?:regexp|string|function|window|global)$/i.test(n))return!1;if("Array"===n)return!0;try{return{}.propertyIsEnumerable.call(e,"length")===!1?/^\s?function/.test(e.item||e.callee):!0}catch(r){return!e.window}}return!1}function u(e,t,n){var r="for(var "+e+"i=0,n = this.length; i < n; i++){"+t.replace("_","((i in this) && fn.call(scope,this[i],i,this))")+"}"+n;return Function("fn,scope",r)}function f(e,t){try{for(;t=t.parentNode;)if(t===e)return!0;return!1}catch(n){return!1}}function d(){return(new XMLSerializer).serializeToString(this)}function p(e,t){if(e&&e.childNodes)for(var n,r=e.childNodes,a=0;n=r[a++];)if(n.tagName){var i=Vt.createElementNS(An,n.tagName.toLowerCase());on.forEach.call(n.attributes,function(e){i.setAttribute(e.name,e.value)}),p(n,i),t.appendChild(i)}}function v(e){var t={};for(var n in e)t[n]=e[n];var r=t.target=e.srcElement;if(0===e.type.indexOf("key"))t.which=null!=e.charCode?e.charCode:e.keyCode;else if(On.test(e.type)){var a=r.ownerDocument||Vt,i="BackCompat"===a.compatMode?a.body:a.documentElement;t.pageX=e.clientX+(i.scrollLeft>>0)-(i.clientLeft>>0),t.pageY=e.clientY+(i.scrollTop>>0)-(i.clientTop>>0),t.wheelDeltaY=t.wheelDelta,t.wheelDeltaX=0}return t.timeStamp=new Date-0,t.originalEvent=e,t.preventDefault=function(){e.returnValue=!1},t.stopPropagation=function(){e.cancelBubble=!0},t}function h(e){for(var t in e)if(rn.call(e,t)){var n=e[t];"function"==typeof h.plugins[t]?h.plugins[t](n):"object"==typeof h[t]?avalon.mix(h[t],n):h[t]=n}return this}function m(e){return(e+"").replace(Fn,"\\$&")}function g(e,t){var n=this.$events||(this.$events={}),a=n[e]||(n[e]=[]);if("function"==typeof t){var i=t;i.uuid=Math.random(),t={element:cn,type:"user-watcher",handler:r,vmodels:[this],expr:e,uuid:i.uuid},t.wildcard=/\*/.test(e)}if(t.update)t.oneTime||avalon.Array.ensure(a,t);else{if(/\w\.*\B/.test(e)){t.getter=r;var o=this;t.update=function(){var e=this.fireArgs||[];e[2]&&t.handler.apply(o,e),delete this.fireArgs},a.sync=!0,avalon.Array.ensure(a,t)}else avalon.injectBinding(t);i&&(t.handler=i)}return function(){t.update=t.getter=t.handler=r,t.element=Vt.createElement("a")}}function y(e,t){var n=this.$events;if(n&&n[e]){t&&(t[2]=e),x(n[e],t);var r=this.$up;r&&r.$event&&(this.$pathname&&y.call(r,this.$pathname+"."+e,t),y.call(r,"*."+e,t))}else if(r=this.$up){var a=this.$pathname+"."+e,i=a.split(".");-1===i.indexOf("*")?(y.call(r,a,t),i[1]="*",y.call(r,i.join("."),t)):y.call(r,a,t)}}function b(e,t){for(;;){if(e.$watch){var n=e.$events||(e.$events={}),r=n[t]||(n[t]=[]);return void Qn.collectDependency(r)}if(e=e.$up,!e)break;t=e.$pathname+"."+t}}function x(e,t){if(e){new Date-nr>444&&"object"==typeof e[0]&&F();for(var n,r=[],a=[],i=0;n=e[i++];)"user-watcher"===n.type?r.push(n):a.push(n);if(h.async){for(ua.render(),i=0;n=a[i++];)if(n.update){var o=H(n);ua.queue[o]||(ua.queue[o]=1,ua.queue.push(n))}}else for(i=0;n=a[i++];)n.update&&n.update();for(i=0;n=r[i++];)(t&&t[2]===n.expr||n.wildcard)&&(n.fireArgs=t),n.update()}}function $(e,t){return t=t||{},t.watch=!0,C(e,t)}function w(){}function C(e,t){function r(e){return u[e]===!0}if(!e||e.$id&&e.$accessors)return e;t=t||Zt;var a=t.force||Zt,o=t.old,l="object"==typeof o?o.$accessors:Zt,s=new w,c={},u={},f=[],d=[],p={};e.$skipArray&&(p=i(e.$skipArray),delete e.$skipArray);var v=e.$computed;if(v){delete e.$computed;for(var h in v)u[h]=!0,function(e,t){var n;c[e]={get:function(){return n=t.get.call(this)},set:function(r){if("function"==typeof t.set){var a=n;t.set.call(this,r);var i=this[e];this.$fire&&i!==a&&this.$fire(e,i,a)}},enumerable:!0,configurable:!0}}(h,v[h])}for(h in e){var m=e[h];qn[h]||(u[h]=!0),"function"==typeof m||m&&m.nodeType||!a[h]&&("$"===h.charAt(0)||qn[h]||p[h])?f.push(h):k(m)?(n("warning:计算属性建议放在$computed对象中统一定义"),function(e,t){var n;c[e]={get:function(){return n=t.get.call(this)},set:function(r){if("function"==typeof t.set){var a=n;t.set.call(this,r);var i=this[e];this.$fire&&i!==a&&this.$fire(e,i,a)}},enumerable:!0,configurable:!0}}(h,m)):(d.push(h),c[h]=l[h]?l[h]:N(h,m))}c.$model=Xn,s=Un(s,c,e),f.forEach(function(t){s[t]=e[t]}),E(s,"$id","anonymous"),E(s,"$up",o?o.$up:null),E(s,"$track",Object.keys(u)),E(s,"$active",!1),E(s,"$pathname",o?o.$pathname:""),E(s,"$accessors",c),E(s,"hasOwnProperty",r),t.watch&&(E(s,"$watch",function(){return g.apply(s,arguments)}),E(s,"$fire",function(e,t){if(0===e.indexOf("all!")){var n=e.slice(4);for(var r in avalon.vmodels){var a=avalon.vmodels[r];a.$fire&&a.$fire.apply(a,[n,t])}}else y.call(s,e,[t])})),d.forEach(function(t){var n=s[t]=e[t];n&&"object"==typeof n&&(n.$up=s,n.$pathname=t),y.call(s,t)});for(h in v)m=s[h];return s.$active=!0,s}function k(e){if(e&&"object"==typeof e){for(var t in e)if("get"!==t&&"set"!==t)return!1;return"function"==typeof e.get}}function N(e,t){var n;return t=0/0,{get:function(){return this.$active&&b(this,e),t},set:function(r){if(t!==r){var a=t;n=T(r,t),n?t=n:(n=void 0,t=r),Object(n)===n&&(n.$pathname=e,n.$up=this),this.$active&&y.call(this,e,[t,a])}},enumerable:!0,configurable:!0}}function T(e,t,n,r){if(Array.isArray(e))return A(e,t,r);if(avalon.isPlainObject(e)){if(t){var a=Wn(e),i=Wn(t);if(a.join(";")===i.join(";")){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t}t.$active=!1}return C(e,{old:t,watch:r})}return n?e:void 0}function A(e,t,n){if(t){var r=[0,t.length].concat(e);return t.splice.apply(t,r),t}for(var a in Zn)e[a]=Zn[a];E(e,"$up",null),E(e,"$pathname",""),E(e,"$track",M(e.length)),e._=C({length:0/0},{watch:!0}),e._.length=e.length,e._.$watch("length",function(t,n){y.call(e.$up,e.$pathname+".length",[t,n])}),n&&E(e,"$watch",function(){return g.apply(e,arguments)}),sn?Object.defineProperty(e,"$model",Xn):e.$model=O(e);for(var i=0,o=e.length;o>i;i++){var l=e[i]=T(e[i],0,1,1);Object(l)&&(l.$up=e)}return e}function E(e,t,n){Vn?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!1,configurable:!0}):e[t]=n}function O(e){var t=avalon.type(e);if("array"===t){for(var n=[],r=0;rr;r++){n[r]=e[r];var i=t[r];i in n?(e[r]=n[i],delete n[i]):e[r]=e[i]}}function M(e){for(var t=[],n=0;e>n;n++)t[n]=pn("$proxy$each");return t}function j(e,t,n){switch(t){case"push":case"unshift":n=M(n.length);break;case"splice":if(n.length>2){{n[1],n.length-2}n=[n[0],n[1]].concat(M(n.length-2))}}Array.prototype[t].apply(e,n)}function L(e,t){t.oneTime||e&&avalon.Array.ensure(e,t)&&t.element&&(P(t,e),new Date-nr>444&&F())}function D(e,t){for(var n,r=[],a=0;n=e[a++];)r.push(t?n.$id:n.$key);return r.join(";")}function H(e){if(!e.uuid){var t=e.element;e.uuid=t?1!==t.nodeType?e.type+(e.pos||0)+"-"+H(t.parentNode):e.name+"-"+H(t):++er}return e.uuid}function P(e,t){var n=e.lists||(e.lists=[]),r=H(e);avalon.Array.ensure(n,t),t.$uuid=t.$uuid||pn(),tr[r]||(tr[r]=1,tr.push(e))}function F(e){for(var t=tr.length,n=t,r=[],a={},i={};e=tr[--t];){var o=e.type;i[o]?i[o]++:(i[o]=1,r.push(o))}var l=!1;if(r.forEach(function(e){rr[e]!==i[e]&&(a[e]=1,l=!0)}),t=n,l)for(;e=tr[--t];)if(null!==e.element){if(a[e.type]&&B(e.element)){tr.splice(t,1),delete tr[e.uuid];for(var s,c=e.lists,u=0;s=c[u++];)avalon.Array.remove(c,s),avalon.Array.remove(s,e);R(e)}}else tr.splice(t,1);rr=i,nr=new Date}function R(e){delete tr[e.uuid],e.element=null,e.rollback&&e.rollback();for(var t in e)e[t]=null}function B(e){try{{e.parentNode.nodeType}}catch(t){return!0}return e.ifRemove&&!cn.contains(e.ifRemove)&&zt===e.parentNode?(e.parentNode&&e.parentNode.removeChild(e),!0):e.msRetain?0:1===e.nodeType?!cn.contains(e):!avalon.contains(cn,e)}function q(e){var t=e.nodeName;return t.toLowerCase()===t&&e.scopeName&&""===e.outerText}function I(e){"url(#default#VML)"!==e.currentStyle.behavior&&(e.style.behavior="url(#default#VML)",e.style.display="inline-block",e.style.zoom=1)}function V(e){return e.replace(/([a-z\d])([A-Z]+)/g,"$1-$2").toLowerCase()}function U(e){return!e||e.indexOf("-")<0&&e.indexOf("_")<0?e:e.replace(/[-_][^-_]/g,function(e){return e.charAt(1).toUpperCase()})}function z(e){if(!("classList"in e)){e.classList={node:e};for(var t in dr)e.classList[t.slice(1)]=dr[t]}return e.classList}function W(e){try{if("object"==typeof e)return e;e="true"===e?!0:"false"===e?!1:"null"===e?null:+e+""===e?+e:pr.test(e)?avalon.parseJSON(e):e}catch(t){}return e}function X(e){return e.window&&e.document?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}function Y(e,t){if(e.offsetWidth<=0){if(Er.test(yr["@:get"](e,"display"))){var n={node:e};for(var r in Ar)n[r]=e.style[r],e.style[r]=Ar[r];t.push(n)}var a=e.parentNode;a&&1===a.nodeType&&Y(a,t)}}function G(e){var t=e.tagName.toLowerCase();return"input"===t&&/checkbox|radio/.test(e.type)?"checked":t}function J(e,t,n,r){return e.slice(0,t)+"."+e.slice(t).replace("["+n+"]",r)}function Z(e){for(var t=0,n=0,r={},a="",i=[],o=!1,l=function(a){if(!(0>n)){var i=t,o=e.slice(n,i),l=n+"-"+(i-1);r[l]=o,_r[o]&&"."!==e.charAt(n-1)&&delete r[l],a&&(r[n]="*"),n=-1}},s=function(a){var o=i.pop(),l=a?t-1:t,s=e.slice(o,l);try{var u=Function("return "+s)();u+="",e=J(e,o-1,s,u),t=o+u.length-1,r[o+"-"+t]=u,c="word",n=-1}catch(f){e=J(e,o-1,s,"*"),t=o,r[o]="*",c="word",n=-1}},c="unknown",u={unknown:function(){jr(d)?(c="word",n=t):34===d||39===d?(c="string",a=d):93===d&&s()},word:function(){/\B/.test(p)&&(c="unknown",e=e.slice(0,t)+e.slice(t).replace(/\s*(\.|\[)\s*/,function(e,t){return t}),p=e.charAt(t),46===d?(c="dot",l(),r[t]="."):91===d?(r[t]=".",l(),i.push(t+1)):93===d?n>0?l(!0):s(!0):l())},dot:function(){c="unknown",(d>=48&&57>=d||42===d||jr(d))&&(c="word",n=t)},string:function(){o?o=!1:(92===d&&(o=!0),d===a&&(c="unknown"))}},f=e.length;;){var d=e.charCodeAt(t);if(d!==d){l();break}if(0===f--)break;var p=e.charAt(t);u[c](),t++}var v=[];for(t in r){var h=r[t],m=t.split("-");v.push({first:~~m[0],last:~~m[1]||~~m[0],text:h})}v.sort(function(e,t){return e.first-t.first});for(var g={};;){var y=v.shift();if(!y)break;var b=!0;e:for(t in g)if(m=t.split("-"),Number(m[1])+1===y.first){g[m[0]+"-"+y.last]=g[t]+y.text,delete g[t],b=!1;break e}b&&(g[y.first+"-"+y.last]=y.text)}var x=[],$={};for(t in g){var w=g[t];$[w]||($[w]=!0,x.push(w))}return x}function K(e,t,n,r){for(var a,i=[],o=" = "+n+".",l=e.length;a=e[--l];)for(var s,c=a.split("."),u=c[0];s=c.shift();)t.hasOwnProperty(s)&&(i.push(u+o+u),r.observers.push({v:t,p:a}),e.splice(l,1));return i}function Q(e){e=e.trim();var t=Dr.get(e);return t?t.concat():(t=Z(e),Dr.put(e,t).concat())}function et(e,t,n){var a=n.filters;"string"==typeof a&&a.trim()&&!n._filters&&(n._filters=nt(a.trim()));var i=Q(e),o=new Date-0,l=[],s=[],c=[];n.observers=[];for(var u=0,f=t.length;f>u;u++)if(i.length){var d="vm"+o+"_"+u;s.push(d),c.push(t[u]),l.push.apply(l,K(i,t[u],d,n))}n.args=c;var p=n.type,v=t.map(function(e){return String(e.$id).replace(Lr,"$1")})+e+p,h=Hr.get(v);if(h){if("duplex"===p){var m=Hr.get(v+"setter");n.setter=m.apply(m,n.args)}return n.getter=h}if(l.length||l.push("fix"+o),"duplex"===p){var g={};l.forEach(function(e){var t=e.split("=");g[t[0].trim()]=t[1].trim()}),e=e.replace(/[\$\w]+/,function(e){return g[e]?g[e]:e});var y=Function.apply(r,s.concat("'use strict';return function(vvv){"+e+" = vvv\n}\n"));Hr.put(v+"setter",y),n.setter=y.apply(y,n.args)}if("on"===p){-1===e.indexOf("(")?e+=".call(this, $event)":e=e.replace("(",".call(this,"),s.push("$event"),e="\nreturn "+e+";";var b=e.lastIndexOf("\nreturn"),x=e.slice(0,b),$=e.slice(b);e=x+"\n"+$}else e="\nreturn "+e+";";return h=Function.apply(r,s.concat("'use strict';\nvar "+l.join(",\n")+e)),Hr.put(v,h)}function tt(e){var t=Dn.test(e);if(t){var n=pt(e);return 1===n.length?n[0].expr:n.map(function(e){return e.type?"("+e.expr+")":Vr(e.expr)}).join(" + ")}return e}function nt(e){return e=e.replace(Pr,"").replace(Fr,function(){return"],|"}).replace(Rr,function(e,t){return"["+Vr(t)}).replace(Br,function(){return'"],["'}).replace(qr,function(){return'",'})+"]",Function("return ["+e+"]")()}function rt(e,t,n){var r=setTimeout(function(){var a=e.innerHTML;clearTimeout(r),a===n?t():rt(e,t,a)})}function at(e,t){var n=e.getAttribute("avalonctrl")||t.$id;e.setAttribute("avalonctrl",n),t.$events&&(t.$events.expr=e.tagName+'[avalonctrl="'+n+'"]')}function it(e,t){for(var n,r=0;n=e[r++];)n.vmodels=t,xn[n.type].init(n),avalon.injectBinding(n),n.getter&&1===n.element.nodeType&&n.element.removeAttribute(n.name);e.length=0}function ot(e,t){return e.priority-t.priority}function lt(e,t,r){var a=!0;if(t.length){for(var i,o=aa?aa(e):e.attributes,l=[],s=[],c={},u={},f=0;i=o[f++];)if(i.specified&&(r=i.name.match(Yr))){var d=r[1],p=r[2]||"",v=i.value,h=i.name;if(u[h])continue;if(u[h]=1,Gr[d]?(p=d,d="on"):Jr[d]&&("enabled"===d&&(n("warning!ms-enabled或ms-attr-enabled已经被废弃"),d="disabled",v="!("+v+")"),p=d,d="attr",h="ms-"+d+"-"+p,s.push([i.name,h,v])),c[h]=v,xn[d]){var m=v.replace(Xr,""),g=v!==m,y={type:d,param:p,element:e,name:h,expr:m,oneTime:g,uuid:i.name+"-"+H(e),priority:(xn[d].priority||10*d.charCodeAt(0))+(Number(p.replace(/\D/g,""))||0)};if("html"===d||"text"===d){var b=dt(v).filters;y.expr=y.expr.replace(b,""),y.filters=b.replace(oa,function(){return y.type="html",y.group=1,""}).trim()}else if("duplex"===d)var x=h;else"ms-if-loop"===h&&(y.priority+=100);l.push(y),"widget"===d&&(e.msData=e.msData||c)}}if(l.length){for(l.sort(ot),s.forEach(function(t){n("warning!请改用"+t[1]+"代替"+t[0]+"!"),e.removeAttribute(t[0]),e.setAttribute(t[1],t[2])}),x&&c["ms-attr-value"]&&"INPUT"===e.nodeName&&"text"===e.type&&n("warning!一个控件不能同时定义ms-attr-value与"+x),f=0;y=l[f];f++){if(d=y.type,Zr.test(d))return it(l.slice(0,f+1),t);a&&(a=!Kr.test(d))}it(l,t)}}a&&!Ur[e.tagName]&&(mt(e)?e.msResolved:1)&&(Wr&&Wr(e),ct(e,t))}function st(e){for(var t,n=aa?aa(e):e.attributes,r={},a=0;t=n[a++];)t.specified&&!ia.test(t.name)&&(r[U(t.name)]=W(t.value));return r}function ct(e,t){var n=avalon.slice(e.childNodes);ut(n,t)}function ut(e,t){for(var n,r=0;n=e[r++];)switch(n.nodeType){case 1:var a=n;if(ft(n,t),!a.msResolved&&a.parentNode&&1===a.parentNode.nodeType){var i=mt(a);if(i){var o=a.localName?a.localName.replace(i+":",""):a.nodeName,l=i+":"+U(o);fa.push({library:i,element:a,fullName:l,widget:o,vmodels:t,name:"widget"}),avalon.components[l]&&avalon.component(l)}}n.msHasEvent&&avalon.fireDom(n,"datasetchanged",{bubble:n.msHasEvent});break;case 3:Dn.test(n.nodeValue)&&vt(n,t,r)}}function ft(e,t,r){var a=e.getAttribute("ms-skip");if(!e.getAttributeNode)return n("warning "+e.tagName+" no getAttributeNode method");var i=e.getAttributeNode("ms-important"),o=e.getAttributeNode("ms-controller");if("string"!=typeof a){if(r=i||o){var l=avalon.vmodels[r.value];if(!l)return;t=r===i?[l]:[l].concat(t);var s=r.name;e.removeAttribute(s),avalon(e).removeClass(s),at(e,l)}lt(e,t)}}function dt(e){if(e.indexOf("|")>0){var t=e.replace(sa,function(e){return Array(e.length+1).join("1")}),n=t.replace(la,"ᄢ㍄").indexOf("|");if(n>-1)return{type:"text",filters:e.slice(n).trim(),expr:e.slice(0,n)}}return{type:"text",expr:e,filters:""}}function pt(e){for(var t,n,r=[],a=0;;){if(n=e.indexOf(jn,a),-1===n)break;if(t=e.slice(a,n),t&&r.push({expr:t}),a=n+jn.length,n=e.indexOf(Ln,a),-1===n)break;t=e.slice(a,n),t&&r.push(dt(t,a)),a=n+Ln.length}return t=e.slice(a),t&&r.push({expr:t}),r}function vt(e,t,n){var r=[];if(tokens=pt(e.data),tokens.length){for(var a=0;token=tokens[a++];){var i=Vt.createTextNode(token.expr);token.type&&(token.expr=token.expr.replace(Xr,function(){return token.oneTime=!0,""}),token.element=i,token.filters=token.filters.replace(oa,function(){return token.type="html",""}),token.pos=1e3*n+a,r.push(token)),un.appendChild(i)}e.parentNode.replaceChild(un,e),r.length&&it(r,t)}}function ht(e,t){if(t)for(var n,r=0;n=e[r++];)if(n.hasOwnProperty(t)&&"object"==typeof n[t]){var a=n[t];return a.$model||a}return{}}function mt(e){if(e.scopeName&&"HTML"!==e.scopeName)return e.scopeName;var t=e.nodeName.toLowerCase(),n=t.indexOf(":");return n>0?t.slice(0,n):void 0}function gt(e){return null==e?"":e}function yt(e,t,n){return t.param.replace(Qt,function(r){var a=avalon.duplexHooks[r];a&&"function"==typeof a[n]&&(e=a[n](e,t))}),e}function bt(){for(var e=wa.length-1;e>=0;e--){var t=wa[e];t()===!1&&wa.splice(e,1)}wa.length||clearInterval($a)}function xt(e,t){if(!e||1!==e.nodeType)return null;if(t)var n=t.effectName,r=t.effectDriver;else n=e.getAttribute("data-effect-name"),r=e.getAttribute("data-effect-driver");if(!n||!r)return null;var a=Sa.pop()||new Ct;return a.el=e,a.driver=r,a.useCss="j"!==r,a.useCss&&(t&&avalon(e).addClass(t.effectClass),a.cssEvent="t"===r?ka:Na),a.name=n,a.callbacks=avalon.effects[n]||{},a}function $t(e,t){var n=e.getAttribute("data-effect-name");if(n){t.effectName=n,t.effectDriver=e.getAttribute("data-effect-driver");var r=+e.getAttribute("data-effect-stagger");t.effectLeaveStagger=+e.getAttribute("data-effect-leave-stagger")||r,t.effectEnterStagger=+e.getAttribute("data-effect-enter-stagger")||r,t.effectClass=e.className||0/0}}function wt(e){return e.replace(/^[\S]/g,function(e){return e.toUpperCase()})}function Ct(){}function kt(e,t){var n=e.callbacks[t+"Class"];return"string"==typeof n?n:"function"==typeof n?n():e.name+"-"+t}function Nt(e,t,n){var r=e.callbacks[t];r&&r.call(e,e.el,n)}function Tt(e,t,n){var r=e.templateCache&&e.templateCache[t];if(r){for(var a,i=Vt.createDocumentFragment();a=r.firstChild;)i.appendChild(a);return i}return avalon.parseHTML(n)}function At(e){for(var t=Vt.createDocumentFragment(),n=0,r=e.length;r>n;n++)t.appendChild(e[n]);return t}function Et(e,t,n){for(var a,i=0;a=e[i++];)a.className===n.effectClass&&avalon.effect.apply(a,t,r,r,n)}function Ot(e,t,n){return e?setTimeout(t,++n*e):t(),n}function St(e,t){for(var n=un.cloneNode(!1),a=e,i=a.nodeValue,o=t&&Math.max(+t.staggerIndex,0),l=avalon.slice(a.parentNode.childNodes),s=l.indexOf(a);;){var c=l[--s];if(!c||0===String(c.nodeValue).indexOf(i))break;t&&c.className===t.effectClass?(e=c,function(e){t.staggerIndex=Ot(t.effectLeaveStagger,function(){avalon.effect.apply(e,0,r,function(){n.appendChild(e)},t)},o)}(c)):n.insertBefore(c,n.firstChild)}return n.appendChild(a),n}function _t(e,t,n,r,a){var i=e.template.cloneNode(!0),o=avalon.slice(i.childNodes);i.appendChild(n.$anchor),a&&t.appendChild(i);var l=[n].concat(e.vmodels),s={nodes:o,vmodels:l,content:i};r.push(s)}function Mt(e){var t="object"===e.xtype?Ht:jt,n=t(e),r=n.$anchor||(n.$anchor=e.element.cloneNode(!1));return r.nodeValue=e.signature,n.$outer=e.$outer,n}function jt(e,t){for(var n=e.param||"el",r=0,a=Ra.length;a>r;r++){var i=Ra[r];if(i&&i.hasOwnProperty(n)){Ra.splice(r,1),t=i;break}}return t||(t=Lt(n)),t}function Lt(e){var t={$outer:{},$index:0,$oldIndex:0,$anchor:null,$first:!1,$last:!1,$remove:avalon.noop};t[e]=0/0;var n={$last:1,$first:1,$index:1};n[e]=1;var r=$(t,{force:n});return r.$id=pn("$proxy$each"),r}function Dt(e,t,n){if("array"===n){e.$remove=function(){t.$repeat.removeAt(e.$index)};var r=t.param;e.$watch(r,function(n){var r=e.$index;t.$repeat[r]=n})}else e.$watch("$val",function(n){t.$repeat[e.$key]=n})}function Ht(){return Ba.pop()||Pt()}function Pt(){var e=$({$key:"",$val:0/0,$index:0,$oldIndex:0,$outer:{},$anchor:null},{force:{$key:1,$val:1,$index:1}});return e.$id=pn("$proxy$with"),e}function Ft(e,t,n){var r=e[t];if(r){var a=0===r.$id.indexOf("$proxy$each")?Ra:Ba;r.$outer={};for(var i in r.$events){var o=r.$events[i];Array.isArray(o)&&(o.length=0,i===n?r[n]=0/0:"$val"===i&&(r.$val=0/0))}a.unshift(r)>h.maxRepeatSize&&a.pop(),delete e[t]}}function Rt(e,t){var n="_"+e;if(!Rt[n]){var r=Vt.createElement(e);cn.appendChild(r),t=sn?getComputedStyle(r,null).display:r.currentStyle.display,cn.removeChild(r),Rt[n]=t}return Rt[n]}function Bt(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var a=isFinite(+e)?+e:0,i=isFinite(+t)?Math.abs(t):3,o=r||",",l=n||".",s="",c=function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)};return s=(i?c(a,i):""+Math.round(a)).split("."),s[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)),(s[1]||"").length.avalonHide{ display: none!important }",zt.setAttribute("ms-skip","1"),zt.className="avalonHide";var Wt,Xt=/\[native code\]/,Yt="$"+It,Gt=e.require,Jt=e.define,Zt={},Kt=/[^, ]+/g,Qt=/\w+/g,en=/^\[object SVG\w*Element\]$/,tn=/^\[object (?:Window|DOMWindow|global)\]$/,nn=Object.prototype,rn=nn.hasOwnProperty,an=nn.toString,on=Array.prototype,ln=on.slice,sn=e.dispatchEvent,cn=Vt.documentElement,un=Vt.createDocumentFragment(),fn=Vt.createElement("div"),dn={};"Boolean Number String Function Array Date RegExp Object Error".replace(Kt,function(e){dn["[object "+e+"]"]=e.toLowerCase()});var pn=function(e){return e=e||"avalon",String(Math.random()+Math.random()).replace(/\d\.\d{4}/,e)},vn=o();avalon=function(e){return new avalon.init(e)},avalon.profile=function(){e.console&&avalon.config.profile&&Function.apply.call(console.log,console,arguments)},avalon.nextTick=new function(){function t(){for(var e=a.length,t=0;e>t;t++)a[t]();a=a.slice(e)}var n=e.setImmediate,r=e.MutationObserver;if(n)return n.bind(e);var a=[];if(r){var i=document.createTextNode("avalon");new r(t).observe(i,{characterData:!0});var o=!1;return function(e){a.push(e),o=!o,i.data=o}}return function(e){setTimeout(e,4)}},avalon.init=function(e){this[0]=this.element=e},avalon.fn=avalon.prototype=avalon.init.prototype,avalon.type=function(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?dn[an.call(e)]||"object":typeof e};var hn="object"==typeof alert?function(e){try{return/^\s*\bfunction\b/.test(e+"")}catch(t){return!1}}:function(e){return"[object Function]"===an.call(e)};avalon.isFunction=hn,avalon.isWindow=function(e){return e?e==e.document&&e.document!=e:!1},l(e)&&(avalon.isWindow=l);var mn;for(mn in avalon({}))break;var gn="0"!==mn;avalon.isPlainObject=function(e,t){if(!e||"object"!==avalon.type(e)||e.nodeType||avalon.isWindow(e))return!1;try{if(e.constructor&&!rn.call(e,"constructor")&&!rn.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(gn)for(t in e)return rn.call(e,t);for(t in e);return void 0===t||rn.call(e,t)},Xt.test(Object.getPrototypeOf)&&(avalon.isPlainObject=function(e){return"[object Object]"===an.call(e)&&Object.getPrototypeOf(e)===nn}),avalon.mix=avalon.fn.mix=function(){var e,t,n,r,a,i,o=arguments[0]||{},l=1,s=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[1]||{},l++),"object"==typeof o||hn(o)||(o={}),l===s&&(o=this,l--);s>l;l++)if(null!=(e=arguments[l]))for(t in e){n=o[t];try{r=e[t]}catch(u){continue}o!==r&&(c&&r&&(avalon.isPlainObject(r)||(a=Array.isArray(r)))?(a?(a=!1,i=n&&Array.isArray(n)?n:[]):i=n&&avalon.isPlainObject(n)?n:{},o[t]=avalon.mix(c,i,r)):void 0!==r&&(o[t]=r))}return o},avalon.mix({rword:Kt,subscribers:Yt,version:1.52,ui:{},log:n,slice:sn?function(e,t,n){return ln.call(e,t,n)}:function(e,t,n){var r=[],a=e.length;if(void 0===n&&(n=a),"number"==typeof n&&isFinite(n)){t=s(t,a),n=s(n,a);for(var i=t;n>i;++i)r[i-t]=e[i]}return r},noop:r,error:function(e,t){throw(t||Error)(e)},oneObject:i,range:function(e,t,n){n||(n=1),null==t&&(t=e||0,e=0);for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n)),i=new Array(a);++rn&&t(n,e[n])!==!1;n++);else for(n in e)if(e.hasOwnProperty(n)&&t(n,e[n])===!1)break}},getWidgetData:function(e,t){var n=avalon(e).data(),r={};for(var a in n)0===a.indexOf(t)&&(r[a.replace(t,"").replace(/\w/,function(e){return e.toLowerCase()})]=n[a]);return r},Array:{ensure:function(e,t){return-1===e.indexOf(t)?e.push(t):void 0},removeAt:function(e,t){return!!e.splice(t,1).length},remove:function(e,t){var n=e.indexOf(t);return~n?avalon.Array.removeAt(e,n):!1}}});var yn=avalon.bindingHandlers={},bn=avalon.bindingExecutors={},xn=avalon.directives={};avalon.directive=function(e,t){return yn[e]=t.init=t.init||r,bn[e]=t.update=t.update||r,xn[e]=t};var $n=new function(){function e(e){this.size=0,this.limit=e,this.head=this.tail=void 0,this._keymap={}}var t=e.prototype;return t.put=function(e,t){var n={key:e,value:t};return this._keymap[e]=n,this.tail?(this.tail.newer=n,n.older=this.tail):this.head=n,this.tail=n,this.size===this.limit?this.shift():this.size++,t},t.shift=function(){var e=this.head;e&&(this.head=this.head.newer,this.head.older=e.newer=e.older=this._keymap[e.key]=void 0,delete this._keymap[e.key])},t.get=function(e){var t=this._keymap[e];if(void 0!==t)return t===this.tail?t.value:(t.newer&&(t===this.head&&(this.head=t.newer),t.newer.older=t.older),t.older&&(t.older.newer=t.newer),t.newer=void 0,t.older=this.tail,this.tail&&(this.tail.newer=t),this.tail=t,t.value)},e};if(!"司徒正美".trim){var wn=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(wn,"")}}var Cn=!{toString:null}.propertyIsEnumerable("toString"),kn=function(){}.propertyIsEnumerable("prototype"),Nn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Tn=Nn.length;if(Object.keys||(Object.keys=function(e){var t=[],n=kn&&"function"==typeof e;if("string"==typeof e||e&&e.callee)for(var r=0;rl;l++){var s=Nn[l];o&&"constructor"===s||!rn.call(e,s)||t.push(s)}return t}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===an.call(e)}),r.bind||(Function.prototype.bind=function(e){if(arguments.length<2&&void 0===e)return this;var t=this,n=arguments;return function(){var r,a=[];for(r=1;rr&&(r+=n);n>r;r++)if(this[r]===e)return r;return-1},lastIndexOf:function(e,t){var n=this.length,r=null==t?n-1:t;for(0>r&&(r=Math.max(0,n+r));r>=0;r--)if(this[r]===e)return r;return-1},forEach:u("","_",""),filter:u("r=[],j=0,","if(_)r[j++]=this[i]","return r"),map:u("r=[],","r[i]=_","return r"),some:u("","if(_)return true","return false"),every:u("","if(!_)return false","return true")}),avalon.contains=f,Vt.contains||(Vt.contains=function(e){return f(Vt,e)}),e.SVGElement){Vt.createTextNode("x").contains||(Node.prototype.contains=function(e){return!!(16&this.compareDocumentPosition(e))});var An="http://www.w3.org/2000/svg",En=Vt.createElementNS(An,"svg");En.innerHTML='',en.test(En.firstChild)||Object.defineProperties(SVGElement.prototype,{outerHTML:{enumerable:!0,configurable:!0,get:d,set:function(e){var t=this.tagName.toLowerCase(),n=this.parentNode,r=avalon.parseHTML(e);if("svg"===t)n.insertBefore(r,this);else{var a=Vt.createDocumentFragment();p(r,a),n.insertBefore(a,this)}n.removeChild(this)}},innerHTML:{enumerable:!0,configurable:!0,get:function(){var e=this.outerHTML,t=new RegExp("<"+this.nodeName+'\\b(?:(["\'])[^"]*?(\\1)|[^>])*>',"i"),n=new RegExp("$","i");return e.replace(t,"").replace(n,"")},set:function(e){if(avalon.clearHTML){avalon.clearHTML(this);var t=avalon.parseHTML(e);p(t,this)}}}})}!cn.outerHTML&&e.HTMLElement&&HTMLElement.prototype.__defineGetter__("outerHTML",d);var On=/^(?:mouse|contextmenu|drag)|click/,Sn=avalon.eventHooks;if("onmouseenter"in cn||avalon.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){Sn[e]={type:t,deel:function(t,n,r){return function(n){var a=n.relatedTarget;return a&&(a===t||16&t.compareDocumentPosition(a))?void 0:(delete n.type,n.type=e,r.call(t,n))}}}}),avalon.each({AnimationEvent:"animationend",WebKitAnimationEvent:"webkitAnimationEnd"},function(t,n){e[t]&&!Sn.animationend&&(Sn.animationend={type:n})}),"oninput"in Vt.createElement("input")||(Sn.input={type:"propertychange",deel:function(e,t,n){return function(t){return"value"===t.propertyName?(t.type="input",n.call(e,t)):void 0}}}),void 0===Vt.onmousewheel){var _n=void 0!==Vt.onwheel?"wheel":"DOMMouseScroll",Mn="wheel"===_n?"deltaY":"detail";Sn.mousewheel={type:_n,deel:function(e,t,n){return function(t){t.wheelDeltaY=t.wheelDelta=t[Mn]>0?-120:120,t.wheelDeltaX=0,Object.defineProperty&&Object.defineProperty(t,"type",{value:"mousewheel"}),n.call(e,t)}}}}var jn,Ln,Dn,Hn,Pn,Fn=/[-.*+?^${}()|[\]\/\\]/g,Rn={loader:function(t){var n=Wt&&t;e.require=n?Wt:Gt,e.define=n?Wt.define:Jt},interpolate:function(e){if(jn=e[0],Ln=e[1],jn===Ln){throw new SyntaxError("openTag!==closeTag")}h.openTag=jn,h.closeTag=Ln;var t=m(jn),n=m(Ln);Dn=new RegExp(t+"(.*?)"+n),Hn=new RegExp(t+"(.*?)"+n,"g"),Pn=new RegExp(t+".*?"+n+"|\\sms-")}};h.async=!0,h.debug=!0,h.plugins=Rn,h.plugins.interpolate(["{{","}}"]),h.paths={},h.shim={},h.maxRepeatSize=100,avalon.config=h;var Bn=avalon.vmodels={};avalon.define=function(e){var t=e.$id;t||n("warning: vm必须指定$id");var r=$(e);return r.$id=t,Bn[t]=r};var qn=i("$id,$watch,$fire,$events,$model,$skipArray,$active,$pathname,$up,$track,$accessors"),In=Object.defineProperty,Vn=!0;try{In({},"_",{value:"x"});var Un=Object.defineProperties}catch(zn){Vn=!1}var Wn=Xt.test(Object.key)?Object.key:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&!qn[n]&&t.push(n);return t},Xn={get:function(){return O(this)},set:r,enumerable:!1,configurable:!0};if(!Vn&&("__defineGetter__"in avalon&&(In=function(e,t,n){return"value"in n&&(e[t]=n.value),"get"in n&&e.__defineGetter__(t,n.get),"set"in n&&e.__defineSetter__(t,n.set),e},Un=function(e,t){for(var n in t)t.hasOwnProperty(n)&&In(e,n,t[n]);return e}),vn)){var Yn={};e.execScript(["Function parseVB(code)"," ExecuteGlobal(code)","End Function"].join("\n"),"VBScript"),Un=function(t,n,r){var a=[];a.push("\r\n Private [__data__], [__proxy__]"," Public Default Function [__const__](d"+It+", p"+It+")"," Set [__data__] = d"+It+": set [__proxy__] = p"+It," Set [__const__] = Me"," End Function");var i={};for(t in n)i[t]=!0,a.push(" Public Property Let ["+t+"](val"+It+")",' Call [__proxy__](Me,[__data__], "'+t+'", val'+It+")"," End Property"," Public Property Set ["+t+"](val"+It+")",' Call [__proxy__](Me,[__data__], "'+t+'", val'+It+")"," End Property"," Public Property Get ["+t+"]"," On Error Resume Next"," Set["+t+'] = [__proxy__](Me,[__data__],"'+t+'")'," If Err.Number <> 0 Then"," ["+t+'] = [__proxy__](Me,[__data__],"'+t+'")'," End If"," On Error Goto 0"," End Property"); for(t in r)i[t]!==!0&&(i[t]=!0,a.push(" Public ["+t+"]"));for(t in qn)i[t]!==!0&&(i[t]=!0,a.push(" Public ["+t+"]"));a.push(" Public [hasOwnProperty]"),a.push("End Class");var o=a.join("\r\n"),l=Yn[o];l||(l=pn("VBClass"),e.parseVB("Class "+l+o),e.parseVB(["Function "+l+"Factory(a, b)"," Dim o"," Set o = (New "+l+")(a, b)"," Set "+l+"Factory = o","End Function"].join("\r\n")),Yn[o]=l);var s=e[l+"Factory"](n,S);return s}}var Gn=["push","pop","shift","unshift","splice"],Jn=Array.prototype,Zn={notify:function(){y.call(this.$up,this.$pathname)},set:function(e,t){if(e>>>0===e&&this[e]!==t){if(e>this.length)throw Error(e+"set方法的第一个参数不能大于原数组长度");y.call(this.$up,this.$pathname+".*",[t,this[e]]),this.splice(e,1,t)}},contains:function(e){return-1!==this.indexOf(e)},ensure:function(e){return this.contains(e)||this.push(e),this},pushArray:function(e){return this.push.apply(this,e)},remove:function(e){return this.removeAt(this.indexOf(e))},removeAt:function(e){return e>>>0===e?this.splice(e,1):[]},size:function(){return this._.length},removeAll:function(e){if(Array.isArray(e))for(var t=this.length-1;t>=0;t--)-1!==e.indexOf(this[t])&&(Kn.call(this,t,1),Kn.call(this.$track,t,1));else if("function"==typeof e)for(t=this.length-1;t>=0;t--){var n=this[t];e(n,t)&&(Kn.call(this,t,1),Kn.call(this.$track,t,1))}else Kn.call(this,0,this.length),Kn.call(this.$track,0,this.length);sn||(this.$model=O(this)),this.notify(),this._.length=this.length},clear:function(){return this.removeAll()}},Kn=Jn.splice;Gn.forEach(function(e){var t=Jn[e];Zn[e]=function(){for(var n=[],r=0,a=arguments.length;a>r;r++)n[r]=T(arguments[r],0,1,1);var i=t.apply(this,n);return j(this.$track,e,n),sn||(this.$model=O(this)),this.notify(),this._.length=this.length,i}}),"sort,reverse".replace(Kt,function(e){Zn[e]=function(){var t=this.concat(),n=this,r=Math.random(),a=[],i=!1;Jn[e].apply(n,arguments);for(var o=0,l=t.length;l>o;o++){var s=n[o],c=t[o];if(s===c)a.push(o);else{var u=t.indexOf(s);a.push(u),t[u]=r,i=!0}}return i&&(_(this.$track,a),sn||(this.$model=O(this)),this.notify()),this}});var Qn=function(){var e,t=[];return{begin:function(n){t.push(e),e=n},end:function(){e=t.pop()},collectDependency:function(t){e&&e.callback(t)}}}();avalon.injectBinding=function(e){e.handler=e.handler||xn[e.type].update||r,e.update=function(){var t=!1;e.getter||(t=!0,Qn.begin({callback:function(t){L(t,e)}}),e.getter=et(e.expr,e.vmodels,e),e.observers.forEach(function(t){t.v.$watch(t.p,e)}),delete e.observers);try{var r,a,i=e.fireArgs;if(delete e.fireArgs,i?(r=i[0],a=i[1]):r="on"===e.type?e.getter+"":e.getter.apply(0,e.args),a="undefined"==typeof a?e.oldValue:a,e._filters&&(r=Xa.$filter.apply(0,[r].concat(e._filters))),e.signature){var o=avalon.type(r);if("array"!==o&&"object"!==o)throw Error("warning:"+e.expr+"只能是对象或数组");e.xtype=o;var l=D(e.proxies||[],o),s=r.$track||("array"===o?M(r.length):Object.keys(r));e.track=s,l!==s.join(";")&&(e.handler(r,a),e.oldValue=1)}else(Array.isArray(r)?r.length===(a&&a.length):1)?"oldValue"in e&&r===a||(e.handler(r,a),e.oldValue=r):(e.handler(r,a),e.oldValue=r.concat())}catch(c){delete e.getter,n("warning:exception throwed in [avalon.injectBinding] ",c);var u=e.element;u&&3===u.nodeType&&(u.nodeValue=jn+(e.oneTime?"::":"")+e.expr+Ln)}finally{t&&Qn.end()}},e.update()};var er=0,tr=avalon.$$subscribers=[],nr=new Date,rr={},ar={area:[1,"",""],param:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],option:[1,""],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],g:[1,'',""],_default:sn?[0,"",""]:[1,"X
","
"]};ar.th=ar.td,ar.optgroup=ar.option,ar.tbody=ar.tfoot=ar.colgroup=ar.caption=ar.thead,String("circle,defs,ellipse,image,line,path,polygon,polyline,rect,symbol,text,use").replace(Kt,function(e){ar[e]=ar.g});var ir=/<([\w:]+)/,or=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,lr=sn?/[^\d\D]/:/(<(?:script|link|style|meta|noscript))/gi,sr=i(["","text/javascript","text/ecmascript","application/ecmascript","application/javascript"]),cr=/<(?:tb|td|tf|th|tr|col|opt|leg|cap|area)/,ur=Vt.createElement("script"),fr=/<|&#?\w+;/;avalon.parseHTML=function(e){var t=un.cloneNode(!1);if("string"!=typeof e)return t;if(!fr.test(e))return t.appendChild(Vt.createTextNode(e)),t;e=e.replace(or,"<$1>").trim();var n,r,a=(ir.exec(e)||["",""])[1].toLowerCase(),i=ar[a]||ar._default,o=fn;sn||(e=e.replace(lr,"
$1")),o.innerHTML=i[1]+e+i[2];var l=o.getElementsByTagName("script");if(l.length)for(var s,c=0;s=l[c++];)sr[s.type]&&(r=ur.cloneNode(!1),on.forEach.call(s.attributes,function(e){e&&e.specified&&(r[e.name]=e.value,r.setAttribute(e.name,e.value))}),r.text=s.text,s.parentNode.replaceChild(r,s));if(!sn){var u="X
"===i[1]?o.lastChild.firstChild:o.lastChild;if(u&&"TABLE"===u.tagName&&"tbody"!==a)for(l=u.childNodes,c=0;s=l[c++];)if("TBODY"===s.tagName&&!s.innerHTML){u.removeChild(s);break}l=o.getElementsByTagName("br");for(var f=l.length;s=l[--f];)"msNoScope"===s.className&&s.parentNode.removeChild(s);for(l=o.all,c=0;s=l[c++];)q(s)&&I(s)}for(c=i[0];c--;o=o.lastChild);for(;n=o.firstChild;)t.appendChild(n);return t},avalon.innerHTML=function(e,t){if(!sn&&!lr.test(t)&&!cr.test(t))try{return void(e.innerHTML=t)}catch(n){}var r=this.parseHTML(t);this.clearHTML(e).appendChild(r)},avalon.clearHTML=function(e){for(e.textContent="";e.firstChild;)e.removeChild(e.firstChild);return e};var dr={_toString:function(){var e=this.node,t=e.className,n="string"==typeof t?t:t.baseVal;return n.split(/\s+/).join(" ")},_contains:function(e){return(" "+this+" ").indexOf(" "+e+" ")>-1},_add:function(e){this.contains(e)||this._set(this+" "+e)},_remove:function(e){this._set((" "+this+" ").replace(" "+e+" "," "))},__set:function(e){e=e.trim();var t=this.node;en.test(t)?t.setAttribute("class",e):t.className=e}};"add,remove".replace(Kt,function(e){avalon.fn[e+"Class"]=function(t){var n=this[0];return t&&"string"==typeof t&&n&&1===n.nodeType&&t.replace(/\S+/g,function(t){z(n)[e](t)}),this}}),avalon.fn.mix({hasClass:function(e){var t=this[0]||{};return 1===t.nodeType&&z(t).contains(e)},toggleClass:function(e,t){for(var n,r=0,a=String(e).split(/\s+/),i="boolean"==typeof t;n=a[r++];){var o=i?t:!this.hasClass(n);this[o?"addClass":"removeClass"](n)}return this},attr:function(e,t){return 2===arguments.length?(this[0].setAttribute(e,t),this):this[0].getAttribute(e)},data:function(e,t){switch(e="data-"+V(e||""),arguments.length){case 2:return this.attr(e,t),this;case 1:var n=this.attr(e);return W(n);case 0:var r={};return on.forEach.call(this[0].attributes,function(t){t&&(e=t.name,e.indexOf("data-")||(e=U(e.slice(5)),r[e]=W(t.value)))}),r}},removeData:function(e){return e="data-"+V(e),this[0].removeAttribute(e),this},css:function(e,t){if(avalon.isPlainObject(e))for(var n in e)avalon.css(this,n,e[n]);else var r=avalon.css(this,e,t);return void 0!==r?r:this},position:function(){var e,t,n=this[0],r={top:0,left:0};if(n)return"fixed"===this.css("position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),"HTML"!==e[0].tagName&&(r=e.offset()),r.top+=avalon.css(e[0],"borderTopWidth",!0),r.left+=avalon.css(e[0],"borderLeftWidth",!0),r.top-=e.scrollTop(),r.left-=e.scrollLeft()),{top:t.top-r.top-avalon.css(n,"marginTop",!0),left:t.left-r.left-avalon.css(n,"marginLeft",!0)}},offsetParent:function(){for(var e=this[0].offsetParent;e&&"static"===avalon.css(e,"position");)e=e.offsetParent;return avalon(e||cn)},bind:function(e,t,n){return this[0]?avalon.bind(this[0],e,t,n):void 0},unbind:function(e,t,n){return this[0]&&avalon.unbind(this[0],e,t,n),this},val:function(e){var t=this[0];if(t&&1===t.nodeType){var n=0===arguments.length,r=n?":get":":set",a=Sr[G(t)+r];if(a)var i=a(t,e);else{if(n)return(t.value||"").replace(/\r/g,"");t.value=e}}return n?i:this}});var pr=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,vr=/^[\],:{}\s]*$/,hr=/(?:^|:|,)(?:\s*\[)+/g,mr=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,gr=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;avalon.parseJSON=e.JSON?JSON.parse:function(e){if("string"==typeof e){if(e=e.trim(),e&&vr.test(e.replace(mr,"@").replace(gr,"]").replace(hr,"")))return new Function("return "+e)();avalon.error("Invalid JSON: "+e)}return e},avalon.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){avalon.fn[e]=function(n){var r=this[0]||{},a=X(r),i="scrollTop"===e;return arguments.length?void(a?a.scrollTo(i?avalon(a).scrollLeft():n,i?n:avalon(a).scrollTop()):r[e]=n):a?t in a?a[t]:cn[e]:r[e]}});var yr=avalon.cssHooks={},br=["","-webkit-","-o-","-moz-","-ms-"],xr={"float":sn?"cssFloat":"styleFloat"};if(avalon.cssNumber=i("animationIterationCount,columnCount,order,flex,flexGrow,flexShrink,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom"),avalon.cssName=function(e,t,n){if(xr[e])return xr[e];t=t||cn.style;for(var r=0,a=br.length;a>r;r++)if(n=U(br[r]+e),n in t)return xr[e]=n;return null},yr["@:set"]=function(e,t,n){try{e.style[t]=n}catch(r){}},e.getComputedStyle)yr["@:get"]=function(e,t){if(!e||!e.style)throw new Error("getComputedStyle要求传入一个节点 "+e);var n,r=getComputedStyle(e,null);return r&&(n="filter"===t?r.getPropertyValue(t):r[t],""===n&&(n=e.style[t])),n},yr["opacity:get"]=function(e){var t=yr["@:get"](e,"opacity");return""===t?"1":t};else{var $r=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,wr=/^(top|right|bottom|left)$/,Cr=/alpha\([^)]*\)/i,kr=!!e.XDomainRequest,Nr="DXImageTransform.Microsoft.Alpha",Tr={thin:kr?"1px":"2px",medium:kr?"3px":"4px",thick:kr?"5px":"6px"};yr["@:get"]=function(e,t){var n=e.currentStyle,r=n[t];if($r.test(r)&&!wr.test(r)){var a=e.style,i=a.left,o=e.runtimeStyle.left;e.runtimeStyle.left=n.left,a.left="fontSize"===t?"1em":r||0,r=a.pixelLeft+"px",a.left=i,e.runtimeStyle.left=o}return"medium"===r&&(t=t.replace("Width","Style"),"none"===n[t]&&(r="0px")),""===r?"auto":Tr[r]||r},yr["opacity:set"]=function(e,t,n){var r=e.style,a=isFinite(n)&&1>=n?"alpha(opacity="+100*n+")":"",i=r.filter||"";r.zoom=1,r.filter=(Cr.test(i)?i.replace(Cr,a):i+" "+a).trim(),r.filter||r.removeAttribute("filter")},yr["opacity:get"]=function(e){var t=e.filters.alpha||e.filters[Nr],n=t&&t.enabled?t.opacity:100;return n/100+""}}"top,left".replace(Kt,function(e){yr[e+":get"]=function(t){var n=yr["@:get"](t,e);return/px$/.test(n)?n:avalon(t).position()[e]+"px"}});var Ar={position:"absolute",visibility:"hidden",display:"block"},Er=/^(none|table(?!-c[ea]).+)/;"Width,Height".replace(Kt,function(e){var t=e.toLowerCase(),n="client"+e,r="scroll"+e,a="offset"+e;yr[t+":get"]=function(t,n,r){var i=-4;"number"==typeof r&&(i=r),n="Width"===e?["Left","Right"]:["Top","Bottom"];var o=t[a];return 2===i?o+avalon.css(t,"margin"+n[0],!0)+avalon.css(t,"margin"+n[1],!0):(0>i&&(o=o-avalon.css(t,"border"+n[0]+"Width",!0)-avalon.css(t,"border"+n[1]+"Width",!0)),-4===i&&(o=o-avalon.css(t,"padding"+n[0],!0)-avalon.css(t,"padding"+n[1],!0)),o)},yr[t+"&get"]=function(e){var n=[];Y(e,n);for(var r,a=yr[t+":get"](e),i=0;r=n[i++];){e=r.node;for(var o in r)"string"==typeof r[o]&&(e.style[o]=r[o])}return a},avalon.fn[t]=function(i){var o=this[0];if(0===arguments.length){if(o.setTimeout)return o["inner"+e]||o.document.documentElement[n];if(9===o.nodeType){var l=o.documentElement;return Math.max(o.body[r],l[r],o.body[a],l[a],l[n])}return yr[t+"&get"](o)}return this.css(t,i)},avalon.fn["inner"+e]=function(){return yr[t+":get"](this[0],void 0,-2)},avalon.fn["outer"+e]=function(e){return yr[t+":get"](this[0],void 0,e===!0?2:0)}}),avalon.fn.offset=function(){var e=this[0],t={left:0,top:0};if(!e||!e.tagName||!e.ownerDocument)return t;var n=e.ownerDocument,r=n.body,a=n.documentElement,i=n.defaultView||n.parentWindow;if(!avalon.contains(a,e))return t;e.getBoundingClientRect&&(t=e.getBoundingClientRect());var o=a.clientTop||r.clientTop,l=a.clientLeft||r.clientLeft,s=Math.max(i.pageYOffset||0,a.scrollTop,r.scrollTop),c=Math.max(i.pageXOffset||0,a.scrollLeft,r.scrollLeft);return{top:t.top+s-o,left:t.left+c-l}};var Or=/^]+))?)*\s+value[\s=]/i,Sr={"option:get":vn?function(e){return Or.test(e.outerHTML)?e.value:e.text.trim()}:function(e){return e.value},"select:get":function(e,t){for(var n,r=e.options,a=e.selectedIndex,i=Sr["option:get"],o="select-one"===e.type||0>a,l=o?null:[],s=o?a+1:r.length,c=0>a?s:o?a:0;s>c;c++)if(n=r[c],(n.selected||c===a)&&!n.disabled){if(t=i(n),o)return t;l.push(t)}return l},"select:set":function(e,t,n){t=[].concat(t);for(var r,a=Sr["option:get"],i=0;r=e.options[i++];)(r.selected=t.indexOf(a(r))>-1)&&(n=!0);n||(e.selectedIndex=-1)}},_r={},Mr=["break,case,catch,continue,debugger,default,delete,do,else,false","finally,for,function,if,in,instanceof,new,null,return,switch,this","throw,true,try,typeof,var,void,while,with","abstract,boolean,byte,char,class,const,double,enum,export,extends","final,float,goto,implements,import,int,interface,long,native","package,private,protected,public,short,static,super,synchronized","throws,transient,volatile","arguments,let,yield,undefined"].join(",");Mr.replace(/\w+/g,function(e){_r[e]=!0});var jr=function(e){return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e},Lr=/(\$proxy\$[a-z]+)\d+$/,Dr=new $n(218),Hr=new $n(128),Pr=/\)\s*$/,Fr=/\)\s*\|/g,Rr=/\|\s*([$\w]+)/g,Br=/"\s*\["/g,qr=/"\s*\(/g,Ir={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},Vr=e.JSON&&JSON.stringify||function(e){return'"'+e.replace(/[\\\"\x00-\x1f]/g,function(e){var t=Ir[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"'};avalon.scan=function(e,t){e=e||cn;var n=t?[].concat(t):[];ft(e,n)};var Ur=i("area,base,basefont,br,col,command,embed,hr,img,input,link,meta,param,source,track,wbr,noscript,script,style,textarea".toUpperCase()),zr=function(e,t,n){var r=e.getAttribute(t);if(r)for(var a,i=0;a=n[i++];)if(a.hasOwnProperty(r)&&"function"==typeof a[r])return a[r]},Wr=vn&&e.MutationObserver?function(e){for(var t,n=e.firstChild;n;){var r=n.nextSibling;3===n.nodeType?t?(t.nodeValue+=n.nodeValue,e.removeChild(n)):t=n:t=null,n=r}}:0,Xr=/^\s*::/,Yr=/ms-(\w+)-?(.*)/,Gr=i("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit"),Jr=i("value,title,alt,checked,selected,disabled,readonly,enabled,href,src"),Zr=/^if|widget|repeat$/,Kr=/^each|with|html|include$/;if(!sn)var Qr=new $n(512),ea=/\s+([^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,ta=/^['"]/,na=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/i,ra=/&/g,aa=function(e){var t=e.outerHTML;if("8?e.bound("input",p):e.bound("propertychange",function(e){"value"===e.propertyName&&p()}),e.bound("dragend",function(){setTimeout(function(){p()},17)})):(e.bound("input",p),e.bound("compositionstart",o),e.bound("compositionend",l),e.bound("DOMAutoComplete",p));break;case"select":e.bound("change",function(){var t=avalon(s).val();if(t=Array.isArray(t)?t.map(function(t){return e.pipe(t,e,"get")}):e.pipe(t,e,"get"),t+""!==e.oldValue)try{e.setter(t),a.call(s,t)}catch(r){n(r)}})}"input"===e.xtype&&/^(text|password|hidden)/.test(s.type)&&(s.avalonSetter=p,Ca(function(){if(cn.contains(s))e.oldValue!==s.value&&p();else if(!s.msRetain)return!1}));for(var v in avalon.vmodels){var h=avalon.vmodels[v];h.$fire("avalon-ms-duplex-init",e)}var m=e.pipe||(e.pipe=yt);m(null,e,"init")},update:function(e){var t,n=this.element,r=this;switch(this.xtype){case"input":case"change":t=this.pipe(e,this,"set"),t!==this.oldValue&&(n.value=this.oldValue=t);break;case"radio":t=r.isChecked?!!e:e+""===n.value,6===vn?setTimeout(function(){n.defaultChecked=t,n.checked=t},31):n.checked=t;break;case"checkbox":var a=[].concat(e);t=this.pipe(n.value,this,"get"),n.checked=a.indexOf(t)>-1;break;case"select":r._value=e,n.msHasEvent="selectDuplex",avalon.bind(n,"datasetchanged",function(e){if("selectDuplex"===e.bubble){var t=r._value,a=Array.isArray(t)?t.map(String):t+"";avalon(n).val(a),n.oldValue=a+"",r.changed.call(n,a)}})}"select"!==r.xtype&&r.changed.call(n,t)}})}vn&&avalon.bind(Vt,"selectionchange",function(){var e=Vt.activeElement;e&&"function"==typeof e.avalonSetter&&e.avalonSetter()}),avalon.duplexHooks={checked:{get:function(e,t){return!t.oldValue}},string:{get:function(e){return e},set:gt},"boolean":{get:function(e){return"true"===e},set:gt},number:{get:function(e,t){var n=parseFloat(e+"");if(-e===-n)return n;var r=/strong|medium|weak/.exec(t.element.getAttribute("data-duplex-number"))||["medium"];switch(r[0]){case"strong":return 0;case"medium":return""===e?"":0;case"weak":return e}},set:gt}};var $a,wa=[];avalon.tick=function(e){1===wa.push(e)&&($a=setInterval(bt,60))};var Ca=r;!new function(){function e(e){t[this.tagName].call(this,e),"function"==typeof this.avalonSetter&&this.oldValue!==e&&this.avalonSetter()}try{var t={},n=HTMLInputElement.prototype,r=HTMLTextAreaElement.prototype,a=HTMLInputElement.prototype;Object.getOwnPropertyNames(a),t.INPUT=Object.getOwnPropertyDescriptor(n,"value").set,Object.defineProperty(n,"value",{set:e}),t.TEXTAREA=Object.getOwnPropertyDescriptor(r,"value").set,Object.defineProperty(r,"value",{set:e})}catch(i){Ca=avalon.tick}},avalon.directive("effect",{priority:5,init:function(e){var t,n,r=e.expr,a=r.replace(Hn,function(e){return e.replace(/./g,"0")}).indexOf(":");-1===a?(t=r,n=!0):(t=r.slice(0,a),n=r.slice(a+1)),t=Dn.test(r)?tt(t):Vr(t),e.expr="["+t+","+n+"]"},update:function(t){var n=t[0],r=this.element;if(r.getAttribute("data-effect-name")!==n){r.removeAttribute("data-effect-driver");var a=r.style,i=e.getComputedStyle?e.getComputedStyle(r):null,o=!1;if(i&&(Ta||Aa)){var l=a[Ea]||i[Ea];l&&"0s"!==l&&(r.setAttribute("data-effect-driver","t"),o=!0),o||(l=a[Oa]||i[Oa],l&&"0s"!==l&&(r.setAttribute("data-effect-driver","a"),o=!0))}o||avalon.effects[n]&&(r.setAttribute("data-effect-driver","j"),o=!0),o&&r.setAttribute("data-effect-name",n)}}}),avalon.effects={},avalon.effect=function(e,t){avalon.effects[e]=t};var ka,Na,Ta=!1,Aa=!1,Ea=avalon.cssName("transition-duration"),Oa=avalon.cssName("animation-duration");!new function(){var t,n={TransitionEvent:"transitionend",WebKitTransitionEvent:"webkitTransitionEnd",OTransitionEvent:"oTransitionEnd",otransitionEvent:"otransitionEnd"};for(var r in n){if(e[r]){t=n[r];break}try{{document.createEvent(r)}t=n[r];break}catch(a){}}"string"==typeof t&&(Ta=!0,ka=t),n={AnimationEvent:"animationend",WebKitAnimationEvent:"webkitAnimationEnd"};var i;for(r in n)if(e[r]){i=n[r];break}"string"==typeof i&&(Ta=!0,Na=i)};var Sa=[],_a=new ca;Ct.prototype={contrustor:Ct,enterClass:function(){return kt(this,"enter")},leaveClass:function(){return kt(this,"leave")},actionFun:function(e,t,n){if(!document.hidden){var r=this,a=r.el,i="leave"===e;e=i?"leave":"enter";var o=i?"enter":"leave";Nt(r,"abort"+wt(o)),Nt(r,"before"+wt(e)),i||t(a);var l=function(o){a.removeEventListener(r.cssEvent,r.cssCallback),i?(t(a),avalon(a).removeClass(r.cssClass)):"a"===r.driver&&avalon(a).removeClass(r.cssClass),o!==!0&&(Nt(r,"after"+wt(e)),n&&n(a)),r.dispose()};r.useCss?(r.cssCallback&&r.cssCallback(!0),r.cssClass=kt(r,e),r.cssCallback=l,r.update=function(){a.addEventListener(r.cssEvent,r.cssCallback),i||"t"!==r.driver||avalon(a).removeClass(r.cssClass)},avalon(a).addClass(r.cssClass),_a.render(!0),_a.queue.push(r)):Nt(r,e,l)}},enter:function(){this.actionFun.apply(this,["enter"].concat(avalon.slice(arguments)))},leave:function(){this.actionFun.apply(this,["leave"].concat(avalon.slice(arguments)))},dispose:function(){this.update=this.cssCallback=null,Sa.unshift(this)>100&&Sa.pop()}};var Ma=function(e,t){var n=ln.call(arguments,0);"function"!=typeof n[2]&&n.splice(2,0,r),"function"!=typeof n[3]&&n.splice(3,0,r);var a=n[2],i=n[3],o=n[4],l=xt(e,o);if(!l)return a(),i(),!1;var s=t?"enter":"leave";l[s](a,i)};avalon.mix(avalon.effect,{apply:Ma,append:function(e,t,n,r){return Ma(e,1,function(){t.appendChild(e)},n,r)},before:function(e,t,n,r){return Ma(e,1,function(){t.parentNode.insertBefore(e,t)},n,r)},remove:function(e,t,n,r){return Ma(e,0,function(){e.parentNode===t&&t.removeChild(e)},n,r)}}),avalon.directive("html",{update:function(e){var t=this,n=this.element,r=1!==n.nodeType,a=r?n.parentNode:n;if(a){if(e=null==e?"":e,3===n.nodeType){var i=pn("html");a.insertBefore(Vt.createComment(i),n),t.element=Vt.createComment(i+":end"),a.replaceChild(t.element,n),n=t.element}if("object"!=typeof e)var o=avalon.parseHTML(String(e));else if(11===e.nodeType)o=e;else if(1===e.nodeType||e.item){var l=1===e.nodeType?e.childNodes:e.item;for(o=un.cloneNode(!0);l[0];)o.appendChild(l[0])}if(l=avalon.slice(o.childNodes),r){for(var s=n.nodeValue.slice(0,-4);;){var c=n.previousSibling;if(!c||8===c.nodeType&&c.nodeValue===s)break;a.removeChild(c)}a.insertBefore(o,n)}else avalon.clearHTML(n).appendChild(o);ut(l,t.vmodels)}}}),avalon.directive("if",{priority:10,update:function(e){function t(){a.getAttribute(r.name)&&(a.removeAttribute(r.name),lt(a,r.vmodels)),r.rollback=null}var n,r=this,a=this.element,i=r.stamp=+new Date,o=function(){i===r.stamp&&(r.recoverNode=null)};r.recoverNode&&r.recoverNode();try{if(!a.parentNode)return;n=a.parentNode}catch(l){return}if(e){if(8===a.nodeType){var s=r.keep,c=avalon.effect.apply(s,1,function(){i===r.stamp&&(a.parentNode.replaceChild(s,a),a=r.element=s,s.getAttribute("_required")&&(a.required=!0,a.removeAttribute("_required")),a.querySelectorAll&&avalon.each(a.querySelectorAll("[_required=true]"),function(e){e.required=!0,e.removeAttribute("_required")}),t())},o);c=c===!1}c||t()}else if(1===a.nodeType){a.required===!0&&(a.required=!1,a.setAttribute("_required","true"));try{avalon.each(a.querySelectorAll(":required"),function(e){a.required=!1,e.setAttribute("_required","true")})}catch(l){}var u=r.element=Vt.createComment("ms-if"),f=a.nextSibling;r.recoverNode=function(){r.recoverNode=null,u.parentNode!==n&&(n.insertBefore(u,f),r.keep=a)},avalon.effect.apply(a,0,function(){r.recoverNode=null,i===r.stamp&&(a.parentNode.replaceChild(u,a),r.keep=a,zt.appendChild(a),r.rollback=function(){a.parentNode===zt&&zt.removeChild(a)})},o)}}});var ja=/(?:[\s\S]+?)<\/noscript>/gim,La=/([\s\S]+?)<\/noscript>/im,Da=function(){return new(e.XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP")},Ha=avalon.templateCache={};avalon.directive("include",{init:xn.attr.init,update:function(e){var t=this,n=this.element,r=t.vmodels,a=t.includeRendered,i=t.effectName&&t.effectClass,o=t.templateCache,l=t.includeReplace,s=t.includeLoaded,c=l?n.parentNode:n,u=t._element;t.recoverNodes=t.recoverNodes||avalon.noop;var f=(l&&u.cloneNode(),function(f){var d=t._stamp=+new Date;if(s){var p=s.apply(c,[f].concat(r));"string"==typeof p&&(f=p)}a&&rt(c,function(){a.call(c)},0/0);var v=t.includeLastID||"_default";t.includeLastID=e;var h=o&&o[v]||Vt.createElement(n.tagName||t._element.tagName);i&&(h.className=i,c.insertBefore(h,t.start)),(o||{})[v]=h;var m=t.recoverNodes();for(m&&c.insertBefore(m,t.end);;){var g=t.start.nextSibling;if(!g||g===h||g===t.end)break;h.appendChild(g)}avalon.effect.remove(h,c,function(){o&&d===t._stamp&&zt.appendChild(h)},t);var y=c,b=avalon.noop,x=avalon.noop,$=Tt(t,e,f),w=avalon.slice($.childNodes);l&&i?(y=u,y.innerHTML="",y.setAttribute("ms-skip","true"),c.insertBefore(y,t.end.nextSibling),b=function(){y.insertBefore($,null)},x=function(){t.recoverNodes=avalon.noop,d===t._stamp&&($=At(w),c.insertBefore($,t.end),ut(w,r)),y.parentNode===c&&c.removeChild(y)},t.recoverNodes=function(){return t.recoverNodes=avalon.noop,At(w)}):b=function(){c.insertBefore($,t.end),ut(w,r) },avalon.effect.apply(y,"enter",b,x)});if("src"===t.param)if("string"==typeof Ha[e])avalon.nextTick(function(){f(Ha[e])});else if(Array.isArray(Ha[e]))Ha[e].push(f);else{var d=Da();d.onreadystatechange=function(){if(4===d.readyState){var t=d.status;if(t>=200&&300>t||304===t||1223===t){for(var n,r=d.responseText,a=0;n=Ha[e][a++];)n(r);Ha[e]=r}}},Ha[e]=[f],d.open("GET",e,!0),"withCredentials"in d&&(d.withCredentials=!0),d.setRequestHeader("X-Requested-With","XMLHttpRequest"),d.send(null)}else{var p=e&&1===e.nodeType?e:Vt.getElementById(e);if(p){if("NOSCRIPT"===p.tagName&&!p.innerHTML&&!p.fixIE78){d=Da(),d.open("GET",location,!1),d.send(null);for(var v=Vt.getElementsByTagName("noscript"),h=(d.responseText||"").match(ja)||[],m=h.length,g=0;m>g;g++){var y=v[g];y&&(y.style.display="none",y.fixIE78=(h[g].match(La)||[""," "])[1])}}avalon.nextTick(function(){f(p.fixIE78||p.value||p.innerText||p.innerHTML)})}}}});var Pa=/\(([^)]*)\)/,Fa=avalon.directive("on",{priority:3e3,init:function(e){var t=e.expr;e.type="on";var n=e.param.replace(/-\d+$/,"");if("function"==typeof Fa[n+"Hook"]&&Fa[n+"Hook"](e),t.indexOf("(")>0&&t.indexOf(")")>-1){var r=(t.match(Pa)||["",""])[1].trim();(""===r||"$event"===r)&&(t=t.replace(Pa,""))}e.expr=t},update:function(e){var t=this,n=this.element;e=function(e){var n=t.getter||r;return n.apply(this,t.args.concat(e))};var a=t.param.replace(/-\d+$/,"");if("scan"===a)e.call(n,{type:a});else if("function"==typeof t.specialBind)t.specialBind(n,e);else var i=avalon.bind(n,a,e);t.rollback=function(){"function"==typeof t.specialUnbind?t.specialUnbind():avalon.unbind(n,a,i)}}});avalon.directive("repeat",{priority:90,init:function(e){var t=e.type;e.cache={},e.enterCount=0;var n=e.element;if(1===n.nodeType){n.removeAttribute(e.name),$t(n,e),e.param=e.param||"el",e.sortedCallback=zr(n,"data-with-sorted",e.vmodels);var r=zr(n,"data-"+t+"-rendered",e.vmodels),a=pn(t),i=Vt.createComment(a+":start"),o=e.element=Vt.createComment(a+":end");if(e.signature=a,e.start=i,e.template=un.cloneNode(!1),"repeat"===t){var l=n.parentNode;l.replaceChild(o,n),l.insertBefore(i,o),e.template.appendChild(n)}else{for(;n.firstChild;)e.template.appendChild(n.firstChild);n.appendChild(i),n.appendChild(o),l=n}if(e.element=o,r)var s=avalon.bind(l,"datasetchanged",function(){r.apply(l,l.args),avalon.unbind(l,"datasetchanged",s),l.msRendered=r})}},update:function(e,t){var n=this,r=this.xtype;this.enterCount+=1;var a=!t;if(a){n.$outer={};var i="$key",o="$val";"array"===r&&(i="$first",o="$last");for(var l,s=0;l=n.vmodels[s++];)if(l.hasOwnProperty(i)&&l.hasOwnProperty(o)){n.$outer=l;break}}var c=this.track;if(n.sortedCallback){var u=n.sortedCallback.call(x,c);u&&Array.isArray(u)&&(c=u)}var f="move";n.$repeat=e;var d=[],p=a&&un.cloneNode(!1),v=[],m=this.param,g=avalon.mix({},this.cache),y=this.element,b=c.length,x=y.parentNode;for(s=0;b>s;s++){var $=c[s],w=g[$];if(w)d.push({}),g[$]=!0;else{w=Mt(this),"array"===r?(f="add",w.$id=$,w[m]=e[s]):(f="append",w.$key=$,w.$val=e[$]),this.cache[$]=w;var C=w.$anchor||(w.$anchor=y.cloneNode(!1));C.nodeValue=this.signature,_t(n,p,w,d,a&&!n.effectDriver),Dt(w,n,r)}1===this.enterCount&&(w.$active=!1,w.$oldIndex=w.$index,w.$active=!0,w.$index=s),"array"===r?(w.$first=0===s,w.$last=s===b-1):w.$val=O(e[$]),v.push(w)}if(this.proxies=v,a&&!n.effectDriver)x.insertBefore(p,y),d.forEach(function(e){ut(e.nodes||[],e.vmodels),e.nodes=e.vmodels=null});else{var k=n.staggerIndex=0;for($ in g)g[$]!==!0&&(f="del",St(g[$].$anchor,n),Ft(this.cache,$,m),g[$]=null);for(s=0;b>s;s++){w=v[s],$="array"===r?w.$id:w.$key;var N=v[s-1],T=N?N.$anchor:n.start;g[$]?w.$index!==w.$oldIndex&&!function(e,t){k=Ot(n.effectEnterStagger,function(){var r=St(e.$anchor),a=avalon.slice(r.childNodes);x.insertBefore(r,t.nextSibling),Et(a,1,n)},k)}(w,T):!function(e,t){var r=e.nodes,a=e.vmodels;r&&(k=Ot(n.effectEnterStagger,function(){x.insertBefore(e.content,t.nextSibling),ut(r,a),Et(r,1,n)},k)),e.nodes=e.vmodels=null}(d[s],T)}}if(!e.$track)for($ in this.cache)Ft(this.cache,$,m);!function(e){x.args=e,x.msRendered&&x.msRendered.apply(x,e)}(h.newWatch?arguments:[f]);var A=setTimeout(function(){clearTimeout(A),avalon.fireDom(x,"datasetchanged",{bubble:x.msHasEvent})});this.enterCount-=1}}),"with,each".replace(Kt,function(e){xn[e]=avalon.mix({},xn.repeat,{priority:1400})});var Ra=[],Ba=[];avalon.directive("text",{update:function(e){var t=this.element;if(e=null==e?"":e,3===t.nodeType)try{t.data=e}catch(n){}else"textContent"in t?t.textContent=e:t.innerText=e}}),avalon.parseDisplay=Rt,avalon.directive("visible",{init:function(){},update:function(e){var t=this.element,n=this,r=n.stamp=+new Date;e?(t.style.display="none",avalon.effect.apply(t,1,function(){if(r===n.stamp){var e=t.getAttribute("data-effect-driver")||"a";/^[atn]/.test(e)&&(this.effectName||(t.style.display=""),"none"===avalon(t).css("display")&&(t.style.display=Rt(t.nodeName)))}})):avalon.effect.apply(t,0,function(){r===n.stamp&&(t.style.display="none")})}});var qa=/]*>([\S\s]*?)<\/script\s*>/gim,Ia=/\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,Va=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/gi,Ua={a:/\b(href)\=("javascript[^"]*"|'javascript[^']*')/gi,img:/\b(src)\=("javascript[^"]*"|'javascript[^']*')/gi,form:/\b(action)\=("javascript[^"]*"|'javascript[^']*')/gi},za=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Wa=/([^\#-~| |!])/g,Xa=avalon.filters={uppercase:function(e){return e.toUpperCase()},lowercase:function(e){return e.toLowerCase()},truncate:function(e,t,n){return t=t||30,n="string"==typeof n?n:"...",e.length>t?e.slice(0,t-n.length)+n:String(e)},$filter:function(e){for(var t=1,n=arguments.length;n>t;t++){var r=arguments[t],a=avalon.filters[r.shift()];if("function"==typeof a){var i=[e].concat(r);e=a.apply(null,i)}}return e},camelize:U,sanitize:function(e){return e.replace(qa,"").replace(Va,function(e){var t=e.toLowerCase().match(/<(\w+)\s/);if(t){var n=Ua[t[1]];n&&(e=e.replace(n,function(e,t,n){var r=n.charAt(0);return t+"="+r+"javascript:void(0)"+r}))}return e.replace(Ia," ").replace(/\s+/g," ")})},escape:function(e){return String(e).replace(/&/g,"&").replace(za,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(Wa,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")},currency:function(e,t,n){return(t||"¥")+Bt(e,isFinite(n)?n:2)},number:Bt};!new function(){function e(e){return parseInt(e,10)||0}function t(e,t,n){var r="";for(0>e&&(r="-",e=-e),e=""+e;e.length0||o>-r)&&(o+=r),0===o&&-12===r&&(o=12),t(o,n,a)}}function r(e,t){return function(n,r){var a=n["get"+e](),i=(t?"SHORT"+e:e).toUpperCase();return r[i][a]}}function a(e){var n=-1*e.getTimezoneOffset(),r=n>=0?"+":"";return r+=t(Math[n>0?"floor":"ceil"](n/60),2)+t(Math.abs(n%60),2)}function i(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}var o={yyyy:n("FullYear",4),yy:n("FullYear",2,0,!0),y:n("FullYear",1),MMMM:r("Month"),MMM:r("Month",!0),MM:n("Month",2,1),M:n("Month",1,1),dd:n("Date",2),d:n("Date",1),HH:n("Hours",2),H:n("Hours",1),hh:n("Hours",2,-12),h:n("Hours",1,-12),mm:n("Minutes",2),m:n("Minutes",1),ss:n("Seconds",2),s:n("Seconds",1),sss:n("Milliseconds",3),EEEE:r("Day"),EEE:r("Day",!0),a:i,Z:a},l=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,s=/^\/Date\((\d+)\)\/$/;Xa.date=function(t,n){var r,a,i=Xa.date.locate,c="",u=[];if(n=n||"mediumDate",n=i[n]||n,"string"==typeof t)if(/^\d+$/.test(t))t=e(t);else if(s.test(t))t=+RegExp.$1;else{var f=t.trim(),d=[0,0,0,0,0,0,0],p=new Date(0);f=f.replace(/^(\d+)\D(\d+)\D(\d+)/,function(t,n,r,a){var i=4===a.length?[a,n,r]:[n,r,a];return d[0]=e(i[0]),d[1]=e(i[1])-1,d[2]=e(i[2]),""});var v=p.setFullYear,h=p.setHours;f=f.replace(/[T\s](\d+):(\d+):?(\d+)?\.?(\d)?/,function(t,n,r,a,i){return d[3]=e(n),d[4]=e(r),d[5]=e(a),i&&(d[6]=Math.round(1e3*parseFloat("0."+i))),""});var m=0,g=0;f=f.replace(/Z|([+-])(\d\d):?(\d\d)/,function(t,n,r,a){return v=p.setUTCFullYear,h=p.setUTCHours,n&&(m=e(n+r),g=e(n+a)),""}),d[3]-=m,d[4]-=g,v.apply(p,d.slice(0,3)),h.apply(p,d.slice(3)),t=p}if("number"==typeof t&&(t=new Date(t)),"date"===avalon.type(t)){for(;n;)a=l.exec(n),a?(u=u.concat(a.slice(1)),n=u.pop()):(u.push(n),n=null);return u.forEach(function(e){r=o[e],c+=r?r(t,i):e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}};var c={AMPMS:{0:"上午",1:"下午"},DAY:{0:"星期日",1:"星期一",2:"星期二",3:"星期三",4:"星期四",5:"星期五",6:"星期六"},MONTH:{0:"1月",1:"2月",2:"3月",3:"4月",4:"5月",5:"6月",6:"7月",7:"8月",8:"9月",9:"10月",10:"11月",11:"12月"},SHORTDAY:{0:"周日",1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六"},fullDate:"y年M月d日EEEE",longDate:"y年M月d日",medium:"yyyy-M-d H:mm:ss",mediumDate:"yyyy-M-d",mediumTime:"H:mm:ss","short":"yy-M-d ah:mm",shortDate:"yy-M-d",shortTime:"ah:mm"};c.SHORTMONTH=c.MONTH,Xa.date.locate=c};var Ya=avalon.modules={"domReady!":{exports:avalon,state:3},avalon:{exports:avalon,state:4}};Ya.exports=Ya.avalon,new function(){function t(e,t){var r="js";e=e.replace(/^(\w+)\!/,function(e,t){return r=t,""}),"ready"===r&&(n("debug: ready!已经被废弃,请使用domReady!"),r="domReady");var a="";e=e.replace(E,function(e){return a=e,""});var i="."+r,o=/js|css/.test(i)?i:"";e=e.replace(/\.[a-z0-9]+$/g,function(e){return e===i?(o=e,""):e});var l=avalon.mix({query:a,ext:o,res:r,name:e,toUrl:m},t);return l.toUrl(e),l}function i(e){var t=e.name,n=e.res,r=Ya[t],a=t&&e.urlNoQuery;if(r&&r.state>=1)return t;if(r=Ya[a],r&&r.state>=3)return Wt(r.deps||[],r.factory,a),a;if(t&&!r){r=Ya[a]={id:a,state:1};var i=function(a){H[n]=a,a.load(t,e,function(e){arguments.length&&void 0!==e&&(r.exports=e),r.state=4,s()})};H[n]?i(H[n]):Wt([n],i)}return t?a:n+"!"}function o(e,t){for(var n,r=0;n=e[r++];)if(4!==Ya[n].state&&(n===t||o(Ya[n].deps,t)))return!0}function l(e,t,r){var a=u(e.src);return e.onload=e.onreadystatechange=e.onerror=null,t||r&&Ya[a]&&!Ya[a].state?(setTimeout(function(){Ut.removeChild(e),e=null}),void n("debug: 加载 "+a+" 失败"+t+" "+!Ya[a].state)):!0}function s(){e:for(var e,t=N.length;e=N[--t];){var n=Ya[e],r=n.deps;if(r){for(var a,i=0;a=r[i];i++)if(4!==Object(Ya[a]).state)continue e;4!==n.state&&(N.splice(t,1),v(n.id,n.deps,n.factory),s())}}}function c(e,t,r){function a(){var a=T.pop();a&&a.require(t),r&&r(),l(i,!1,!o)&&(n("debug: 已成功加载 "+e),t&&N.push(t),s())}var i=Vt.createElement("script"),o="onload"in i,c=o?"onload":"onreadystatechange";i[c]=o?a:function(){D.test(i.readyState)&&a()},i.onerror=function(){l(i,!0)},i.className=Yt,i.src=e,Ut.insertBefore(i,Ut.firstChild),n("debug: 正准备加载 "+e)}function u(e){return(e||"").replace(E,"")}function f(e){return/^(?:[a-z]+:)?\/\//i.test(String(e))}function d(e,t){return"1"[0]?e[t]:e.getAttribute(t,4)}function p(){var t;try{a.b.c()}catch(n){t=n.stack,!t&&e.opera&&(t=(String(n).match(/of linked script \S+/g)||[]).join(" "))}if(t)return t=t.split(/[@ ]/g).pop(),t="("===t[0]?t.slice(1,-1):t.replace(/\s/,""),u(t.replace(/(:\d+)?:\d+$/i,""));for(var r,i=Ut.getElementsByTagName("script"),o=i.length;r=i[--o];)if(r.className===Yt&&"interactive"===r.readyState){var l=d(r,"src");return r.className=u(l)}}function v(t,r,a){var i=Object(Ya[t]);i.state=4;for(var o,l=0,s=[];o=r[l++];)if("exports"===o){var c=i.exports||(i.exports={});s.push(c)}else s.push(Ya[o].exports);try{var u=a.apply(e,s)}catch(f){n("执行["+t+"]模块的factory抛错: ",f)}return void 0!==u&&(i.exports=u),P.test(t)&&delete Ya[t],delete i.factory,u}function m(e){0===e.indexOf(this.res+"!")&&(e=e.slice(this.res.length+1));var t=e,n=0,r=this.baseUrl,a=this.parentUrl||r;$(e,h.paths,function(e,r){t=t.replace(r,e),n=1}),n||$(e,h.packages,function(e,n,r){t=t.replace(r.name,r.location)}),this.mapUrl&&$(this.mapUrl,h.map,function(e){$(t,e,function(e,n){t=t.replace(n,e),a=r})});var i=this.ext;i&&n&&t.slice(-i.length)===i&&(t=t.slice(0,-i.length)),f(t)||(a=this.built||/^\w/.test(t)?r:a,t=C(a,t));var o=t+i;return t=o+this.query,o=t.replace(E,function(e){return this.query=e,""}),$(e,h.urlArgs,function(e){t+=(-1===t.indexOf("?")?"?":"&")+e}),this.url=t,this.urlNoQuery=o}function g(e,t,n){var r=x(e,t,n);return r.sort(w),r}function y(e){return new RegExp("^"+e+"(/|$)")}function b(t){return function(){var n;return t.init&&(n=t.init.apply(e,arguments)),n||t.exports&&k(t.exports)}}function x(e,t,n){var r=[];for(var a in e)if(rn.call(e,a)){var i={name:a,val:e[a]};r.push(i),i.reg="*"===a&&t?/^/:y(a),n&&"*"!==a&&(i.reg=new RegExp("/"+a.replace(/^\//,"")+"(/|$)"))}return r}function $(e,t,n){t=t||[];for(var r,a=0;r=t[a++];)if(r.reg.test(e))return n(r.val,r.name,r),!1}function w(e,t){var n=e.name,r=t.name;return"*"===r?-1:"*"===n?1:r.length-n.length}function C(e,t){if("/"!==e.charAt(e.length-1)&&(e+="/"),"./"===t.slice(0,2))return e+t.slice(2);if(".."===t.slice(0,2)){for(e+=t;F.test(e);)e=e.replace(F,"");return e}return"/"===t.slice(0,1)?e+t.slice(1):e+t}function k(t){if(!t)return t;var n=e;return t.split(".").forEach(function(e){n=n[e]}),n}var N=[],T=[],A=/\.js$/i,E=/(\?[^#]*)$/,O=[],S=!1;Wt=avalon.require=function(e,n,a,o){if(S){Array.isArray(e)||avalon.error("require方法的第一个参数应为数组 "+e);var l=[],c={},u=a||"callback"+setTimeout("1");o=o||{},o.baseUrl=h.baseUrl;var f=!!o.built;if(a&&(o.parentUrl=a.substr(0,a.lastIndexOf("/")),o.mapUrl=a.replace(A,"")),f){var d=t(o.defineName,o);u=d.urlNoQuery}else e.forEach(function(e){var n=t(e,o),r=i(n);r&&(c[r]||(l.push(r),c[r]="司徒正美"))});var p=Ya[u];p&&4===p.state||(Ya[u]={id:u,deps:f?e.concat():l,factory:n||r,state:3}),p||N.push(u),s()}else if(O.push(avalon.slice(arguments)),arguments.length<=2){S=!0;for(var v,m=O.splice(0,O.length);v=m.shift();)Wt.apply(null,v)}},Wt.define=function(e,t,n){"string"!=typeof e&&(n=t,t=e,e="anonymous"),Array.isArray(t)||(n=t,t=[]);var r={built:!S,defineName:e},a=[t,n,r];n.require=function(e){if(a.splice(2,0,e),Ya[e]){Ya[e].state=3;var t=!1;try{t=o(Ya[e].deps,e)}catch(r){}t&&avalon.error(e+"模块与之前的模块存在循环依赖,请不要直接用script标签引入"+e+"模块")}delete n.require,Wt.apply(null,a)};var i=r.built?"unknown":p();if(i){var l=Ya[i];l&&(l.state=2),n.require(i)}else T.push(n)},Wt.config=h,Wt.define.amd=Ya;var _=h["orig.paths"]={},M=h["orig.map"]={},j=h.packages=[],L=h["orig.args"]={};avalon.mix(Rn,{paths:function(e){avalon.mix(_,e),h.paths=g(_)},map:function(e){avalon.mix(M,e);var t=g(M,1,1);avalon.each(t,function(e,t){t.val=g(t.val)}),h.map=t},packages:function(e){e=e.concat(j);for(var t,n={},r=[],a=0;t=e[a++];){t="string"==typeof t?{name:t}:t;var i=t.name;if(!n[i]){var o=C(t.location||i,t.main||"main");o=o.replace(A,""),r.push(t),n[i]=t.location=o,t.reg=y(i)}}h.packages=r.sort()},urlArgs:function(e){"string"==typeof e&&(e={"*":e}),avalon.mix(L,e),h.urlArgs=g(L,1)},baseUrl:function(e){if(!f(e)){var t=Ut.getElementsByTagName("base")[0];t&&Ut.removeChild(t);var n=Vt.createElement("a");n.href=e,e=d(n,"href"),t&&Ut.insertBefore(t,Ut.firstChild)}e.length>3&&(h.baseUrl=e)},shim:function(e){for(var t in e){var n=e[t];Array.isArray(n)&&(n=e[t]={deps:n}),n.exportsFn||!n.exports&&!n.init||(n.exportsFn=b(n))}h.shim=e}});var D=/complete|loaded/,H=Wt.plugins={domReady:{load:r},js:{load:function(e,t,n){var r=t.url,a=t.urlNoQuery,i=h.shim[e.replace(A,"")];i?Wt(i.deps||[],function(){var e=avalon.slice(arguments);c(r,a,function(){n(i.exportsFn?i.exportsFn.apply(0,e):void 0)})}):c(r,a)}},css:{load:function(e,t,r){var a=t.url,i=Vt.createElement("link");i.rel="stylesheet",i.href=a,Ut.insertBefore(i,Ut.firstChild),n("debug: 已成功加载 "+a),r()}},text:{load:function(e,t,r){var a=t.url,i=Da();i.onreadystatechange=function(){if(4===i.readyState){var e=i.status;e>399&&600>e?avalon.error(a+" 对应资源不存在或没有开启 CORS"):(n("debug: 已成功加载 "+a),r(i.responseText))}};var o="_="+(new Date-0),l=-1===a.indexOf("?")?a+"?"+o:a+"&"+o;i.open("GET",l,!0),"withCredentials"in i&&(i.withCredentials=!0),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(),n("debug: 正准备加载 "+a)}}};Wt.checkDeps=s;var P=/^callback\d+$/,F=/\/\w+\/\.\./,R=Vt.scripts[Vt.scripts.length-1],B=R.getAttribute("data-main");if(B){Rn.baseUrl(B);var q=h.baseUrl;h.baseUrl=q.slice(0,q.lastIndexOf("/")+1),c(q.replace(A,"")+".js")}else{var I=u(d(R,"src"));h.baseUrl=I.slice(0,I.lastIndexOf("/")+1)}};var Ga,Ja=[],Za=function(e){for(Ga=!0,Wt&&(Ya["domReady!"].state=4,Wt.checkDeps());e=Ja.shift();)e(avalon)};if("complete"===Vt.readyState)setTimeout(Za);else if(sn)Vt.addEventListener("DOMContentLoaded",Za);else{Vt.attachEvent("onreadystatechange",function(){"complete"===Vt.readyState&&Za()});try{var Ka=null===e.frameElement}catch(zn){}cn.doScroll&&Ka&&e.external&&qt()}avalon.bind(e,"load",Za),avalon.ready=function(e){Ga?e(avalon):Ja.push(e)},avalon.config({loader:!0}),avalon.ready(function(){avalon.scan(Vt.body)}),"function"==typeof define&&define.amd&&define("avalon",[],function(){return avalon});var Qa=e.avalon;return avalon.noConflict=function(t){return t&&e.avalon===avalon&&(e.avalon=Qa),avalon},void 0===t&&(e.avalon=avalon),avalon}); \ No newline at end of file diff --git a/dist/avalon.modern.shim.js b/dist/avalon.modern.shim.js index c156e7d4c..a96333a71 100644 --- a/dist/avalon.modern.shim.js +++ b/dist/avalon.modern.shim.js @@ -5,7 +5,7 @@ http://weibo.com/jslouvre/ Released under the MIT license - avalon.modern.shim.js 1.5.1 built in 2015.9.17 + avalon.modern.shim.js 1.5.2 built in 2015.9.17 support IE10+ and other browsers ==================================================*/ (function(global, factory) { @@ -257,7 +257,7 @@ function _number(a, len) { //用于模拟slice, splice的效果 avalon.mix({ rword: rword, subscribers: subscribers, - version: 1.51, + version: 1.52, ui: {}, log: log, slice: function(nodes, start, end) { diff --git a/dist/avalon.shim.js b/dist/avalon.shim.js index 9716a2ab3..752fd9a9f 100644 --- a/dist/avalon.shim.js +++ b/dist/avalon.shim.js @@ -5,7 +5,7 @@ http://weibo.com/jslouvre/ Released under the MIT license - avalon.shim.js 1.5.1 built in 2015.9.17 + avalon.shim.js 1.5.2 built in 2015.9.17 support IE6+ and other browsers ==================================================*/ (function(global, factory) { @@ -292,7 +292,7 @@ function _number(a, len) { //用于模拟slice, splice的效果 avalon.mix({ rword: rword, subscribers: subscribers, - version: 1.51, + version: 1.52, ui: {}, log: log, slice: W3C ? function (nodes, start, end) {