diff --git a/min/avalon.min.js b/min/avalon.min.js index 3bc953f2a..d96bc70d1 100644 --- a/min/avalon.min.js +++ b/min/avalon.min.js @@ -1,118 +1,119 @@ -(function(q,Y){"object"===typeof module&&"object"===typeof module.exports?module.exports=q.document?Y(q,!0):function(q){if(!q.document)throw Error("Avalon requires a window with a document");return Y(q)}:Y(q)})("undefined"!==typeof window?window:this,function(q,Y){function y(){q.console&&avalon.config.debug&&Function.apply.call(console.log,console,arguments)}function A(){}function S(b,c){"string"===typeof b&&(b=b.match(w)||[]);for(var d={},e=void 0!==c?c:1,f=0,g=b.length;fb&&delete c[d.shift()];return c[e]=f}var d=[];return c}function Wa(b){return Wb.test(Z.call(b))}function Xa(b,c){b=Math.floor(b)||0;return 0>b?Math.max(c+b,0):Math.min(b,c)}function $(b,c,d){b="for(var "+b+"i=0,n = this.length; i < n; i++){"+c.replace("_","((i in this) && fn.call(scope,this[i],i,this))")+"}"+d;return Function("fn,scope",b)}function Ya(b,c){try{for(;c=c.parentNode;)if(c===b)return!0;return!1}catch(d){return!1}}function Za(){return(new XMLSerializer).serializeToString(this)} -function Xb(b){var c={},d;for(d in b)c[d]=b[d];d=c.target=b.srcElement;0===b.type.indexOf("key")?c.which=null!=b.charCode?b.charCode:b.keyCode:Yb.test(b.type)&&(d=d.ownerDocument||p,d="BackCompat"===d.compatMode?d.body:d.documentElement,c.pageX=b.clientX+(d.scrollLeft>>0)-(d.clientLeft>>0),c.pageY=b.clientY+(d.scrollTop>>0)-(d.clientTop>>0),c.wheelDeltaY=c.wheelDelta,c.wheelDeltaX=0);c.timeStamp=new Date-0;c.originalEvent=b;c.preventDefault=function(){b.returnValue=!1};c.stopPropagation=function(){b.cancelBubble= -!0};return c}function t(b){for(var c in b)if(M.call(b,c)){var d=b[c];if("function"===typeof t.plugins[c])t.plugins[c](d);else"object"===typeof t[c]?avalon.mix(t[c],d):t[c]=d}return this}function Zb(b,c,d){if(T(c)||c&&c.nodeType||-1!==d.indexOf(b)||-1!==ra.indexOf(b))return!1;c=d.$special;return b&&"$"===b.charAt(0)&&!c[b]?!1:!0}function $b(b,c,d,e){switch(b.type){case 0:var f=b.get;b=b.set;if(T(b)){var g=e.$events,h=g[c];g[c]=[];b.call(e,d);g[c]=h}return f.call(e);case 1:return d;case 2:return d!== -e.$model[c]&&(c=b.svmodel=ac(e,c,d,b.valueType),d=c.$model,(c=sa[c.$id])&&c()),d}}function K(b,c,d){if(Array.isArray(b)){var e=b.concat();b.length=0;c=bc(b);c.pushArray(e);return c}if("number"===typeof b.nodeType||b.$id&&b.$events)return b;Array.isArray(b.$skipArray)||(b.$skipArray=[]);b.$skipArray.$special=c||{};var f={};d=d||{};var g={},h={},k=[];for(e in b)(function(c,e){d[c]=e;if(Zb(c,e,b.$skipArray)){g[c]=[];var l=avalon.type(e),s=function(b){var c=s._name,d=this,e=d.$model,f=e[c],g=d.$events; -if(arguments.length){if(!ta){if(1!==s.type&&(b=$b(s,c,b,d),!s.type))return;$a(f,b)||(e[c]=b,g.$digest?s.pedding||(s.pedding=!0,setTimeout(function(){ka(g[c]);d.$events&&D.$fire.call(d,c,e[c],f);s.pedding=!1})):(ka(g[c]),d.$events&&D.$fire.call(d,c,b,f)))}}else{if(0===s.type)return b=s.get.call(d),f!==b&&(e[c]=b,g.$digest?s.pedding||(s.pedding=!0,setTimeout(function(){d.$events&&D.$fire.call(d,c,e[c],f);s.pedding=!1})):d.$events&&D.$fire.call(d,c,b,f)),b;dc(g[c]);return s.svmodel||f}};"object"===l&& -T(e.get)&&2>=Object.keys(e).length?(s.set=e.set,s.get=e.get,s.type=0,k.push(function(){var b={evaluator:function(){b.type=new Date-0;b.element=null;d[c]=s.get.call(f)},element:G,type:new Date-0,handler:A,args:[]};ba[C]=b;s.call(f);delete ba[C]})):ab.test(l)?(s.type=2,s.valueType=l,k.push(function(){var b=K(e,0,d[c]);s.svmodel=b;b.$events[L]=g[c]})):s.type=1;s._name=c;h[c]=s}})(e,b[e]);ra.forEach(function(c){delete b[c];delete d[c]});var f=ua(f,ec(h),b),l;for(l in b)h[l]||(f[l]=b[l]);f.$id=N();f.$model= -d;f.$events=g;for(e in D)c=D[e],z||(c=c.bind(f)),f[e]=c;va?Object.defineProperty(f,"hasOwnProperty",{value:function(b){return b in this.$model},writable:!1,enumerable:!1,configurable:!0}):f.hasOwnProperty=function(b){return b in f.$model};k.forEach(function(b){b()});return f}function ac(b,c,d,e){var f=b[c];if("array"===e){if(!Array.isArray(d)||f===d)return f;f._.$unwatch();f.clear();f._.$watch();f.pushArray(d.concat());return f}var g=b.$events[c];if(b=f.$events.$withProxyPool)wa(b,"with"),f.$events.$withProxyPool= -null;var h=K(d);h.$events[L]=g;sa[h.$id]=function(b){for(;b=g.shift();)(function(b){avalon.nextTick(function(){b.type&&(b.rollback&&b.rollback(),v[b.type](b,b.vmodels))})})(b);delete sa[h.$id]};return h}function bc(b){var c=[];c.$id=N();c.$model=b;c.$events={};c.$events[L]=[];c._=K({length:b.length});c._.$watch("length",function(b,d){c.$fire("length",b,d)});for(var d in D)c[d]=D[d];avalon.mix(c,bb);return c}function V(b,c,d,e,f,g,h){for(var k=this.length,l=2;--l;){switch(b){case "add":var m=this.$model.slice(c, -c+d).map(function(b){return ab.test(avalon.type(b))?b.$id?b:K(b,0,b):b});xa.apply(this,[c,0].concat(m));this._fire("add",c,d);break;case "del":var n=this._splice(c,d);this._fire("del",c,d)}f&&(b=f,c=g,d=h,l=2,f=0)}this._fire("index",e);this.length!==k&&(this._.length=this.length);return n}function ya(b,c){for(var d={},e=0,f=c.length;e")))&&(rb&&rb(b),jc(b,c))}function Ca(b){if(0b.indexOf("-")&&0>b.indexOf("_")?b:b.replace(/[-_][^-_]/g,function(b){return b.charAt(1).toUpperCase()})}function tb(b){if(!("classList"in b)){b.classList={node:b};for(var c in ub)b.classList[c.slice(1)]=ub[c]}return b.classList}function vb(b){try{if("object"===typeof b)return b;b="true"===b?!0: -"false"===b?!1:"null"===b?null:+b+""===b?+b:sc.test(b)?avalon.parseJSON(b):b}catch(c){}return b}function wb(b,c){if(0>=b.offsetWidth){if(tc.test(x["@:get"](b,"display"))){var d={node:b},e;for(e in xb)d[e]=b.style[e],b.style[e]=xb[e];c.push(d)}(d=b.parentNode)&&1===d.nodeType&&wb(d,c)}}function uc(b,c,d,e){for(var f=[],g=" = "+d+".",h=b.length,k;k=b[--h];)c.hasOwnProperty(k)&&(f.push(k+g+k),e.vars.push(k),"duplex"===e.type&&(b.get=d+"."+k),b.splice(h,1));return f}function yb(b){for(var c=[],d={},e= -0;et.maxRepeatSize&&d.pop()}});"each"===c&&(b.length=0)}function Fb(b,c,d,e){b=(b+"").replace(/[^0-9+\-Ee.]/g,"");b=!isFinite(+b)?0:+b;c=!isFinite(+c)?0:Math.abs(c);e="undefined"===typeof e?",":e;d="undefined"===typeof d?".":d;var f="",f=function(b,c){var d=Math.pow(10,c);return""+(Math.round(b*d)/d).toFixed(c)},f=(c?f(b,c):""+Math.round(b)).split(".");3.avalonHide{ display: none!important }";fa.setAttribute("ms-skip", -"1");var Ib=/\[native code\]/,L="$"+C,Kc=q.require,Lc=q.define,ta=!1,w=/[^, ]+/g,ab=/^(?:object|array)$/,Ha=/^\[object SVG\w*Element\]$/,Wb=/^\[object (?:Window|DOMWindow|global)\]$/,Ia=Object.prototype,M=Ia.hasOwnProperty,Z=Ia.toString,J=Array.prototype,la=J.slice,ba={},z=q.dispatchEvent,B=p.documentElement,W=p.createDocumentFragment(),ga=p.createElement("div"),Jb={};"Boolean Number String Function Array Date RegExp Object Error".replace(w,function(b){Jb["[object "+b+"]"]=b.toLowerCase()});var N= -function(b){return((b||"avalon")+Math.random()+Math.random()).replace(/0\./g,"")},R=function(){if(q.VBArray){var b=document.documentMode;return b?b:q.XMLHttpRequest?7:6}return 0}();avalon=function(b){return new avalon.init(b)};avalon.init=function(b){this[0]=this.element=b};avalon.fn=avalon.prototype=avalon.init.prototype;avalon.type=function(b){return null==b?String(b):"object"===typeof b||"function"===typeof b?Jb[Z.call(b)]||"object":typeof b};var T="object"===typeof alert?function(b){try{return/^\s*\bfunction\b/.test(b+ -"")}catch(c){return!1}}:function(b){return"[object Function]"==Z.call(b)};avalon.isFunction=T;avalon.isWindow=function(b){return!b?!1:b==b.document&&b.document!=b};Wa(q)&&(avalon.isWindow=Wa);for(var Mc in avalon({}))break;var Nc="0"!==Mc;avalon.isPlainObject=function(b,c){if(!b||"object"!==avalon.type(b)||b.nodeType||avalon.isWindow(b))return!1;try{if(b.constructor&&!M.call(b,"constructor")&&!M.call(b.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}if(Nc)for(c in b)return M.call(b, -c);for(c in b);return void 0===c||M.call(b,c)};Ib.test(Object.getPrototypeOf)&&(avalon.isPlainObject=function(b){return"[object Object]"===Z.call(b)&&Object.getPrototypeOf(b)===Ia});avalon.mix=avalon.fn.mix=function(){var b,c,d,e,f,g=arguments[0]||{},h=1,k=arguments.length,l=!1;"boolean"===typeof g&&(l=g,g=arguments[1]||{},h++);"object"!==typeof g&&!T(g)&&(g={});h===k&&(g=this,h--);for(;h>>0)try{e=!1==={}.propertyIsEnumerable.call(b,"length")?Array.isArray(b)||/^\s?function/.test(b.item|| -b.callee):!0;break a}catch(g){e=!0;break a}}e=!1}if(e)for(e=b.length;d -arguments.length&&void 0===b)return this;var c=this,d=arguments;return function(){var e=[],f;for(f=1;fe&&(e+=d);ee&&(e=Math.max(0,d+e));0<=e;e--)if(this[e]===b)return e;return-1},forEach:$("","_",""),filter:$("r=[],j=0,", -"if(_)r[j++]=this[i]","return r"),map:$("r=[],","r[i]=_","return r"),some:$("","if(_)return true","return false"),every:$("","if(!_)return false","return true")});avalon.contains=Ya;B.contains||(Node.prototype.contains=function(b){return!!(this.compareDocumentPosition(b)&16)});p.contains||(p.contains=function(b){return Ya(p,b)});if(q.SVGElement){var Lb=p.createElementNS("http://www.w3.org/2000/svg","svg");Lb.innerHTML='';if(!Ha.test(Lb.firstChild)){var Ja= -function(b,c){if(b&&b.childNodes)for(var d=b.childNodes,e=0,f;f=d[e++];)if(f.tagName){var g=p.createElementNS("http://www.w3.org/2000/svg",f.tagName.toLowerCase());J.forEach.call(f.attributes,function(b){g.setAttribute(b.name,b.value)});Ja(f,g);c.appendChild(g)}};Object.defineProperties(SVGElement.prototype,{outerHTML:{enumerable:!0,configurable:!0,get:Za,set:function(b){var c=this.tagName.toLowerCase(),d=this.parentNode;b=avalon.parseHTML(b);"svg"===c?d.insertBefore(b,this):(c=p.createDocumentFragment(), -Ja(b,c),d.insertBefore(c,this));d.removeChild(this)}},innerHTML:{enumerable:!0,configurable:!0,get:function(){var b=RegExp("$","i");return this.outerHTML.replace(RegExp("<"+this.nodeName+'\\b(?:(["\'])[^"]*?(\\1)|[^>])*>',"i"),"").replace(b,"")},set:function(b){avalon.clearHTML&&(avalon.clearHTML(this),b=avalon.parseHTML(b),Ja(b,this))}}})}}!B.outerHTML&&q.HTMLElement&&HTMLElement.prototype.__defineGetter__("outerHTML",Za);var Yb=/^(?:mouse|contextmenu|drag)|click/,ha=avalon.eventHooks; -"onmouseenter"in B||avalon.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(b,c){ha[b]={type:c,deel:function(c,e){return function(f){var g=f.relatedTarget;if(!g||g!==c&&!(c.compareDocumentPosition(g)&16))return delete f.type,f.type=b,e.call(c,f)}}}});avalon.each({AnimationEvent:"animationend",WebKitAnimationEvent:"webkitAnimationEnd"},function(b,c){q[b]&&!ha.animationend&&(ha.animationend={type:c})});"oninput"in p.createElement("input")||(ha.input={type:"propertychange",deel:function(b, -c){return function(d){if("value"===d.propertyName)return d.type="input",c.call(b,d)}}});if(void 0===p.onmousewheel){var Mb=void 0!==p.onwheel?"wheel":"DOMMouseScroll",Sc="wheel"===Mb?"deltaY":"detail";ha.mousewheel={type:Mb,deel:function(b,c){return function(d){d.wheelDeltaY=d.wheelDelta=0~--e;)if(d[e]===c)return d.splice(e,1);return this},$fire:function(b){var c;/^(\w+)!(\S+)$/.test(b)&& -(c=RegExp.$1,b=RegExp.$2);var d=this.$events,e=la.call(arguments,1),f=[b].concat(e);if("all"===c)for(var g in avalon.vmodels){var h=avalon.vmodels[g];h!==this&&h.$fire.apply(h,f)}else if("up"===c||"down"===c){var k=d.expr?Pb(d.expr):[];if(0!==k.length){for(g in avalon.vmodels)h=avalon.vmodels[g],h!==this&&h.$events.expr&&(e=Pb(h.$events.expr),0!==e.length&&Array.prototype.forEach.call(e,function(b){Array.prototype.forEach.call(k,function(d){if("down"===c?d.contains(b):b.contains(d))b._avalon=h})})); -g=p.getElementsByTagName("*");var l=[];Array.prototype.forEach.call(g,function(b){b._avalon&&(l.push(b._avalon),b._avalon="",b.removeAttribute("_avalon"))});"up"===c&&l.reverse();for(g=0;(e=l[g++])&&!1!==e.$fire.apply(e,f););}}else{f=d[b]||[];d=d.$all||[];g=0;for(var m;m=f[g++];)T(m)&&m.apply(this,e);for(g=0;m=d[g++];)T(m)&&m.apply(this,arguments)}}},Tc=/(\w+)\[(avalonctrl)="(\S+)"\]/,Pb=p.querySelectorAll?function(b){return p.querySelectorAll(b)}:function(b){b=b.match(Tc);for(var c=p.getElementsByTagName(b[1]), -d=[],e=0,f;f=c[e++];)f.getAttribute(b[2])===b[3]&&d.push(f);return d},Qb=avalon.vmodels={};avalon.define=function(b,c){var d=b.$id||b;d||y("warning: vm\u5fc5\u987b\u6307\u5b9a$id");Qb[d]&&y("warning: "+d+" \u5df2\u7ecf\u5b58\u5728\u4e8eavalon.vmodels\u4e2d");if("object"===typeof b)var e=K(b);else e={$watch:A},c(e),e=K(e),ta=!0,c(e),ta=!1;e.$id=d;return Qb[d]=e};var ra="$id,$watch,$unwatch,$fire,$events,$model,$skipArray".match(w),sa={},Ka=Object.defineProperty,va=!0;try{Ka({},"_",{value:"x"});var ua= -Object.defineProperties}catch(Ad){va=!1}var $a=Object.is||function(b,c){return 0===b&&0===c?1/b===1/c:b!==b?c!==c:b===c},ec=z?function(b){var c={},d;for(d in b)c[d]={get:b[d],set:b[d],enumerable:!0,configurable:!0};return c}:function(b){return b};if(!va&&("__defineGetter__"in avalon&&(Ka=function(b,c,d){"value"in d&&(b[c]=d.value);"get"in d&&b.__defineGetter__(c,d.get);"set"in d&&b.__defineSetter__(c,d.set);return b},ua=function(b,c){for(var d in c)c.hasOwnProperty(d)&&Ka(b,d,c[d]);return b}),R)){q.execScript('Function parseVB(code)\n\tExecuteGlobal(code)\nEnd Function\nDim VBClassBodies\nSet VBClassBodies=CreateObject("Scripting.Dictionary")\nFunction findOrDefineVBClass(name,body)\n\tDim found\n\tfound=""\n\tFor Each key in VBClassBodies\n\t\tIf body=VBClassBodies.Item(key) Then\n\t\t\tfound=key\n\t\t\tExit For\n\t\tEnd If\n\tnext\n\tIf found="" Then\n\t\tparseVB("Class " + name + body)\n\t\tVBClassBodies.Add name, body\n\t\tfound=name\n\tEnd If\n\tfindOrDefineVBClass=found\nEnd Function', -"VBScript");var Uc=function(b,c,d,e){var f=c[d];if(4===arguments.length)f.call(b,e);else return f.call(b)},ua=function(b,c,d){var e="VBClass"+setTimeout("1"),f=[];f.push("\r\n\tPrivate [__data__], [__proxy__]","\tPublic Default Function [__const__](d, p)","\t\tSet [__data__] = d: set [__proxy__] = p","\t\tSet [__const__] = Me","\tEnd Function");for(b in d)c.hasOwnProperty(b)||f.push("\tPublic ["+b+"]");ra.forEach(function(b){c.hasOwnProperty(b)||f.push("\tPublic ["+b+"]")});f.push("\tPublic [hasOwnProperty]"); +(function(q,Z){"object"===typeof module&&"object"===typeof module.exports?module.exports=q.document?Z(q,!0):function(q){if(!q.document)throw Error("Avalon requires a window with a document");return Z(q)}:Z(q)})("undefined"!==typeof window?window:this,function(q,Z){function y(){q.console&&avalon.config.debug&&Function.apply.call(console.log,console,arguments)}function A(){}function S(b,c){"string"===typeof b&&(b=b.match(w)||[]);for(var d={},e=void 0!==c?c:1,f=0,g=b.length;fb&&delete c[d.shift()];return c[e]=f}var d=[];return c}function Wa(b){return Wb.test(V.call(b))}function Xa(b,c){b=Math.floor(b)||0;return 0>b?Math.max(c+b,0):Math.min(b,c)}function Xb(b){if(!b)return!1;var c=b.length;if(c===c>>>0){c=V.call(b).slice(8,-1);if(/(?:regexp|string|function|window|global)$/i.test(c))return!1;if("Array"===c)return!0;try{return!1==={}.propertyIsEnumerable.call(b,"length")?/^\s?function/.test(b.item||b.callee):!0}catch(d){return!b.eval}}return!1} +function $(b,c,d){b="for(var "+b+"i=0,n = this.length; i < n; i++){"+c.replace("_","((i in this) && fn.call(scope,this[i],i,this))")+"}"+d;return Function("fn,scope",b)}function Ya(b,c){try{for(;c=c.parentNode;)if(c===b)return!0;return!1}catch(d){return!1}}function Za(){return(new XMLSerializer).serializeToString(this)}function Yb(b){var c={},d;for(d in b)c[d]=b[d];d=c.target=b.srcElement;0===b.type.indexOf("key")?c.which=null!=b.charCode?b.charCode:b.keyCode:Zb.test(b.type)&&(d=d.ownerDocument|| +p,d="BackCompat"===d.compatMode?d.body:d.documentElement,c.pageX=b.clientX+(d.scrollLeft>>0)-(d.clientLeft>>0),c.pageY=b.clientY+(d.scrollTop>>0)-(d.clientTop>>0),c.wheelDeltaY=c.wheelDelta,c.wheelDeltaX=0);c.timeStamp=new Date-0;c.originalEvent=b;c.preventDefault=function(){b.returnValue=!1};c.stopPropagation=function(){b.cancelBubble=!0};return c}function t(b){for(var c in b)if(M.call(b,c)){var d=b[c];if("function"===typeof t.plugins[c])t.plugins[c](d);else"object"===typeof t[c]?avalon.mix(t[c], +d):t[c]=d}return this}function $b(b,c,d){if(T(c)||c&&c.nodeType||-1!==d.indexOf(b)||-1!==ra.indexOf(b))return!1;c=d.$special;return b&&"$"===b.charAt(0)&&!c[b]?!1:!0}function ac(b,c,d,e){switch(b.type){case 0:var f=b.get;b=b.set;if(T(b)){var g=e.$events,h=g[c];g[c]=[];b.call(e,d);g[c]=h}return f.call(e);case 1:return d;case 2:return d!==e.$model[c]&&(c=b.svmodel=bc(e,c,d,b.valueType),d=c.$model,(c=sa[c.$id])&&c()),d}}function K(b,c,d){if(Array.isArray(b)){var e=b.concat();b.length=0;c=cc(b);c.pushArray(e); +return c}if("number"===typeof b.nodeType||b.$id&&b.$events)return b;Array.isArray(b.$skipArray)||(b.$skipArray=[]);b.$skipArray.$special=c||{};var f={};d=d||{};var g={},h={},k=[];for(e in b)(function(c,e){d[c]=e;if($b(c,e,b.$skipArray)){g[c]=[];var l=avalon.type(e),s=function(b){var c=s._name,d=this,e=d.$model,f=e[c],g=d.$events;if(arguments.length){if(!ta){if(1!==s.type&&(b=ac(s,c,b,d),!s.type))return;$a(f,b)||(e[c]=b,g.$digest?s.pedding||(s.pedding=!0,setTimeout(function(){ka(g[c]);d.$events&&D.$fire.call(d, +c,e[c],f);s.pedding=!1})):(ka(g[c]),d.$events&&D.$fire.call(d,c,b,f)))}}else{if(0===s.type)return b=s.get.call(d),f!==b&&(e[c]=b,g.$digest?s.pedding||(s.pedding=!0,setTimeout(function(){d.$events&&D.$fire.call(d,c,e[c],f);s.pedding=!1})):d.$events&&D.$fire.call(d,c,b,f)),b;ec(g[c]);return s.svmodel||f}};"object"===l&&T(e.get)&&2>=Object.keys(e).length?(s.set=e.set,s.get=e.get,s.type=0,k.push(function(){var b={evaluator:function(){b.type=new Date-0;b.element=null;d[c]=s.get.call(f)},element:G,type:new Date- +0,handler:A,args:[]};ba[C]=b;s.call(f);delete ba[C]})):ab.test(l)?(s.type=2,s.valueType=l,k.push(function(){var b=K(e,0,d[c]);s.svmodel=b;b.$events[L]=g[c]})):s.type=1;s._name=c;h[c]=s}})(e,b[e]);ra.forEach(function(c){delete b[c];delete d[c]});var f=ua(f,fc(h),b),l;for(l in b)h[l]||(f[l]=b[l]);f.$id=N();f.$model=d;f.$events=g;for(e in D)c=D[e],z||(c=c.bind(f)),f[e]=c;va?Object.defineProperty(f,"hasOwnProperty",{value:function(b){return b in this.$model},writable:!1,enumerable:!1,configurable:!0}): +f.hasOwnProperty=function(b){return b in f.$model};k.forEach(function(b){b()});return f}function bc(b,c,d,e){var f=b[c];if("array"===e){if(!Array.isArray(d)||f===d)return f;f._.$unwatch();f.clear();f._.$watch();f.pushArray(d.concat());return f}var g=b.$events[c];if(b=f.$events.$withProxyPool)wa(b,"with"),f.$events.$withProxyPool=null;var h=K(d);h.$events[L]=g;sa[h.$id]=function(b){for(;b=g.shift();)(function(b){avalon.nextTick(function(){b.type&&(b.rollback&&b.rollback(),v[b.type](b,b.vmodels))})})(b); +delete sa[h.$id]};return h}function cc(b){var c=[];c.$id=N();c.$model=b;c.$events={};c.$events[L]=[];c._=K({length:b.length});c._.$watch("length",function(b,d){c.$fire("length",b,d)});for(var d in D)c[d]=D[d];avalon.mix(c,bb);return c}function W(b,c,d,e,f,g,h){for(var k=this.length,l=2;--l;){switch(b){case "add":var m=this.$model.slice(c,c+d).map(function(b){return ab.test(avalon.type(b))?b.$id?b:K(b,0,b):b});xa.apply(this,[c,0].concat(m));this._fire("add",c,d);break;case "del":var n=this._splice(c, +d);this._fire("del",c,d)}f&&(b=f,c=g,d=h,l=2,f=0)}this._fire("index",e);this.length!==k&&(this._.length=this.length);return n}function ya(b,c){for(var d={},e=0,f=c.length;e")))&&(rb&&rb(b),kc(b,c))}function Ca(b){if(0b.indexOf("-")&&0>b.indexOf("_")?b:b.replace(/[-_][^-_]/g,function(b){return b.charAt(1).toUpperCase()})}function tb(b){if(!("classList"in b)){b.classList={node:b};for(var c in ub)b.classList[c.slice(1)]=ub[c]}return b.classList}function vb(b){try{if("object"===typeof b)return b;b="true"===b?!0:"false"===b?!1:"null"===b?null:+b+""===b?+b:tc.test(b)?avalon.parseJSON(b):b}catch(c){}return b}function wb(b,c){if(0>=b.offsetWidth){if(uc.test(x["@:get"](b,"display"))){var d={node:b}, +e;for(e in xb)d[e]=b.style[e],b.style[e]=xb[e];c.push(d)}(d=b.parentNode)&&1===d.nodeType&&wb(d,c)}}function vc(b,c,d,e){for(var f=[],g=" = "+d+".",h=b.length,k;k=b[--h];)c.hasOwnProperty(k)&&(f.push(k+g+k),e.vars.push(k),"duplex"===e.type&&(b.get=d+"."+k),b.splice(h,1));return f}function yb(b){for(var c=[],d={},e=0;et.maxRepeatSize&&d.pop()}});"each"===c&&(b.length=0)}function Fb(b,c,d,e){b=(b+"").replace(/[^0-9+\-Ee.]/g, +"");b=!isFinite(+b)?0:+b;c=!isFinite(+c)?0:Math.abs(c);e="undefined"===typeof e?",":e;d="undefined"===typeof d?".":d;var f="",f=function(b,c){var d=Math.pow(10,c);return""+(Math.round(b*d)/d).toFixed(c)},f=(c?f(b,c):""+Math.round(b)).split(".");3.avalonHide{ display: none!important }";fa.setAttribute("ms-skip","1");var Ib=/\[native code\]/,L="$"+C,Lc=q.require,Mc=q.define,ta=!1,w=/[^, ]+/g,ab=/^(?:object|array)$/,Ha=/^\[object SVG\w*Element\]$/,Wb=/^\[object (?:Window|DOMWindow|global)\]$/,Ia=Object.prototype, +M=Ia.hasOwnProperty,V=Ia.toString,J=Array.prototype,la=J.slice,ba={},z=q.dispatchEvent,B=p.documentElement,X=p.createDocumentFragment(),ga=p.createElement("div"),Jb={};"Boolean Number String Function Array Date RegExp Object Error".replace(w,function(b){Jb["[object "+b+"]"]=b.toLowerCase()});var N=function(b){return((b||"avalon")+Math.random()+Math.random()).replace(/0\./g,"")},R=function(){if(q.VBArray){var b=document.documentMode;return b?b:q.XMLHttpRequest?7:6}return 0}();avalon=function(b){return new avalon.init(b)}; +avalon.init=function(b){this[0]=this.element=b};avalon.fn=avalon.prototype=avalon.init.prototype;avalon.type=function(b){return null==b?String(b):"object"===typeof b||"function"===typeof b?Jb[V.call(b)]||"object":typeof b};var T="object"===typeof alert?function(b){try{return/^\s*\bfunction\b/.test(b+"")}catch(c){return!1}}:function(b){return"[object Function]"==V.call(b)};avalon.isFunction=T;avalon.isWindow=function(b){return!b?!1:b==b.document&&b.document!=b};Wa(q)&&(avalon.isWindow=Wa);for(var Nc in avalon({}))break; +var Oc="0"!==Nc;avalon.isPlainObject=function(b,c){if(!b||"object"!==avalon.type(b)||b.nodeType||avalon.isWindow(b))return!1;try{if(b.constructor&&!M.call(b,"constructor")&&!M.call(b.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}if(Oc)for(c in b)return M.call(b,c);for(c in b);return void 0===c||M.call(b,c)};Ib.test(Object.getPrototypeOf)&&(avalon.isPlainObject=function(b){return"[object Object]"===V.call(b)&&Object.getPrototypeOf(b)===Ia});avalon.mix=avalon.fn.mix=function(){var b, +c,d,e,f,g=arguments[0]||{},h=1,k=arguments.length,l=!1;"boolean"===typeof g&&(l=g,g=arguments[1]||{},h++);"object"!==typeof g&&!T(g)&&(g={});h===k&&(g=this,h--);for(;harguments.length&&void 0===b)return this;var c=this,d=arguments;return function(){var e=[],f;for(f=1;fe&&(e+=d);e +e&&(e=Math.max(0,d+e));0<=e;e--)if(this[e]===b)return e;return-1},forEach:$("","_",""),filter:$("r=[],j=0,","if(_)r[j++]=this[i]","return r"),map:$("r=[],","r[i]=_","return r"),some:$("","if(_)return true","return false"),every:$("","if(!_)return false","return true")});avalon.contains=Ya;B.contains||(Node.prototype.contains=function(b){return!!(this.compareDocumentPosition(b)&16)});p.contains||(p.contains=function(b){return Ya(p,b)});if(q.SVGElement){var Lb=p.createElementNS("http://www.w3.org/2000/svg", +"svg");Lb.innerHTML='';if(!Ha.test(Lb.firstChild)){var Ja=function(b,c){if(b&&b.childNodes)for(var d=b.childNodes,e=0,f;f=d[e++];)if(f.tagName){var g=p.createElementNS("http://www.w3.org/2000/svg",f.tagName.toLowerCase());J.forEach.call(f.attributes,function(b){g.setAttribute(b.name,b.value)});Ja(f,g);c.appendChild(g)}};Object.defineProperties(SVGElement.prototype,{outerHTML:{enumerable:!0,configurable:!0,get:Za,set:function(b){var c=this.tagName.toLowerCase(), +d=this.parentNode;b=avalon.parseHTML(b);"svg"===c?d.insertBefore(b,this):(c=p.createDocumentFragment(),Ja(b,c),d.insertBefore(c,this));d.removeChild(this)}},innerHTML:{enumerable:!0,configurable:!0,get:function(){var b=RegExp("$","i");return this.outerHTML.replace(RegExp("<"+this.nodeName+'\\b(?:(["\'])[^"]*?(\\1)|[^>])*>',"i"),"").replace(b,"")},set:function(b){avalon.clearHTML&&(avalon.clearHTML(this),b=avalon.parseHTML(b),Ja(b,this))}}})}}!B.outerHTML&&q.HTMLElement&&HTMLElement.prototype.__defineGetter__("outerHTML", +Za);var Zb=/^(?:mouse|contextmenu|drag)|click/,ha=avalon.eventHooks;"onmouseenter"in B||avalon.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(b,c){ha[b]={type:c,deel:function(c,e){return function(f){var g=f.relatedTarget;if(!g||g!==c&&!(c.compareDocumentPosition(g)&16))return delete f.type,f.type=b,e.call(c,f)}}}});avalon.each({AnimationEvent:"animationend",WebKitAnimationEvent:"webkitAnimationEnd"},function(b,c){q[b]&&!ha.animationend&&(ha.animationend={type:c})});"oninput"in p.createElement("input")|| +(ha.input={type:"propertychange",deel:function(b,c){return function(d){if("value"===d.propertyName)return d.type="input",c.call(b,d)}}});if(void 0===p.onmousewheel){var Mb=void 0!==p.onwheel?"wheel":"DOMMouseScroll",Tc="wheel"===Mb?"deltaY":"detail";ha.mousewheel={type:Mb,deel:function(b,c){return function(d){d.wheelDeltaY=d.wheelDelta=0~--e;)if(d[e]===c)return d.splice(e, +1);return this},$fire:function(b){var c;/^(\w+)!(\S+)$/.test(b)&&(c=RegExp.$1,b=RegExp.$2);var d=this.$events,e=la.call(arguments,1),f=[b].concat(e);if("all"===c)for(var g in avalon.vmodels){var h=avalon.vmodels[g];h!==this&&h.$fire.apply(h,f)}else if("up"===c||"down"===c){var k=d.expr?Pb(d.expr):[];if(0!==k.length){for(g in avalon.vmodels)h=avalon.vmodels[g],h!==this&&h.$events.expr&&(e=Pb(h.$events.expr),0!==e.length&&Array.prototype.forEach.call(e,function(b){Array.prototype.forEach.call(k,function(d){if("down"=== +c?d.contains(b):b.contains(d))b._avalon=h})}));g=p.getElementsByTagName("*");var l=[];Array.prototype.forEach.call(g,function(b){b._avalon&&(l.push(b._avalon),b._avalon="",b.removeAttribute("_avalon"))});"up"===c&&l.reverse();for(g=0;(e=l[g++])&&!1!==e.$fire.apply(e,f););}}else{f=d[b]||[];d=d.$all||[];g=0;for(var m;m=f[g++];)T(m)&&m.apply(this,e);for(g=0;m=d[g++];)T(m)&&m.apply(this,arguments)}}},Uc=/(\w+)\[(avalonctrl)="(\S+)"\]/,Pb=p.querySelectorAll?function(b){return p.querySelectorAll(b)}:function(b){b= +b.match(Uc);for(var c=p.getElementsByTagName(b[1]),d=[],e=0,f;f=c[e++];)f.getAttribute(b[2])===b[3]&&d.push(f);return d},Qb=avalon.vmodels={};avalon.define=function(b,c){var d=b.$id||b;d||y("warning: vm\u5fc5\u987b\u6307\u5b9a$id");Qb[d]&&y("warning: "+d+" \u5df2\u7ecf\u5b58\u5728\u4e8eavalon.vmodels\u4e2d");if("object"===typeof b)var e=K(b);else e={$watch:A},c(e),e=K(e),ta=!0,c(e),ta=!1;e.$id=d;return Qb[d]=e};var ra="$id,$watch,$unwatch,$fire,$events,$model,$skipArray".match(w),sa={},Ka=Object.defineProperty, +va=!0;try{Ka({},"_",{value:"x"});var ua=Object.defineProperties}catch(Bd){va=!1}var $a=Object.is||function(b,c){return 0===b&&0===c?1/b===1/c:b!==b?c!==c:b===c},fc=z?function(b){var c={},d;for(d in b)c[d]={get:b[d],set:b[d],enumerable:!0,configurable:!0};return c}:function(b){return b};if(!va&&("__defineGetter__"in avalon&&(Ka=function(b,c,d){"value"in d&&(b[c]=d.value);"get"in d&&b.__defineGetter__(c,d.get);"set"in d&&b.__defineSetter__(c,d.set);return b},ua=function(b,c){for(var d in c)c.hasOwnProperty(d)&& +Ka(b,d,c[d]);return b}),R)){q.execScript('Function parseVB(code)\n\tExecuteGlobal(code)\nEnd Function\nDim VBClassBodies\nSet VBClassBodies=CreateObject("Scripting.Dictionary")\nFunction findOrDefineVBClass(name,body)\n\tDim found\n\tfound=""\n\tFor Each key in VBClassBodies\n\t\tIf body=VBClassBodies.Item(key) Then\n\t\t\tfound=key\n\t\t\tExit For\n\t\tEnd If\n\tnext\n\tIf found="" Then\n\t\tparseVB("Class " + name + body)\n\t\tVBClassBodies.Add name, body\n\t\tfound=name\n\tEnd If\n\tfindOrDefineVBClass=found\nEnd Function', +"VBScript");var Vc=function(b,c,d,e){var f=c[d];if(4===arguments.length)f.call(b,e);else return f.call(b)},ua=function(b,c,d){var e="VBClass"+setTimeout("1"),f=[];f.push("\r\n\tPrivate [__data__], [__proxy__]","\tPublic Default Function [__const__](d, p)","\t\tSet [__data__] = d: set [__proxy__] = p","\t\tSet [__const__] = Me","\tEnd Function");for(b in d)c.hasOwnProperty(b)||f.push("\tPublic ["+b+"]");ra.forEach(function(b){c.hasOwnProperty(b)||f.push("\tPublic ["+b+"]")});f.push("\tPublic [hasOwnProperty]"); for(b in c)f.push("\tPublic Property Let ["+b+"](val"+C+")",'\t\tCall [__proxy__](Me,[__data__], "'+b+'", val'+C+")","\tEnd Property","\tPublic Property Set ["+b+"](val"+C+")",'\t\tCall [__proxy__](Me,[__data__], "'+b+'", val'+C+")","\tEnd Property","\tPublic Property Get ["+b+"]","\tOn Error Resume Next","\t\tSet["+b+'] = [__proxy__](Me,[__data__],"'+b+'")',"\tIf Err.Number <> 0 Then","\t\t["+b+'] = [__proxy__](Me,[__data__],"'+b+'")',"\tEnd If","\tOn Error Goto 0","\tEnd Property");f.push("End Class"); -b=f.join("\r\n");b=q.findOrDefineVBClass(e,b);b===e&&q.parseVB(["Function "+e+"Factory(a, b)","\tDim o","\tSet o = (New "+e+")(a, b)","\tSet "+e+"Factory = o","End Function"].join("\r\n"));return q[b+"Factory"](c,Uc)}}var xa=J.splice,bb={_splice:xa,_fire:function(b,c,d){ka(this.$events[L],b,c,d)},size:function(){return this._.length},pushArray:function(b){var c=b.length,d=this.length;c&&(J.push.apply(this.$model,b),V.call(this,"add",d,c,d));return c+d},push:function(){var b,c=arguments.length;for(b= -0;b"],param:[1,""],col:[2,"","
"],legend:[1,"
"],option:[1,""],thead:[1,"","
"],tr:[2,"", +"
"],th:[3,"","
"],td:[3,""],g:[1,'',""],_default:z?[0,""]:[1,"X
"]};H.optgroup=H.option;H.tbody=H.tfoot=H.colgroup=H.caption=H.thead;"circle,defs,ellipse,image,line,path,polygon,polyline,rect,symbol,text,use".replace(w,function(b){H[b]=H.g});var Wc=/<([\w:]+)/,Xc=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, +Rb=z?/[^\d\D]/:/(<(?:script|link|style|meta|noscript))/ig,Yc=S(["","text/javascript","text/ecmascript","application/ecmascript","application/javascript"]),Zc=/<(?:tb|td|tf|th|tr|col|opt|leg|cap|area)/,$c=p.createElement("script");avalon.parseHTML=function(b){if("string"!==typeof b)return p.createDocumentFragment();b=b.replace(Xc,"<$1>").trim();var c=(Wc.exec(b)||["",""])[1].toLowerCase(),d=H[c]||H._default,c=X.cloneNode(!1),e=ga,f;z||(b=b.replace(Rb,"
$1"));e.innerHTML=d[1]+ +b+(d[2]||"");b=e.getElementsByTagName("script");if(b.length)for(var g=0,h;h=b[g++];)Yc[h.type]&&(f=$c.cloneNode(!1),J.forEach.call(h.attributes,function(b){b&&b.specified&&(f[b.name]=b.value,f.setAttribute(b.name,b.value))}),f.text=h.text,h.parentNode.replaceChild(f,h));for(g=d[0];g--;e=e.lastChild);if(!z){b=e.getElementsByTagName("br");for(d=b.length;h=b[--d];)"msNoScope"===h.className&&h.parentNode.removeChild(h);b=e.all;for(g=0;h=b[g++];)gb(h)&&ic(h)}for(;d=e.firstChild;)c.appendChild(d);return c}; +avalon.innerHTML=function(b,c){if(!z&&!Rb.test(c)&&!Zc.test(c))try{b.innerHTML=c;return}catch(d){}var e=this.parseHTML(c);this.clearHTML(b).appendChild(e)};avalon.clearHTML=function(b){for(b.textContent="";b.firstChild;)b.removeChild(b.firstChild);return b};avalon.scan=function(b,c,d){b=b||B;c=c?[].concat(c):[];ib(b,c)};var pc=S("AREA,BASE,BASEFONT,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,LINK,META,PARAM,SOURCE,TRACK,WBR,NOSCRIPT,SCRIPT,STYLE,TEXTAREA"),ja=function(b,c,d){if(b=b.getAttribute(c)){c=0;for(var e;e= +d[c++];)if(e.hasOwnProperty(b)&&"function"===typeof e[b])return e[b]}},rb=R&&q.MutationObserver?function(b){for(var c=b.firstChild,d;c;){var e=c.nextSibling;3===c.nodeType?d?(d.nodeValue+=c.nodeValue,b.removeChild(c)):d=c:d=null;c=e}}:0,nb=/ms-(\w+)-?(.*)/,ob={"if":10,repeat:90,data:100,widget:110,each:1400,"with":1500,duplex:2E3,on:3E3},lc=S("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit"), +mc=S("value,title,alt,checked,selected,disabled,readonly,enabled"),nc=/^if|widget|repeat$/,oc=/^each|with|html|include$/;if(!"1"[0])var La=qa(512),ad=/\s+(ms-[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,bd=/^['"]/,cd=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/i,dd=/&/g,mb=function(b){b=b.outerHTML;if("=d?"alpha(opacity="+100*d+")":"";c=b.filter||"";b.zoom=1;b.filter=(Tb.test(c)?c.replace(Tb,d):c+" "+d).trim();b.filter||b.removeAttribute("filter")};x["opacity:get"]=function(b){b=b.filters.alpha||b.filters["DXImageTransform.Microsoft.Alpha"];return(b&&b.enabled?b.opacity:100)/100+""}}"top,left".replace(w,function(b){x[b+":get"]=function(c){var d=x["@:get"](c,b);return/px$/.test(d)?d:avalon(c).position()[b]+"px"}});var xb={position:"absolute",visibility:"hidden",display:"block"}, -tc=/^(none|table(?!-c[ea]).+)/;"Width,Height".replace(w,function(b){var c=b.toLowerCase(),d="client"+b,e="scroll"+b,f="offset"+b;x[c+":get"]=function(c,d,e){var l=-4;"number"===typeof e&&(l=e);d="Width"===b?["Left","Right"]:["Top","Bottom"];e=c[f];if(2===l)return e+avalon.css(c,"margin"+d[0],!0)+avalon.css(c,"margin"+d[1],!0);0>l&&(e=e-avalon.css(c,"border"+d[0]+"Width",!0)-avalon.css(c,"border"+d[1]+"Width",!0));-4===l&&(e=e-avalon.css(c,"padding"+d[0],!0)-avalon.css(c,"padding"+d[1],!0));return e}; +uc=/^(none|table(?!-c[ea]).+)/;"Width,Height".replace(w,function(b){var c=b.toLowerCase(),d="client"+b,e="scroll"+b,f="offset"+b;x[c+":get"]=function(c,d,e){var l=-4;"number"===typeof e&&(l=e);d="Width"===b?["Left","Right"]:["Top","Bottom"];e=c[f];if(2===l)return e+avalon.css(c,"margin"+d[0],!0)+avalon.css(c,"margin"+d[1],!0);0>l&&(e=e-avalon.css(c,"border"+d[0]+"Width",!0)-avalon.css(c,"border"+d[1]+"Width",!0));-4===l&&(e=e-avalon.css(c,"padding"+d[0],!0)-avalon.css(c,"padding"+d[1],!0));return e}; x[c+"&get"]=function(b){var d=[];wb(b,d);for(var e=x[c+":get"](b),f=0,m;m=d[f++];){b=m.node;for(var n in m)"string"===typeof m[n]&&(b.style[n]=m[n])}return e};avalon.fn[c]=function(g){var h=this[0];if(0===arguments.length){if(h.setTimeout)return h["inner"+b]||h.document.documentElement[d];if(9===h.nodeType){var k=h.documentElement;return Math.max(h.body[e],k[e],h.body[f],k[f],k[d])}return x[c+"&get"](h)}return this.css(c,g)};avalon.fn["inner"+b]=function(){return x[c+":get"](this[0],void 0,-2)};avalon.fn["outer"+ b]=function(b){return x[c+":get"](this[0],void 0,!0===b?2:0)}});avalon.fn.offset=function(){var b=this[0],c={left:0,top:0};if(!b||!b.tagName||!b.ownerDocument)return c;var d=b.ownerDocument,e=d.body,f=d.documentElement,d=d.defaultView||d.parentWindow;if(!avalon.contains(f,b))return c;b.getBoundingClientRect&&(c=b.getBoundingClientRect());var b=f.clientTop||e.clientTop,g=f.clientLeft||e.clientLeft,h=Math.max(d.pageYOffset||0,f.scrollTop,e.scrollTop),e=Math.max(d.pageXOffset||0,f.scrollLeft,e.scrollLeft); -return{top:c.top+h-b,left:c.left+e-g}};var kd=/^]+))?)*\s+value[\s=]/i,Ma={"option:get":R?function(b){return kd.test(b.outerHTML)?b.value:b.text.trim()}:function(b){return b.value},"select:get":function(b,c){for(var d,e=b.options,f=b.selectedIndex,g=Ma["option:get"],h="select-one"===b.type||0>f,k=h?null:[],l=h?f+1:e.length,m=0>f?l:h?f:0;m(?:[\s\S]+?)<\/noscript>/img,sd=/([\s\S]+?)<\/noscript>/im, +return{top:c.top+h-b,left:c.left+e-g}};var ld=/^]+))?)*\s+value[\s=]/i,Ma={"option:get":R?function(b){return ld.test(b.outerHTML)?b.value:b.text.trim()}:function(b){return b.value},"select:get":function(b,c){for(var d,e=b.options,f=b.selectedIndex,g=Ma["option:get"],h="select-one"===b.type||0>f,k=h?null:[],l=h?f+1:e.length,m=0>f?l:h?f:0;m(?:[\s\S]+?)<\/noscript>/img,td=/([\s\S]+?)<\/noscript>/im, Sa=function(){return new (q.XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP")},Ta=avalon.templateCache={};v.attr=function(b,c){var d=b.value.trim(),e=!0;-1c||304===c||1223===c)m(Ta[b]=n.responseText)}};n.open("GET",b,!0);"withCredentials"in n&&(n.withCredentials=!0);n.setRequestHeader("X-Requested-With","XMLHttpRequest");n.send(null)}else{var r=b&&1===b.nodeType?b:p.getElementById(b);if(r){if("NOSCRIPT"===r.tagName&&!r.innerHTML&&!r.fixIE78){n=Sa();n.open("GET",location,!1);n.send(null);c=p.getElementsByTagName("noscript"); -for(var f=(n.responseText||"").match(rd)||[],e=f.length,s=0;s\u4e0a\u8981\u6c42\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"):b.multiple&&y("ms-duplex\u5728\u4e0a\u8981\u6c42\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"):b.multiple&&y("ms-duplex\u5728上要求对应一个数组") - } - } else { - if (element.multiple) { - log("ms-duplex在