From a0d17a800b8ac3396ef0aa88a57f8fefa4ab74d1 Mon Sep 17 00:00:00 2001 From: RubyLouvre Date: Mon, 17 Nov 2014 19:19:09 +0800 Subject: [PATCH] =?UTF-8?q?fix=20ms-value=E4=B8=8D=E7=AD=89=E5=90=8C?= =?UTF-8?q?=E4=BA=8E=20ms-attr-value=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- avalon.js | 6 +- avalon.min.js | 164 +++++++++++++++++++++---------------------- avalon.modern.js | 6 +- avalon.modern.min.js | 155 ++++++++++++++++++++-------------------- avalon.observe.js | 91 ++++++++++++------------ examples/test1.html | 2 + 6 files changed, 216 insertions(+), 208 deletions(-) diff --git a/avalon.js b/avalon.js index 36d0524a0..4cb965fe3 100644 --- a/avalon.js +++ b/avalon.js @@ -2143,7 +2143,7 @@ function bindingSorter(a, b) { return a.priority - b.priority } - + var obsoleteAttrs = oneObject("value,title,alt,checked,selected,disabled,readonly,enabled") function scanAttr(elem, vmodels) { //防止setAttribute, removeAttribute时 attributes自动被同步,导致for循环出错 var attributes = getAttributes ? getAttributes(elem) : avalon.slice(elem.attributes) @@ -2162,7 +2162,7 @@ if (events[type]) { param = type type = "on" - } else if (/^(checked|selected|disabled|readonly|enabled)$/.test(type)) { + } else if (obsoleteAttrs[type]) { log("ms-" + type + "已经被废弃,请使用ms-attr-*代替") if (type === "enabled") { //吃掉ms-enabled绑定,用ms-disabled代替 type = "disabled" @@ -2643,7 +2643,7 @@ isInnate = attr ? attr.expando === false : attr === null } } - if (isInnate) { + if (isInnate || obsoleteAttrs[attrName]) { elem[attrName] = val } else { elem.setAttribute(attrName, val) diff --git a/avalon.min.js b/avalon.min.js index 3125da5c8..d1477fcfd 100644 --- a/avalon.min.js +++ b/avalon.min.js @@ -1,113 +1,113 @@ -(function(p){function y(){}function v(){r.console&&avalon.config.debug&&Function.apply.call(console.log,console,arguments)}function Q(b,c){"string"===typeof b&&(b=b.match(z)||[]);for(var d={},e=void 0!==c?c:1,f=0,g=b.length;fb?Math.max(c+b,0):Math.min(b,c)}function Vb(b,c, -d){if(V(c)||c&&c.nodeType||-1!==d.indexOf(b)||-1!==sa.indexOf(b))return!1;c=d.$special;return b&&"$"===b.charAt(0)&&!c[b]?!1:!0}function M(b,c,d){if(Array.isArray(b)){var e=b.concat();b.length=0;c=Wb(b);c.pushArray(e);return c}if("number"===typeof b.nodeType||b.$id&&b.$model&&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(Vb(c,e,b.$skipArray)){var l,s=avalon.type(e);g[c]=[];if("object"=== +(function(p){function y(){}function v(){r.console&&avalon.config.debug&&Function.apply.call(console.log,console,arguments)}function M(b,c){"string"===typeof b&&(b=b.match(z)||[]);for(var d={},e=void 0!==c?c:1,f=0,g=b.length;fb?Math.max(c+b,0):Math.min(b,c)}function Wb(b,c, +d){if(V(c)||c&&c.nodeType||-1!==d.indexOf(b)||-1!==sa.indexOf(b))return!1;c=d.$special;return b&&"$"===b.charAt(0)&&!c[b]?!1:!0}function N(b,c,d){if(Array.isArray(b)){var e=b.concat();b.length=0;c=Xb(b);c.pushArray(e);return c}if("number"===typeof b.nodeType||b.$id&&b.$model&&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(Wb(c,e,b.$skipArray)){var l,s=avalon.type(e);g[c]=[];if("object"=== s&&V(e.get)&&2>=Object.keys(e).length){var H=e.set,F=e.get;l=function(b){var e=f.$events,g=d[c];if(arguments.length){if(ja)return;if(V(H)){var h=e[c];e[c]=[];H.call(f,b);e[c]=h}}else avalon.openComputedCollect&&ka(e[c]);b=d[c]=F.call(f);if(!la(g,b)){if(ma&&(h=W[f.$id])&&h[c])h[c].$val=b;ua(e[c]);f.$events&&R.$fire.call(f,c,b,g)}return b};k.push(function(){Y[A]={evaluator:l,element:J,type:"computed::"+c,handler:y,args:[]};l();ka(g[c]);delete Y[A]})}else va.test(s)?(l=function(b){var e=l.child,h=d[c]; -if(arguments.length)!ja&&!la(h,b)&&(e=l.child=Xb(f,c,b,s),b=d[c]=e.$model,(e=wa[e.$id])&&e(),f.$events&&R.$fire.call(f,c,b,h));else return ka(g[c]),e},(l.child=M(e,0,d[c])).$events[G]=g[c]):l=function(b){var e=d[c];if(arguments.length){if(!la(e,b)){d[c]=b;if(ma){var h=W[f.$id];h&&h[c]&&(h[c].$val=b)}ua(g[c]);f.$events&&R.$fire.call(f,c,b,e)}}else return ka(g[c]),e};h[c]=l}})(e,b[e]);sa.forEach(function(c){delete b[c];delete d[c]});var f=na(f,Yb(h),b),l;for(l in b)h[l]||(f[l]=b[l]);f.$id=ha();f.$model= -d;f.$events=g;for(e in R)c=R[e],w||(c=c.bind(f)),f[e]=c;f.hasOwnProperty=function(b){return b in f.$model};k.forEach(function(b){b()});return f}function Xb(b,c,d,e){var f=b[c];if("array"===e){if(!Array.isArray(d)||f===d)return f;f.clear();f.pushArray(d.concat());return f}var g=b.$events[c];W[f.$id]&&(ma--,delete W[f.$id]);var h=M(d);h.$events[G]=g;wa[h.$id]=function(b){for(;b=g.shift();)(function(b){b.type&&avalon.nextTick(function(){b.rollback&&b.rollback();C[b.type](b,b.vmodels)})})(b);delete wa[h.$id]}; -return h}function Z(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 u(b){for(var c in b)if(N.call(b,c)){var d=b[c];if("function"===typeof u.plugins[c])u.plugins[c](d);else"object"===typeof u[c]?avalon.mix(u[c],d):u[c]=d}return this} -function $a(b){return b.replace(/([a-z\d])([A-Z]+)/g,"$1-$2").toLowerCase()}function oa(b){return 0>b.indexOf("-")&&0>b.indexOf("_")?b:b.replace(/[-_][^-_]/g,function(b){return b.charAt(1).toUpperCase()})}function ab(b){if(!("classList"in b)){b.classList={node:b};for(var c in bb)b.classList[c.slice(1)]=bb[c]}return b.classList}function cb(b){try{b="true"===b?!0:"false"===b?!1:"null"===b?null:+b+""===b?+b:Zb.test(b)?avalon.parseJSON(b):b}catch(c){}return b}function db(b,c){if(0>=b.offsetWidth){if($b.test(x["@:get"](b, -"display"))){var d={node:b},e;for(e in eb)d[e]=b.style[e],b.style[e]=eb[e];c.push(d)}(d=b.parentNode)&&1===d.nodeType&&db(d,c)}}function fb(b){var c=b.nodeName;return c.toLowerCase()===c&&b.scopeName&&""===b.outerText}function ac(b){"url(#default#VML)"!==b.currentStyle.behavior&&(b.style.behavior="url(#default#VML)",b.style.display="inline-block",b.style.zoom=1)}function xa(b){Y[A]=b;avalon.openComputedCollect=!0;var c=b.evaluator;if(c)try{var d=bc.test(b.type)?b:c.apply(0,b.args);b.handler(d,b.element, -b)}catch(e){v("warning:exception throwed in [registerSubscriber] "+e),delete b.evaluator,c=b.element,3===c.nodeType&&(d=c.parentNode,u.commentInterpolate?d.replaceChild(p.createComment(b.value),c):c.data=O+b.value+P)}avalon.openComputedCollect=!1;delete Y[A]}function ka(b){var c=Y[A];b&&(c&&avalon.Array.ensure(b,c)&&c.element)&&gb(c,b)}function gb(b,c){b.$uuid=b.$uuid||ha();c.$uuid=c.$uuid||ha();var d={data:b,list:c,toString:function(){return b.$uuid+" "+c.$uuid}};S[d]||(S[d]=1,S.push(d))}function hb(){for(var b= -ya,c=ya+cc;bb.indexOf("-")&&0>b.indexOf("_")?b:b.replace(/[-_][^-_]/g,function(b){return b.charAt(1).toUpperCase()})}function ab(b){if(!("classList"in b)){b.classList={node:b};for(var c in bb)b.classList[c.slice(1)]=bb[c]}return b.classList}function cb(b){try{b="true"===b?!0:"false"===b?!1:"null"===b?null:+b+""===b?+b:$b.test(b)?avalon.parseJSON(b):b}catch(c){}return b}function db(b,c){if(0>=b.offsetWidth){if(ac.test(x["@:get"](b, +"display"))){var d={node:b},e;for(e in eb)d[e]=b.style[e],b.style[e]=eb[e];c.push(d)}(d=b.parentNode)&&1===d.nodeType&&db(d,c)}}function fb(b){var c=b.nodeName;return c.toLowerCase()===c&&b.scopeName&&""===b.outerText}function bc(b){"url(#default#VML)"!==b.currentStyle.behavior&&(b.style.behavior="url(#default#VML)",b.style.display="inline-block",b.style.zoom=1)}function xa(b){Y[A]=b;avalon.openComputedCollect=!0;var c=b.evaluator;if(c)try{var d=cc.test(b.type)?b:c.apply(0,b.args);b.handler(d,b.element, +b)}catch(e){v("warning:exception throwed in [registerSubscriber] "+e),delete b.evaluator,c=b.element,3===c.nodeType&&(d=c.parentNode,u.commentInterpolate?d.replaceChild(p.createComment(b.value),c):c.data=P+b.value+Q)}avalon.openComputedCollect=!1;delete Y[A]}function ka(b){var c=Y[A];b&&(c&&avalon.Array.ensure(b,c)&&c.element)&&gb(c,b)}function gb(b,c){b.$uuid=b.$uuid||ha();c.$uuid=c.$uuid||ha();var d={data:b,list:c,toString:function(){return b.$uuid+" "+c.$uuid}};S[d]||(S[d]=1,S.push(d))}function hb(){for(var b= +ya,c=ya+dc;b"))&& -nb(b,c)}}function Ba(b,c){b.length&&c.cb(b.length);for(var d=0,e;e=b[d++];)e.vmodels=c,C[e.type](e,c),e.evaluator&&(e.element&&1===e.element.nodeType)&&e.element.removeAttribute(e.name);b.length=0}function qb(b,c){0b&&delete c[d.shift()];return c[e]=f}var d=[];return c}function wb(b,c,d){var e=d.type,f=d.filters?d.filters.join(""):"",g=c.map(function(b){return b.$id.replace(mc,"$1")})+b+e+f,h=nc(b).concat(),k=[],l=[],m=[],q="";c=vb(c);for(var n=0,q=c.length;n>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 Wb(b){var c=[];c.$id=ha();c.$model=b;c.$events={};c.$events[G]=[];c._=M({length:b.length});c._.$watch("length",function(b,d){c.$fire("length",b,d)});for(var d in R)c[d]=R[d];avalon.mix(c,zb);return c}function Ab(b,c,d,e){var f=avalon.parseHTML(b.template),g=avalon.slice(f.childNodes);c.appendChild(f);d.$outer=b.$outer;b=b.vmodels;d=[d].concat(b);d.cb=b.cb;e.push({nodes:g,vmodels:d})}function Ga(b,c){var d=b.endRepeat,e=[],f=b.element.nextSibling;if(f!==d){do if(f!==d)e.push(f); -else break;while(f=f.nextSibling)}return e[b.group*c]||d}function Bb(b,c,d){c*=d||1;d=[b];for(var e=1,f=I;eu.maxRepeatSize&&da.pop()}b.length=0}function T(){p.body&&(D?(t["ready!"].state=2,D.checkDeps()):Eb.forEach(function(b){b(avalon)}),T=y)}function Fb(){try{B.doScroll("left"),T()}catch(b){setTimeout(Fb)}}var A=new Date-0,G="$"+A,r=Function("return this")(),yc=r.require,zc=r.define,ja=!1,z=/[^, ]+/g,Gb=/\[native code\]/,va=/^(?:object|array)$/,Hb=/^\[object SVG\w*Element\]$/,Ub=/^\[object (?:Window|DOMWindow|global)\]$/,Ha=Object.prototype,N=Ha.hasOwnProperty,ia=Ha.toString,L=Array.prototype, -$=L.slice,Y={},w=r.dispatchEvent,B=p.documentElement,J=p.getElementsByTagName("head")[0],I=p.createDocumentFragment(),ea=p.createElement("div"),Ib={};"Boolean Number String Function Array Date RegExp Object Error".replace(z,function(b){Ib["[object "+b+"]"]=b.toLowerCase()});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?Ib[ia.call(b)]||"object":typeof b};var V="object"===typeof alert?function(b){try{return/^\s*\bfunction\b/.test(b+"")}catch(c){return!1}}:function(b){return"[object Function]"==ia.call(b)};avalon.isFunction=V;avalon.isWindow=function(b){return!b?!1:b==b.document&&b.document!=b};Xa(r)&&(avalon.isWindow=Xa);for(var Ac in avalon({}))break;var Bc="0"!==Ac;avalon.isPlainObject=function(b,c){if(!b||"object"!==avalon.type(b)||b.nodeType||avalon.isWindow(b))return!1;try{if(b.constructor&&!N.call(b, -"constructor")&&!N.call(b.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}if(Bc)for(c in b)return N.call(b,c);for(c in b);return void 0===c||N.call(b,c)};Gb.test(Object.getPrototypeOf)&&(avalon.isPlainObject=function(b){return!!b&&"object"===typeof b&&Object.getPrototypeOf(b)===Ha});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&&"function"!==avalon.type(g)&&(g= -{});h===k&&(g=this,h--);for(;h"))&&nb(b,c)}}function Ba(b,c){b.length&&c.cb(b.length);for(var d= +0,e;e=b[d++];)e.vmodels=c,C[e.type](e,c),e.evaluator&&(e.element&&1===e.element.nodeType)&&e.element.removeAttribute(e.name);b.length=0}function qb(b,c){0b&&delete c[d.shift()];return c[e]=f}var d=[];return c} +function xb(b,c,d){var e=d.type,f=d.filters?d.filters.join(""):"",g=c.map(function(b){return b.$id.replace(nc,"$1")})+b+e+f,h=oc(b).concat(),k=[],l=[],m=[],q="";c=wb(c);for(var n=0,q=c.length;n>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 Xb(b){var c=[];c.$id=ha();c.$model=b;c.$events={};c.$events[G]= +[];c._=N({length:b.length});c._.$watch("length",function(b,d){c.$fire("length",b,d)});for(var d in R)c[d]=R[d];avalon.mix(c,Ab);return c}function Bb(b,c,d,e){var f=avalon.parseHTML(b.template),g=avalon.slice(f.childNodes);c.appendChild(f);d.$outer=b.$outer;b=b.vmodels;d=[d].concat(b);d.cb=b.cb;e.push({nodes:g,vmodels:d})}function Ga(b,c){var d=b.endRepeat,e=[],f=b.element.nextSibling;if(f!==d){do if(f!==d)e.push(f);else break;while(f=f.nextSibling)}return e[b.group*c]||d}function Cb(b,c,d){c*=d|| +1;d=[b];for(var e=1,f=I;eu.maxRepeatSize&& +da.pop()}b.length=0}function T(){p.body&&(D?(t["ready!"].state=2,D.checkDeps()):Fb.forEach(function(b){b(avalon)}),T=y)}function Gb(){try{B.doScroll("left"),T()}catch(b){setTimeout(Gb)}}var A=new Date-0,G="$"+A,r=Function("return this")(),zc=r.require,Ac=r.define,ja=!1,z=/[^, ]+/g,Hb=/\[native code\]/,va=/^(?:object|array)$/,Ib=/^\[object SVG\w*Element\]$/,Vb=/^\[object (?:Window|DOMWindow|global)\]$/,Ha=Object.prototype,O=Ha.hasOwnProperty,ia=Ha.toString,L=Array.prototype,$=L.slice,Y={},w=r.dispatchEvent, +B=p.documentElement,J=p.getElementsByTagName("head")[0],I=p.createDocumentFragment(),ea=p.createElement("div"),Jb={};"Boolean Number String Function Array Date RegExp Object Error".replace(z,function(b){Jb["[object "+b+"]"]=b.toLowerCase()});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[ia.call(b)]||"object": +typeof b};var V="object"===typeof alert?function(b){try{return/^\s*\bfunction\b/.test(b+"")}catch(c){return!1}}:function(b){return"[object Function]"==ia.call(b)};avalon.isFunction=V;avalon.isWindow=function(b){return!b?!1:b==b.document&&b.document!=b};Xa(r)&&(avalon.isWindow=Xa);for(var Bc in avalon({}))break;var Cc="0"!==Bc;avalon.isPlainObject=function(b,c){if(!b||"object"!==avalon.type(b)||b.nodeType||avalon.isWindow(b))return!1;try{if(b.constructor&&!O.call(b,"constructor")&&!O.call(b.constructor.prototype, +"isPrototypeOf"))return!1}catch(d){return!1}if(Cc)for(c in b)return O.call(b,c);for(c in b);return void 0===c||O.call(b,c)};Hb.test(Object.getPrototypeOf)&&(avalon.isPlainObject=function(b){return!!b&&"object"===typeof b&&Object.getPrototypeOf(b)===Ha});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&&"function"!==avalon.type(g)&&(g={});h===k&&(g=this,h--);for(;h 0 Then","\t\t["+b+'] = [__proxy__]([__data__],"'+b+'")',"\tEnd If","\tOn Error Goto 0","\tEnd Property");f.push("End Class");b=f.join("\r\n"); -b=r.findOrDefineVBClass(e,b);b===e&&r.parseVB(["Function "+e+"Factory(a, b)","\tDim o","\tSet o = (New "+e+")(a, b)","\tSet "+e+"Factory = o","End Function"].join("\r\n"));return r[b+"Factory"](c,Cc)}}if(!"\u53f8\u5f92\u6b63\u7f8e".trim){var Dc=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(Dc,"")}}var Ec=!{toString:null}.propertyIsEnumerable("toString"),Fc=function(){}.propertyIsEnumerable("prototype"),Jb="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "), -Gc=Jb.length;Object.keys||(Object.keys=function(b){var c=[],d=Fc&&"function"===typeof b;if("string"===typeof b||b&&b.callee)for(d=0;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:Z("","_",""),filter:Z("r=[],j=0,", -"if(_)r[j++]=this[i]","return r"),map:Z("r=[],","r[i]=_","return r"),some:Z("","if(_)return true","return false"),every:Z("","if(!_)return false","return true")});B.contains||(Node.prototype.contains=function(b){return!!(this.compareDocumentPosition(b)&16)});p.contains||(p.contains=function(b){return Ya(p,b)});if(r.SVGElement){var Kb=p.createElementNS("http://www.w3.org/2000/svg","svg");Kb.innerHTML='';if(!Hb.test(Kb.firstChild)){var Ja=function(b,c){if(b&& +b=r.findOrDefineVBClass(e,b);b===e&&r.parseVB(["Function "+e+"Factory(a, b)","\tDim o","\tSet o = (New "+e+")(a, b)","\tSet "+e+"Factory = o","End Function"].join("\r\n"));return r[b+"Factory"](c,Dc)}}if(!"\u53f8\u5f92\u6b63\u7f8e".trim){var Ec=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(Ec,"")}}var Fc=!{toString:null}.propertyIsEnumerable("toString"),Gc=function(){}.propertyIsEnumerable("prototype"),Kb="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "), +Hc=Kb.length;Object.keys||(Object.keys=function(b){var c=[],d=Gc&&"function"===typeof b;if("string"===typeof b||b&&b.callee)for(d=0;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:Z("","_",""),filter:Z("r=[],j=0,", +"if(_)r[j++]=this[i]","return r"),map:Z("r=[],","r[i]=_","return r"),some:Z("","if(_)return true","return false"),every:Z("","if(!_)return false","return true")});B.contains||(Node.prototype.contains=function(b){return!!(this.compareDocumentPosition(b)&16)});p.contains||(p.contains=function(b){return Ya(p,b)});if(r.SVGElement){var Lb=p.createElementNS("http://www.w3.org/2000/svg","svg");Lb.innerHTML='';if(!Ib.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());L.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&&r.HTMLElement&&HTMLElement.prototype.__defineGetter__("outerHTML",Za);var O,P,aa,Lb,ub,Mb=/[-.*+?^${}()|[\]\/\\]/g,D=y,U={loader:function(b){r.define= -b?D.define:zc;r.require=b?D:yc},interpolate:function(b){O=b[0];P=b[1];if(O===P)throw new SyntaxError("openTag!==closeTag");if("\x3c!--,--\x3e"===b+"")u.commentInterpolate=!0;else{b=O+"test"+P;ea.innerHTML=b;if(ea.innerHTML!==b&&0<=ea.innerHTML.indexOf("<"))throw new SyntaxError("\u6b64\u5b9a\u754c\u7b26\u4e0d\u5408\u6cd5");ea.innerHTML=""}b=(O+"").replace(Mb,"\\$&");var c=(P+"").replace(Mb,"\\$&");aa=RegExp(b+"(.*?)"+c);Lb=RegExp(b+"(.*?)"+c,"g");ub=RegExp(b+".*?"+c+"|\\sms-")}};u.debug=!0;u.plugins= +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&&r.HTMLElement&&HTMLElement.prototype.__defineGetter__("outerHTML",Za);var P,Q,aa,Mb,vb,Nb=/[-.*+?^${}()|[\]\/\\]/g,D=y,U={loader:function(b){r.define= +b?D.define:Ac;r.require=b?D:zc},interpolate:function(b){P=b[0];Q=b[1];if(P===Q)throw new SyntaxError("openTag!==closeTag");if("\x3c!--,--\x3e"===b+"")u.commentInterpolate=!0;else{b=P+"test"+Q;ea.innerHTML=b;if(ea.innerHTML!==b&&0<=ea.innerHTML.indexOf("<"))throw new SyntaxError("\u6b64\u5b9a\u754c\u7b26\u4e0d\u5408\u6cd5");ea.innerHTML=""}b=(P+"").replace(Nb,"\\$&");var c=(Q+"").replace(Nb,"\\$&");aa=RegExp(b+"(.*?)"+c);Mb=RegExp(b+"(.*?)"+c,"g");vb=RegExp(b+".*?"+c+"|\\sms-")}};u.debug=!0;u.plugins= U;u.plugins.interpolate(["{{","}}"]);u.paths={};u.shim={};u.maxRepeatSize=100;avalon.config=u;var bb={_toString:function(){var b=this.node.className;return("string"===typeof b?b:b.baseVal).split(/\s+/).join(" ")},_contains:function(b){return-1<(" "+this+" ").indexOf(" "+b+" ")},_add:function(b){this.contains(b)||this._set(this+" "+b)},_remove:function(b){this._set((" "+this+" ").replace(" "+b+" "," ").trim())},__set:function(b){var c=this.node;"string"===typeof c.className?c.className=b:c.setAttribute("class", b)}};"add,remove".replace(z,function(b){avalon.fn[b+"Class"]=function(c){var d=this[0];c&&("string"===typeof c&&d&&1===d.nodeType)&&c.replace(/\S+/g,function(c){ab(d)[b](c)});return this}});avalon.fn.mix({hasClass:function(b){var c=this[0]||{};return 1===c.nodeType&&ab(c).contains(b)},toggleClass:function(b,c){for(var d,e=0,f=b.split(/\s+/),g="boolean"===typeof c;d=f[e++];)this[(g?c:!this.hasClass(d))?"addClass":"removeClass"](d);return this},attr:function(b,c){return 2===arguments.length?(this[0].setAttribute(b, c),this):this[0].getAttribute(b)},data:function(b,c){b="data-"+$a(b||"");switch(arguments.length){case 2:return this.attr(b,c),this;case 1:var d=this.attr(b);return cb(d);case 0:var e={};L.forEach.call(this[0].attributes,function(c){c&&(b=c.name,b.indexOf("data-")||(b=oa(b.slice(5)),e[b]=cb(c.value)))});return e}},removeData:function(b){b="data-"+$a(b);this[0].removeAttribute(b);return this},css:function(b,c){if(avalon.isPlainObject(b))for(var d in b)avalon.css(this,d,b[d]);else var e=avalon.css(this, b,c);return void 0!==e?e:this},position:function(){var b,c,d=this[0],e={top:0,left:0};if(d)return"fixed"===this.css("position")?c=d.getBoundingClientRect():(b=this.offsetParent(),c=this.offset(),"HTML"!==b[0].tagName&&(e=b.offset()),e.top+=avalon.css(b[0],"borderTopWidth",!0),e.left+=avalon.css(b[0],"borderLeftWidth",!0)),{top:c.top-e.top-avalon.css(d,"marginTop",!0),left:c.left-e.left-avalon.css(d,"marginLeft",!0)}},offsetParent:function(){for(var b=this[0].offsetParent||B;b&&"HTML"!==b.tagName&& "static"===avalon.css(b,"position");)b=b.offsetParent;return avalon(b||B)},bind:function(b,c,d){if(this[0])return avalon.bind(this[0],b,c,d)},unbind:function(b,c,d){this[0]&&avalon.unbind(this[0],b,c,d);return this},val:function(b){var c=this[0];if(c&&1===c.nodeType){var d=0===arguments.length,e=d?":get":":set",f=Ka,g;g=c.tagName.toLowerCase();g="input"===g&&/checkbox|radio/.test(c.type)?"checked":g;if(e=f[g+e])var h=e(c,b);else{if(d)return(c.value||"").replace(/\r/g,"");c.value=b}}return d?h:this}}); -var Zb=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Hc=/^[\],:{}\s]*$/,Ic=/(?:^|:|,)(?:\s*\[)+/g,Jc=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,Kc=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;avalon.parseJSON=r.JSON?JSON.parse:function(b){if("string"===typeof b){if((b=b.trim())&&Hc.test(b.replace(Jc,"@").replace(Kc,"]").replace(Ic,"")))return(new Function("return "+b))();avalon.error("Invalid JSON: "+b)}};avalon.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){avalon.fn[b]=function(d){var e= -this[0]||{},f=e.window&&e.document?e:9===e.nodeType?e.defaultView||e.parentWindow:!1,g="scrollTop"===b;if(arguments.length)f?f.scrollTo(!g?d:avalon(f).scrollLeft(),g?d:avalon(f).scrollTop()):e[b]=d;else return f?c in f?f[c]:B[b]:e[b]}});var x=avalon.cssHooks={},Nb=["","-webkit-","-o-","-moz-","-ms-"],La={"float":"cssFloat"};avalon.cssNumber=Q("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom");avalon.cssName=function(b,c,d){if(La[b])return La[b];c=c||B.style; -for(var e=0,f=Nb.length;e=d?"alpha(opacity="+100*d+")":"";c=b.filter||"";b.zoom=1;b.filter=(Ob.test(c)?c.replace(Ob,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(z,function(b){x[b+":get"]=function(c){var d=x["@:get"](c,b);return/px$/.test(d)?d:avalon(c).position()[b]+"px"}});var eb={position:"absolute",visibility:"hidden",display:"block"}, -$b=/^(none|table(?!-c[ea]).+)/;"Width,Height".replace(z,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}; +var $b=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Ic=/^[\],:{}\s]*$/,Jc=/(?:^|:|,)(?:\s*\[)+/g,Kc=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,Lc=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;avalon.parseJSON=r.JSON?JSON.parse:function(b){if("string"===typeof b){if((b=b.trim())&&Ic.test(b.replace(Kc,"@").replace(Lc,"]").replace(Jc,"")))return(new Function("return "+b))();avalon.error("Invalid JSON: "+b)}};avalon.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){avalon.fn[b]=function(d){var e= +this[0]||{},f=e.window&&e.document?e:9===e.nodeType?e.defaultView||e.parentWindow:!1,g="scrollTop"===b;if(arguments.length)f?f.scrollTo(!g?d:avalon(f).scrollLeft(),g?d:avalon(f).scrollTop()):e[b]=d;else return f?c in f?f[c]:B[b]:e[b]}});var x=avalon.cssHooks={},Ob=["","-webkit-","-o-","-moz-","-ms-"],La={"float":"cssFloat"};avalon.cssNumber=M("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom");avalon.cssName=function(b,c,d){if(La[b])return La[b];c=c||B.style; +for(var e=0,f=Ob.length;e=d?"alpha(opacity="+100*d+")":"";c=b.filter||"";b.zoom=1;b.filter=(Pb.test(c)?c.replace(Pb,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(z,function(b){x[b+":get"]=function(c){var d=x["@:get"](c,b);return/px$/.test(d)?d:avalon(c).position()[b]+"px"}});var eb={position:"absolute",visibility:"hidden",display:"block"}, +ac=/^(none|table(?!-c[ea]).+)/;"Width,Height".replace(z,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=[];db(b,d);for(var e=x[c+":get"](b),f=0,m;m=d[f++];){b=m.node;for(var q in m)"string"===typeof m[q]&&(b.style[q]=m[q])}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 Oc=/^]+))?)*\s+value[\s=]/i,Ka={"option:get":r.VBArray?function(b){return Oc.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=Ka["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+value[\s=]/i,Ka={"option:get":r.VBArray?function(b){return Pc.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=Ka["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"],param:[1,""],col:[2,"","
"],legend:[1,"
"],option:[1,"\u4e0d\u80fd\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4");d= +var s=function(b){setTimeout(function(){h(b)})};k.replace(z,function(b){switch(b){case "input":w?(l("input",h),l("compositionstart",f),l("compositionend",g),9===p.documentMode&&(l("paste",s),l("cut",s))):l("propertychange",function(b){"value"===b.propertyName&&h()});break;default:l(b,h)}})}b.oldValue=b.value;Tb(function(){if(avalon.contains(B,b))yb.call(b);else if(!b.msRetain)return!1});xa(d);e.call(b,b.value)};var zb,ca=[],Tb=y;avalon.tick=function(b){1===ca.push(b)&&(zb=setInterval(sc,60))};try{var Ua= +HTMLInputElement.prototype;Object.getOwnPropertyNames(Ua);var uc=Object.getOwnPropertyDescriptor(Ua,"value").set;Object.defineProperty(Ua,"value",{set:tc})}catch(pd){Tb=avalon.tick}X.SELECT=function(b,c,d){var e=avalon(b);d.handler=function(){var d=c(),d=d&&d.$model||d;Array.isArray(d)?b.multiple||v("ms-duplex\u5728\u4e0d\u80fd\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4");d= Array.isArray(d)?d.map(String):d+"";d+""!==b.oldValue&&(e.val(d),b.oldValue=d+"")};d.bound("change",function(){if(!1!==e.data("duplex-observe")){var f=e.val(),f=Array.isArray(f)?f.map(function(b){return d.pipe(b,d,"get")}):d.pipe(f,d,"get");f+""!==b.oldValue&&c(f);d.changed.call(b,f,d)}});avalon.scanCallback(function(){xa(d);d.changed.call(b,c(),d)});avalon.scan(b)};X.TEXTAREA=X.INPUT;var ga=avalon.eventHooks;"onmouseenter"in B||avalon.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(b, c){ga[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){r[b]&&!ga.animationend&&(ga.animationend={type:c})});"oninput"in p.createElement("input")||(ga.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 Tb=void 0!==p.onwheel?"wheel":"DOMMouseScroll",gd="wheel"===Tb?"deltaY":"detail";ga.mousewheel={type:Tb,deel:function(b,c){return function(d){d.wheelDeltaY=d.wheelDelta=0]*>([\S\s]*?)<\/script\s*>/gim,id=/\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,jd=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/ig,kd={a:/\b(href)\=("javascript[^"]*"|'javascript[^']*')/ig,img:/\b(src)\=("javascript[^"]*"|'javascript[^']*')/ig, -form:/\b(action)\=("javascript[^"]*"|'javascript[^']*')/ig},ld=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,md=/([^\#-~| |!])/g,Wa=avalon.filters={uppercase:function(b){return b.toUpperCase()},lowercase:function(b){return b.toLowerCase()},truncate:function(b,c,d){c=c||30;d=void 0===d?"...":d;return b.length>c?b.slice(0,c-d.length)+d:String(b)},camelize:oa,sanitize:function(b){return b.replace(hd,"").replace(jd,function(b,d){var e=b.toLowerCase().match(/<(\w+)\s/);e&&(e=kd[e[1]])&&(b=b.replace(e,function(b,c, -d){b=d.charAt(0);return c+"="+b+"javascript:void(0)"+b}));return b.replace(id," ").replace(/\s+/g," ")})},escape:function(b){return String(b).replace(/&/g,"&").replace(ld,function(b){var d=b.charCodeAt(0);b=b.charCodeAt(1);return"&#"+(1024*(d-55296)+(b-56320)+65536)+";"}).replace(md,function(b){return"&#"+b.charCodeAt(0)+";"}).replace(//g,">")},currency:function(b,c){return(c||"\uffe5")+avalon.filters.number(b)},number:function(b,c,d,e){b=(b+"").replace(/[^0-9+\-Ee.]/g, +typeof b)for(var c=this.length-1;0<=c;c--)b(this[c],c)&&this.splice(c,1);else this.clear()},ensure:function(b){this.contains(b)||this.push(b);return this},set:function(b,c){if(0<=b){var d=avalon.type(c);c&&c.$model&&(c=c.$model);var e=this[b];if("object"===d)for(var f in c)e.hasOwnProperty(f)&&(e[f]=c[f]);else"array"===d?e.clear().push.apply(e,c):e!==c&&(this[b]=c,this.$model[b]=c,this._fire("set",b,c))}return this}};"sort,reverse".replace(z,function(b){Ab[b]=function(){var c=this.$model,d=c.slice(0), +e=!1;L[b].apply(c,arguments);for(var f=0,g=d.length;f]*>([\S\s]*?)<\/script\s*>/gim,jd=/\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,kd=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/ig,ld={a:/\b(href)\=("javascript[^"]*"|'javascript[^']*')/ig,img:/\b(src)\=("javascript[^"]*"|'javascript[^']*')/ig, +form:/\b(action)\=("javascript[^"]*"|'javascript[^']*')/ig},md=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,nd=/([^\#-~| |!])/g,Wa=avalon.filters={uppercase:function(b){return b.toUpperCase()},lowercase:function(b){return b.toLowerCase()},truncate:function(b,c,d){c=c||30;d=void 0===d?"...":d;return b.length>c?b.slice(0,c-d.length)+d:String(b)},camelize:oa,sanitize:function(b){return b.replace(id,"").replace(kd,function(b,d){var e=b.toLowerCase().match(/<(\w+)\s/);e&&(e=ld[e[1]])&&(b=b.replace(e,function(b,c, +d){b=d.charAt(0);return c+"="+b+"javascript:void(0)"+b}));return b.replace(jd," ").replace(/\s+/g," ")})},escape:function(b){return String(b).replace(/&/g,"&").replace(md,function(b){var d=b.charCodeAt(0);b=b.charCodeAt(1);return"&#"+(1024*(d-55296)+(b-56320)+65536)+";"}).replace(nd,function(b){return"&#"+b.charCodeAt(0)+";"}).replace(//g,">")},currency:function(b,c){return(c||"\uffe5")+avalon.filters.number(b)},number:function(b,c,d,e){b=(b+"").replace(/[^0-9+\-Ee.]/g, "");b=!isFinite(+b)?0:+b;c=!isFinite(+c)?0:Math.abs(c);e=e||",";d=d||".";var f="",f=function(b,c){var d=Math.pow(10,c);return""+Math.round(b*d)/d},f=(c?f(b,c):""+Math.round(b)).split(".");3b&&(e="-",b=-b);for(b=""+b;b.length-e)g+=e;0===g&&-12===e&&(g=12);return b(g,d,f)}}function d(b,c){return function(d,e){var f=d["get"+b](),g=(c?"SHORT"+b:b).toUpperCase();return e[g][f]}}function e(b){var c;if(c=b.match(k)){b=new Date(0);var d=0,e=0,f=c[8]?b.setUTCFullYear:b.setFullYear,g=c[8]?b.setUTCHours:b.setHours;c[9]&&(d=parseInt(c[9]+c[10],10),e=parseInt(c[9]+c[11],10));f.call(b,parseInt(c[1],10),parseInt(c[2],10)-1,parseInt(c[3],10));d=parseInt(c[4]||0,10)-d;e=parseInt(c[5]||0,10)-e;f=parseInt(c[6]|| 0,10);c=Math.round(1E3*parseFloat("0."+(c[7]||0)));g.call(b,d,e,f,c)}return b}var f={yyyy:c("FullYear",4),yy:c("FullYear",2,0,!0),y:c("FullYear",1),MMMM:d("Month"),MMM:d("Month",!0),MM:c("Month",2,1),M:c("Month",1,1),dd:c("Date",2),d:c("Date",1),HH:c("Hours",2),H:c("Hours",1),hh:c("Hours",2,-12),h:c("Hours",1,-12),mm:c("Minutes",2),m:c("Minutes",1),ss:c("Seconds",2),s:c("Seconds",1),sss:c("Milliseconds",3),EEEE:d("Day"),EEE:d("Day",!0),a:function(b,c){return 12>b.getHours()?c.AMPMS[0]:c.AMPMS[1]}, @@ -115,11 +115,11 @@ Z:function(c){c=-1*c.getTimezoneOffset();return c=(0<=c?"+":"")+(b(Math[0e?avalon.error(b+" \u5bf9\u5e94\u8d44\u6e90\u4e0d\u5b58\u5728\u6216\u6ca1\u6709\u5f00\u542f CORS"):(t[d].state=2,t[d].exports=c.responseText,D.checkDeps())}};c.open("GET", b,!0);"withCredentials"in c&&(c.withCredentials=!0);c.setRequestHeader("X-Requested-With","XMLHttpRequest");c.send();return d};var n=c(!0);n||(n=avalon.slice(p.scripts).pop().src);n=b(n);q=u.base=n.slice(0,n.lastIndexOf("/")+1);var s=/\/\w+\/\.\./;D=avalon.require=function(b,c,d){var f={},h=[],m=0,n=0,p=d||"callback"+setTimeout("1");d=d||q;String(b).replace(z,function(b){if(b=g(b,d))m++,t[b]&&2===t[b].state&&n++,f[b]||(h.push(b),f[b]="\u53f8\u5f92\u6b63\u7f8e")});t[p]={id:p,factory:c,deps:f,args:h, state:1};m===n?k(p,h,c):l.unshift(p);e()};D.define=function(e,f,g){var h=$.call(arguments);if("string"===typeof e)var k=h.shift();"function"===typeof h[0]&&h.unshift([]);var l=t[k]&&1<=t[k].state?k:b(c());!t[l]&&k&&(t[l]={id:l,factory:g,state:1});g=h[1];g.id=k;g.delay=function(b){h.push(b);var c=!0;try{c=d(t[b].deps,b)}catch(e){}c&&avalon.error(b+"\u6a21\u5757\u4e0e\u4e4b\u524d\u7684\u6a21\u5757\u5b58\u5728\u5faa\u73af\u4f9d\u8d56\uff0c\u8bf7\u4e0d\u8981\u76f4\u63a5\u7528script\u6807\u7b7e\u5f15\u5165"+ -b+"\u6a21\u5757");delete g.delay;D.apply(null,h)};l?g.delay(l,h):m.push(g)};D.define.amd=t;D.config=u;D.checkDeps=e};var Eb=[];"complete"===p.readyState?setTimeout(T):w?p.addEventListener("DOMContentLoaded",T):(p.attachEvent("onreadystatechange",function(){"complete"===p.readyState&&T()}),B.doScroll&&Fb());avalon.bind(r,"load",T);avalon.ready=function(b){D?D("ready!",b):T===y?b(avalon):Eb.push(b)};avalon.config({loader:!0});avalon.ready(function(){avalon.scan(p.body)})})(document); +b+"\u6a21\u5757");delete g.delay;D.apply(null,h)};l?g.delay(l,h):m.push(g)};D.define.amd=t;D.config=u;D.checkDeps=e};var Fb=[];"complete"===p.readyState?setTimeout(T):w?p.addEventListener("DOMContentLoaded",T):(p.attachEvent("onreadystatechange",function(){"complete"===p.readyState&&T()}),B.doScroll&&Gb());avalon.bind(r,"load",T);avalon.ready=function(b){D?D("ready!",b):T===y?b(avalon):Fb.push(b)};avalon.config({loader:!0});avalon.ready(function(){avalon.scan(p.body)})})(document); diff --git a/avalon.modern.js b/avalon.modern.js index abce2aede..91de1152d 100644 --- a/avalon.modern.js +++ b/avalon.modern.js @@ -1594,7 +1594,7 @@ } var events = oneObject("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit") - + var obsoleteAttrs = oneObject("value,title,alt,checked,selected,disabled,readonly,enabled") function scanAttr(elem, vmodels) { //防止setAttribute, removeAttribute时 attributes自动被同步,导致for循环出错 var attributes = elem.hasAttributes() ? avalon.slice(elem.attributes) : [] @@ -1613,7 +1613,7 @@ if (events[type]) { param = type type = "on" - } else if (/^(checked|selected|disabled|readonly|enabled)$/.test(type)) { + } else if (obsoleteAttrs[type]) { log("ms-" + type + "已经被废弃,请使用ms-attr-*代替") if (type === "enabled") {//吃掉ms-enabled绑定,用ms-disabled代替 type = "disabled" @@ -1997,7 +1997,7 @@ var isInnate = attr && attr.expando === false } - if (isInnate) { + if (isInnate || obsoleteAttrs[attrName]) { elem[attrName] = val } else { elem.setAttribute(attrName, val) diff --git a/avalon.modern.min.js b/avalon.modern.min.js index d0c75b328..c324e0c8c 100644 --- a/avalon.modern.min.js +++ b/avalon.modern.min.js @@ -1,92 +1,93 @@ -(function(p){function w(){}function t(){avalon.config.debug&&console.log.apply(console,arguments)}function O(b,c){"string"===typeof b&&(b=b.match(x)||[]);for(var d={},e=void 0!==c?c:1,f=0,g=b.length;f=Object.keys(e).length){var S=e.set,E=e.get;n=function(b){var e=f.$events,g=d[c]; -if(arguments.length){if(da)return;if(R(S)){var h=e[c];e[c]=[];S.call(f,b);e[c]=h}}else avalon.openComputedCollect&&ea(e[c]);b=d[c]=E.call(f);if(!fa(g,b)){if(ga&&(h=T[f.$id])&&h[c])h[c].$val=b;na(e[c]);f.$events&&P.$fire.call(f,c,b,g)}return b};k.push(function(){V[A]={evaluator:n,element:G,type:"computed::"+c,handler:w,args:[]};n();ea(g[c]);delete V[A]})}else Ka.test(l)?(n=function(b){var e=n.child,h=d[c];if(arguments.length)!da&&!fa(h,b)&&(e=n.child=wb(f,c,b,l),b=d[c]=e.$model,(e=oa[e.$id])&&e(), -f.$events&&P.$fire.call(f,c,b,h));else return ea(g[c]),e},(n.child=J(e,0,d[c])).$events[F]=g[c]):n=function(b){var e=d[c];if(arguments.length){if(!fa(e,b)){d[c]=b;if(ga){var h=T[f.$id];h&&h[c]&&(h[c].$val=b)}na(g[c]);f.$events&&P.$fire.call(f,c,b,e)}}else return ea(g[c]),e};h[c]=n}})(e,b[e]);Ja.forEach(function(c){delete b[c];delete d[c]});Object.defineProperties(f,xb(h));for(var l in b)h[l]||(f[l]=b[l]);f.$id=ca();f.$model=d;f.$events=g;for(e in P)f[e]=P[e];Object.defineProperty(f,"hasOwnProperty", -{value:function(b){return b in f.$model},writable:!1,enumerable:!1,configurable:!0});k.forEach(function(b){b()});return f}function xb(b){var c={},d;for(d in b)c[d]={get:b[d],set:b[d],enumerable:!0,configurable:!0};return c}function wb(b,c,d,e){var f=b[c];if("array"===e){if(!Array.isArray(d)||f===d)return f;f.clear();f.pushArray(d.concat());return f}var g=b.$events[c];T[f.$id]&&(ga--,delete T[f.$id]);var h=J(d);h.$events[F]=g;oa[h.$id]=function(b){for(;b=g.shift();)(function(b){b.type&&avalon.nextTick(function(){b.rollback&& -b.rollback();u[b.type](b,b.vmodels)})})(b);delete oa[h.$id]};return h}function s(b){for(var c in b)if(La.call(b,c)){var d=b[c];if("function"===typeof s.plugins[c])s.plugins[c](d);else"object"===typeof s[c]?avalon.mix(s[c],d):s[c]=d}return this}function Ma(b){return b.replace(/([a-z\d])([A-Z]+)/g,"$1-$2").toLowerCase()}function ha(b){return 0>b.indexOf("-")&&0>b.indexOf("_")?b:b.replace(/[-_][^-_]/g,function(b){return b.charAt(1).toUpperCase()})}function ia(b){try{b="true"===b?!0:"false"===b?!1:"null"=== -b?null:+b+""===b?+b:yb.test(b)?JSON.parse(b):b}catch(c){}return b}function Na(b,c){if(0>=b.offsetWidth){var d=getComputedStyle(b,null);if(zb.test(d.display)){var e={node:b},f;for(f in Oa)e[f]=d[f],b.style[f]=Oa[f];c.push(e)}(d=b.parentNode)&&1===d.nodeType&&Na(d,c)}}function pa(b){V[A]=b;avalon.openComputedCollect=!0;var c=b.evaluator;if(c)try{var d=Ab.test(b.type)?b:c.apply(0,b.args);b.handler(d,b.element,b)}catch(e){t("warning:exception throwed in [registerSubscriber] "+e),delete b.evaluator,c= -b.element,3===c.nodeType&&(d=c.parentNode,s.commentInterpolate?d.replaceChild(p.createComment(b.value),c):c.data=K+b.value+L)}avalon.openComputedCollect=!1;delete V[A]}function ea(b){var c=V[A];b&&(c&&avalon.Array.ensure(b,c)&&c.element)&&Pa(c,b)}function Pa(b,c){b.$uuid=b.$uuid||ca();c.$uuid=c.$uuid||ca();var d={data:b,list:c,toString:function(){return b.$uuid+" "+c.$uuid}};Q[d]||(Q[d]=1,Q.push(d))}function Qa(){for(var b=qa,c=qa+Bb;b=Object.keys(e).length){var S=e.set,E=e.get;n=function(b){var e=f.$events,g=d[c]; +if(arguments.length){if(ca)return;if(R(S)){var h=e[c];e[c]=[];S.call(f,b);e[c]=h}}else avalon.openComputedCollect&&da(e[c]);b=d[c]=E.call(f);if(!ea(g,b)){if(fa&&(h=T[f.$id])&&h[c])h[c].$val=b;na(e[c]);f.$events&&P.$fire.call(f,c,b,g)}return b};k.push(function(){V[A]={evaluator:n,element:G,type:"computed::"+c,handler:w,args:[]};n();da(g[c]);delete V[A]})}else Ka.test(l)?(n=function(b){var e=n.child,h=d[c];if(arguments.length)!ca&&!ea(h,b)&&(e=n.child=xb(f,c,b,l),b=d[c]=e.$model,(e=oa[e.$id])&&e(), +f.$events&&P.$fire.call(f,c,b,h));else return da(g[c]),e},(n.child=K(e,0,d[c])).$events[F]=g[c]):n=function(b){var e=d[c];if(arguments.length){if(!ea(e,b)){d[c]=b;if(fa){var h=T[f.$id];h&&h[c]&&(h[c].$val=b)}na(g[c]);f.$events&&P.$fire.call(f,c,b,e)}}else return da(g[c]),e};h[c]=n}})(e,b[e]);Ja.forEach(function(c){delete b[c];delete d[c]});Object.defineProperties(f,yb(h));for(var l in b)h[l]||(f[l]=b[l]);f.$id=ba();f.$model=d;f.$events=g;for(e in P)f[e]=P[e];Object.defineProperty(f,"hasOwnProperty", +{value:function(b){return b in f.$model},writable:!1,enumerable:!1,configurable:!0});k.forEach(function(b){b()});return f}function yb(b){var c={},d;for(d in b)c[d]={get:b[d],set:b[d],enumerable:!0,configurable:!0};return c}function xb(b,c,d,e){var f=b[c];if("array"===e){if(!Array.isArray(d)||f===d)return f;f.clear();f.pushArray(d.concat());return f}var g=b.$events[c];T[f.$id]&&(fa--,delete T[f.$id]);var h=K(d);h.$events[F]=g;oa[h.$id]=function(b){for(;b=g.shift();)(function(b){b.type&&avalon.nextTick(function(){b.rollback&& +b.rollback();u[b.type](b,b.vmodels)})})(b);delete oa[h.$id]};return h}function s(b){for(var c in b)if(La.call(b,c)){var d=b[c];if("function"===typeof s.plugins[c])s.plugins[c](d);else"object"===typeof s[c]?avalon.mix(s[c],d):s[c]=d}return this}function Ma(b){return b.replace(/([a-z\d])([A-Z]+)/g,"$1-$2").toLowerCase()}function ga(b){return 0>b.indexOf("-")&&0>b.indexOf("_")?b:b.replace(/[-_][^-_]/g,function(b){return b.charAt(1).toUpperCase()})}function ha(b){try{b="true"===b?!0:"false"===b?!1:"null"=== +b?null:+b+""===b?+b:zb.test(b)?JSON.parse(b):b}catch(c){}return b}function Na(b,c){if(0>=b.offsetWidth){var d=getComputedStyle(b,null);if(Ab.test(d.display)){var e={node:b},f;for(f in Oa)e[f]=d[f],b.style[f]=Oa[f];c.push(e)}(d=b.parentNode)&&1===d.nodeType&&Na(d,c)}}function pa(b){V[A]=b;avalon.openComputedCollect=!0;var c=b.evaluator;if(c)try{var d=Bb.test(b.type)?b:c.apply(0,b.args);b.handler(d,b.element,b)}catch(e){t("warning:exception throwed in [registerSubscriber] "+e),delete b.evaluator,c= +b.element,3===c.nodeType&&(d=c.parentNode,s.commentInterpolate?d.replaceChild(p.createComment(b.value),c):c.data=L+b.value+M)}avalon.openComputedCollect=!1;delete V[A]}function da(b){var c=V[A];b&&(c&&avalon.Array.ensure(b,c)&&c.element)&&Pa(c,b)}function Pa(b,c){b.$uuid=b.$uuid||ba();c.$uuid=c.$uuid||ba();var d={data:b,list:c,toString:function(){return b.$uuid+" "+c.$uuid}};Q[d]||(Q[d]=1,Q.push(d))}function Qa(){for(var b=qa,c=qa+Cb;bb&&delete c[d.shift()];return c[e]=f}var d=[];return c}function db(b,c,d){var e=d.type,f=d.filters?d.filters.join(""):"",g=c.map(function(b){return b.$id.replace(Jb,"$1")})+b+e+f,h=Kb(b).concat(),k=[],l=[],m=[],q="";c=bb(c);for(var n=0,q=c.length;ns.maxRepeatSize&&Z.pop()}b.length=0}function $(){z?(r["ready!"].state=2,z.checkDeps()):kb.forEach(function(b){b(avalon)});$=w}var A=Date.now(),F="$"+A,v=Function("return this")(),Ub=v.require,Vb=v.define,da=!1,x=/[^, ]+/g,Ka=/^(?:object|array)$/,lb=/^\[object SVG\w*Element\]$/,Wb=/^\[object (Window|DOMWindow|global)\]$/,za=Object.prototype,La=za.hasOwnProperty, -Aa=za.toString,M=Array.prototype,ja=M.slice,V={},G=p.head,D=p.documentElement,H=p.createDocumentFragment(),aa=p.createElement("div"),mb={};"Boolean Number String Function Array Date RegExp Object Error".replace(x,function(b){mb["[object "+b+"]"]=b.toLowerCase()});v.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.isFunction=R;avalon.type=function(b){return null==b?String(b):"object"===typeof b||"function"=== -typeof b?mb[Aa.call(b)]||"object":typeof b};avalon.isWindow=function(b){return Wb.test(Aa.call(b))};avalon.isPlainObject=function(b){return!!b&&"object"===typeof b&&Object.getPrototypeOf(b)===za};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&&"function"!==avalon.type(g)&&(g={});h===k&&(g=this,h--);for(;hb&&delete c[d.shift()];return c[e]=f}var d=[];return c}function eb(b,c,d){var e=d.type,f=d.filters?d.filters.join(""):"",g=c.map(function(b){return b.$id.replace(Kb,"$1")})+b+e+f,h=Lb(b).concat(),k=[],l=[],m=[],q="";c=cb(c);for(var n=0,q=c.length;ns.maxRepeatSize&&Z.pop()}b.length=0}function $(){z?(r["ready!"].state=2,z.checkDeps()):lb.forEach(function(b){b(avalon)});$=w}var A=Date.now(),F="$"+A,v=Function("return this")(),Vb=v.require,Wb=v.define,ca=!1,x=/[^, ]+/g,Ka=/^(?:object|array)$/,mb=/^\[object SVG\w*Element\]$/,Xb=/^\[object (Window|DOMWindow|global)\]$/,za=Object.prototype,La=za.hasOwnProperty, +Aa=za.toString,N=Array.prototype,ia=N.slice,V={},G=p.head,D=p.documentElement,H=p.createDocumentFragment(),ka=p.createElement("div"),nb={};"Boolean Number String Function Array Date RegExp Object Error".replace(x,function(b){nb["[object "+b+"]"]=b.toLowerCase()});v.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.isFunction=R;avalon.type=function(b){return null==b?String(b):"object"===typeof b||"function"=== +typeof b?nb[Aa.call(b)]||"object":typeof b};avalon.isWindow=function(b){return Xb.test(Aa.call(b))};avalon.isPlainObject=function(b){return!!b&&"object"===typeof b&&Object.getPrototypeOf(b)===za};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&&"function"!==avalon.type(g)&&(g={});h===k&&(g=this,h--);for(;h';if(!lb.test(nb.firstChild)){var Ba=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());M.forEach.call(f.attributes,function(b){g.setAttribute(b.name,b.value)});Ba(f, +function(b,c){try{for(;c=c.parentNode;)if(c===b)return!0;return!1}catch(d){return!1}};if(v.SVGElement){var ob=p.createElementNS("http://www.w3.org/2000/svg","svg");ob.innerHTML='';if(!mb.test(ob.firstChild)){var Ba=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());N.forEach.call(f.attributes,function(b){g.setAttribute(b.name,b.value)});Ba(f, g);c.appendChild(g)}};Object.defineProperties(SVGElement.prototype,{outerHTML:{enumerable:!0,configurable:!0,get:function(){return(new XMLSerializer).serializeToString(this)},set:function(b){var c=this.tagName.toLowerCase(),d=this.parentNode;b=avalon.parseHTML(b);"svg"===c?d.insertBefore(b,this):(c=p.createDocumentFragment(),Ba(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),Ba(b,this))}}})}}var ka=avalon.vmodels={};avalon.define=function(b,c){var d=b.$id||b;d||t("warning: \u5fc5\u987b\u6307\u5b9a$id");ka[d]&&t("warning: "+d+" \u5df2\u7ecf\u5b58\u5728\u4e8eavalon.vmodels\u4e2d");if("object"===typeof b)var e=J(b);else e={$watch:w},c(e),e=J(e),da=!0,c(e),da=!1;e.$id=d;return ka[d]=e};var Ja="$id,$watch,$unwatch,$fire,$events,$model,$skipArray".match(x), -fa=Object.is||function(b,c){return 0===b&&0===c?1/b===1/c:b!==b?c!==c:b===c},T={},ga=0,oa={},K,L,W,ob,ab,pb=/[-.*+?^${}()|[\]\/\\]/g,z=w,N={loader:function(b){v.define=b?z.define:Vb;v.require=b?z:Ub},interpolate:function(b){K=b[0];L=b[1];K===L?avalon.error("openTag!==closeTag",SyntaxError):"\x3c!--,--\x3e"===b+""?s.commentInterpolate=!0:(b=K+"test"+L,aa.innerHTML=b,aa.innerHTML!==b&&0<=aa.innerHTML.indexOf("<")&&avalon.error("\u6b64\u5b9a\u754c\u7b26\u4e0d\u5408\u6cd5",SyntaxError),aa.innerHTML= -"");b=(K+"").replace(pb,"\\$&");var c=(L+"").replace(pb,"\\$&");W=RegExp(b+"(.*?)"+c);ob=RegExp(b+"(.*?)"+c,"g");ab=RegExp(b+".*?"+c+"|\\sms-")}};s.debug=!0;s.plugins=N;s.plugins.interpolate(["{{","}}"]);s.paths={};s.shim={};s.maxRepeatSize=100;avalon.config=s;"add,remove".replace(x,function(b){avalon.fn[b+"Class"]=function(c){var d=this[0];c&&("string"===typeof c&&d&&1===d.nodeType)&&c.replace(/\S+/g,function(c){d.classList[b](c)});return this}});avalon.fn.mix({hasClass:function(b){var c=this[0]|| -{};return 1===c.nodeType&&c.classList.contains(b)},toggleClass:function(b,c){for(var d,e=0,f=b.split(/\s+/),g="boolean"===typeof c;d=f[e++];)this[(g?c:!this.hasClass(d))?"addClass":"removeClass"](d);return this},attr:function(b,c){return 2===arguments.length?(this[0].setAttribute(b,c),this):this[0].getAttribute(b)},data:function(b,c){b="data-"+Ma(b||"");switch(arguments.length){case 2:return this.attr(b,c),this;case 1:var d=this.attr(b);return ia(d);case 0:var e={};M.forEach.call(this[0].attributes, -function(c){c&&(b=c.name,b.indexOf("data-")||(b=ha(b.slice(5)),e[b]=ia(c.value)))});return e}},removeData:function(b){b="data-"+Ma(b);this[0].removeAttribute(b);return this},css:function(b,c){if(avalon.isPlainObject(b))for(var d in b)avalon.css(this,d,b[d]);else var e=avalon.css(this,b,c);return void 0!==e?e:this},position:function(){var b,c,d=this[0],e={top:0,left:0};if(d)return"fixed"===this.css("position")?c=d.getBoundingClientRect():(b=this.offsetParent(),c=this.offset(),"HTML"!==b[0].tagName&& +this.nodeName+'\\b(?:(["\'])[^"]*?(\\1)|[^>])*>',"i"),"").replace(b,"")},set:function(b){avalon.clearHTML&&(avalon.clearHTML(this),b=avalon.parseHTML(b),Ba(b,this))}}})}}var ja=avalon.vmodels={};avalon.define=function(b,c){var d=b.$id||b;d||t("warning: \u5fc5\u987b\u6307\u5b9a$id");ja[d]&&t("warning: "+d+" \u5df2\u7ecf\u5b58\u5728\u4e8eavalon.vmodels\u4e2d");if("object"===typeof b)var e=K(b);else e={$watch:w},c(e),e=K(e),ca=!0,c(e),ca=!1;e.$id=d;return ja[d]=e};var Ja="$id,$watch,$unwatch,$fire,$events,$model,$skipArray".match(x), +ea=Object.is||function(b,c){return 0===b&&0===c?1/b===1/c:b!==b?c!==c:b===c},T={},fa=0,oa={},L,M,W,pb,bb,qb=/[-.*+?^${}()|[\]\/\\]/g,z=w,O={loader:function(b){v.define=b?z.define:Wb;v.require=b?z:Vb},interpolate:function(b){L=b[0];M=b[1];L===M?avalon.error("openTag!==closeTag",SyntaxError):"\x3c!--,--\x3e"===b+""?s.commentInterpolate=!0:(b=L+"test"+M,ka.innerHTML=b,ka.innerHTML!==b&&0<=ka.innerHTML.indexOf("<")&&avalon.error("\u6b64\u5b9a\u754c\u7b26\u4e0d\u5408\u6cd5",SyntaxError),ka.innerHTML= +"");b=(L+"").replace(qb,"\\$&");var c=(M+"").replace(qb,"\\$&");W=RegExp(b+"(.*?)"+c);pb=RegExp(b+"(.*?)"+c,"g");bb=RegExp(b+".*?"+c+"|\\sms-")}};s.debug=!0;s.plugins=O;s.plugins.interpolate(["{{","}}"]);s.paths={};s.shim={};s.maxRepeatSize=100;avalon.config=s;"add,remove".replace(x,function(b){avalon.fn[b+"Class"]=function(c){var d=this[0];c&&("string"===typeof c&&d&&1===d.nodeType)&&c.replace(/\S+/g,function(c){d.classList[b](c)});return this}});avalon.fn.mix({hasClass:function(b){var c=this[0]|| +{};return 1===c.nodeType&&c.classList.contains(b)},toggleClass:function(b,c){for(var d,e=0,f=b.split(/\s+/),g="boolean"===typeof c;d=f[e++];)this[(g?c:!this.hasClass(d))?"addClass":"removeClass"](d);return this},attr:function(b,c){return 2===arguments.length?(this[0].setAttribute(b,c),this):this[0].getAttribute(b)},data:function(b,c){b="data-"+Ma(b||"");switch(arguments.length){case 2:return this.attr(b,c),this;case 1:var d=this.attr(b);return ha(d);case 0:var e={};N.forEach.call(this[0].attributes, +function(c){c&&(b=c.name,b.indexOf("data-")||(b=ga(b.slice(5)),e[b]=ha(c.value)))});return e}},removeData:function(b){b="data-"+Ma(b);this[0].removeAttribute(b);return this},css:function(b,c){if(avalon.isPlainObject(b))for(var d in b)avalon.css(this,d,b[d]);else var e=avalon.css(this,b,c);return void 0!==e?e:this},position:function(){var b,c,d=this[0],e={top:0,left:0};if(d)return"fixed"===this.css("position")?c=d.getBoundingClientRect():(b=this.offsetParent(),c=this.offset(),"HTML"!==b[0].tagName&& (e=b.offset()),e.top+=avalon.css(b[0],"borderTopWidth",!0),e.left+=avalon.css(b[0],"borderLeftWidth",!0)),{top:c.top-e.top-avalon.css(d,"marginTop",!0),left:c.left-e.left-avalon.css(d,"marginLeft",!0)}},offsetParent:function(){for(var b=this[0].offsetParent||D;b&&"HTML"!==b.tagName&&"static"===avalon.css(b,"position");)b=b.offsetParent;return avalon(b||D)},bind:function(b,c,d){if(this[0])return avalon.bind(this[0],b,c,d)},unbind:function(b,c,d){this[0]&&avalon.unbind(this[0],b,c,d);return this},val:function(b){var c= -this[0];if(c&&1===c.nodeType){var d=0===arguments.length,e=d?":get":":set",f=Xb,g;g=c.tagName.toLowerCase();g="input"===g&&/checkbox|radio/.test(c.type)?"checked":g;if(e=f[g+e])var h=e(c,b);else{if(d)return(c.value||"").replace(/\r/g,"");c.value=b}}return d?h:this}});D.dataset&&(avalon.fn.data=function(b,c){var d=this[0].dataset;switch(arguments.length){case 2:return d[b]=c,this;case 1:return c=d[b],ia(c);case 0:var e={};for(b in d)e[b]=ia(d[b]);return e}});var yb=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;avalon.each({scrollLeft:"pageXOffset", -scrollTop:"pageYOffset"},function(b,c){avalon.fn[b]=function(d){var e=this[0]||{},f=e.window&&e.document?e:9===e.nodeType?e.defaultView:!1,g="scrollTop"===b;if(arguments.length)f?f.scrollTo(!g?d:avalon(f).scrollLeft(),g?d:avalon(f).scrollTop()):e[b]=d;else return f?f[c]:e[b]}});var y=avalon.cssHooks={},qb=["","-webkit-","-moz-","-ms-"],Ca={"float":"cssFloat"};avalon.cssNumber=O("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom");avalon.cssName=function(b,c,d){if(Ca[b])return Ca[b]; -c=c||D.style;for(var e=0,f=qb.length;el&&(e=e-avalon.css(c,"border"+d[0]+"Width", +this[0];if(c&&1===c.nodeType){var d=0===arguments.length,e=d?":get":":set",f=Yb,g;g=c.tagName.toLowerCase();g="input"===g&&/checkbox|radio/.test(c.type)?"checked":g;if(e=f[g+e])var h=e(c,b);else{if(d)return(c.value||"").replace(/\r/g,"");c.value=b}}return d?h:this}});D.dataset&&(avalon.fn.data=function(b,c){var d=this[0].dataset;switch(arguments.length){case 2:return d[b]=c,this;case 1:return c=d[b],ha(c);case 0:var e={};for(b in d)e[b]=ha(d[b]);return e}});var zb=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;avalon.each({scrollLeft:"pageXOffset", +scrollTop:"pageYOffset"},function(b,c){avalon.fn[b]=function(d){var e=this[0]||{},f=e.window&&e.document?e:9===e.nodeType?e.defaultView:!1,g="scrollTop"===b;if(arguments.length)f?f.scrollTo(!g?d:avalon(f).scrollLeft(),g?d:avalon(f).scrollTop()):e[b]=d;else return f?f[c]:e[b]}});var y=avalon.cssHooks={},rb=["","-webkit-","-moz-","-ms-"],Ca={"float":"cssFloat"};avalon.cssNumber=J("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom");avalon.cssName=function(b,c,d){if(Ca[b])return Ca[b]; +c=c||D.style;for(var e=0,f=rb.length;el&&(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};y[c+"&get"]=function(b){var d=[];Na(b,d);for(var e=y[c+":get"](b),f=0,m;m=d[f++];){b=m.node;for(var q in m)"string"===typeof m[q]&&(b.style[q]=m[q])}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 y[c+"&get"](h)}return this.css(c,g)};avalon.fn["inner"+b]=function(){return y[c+":get"](this[0],void 0,-2)};avalon.fn["outer"+b]=function(b){return y[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.documentElement,d=d.defaultView;if(!e.contains(b))return c;void 0!==b.getBoundingClientRect&&(c=b.getBoundingClientRect());return{top:c.top+d.pageYOffset-e.clientTop, -left:c.left+d.pageXOffset-e.clientLeft}};var Xb={"select:get":function(b,c){for(var d,e=b.options,f=b.selectedIndex,g="select-one"===b.type||0>f,h=g?null:[],k=g?f+1:e.length,l=0>f?k:g?f:0;l]*)\/>/ig,$b=O(["","text/javascript","text/ecmascript","application/ecmascript","application/javascript"]),ac=p.createElement("script");avalon.parseHTML=function(b){"string"!==typeof b&&(b+="");b=b.replace(Zb,"<$1>").trim();var c=(Yb.exec(b)||["",""])[1].toLowerCase(),d=B[c]||B._default,c=H.cloneNode(!1),e=aa;e.innerHTML=d[1]+b+(d[2]||"");b=e.getElementsByTagName("script");if(b.length)for(var f=0,g;g= -b[f++];)if($b[g.type]){var h=ac.cloneNode(!1);M.forEach.call(g.attributes,function(b){h.setAttribute(b.name,b.value)});h.text=g.text;g.parentNode.replaceChild(h,g)}for(f=d[0];f--;e=e.lastChild);for(;d=e.firstChild;)c.appendChild(d);return c};avalon.innerHTML=function(b,c){var d=this.parseHTML(c);this.clearHTML(b).appendChild(d)};avalon.clearHTML=function(b){for(b.textContent="";b.firstChild;)b.removeChild(b.firstChild);return b};var P={$watch:function(b,c){if("function"===typeof c){var d=this.$events[b]; -d?d.push(c):this.$events[b]=[c]}else this.$events=this.$watch.backup;return this},$unwatch:function(b,c){var d=arguments.length;if(0===d)this.$watch.backup=this.$events,this.$events={};else if(1===d)this.$events[b]=[];else for(var d=this.$events[b]||[],e=d.length;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=ja.call(arguments,1),f=[b].concat(e);if("all"===c)for(var g in avalon.vmodels)e=avalon.vmodels[g], -e!==this&&e.$fire.apply(e,f);else if("up"===c||"down"===c){if(d=d.expr&&p.querySelector(d.expr)){for(g in avalon.vmodels)if(e=avalon.vmodels[g],e!==this&&e.$events.expr){var h=p.querySelector(e.$events.expr);if(h&&("down"===c?d.contains(h):h.contains(d)))h._avalon=e}g=p.getElementsByTagName("*");var k=[];Array.prototype.forEach.call(g,function(b){b._avalon&&(k.push(b._avalon),b._avalon="",b.removeAttribute("_avalon"))});"up"===c&&k.reverse();for(g=0;(c=k[g++])&&!1!==c.$fire.apply(c,f););}}else{f= -d[b]||[];c=d.$all||[];for(g=0;d=f[g++];)R(d)&&d.apply(this,e);for(g=0;d=c[g++];)R(d)&&d.apply(this,arguments)}}},Ab=/^(duplex|on)$/,Q=[],qa=0,Bb=200,Ra=Date.now(),Sa,Da={};avalon.scanCallback=function(b,c){c=c||"$all";(Da[c]||(Da[c]=[])).push(b)};avalon.scan=function(b,c,d){b=b||D;var e=Da[d||"$all"]||[];c=c?[].concat(c):[];var f=0,g=!1,h,k=!1;c.cb=function(b){f+=b;k=!0;setTimeout(function(){if(0>=f&&!g)for(g=!0;h=e.shift();)h()})};Ta(b,c);if(!k)for(;h=e.shift();)h()};var Eb=O("AREA,BASE,BASEFONT,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,LINK,META,PARAM,SOURCE,TRACK,WBR,NOSCRIPT,NOSCRIPT,SCRIPT,STYLE,TEXTAREA"), -Cb=/ms-(\w+)-?(.*)/,$a={"if":10,repeat:90,data:100,widget:110,each:1400,"with":1500,duplex:2E3,on:3E3},Db=O("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit"),Gb=/\|\s*(\w+)\s*(\([^)]*\))?/g,Fb=/\|\|/g,Hb=/U2hvcnRDaXJjdWl0/g,bc=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,cc=/[^\w$]+/g,dc=RegExp(""+("\\b"+"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".replace(/,/g, -"\\b|\\b")+"\\b"),"g"),ec=/\b\d[^,]*/g,fc=/^,+|,+$/g,Ea=cb(512),Kb=function(b){var c=","+b.trim();if(Ea[c])return Ea[c];b=b.replace(bc,"").replace(cc,",").replace(dc,"").replace(ec,"").replace(fc,"").split(/^$|,+/);return Ea(c,bb(b))},va=cb(128),Lb=/\w\[.*\]|\w\.\w/,Jb=/(\$proxy\$[a-z]+)\d+$/;avalon.parseExprProxy=I;G.insertAdjacentHTML("afterBegin",'');var ra=G.firstChild,ba=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]}},Fa=avalon.templateCache={},Ga={};"autofocus,autoplay,async,checked,controls,declare,disabled,defer,defaultChecked,defaultSelectedcontentEditable,isMap,loop,multiple,noHref,noResize,noShade,open,readOnly,selected".replace(x,function(b){Ga[b.toLowerCase()]=b});var wa=avalon.bindingExecutors={attr:function(b,c,d){var e=d.type,f=d.param;if("css"===e)avalon(c).css(f,b);else if("attr"===e){if(Ga[f]&&(e=Ga[f],"boolean"=== -typeof c[e]))return c[e]=!!b;if(!1===b||null===b||void 0===b)return c.removeAttribute(f);if(v.VBArray&&!lb.test(c))var g=(c.attributes||{})[f],g=g&&!1===g.expando;g?c[f]=b:c.setAttribute(f,b)}else if("include"===e&&b){var h=d.vmodels,k=d.includeRendered,l=d.includeLoaded,m=d.includeReplaced?c.parentNode:c,q=function(b){l&&(b=l.apply(m,[b].concat(h)));k&&avalon.scanCallback(function(){k.call(m)});for(avalon.scan(m);;){var c=d.startInclude.nextSibling;if(c&&c!==d.endInclude)m.removeChild(c);else break}b= -avalon.parseHTML(b);c=avalon.slice(b.childNodes);m.insertBefore(b,d.endInclude);sa(c,h);h.cb(-1)};if("src"===d.param)if(Fa[b])avalon.nextTick(function(){q(Fa[b])});else{var n=new v.XMLHttpRequest;n.onload=function(){var c=n.status;if(200<=c&&300>c||304===c)q(Fa[b]=n.responseText)};n.open("GET",b,!0);n.withCredentials=!0;n.setRequestHeader("X-Requested-With","XMLHttpRequest");n.send(null)}else{var C=b&&1==b.nodeType?b:p.getElementById(b);avalon.nextTick(function(){q(C.value||C.innerText||C.innerHTML)})}}else c[e]= -b,v.chrome&&"EMBED"===c.tagName&&(f=c.parentNode,g=document.createComment("ms-src"),f.replaceChild(g,c),f.replaceChild(c,g))},"class":function(b,c,d){var e=avalon(c),f=d.type;if("class"===f&&d.oldStyle)e.toggleClass(d.oldStyle,!!b);else switch(d.toggleClass=d._evaluator?!!d._evaluator.apply(c,d._args):!0,d.newClass=d.immobileClass||b,d.oldClass&&d.newClass!==d.oldClass&&e.removeClass(d.oldClass),d.oldClass=d.newClass,f){case "class":e.toggleClass(d.newClass,d.toggleClass);break;case "hover":case "active":if(!d.hasBindEvent){b= -"mouseenter";var g="mouseleave";"active"===f&&(c.tabIndex=c.tabIndex||-1,b="mousedown",g="mouseup",e.bind("mouseleave",function(){d.toggleClass&&e.removeClass(d.newClass)}));e.bind(b,function(){d.toggleClass&&e.addClass(d.newClass)});e.bind(g,function(){d.toggleClass&&e.removeClass(d.newClass)});d.hasBindEvent=!0}}},data:function(b,c,d){d="data-"+d.param;b&&"object"===typeof b?c[d]=b:c.setAttribute(d,String(b))},repeat:function(b,c,d){if(b){var e=this.element.parentNode,f=this.proxies,g=H.cloneNode(!1); -if("del"===b||"move"===b)var h=ya(this,c);var k=this.group;switch(b){case "add":for(var l=d,m=this.$repeat.length-1,k=[],h=0,q=l.length;hf,h=g?null:[],k=g?f+1:e.length,l=0>f?k:g?f:0;l]*)\/>/ig,ac=J(["","text/javascript","text/ecmascript","application/ecmascript","application/javascript"]),bc=p.createElement("script");avalon.parseHTML=function(b){"string"!==typeof b&&(b+="");b=b.replace($b,"<$1>").trim();var c=(Zb.exec(b)||["",""])[1].toLowerCase(),c=B[c]||B._default,d=H.cloneNode(!1);c.innerHTML=b;b=c.getElementsByTagName("script");if(b.length)for(var e=0,f;f=b[e++];)if(ac[f.type]){var g= +bc.cloneNode(!1);N.forEach.call(f.attributes,function(b){g.setAttribute(b.name,b.value)});g.text=f.text;f.parentNode.replaceChild(g,f)}for(;b=c.firstChild;)d.appendChild(b);return d};avalon.innerHTML=function(b,c){var d=this.parseHTML(c);this.clearHTML(b).appendChild(d)};avalon.clearHTML=function(b){for(b.textContent="";b.firstChild;)b.removeChild(b.firstChild);return b};var P={$watch:function(b,c){if("function"===typeof c){var d=this.$events[b];d?d.push(c):this.$events[b]=[c]}else this.$events=this.$watch.backup; +return this},$unwatch:function(b,c){var d=arguments.length;if(0===d)this.$watch.backup=this.$events,this.$events={};else if(1===d)this.$events[b]=[];else for(var d=this.$events[b]||[],e=d.length;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=ia.call(arguments,1),f=[b].concat(e);if("all"===c)for(var g in avalon.vmodels)e=avalon.vmodels[g],e!==this&&e.$fire.apply(e,f);else if("up"===c||"down"===c){if(d= +d.expr&&p.querySelector(d.expr)){for(g in avalon.vmodels)if(e=avalon.vmodels[g],e!==this&&e.$events.expr){var h=p.querySelector(e.$events.expr);if(h&&("down"===c?d.contains(h):h.contains(d)))h._avalon=e}g=p.getElementsByTagName("*");var k=[];Array.prototype.forEach.call(g,function(b){b._avalon&&(k.push(b._avalon),b._avalon="",b.removeAttribute("_avalon"))});"up"===c&&k.reverse();for(g=0;(c=k[g++])&&!1!==c.$fire.apply(c,f););}}else{f=d[b]||[];c=d.$all||[];for(g=0;d=f[g++];)R(d)&&d.apply(this,e);for(g= +0;d=c[g++];)R(d)&&d.apply(this,arguments)}}},Bb=/^(duplex|on)$/,Q=[],qa=0,Cb=200,Ra=Date.now(),Sa,Da={};avalon.scanCallback=function(b,c){c=c||"$all";(Da[c]||(Da[c]=[])).push(b)};avalon.scan=function(b,c,d){b=b||D;var e=Da[d||"$all"]||[];c=c?[].concat(c):[];var f=0,g=!1,h,k=!1;c.cb=function(b){f+=b;k=!0;setTimeout(function(){if(0>=f&&!g)for(g=!0;h=e.shift();)h()})};Ta(b,c);if(!k)for(;h=e.shift();)h()};var Fb=J("AREA,BASE,BASEFONT,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,LINK,META,PARAM,SOURCE,TRACK,WBR,NOSCRIPT,NOSCRIPT,SCRIPT,STYLE,TEXTAREA"), +Db=/ms-(\w+)-?(.*)/,ab={"if":10,repeat:90,data:100,widget:110,each:1400,"with":1500,duplex:2E3,on:3E3},Eb=J("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit"),$a=J("value,title,alt,checked,selected,disabled,readonly,enabled"),Hb=/\|\s*(\w+)\s*(\([^)]*\))?/g,Gb=/\|\|/g,Ib=/U2hvcnRDaXJjdWl0/g,cc=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g, +dc=/[^\w$]+/g,ec=RegExp(""+("\\b"+"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".replace(/,/g,"\\b|\\b")+"\\b"),"g"),fc=/\b\d[^,]*/g, +gc=/^,+|,+$/g,Ea=db(512),Lb=function(b){var c=","+b.trim();if(Ea[c])return Ea[c];b=b.replace(cc,"").replace(dc,",").replace(ec,"").replace(fc,"").replace(gc,"").split(/^$|,+/);return Ea(c,cb(b))},va=db(128),Mb=/\w\[.*\]|\w\.\w/,Kb=/(\$proxy\$[a-z]+)\d+$/;avalon.parseExprProxy=I;G.insertAdjacentHTML("afterBegin",'');var ra=G.firstChild,aa=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]}},Fa=avalon.templateCache={},Ga={};"autofocus,autoplay,async,checked,controls,declare,disabled,defer,defaultChecked,defaultSelectedcontentEditable,isMap,loop,multiple,noHref,noResize,noShade,open,readOnly,selected".replace(x,function(b){Ga[b.toLowerCase()]=b});var wa=avalon.bindingExecutors={attr:function(b,c,d){var e=d.type,f=d.param;if("css"===e)avalon(c).css(f,b);else if("attr"===e){if(Ga[f]&&(e=Ga[f],"boolean"===typeof c[e]))return c[e]=!!b;if(!1===b||null=== +b||void 0===b)return c.removeAttribute(f);if(v.VBArray&&!mb.test(c))var g=(c.attributes||{})[f],g=g&&!1===g.expando;g||$a[f]?c[f]=b:c.setAttribute(f,b)}else if("include"===e&&b){var h=d.vmodels,k=d.includeRendered,l=d.includeLoaded,m=d.includeReplaced?c.parentNode:c,q=function(b){l&&(b=l.apply(m,[b].concat(h)));k&&avalon.scanCallback(function(){k.call(m)});for(avalon.scan(m);;){var c=d.startInclude.nextSibling;if(c&&c!==d.endInclude)m.removeChild(c);else break}b=avalon.parseHTML(b);c=avalon.slice(b.childNodes); +m.insertBefore(b,d.endInclude);sa(c,h);h.cb(-1)};if("src"===d.param)if(Fa[b])avalon.nextTick(function(){q(Fa[b])});else{var n=new v.XMLHttpRequest;n.onload=function(){var c=n.status;if(200<=c&&300>c||304===c)q(Fa[b]=n.responseText)};n.open("GET",b,!0);n.withCredentials=!0;n.setRequestHeader("X-Requested-With","XMLHttpRequest");n.send(null)}else{var C=b&&1==b.nodeType?b:p.getElementById(b);avalon.nextTick(function(){q(C.value||C.innerText||C.innerHTML)})}}else c[e]=b,v.chrome&&"EMBED"===c.tagName&& +(f=c.parentNode,g=document.createComment("ms-src"),f.replaceChild(g,c),f.replaceChild(c,g))},"class":function(b,c,d){var e=avalon(c),f=d.type;if("class"===f&&d.oldStyle)e.toggleClass(d.oldStyle,!!b);else switch(d.toggleClass=d._evaluator?!!d._evaluator.apply(c,d._args):!0,d.newClass=d.immobileClass||b,d.oldClass&&d.newClass!==d.oldClass&&e.removeClass(d.oldClass),d.oldClass=d.newClass,f){case "class":e.toggleClass(d.newClass,d.toggleClass);break;case "hover":case "active":if(!d.hasBindEvent){b="mouseenter"; +var g="mouseleave";"active"===f&&(c.tabIndex=c.tabIndex||-1,b="mousedown",g="mouseup",e.bind("mouseleave",function(){d.toggleClass&&e.removeClass(d.newClass)}));e.bind(b,function(){d.toggleClass&&e.addClass(d.newClass)});e.bind(g,function(){d.toggleClass&&e.removeClass(d.newClass)});d.hasBindEvent=!0}}},data:function(b,c,d){d="data-"+d.param;b&&"object"===typeof b?c[d]=b:c.setAttribute(d,String(b))},repeat:function(b,c,d){if(b){var e=this.element.parentNode,f=this.proxies,g=H.cloneNode(!1);if("del"=== +b||"move"===b)var h=ya(this,c);var k=this.group;switch(b){case "add":for(var l=d,m=this.$repeat.length-1,k=[],h=0,q=l.length;h\u4e0a\u8981\u6c42\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"):b.multiple&&t("ms-duplex\u5728\u4e0a\u8981\u6c42\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"):b.multiple&&t("ms-duplex\u5728{{v}}

First name:

Last name: {{lastName | html}}

Hello,