avalon-rails 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/lib/avalon-rails/version.rb +1 -1
- data/vendor/assets/javascripts/avalon.min.js +135 -0
- data/vendor/assets/javascripts/avalon.mobile.min.js +123 -0
- data/vendor/assets/javascripts/avalon.modern.min.js +116 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de3b168a3fa372d6305429260db7c8d9d870190f
|
4
|
+
data.tar.gz: 768bab5b71288605d8032bfe3824030364da3b9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10558e3f0b0a59fab57b089faa1cd8f9caf66400ee70e95804e0e5f49f1043bf469fcf9bb70c1524facf28e8bc6740e426c46cdc617afdc3f9db4d0a016a5b49
|
7
|
+
data.tar.gz: c46ea8cae740b5184d1d93b0f987c34f586d6926ecef4b7dff697eb4113880ed3b5483f75bbbc6b5e7b2d63e000a61567564d5a0e2ada2855f026b05de4088df
|
data/README.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
Rails 3.1 asset-pipeline gem to provide avalon.js
|
2
2
|
|
3
|
+
avalon js: https://github.com/RubyLouvre/avalon
|
4
|
+
|
5
|
+
# v 0.0.3
|
6
|
+
|
7
|
+
添加*.min.js
|
8
|
+
|
3
9
|
# Setup
|
4
10
|
|
5
11
|
Have in your Gemfile:
|
@@ -14,4 +20,10 @@ And, have in your application.js manifest:
|
|
14
20
|
|
15
21
|
//= require avalon.modern //只支持IE10等支持HTML5现代浏览器
|
16
22
|
|
23
|
+
//= require avalon.min
|
24
|
+
|
25
|
+
//= require avalon.mobile.min
|
26
|
+
|
27
|
+
//= require avalon.modern.min
|
28
|
+
|
17
29
|
Easy as pie.
|
data/lib/avalon-rails/version.rb
CHANGED
@@ -0,0 +1,135 @@
|
|
1
|
+
(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;f<g;f++)d[b[f]]=e;return d}
|
2
|
+
function qa(b){function c(e,f){d.push(e)>b&&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)}
|
3
|
+
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=
|
4
|
+
!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!==
|
5
|
+
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;
|
6
|
+
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&&
|
7
|
+
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=
|
8
|
+
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=
|
9
|
+
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,
|
10
|
+
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<f;e++){d[e]=b[e];var g=c[e];g in d?(b[e]=d[g],delete d[g]):b[e]=b[g]}}function za(b){ba[C]=b;avalon.openComputedCollect=!0;var c=b.evaluator;if(c)try{var d=fc.test(b.type)?
|
11
|
+
b:c.apply(0,b.args);b.handler(d,b.element,b)}catch(e){delete b.evaluator,c=b.element,3===c.nodeType&&(d=c.parentNode,t.commentInterpolate?d.replaceChild(p.createComment(b.value),c):c.data=O+b.value+P)}avalon.openComputedCollect=!1;delete ba[C]}function dc(b){var c=ba[C];b&&(c&&avalon.Array.ensure(b,c)&&c.element)&&Aa(c,b)}function Aa(b,c){b.$uuid=b.$uuid||N();c.$uuid=c.$uuid||N();var d={data:b,list:c,$$uuid:b.$uuid+c.$uuid};Q[d.$$uuid]||(Q[d.$$uuid]=1,Q.push(d))}function cb(b){b.element=null;b.rollback&&
|
12
|
+
b.rollback();for(var c in b)b[c]=null}function gc(b){try{if(!b.parentNode)return!0}catch(c){return!0}return b.msRetain?0:1===b.nodeType?"number"===typeof b.sourceIndex?0===b.sourceIndex:!B.contains(b):!avalon.contains(B,b)}function db(){for(var b=Q.length,c=b,d=0,e,f=[],g={},h={};e=Q[--b];){var k=e.data;e=k.type;g[e]?g[e]++:(g[e]=1,f.push(e))}var l=!1;f.forEach(function(b){eb[b]!==g[b]&&(h[b]=1,l=!0)});b=c;if(l)for(;e=Q[--b];)k=e.data,void 0!==k.element&&(h[k.type]&&gc(k.element))&&(d++,Q.splice(b,
|
13
|
+
1),delete Q[e.$$uuid],avalon.Array.remove(e.list,k),cb(k),e.data=e.list=null);eb=g;fb=new Date}function ka(b){if(b&&b.length){444<new Date-fb&&"object"===typeof b[0]&&db();for(var c=la.call(arguments,1),d=b.length,e;e=b[--d];){var f=e.element;f&&f.parentNode&&(e.$repeat?e.handler.apply(e,c):"on"!==e.type&&e.handler((e.evaluator||A).apply(0,e.args||[]),f,e))}}}function gb(b){var c=b.nodeName;return c.toLowerCase()===c&&b.scopeName&&""===b.outerText}function hc(b){"url(#default#VML)"!==b.currentStyle.behavior&&
|
14
|
+
(b.style.behavior="url(#default#VML)",b.style.display="inline-block",b.style.zoom=1)}function ma(b,c,d){var e=setTimeout(function(){var f=b.innerHTML;clearTimeout(e);f===d?c():ma(b,c,f)})}function hb(b,c){var d=b.getAttribute("avalonctrl")||c.$id;b.setAttribute("avalonctrl",d);c.$events.expr=b.tagName+'[avalonctrl="'+d+'"]'}function Ba(b,c){for(var d=0,e;e=b[d++];)e.vmodels=c,v[e.type](e,c),e.evaluator&&(e.element&&1===e.element.nodeType)&&e.element.removeAttribute(e.name);b.length=0}function ic(b,
|
15
|
+
c){return b.priority-c.priority}function ib(b,c,d){var e=b.getAttribute("ms-skip");if(!b.getAttributeNode)return y("warning "+b.tagName+" no getAttributeNode method");var f=b.getAttributeNode("ms-important");d=b.getAttributeNode("ms-controller");if("string"!==typeof e){if(d=f||d){e=avalon.vmodels[d.value];if(!e)return;c=d===f?[e]:[e].concat(c);f=d.name;b.removeAttribute(f);avalon(b).removeClass(f);hb(b,e)}jb(b,c)}}function jc(b,c){for(var d=b.firstChild;d;){var e=d.nextSibling;kb(d,d.nodeType,c);
|
16
|
+
d=e}}function na(b,c){for(var d=0,e;e=b[d++];)kb(e,e.nodeType,c)}function kb(b,c,d){1===c?ib(b,d):3===c&&ca.test(b.data)?lb(b,d):t.commentInterpolate&&(8===c&&!ca.test(b.nodeValue))&&lb(b,d)}function jb(b,c){for(var d=mb?mb(b):avalon.slice(b.attributes),e=[],f={},g,h=0,k;k=d[h++];)if(k.specified&&(g=k.name.match(nb))){var l=g[1],m=g[2]||"",n=k.value;k=k.name;f[k]=n;kc[l]?(m=l,l="on"):lc[l]&&(y("ms-"+l+"\u5df2\u7ecf\u88ab\u5e9f\u5f03,\u8bf7\u4f7f\u7528ms-attr-*\u4ee3\u66ff"),"enabled"===l&&(l="disabled",
|
17
|
+
n="!("+n+")"),m=l,l="attr",b.removeAttribute(k),k="ms-attr-"+m,b.setAttribute(k,n),g=[k],f[k]=n);if("function"===typeof v[l]){var r={type:l,param:m,element:b,name:g[0],value:n,priority:l in ob?ob[l]:10*l.charCodeAt(0)+(Number(m)||0)};if("html"===l||"text"===l)m=Ca(n),avalon.mix(r,m),r.filters=r.filters.replace(pb,function(){r.type="html";r.group=1;return""});"ms-if-loop"===k&&(r.priority+=100);c.length&&(e.push(r),"widget"===l&&(b.msData=b.msData||f))}}e.sort(ic);f["ms-attr-checked"]&&f["ms-duplex"]&&
|
18
|
+
y("warning!\u4e00\u4e2a\u5143\u7d20\u4e0a\u4e0d\u80fd\u540c\u65f6\u5b9a\u4e49ms-attr-checked\u4e0ems-duplex");d=!0;for(h=0;r=e[h];h++){l=r.type;if(mc.test(l))return Ba(e.slice(0,h+1),c);d&&(d=!nc.test(l))}Ba(e,c);d&&(!oc[b.tagName]&&qb.test(b.innerHTML.replace(pc,"<").replace(qc,">")))&&(rb&&rb(b),jc(b,c))}function Ca(b){if(0<b.indexOf("|")){var c=b.replace(rc,"\u1122\u3344").indexOf("|");if(-1<c)return{filters:b.slice(c),value:b.slice(0,c),expr:!0}}return{value:b,filters:"",expr:!0}}function Da(b){var c=
|
19
|
+
[],d;d=0;var e;do{e=b.indexOf(O,d);if(-1===e)break;(d=b.slice(d,e))&&c.push({value:d,filters:"",expr:!1});d=e+O.length;e=b.indexOf(P,d);if(-1===e)break;(d=b.slice(d,e))&&c.push(Ca(d));d=e+P.length}while(1);(d=b.slice(d))&&c.push({value:d,expr:!1,filters:""});return c}function lb(b,c){var d=[];if(8===b.nodeType)var e=Ca(b.nodeValue),f=[e];else f=Da(b.data);if(f.length){for(var g=0;e=f[g++];){var h=p.createTextNode(e.value);e.expr&&(e.type="text",e.element=h,e.filters=e.filters.replace(pb,function(){e.type=
|
20
|
+
"html";e.group=1;return""}),d.push(e));W.appendChild(h)}b.parentNode.replaceChild(W,b);d.length&&Ba(d,c)}}function sb(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 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:
|
21
|
+
"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=
|
22
|
+
0;e<b.length;e++){var f=b[e],g=f&&"string"===typeof f.$id?f.$id:f;d[g]||(d[g]=c.push(f))}return c}function vc(b,c){c=c.replace(wc,"").replace(xc,function(){return"],|"}).replace(yc,function(b,c){return"["+zb(c)}).replace(zc,function(){return'"],["'}).replace(Ac,function(){return'",'})+"]";return"return avalon.filters.$filter("+b+", "+c+")"}function Ab(b,c,d){var e=d.type,f=d.filters||"",g=c.map(function(b){return String(b.$id).replace(Bc,"$1")})+b+e+f,h=Cc(b).concat(),k=[],l=[],m=[],n="";c=yb(c);
|
23
|
+
d.vars=[];for(var n=0,r=c.length;n<r;n++)if(h.length){var s="vm"+C+"_"+n;l.push(s);m.push(c[n]);k.push.apply(k,uc(h,c[n],s,d))}if(k.length||"duplex"!==e)if("duplex"!==e&&(-1<b.indexOf("||")||-1<b.indexOf("&&"))&&d.vars.forEach(function(c){b=b.replace(RegExp("\\b"+c+"(?:\\.\\w+|\\[\\w+\\])+","ig"),function(d,e){var f=d.charAt(c.length),g=R?b.slice(e+d.length):RegExp.rightContext,g=/^\s*\(/.test(g);if("."===f||"["===f||g){f="var"+String(Math.random()).replace(/^0\./,"");if(g){g=d.split(".");if(2<g.length){var h=
|
24
|
+
g.pop();k.push(f+" = "+g.join("."));return f+"."+h}return d}k.push(f+" = "+d);return f}return d})}),d.args=m,c=Ea[g])d.evaluator=c;else{(n=k.join(", "))&&(n="var "+n);if(/\S/.test(f)){if(!/text|html/.test(d.type))throw Error("ms-"+d.type+"\u4e0d\u652f\u6301\u8fc7\u6ee4\u5668");b="\nvar ret"+C+" = "+b+";\r\n";b+=vc("ret"+C,f)}else{if("duplex"===e){e="'use strict';\nreturn function(vvv){\n\t"+n+";\n\tif(!arguments.length){\n\t\treturn "+b+"\n\t}\n\t"+(!Dc.test(b)?h.get:b)+"= vvv;\n} ";try{c=Function.apply(A,
|
25
|
+
l.concat(e)),d.evaluator=Ea(g,c)}catch(aa){y("debug: parse error,"+aa.message)}return}"on"===e?(b=-1===b.indexOf("(")?b+".call(this, $event)":b.replace("(",".call(this,"),l.push("$event"),b="\nreturn "+b+";",f=b.lastIndexOf("\nreturn"),e=b.slice(0,f),f=b.slice(f),b=e+"\n"+f):b="\nreturn "+b+";"}try{c=Function.apply(A,l.concat("'use strict';\n"+n+b)),d.evaluator=Ea(g,c)}catch(cc){y("debug: parse error,"+cc.message)}finally{h=textBuffer=l=null}}}function I(b,c,d,e,f){Array.isArray(e)&&(b=e.map(function(b){return b.expr?
|
26
|
+
"("+b.value+")":zb(b.value)}).join(" + "));Ab(b,c,d);d.evaluator&&!f&&(d.handler=E[d.handlerName||d.type],za(d))}function da(b,c){var d="_"+b;if(!da[d]){var e=p.createElement(b);B.appendChild(e);c=z?getComputedStyle(e,null).display:e.currentStyle.display;B.removeChild(e);da[d]=c}return da[d]}function Fa(b){return null==b?"":b}function Ec(b,c,d,e){c.param.replace(/\w+/g,function(e){(e=avalon.duplexHooks[e])&&"function"===typeof e[d]&&(b=e[d](b,c))});return b}function Fc(){for(var b=ea.length-1;0<=
|
27
|
+
b;b--)!1===(0,ea[b])()&&ea.splice(b,1);ea.length||clearInterval(Bb)}function Cb(b,c,d,e){var f=b.template.cloneNode(!0),g=avalon.slice(f.childNodes);d.$stamp&&f.insertBefore(d.$stamp,f.firstChild);c.appendChild(f);b=[d].concat(b.vmodels);e.push({nodes:g,vmodels:b})}function Db(b,c){var d=b.proxies[c];return d?d.$stamp:b.element}function Ga(b,c,d){for(;;){var e=c.previousSibling;if(!e)break;e.parentNode.removeChild(e);d&&d.call(e);if(e===b)break}}function Gc(b){var c={$host:[],$outer:{},$stamp:1,$index:0,
|
28
|
+
$first:!1,$last:!1,$remove:avalon.noop};c[b]={get:function(){return this.$host[this.$index]},set:function(b){this.$host.set(this.$index,b)}};var c=K(c,{$last:1,$first:1,$index:1}),d=c.$events;d[b]=d.$first=d.$last=d.$index;c.$id=N("$proxy$each");return c}function Hc(b,c){for(var d=c.param||"el",e,f=0,g=pa.length;f<g;f++){var h=pa[f];h&&h.hasOwnProperty(d)&&(e=h,pa.splice(f,1))}e||(e=Gc(d));var k=c.$repeat,d=k.length-1;e.$index=b;e.$first=0===b;e.$last=b===d;e.$host=k;e.$outer=c.$outer;e.$stamp=c.clone.cloneNode(!1);
|
29
|
+
e.$remove=function(){return k.removeAt(e.$index)};return e}function Ic(){var b=K({$key:"",$outer:{},$host:{},$val:{get:function(){return this.$host[this.$key]},set:function(b){this.$host[this.$key]=b}}},{$val:1});b.$id=N("$proxy$with");return b}function Jc(b,c){var d=Eb.pop();d||(d=Ic());var e=c.$repeat;d.$key=b;d.$host=e;d.$outer=c.$outer;e.$events?d.$events.$val=e.$events[b]:d.$events={};return d}function wa(b,c){var d="each"===c?pa:Eb;avalon.each(b,function(b,c){if(c.$events){for(var g in c.$events)Array.isArray(c.$events[g])&&
|
30
|
+
(c.$events[g].forEach(function(b){"object"===typeof b&&cb(b)}),c.$events[g].length=0);c.$host=c.$outer={};d.unshift(c)>t.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<f[0].length&&(f[0]=f[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,
|
31
|
+
e));if((f[1]||"").length<c)f[1]=f[1]||"",f[1]+=Array(c-f[1].length+1).join("0");return f.join(d)}function U(){p.body&&(F?(u["ready!"].state=2,F.checkDeps()):Gb.forEach(function(b){b(avalon)}),U=A)}function Hb(){try{B.doScroll("left"),U()}catch(b){setTimeout(Hb)}}var C=new Date-0,p=q.document,G=p.getElementsByTagName("head")[0],fa=G.insertBefore(document.createElement("avalon"),G.firstChild);fa.innerHTML="X<style id='avalonStyle'>.avalonHide{ display: none!important }</style>";fa.setAttribute("ms-skip",
|
32
|
+
"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=
|
33
|
+
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+
|
34
|
+
"")}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,
|
35
|
+
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<k;h++)if(null!=(b=arguments[h]))for(c in b){d=g[c];try{e=b[c]}catch(m){continue}g!==e&&(l&&e&&(avalon.isPlainObject(e)||
|
36
|
+
(f=Array.isArray(e)))?(f?(f=!1,d=d&&Array.isArray(d)?d:[]):d=d&&avalon.isPlainObject(d)?d:{},g[c]=avalon.mix(l,d,e)):void 0!==e&&(g[c]=e))}return g};avalon.mix({rword:w,subscribers:L,version:1.391,ui:{},log:y,slice:z?function(b,c,d){return la.call(b,c,d)}:function(b,c,d){var e=[],f=b.length;void 0===d&&(d=f);if("number"===typeof d&&isFinite(d)){c=Xa(c,f);d=Xa(d,f);for(f=c;f<d;++f)e[f-c]=b[f]}return e},noop:A,error:function(b,c){throw new (c||Error)(b);},oneObject:S,range:function(b,c,d){d||(d=1);
|
37
|
+
null==c&&(c=b||0,b=0);var e=-1;c=Math.max(0,Math.ceil((c-b)/d));for(var f=Array(c);++e<c;)f[e]=b,b+=d;return f},eventHooks:{},bind:function(b,c,d,e){var f=avalon.eventHooks[c];"object"===typeof f&&(c=f.type,f.deel&&(d=f.deel(b,d)));f=z?d:function(c){d.call(b,Xb(c))};z?b.addEventListener(c,f,!!e):b.attachEvent("on"+c,f);return f},unbind:function(b,c,d,e){var f=avalon.eventHooks[c];d=d||A;"object"===typeof f&&(c=f.type);z?b.removeEventListener(c,d,!!e):b.detachEvent("on"+c,d)},css:function(b,c,d){b instanceof
|
38
|
+
avalon&&(b=b[0]);var e=/[_-]/.test(c)?oa(c):c;c=avalon.cssName(e)||e;if(void 0===d||"boolean"===typeof d)return e=x[e+":get"]||x["@:get"],"background"===c&&(c="backgroundColor"),b=e(b,c),!0===d?parseFloat(b)||0:b;""===d?b.style[c]="":null==d||d!==d||(isFinite(d)&&!avalon.cssNumber[e]&&(d+="px"),e=x[e+":set"]||x["@:set"],e(b,c,d))},each:function(b,c){if(b){var d=0,e;a:{if(b&&"object"===typeof b){var f=b.length;if(f===f>>>0)try{e=!1==={}.propertyIsEnumerable.call(b,"length")?Array.isArray(b)||/^\s?function/.test(b.item||
|
39
|
+
b.callee):!0;break a}catch(g){e=!0;break a}}e=!1}if(e)for(e=b.length;d<e&&!1!==c(d,b[d]);d++);else for(d in b)if(b.hasOwnProperty(d)&&!1===c(d,b[d]))break}},getWidgetData:function(b,c){var d=avalon(b).data(),e={},f;for(f in d)0===f.indexOf(c)&&(e[f.replace(c,"").replace(/\w/,function(b){return b.toLowerCase()})]=d[f]);return e},Array:{ensure:function(b,c){if(-1===b.indexOf(c))return b.push(c)},removeAt:function(b,c){return!!b.splice(c,1).length},remove:function(b,c){var d=b.indexOf(c);return~d?avalon.Array.removeAt(b,
|
40
|
+
d):!1}}});var v=avalon.bindingHandlers={},E=avalon.bindingExecutors={};avalon.nextTick=q.setImmediate?setImmediate.bind(q):function(b){setTimeout(b,0)};if(!"\u53f8\u5f92\u6b63\u7f8e".trim){var Oc=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(Oc,"")}}var Pc=!{toString:null}.propertyIsEnumerable("toString"),Qc=function(){}.propertyIsEnumerable("prototype"),Kb="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),
|
41
|
+
Rc=Kb.length;Object.keys||(Object.keys=function(b){var c=[],d=Qc&&"function"===typeof b;if("string"===typeof b||b&&b.callee)for(d=0;d<b.length;++d)c.push(String(d));else for(var e in b)!(d&&"prototype"===e)&&M.call(b,e)&&c.push(String(e));if(Pc){d=(d=b.constructor)&&d.prototype===b;for(e=0;e<Rc;e++){var f=Kb[e];!(d&&"constructor"===f)&&M.call(b,f)&&c.push(f)}}return c});Array.isArray||(Array.isArray=function(b){return"[object Array]"===Z.call(b)});A.bind||(Function.prototype.bind=function(b){if(2>
|
42
|
+
arguments.length&&void 0===b)return this;var c=this,d=arguments;return function(){var e=[],f;for(f=1;f<d.length;f++)e.push(d[f]);for(f=0;f<arguments.length;f++)e.push(arguments[f]);return c.apply(b,e)}});Ib.test([].map)||avalon.mix(J,{indexOf:function(b,c){var d=this.length,e=~~c;for(0>e&&(e+=d);e<d;e++)if(this[e]===b)return e;return-1},lastIndexOf:function(b,c){var d=this.length,e=null==c?d-1:c;for(0>e&&(e=Math.max(0,d+e));0<=e;e--)if(this[e]===b)return e;return-1},forEach:$("","_",""),filter:$("r=[],j=0,",
|
43
|
+
"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='<circle cx="50" cy="50" r="40" fill="red" />';if(!Ha.test(Lb.firstChild)){var Ja=
|
44
|
+
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(),
|
45
|
+
Ja(b,c),d.insertBefore(c,this));d.removeChild(this)}},innerHTML:{enumerable:!0,configurable:!0,get:function(){var b=RegExp("</"+this.nodeName+">$","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;
|
46
|
+
"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,
|
47
|
+
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<d[Sc]?-120:120;d.wheelDeltaX=0;Object.defineProperty&&Object.defineProperty(d,"type",{value:"mousewheel"});c.call(b,d)}}}}var O,P,ca,Nb,qb,Ob=/[-.*+?^${}()|[\]\/\\]/g,F=A,ia={loader:function(b){q.define=b?F.define:
|
48
|
+
Lc;q.require=b?F:Kc},interpolate:function(b){O=b[0];P=b[1];if(O===P)throw new SyntaxError("openTag!==closeTag");if("\x3c!--,--\x3e"===b+"")t.commentInterpolate=!0;else{b=O+"test"+P;ga.innerHTML=b;if(ga.innerHTML!==b&&-1<ga.innerHTML.indexOf("<"))throw new SyntaxError("\u6b64\u5b9a\u754c\u7b26\u4e0d\u5408\u6cd5");ga.innerHTML=""}b=(O+"").replace(Ob,"\\$&");var c=(P+"").replace(Ob,"\\$&");ca=RegExp(b+"(.*?)"+c);Nb=RegExp(b+"(.*?)"+c,"g");qb=RegExp(b+".*?"+c+"|\\sms-")}};t.debug=!0;t.plugins=ia;t.plugins.interpolate(["{{",
|
49
|
+
"}}"]);t.paths={};t.shim={};t.maxRepeatSize=100;avalon.config=t;var D={$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)&&
|
50
|
+
(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})}));
|
51
|
+
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]),
|
52
|
+
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=
|
53
|
+
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',
|
54
|
+
"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]");
|
55
|
+
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");
|
56
|
+
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=
|
57
|
+
0;b<c;b++);return this.pushArray(arguments)},unshift:function(){var b=arguments.length,c=this.length;b&&(J.unshift.apply(this.$model,arguments),V.call(this,"add",0,b,0));return b+c},shift:function(){if(this.length){var b=this.$model.shift();V.call(this,"del",0,1,0);return b}},pop:function(){var b=this.length;if(b){var c=this.$model.pop();V.call(this,"del",b-1,1,Math.max(0,b-2));return c}},splice:function(b){var c=arguments.length,d=[],e,f=xa.apply(this.$model,arguments);f.length&&(d.push("del",b,
|
58
|
+
f.length,0),e=!0);2<c&&(e?d.splice(3,1,0,"add",b,c-2):d.push("add",b,c-2,0),e=!0);return e?V.apply(this,d):[]},contains:function(b){return-1!==this.indexOf(b)},remove:function(b){return this.removeAt(this.indexOf(b))},removeAt:function(b){return 0<=b?(this.$model.splice(b,1),V.call(this,"del",b,1,0)):[]},clear:function(){this.$model.length=this.length=this._.length=0;this._fire("clear",0);return this},removeAll:function(b){if(Array.isArray(b))b.forEach(function(b){this.remove(b)},this);else if("function"===
|
59
|
+
typeof b)for(var c=this.length-1;0<=c;c--)b(this[c],c)&&this.removeAt(c);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(w,function(b){bb[b]=function(){var c=this.$model,d=c.concat(),
|
60
|
+
e=Math.random(),f=[],g;J[b].apply(c,arguments);for(var h=0,k=d.length;h<k;h++){var l=c[h];$a(l,d[h])?f.push(h):(g=d.indexOf(l),f.push(g),d[g]=e,g=!0)}g&&(ya(this,f),this._fire("move",f),this._fire("index",0));return this}});var fc=/^(duplex|on)$/,Q=avalon.$$subscribers=[],fb=new Date,eb={},H={area:[1,"<map>"],param:[1,"<object>"],col:[2,"<table><tbody></tbody><colgroup>","</table>"],legend:[1,"<fieldset>"],option:[1,"<select multiple='multiple'>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>",
|
61
|
+
"</tbody></table>"],th:[3,"<table><tbody><tr>","</tr></tbody></table>"],td:[3,"<table><tbody><tr>"],g:[1,'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">',"</svg>"],_default:z?[0,""]:[1,"X<div>"]};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 Vc=/<([\w:]+)/,Wc=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
|
62
|
+
Rb=z?/[^\d\D]/:/(<(?:script|link|style|meta|noscript))/ig,Xc=S(["","text/javascript","text/ecmascript","application/ecmascript","application/javascript"]),Yc=/<(?:tb|td|tf|th|tr|col|opt|leg|cap|area)/,Zc=p.createElement("script");avalon.parseHTML=function(b){if("string"!==typeof b)return p.createDocumentFragment();b=b.replace(Wc,"<$1></$2>").trim();var c=(Vc.exec(b)||["",""])[1].toLowerCase(),d=H[c]||H._default,c=W.cloneNode(!1),e=ga,f;z||(b=b.replace(Rb,"<br class=msNoScope>$1"));e.innerHTML=d[1]+
|
63
|
+
b+(d[2]||"");b=e.getElementsByTagName("script");if(b.length)for(var g=0,h;h=b[g++];)Xc[h.type]&&(f=Zc.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)&&hc(h)}for(;d=e.firstChild;)c.appendChild(d);return c};
|
64
|
+
avalon.innerHTML=function(b,c){if(!z&&!Rb.test(c)&&!Yc.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 oc=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=
|
65
|
+
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},kc=S("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit"),
|
66
|
+
lc=S("value,title,alt,checked,selected,disabled,readonly,enabled"),mc=/^if|widget|repeat$/,nc=/^each|with|html|include$/;if(!"1"[0])var La=qa(512),$c=/\s+(ms-[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,ad=/^['"]/,bd=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/i,cd=/&/g,mb=function(b){b=b.outerHTML;if("</"===b.slice(0,2)||!b.trim())return[];b=b.match(bd)[0];var c=[],d,e;if(La[b])return La[b];for(;d=$c.exec(b);)(e=d[2])&&(e=(ad.test(e)?e.slice(1,-1):e).replace(cd,"&")),d=d[1].toLowerCase(),d.match(nb),c.push({name:d,
|
67
|
+
specified:!0,value:e||""});return La(b,c)};var pb=/\|\s*html\s*/,rc=/\|\|/g,pc=/</g,qc=/>/g,ub={_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+" "," "))},__set:function(b){b=b.trim();var c=this.node;Ha.test(c)?c.setAttribute("class",b):c.className=
|
68
|
+
b}};"add,remove".replace(w,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){tb(d)[b](c)});return this}});avalon.fn.mix({hasClass:function(b){var c=this[0]||{};return 1===c.nodeType&&tb(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,
|
69
|
+
c),this):this[0].getAttribute(b)},data:function(b,c){b="data-"+sb(b||"");switch(arguments.length){case 2:return this.attr(b,c),this;case 1:var d=this.attr(b);return vb(d);case 0:var e={};J.forEach.call(this[0].attributes,function(c){c&&(b=c.name,b.indexOf("data-")||(b=oa(b.slice(5)),e[b]=vb(c.value)))});return e}},removeData:function(b){b="data-"+sb(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,
|
70
|
+
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&&"static"===avalon.css(b,
|
71
|
+
"position");)b=b.offsetParent;return avalon(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=Ma,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 sc=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
|
72
|
+
dd=/^[\],:{}\s]*$/,ed=/(?:^|:|,)(?:\s*\[)+/g,fd=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,gd=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;avalon.parseJSON=q.JSON?JSON.parse:function(b){if("string"===typeof b){if((b=b.trim())&&dd.test(b.replace(fd,"@").replace(gd,"]").replace(ed,"")))return(new Function("return "+b))();avalon.error("Invalid JSON: "+b)}return b};avalon.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){avalon.fn[b]=function(d){var e=this[0]||{},f=
|
73
|
+
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={},Sb=["","-webkit-","-o-","-moz-","-ms-"],Na={"float":z?"cssFloat":"styleFloat"};avalon.cssNumber=S("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom");avalon.cssName=function(b,c,d){if(Na[b])return Na[b];c=c||B.style;
|
74
|
+
for(var e=0,f=Sb.length;e<f;e++)if(d=oa(Sb[e]+b),d in c)return Na[b]=d;return null};x["@:set"]=function(b,c,d){try{b.style[c]=d}catch(e){}};if(q.getComputedStyle)x["@:get"]=function(b,c){if(!b||!b.style)throw Error("getComputedStyle\u8981\u6c42\u4f20\u5165\u4e00\u4e2a\u8282\u70b9 "+b);var d,e=getComputedStyle(b,null);e&&(d="filter"===c?e.getPropertyValue(c):e[c],""===d&&(d=b.style[c]));return d},x["opacity:get"]=function(b){b=x["@:get"](b,"opacity");return""===b?"1":b};else{var hd=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,
|
75
|
+
id=/^(top|right|bottom|left)$/,Tb=/alpha\([^)]*\)/i,Oa=!!q.XDomainRequest,jd={thin:Oa?"1px":"2px",medium:Oa?"3px":"4px",thick:Oa?"5px":"6px"};x["@:get"]=function(b,c){var d=b.currentStyle,e=d[c];if(hd.test(e)&&!id.test(e)){var f=b.style,g=f.left,h=b.runtimeStyle.left;b.runtimeStyle.left=d.left;f.left="fontSize"===c?"1em":e||0;e=f.pixelLeft+"px";f.left=g;b.runtimeStyle.left=h}"medium"===e&&(c=c.replace("Width","Style"),"none"===d[c]&&(e="0px"));return""===e?"auto":jd[e]||e};x["opacity:set"]=function(b,
|
76
|
+
c,d){b=b.style;d=isFinite(d)&&1>=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"},
|
77
|
+
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};
|
78
|
+
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"+
|
79
|
+
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);
|
80
|
+
return{top:c.top+h-b,left:c.left+e-g}};var kd=/^<option(?:\s+\w+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\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<l;m++)if(d=e[m],(d.selected||m===f)&&!d.disabled){c=g(d);if(h)return c;k.push(c)}return k},"select:set":function(b,
|
81
|
+
c,d){c=[].concat(c);for(var e=Ma["option:get"],f=0,g;g=b.options[f++];)if(g.selected=-1<c.indexOf(e(g)))d=!0;d||(b.selectedIndex=-1)}},ld={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},zb=q.JSON&&JSON.stringify||function(b){return'"'+b.replace(/[\\\"\x00-\x1f]/g,function(b){var d=ld[b];return"string"===typeof d?d:"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)})+'"'},md=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,
|
82
|
+
nd=/[^\w$]+/g,od=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"),pd=/\b\d[^,]*/g,
|
83
|
+
qd=/^,+|,+$/g,Pa=qa(512),Cc=function(b){var c=","+b.trim();if(Pa[c])return Pa[c];b=b.replace(md,"").replace(nd,",").replace(od,"").replace(pd,"").replace(qd,"").split(/^$|,+/);return Pa(c,yb(b))},Ea=qa(128),Dc=/\w\[.*\]|\w\.\w/,Bc=/(\$proxy\$[a-z]+)\d+$/,wc=/\)\s*$/,xc=/\)\s*\|/g,yc=/\|\s*([$\w]+)/g,zc=/"\s*\["/g,Ac=/"\s*\(/g;avalon.parseExprProxy=I;var Qa={};"autofocus,autoplay,async,allowTransparency,checked,controls,declare,disabled,defer,defaultChecked,defaultSelectedcontentEditable,isMap,loop,multiple,noHref,noResize,noShade,open,readOnly,selected".replace(w,
|
84
|
+
function(b){Qa[b.toLowerCase()]=b});var Ra={"accept-charset":"acceptCharset","char":"ch",charoff:"chOff","class":"className","for":"htmlFor","http-equiv":"httpEquiv"};"accessKey,bgColor,cellPadding,cellSpacing,codeBase,codeType,colSpan,dateTime,defaultValue,frameBorder,longDesc,maxLength,marginWidth,marginHeight,rowSpan,tabIndex,useMap,vSpace,valueType,vAlign".replace(w,function(b){Ra[b.toLowerCase()]=b});var rd=/<noscript.*?>(?:[\s\S]+?)<\/noscript>/img,sd=/<noscript.*?>([\s\S]+?)<\/noscript>/im,
|
85
|
+
Sa=function(){return new (q.XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP")},Ta=avalon.templateCache={};v.attr=function(b,c){var d=b.value.trim(),e=!0;-1<d.indexOf(O)&&2<d.indexOf(P)&&(e=!1,ca.test(d)&&(""===RegExp.rightContext&&""===RegExp.leftContext)&&(e=!0,d=RegExp.$1));if("include"===b.type){var f=b.element;b.includeRendered=ja(f,"data-include-rendered",c);b.includeLoaded=ja(f,"data-include-loaded",c);var g=b.includeReplaced=!!avalon(f).data("includeReplace");b.startInclude=p.createComment("ms-include");
|
86
|
+
b.endInclude=p.createComment("ms-include-end");g?(b.element=b.startInclude,f.parentNode.insertBefore(b.startInclude,f),f.parentNode.insertBefore(b.endInclude,f.nextSibling)):(f.insertBefore(b.startInclude,f.firstChild),f.appendChild(b.endInclude))}b.handlerName="attr";I(d,c,b,e?0:Da(b.value))};E.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(Qa[f]&&(e=Qa[f],"boolean"===typeof c[e]))return c[e]=!!b;!z&&Ra[f]&&(f=Ra[f]);if(!1===b||null===b||void 0===
|
87
|
+
b)return c.removeAttribute(f);(Ha.test(c)?0:p.namespaces&&gb(c)||f in c.cloneNode(!1))?c[f]=b:c.setAttribute(f,b)}else if("include"===e&&b){var g=d.vmodels,h=d.includeRendered,k=d.includeLoaded,l=d.includeReplaced?c.parentNode:c,m=function(b){k&&(b=k.apply(l,[b].concat(g)));for(h&&ma(l,function(){h.call(l)},NaN);;){var c=d.startInclude.nextSibling;if(c&&c!==d.endInclude)l.removeChild(c);else break}b=avalon.parseHTML(b);c=avalon.slice(b.childNodes);l.insertBefore(b,d.endInclude);na(c,g)};if("src"===
|
88
|
+
d.param)if(Ta[b])avalon.nextTick(function(){m(Ta[b])});else{var n=Sa();n.onreadystatechange=function(){if(4===n.readyState){var c=n.status;if(200<=c&&300>c||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");
|
89
|
+
for(var f=(n.responseText||"").match(rd)||[],e=f.length,s=0;s<e;s++){var aa=c[s];aa&&(aa.style.display="none",aa.fixIE78=(f[s].match(sd)||[""," "])[1])}}avalon.nextTick(function(){m(r.fixIE78||r.value||r.innerText||r.innerHTML)})}}}else{if(!B.hasAttribute&&"string"===typeof b&&("src"===e||"href"===e))b=b.replace(/&/g,"&");c[e]=b;q.chrome&&"EMBED"===c.tagName&&(f=c.parentNode,e=document.createComment("ms-src"),f.replaceChild(e,c),f.replaceChild(c,e))}};"title,alt,src,value,css,include,href".replace(w,
|
90
|
+
function(b){v[b]=v.attr});v["class"]=function(b,c){var d=b.param,e=b.value;b.handlerName="class";if(!d||isFinite(d)){b.param="";var f=e.replace(Nb,function(b){return b.replace(/./g,"0")}).indexOf(":");if(-1===f)d=e;else if(d=e.slice(0,f),e=e.slice(f+1),Ab(e,c,b),b.evaluator)b._evaluator=b.evaluator,b._args=b.args;else return y("debug: ms-class '"+(e||"").trim()+"' \u4e0d\u5b58\u5728\u4e8eVM\u4e2d"),!1;e=ca.test(d);e||(b.immobileClass=d);I("",c,b,e?Da(d):0)}else b.immobileClass=b.oldStyle=b.param,
|
91
|
+
I(e,c,b)};E["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){var g="mouseenter",h="mouseleave";if("active"===f){c.tabIndex=c.tabIndex||-1;var g="mousedown",
|
92
|
+
h="mouseup",k=e.bind("mouseleave",function(){d.toggleClass&&e.removeClass(d.newClass)})}var l=e.bind(g,function(){d.toggleClass&&e.addClass(d.newClass)}),m=e.bind(h,function(){d.toggleClass&&e.removeClass(d.newClass)});d.rollback=function(){e.unbind("mouseleave",k);e.unbind(g,l);e.unbind(h,m)};d.hasBindEvent=!0}}};"hover,active".replace(w,function(b){v[b]=v["class"]});E.data=function(b,c,d){d="data-"+d.param;b&&"object"===typeof b?c[d]=b:c.setAttribute(d,String(b))};E.text=function(b,c){b=null==b?
|
93
|
+
"":b;if(3===c.nodeType)try{c.data=b}catch(d){}else"textContent"in c?c.textContent=b:c.innerText=b};E.html=function(b,c,d){b=null==b?"":b;var e="group"in d,f=e?c.parentNode:c;if(f){if(11!==b.nodeType)if(1===b.nodeType||b.item){var g=1===b.nodeType?b.childNodes:b.item?b:[];for(b=W.cloneNode(!0);g[0];)b.appendChild(g[0])}else b=avalon.parseHTML(b);var h=p.createComment("ms-html");if(e){f.insertBefore(h,c);for(var g=d.group,k=1;k<g;){var l=c.nextSibling;l&&(f.removeChild(l),k++)}f.removeChild(c);d.element=
|
94
|
+
h}else avalon.clearHTML(f).appendChild(h);e&&(d.group=b.childNodes.length||1);g=avalon.slice(b.childNodes);g[0]&&(h.parentNode&&h.parentNode.replaceChild(b,h),e&&(d.element=g[0]));na(g,d.vmodels)}};v["if"]=v.data=v.text=v.html=function(b,c){I(b.value,c,b)};E["if"]=function(b,c,d){b?(8===c.nodeType&&(c.parentNode.replaceChild(d.template,c),c=d.element=d.template),c.getAttribute(d.name)&&(c.removeAttribute(d.name),jb(c,d.vmodels)),d.rollback=null):1===c.nodeType&&(b=d.element=p.createComment("ms-if"),
|
95
|
+
c.parentNode.replaceChild(b,c),d.template=c,fa.appendChild(c),d.rollback=function(){c.parentNode===fa&&fa.removeChild(c)})};avalon.parseDisplay=da;v.visible=function(b,c){var d=avalon(b.element),e=d.css("display");if("none"===e){var f=d[0].style,g=/visibility/i.test(f.cssText),h=d.css("visibility");f.display="";f.visibility="hidden";e=d.css("display");"none"===e&&(e=da(d[0].nodeName));f.visibility=g?h:""}b.display=e;I(b.value,c,b)};E.visible=function(b,c,d){c.style.display=b?d.display:"none"};var Ub=
|
96
|
+
/\(([^)]*)\)/;v.on=function(b,c){var d=b.value;b.type="on";var e=b.param.replace(/-\d+$/,"");if("function"===typeof v.on[e+"Hook"])v.on[e+"Hook"](b);if(0<d.indexOf("(")&&-1<d.indexOf(")")&&(e=(d.match(Ub)||["",""])[1].trim(),""===e||"$event"===e))d=d.replace(Ub,"");I(d,c,b)};E.on=function(b,c,d){b=function(b){return(d.evaluator||A).apply(this,d.args.concat(b))};var e=d.param.replace(/-\d+$/,"");if("scan"===e)b.call(c,{type:e});else if("function"===typeof d.specialBind)d.specialBind(c,b);else var f=
|
97
|
+
avalon.bind(c,e,b);d.rollback=function(){"function"===typeof d.specialUnbind?d.specialUnbind():avalon.unbind(c,e,f)}};v.widget=function(b,c){var d=b.value.match(w),e=b.element,f=d[0],g=d[1];if(!g||"$"===g)g=N(f);var d=d[2]||f,h=avalon.ui[f];if("function"===typeof h){c=e.vmodels||c;for(var k=0,l;l=c[k++];)if(l.hasOwnProperty(d)&&"object"===typeof l[d]){var m=l[d],m=m.$model||m;break}m&&(k=m[f+"Id"],"string"===typeof k&&(g=k));k=avalon.getWidgetData(e,f);b.value=[f,g,d].join();b[f+"Id"]=g;b.evaluator=
|
98
|
+
A;e.msData["ms-widget-id"]=g;var n=b[f+"Options"]=avalon.mix({},h.defaults,m||{},k);e.removeAttribute("ms-widget");var r=h(e,b,c)||{};r.$id?(avalon.vmodels[g]=r,hb(e,r),r.hasOwnProperty("$init")&&r.$init(function(){avalon.scan(e,[r].concat(c));"function"===typeof n.onInit&&n.onInit.call(e,r,n,c)}),b.rollback=function(){try{r.widgetElement=null,r.$remove()}catch(b){}e.msData={};delete avalon.vmodels[r.$id]},Aa(b,td),q.chrome&&e.addEventListener("DOMNodeRemovedFromDocument",function(){setTimeout(db)})):
|
99
|
+
avalon.scan(e,c)}else c.length&&(e.vmodels=c)};var td=[],X=v.duplex=function(b,c){var d=b.element,e;I(b.value,c,b,0,1);b.changed=ja(d,"data-duplex-changed",c)||A;if(b.evaluator&&b.args){var f=[],g=S("string,number,boolean,checked");"radio"===d.type&&""===b.param&&(b.param="checked");d.msData&&(d.msData["ms-duplex"]=b.value);b.param.replace(/\w+/g,function(c){/^(checkbox|radio)$/.test(d.type)&&/^(radio|checked)$/.test(c)&&("radio"===c&&y("ms-duplex-radio\u5df2\u7ecf\u66f4\u540d\u4e3ams-duplex-checked"),
|
100
|
+
c="checked",b.isChecked=!0);"bool"===c?(c="boolean",y("ms-duplex-bool\u5df2\u7ecf\u66f4\u540d\u4e3ams-duplex-boolean")):"text"===c&&(c="string",y("ms-duplex-text\u5df2\u7ecf\u66f4\u540d\u4e3ams-duplex-string"));g[c]&&(e=!0);avalon.Array.ensure(f,c)});e||f.push("string");b.param=f.join("-");b.bound=function(c,e){d.addEventListener?d.addEventListener(c,e,!1):d.attachEvent("on"+c,e);var f=b.rollback;b.rollback=function(){d.avalonSetter=null;avalon.unbind(d,c,e);f&&f()}};for(var h in avalon.vmodels)avalon.vmodels[h].$fire("avalon-ms-duplex-init",
|
101
|
+
b);(b.pipe||(b.pipe=Ec))(null,b,"init");h=d.tagName;X[h]&&X[h](d,b.evaluator.apply(null,b.args),b)}};avalon.duplexHooks={checked:{get:function(b,c){return!c.element.oldValue}},string:{get:function(b){return b},set:Fa},"boolean":{get:function(b){return"true"===b},set:Fa},number:{get:function(b){return isFinite(b)?parseFloat(b)||0:b},set:Fa}};var Bb,ea=[];avalon.tick=function(b){1===ea.push(b)&&(Bb=setInterval(Fc,60))};var Vb=A;new function(){try{var b={},c=HTMLInputElement.prototype,d=HTMLTextAreaElement.prototype,
|
102
|
+
e=function(c){avalon.contains(B,this)&&(b[this.tagName].call(this,c),this.avalonSetter&&this.avalonSetter())};Object.getOwnPropertyNames(HTMLInputElement.prototype);b.INPUT=Object.getOwnPropertyDescriptor(c,"value").set;Object.defineProperty(c,"value",{set:e});b.TEXTAREA=Object.getOwnPropertyDescriptor(d,"value").set;Object.defineProperty(d,"value",{set:e})}catch(f){Vb=avalon.tick}};R&&avalon.bind(p,"selectionchange",function(b){(b=p.activeElement)&&"function"===typeof b.avalonSetter&&b.avalonSetter()});
|
103
|
+
X.INPUT=function(b,c,d){function e(b){d.changed.call(this,b,d)}function f(){n=!0}function g(){n=!1}function h(){if(!n){var f=b.oldValue=b.value,f=d.pipe(f,d,"get");!1!==m.data("duplex-observe")&&(c(f),e.call(b,f),m.data("duplex-focus")&&avalon.nextTick(function(){b.focus()}))}}var k=b.type,l=d.bound,m=avalon(b),n=!1;d.handler=function(){var e=d.pipe(c(),d,"set")+"";e!==b.oldValue&&(b.value=e)};if(d.isChecked||"radio"===b.type){var r=6===R,h=function(){if(!1!==m.data("duplex-observe")){var f=d.pipe(b.value,
|
104
|
+
d,"get");c(f);e.call(b,f)}};d.handler=function(){var e=c(),f=d.isChecked?!!e:e+""===b.value;b.oldValue=f;r?setTimeout(function(){b.defaultChecked=f;b.checked=f},31):b.checked=f};l("click",h)}else if("checkbox"===k)h=function(){if(!1!==m.data("duplex-observe")){var f=b.checked?"ensure":"remove",g=c();Array.isArray(g)||(y("ms-duplex\u5e94\u7528\u4e8echeckbox\u4e0a\u8981\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"),g=[g]);avalon.Array[f](g,d.pipe(b.value,d,"get"));e.call(b,g)}},d.handler=function(){var e=[].concat(c());
|
105
|
+
b.checked=-1<e.indexOf(d.pipe(b.value,d,"get"))},l(z?"change":"click",h);else{k=b.getAttribute("data-duplex-event")||b.getAttribute("data-event")||"input";b.attributes["data-event"]&&y("data-event\u6307\u4ee4\u5df2\u7ecf\u5e9f\u5f03\uff0c\u8bf7\u6539\u7528data-duplex-event");var s=function(b){setTimeout(function(){h(b)})};k.replace(w,function(b){switch(b){case "input":R?(8<R?l("input",h):l("propertychange",function(b){"value"===b.propertyName&&h()}),l("dragend",s)):(l("input",h),l("compositionstart",
|
106
|
+
f),l("compositionend",g),l("DOMAutoComplete",h));break;default:l(b,h)}})}/text|password/.test(b.type)&&Vb(function(){if(B.contains(b))b.value!==b.oldValue&&h();else if(!b.msRetain)return!1});b.avalonSetter=h;b.oldValue=b.value;za(d);e.call(b,b.value)};X.TEXTAREA=X.INPUT;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||y("ms-duplex\u5728<select multiple=true>\u4e0a\u8981\u6c42\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"):b.multiple&&y("ms-duplex\u5728<select multiple=false>\u4e0d\u80fd\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4");
|
107
|
+
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)}});ma(b,function(){za(d);d.changed.call(b,c(),d)},NaN)};v.repeat=function(b,c){var d=b.type;I(b.value,c,b,0,1);b.proxies=[];var e=!1;try{var f=b.$repeat=b.evaluator.apply(0,b.args||[]),g=avalon.type(f);"object"!==
|
108
|
+
g&&"array"!==g&&(e=!0,avalon.log("warning:"+b.value+"\u5bf9\u5e94\u7c7b\u578b\u4e0d\u6b63\u786e"))}catch(h){e=!0,avalon.log("warning:"+b.value+"\u7f16\u8bd1\u51fa\u9519")}var k=b.value.split(".")||[];if(1<k.length){k.pop();for(var l=k[0],k=0,m;m=c[k++];)if(m&&m.hasOwnProperty(l)){k=m[l].$events||{};k[L]=k[L]||[];k[L].push(b);break}}k=b.element;k.removeAttribute(b.name);b.sortedCallback=ja(k,"data-with-sorted",c);b.renderedCallback=ja(k,"data-"+d+"-rendered",c);l=N(d);m=b.element=p.createComment(l+
|
109
|
+
":end");b.clone=p.createComment(l);W.appendChild(m);"each"===d||"with"===d?(b.template=k.innerHTML.trim(),avalon.clearHTML(k).appendChild(m)):(b.template=k.outerHTML.trim(),k.parentNode.replaceChild(m,k));b.template=avalon.parseHTML(b.template);b.rollback=function(){var c=b.element;if(c){E.repeat.call(b,"clear");var d=c.parentNode,e=b.template,f=e.firstChild;d.replaceChild(e,c);(c=b.$stamp)&&c.parentNode&&c.parentNode.removeChild(c);b.element="repeat"===b.type?f:d}};if(!e){b.handler=E.repeat;b.$outer=
|
110
|
+
{};d="$key";e="$val";Array.isArray(f)&&(d="$first",e="$last");for(k=0;l=c[k++];)if(l.hasOwnProperty(d)&&l.hasOwnProperty(e)){b.$outer=l;break}d=f.$events;(e=(d||{})[L])&&avalon.Array.ensure(e,b)&&Aa(b,e);"object"===g?(b.$with=!0,g=!d?{}:d.$withProxyPool||(d.$withProxyPool={}),b.handler("append",f,g)):f.length&&b.handler("add",0,f.length)}};E.repeat=function(b,c,d){if(b){var e=this.element,f=e.parentNode,g=this.proxies,h=W.cloneNode(!1);switch(b){case "add":for(var e=c+d,k=this.$repeat.length-1,k=
|
111
|
+
[],l=Db(this,c),m=c;m<e;m++){var n=Hc(m,this);g.splice(m,0,n);Cb(this,h,n,k)}f.insertBefore(h,l);for(m=0;h=k[m++];)na(h.nodes,h.vmodels),h.nodes=h.vmodels=null;break;case "del":l=g[c].$stamp;e=Db(this,c+d);Ga(l,e);h=g.splice(c,d);wa(h,"each");break;case "clear":if(h=this.$stamp||g[0])l=h.$stamp||h,Ga(l,e);wa(g,"each");break;case "move":var l=g[0].$stamp,r=l.nodeValue,s=[],p=[];Ga(l,e,function(){p.unshift(this);this.nodeValue===r&&(s.unshift(p),p=[])});ya(g,c);for(ya(s,c);p=s.shift();)for(;k=p.shift();)h.appendChild(k);
|
112
|
+
f.insertBefore(h,e);break;case "index":for(k=g.length-1;d=g[c];c++)d.$index=c,d.$first=0===c,d.$last=c===k;return;case "set":(n=g[c])&&ka(n.$events.$index);return;case "append":g=d;l=[];k=[];for(n in c)c.hasOwnProperty(n)&&"hasOwnProperty"!==n&&l.push(n);this.sortedCallback&&(m=this.sortedCallback.call(f,l))&&(Array.isArray(m)&&m.length)&&(l=m);for(m=0;n=l[m++];)"hasOwnProperty"!==n&&(g[n]||(g[n]=Jc(n,this)),Cb(this,h,g[n],k));m=this.$stamp=this.clone;f.insertBefore(m,e);f.insertBefore(h,e);for(m=
|
113
|
+
0;h=k[m++];)na(h.nodes,h.vmodels),h.nodes=h.vmodels=null}"clear"===b&&(b="del");var q=this.renderedCallback||A,t=arguments;ma(f,function(){q.apply(f,t);f.oldValue&&"SELECT"===f.tagName&&avalon(f).val(f.oldValue.split(","))},NaN)}};"with,each".replace(w,function(b){v[b]=v.repeat});var pa=[],Eb=[],ud=/<script[^>]*>([\S\s]*?)<\/script\s*>/gim,vd=/\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,wd=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/ig,xd={a:/\b(href)\=("javascript[^"]*"|'javascript[^']*')/ig,img:/\b(src)\=("javascript[^"]*"|'javascript[^']*')/ig,
|
114
|
+
form:/\b(action)\=("javascript[^"]*"|'javascript[^']*')/ig},yd=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,zd=/([^\#-~| |!])/g,Ua=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)},$filter:function(b){for(var c=1,d=arguments.length;c<d;c++){var e=arguments[c],f=avalon.filters[e.shift()];"function"===typeof f&&(e=[b].concat(e),b=f.apply(null,e))}return b},
|
115
|
+
camelize:oa,sanitize:function(b){return b.replace(ud,"").replace(wd,function(b,d){var e=b.toLowerCase().match(/<(\w+)\s/);e&&(e=xd[e[1]])&&(b=b.replace(e,function(b,c,d){b=d.charAt(0);return c+"="+b+"javascript:void(0)"+b}));return b.replace(vd," ").replace(/\s+/g," ")})},escape:function(b){return String(b).replace(/&/g,"&").replace(yd,function(b){var d=b.charCodeAt(0);b=b.charCodeAt(1);return"&#"+(1024*(d-55296)+(b-56320)+65536)+";"}).replace(zd,function(b){return"&#"+b.charCodeAt(0)+";"}).replace(/</g,
|
116
|
+
"<").replace(/>/g,">")},currency:function(b,c,d){return(c||"\uffe5")+Fb(b,isFinite(d)?d:2)},number:function(b,c){return Fb(b,isFinite(c)?c:3)}};new function(){function b(b,c,d){var e="";0>b&&(e="-",b=-b);for(b=""+b;b.length<c;)b="0"+b;d&&(b=b.substr(b.length-c));return e+b}function c(c,d,e,f){return function(g){g=g["get"+c]();if(0<e||g>-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;
|
117
|
+
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",
|
118
|
+
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]},Z:function(c){c=-1*c.getTimezoneOffset();return c=(0<=c?"+":"")+(b(Math[0<c?"floor":"ceil"](c/60),2)+b(Math.abs(c%60),2))}},g=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,
|
119
|
+
h=/^\d+$/,k=/^(\d{4})-?(\d+)-?(\d+)(?:T(\d+)(?::?(\d+)(?::?(\d+)(?:\.(\d+))?)?)?(Z|([+-])(\d+):?(\d+))?)?$/,l=/^(\d+)\D(\d+)\D(\d+)/;Ua.date=function(b,c){var d=Ua.date.locate,k="",m=[],p,q;c=c||"mediumDate";c=d[c]||c;"string"===typeof b&&(h.test(b)?b=parseInt(b,10):(b=b.trim().replace(l,function(b,c,d,e){return(4===e.length?[e,c,d]:[c,d,e]).join("-")}),b=e(b)),b=new Date(b));"number"===typeof b&&(b=new Date(b));if("date"===avalon.type(b)){for(;c;)(q=g.exec(c))?(m=m.concat(q.slice(1)),c=m.pop()):
|
120
|
+
(m.push(c),c=null);m.forEach(function(c){p=f[c];k+=p?p(b,d):c.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return k}};var m={AMPMS:{"0":"\u4e0a\u5348",1:"\u4e0b\u5348"},DAY:{"0":"\u661f\u671f\u65e5",1:"\u661f\u671f\u4e00",2:"\u661f\u671f\u4e8c",3:"\u661f\u671f\u4e09",4:"\u661f\u671f\u56db",5:"\u661f\u671f\u4e94",6:"\u661f\u671f\u516d"},MONTH:{"0":"1\u6708",1:"2\u6708",2:"3\u6708",3:"4\u6708",4:"5\u6708",5:"6\u6708",6:"7\u6708",7:"8\u6708",8:"9\u6708",9:"10\u6708",10:"11\u6708",11:"12\u6708"},SHORTDAY:{"0":"\u5468\u65e5",
|
121
|
+
1:"\u5468\u4e00",2:"\u5468\u4e8c",3:"\u5468\u4e09",4:"\u5468\u56db",5:"\u5468\u4e94",6:"\u5468\u516d"},fullDate:"y\u5e74M\u6708d\u65e5EEEE",longDate:"y\u5e74M\u6708d\u65e5",medium:"yyyy-M-d H:mm:ss",mediumDate:"yyyy-M-d",mediumTime:"H:mm:ss","short":"yy-M-d ah:mm",shortDate:"yy-M-d",shortTime:"ah:mm"};m.SHORTMONTH=m.MONTH;Ua.date.locate=m};var u=avalon.modules={"ready!":{exports:avalon},avalon:{exports:avalon,state:2}};u.exports=u.avalon;new function(){function b(c,d){for(var e in c)if("\u53f8\u5f92\u6b63\u7f8e"===
|
122
|
+
c[e]&&2!==u[e].state&&(e===d||b(u[e].deps,d)))return!0}function c(b,c,d){var f=e(b.src);b.onload=b.onreadystatechange=b.onerror=null;if(c||d&&!u[f].state)setTimeout(function(){G.removeChild(b);b=null}),y("debug: \u52a0\u8f7d "+f+" \u5931\u8d25"+c+" "+!u[f].state);else return!0}function d(){var b=w.length,c;a:for(;c=w[--b];){var e=u[c];c=e.deps;for(var f in c)if(M.call(c,f)&&2!==u[f].state)continue a;if(2!==e.state){w.splice(b,1);c=e.id;var g=e.args,e=e.factory,h=Object(u[c]);h.state=2;for(var k=0,
|
123
|
+
l=[],m=void 0;m=g[k++];)"exports"===m?(m=h.exports||(h.exports={}),l.push(m)):l.push(u[m].exports);g=e.apply(q,l);void 0!==g&&(u[c].exports=g);d()}}}function e(b){return(b||"").replace(J,"")}function f(b){return b?b.substr(0,b.lastIndexOf("/")):t.baseUrl?t.baseUrl:t.loaderUrl}function g(b){var c;try{a.b.c()}catch(d){c=d.stack,!c&&q.opera&&(c=(String(d).match(/of linked script \S+/g)||[]).join(" "))}if(c)return c=c.split(/[@ ]/g).pop(),c="("===c[0]?c.slice(1,-1):c.replace(/\s/,""),c.replace(/(:\d+)?:\d+$/i,
|
124
|
+
"");for(var e=(b?p:G).getElementsByTagName("script"),f=e.length;c=e[--f];)if((b||c.className===L)&&"interactive"===c.readyState)return b="1"[0]?c.src:c.getAttribute("src",4),c.className=b}function h(b,c,d){if("ready!"===b||u[b]&&2===u[b].state)return b;var e=b.match(/(\w+!)?(.+)/),g=e[1]||"js",g=ia[g]||A,h="",e=e[2].replace(J,function(b){h=b;return""}),k=g.ext||"";k&&e.substr(e.length-k.length)===k&&(b=e.slice(0,-k.length),e=e.slice(-k.length));var l=0;r(e,t.paths,function(c,d){b=b.replace(d,c);l=
|
125
|
+
1});l||r(e,t.packages,function(c,d,e){b=b.replace(e.name,e.location)});d&&r(d,t.map,function(c){r(b,c,function(c,d){b=b.replace(d,c)})});/^(?:[a-z]+:)?\/\//i.test(String(b))||(b=v(/\w/.test(b.charAt(0))?f():c,b));b+=k+h;r(e,t.urlArgs,function(c){b+=(-1===b.indexOf("?")?"?":"&")+c});return g(b,t.shim[e])}function k(b,e,f){var g=p.createElement("script");g.className=L;g[z?"onload":"onreadystatechange"]=function(){if(z||/loaded|complete/i.test(g.readyState)){var h=B.pop();h&&h.require(e);f&&f();c(g,
|
126
|
+
!1,!z)&&(y("debug: \u5df2\u6210\u529f\u52a0\u8f7d "+b),w.push(e),d())}};g.onerror=function(){c(g,!0)};g.src=b;G.insertBefore(g,G.firstChild);y("debug: \u6b63\u51c6\u5907\u52a0\u8f7d "+b)}function l(b,c,d){var e=[],f;for(f in b)if(b.hasOwnProperty(f)){var g={name:f,val:b[f]};e.push(g);g.reg="*"===f&&c?/^/:RegExp("^"+f+"(/|$)");d&&"*"!==f&&(g.reg=RegExp("/"+f.replace(/^\//,"")+"(/|$)"))}e.sort(s);return e}function m(b){return function(){var c;b.init&&(c=b.init.apply(q,arguments));return c||b.exports&&
|
127
|
+
x(b.exports)}}function n(b,c,d,e,f){return{id:b,state:c||1,factory:d||A,deps:e||{},args:f||[]}}function r(b,c,d){c=c||[];for(var e=0,f;f=c[e++];)if(f.reg.test(b))return d(f.val,f.name,f),!1}function s(b,c){var d=b.name,e=c.name;return"*"===e?-1:"*"===d?1:e.length-d.length}function v(b,c){"/"!==b.charAt(b.length-1)&&(b+="/");if("./"===c.slice(0,2))return b+c.slice(2);if(".."===c.slice(0,2)){for(b+=c;K.test(b);)b=b.replace(K,"");return b}return"/"===c.slice(0,1)?b+c.slice(1):b+c}function x(b){if(!b)return b;
|
128
|
+
var c=q;b.split(".").forEach(function(b){c=c[b]});return c}var w=[],B=[];F=avalon.require=function(b,c,e){Array.isArray(b)||avalon.error("require\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u5fc5\u987b\u662f\u4f9d\u8d56\u5217\u6570,\u7c7b\u578b\u4e3a\u6570\u7ec4 "+b);var g=[],k={},l=e||"callback"+setTimeout("1"),m=e&&e.replace(/\.js$/i,"");e=f(e);b.forEach(function(b){if((b=h(b,e,m))&&!k[b])g.push(b),k[b]="\u53f8\u5f92\u6b63\u7f8e"});b=u[l];if(!b||2!==b.state)u[l]=n(l,1,c,k,g);b||w.push(l);d()};F.define=
|
129
|
+
function(c,d,f){var h=la.call(arguments);if("string"===typeof c)var k=h.shift();"function"===typeof h[0]&&h.unshift([]);var l=u[k]&&1<=u[k].state?k:e(g());f=h[1];f.id=k;!u[l]&&k&&(u[l]=n(l,1,f));f.require=function(c){h.push(c);var d=!0;try{d=b(u[c].deps,c)}catch(e){}d&&avalon.error(c+"\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"+c+"\u6a21\u5757");delete f.require;F.apply(null,h)};l?f.require(l):
|
130
|
+
B.push(f)};F.config=t;F.define.amd=u;var C=t["orig.paths"]={},E=t["orig.map"]={},H=t.packages=[],I=t["orig.args"]={};avalon.mix(ia,{paths:function(b){avalon.mix(C,b);t.paths=l(C)},map:function(b){avalon.mix(E,b);b=l(E,1,1);avalon.each(b,function(b,c){c.val=l(c.val)});t.map=b},packages:function(b){b=b.concat(H);for(var c={},d=[],e=0,f;f=b[e++];){f="string"===typeof f?{name:f}:f;var g=f.name;if(!c[g]){var h=f.location?f.location:v(g,f.main||"main"),h=h.replace(/\.js$/i,"");d.push(f);c[g]=f.location=
|
131
|
+
h;f.reg=RegExp("^"+g+"(/|$)")}}t.packages=d.sort()},urlArgs:function(b){"string"===typeof b&&(b={"*":b});avalon.mix(I,b);t.urlArgs=l(I,1)},bundles:function(b){var c=t.bundles={},d;for(d in b)avalon.each(b[d],function(b,e){c[e]=d})},baseUrl:function(b){if(!/^(?:[a-z]+:)?\/\//i.test(String(b))){var c=G.getElementsByTagName("base")[0];c&&G.removeChild(c);var d=p.createElement("a");d.href=b;b="1"[0]?d.href:d.getAttribute("href",4);c&&G.insertBefore(c,G.firstChild)}t.baseUrl=b},shim:function(b){for(var c in b){var d=
|
132
|
+
b[c];Array.isArray(d)&&(d=b[c]={deps:d});if(!d.exportsFn&&(d.exports||d.init))d.exportsFn=m(d)}t.shim=b},js:function(b,c){var d=e(b);if(!u[d]){var f=u[d]=n(d);c?F(c.deps||[],function(){var e=avalon.slice(arguments);k(b,d,function(){f.state=2;c.exportsFn&&(f.exports=c.exportsFn.apply(0,e));F.checkDeps()})}):k(b,d)}return d},css:function(b){var c=e(b).replace(/\W/g,"_");if(!p.getElementById(c)){var d=p.createElement("link");d.rel="stylesheet";d.href=b;d.id=c;G.insertBefore(d,G.firstChild)}},text:function(b){var c=
|
133
|
+
Sa(),d=e(b);u[d]={};c.onreadystatechange=function(){if(4===c.readyState){var e=c.status;399<e&&600>e?avalon.error(b+" \u5bf9\u5e94\u8d44\u6e90\u4e0d\u5b58\u5728\u6216\u6ca1\u6709\u5f00\u542f CORS"):(u[d].state=2,u[d].exports=c.responseText,F.checkDeps())}};c.open("GET",b,!0);"withCredentials"in c&&(c.withCredentials=!0);c.setRequestHeader("X-Requested-With","XMLHttpRequest");c.send();return d}});ia.css.ext=".css";ia.js.ext=".js";F.checkDeps=d;var J=/(\?[^#]*)$/,K=/\/\w+\/\.\./,D=g(!0);D||(D=p.scripts[p.scripts.length-
|
134
|
+
1].src);D=e(D);t.loaderUrl=D.slice(0,D.lastIndexOf("/")+1)};var Gb=[];if("complete"===p.readyState)setTimeout(U);else if(z)p.addEventListener("DOMContentLoaded",U);else{p.attachEvent("onreadystatechange",function(){"complete"===p.readyState&&U()});var Va;try{Va=null!=q.frameElement}catch(Bd){Va=!0}B.doScroll&&!Va&&Hb()}avalon.bind(q,"load",U);avalon.ready=function(b){F?F(["ready!"],b):U===A?b(avalon):Gb.push(b)};avalon.config({loader:!0});avalon.ready(function(){avalon.scan(p.body)});"function"===
|
135
|
+
typeof define&&define.amd&&define("avalon",[],function(){return avalon});avalon.noConflict=function(b){b&&q.avalon===avalon&&(q.avalon=avalon);return avalon};void 0===Y&&(q.avalon=avalon);return avalon});
|
@@ -0,0 +1,123 @@
|
|
1
|
+
(function(t,W){"object"===typeof module&&"object"===typeof module.exports?module.exports=t.document?W(t,!0):function(t){if(!t.document)throw Error("Avalon requires a window with a document");return W(t)}:W(t)})("undefined"!==typeof window?window:this,function(t,W){function y(){avalon.config.debug&&console.log.apply(console,arguments)}function z(){}function P(b,c){"string"===typeof b&&(b=b.match(w)||[]);for(var d={},e=void 0!==c?c:1,f=0,g=b.length;f<g;f++)d[b[f]]=e;return d}function Na(b){function c(e,
|
2
|
+
f){d.push(e)>b&&delete c[d.shift()];return c[e]=f}var d=[];return c}function r(b){for(var c in b)if(Oa.call(b,c)){var d=b[c];if("function"===typeof r.plugins[c])r.plugins[c](d);else"object"===typeof r[c]?avalon.mix(r[c],d):r[c]=d}return this}function Bb(b,c,d){if(Q(c)||c&&c.nodeType||-1!==d.indexOf(b)||-1!==Pa.indexOf(b))return!1;c=d.$special;return b&&"$"===b.charAt(0)&&!c[b]?!1:!0}function Cb(b,c,d,e){switch(b.type){case 0:var f=b.get;b=b.set;if(Q(b)){var g=e.$events,h=g[c];g[c]=[];b.call(e,d);
|
3
|
+
g[c]=h}return f.call(e);case 1:return d;case 2:return d!==e.$model[c]&&(c=b.svmodel=Db(e,c,d,b.valueType),d=c.$model,(c=pa[c.$id])&&c()),d}}function I(b,c,d){if(Array.isArray(b)){var e=b.concat();b.length=0;c=Eb(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(Bb(c,e,b.$skipArray)){g[c]=[];var l=avalon.type(e),q=function(b){var c=
|
4
|
+
q._name,d=this,e=d.$model,f=e[c],g=d.$events;if(arguments.length){if(!qa){if(1!==q.type&&(b=Cb(q,c,b,d),!q.type))return;Qa(f,b)||(e[c]=b,g.$digest?q.pedding||(q.pedding=!0,setTimeout(function(){fa(g[c]);d.$events&&A.$fire.call(d,c,e[c],f);q.pedding=!1})):(fa(g[c]),d.$events&&A.$fire.call(d,c,b,f)))}}else{if(0===q.type)return b=q.get.call(d),f!==b&&(e[c]=b,g.$digest?q.pedding||(q.pedding=!0,setTimeout(function(){d.$events&&A.$fire.call(d,c,e[c],f);q.pedding=!1})):d.$events&&A.$fire.call(d,c,b,f)),
|
5
|
+
b;Fb(g[c]);return q.svmodel||f}};"object"===l&&Q(e.get)&&2>=Object.keys(e).length?(q.set=e.set,q.get=e.get,q.type=0,k.push(function(){var b={evaluator:function(){b.type=new Date-0;b.element=null;d[c]=q.get.call(f)},element:F,type:new Date-0,handler:z,args:[]};Y[G]=b;q.call(f);delete Y[G]})):Ra.test(l)?(q.type=2,q.valueType=l,k.push(function(){var b=I(e,0,d[c]);q.svmodel=b;b.$events[J]=g[c]})):q.type=1;q._name=c;h[c]=q}})(e,b[e]);Pa.forEach(function(c){delete b[c];delete d[c]});var f=Gb(f,Hb(h),b),
|
6
|
+
l;for(l in b)h[l]||(f[l]=b[l]);f.$id=K();f.$model=d;f.$events=g;for(e in A)c=A[e],R||(c=c.bind(f)),f[e]=c;Sa?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 Db(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];
|
7
|
+
if(b=f.$events.$withProxyPool)ra(b,"with"),f.$events.$withProxyPool=null;var h=I(d);h.$events[J]=g;pa[h.$id]=function(b){for(;b=g.shift();)(function(b){avalon.nextTick(function(){b.type&&(b.rollback&&b.rollback(),u[b.type](b,b.vmodels))})})(b);delete pa[h.$id]};return h}function Eb(b){var c=[];c.$id=K();c.$model=b;c.$events={};c.$events[J]=[];c._=I({length:b.length});c._.$watch("length",function(b,d){c.$fire("length",b,d)});for(var d in A)c[d]=A[d];avalon.mix(c,Ta);return c}function T(b,c,d,e,f,g,
|
8
|
+
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 Ra.test(avalon.type(b))?b.$id?b:I(b,0,b):b});sa.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 ta(b,c){for(var d={},e=0,f=c.length;e<f;e++){d[e]=b[e];var g=c[e];g in d?(b[e]=d[g],delete d[g]):b[e]=b[g]}}function ua(b){Y[G]=
|
9
|
+
b;avalon.openComputedCollect=!0;var c=b.evaluator;if(c)try{var d=Ib.test(b.type)?b:c.apply(0,b.args);b.handler(d,b.element,b)}catch(e){delete b.evaluator,c=b.element,3===c.nodeType&&(d=c.parentNode,r.commentInterpolate?d.replaceChild(p.createComment(b.value),c):c.data=L+b.value+M)}avalon.openComputedCollect=!1;delete Y[G]}function Fb(b){var c=Y[G];b&&(c&&avalon.Array.ensure(b,c)&&c.element)&&va(c,b)}function va(b,c){b.$uuid=b.$uuid||K();c.$uuid=c.$uuid||K();var d={data:b,list:c,$$uuid:b.$uuid+c.$uuid};
|
10
|
+
N[d.$$uuid]||(N[d.$$uuid]=1,N.push(d))}function Ua(b){b.element=null;b.rollback&&b.rollback();for(var c in b)b[c]=null}function Jb(b){try{if(!b.parentNode)return!0}catch(c){return!0}return b.msRetain?0:1===b.nodeType?"number"===typeof b.sourceIndex?0===b.sourceIndex:!B.contains(b):!avalon.contains(B,b)}function Va(){for(var b=N.length,c=b,d=0,e,f=[],g={},h={};e=N[--b];){var k=e.data;e=k.type;g[e]?g[e]++:(g[e]=1,f.push(e))}var l=!1;f.forEach(function(b){Wa[b]!==g[b]&&(h[b]=1,l=!0)});b=c;if(l)for(;e=
|
11
|
+
N[--b];)k=e.data,void 0!==k.element&&(h[k.type]&&Jb(k.element))&&(d++,N.splice(b,1),delete N[e.$$uuid],avalon.Array.remove(e.list,k),Ua(k),e.data=e.list=null);Wa=g;Xa=new Date}function fa(b){if(b&&b.length){444<new Date-Xa&&"object"===typeof b[0]&&Va();for(var c=ga.call(arguments,1),d=b.length,e;e=b[--d];){var f=e.element;f&&f.parentNode&&(e.$repeat?e.handler.apply(e,c):"on"!==e.type&&e.handler((e.evaluator||z).apply(0,e.args||[]),f,e))}}}function ha(b,c,d){var e=setTimeout(function(){var f=b.innerHTML;
|
12
|
+
clearTimeout(e);f===d?c():ha(b,c,f)})}function Ya(b,c){var d=b.getAttribute("avalonctrl")||c.$id;b.setAttribute("avalonctrl",d);c.$events.expr=b.tagName+'[avalonctrl="'+d+'"]'}function wa(b,c){for(var d=0,e;e=b[d++];)e.vmodels=c,u[e.type](e,c),e.evaluator&&(e.element&&1===e.element.nodeType)&&e.element.removeAttribute(e.name);b.length=0}function Kb(b,c){return b.priority-c.priority}function Za(b,c,d){d=b.getAttribute("ms-skip");var e=b.getAttributeNode("ms-important"),f=b.getAttributeNode("ms-controller");
|
13
|
+
if("string"!==typeof d){if(d=e||f){f=avalon.vmodels[d.value];if(!f)return;c=d===e?[f]:[f].concat(c);b.removeAttribute(d.name);b.classList.remove(d.name);Ya(b,f)}$a(b,c)}}function Lb(b,c){for(var d=b.firstChild;d;){var e=d.nextSibling;ab(d,d.nodeType,c);d=e}}function ia(b,c){for(var d=0,e;e=b[d++];)ab(e,e.nodeType,c)}function ab(b,c,d){1===c?Za(b,d):3===c&&Z.test(b.data)?bb(b,d):r.commentInterpolate&&(8===c&&!Z.test(b.nodeValue))&&bb(b,d)}function $a(b,c){for(var d=b.hasAttributes()?avalon.slice(b.attributes):
|
14
|
+
[],e=[],f={},g,h=0,k;k=d[h++];)if(k.specified&&(g=k.name.match(Mb))){var l=g[1],m=g[2]||"",n=k.value;k=k.name;f[k]=n;Nb[l]?(m=l,l="on"):Ob[l]&&(y("ms-"+l+"\u5df2\u7ecf\u88ab\u5e9f\u5f03,\u8bf7\u4f7f\u7528ms-attr-*\u4ee3\u66ff"),"enabled"===l&&(l="disabled",n="!("+n+")"),m=l,l="attr",b.removeAttribute(k),k="ms-attr-"+m,b.setAttribute(k,n),g=[k],f[k]=n);if("function"===typeof u[l]){var s={type:l,param:m,element:b,name:g[0],value:n,priority:l in cb?cb[l]:10*l.charCodeAt(0)+(Number(m)||0)};if("html"===
|
15
|
+
l||"text"===l)m=xa(n),avalon.mix(s,m),s.filters=s.filters.replace(db,function(){s.type="html";s.group=1;return""});"ms-if-loop"===k&&(s.priority+=100);c.length&&(e.push(s),"widget"===l&&(b.msData=b.msData||f))}}f["ms-attr-checked"]&&f["ms-duplex"]&&y("warning!\u4e00\u4e2a\u5143\u7d20\u4e0a\u4e0d\u80fd\u540c\u65f6\u5b9a\u4e49ms-attr-checked\u4e0ems-duplex");e.sort(Kb);d=!0;for(h=0;s=e[h];h++){l=s.type;if(Pb.test(l))return wa(e.slice(0,h+1),c);d&&(d=!Qb.test(l))}wa(e,c);d&&(!Rb[b.tagName]&&eb.test(b.innerHTML+
|
16
|
+
b.textContent))&&(fb&&fb(b),Lb(b,c))}function xa(b){if(0<b.indexOf("|")){var c=b.replace(Sb,"\u1122\u3344").indexOf("|");if(-1<c)return{filters:b.slice(c),value:b.slice(0,c),expr:!0}}return{value:b,filters:"",expr:!0}}function ya(b){var c=[],d;d=0;var e;do{e=b.indexOf(L,d);if(-1===e)break;(d=b.slice(d,e))&&c.push({value:d,filters:"",expr:!1});d=e+L.length;e=b.indexOf(M,d);if(-1===e)break;(d=b.slice(d,e))&&c.push(xa(d));d=e+M.length}while(1);(d=b.slice(d))&&c.push({value:d,expr:!1,filters:""});return c}
|
17
|
+
function bb(b,c){var d=[];if(8===b.nodeType)var e=xa(b.nodeValue),f=[e];else f=ya(b.data);if(f.length){for(var g=0;e=f[g++];){var h=p.createTextNode(e.value);e.expr&&(e.type="text",e.element=h,e.filters=e.filters.replace(db,function(){e.type="html";e.group=1;return""}),d.push(e));U.appendChild(h)}b.parentNode.replaceChild(U,b);d.length&&wa(d,c)}}function gb(b){return b.replace(/([a-z\d])([A-Z]+)/g,"$1-$2").toLowerCase()}function ja(b){return 0>b.indexOf("-")&&0>b.indexOf("_")?b:b.replace(/[-_][^-_]/g,
|
18
|
+
function(b){return b.charAt(1).toUpperCase()})}function ka(b){try{if("object"===typeof b)return b;b="true"===b?!0:"false"===b?!1:"null"===b?null:+b+""===b?+b:Tb.test(b)?JSON.parse(b):b}catch(c){}return b}function hb(b,c){if(0>=b.offsetWidth){var d=getComputedStyle(b,null);if(Ub.test(d.display)){var e={node:b},f;for(f in ib)e[f]=d[f],b.style[f]=ib[f];c.push(e)}(d=b.parentNode)&&1===d.nodeType&&hb(d,c)}}function Vb(b,c,d,e){for(var f=[],g=" = "+d+".",h=b.length,k;k=b[--h];)c.hasOwnProperty(k)&&(f.push(k+
|
19
|
+
g+k),e.vars.push(k),"duplex"===e.type&&(b.get=d+"."+k),b.splice(h,1));return f}function jb(b){for(var c=[],d={},e=0;e<b.length;e++){var f=b[e],g=f&&"string"===typeof f.$id?f.$id:f;d[g]||(d[g]=c.push(f))}return c}function Wb(b,c){c=c.replace(Xb,"").replace(Yb,function(){return"],|"}).replace(Zb,function(b,c){return"["+kb(c)}).replace($b,function(){return'"],["'}).replace(ac,function(){return'",'})+"]";return"return avalon.filters.$filter("+b+", "+c+")"}function lb(b,c,d){var e=d.type,f=d.filters||
|
20
|
+
"",g=c.map(function(b){return String(b.$id).replace(bc,"$1")})+b+e+f,h=cc(b).concat(),k=[],l=[],m=[],n="";c=jb(c);d.vars=[];for(var n=0,s=c.length;n<s;n++)if(h.length){var q="vm"+G+"_"+n;l.push(q);m.push(c[n]);k.push.apply(k,Vb(h,c[n],q,d))}if(k.length||"duplex"!==e)if("duplex"!==e&&(-1<b.indexOf("||")||-1<b.indexOf("&&"))&&d.vars.forEach(function(c){b=b.replace(RegExp("\\b"+c+"(?:\\.\\w+|\\[\\w+\\])+","ig"),function(d,e){var f=d.charAt(c.length),g=za?b.slice(e+d.length):RegExp.rightContext,g=/^\s*\(/.test(g);
|
21
|
+
if("."===f||"["===f||g){f="var"+String(Math.random()).replace(/^0\./,"");if(g){g=d.split(".");if(2<g.length){var h=g.pop();k.push(f+" = "+g.join("."));return f+"."+h}return d}k.push(f+" = "+d);return f}return d})}),d.args=m,c=Aa[g])d.evaluator=c;else{(n=k.join(", "))&&(n="var "+n);if(/\S/.test(f)){if(!/text|html/.test(d.type))throw Error("ms-"+d.type+"\u4e0d\u652f\u6301\u8fc7\u6ee4\u5668");b="\nvar ret"+G+" = "+b+";\r\n";b+=Wb("ret"+G,f)}else{if("duplex"===e){e="'use strict';\nreturn function(vvv){\n\t"+
|
22
|
+
n+";\n\tif(!arguments.length){\n\t\treturn "+b+"\n\t}\n\t"+(!dc.test(b)?h.get:b)+"= vvv;\n} ";try{c=Function.apply(z,l.concat(e)),d.evaluator=Aa(g,c)}catch(D){y("debug: parse error,"+D.message)}return}"on"===e?(b=-1===b.indexOf("(")?b+".call(this, $event)":b.replace("(",".call(this,"),l.push("$event"),b="\nreturn "+b+";",f=b.lastIndexOf("\nreturn"),e=b.slice(0,f),f=b.slice(f),b=e+"\n"+f):b="\nreturn "+b+";"}try{c=Function.apply(z,l.concat("'use strict';\n"+n+b)),d.evaluator=Aa(g,c)}catch(X){y("debug: parse error,"+
|
23
|
+
X.message)}finally{h=textBuffer=l=null}}}function H(b,c,d,e,f){Array.isArray(e)&&(b=e.map(function(b){return b.expr?"("+b.value+")":kb(b.value)}).join(" + "));lb(b,c,d);d.evaluator&&!f&&(d.handler=E[d.handlerName||d.type],ua(d))}function $(b,c){var d="_"+b;if(!$[d]){var e=p.createElement(b);B.appendChild(e);c=R?getComputedStyle(e,null).display:e.currentStyle.display;B.removeChild(e);$[d]=c}return $[d]}function Ba(b){return null==b?"":b}function ec(b,c,d,e){c.param.replace(/\w+/g,function(e){(e=avalon.duplexHooks[e])&&
|
24
|
+
"function"===typeof e[d]&&(b=e[d](b,c))});return b}function S(b,c,d){var e=p.createEvent("Events");e.initEvent(c,!0,!0);e.fireByAvalon=!0;d&&(e.detail=d);b.dispatchEvent(e)}function fc(){for(var b=aa.length-1;0<=b;b--)!1===(0,aa[b])()&&aa.splice(b,1);aa.length||clearInterval(mb)}function nb(b,c,d,e){var f=b.template.cloneNode(!0),g=avalon.slice(f.childNodes);d.$stamp&&f.insertBefore(d.$stamp,f.firstChild);c.appendChild(f);b=[d].concat(b.vmodels);e.push({nodes:g,vmodels:b})}function ob(b,c){var d=
|
25
|
+
b.proxies[c];return d?d.$stamp:b.element}function Ca(b,c,d){for(;;){var e=c.previousSibling;if(!e)break;e.parentNode.removeChild(e);d&&d.call(e);if(e===b)break}}function gc(b){var c={$host:[],$outer:{},$stamp:1,$index:0,$first:!1,$last:!1,$remove:avalon.noop};c[b]={get:function(){return this.$host[this.$index]},set:function(b){this.$host.set(this.$index,b)}};var c=I(c,{$last:1,$first:1,$index:1}),d=c.$events;d[b]=d.$first=d.$last=d.$index;c.$id=K("$proxy$each");return c}function hc(b,c){for(var d=
|
26
|
+
c.param||"el",e,f=0,g=la.length;f<g;f++){var h=la[f];h&&h.hasOwnProperty(d)&&(e=h,la.splice(f,1))}e||(e=gc(d));var k=c.$repeat,d=k.length-1;e.$index=b;e.$first=0===b;e.$last=b===d;e.$host=k;e.$outer=c.$outer;e.$stamp=c.clone.cloneNode(!1);e.$remove=function(){return k.removeAt(e.$index)};return e}function ic(){var b=I({$key:"",$outer:{},$host:{},$val:{get:function(){return this.$host[this.$key]},set:function(b){this.$host[this.$key]=b}}},{$val:1});b.$id=K("$proxy$with");return b}function jc(b,c){var d=
|
27
|
+
pb.pop();d||(d=ic());var e=c.$repeat;d.$key=b;d.$host=e;d.$outer=c.$outer;e.$events?d.$events.$val=e.$events[b]:d.$events={};return d}function ra(b,c){var d="each"===c?la:pb;avalon.each(b,function(b,c){if(c.$events){for(var g in c.$events)Array.isArray(c.$events[g])&&(c.$events[g].forEach(function(b){"object"===typeof b&&Ua(b)}),c.$events[g].length=0);c.$host=c.$outer={};d.unshift(c)>r.maxRepeatSize&&d.pop()}});"each"===c&&(b.length=0)}function qb(b,c,d,e){b=(b+"").replace(/[^0-9+\-Ee.]/g,"");b=!isFinite(+b)?
|
28
|
+
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<f[0].length&&(f[0]=f[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,e));if((f[1]||"").length<c)f[1]=f[1]||"",f[1]+=Array(c-f[1].length+1).join("0");return f.join(d)}function ba(){C?(v["ready!"].state=2,C.checkDeps()):rb.forEach(function(b){b(avalon)});ba=z}var G=Date.now(),p=t.document,
|
29
|
+
F=p.head;F.insertAdjacentHTML("afterBegin",'<avalon ms-skip><style id="avalonStyle">.avalonHide{ display: none!important }</style></avalon>');var Da=F.firstChild,J="$"+G,kc=t.require,lc=t.define,qa=!1,w=/[^, ]+/g,Ra=/^(?:object|array)$/,sb=/^\[object SVG\w*Element\]$/,mc=/^\[object (?:Window|DOMWindow|global)\]$/,Ea=Object.prototype,Oa=Ea.hasOwnProperty,ca=Ea.toString,O=Array.prototype,ga=O.slice,Y={},R=t.dispatchEvent,B=p.documentElement,U=p.createDocumentFragment(),ma=p.createElement("div"),tb=
|
30
|
+
{};"Boolean Number String Function Array Date RegExp Object Error".replace(w,function(b){tb["[object "+b+"]"]=b.toLowerCase()});var K=function(b){return((b||"avalon")+Math.random()+Math.random()).replace(/0\./g,"")},za=function(){if(t.VBArray){var b=document.documentMode;return b?b:t.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):
|
31
|
+
"object"===typeof b||"function"===typeof b?tb[ca.call(b)]||"object":typeof b};var Q=function(b){return"[object Function]"==ca.call(b)};avalon.isFunction=Q;avalon.isWindow=function(b){return mc.test(ca.call(b))};avalon.isPlainObject=function(b){return"[object Object]"===ca.call(b)&&Object.getPrototypeOf(b)===Ea};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&&!Q(g)&&(g={});h===k&&
|
32
|
+
(g=this,h--);for(;h<k;h++)if(null!=(b=arguments[h]))for(c in b)d=g[c],e=b[c],g!==e&&(l&&e&&(avalon.isPlainObject(e)||(f=Array.isArray(e)))?(f?(f=!1,d=d&&Array.isArray(d)?d:[]):d=d&&avalon.isPlainObject(d)?d:{},g[c]=avalon.mix(l,d,e)):void 0!==e&&(g[c]=e));return g};avalon.mix({rword:w,subscribers:J,version:1.391,ui:{},log:y,slice:function(b,c,d){return ga.call(b,c,d)},noop:z,error:function(b,c){throw new (c||Error)(b);},oneObject:P,range:function(b,c,d){d||(d=1);null==c&&(c=b||0,b=0);var e=-1;c=Math.max(0,
|
33
|
+
Math.ceil((c-b)/d));for(var f=Array(c);++e<c;)f[e]=b,b+=d;return f},eventHooks:{},bind:function(b,c,d,e){var f=avalon.eventHooks[c];"object"===typeof f&&(c=f.type,f.deel&&(d=f.deel(b,d)));b.addEventListener(c,d,!!e);return d},unbind:function(b,c,d,e){var f=avalon.eventHooks[c];d=d||z;"object"===typeof f&&(c=f.type);b.removeEventListener(c,d,!!e)},css:function(b,c,d){b instanceof avalon&&(b=b[0]);var e=/[_-]/.test(c)?ja(c):c;c=avalon.cssName(e)||e;if(void 0===d||"boolean"===typeof d)return e=x[e+":get"]||
|
34
|
+
x["@:get"],"background"===c&&(c="backgroundColor"),b=e(b,c),!0===d?parseFloat(b)||0:b;""===d?b.style[c]="":null==d||d!==d||(isFinite(d)&&!avalon.cssNumber[e]&&(d+="px"),e=x[e+":set"]||x["@:set"],e(b,c,d))},each:function(b,c){if(b){var d=0,e;a:{if(b&&"object"===typeof b){e=b.length;var f=ca.call(b);if(/(Array|List|Collection|Map|Arguments)\]$/.test(f)){e=!0;break a}else if("[object Object]"===f&&e===e>>>0){e=!0;break a}}e=!1}if(e)for(e=b.length;d<e&&!1!==c(d,b[d]);d++);else for(d in b)if(b.hasOwnProperty(d)&&
|
35
|
+
c(d,!1===b[d]))break}},getWidgetData:function(b,c){var d=avalon(b).data(),e={},f;for(f in d)0===f.indexOf(c)&&(e[f.replace(c,"").replace(/\w/,function(b){return b.toLowerCase()})]=d[f]);return e},Array:{ensure:function(b,c){if(-1===b.indexOf(c))return b.push(c)},removeAt:function(b,c){return!!b.splice(c,1).length},remove:function(b,c){var d=b.indexOf(c);return~d?avalon.Array.removeAt(b,d):!1}}});var u=avalon.bindingHandlers={},E=avalon.bindingExecutors={};avalon.nextTick=t.setImmediate?setImmediate.bind(t):
|
36
|
+
function(b){setTimeout(b,0)};B.contains||(Node.prototype.contains=function(b){return!!(this.compareDocumentPosition(b)&16)});avalon.contains=function(b,c){try{for(;c=c.parentNode;)if(c===b)return!0;return!1}catch(d){return!1}};if(t.SVGElement){var ub=p.createElementNS("http://www.w3.org/2000/svg","svg");ub.innerHTML='<circle cx="50" cy="50" r="40" fill="red" />';if(!sb.test(ub.firstChild)){var Fa=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",
|
37
|
+
f.tagName.toLowerCase());O.forEach.call(f.attributes,function(b){g.setAttribute(b.name,b.value)});Fa(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(),Fa(b,c),d.insertBefore(c,this));d.removeChild(this)}},innerHTML:{enumerable:!0,
|
38
|
+
configurable:!0,get:function(){var b=RegExp("</"+this.nodeName+">$","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),Fa(b,this))}}})}}var na=avalon.eventHooks;"onmouseenter"in B||avalon.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(b,c){na[b]={type:c,deel:function(c,e){return function(f){var g=f.relatedTarget;if(!g||g!==c&&!(c.compareDocumentPosition(g)&
|
39
|
+
16))return delete f.type,f.type=b,e.call(c,f)}}}});avalon.each({AnimationEvent:"animationend",WebKitAnimationEvent:"webkitAnimationEnd"},function(b,c){t[b]&&!na.animationend&&(na.animationend={type:c})});void 0===p.onmousewheel&&(na.mousewheel={type:"wheel",deel:function(b,c){return function(d){d.wheelDeltaY=d.wheelDelta=0<d.deltaY?-120:120;d.wheelDeltaX=0;Object.defineProperty(d,"type",{value:"mousewheel"});c.call(b,d)}}});var L,M,Z,vb,eb,wb=/[-.*+?^${}()|[\]\/\\]/g,C=z,da={loader:function(b){t.define=
|
40
|
+
b?C.define:lc;t.require=b?C:kc},interpolate:function(b){L=b[0];M=b[1];if(L===M)throw new SyntaxError("openTag!==closeTag");if("\x3c!--,--\x3e"===b+"")r.commentInterpolate=!0;else{b=L+"test"+M;ma.innerHTML=b;if(ma.innerHTML!==b&&-1<ma.innerHTML.indexOf("<"))throw new SyntaxError("\u6b64\u5b9a\u754c\u7b26\u4e0d\u5408\u6cd5");ma.innerHTML=""}b=(L+"").replace(wb,"\\$&");var c=(M+"").replace(wb,"\\$&");Z=RegExp(b+"(.*?)"+c);vb=RegExp(b+"(.*?)"+c,"g");eb=RegExp(b+".*?"+c+"|\\sms-")}};r.debug=!0;r.plugins=
|
41
|
+
da;r.plugins.interpolate(["{{","}}"]);r.paths={};r.shim={};r.maxRepeatSize=100;avalon.config=r;var A={$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;
|
42
|
+
/^(\w+)!(\S+)$/.test(b)&&(c=RegExp.$1,b=RegExp.$2);var d=this.$events,e=ga.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?p.querySelectorAll(d.expr):[];if(0!==k.length){for(g in avalon.vmodels)h=avalon.vmodels[g],h!==this&&h.$events.expr&&(e=p.querySelectorAll(h.$events.expr),0!==e.length&&Array.prototype.forEach.call(e,function(b){Array.prototype.forEach.call(k,function(d){if("down"===
|
43
|
+
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++];)Q(m)&&m.apply(this,e);for(g=0;m=d[g++];)Q(m)&&m.apply(this,arguments)}}},xb=avalon.vmodels={};avalon.define=function(b,c){var d=b.$id||b;d||y("warning: vm\u5fc5\u987b\u6307\u5b9a$id");
|
44
|
+
xb[d]&&y("warning: "+d+" \u5df2\u7ecf\u5b58\u5728\u4e8eavalon.vmodels\u4e2d");if("object"===typeof b)var e=I(b);else e={$watch:z},c(e),e=I(e),qa=!0,c(e),qa=!1;e.$id=d;return xb[d]=e};var Pa="$id,$watch,$unwatch,$fire,$events,$model,$skipArray".match(w),pa={},nc=Object.defineProperty,Sa=!0;try{nc({},"_",{value:"x"});var Gb=Object.defineProperties}catch(Hc){Sa=!1}var Qa=Object.is||function(b,c){return 0===b&&0===c?1/b===1/c:b!==b?c!==c:b===c},Hb=R?function(b){var c={},d;for(d in b)c[d]={get:b[d],set:b[d],
|
45
|
+
enumerable:!0,configurable:!0};return c}:function(b){return b},sa=O.splice,Ta={_splice:sa,_fire:function(b,c,d){fa(this.$events[J],b,c,d)},size:function(){return this._.length},pushArray:function(b){var c=b.length,d=this.length;c&&(O.push.apply(this.$model,b),T.call(this,"add",d,c,d));return c+d},push:function(){var b,c=arguments.length;for(b=0;b<c;b++);return this.pushArray(arguments)},unshift:function(){var b=arguments.length,c=this.length;b&&(O.unshift.apply(this.$model,arguments),T.call(this,
|
46
|
+
"add",0,b,0));return b+c},shift:function(){if(this.length){var b=this.$model.shift();T.call(this,"del",0,1,0);return b}},pop:function(){var b=this.length;if(b){var c=this.$model.pop();T.call(this,"del",b-1,1,Math.max(0,b-2));return c}},splice:function(b){var c=arguments.length,d=[],e,f=sa.apply(this.$model,arguments);f.length&&(d.push("del",b,f.length,0),e=!0);2<c&&(e?d.splice(3,1,0,"add",b,c-2):d.push("add",b,c-2,0),e=!0);return e?T.apply(this,d):[]},contains:function(b){return-1!==this.indexOf(b)},
|
47
|
+
remove:function(b){return this.removeAt(this.indexOf(b))},removeAt:function(b){return 0<=b?(this.$model.splice(b,1),T.call(this,"del",b,1,0)):[]},clear:function(){this.$model.length=this.length=this._.length=0;this._fire("clear",0);return this},removeAll:function(b){if(Array.isArray(b))b.forEach(function(b){this.remove(b)},this);else if("function"===typeof b)for(var c=this.length-1;0<=c;c--)b(this[c],c)&&this.removeAt(c);else this.clear()},ensure:function(b){this.contains(b)||this.push(b);return this},
|
48
|
+
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(w,function(b){Ta[b]=function(){var c=this.$model,d=c.concat(),e=Math.random(),f=[],g;O[b].apply(c,arguments);for(var h=0,k=d.length;h<k;h++){var l=c[h];Qa(l,d[h])?f.push(h):(g=d.indexOf(l),f.push(g),d[g]=e,g=!0)}g&&
|
49
|
+
(ta(this,f),this._fire("move",f),this._fire("index",0));return this}});var Ib=/^(duplex|on)$/,N=avalon.$$subscribers=[],Xa=new Date,Wa={},oa=new function(){avalon.mix(this,{option:p.createElement("select"),thead:p.createElement("table"),td:p.createElement("tr"),area:p.createElement("map"),tr:p.createElement("tbody"),col:p.createElement("colgroup"),legend:p.createElement("fieldset"),_default:p.createElement("div"),g:p.createElementNS("http://www.w3.org/2000/svg","svg")});this.optgroup=this.option;
|
50
|
+
this.tbody=this.tfoot=this.colgroup=this.caption=this.thead;this.th=this.td};"circle,defs,ellipse,image,line,path,polygon,polyline,rect,symbol,text,use".replace(w,function(b){oa[b]=oa.g});var oc=/<([\w:]+)/,pc=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,qc=P(["","text/javascript","text/ecmascript","application/ecmascript","application/javascript"]),rc=p.createElement("script");avalon.parseHTML=function(b){if("string"!==typeof b)return p.createDocumentFragment();b=b.replace(pc,
|
51
|
+
"<$1></$2>").trim();var c=(oc.exec(b)||["",""])[1].toLowerCase(),c=oa[c]||oa._default,d=U.cloneNode(!1);c.innerHTML=b;b=c.getElementsByTagName("script");if(b.length)for(var e=0,f;f=b[e++];)if(qc[f.type]){var g=rc.cloneNode(!1);O.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=
|
52
|
+
"";b.firstChild;)b.removeChild(b.firstChild);return b};avalon.scan=function(b,c,d){b=b||B;c=c?[].concat(c):[];Za(b,c)};var Rb=P("AREA,BASE,BASEFONT,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,LINK,META,PARAM,SOURCE,TRACK,WBR,NOSCRIPT,SCRIPT,STYLE,TEXTAREA"),ea=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]}},fb=za&&t.MutationObserver?function(b){for(var c=b.firstChild,d;c;){var e=c.nextSibling;3===c.nodeType?d?(d.nodeValue+=c.nodeValue,
|
53
|
+
b.removeChild(c)):d=c:d=null;c=e}}:0,Mb=/ms-(\w+)-?(.*)/,cb={"if":10,repeat:90,data:100,widget:110,each:1400,"with":1500,duplex:2E3,on:3E3},Nb=P("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit"),Ob=P("value,title,alt,checked,selected,disabled,readonly,enabled"),Pb=/^if|widget|repeat$/,Qb=/^each|with|html|include$/,db=/\|\s*html\s*/,Sb=/\|\|/g;"add,remove".replace(w,function(b){avalon.fn[b+
|
54
|
+
"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)},
|
55
|
+
data:function(b,c){b="data-"+gb(b||"");switch(arguments.length){case 2:return this.attr(b,c),this;case 1:var d=this.attr(b);return ka(d);case 0:var e={};O.forEach.call(this[0].attributes,function(c){c&&(b=c.name,b.indexOf("data-")||(b=ja(b.slice(5)),e[b]=ka(c.value)))});return e}},removeData:function(b){b="data-"+gb(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},
|
56
|
+
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&&"static"===avalon.css(b,"position");)b=b.offsetParent;
|
57
|
+
return avalon(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=sc,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}});B.dataset&&(avalon.fn.data=function(b,c){var d=this[0].dataset;
|
58
|
+
switch(arguments.length){case 2:return d[b]=c,this;case 1:return c=d[b],ka(c);case 0:var e={};for(b in d)e[b]=ka(d[b]);return e}});var Tb=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;avalon.parseJSON=JSON.parse;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?
|
59
|
+
f[c]:e[b]}});var x=avalon.cssHooks={},yb=["","-webkit-","-moz-","-ms-"],Ga={"float":"cssFloat"};avalon.cssNumber=P("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom");avalon.cssName=function(b,c,d){if(Ga[b])return Ga[b];c=c||B.style;for(var e=0,f=yb.length;e<f;e++)if(d=ja(yb[e]+b),d in c)return Ga[b]=d;return null};x["@:set"]=function(b,c,d){b.style[c]=d};x["@:get"]=function(b,c){if(!b||!b.style)throw Error("getComputedStyle\u8981\u6c42\u4f20\u5165\u4e00\u4e2a\u8282\u70b9 "+
|
60
|
+
b);var d,e=getComputedStyle(b,null);e&&(d="filter"===c?e.getPropertyValue(c):e[c],""===d&&(d=b.style[c]));return d};x["opacity:get"]=function(b){b=x["@:get"](b,"opacity");return""===b?"1":b};"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 ib={position:"absolute",visibility:"hidden",display:"block"},Ub=/^(none|table(?!-c[ea]).+)/;"Width,Height".replace(w,function(b){var c=b.toLowerCase(),d="client"+b,e="scroll"+
|
61
|
+
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=[];hb(b,d);for(var e=x[c+":get"](b),f=0,m;m=d[f++];){b=m.node;for(var n in m)"string"===
|
62
|
+
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];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||
|
63
|
+
!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 sc={"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<k;l++)if(d=e[l],(d.selected||l===f)&&!d.disabled){c=d.value;if(g)return c;h.push(c)}return h},
|
64
|
+
"select:set":function(b,c,d){c=[].concat(c);for(var e=0,f;f=b.options[e++];)if(f.selected=-1<c.indexOf(f.value))d=!0;d||(b.selectedIndex=-1)}},kb=JSON.stringify,tc=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,uc=/[^\w$]+/g,vc=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,
|
65
|
+
"\\b|\\b")+"\\b"),"g"),wc=/\b\d[^,]*/g,xc=/^,+|,+$/g,Ha=Na(512),cc=function(b){var c=","+b.trim();if(Ha[c])return Ha[c];b=b.replace(tc,"").replace(uc,",").replace(vc,"").replace(wc,"").replace(xc,"").split(/^$|,+/);return Ha(c,jb(b))},Aa=Na(128),dc=/\w\[.*\]|\w\.\w/,bc=/(\$proxy\$[a-z]+)\d+$/,Xb=/\)\s*$/,Yb=/\)\s*\|/g,Zb=/\|\s*([$\w]+)/g,$b=/"\s*\["/g,ac=/"\s*\(/g;avalon.parseExprProxy=H;var Ia={};"autofocus,autoplay,async,allowTransparency,checked,controls,declare,disabled,defer,defaultChecked,defaultSelectedcontentEditable,isMap,loop,multiple,noHref,noResize,noShade,open,readOnly,selected".replace(w,
|
66
|
+
function(b){Ia[b.toLowerCase()]=b});var Ja={"accept-charset":"acceptCharset","char":"ch",charoff:"chOff","class":"className","for":"htmlFor","http-equiv":"httpEquiv"};"accessKey,bgColor,cellPadding,cellSpacing,codeBase,codeType,colSpan,dateTime,defaultValue,frameBorder,longDesc,maxLength,marginWidth,marginHeight,rowSpan,tabIndex,useMap,vSpace,valueType,vAlign".replace(w,function(b){Ja[b.toLowerCase()]=b});var yc=/<noscript.*?>(?:[\s\S]+?)<\/noscript>/img,zc=/<noscript.*?>([\s\S]+?)<\/noscript>/im,
|
67
|
+
Ka=function(){return new (t.XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP")},La=avalon.templateCache={};u.attr=function(b,c){var d=b.value.trim(),e=!0;-1<d.indexOf(L)&&2<d.indexOf(M)&&(e=!1,Z.test(d)&&(""===RegExp.rightContext&&""===RegExp.leftContext)&&(e=!0,d=RegExp.$1));if("include"===b.type){var f=b.element;b.includeRendered=ea(f,"data-include-rendered",c);b.includeLoaded=ea(f,"data-include-loaded",c);var g=b.includeReplaced=!!avalon(f).data("includeReplace");b.startInclude=p.createComment("ms-include");
|
68
|
+
b.endInclude=p.createComment("ms-include-end");g?(b.element=b.startInclude,f.parentNode.insertBefore(b.startInclude,f),f.parentNode.insertBefore(b.endInclude,f.nextSibling)):(f.insertBefore(b.startInclude,f.firstChild),f.appendChild(b.endInclude))}b.handlerName="attr";H(d,c,b,e?0:ya(b.value))};E.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(Ia[f]&&(e=Ia[f],"boolean"===typeof c[e]))return c[e]=!!b;!R&&Ja[f]&&(f=Ja[f]);if(!1===b||null===b||void 0===
|
69
|
+
b)return c.removeAttribute(f);(sb.test(c)?0:p.namespaces&&isVML(c)||f in c.cloneNode(!1))?c[f]=b:c.setAttribute(f,b)}else if("include"===e&&b){var g=d.vmodels,h=d.includeRendered,k=d.includeLoaded,l=d.includeReplaced?c.parentNode:c,m=function(b){k&&(b=k.apply(l,[b].concat(g)));for(h&&ha(l,function(){h.call(l)},NaN);;){var c=d.startInclude.nextSibling;if(c&&c!==d.endInclude)l.removeChild(c);else break}b=avalon.parseHTML(b);c=avalon.slice(b.childNodes);l.insertBefore(b,d.endInclude);ia(c,g)};if("src"===
|
70
|
+
d.param)if(La[b])avalon.nextTick(function(){m(La[b])});else{var n=Ka();n.onreadystatechange=function(){if(4===n.readyState){var c=n.status;if(200<=c&&300>c||304===c||1223===c)m(La[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 s=b&&1===b.nodeType?b:p.getElementById(b);if(s){if("NOSCRIPT"===s.tagName&&!s.innerHTML&&!s.fixIE78){n=Ka();n.open("GET",location,!1);n.send(null);c=p.getElementsByTagName("noscript");
|
71
|
+
for(var f=(n.responseText||"").match(yc)||[],e=f.length,q=0;q<e;q++){var D=c[q];D&&(D.style.display="none",D.fixIE78=(f[q].match(zc)||[""," "])[1])}}avalon.nextTick(function(){m(s.fixIE78||s.value||s.innerText||s.innerHTML)})}}}else{if(!B.hasAttribute&&"string"===typeof b&&("src"===e||"href"===e))b=b.replace(/&/g,"&");c[e]=b;t.chrome&&"EMBED"===c.tagName&&(f=c.parentNode,e=document.createComment("ms-src"),f.replaceChild(e,c),f.replaceChild(c,e))}};"title,alt,src,value,css,include,href".replace(w,
|
72
|
+
function(b){u[b]=u.attr});u["class"]=function(b,c){var d=b.param,e=b.value;b.handlerName="class";if(!d||isFinite(d)){b.param="";var f=e.replace(vb,function(b){return b.replace(/./g,"0")}).indexOf(":");if(-1===f)d=e;else if(d=e.slice(0,f),e=e.slice(f+1),lb(e,c,b),b.evaluator)b._evaluator=b.evaluator,b._args=b.args;else return y("debug: ms-class '"+(e||"").trim()+"' \u4e0d\u5b58\u5728\u4e8eVM\u4e2d"),!1;e=Z.test(d);e||(b.immobileClass=d);H("",c,b,e?ya(d):0)}else b.immobileClass=b.oldStyle=b.param,H(e,
|
73
|
+
c,b)};E["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){var g="mouseenter",h="mouseleave";if("active"===f){c.tabIndex=c.tabIndex||-1;var g="mousedown",
|
74
|
+
h="mouseup",k=e.bind("mouseleave",function(){d.toggleClass&&e.removeClass(d.newClass)})}var l=e.bind(g,function(){d.toggleClass&&e.addClass(d.newClass)}),m=e.bind(h,function(){d.toggleClass&&e.removeClass(d.newClass)});d.rollback=function(){e.unbind("mouseleave",k);e.unbind(g,l);e.unbind(h,m)};d.hasBindEvent=!0}}};"hover,active".replace(w,function(b){u[b]=u["class"]});E.data=function(b,c,d){d="data-"+d.param;b&&"object"===typeof b?c[d]=b:c.setAttribute(d,String(b))};E.text=function(b,c){b=null==b?
|
75
|
+
"":b;if(3===c.nodeType)try{c.data=b}catch(d){}else c.textContent=b};E.html=function(b,c,d){b=null==b?"":b;var e="group"in d,f=e?c.parentNode:c;if(f){if(11!==b.nodeType)if(1===b.nodeType||b.item){var g=1===b.nodeType?b.childNodes:b.item?b:[];for(b=U.cloneNode(!0);g[0];)b.appendChild(g[0])}else b=avalon.parseHTML(b);var h=p.createComment("ms-html");if(e){f.insertBefore(h,c);for(var g=d.group,k=1;k<g;){var l=c.nextSibling;l&&(f.removeChild(l),k++)}f.removeChild(c);d.element=h}else avalon.clearHTML(f).appendChild(h);
|
76
|
+
e&&(d.group=b.childNodes.length||1);g=avalon.slice(b.childNodes);g[0]&&(h.parentNode&&h.parentNode.replaceChild(b,h),e&&(d.element=g[0]));ia(g,d.vmodels)}};u["if"]=u.data=u.text=u.html=function(b,c){H(b.value,c,b)};E["if"]=function(b,c,d){b?(8===c.nodeType&&(c.parentNode.replaceChild(d.template,c),c=d.element=d.template),c.getAttribute(d.name)&&(c.removeAttribute(d.name),$a(c,d.vmodels)),d.rollback=null):1===c.nodeType&&(b=d.element=p.createComment("ms-if"),c.parentNode.replaceChild(b,c),d.template=
|
77
|
+
c,Da.appendChild(c),d.rollback=function(){c.parentNode===Da&&Da.removeChild(c)})};avalon.parseDisplay=$;u.visible=function(b,c){var d=avalon(b.element),e=d.css("display");if("none"===e){var f=d[0].style,g=/visibility/i.test(f.cssText),h=d.css("visibility");f.display="";f.visibility="hidden";e=d.css("display");"none"===e&&(e=$(d[0].nodeName));f.visibility=g?h:""}b.display=e;H(b.value,c,b)};E.visible=function(b,c,d){c.style.display=b?d.display:"none"};var zb=/\(([^)]*)\)/;u.on=function(b,c){var d=b.value;
|
78
|
+
b.type="on";var e=b.param.replace(/-\d+$/,"");if("function"===typeof u.on[e+"Hook"])u.on[e+"Hook"](b);if(0<d.indexOf("(")&&-1<d.indexOf(")")&&(e=(d.match(zb)||["",""])[1].trim(),""===e||"$event"===e))d=d.replace(zb,"");H(d,c,b)};E.on=function(b,c,d){b=function(b){return(d.evaluator||z).apply(this,d.args.concat(b))};var e=d.param.replace(/-\d+$/,"");if("scan"===e)b.call(c,{type:e});else if("function"===typeof d.specialBind)d.specialBind(c,b);else var f=avalon.bind(c,e,b);d.rollback=function(){"function"===
|
79
|
+
typeof d.specialUnbind?d.specialUnbind():avalon.unbind(c,e,f)}};u.widget=function(b,c){var d=b.value.match(w),e=b.element,f=d[0],g=d[1];if(!g||"$"===g)g=K(f);var d=d[2]||f,h=avalon.ui[f];if("function"===typeof h){c=e.vmodels||c;for(var k=0,l;l=c[k++];)if(l.hasOwnProperty(d)&&"object"===typeof l[d]){var m=l[d],m=m.$model||m;break}m&&(k=m[f+"Id"],"string"===typeof k&&(g=k));k=avalon.getWidgetData(e,f);b.value=[f,g,d].join();b[f+"Id"]=g;b.evaluator=z;e.msData["ms-widget-id"]=g;var n=b[f+"Options"]=avalon.mix({},
|
80
|
+
h.defaults,m||{},k);e.removeAttribute("ms-widget");var s=h(e,b,c)||{};s.$id?(avalon.vmodels[g]=s,Ya(e,s),s.hasOwnProperty("$init")&&s.$init(function(){avalon.scan(e,[s].concat(c));"function"===typeof n.onInit&&n.onInit.call(e,s,n,c)}),b.rollback=function(){try{s.widgetElement=null,s.$remove()}catch(b){}e.msData={};delete avalon.vmodels[s.$id]},va(b,Ac),t.chrome&&e.addEventListener("DOMNodeRemovedFromDocument",function(){setTimeout(Va)})):avalon.scan(e,c)}else c.length&&(e.vmodels=c)};var Ac=[],V=
|
81
|
+
u.duplex=function(b,c){var d=b.element,e;H(b.value,c,b,0,1);b.changed=ea(d,"data-duplex-changed",c)||z;if(b.evaluator&&b.args){var f=[],g=P("string,number,boolean,checked");"radio"===d.type&&""===b.param&&(b.param="checked");d.msData&&(d.msData["ms-duplex"]=b.value);b.param.replace(/\w+/g,function(c){/^(checkbox|radio)$/.test(d.type)&&/^(radio|checked)$/.test(c)&&("radio"===c&&y("ms-duplex-radio\u5df2\u7ecf\u66f4\u540d\u4e3ams-duplex-checked"),c="checked",b.isChecked=!0);"bool"===c?(c="boolean",y("ms-duplex-bool\u5df2\u7ecf\u66f4\u540d\u4e3ams-duplex-boolean")):
|
82
|
+
"text"===c&&(c="string",y("ms-duplex-text\u5df2\u7ecf\u66f4\u540d\u4e3ams-duplex-string"));g[c]&&(e=!0);avalon.Array.ensure(f,c)});e||f.push("string");b.param=f.join("-");b.bound=function(c,e){d.addEventListener?d.addEventListener(c,e,!1):d.attachEvent("on"+c,e);var f=b.rollback;b.rollback=function(){d.avalonSetter=null;avalon.unbind(d,c,e);f&&f()}};for(var h in avalon.vmodels)avalon.vmodels[h].$fire("avalon-ms-duplex-init",b);(b.pipe||(b.pipe=ec))(null,b,"init");h=d.tagName;V[h]&&V[h](d,b.evaluator.apply(null,
|
83
|
+
b.args),b)}};avalon.duplexHooks={checked:{get:function(b,c){return!c.element.oldValue}},string:{get:function(b){return b},set:Ba},"boolean":{get:function(b){return"true"===b},set:Ba},number:{get:function(b){return isFinite(b)?parseFloat(b)||0:b},set:Ba}};var mb,aa=[];avalon.tick=function(b){1===aa.push(b)&&(mb=setInterval(fc,60))};var Ab=z;new function(){try{var b={},c=HTMLInputElement.prototype,d=HTMLTextAreaElement.prototype,e=function(c){avalon.contains(B,this)&&(b[this.tagName].call(this,c),this.avalonSetter&&
|
84
|
+
this.avalonSetter())};Object.getOwnPropertyNames(HTMLInputElement.prototype);b.INPUT=Object.getOwnPropertyDescriptor(c,"value").set;Object.defineProperty(c,"value",{set:e});b.TEXTAREA=Object.getOwnPropertyDescriptor(d,"value").set;Object.defineProperty(d,"value",{set:e})}catch(f){Ab=avalon.tick}};V.INPUT=function(b,c,d){function e(b){d.changed.call(this,b,d)}function f(){n=!0}function g(){n=!1}function h(){if(!n){var f=b.oldValue=b.value,f=d.pipe(f,d,"get");!1!==m.data("duplex-observe")&&(c(f),e.call(b,
|
85
|
+
f),m.data("duplex-focus")&&avalon.nextTick(function(){b.focus()}))}}var k=b.type,l=d.bound,m=avalon(b),n=!1;d.handler=function(){var e=d.pipe(c(),d,"set")+"";e!==b.oldValue&&(b.value=e)};d.isChecked||"radio"===b.type?(h=function(){if(!1!==m.data("duplex-observe")){var f=d.pipe(b.value,d,"get");c(f);e.call(b,f)}},d.handler=function(){var e=c();b.checked=b.oldValue=d.isChecked?!!e:e+""===b.value},l("click",h)):"checkbox"===k?(h=function(){if(!1!==m.data("duplex-observe")){var f=b.checked?"ensure":"remove",
|
86
|
+
g=c();Array.isArray(g)||(y("ms-duplex\u5e94\u7528\u4e8echeckbox\u4e0a\u8981\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"),g=[g]);avalon.Array[f](g,d.pipe(b.value,d,"get"));e.call(b,g)}},d.handler=function(){var e=[].concat(c());b.checked=-1<e.indexOf(d.pipe(b.value,d,"get"))},l("change",h)):(k=b.getAttribute("data-duplex-event")||b.getAttribute("data-event")||"input",b.attributes["data-event"]&&y("data-event\u6307\u4ee4\u5df2\u7ecf\u5e9f\u5f03\uff0c\u8bf7\u6539\u7528data-duplex-event"),k.replace(w,function(b){switch(b){case "input":l("input",
|
87
|
+
h);l("DOMAutoComplete",h);za||(l("compositionstart",f),l("compositionend",g));break;default:l(b,h)}}));/text|password/.test(b.type)&&Ab(function(){if(B.contains(b))b.value!==b.oldValue&&h();else if(!b.msRetain)return!1});b.avalonSetter=h;b.oldValue=b.value;ua(d);e.call(b,b.value)};V.TEXTAREA=V.INPUT;V.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||y("ms-duplex\u5728<select multiple=true>\u4e0a\u8981\u6c42\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"):
|
88
|
+
b.multiple&&y("ms-duplex\u5728<select multiple=false>\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)}});ha(b,function(){ua(d);d.changed.call(b,c(),d)},NaN)};u.repeat=function(b,c){var d=b.type;H(b.value,c,b,0,
|
89
|
+
1);b.proxies=[];var e=!1;try{var f=b.$repeat=b.evaluator.apply(0,b.args||[]),g=avalon.type(f);"object"!==g&&"array"!==g&&(e=!0,avalon.log("warning:"+b.value+"\u5bf9\u5e94\u7c7b\u578b\u4e0d\u6b63\u786e"))}catch(h){e=!0,avalon.log("warning:"+b.value+"\u7f16\u8bd1\u51fa\u9519")}var k=b.value.split(".")||[];if(1<k.length){k.pop();for(var l=k[0],k=0,m;m=c[k++];)if(m&&m.hasOwnProperty(l)){k=m[l].$events||{};k[J]=k[J]||[];k[J].push(b);break}}k=b.element;k.removeAttribute(b.name);b.sortedCallback=ea(k,"data-with-sorted",
|
90
|
+
c);b.renderedCallback=ea(k,"data-"+d+"-rendered",c);l=K(d);m=b.element=p.createComment(l+":end");b.clone=p.createComment(l);U.appendChild(m);"each"===d||"with"===d?(b.template=k.innerHTML.trim(),avalon.clearHTML(k).appendChild(m)):(b.template=k.outerHTML.trim(),k.parentNode.replaceChild(m,k));b.template=avalon.parseHTML(b.template);b.rollback=function(){var c=b.element;if(c){E.repeat.call(b,"clear");var d=c.parentNode,e=b.template,f=e.firstChild;d.replaceChild(e,c);(c=b.$stamp)&&c.parentNode&&c.parentNode.removeChild(c);
|
91
|
+
b.element="repeat"===b.type?f:d}};if(!e){b.handler=E.repeat;b.$outer={};d="$key";e="$val";Array.isArray(f)&&(d="$first",e="$last");for(k=0;l=c[k++];)if(l.hasOwnProperty(d)&&l.hasOwnProperty(e)){b.$outer=l;break}d=f.$events;(e=(d||{})[J])&&avalon.Array.ensure(e,b)&&va(b,e);"object"===g?(b.$with=!0,g=!d?{}:d.$withProxyPool||(d.$withProxyPool={}),b.handler("append",f,g)):f.length&&b.handler("add",0,f.length)}};E.repeat=function(b,c,d){if(b){var e=this.element,f=e.parentNode,g=this.proxies,h=U.cloneNode(!1);
|
92
|
+
switch(b){case "add":for(var e=c+d,k=this.$repeat.length-1,k=[],l=ob(this,c),m=c;m<e;m++){var n=hc(m,this);g.splice(m,0,n);nb(this,h,n,k)}f.insertBefore(h,l);for(m=0;h=k[m++];)ia(h.nodes,h.vmodels),h.nodes=h.vmodels=null;break;case "del":l=g[c].$stamp;e=ob(this,c+d);Ca(l,e);h=g.splice(c,d);ra(h,"each");break;case "clear":if(h=this.$stamp||g[0])l=h.$stamp||h,Ca(l,e);ra(g,"each");break;case "move":var l=g[0].$stamp,s=l.nodeValue,q=[],D=[];Ca(l,e,function(){D.unshift(this);this.nodeValue===s&&(q.unshift(D),
|
93
|
+
D=[])});ta(g,c);for(ta(q,c);D=q.shift();)for(;k=D.shift();)h.appendChild(k);f.insertBefore(h,e);break;case "index":for(k=g.length-1;d=g[c];c++)d.$index=c,d.$first=0===c,d.$last=c===k;return;case "set":(n=g[c])&&fa(n.$events.$index);return;case "append":g=d;l=[];k=[];for(n in c)c.hasOwnProperty(n)&&"hasOwnProperty"!==n&&l.push(n);this.sortedCallback&&(m=this.sortedCallback.call(f,l))&&(Array.isArray(m)&&m.length)&&(l=m);for(m=0;n=l[m++];)"hasOwnProperty"!==n&&(g[n]||(g[n]=jc(n,this)),nb(this,h,g[n],
|
94
|
+
k));m=this.$stamp=this.clone;f.insertBefore(m,e);f.insertBefore(h,e);for(m=0;h=k[m++];)ia(h.nodes,h.vmodels),h.nodes=h.vmodels=null}"clear"===b&&(b="del");var X=this.renderedCallback||z,p=arguments;ha(f,function(){X.apply(f,p);f.oldValue&&"SELECT"===f.tagName&&avalon(f).val(f.oldValue.split(","))},NaN)}};"with,each".replace(w,function(b){u[b]=u.repeat});var la=[],pb=[],Bc=/<script[^>]*>([\S\s]*?)<\/script\s*>/gim,Cc=/\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,Dc=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/ig,
|
95
|
+
Ec={a:/\b(href)\=("javascript[^"]*"|'javascript[^']*')/ig,img:/\b(src)\=("javascript[^"]*"|'javascript[^']*')/ig,form:/\b(action)\=("javascript[^"]*"|'javascript[^']*')/ig},Fc=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Gc=/([^\#-~| |!])/g,Ma=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)},$filter:function(b){for(var c=1,d=arguments.length;c<
|
96
|
+
d;c++){var e=arguments[c],f=avalon.filters[e.shift()];"function"===typeof f&&(e=[b].concat(e),b=f.apply(null,e))}return b},camelize:ja,sanitize:function(b){return b.replace(Bc,"").replace(Dc,function(b,d){var e=b.toLowerCase().match(/<(\w+)\s/);e&&(e=Ec[e[1]])&&(b=b.replace(e,function(b,c,d){b=d.charAt(0);return c+"="+b+"javascript:void(0)"+b}));return b.replace(Cc," ").replace(/\s+/g," ")})},escape:function(b){return String(b).replace(/&/g,"&").replace(Fc,function(b){var d=b.charCodeAt(0);b=
|
97
|
+
b.charCodeAt(1);return"&#"+(1024*(d-55296)+(b-56320)+65536)+";"}).replace(Gc,function(b){return"&#"+b.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")},currency:function(b,c,d){return(c||"\uffe5")+qb(b,isFinite(d)?d:2)},number:function(b,c){return qb(b,isFinite(c)?c:3)}};new function(){function b(b,c,d){var e="";0>b&&(e="-",b=-b);for(b=""+b;b.length<c;)b="0"+b;d&&(b=b.substr(b.length-c));return e+b}function c(c,d,e,f){return function(g){g=g["get"+c]();if(0<e||g>-e)g+=e;0===g&&-12===e&&
|
98
|
+
(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)));
|
99
|
+
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]},Z:function(c){c=-1*c.getTimezoneOffset();return c=
|
100
|
+
(0<=c?"+":"")+(b(Math[0<c?"floor":"ceil"](c/60),2)+b(Math.abs(c%60),2))}},g=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,h=/^\d+$/,k=/^(\d{4})-?(\d+)-?(\d+)(?:T(\d+)(?::?(\d+)(?::?(\d+)(?:\.(\d+))?)?)?(Z|([+-])(\d+):?(\d+))?)?$/,l=/^(\d+)\D(\d+)\D(\d+)/;Ma.date=function(b,c){var d=Ma.date.locate,k="",m=[],p,r;c=c||"mediumDate";c=d[c]||c;"string"===typeof b&&(h.test(b)?b=parseInt(b,10):(b=b.trim().replace(l,function(b,c,d,e){return(4===e.length?[e,c,d]:[c,d,e]).join("-")}),
|
101
|
+
b=e(b)),b=new Date(b));"number"===typeof b&&(b=new Date(b));if("date"===avalon.type(b)){for(;c;)(r=g.exec(c))?(m=m.concat(r.slice(1)),c=m.pop()):(m.push(c),c=null);m.forEach(function(c){p=f[c];k+=p?p(b,d):c.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return k}};var m={AMPMS:{"0":"\u4e0a\u5348",1:"\u4e0b\u5348"},DAY:{"0":"\u661f\u671f\u65e5",1:"\u661f\u671f\u4e00",2:"\u661f\u671f\u4e8c",3:"\u661f\u671f\u4e09",4:"\u661f\u671f\u56db",5:"\u661f\u671f\u4e94",6:"\u661f\u671f\u516d"},MONTH:{"0":"1\u6708",
|
102
|
+
1:"2\u6708",2:"3\u6708",3:"4\u6708",4:"5\u6708",5:"6\u6708",6:"7\u6708",7:"8\u6708",8:"9\u6708",9:"10\u6708",10:"11\u6708",11:"12\u6708"},SHORTDAY:{"0":"\u5468\u65e5",1:"\u5468\u4e00",2:"\u5468\u4e8c",3:"\u5468\u4e09",4:"\u5468\u56db",5:"\u5468\u4e94",6:"\u5468\u516d"},fullDate:"y\u5e74M\u6708d\u65e5EEEE",longDate:"y\u5e74M\u6708d\u65e5",medium:"yyyy-M-d H:mm:ss",mediumDate:"yyyy-M-d",mediumTime:"H:mm:ss","short":"yy-M-d ah:mm",shortDate:"yy-M-d",shortTime:"ah:mm"};m.SHORTMONTH=m.MONTH;Ma.date.locate=
|
103
|
+
m};var v=avalon.modules={"ready!":{exports:avalon},avalon:{exports:avalon,state:2}};v.exports=v.avalon;new function(){function b(c,d){for(var e in c)if("\u53f8\u5f92\u6b63\u7f8e"===c[e]&&2!==v[e].state&&(e===d||b(v[e].deps,d)))return!0}function c(b,c,d){var f=e(b.src);b.onload=b.onreadystatechange=b.onerror=null;if(c||d&&!v[f].state)setTimeout(function(){F.removeChild(b);b=null}),y("debug: \u52a0\u8f7d "+f+" \u5931\u8d25"+c+" "+!v[f].state);else return!0}function d(){var b=u.length,c;a:for(;c=u[--b];){var e=
|
104
|
+
v[c];c=e.deps;for(var f in c)if(Oa.call(c,f)&&2!==v[f].state)continue a;if(2!==e.state){u.splice(b,1);c=e.id;var g=e.args,e=e.factory,h=Object(v[c]);h.state=2;for(var k=0,l=[],q=void 0;q=g[k++];)"exports"===q?(q=h.exports||(h.exports={}),l.push(q)):l.push(v[q].exports);g=e.apply(t,l);void 0!==g&&(v[c].exports=g);d()}}}function e(b){return(b||"").replace(H,"")}function f(b){return b?b.substr(0,b.lastIndexOf("/")):r.baseUrl?r.baseUrl:r.loaderUrl}function g(b){var c;try{a.b.c()}catch(d){c=d.stack,!c&&
|
105
|
+
t.opera&&(c=(String(d).match(/of linked script \S+/g)||[]).join(" "))}if(c)return c=c.split(/[@ ]/g).pop(),c="("===c[0]?c.slice(1,-1):c.replace(/\s/,""),c.replace(/(:\d+)?:\d+$/i,"");for(var e=(b?p:F).getElementsByTagName("script"),f=e.length;c=e[--f];)if((b||c.className===J)&&"interactive"===c.readyState)return b="1"[0]?c.src:c.getAttribute("src",4),c.className=b}function h(b,c,d){if("ready!"===b||v[b]&&2===v[b].state)return b;var e=b.match(/(\w+!)?(.+)/),g=e[1]||"js",g=da[g]||z,h="",e=e[2].replace(H,
|
106
|
+
function(b){h=b;return""}),k=g.ext||"";k&&e.substr(e.length-k.length)===k&&(b=e.slice(0,-k.length),e=e.slice(-k.length));var l=0;s(e,r.paths,function(c,d){b=b.replace(d,c);l=1});l||s(e,r.packages,function(c,d,e){b=b.replace(e.name,e.location)});d&&s(d,r.map,function(c){s(b,c,function(c,d){b=b.replace(d,c)})});/^(?:[a-z]+:)?\/\//i.test(String(b))||(b=D(/\w/.test(b.charAt(0))?f():c,b));b+=k+h;s(e,r.urlArgs,function(c){b+=(-1===b.indexOf("?")?"?":"&")+c});return g(b,r.shim[e])}function k(b,e,f){var g=
|
107
|
+
p.createElement("script");g.className=J;g[R?"onload":"onreadystatechange"]=function(){if(R||/loaded|complete/i.test(g.readyState)){var h=w.pop();h&&h.require(e);f&&f();c(g,!1,!R)&&(y("debug: \u5df2\u6210\u529f\u52a0\u8f7d "+b),u.push(e),d())}};g.onerror=function(){c(g,!0)};g.src=b;F.insertBefore(g,F.firstChild);y("debug: \u6b63\u51c6\u5907\u52a0\u8f7d "+b)}function l(b,c,d){var e=[],f;for(f in b)if(b.hasOwnProperty(f)){var g={name:f,val:b[f]};e.push(g);g.reg="*"===f&&c?/^/:RegExp("^"+f+"(/|$)");d&&
|
108
|
+
"*"!==f&&(g.reg=RegExp("/"+f.replace(/^\//,"")+"(/|$)"))}e.sort(q);return e}function m(b){return function(){var c;b.init&&(c=b.init.apply(t,arguments));return c||b.exports&&X(b.exports)}}function n(b,c,d,e,f){return{id:b,state:c||1,factory:d||z,deps:e||{},args:f||[]}}function s(b,c,d){c=c||[];for(var e=0,f;f=c[e++];)if(f.reg.test(b))return d(f.val,f.name,f),!1}function q(b,c){var d=b.name,e=c.name;return"*"===e?-1:"*"===d?1:e.length-d.length}function D(b,c){"/"!==b.charAt(b.length-1)&&(b+="/");if("./"===
|
109
|
+
c.slice(0,2))return b+c.slice(2);if(".."===c.slice(0,2)){for(b+=c;I.test(b);)b=b.replace(I,"");return b}return"/"===c.slice(0,1)?b+c.slice(1):b+c}function X(b){if(!b)return b;var c=t;b.split(".").forEach(function(b){c=c[b]});return c}var u=[],w=[];C=avalon.require=function(b,c,e){Array.isArray(b)||avalon.error("require\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u5fc5\u987b\u662f\u4f9d\u8d56\u5217\u6570,\u7c7b\u578b\u4e3a\u6570\u7ec4 "+b);var g=[],k={},l=e||"callback"+setTimeout("1"),q=e&&e.replace(/\.js$/i,
|
110
|
+
"");e=f(e);b.forEach(function(b){if((b=h(b,e,q))&&!k[b])g.push(b),k[b]="\u53f8\u5f92\u6b63\u7f8e"});b=v[l];if(!b||2!==b.state)v[l]=n(l,1,c,k,g);b||u.push(l);d()};C.define=function(c,d,f){var h=ga.call(arguments);if("string"===typeof c)var k=h.shift();"function"===typeof h[0]&&h.unshift([]);var l=v[k]&&1<=v[k].state?k:e(g());f=h[1];f.id=k;!v[l]&&k&&(v[l]=n(l,1,f));f.require=function(c){h.push(c);var d=!0;try{d=b(v[c].deps,c)}catch(e){}d&&avalon.error(c+"\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"+
|
111
|
+
c+"\u6a21\u5757");delete f.require;C.apply(null,h)};l?f.require(l):w.push(f)};C.config=r;C.define.amd=v;var x=r["orig.paths"]={},B=r["orig.map"]={},E=r.packages=[],G=r["orig.args"]={};avalon.mix(da,{paths:function(b){avalon.mix(x,b);r.paths=l(x)},map:function(b){avalon.mix(B,b);b=l(B,1,1);avalon.each(b,function(b,c){c.val=l(c.val)});r.map=b},packages:function(b){b=b.concat(E);for(var c={},d=[],e=0,f;f=b[e++];){f="string"===typeof f?{name:f}:f;var g=f.name;if(!c[g]){var h=f.location?f.location:D(g,
|
112
|
+
f.main||"main"),h=h.replace(/\.js$/i,"");d.push(f);c[g]=f.location=h;f.reg=RegExp("^"+g+"(/|$)")}}r.packages=d.sort()},urlArgs:function(b){"string"===typeof b&&(b={"*":b});avalon.mix(G,b);r.urlArgs=l(G,1)},bundles:function(b){var c=r.bundles={},d;for(d in b)avalon.each(b[d],function(b,e){c[e]=d})},baseUrl:function(b){if(!/^(?:[a-z]+:)?\/\//i.test(String(b))){var c=F.getElementsByTagName("base")[0];c&&F.removeChild(c);var d=p.createElement("a");d.href=b;b="1"[0]?d.href:d.getAttribute("href",4);c&&
|
113
|
+
F.insertBefore(c,F.firstChild)}r.baseUrl=b},shim:function(b){for(var c in b){var d=b[c];Array.isArray(d)&&(d=b[c]={deps:d});if(!d.exportsFn&&(d.exports||d.init))d.exportsFn=m(d)}r.shim=b},js:function(b,c){var d=e(b);if(!v[d]){var f=v[d]=n(d);c?C(c.deps||[],function(){var e=avalon.slice(arguments);k(b,d,function(){f.state=2;c.exportsFn&&(f.exports=c.exportsFn.apply(0,e));C.checkDeps()})}):k(b,d)}return d},css:function(b){var c=e(b).replace(/\W/g,"_");if(!p.getElementById(c)){var d=p.createElement("link");
|
114
|
+
d.rel="stylesheet";d.href=b;d.id=c;F.insertBefore(d,F.firstChild)}},text:function(b){var c=Ka(),d=e(b);v[d]={};c.onreadystatechange=function(){if(4===c.readyState){var e=c.status;399<e&&600>e?avalon.error(b+" \u5bf9\u5e94\u8d44\u6e90\u4e0d\u5b58\u5728\u6216\u6ca1\u6709\u5f00\u542f CORS"):(v[d].state=2,v[d].exports=c.responseText,C.checkDeps())}};c.open("GET",b,!0);"withCredentials"in c&&(c.withCredentials=!0);c.setRequestHeader("X-Requested-With","XMLHttpRequest");c.send();return d}});da.css.ext=
|
115
|
+
".css";da.js.ext=".js";C.checkDeps=d;var H=/(\?[^#]*)$/,I=/\/\w+\/\.\./,A=g(!0);A||(A=p.scripts[p.scripts.length-1].src);A=e(A);r.loaderUrl=A.slice(0,A.lastIndexOf("/")+1)};var rb=[];"complete"===p.readyState?setTimeout(ba):(p.addEventListener("DOMContentLoaded",ba),t.addEventListener("load",ba));avalon.ready=function(b){C?C(["ready!"],b):ba===z?b(avalon):rb.push(b)};avalon.config({loader:!0});avalon.ready(function(){avalon.scan(p.body)});new function(){function b(b){var c=b.touches&&b.touches.length?
|
116
|
+
b.touches:[b];b=b.changedTouches?b.changedTouches[0]:c[0];return{x:b.clientX,y:b.clientY}}function c(b){avalon(h.element).removeClass(p.activeClass);h.tapping&&(h.element=null)}var d=navigator.userAgent,e=0<d.indexOf("Android"),f=/iP(ad|hone|od)/.test(d),g=u.on,h={},d=navigator.pointerEnabled,k=navigator.msPointerEnabled,l=function(){var b=f||!1;try{var c=document.createElement("div");c.ontouchstart=function(){b=!0};var d=document.createEvent("TouchEvent");d.initTouchEvent("touchstart",!0,!0);c.dispatchEvent(d)}catch(e){}c=
|
117
|
+
c.ontouchstart=null;return b}(),m=!(!l&&!d&&!k),n=["mousedown","mousemove","mouseup",""];l?n=["touchstart","touchmove","touchend","touchcancel"]:d?n=["pointerdown","pointermove","pointerup","pointercancel"]:k&&(n=["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCancel"]);h={};document.addEventListener(n[1],c);document.addEventListener(n[2],function(d){var e=h.element;if(e){var f=b(d),g=Date.now()-h.startTime,k=Math.abs(h.x-f.x),l=Math.abs(h.y-f.y),m=!1;2===h.doubleIndex&&(h.doubleIndex=0,
|
118
|
+
m=!0);if(30<k||30<l)f=Math.abs(h.x-f.x)>=Math.abs(h.y-f.y)?0<h.x-f.x?"left":"right":0<h.y-f.y?"up":"down",g={direction:f},S(e,"swipe",g),S(e,"swipe"+f,g);else if(p.canClick(e)){document.activeElement&&document.activeElement!==e&&document.activeElement.blur();var n;"label"===e.tagName.toLowerCase()&&(n=e.htmlFor?document.getElementById(e.htmlFor):null);n?p.focus(n):p.focus(e);avalon.fastclick.fireEvent(e,"click",d);S(e,"tap");n&&(avalon.fastclick.fireEvent(n,"click",d),S(e,"tap"));m&&(250>g&&(avalon.fastclick.fireEvent(e,
|
119
|
+
"dblclick",d),S(e,"doubletap")),h.doubleIndex=0);750<g&&(S(e,"hold"),S(e,"longtap"))}c(d)}});n[3]&&document.addEventListener(n[3],c);g.clickHook=function(c){function d(e){var f=c.element;avalon.mix(h,b(e));h.startTime=Date.now();h.event=c.param;h.tapping=/click|tap$/.test(h.event);h.element=f;h.element!==f?(h.doubleIndex=1,h.doubleStartTime=Date.now()):h.doubleIndex=h.doubleIndex?2:1;h.tapping&&avalon.fastclick.canClick(f)&&avalon(f).addClass(p.activeClass)}if("click"===c.param?m:1)c.specialBind=
|
120
|
+
function(b,e){b.addEventListener(n[0],d);b.addEventListener(c.param,function(c){("click"===c.type?c.hasFixClick:1)&&e.call(b,c)})},c.specialUnbind=function(){element.removeEventListener(n[0],d);element.removeEventListener(c.param,wrapCallback)}};var p=avalon.fastclick={activeClass:"ms-click-active",clickDuration:750,dragDistance:10,fireEvent:function(b,c,d){var e=document.createEvent("MouseEvents");e.initMouseEvent(c,!0,!0,t,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null);Object.defineProperty(e,
|
121
|
+
"hasFixClick",{get:function(){return"\u53f8\u5f92\u6b63\u7f8e"}});b.dispatchEvent(e)},focus:function(b){if(this.canFocus(b)){var c=b.value;b.value=c;f&&b.setSelectionRange&&0!==b.type.indexOf("date")&&"time"!==b.type?(c=c.length,b.setSelectionRange(c,c)):b.focus()}},canClick:function(b){switch(b.nodeName.toLowerCase()){case "textarea":case "select":case "input":return!b.disabled;default:return!0}},canFocus:function(b){switch(b.nodeName.toLowerCase()){case "textarea":return!0;case "select":return!e;
|
122
|
+
case "input":switch(b.type){case "button":case "checkbox":case "file":case "image":case "radio":case "submit":return!1}return!b.disabled&&!b.readOnly;default:return!1}}};"swipe swipeleft swiperight swipeup swipedown doubletap tap longtap hold".split(" ").forEach(function(b){g[b+"Hook"]=g.clickHook})};"function"===typeof define&&define.amd&&define("avalon",[],function(){return avalon});avalon.noConflict=function(b){b&&t.avalon===avalon&&(t.avalon=avalon);return avalon};void 0===W&&(t.avalon=avalon);
|
123
|
+
return avalon});
|
@@ -0,0 +1,116 @@
|
|
1
|
+
(function(t,U){"object"===typeof module&&"object"===typeof module.exports?module.exports=t.document?U(t,!0):function(t){if(!t.document)throw Error("Avalon requires a window with a document");return U(t)}:U(t)})("undefined"!==typeof window?window:this,function(t,U){function x(){avalon.config.debug&&console.log.apply(console,arguments)}function z(){}function O(b,c){"string"===typeof b&&(b=b.match(y)||[]);for(var d={},e=void 0!==c?c:1,f=0,g=b.length;f<g;f++)d[b[f]]=e;return d}function Ka(b){function c(e,
|
2
|
+
f){d.push(e)>b&&delete c[d.shift()];return c[e]=f}var d=[];return c}function q(b){for(var c in b)if(La.call(b,c)){var d=b[c];if("function"===typeof q.plugins[c])q.plugins[c](d);else"object"===typeof q[c]?avalon.mix(q[c],d):q[c]=d}return this}function yb(b,c,d){if(P(c)||c&&c.nodeType||-1!==d.indexOf(b)||-1!==Ma.indexOf(b))return!1;c=d.$special;return b&&"$"===b.charAt(0)&&!c[b]?!1:!0}function zb(b,c,d,e){switch(b.type){case 0:var f=b.get;b=b.set;if(P(b)){var g=e.$events,h=g[c];g[c]=[];b.call(e,d);
|
3
|
+
g[c]=h}return f.call(e);case 1:return d;case 2:return d!==e.$model[c]&&(c=b.svmodel=Ab(e,c,d,b.valueType),d=c.$model,(c=ma[c.$id])&&c()),d}}function G(b,c,d){if(Array.isArray(b)){var e=b.concat();b.length=0;c=Bb(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(yb(c,e,b.$skipArray)){g[c]=[];var l=avalon.type(e),s=function(b){var c=
|
4
|
+
s._name,d=this,e=d.$model,f=e[c],g=d.$events;if(arguments.length){if(!na){if(1!==s.type&&(b=zb(s,c,b,d),!s.type))return;Na(f,b)||(e[c]=b,g.$digest?s.pedding||(s.pedding=!0,setTimeout(function(){ca(g[c]);d.$events&&H.$fire.call(d,c,e[c],f);s.pedding=!1})):(ca(g[c]),d.$events&&H.$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&&H.$fire.call(d,c,e[c],f);s.pedding=!1})):d.$events&&H.$fire.call(d,c,b,f)),
|
5
|
+
b;Db(g[c]);return s.svmodel||f}};"object"===l&&P(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:E,type:new Date-0,handler:z,args:[]};V[F]=b;s.call(f);delete V[F]})):Oa.test(l)?(s.type=2,s.valueType=l,k.push(function(){var b=G(e,0,d[c]);s.svmodel=b;b.$events[I]=g[c]})):s.type=1;s._name=c;h[c]=s}})(e,b[e]);Ma.forEach(function(c){delete b[c];delete d[c]});var f=Eb(f,Fb(h),b),
|
6
|
+
l;for(l in b)h[l]||(f[l]=b[l]);f.$id=J();f.$model=d;f.$events=g;for(e in H)c=H[e],Q||(c=c.bind(f)),f[e]=c;Pa?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 Ab(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];
|
7
|
+
if(b=f.$events.$withProxyPool)oa(b,"with"),f.$events.$withProxyPool=null;var h=G(d);h.$events[I]=g;ma[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 ma[h.$id]};return h}function Bb(b){var c=[];c.$id=J();c.$model=b;c.$events={};c.$events[I]=[];c._=G({length:b.length});c._.$watch("length",function(b,d){c.$fire("length",b,d)});for(var d in H)c[d]=H[d];avalon.mix(c,Qa);return c}function R(b,c,d,e,f,g,
|
8
|
+
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 Oa.test(avalon.type(b))?b.$id?b:G(b,0,b):b});pa.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 qa(b,c){for(var d={},e=0,f=c.length;e<f;e++){d[e]=b[e];var g=c[e];g in d?(b[e]=d[g],delete d[g]):b[e]=b[g]}}function ra(b){V[F]=
|
9
|
+
b;avalon.openComputedCollect=!0;var c=b.evaluator;if(c)try{var d=Gb.test(b.type)?b:c.apply(0,b.args);b.handler(d,b.element,b)}catch(e){delete b.evaluator,c=b.element,3===c.nodeType&&(d=c.parentNode,q.commentInterpolate?d.replaceChild(p.createComment(b.value),c):c.data=A+b.value+L)}avalon.openComputedCollect=!1;delete V[F]}function Db(b){var c=V[F];b&&(c&&avalon.Array.ensure(b,c)&&c.element)&&sa(c,b)}function sa(b,c){b.$uuid=b.$uuid||J();c.$uuid=c.$uuid||J();var d={data:b,list:c,$$uuid:b.$uuid+c.$uuid};
|
10
|
+
M[d.$$uuid]||(M[d.$$uuid]=1,M.push(d))}function Ra(b){b.element=null;b.rollback&&b.rollback();for(var c in b)b[c]=null}function Hb(b){try{if(!b.parentNode)return!0}catch(c){return!0}return b.msRetain?0:1===b.nodeType?"number"===typeof b.sourceIndex?0===b.sourceIndex:!B.contains(b):!avalon.contains(B,b)}function Sa(){for(var b=M.length,c=b,d=0,e,f=[],g={},h={};e=M[--b];){var k=e.data;e=k.type;g[e]?g[e]++:(g[e]=1,f.push(e))}var l=!1;f.forEach(function(b){Ta[b]!==g[b]&&(h[b]=1,l=!0)});b=c;if(l)for(;e=
|
11
|
+
M[--b];)k=e.data,void 0!==k.element&&(h[k.type]&&Hb(k.element))&&(d++,M.splice(b,1),delete M[e.$$uuid],avalon.Array.remove(e.list,k),Ra(k),e.data=e.list=null);Ta=g;Ua=new Date}function ca(b){if(b&&b.length){444<new Date-Ua&&"object"===typeof b[0]&&Sa();for(var c=da.call(arguments,1),d=b.length,e;e=b[--d];){var f=e.element;f&&f.parentNode&&(e.$repeat?e.handler.apply(e,c):"on"!==e.type&&e.handler((e.evaluator||z).apply(0,e.args||[]),f,e))}}}function ea(b,c,d){var e=setTimeout(function(){var f=b.innerHTML;
|
12
|
+
clearTimeout(e);f===d?c():ea(b,c,f)})}function Va(b,c){var d=b.getAttribute("avalonctrl")||c.$id;b.setAttribute("avalonctrl",d);c.$events.expr=b.tagName+'[avalonctrl="'+d+'"]'}function ta(b,c){for(var d=0,e;e=b[d++];)e.vmodels=c,v[e.type](e,c),e.evaluator&&(e.element&&1===e.element.nodeType)&&e.element.removeAttribute(e.name);b.length=0}function Ib(b,c){return b.priority-c.priority}function Wa(b,c,d){d=b.getAttribute("ms-skip");var e=b.getAttributeNode("ms-important"),f=b.getAttributeNode("ms-controller");
|
13
|
+
if("string"!==typeof d){if(d=e||f){f=avalon.vmodels[d.value];if(!f)return;c=d===e?[f]:[f].concat(c);b.removeAttribute(d.name);b.classList.remove(d.name);Va(b,f)}Xa(b,c)}}function Jb(b,c){for(var d=b.firstChild;d;){var e=d.nextSibling;Ya(d,d.nodeType,c);d=e}}function fa(b,c){for(var d=0,e;e=b[d++];)Ya(e,e.nodeType,c)}function Ya(b,c,d){1===c?Wa(b,d):3===c&&W.test(b.data)?Za(b,d):q.commentInterpolate&&(8===c&&!W.test(b.nodeValue))&&Za(b,d)}function Xa(b,c){for(var d=b.hasAttributes()?avalon.slice(b.attributes):
|
14
|
+
[],e=[],f={},g,h=0,k;k=d[h++];)if(k.specified&&(g=k.name.match(Kb))){var l=g[1],m=g[2]||"",n=k.value;k=k.name;f[k]=n;Lb[l]?(m=l,l="on"):Mb[l]&&(x("ms-"+l+"\u5df2\u7ecf\u88ab\u5e9f\u5f03,\u8bf7\u4f7f\u7528ms-attr-*\u4ee3\u66ff"),"enabled"===l&&(l="disabled",n="!("+n+")"),m=l,l="attr",b.removeAttribute(k),k="ms-attr-"+m,b.setAttribute(k,n),g=[k],f[k]=n);if("function"===typeof v[l]){var r={type:l,param:m,element:b,name:g[0],value:n,priority:l in $a?$a[l]:10*l.charCodeAt(0)+(Number(m)||0)};if("html"===
|
15
|
+
l||"text"===l)m=ua(n),avalon.mix(r,m),r.filters=r.filters.replace(ab,function(){r.type="html";r.group=1;return""});"ms-if-loop"===k&&(r.priority+=100);c.length&&(e.push(r),"widget"===l&&(b.msData=b.msData||f))}}f["ms-attr-checked"]&&f["ms-duplex"]&&x("warning!\u4e00\u4e2a\u5143\u7d20\u4e0a\u4e0d\u80fd\u540c\u65f6\u5b9a\u4e49ms-attr-checked\u4e0ems-duplex");e.sort(Ib);d=!0;for(h=0;r=e[h];h++){l=r.type;if(Nb.test(l))return ta(e.slice(0,h+1),c);d&&(d=!Ob.test(l))}ta(e,c);d&&(!Pb[b.tagName]&&bb.test(b.innerHTML+
|
16
|
+
b.textContent))&&(cb&&cb(b),Jb(b,c))}function ua(b){if(0<b.indexOf("|")){var c=b.replace(Qb,"\u1122\u3344").indexOf("|");if(-1<c)return{filters:b.slice(c),value:b.slice(0,c),expr:!0}}return{value:b,filters:"",expr:!0}}function va(b){var c=[],d;d=0;var e;do{e=b.indexOf(A,d);if(-1===e)break;(d=b.slice(d,e))&&c.push({value:d,filters:"",expr:!1});d=e+A.length;e=b.indexOf(L,d);if(-1===e)break;(d=b.slice(d,e))&&c.push(ua(d));d=e+L.length}while(1);(d=b.slice(d))&&c.push({value:d,expr:!1,filters:""});return c}
|
17
|
+
function Za(b,c){var d=[];if(8===b.nodeType)var e=ua(b.nodeValue),f=[e];else f=va(b.data);if(f.length){for(var g=0;e=f[g++];){var h=p.createTextNode(e.value);e.expr&&(e.type="text",e.element=h,e.filters=e.filters.replace(ab,function(){e.type="html";e.group=1;return""}),d.push(e));S.appendChild(h)}b.parentNode.replaceChild(S,b);d.length&&ta(d,c)}}function db(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,
|
18
|
+
function(b){return b.charAt(1).toUpperCase()})}function ha(b){try{if("object"===typeof b)return b;b="true"===b?!0:"false"===b?!1:"null"===b?null:+b+""===b?+b:Rb.test(b)?JSON.parse(b):b}catch(c){}return b}function eb(b,c){if(0>=b.offsetWidth){var d=getComputedStyle(b,null);if(Sb.test(d.display)){var e={node:b},f;for(f in fb)e[f]=d[f],b.style[f]=fb[f];c.push(e)}(d=b.parentNode)&&1===d.nodeType&&eb(d,c)}}function Tb(b,c,d,e){for(var f=[],g=" = "+d+".",h=b.length,k;k=b[--h];)c.hasOwnProperty(k)&&(f.push(k+
|
19
|
+
g+k),e.vars.push(k),"duplex"===e.type&&(b.get=d+"."+k),b.splice(h,1));return f}function gb(b){for(var c=[],d={},e=0;e<b.length;e++){var f=b[e],g=f&&"string"===typeof f.$id?f.$id:f;d[g]||(d[g]=c.push(f))}return c}function Ub(b,c){c=c.replace(Vb,"").replace(Wb,function(){return"],|"}).replace(Xb,function(b,c){return"["+hb(c)}).replace(Yb,function(){return'"],["'}).replace(Zb,function(){return'",'})+"]";return"return avalon.filters.$filter("+b+", "+c+")"}function ib(b,c,d){var e=d.type,f=d.filters||
|
20
|
+
"",g=c.map(function(b){return String(b.$id).replace($b,"$1")})+b+e+f,h=ac(b).concat(),k=[],l=[],m=[],n="";c=gb(c);d.vars=[];for(var n=0,r=c.length;n<r;n++)if(h.length){var s="vm"+F+"_"+n;l.push(s);m.push(c[n]);k.push.apply(k,Tb(h,c[n],s,d))}if(k.length||"duplex"!==e)if("duplex"!==e&&(-1<b.indexOf("||")||-1<b.indexOf("&&"))&&d.vars.forEach(function(c){b=b.replace(RegExp("\\b"+c+"(?:\\.\\w+|\\[\\w+\\])+","ig"),function(d,e){var f=d.charAt(c.length),g=wa?b.slice(e+d.length):RegExp.rightContext,g=/^\s*\(/.test(g);
|
21
|
+
if("."===f||"["===f||g){f="var"+String(Math.random()).replace(/^0\./,"");if(g){g=d.split(".");if(2<g.length){var h=g.pop();k.push(f+" = "+g.join("."));return f+"."+h}return d}k.push(f+" = "+d);return f}return d})}),d.args=m,c=xa[g])d.evaluator=c;else{(n=k.join(", "))&&(n="var "+n);if(/\S/.test(f)){if(!/text|html/.test(d.type))throw Error("ms-"+d.type+"\u4e0d\u652f\u6301\u8fc7\u6ee4\u5668");b="\nvar ret"+F+" = "+b+";\r\n";b+=Ub("ret"+F,f)}else{if("duplex"===e){e="'use strict';\nreturn function(vvv){\n\t"+
|
22
|
+
n+";\n\tif(!arguments.length){\n\t\treturn "+b+"\n\t}\n\t"+(!bc.test(b)?h.get:b)+"= vvv;\n} ";try{c=Function.apply(z,l.concat(e)),d.evaluator=xa(g,c)}catch(p){x("debug: parse error,"+p.message)}return}"on"===e?(b=-1===b.indexOf("(")?b+".call(this, $event)":b.replace("(",".call(this,"),l.push("$event"),b="\nreturn "+b+";",f=b.lastIndexOf("\nreturn"),e=b.slice(0,f),f=b.slice(f),b=e+"\n"+f):b="\nreturn "+b+";"}try{c=Function.apply(z,l.concat("'use strict';\n"+n+b)),d.evaluator=xa(g,c)}catch(Cb){x("debug: parse error,"+
|
23
|
+
Cb.message)}finally{h=textBuffer=l=null}}}function K(b,c,d,e,f){Array.isArray(e)&&(b=e.map(function(b){return b.expr?"("+b.value+")":hb(b.value)}).join(" + "));ib(b,c,d);d.evaluator&&!f&&(d.handler=C[d.handlerName||d.type],ra(d))}function X(b,c){var d="_"+b;if(!X[d]){var e=p.createElement(b);B.appendChild(e);c=Q?getComputedStyle(e,null).display:e.currentStyle.display;B.removeChild(e);X[d]=c}return X[d]}function ya(b){return null==b?"":b}function cc(b,c,d,e){c.param.replace(/\w+/g,function(e){(e=avalon.duplexHooks[e])&&
|
24
|
+
"function"===typeof e[d]&&(b=e[d](b,c))});return b}function dc(){for(var b=Y.length-1;0<=b;b--)!1===(0,Y[b])()&&Y.splice(b,1);Y.length||clearInterval(jb)}function kb(b,c,d,e){var f=b.template.cloneNode(!0),g=avalon.slice(f.childNodes);d.$stamp&&f.insertBefore(d.$stamp,f.firstChild);c.appendChild(f);b=[d].concat(b.vmodels);e.push({nodes:g,vmodels:b})}function lb(b,c){var d=b.proxies[c];return d?d.$stamp:b.element}function za(b,c,d){for(;;){var e=c.previousSibling;if(!e)break;e.parentNode.removeChild(e);
|
25
|
+
d&&d.call(e);if(e===b)break}}function ec(b){var c={$host:[],$outer:{},$stamp:1,$index:0,$first:!1,$last:!1,$remove:avalon.noop};c[b]={get:function(){return this.$host[this.$index]},set:function(b){this.$host.set(this.$index,b)}};var c=G(c,{$last:1,$first:1,$index:1}),d=c.$events;d[b]=d.$first=d.$last=d.$index;c.$id=J("$proxy$each");return c}function fc(b,c){for(var d=c.param||"el",e,f=0,g=ia.length;f<g;f++){var h=ia[f];h&&h.hasOwnProperty(d)&&(e=h,ia.splice(f,1))}e||(e=ec(d));var k=c.$repeat,d=k.length-
|
26
|
+
1;e.$index=b;e.$first=0===b;e.$last=b===d;e.$host=k;e.$outer=c.$outer;e.$stamp=c.clone.cloneNode(!1);e.$remove=function(){return k.removeAt(e.$index)};return e}function gc(){var b=G({$key:"",$outer:{},$host:{},$val:{get:function(){return this.$host[this.$key]},set:function(b){this.$host[this.$key]=b}}},{$val:1});b.$id=J("$proxy$with");return b}function hc(b,c){var d=mb.pop();d||(d=gc());var e=c.$repeat;d.$key=b;d.$host=e;d.$outer=c.$outer;e.$events?d.$events.$val=e.$events[b]:d.$events={};return d}
|
27
|
+
function oa(b,c){var d="each"===c?ia:mb;avalon.each(b,function(b,c){if(c.$events){for(var g in c.$events)Array.isArray(c.$events[g])&&(c.$events[g].forEach(function(b){"object"===typeof b&&Ra(b)}),c.$events[g].length=0);c.$host=c.$outer={};d.unshift(c)>q.maxRepeatSize&&d.pop()}});"each"===c&&(b.length=0)}function nb(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=
|
28
|
+
Math.pow(10,c);return""+(Math.round(b*d)/d).toFixed(c)},f=(c?f(b,c):""+Math.round(b)).split(".");3<f[0].length&&(f[0]=f[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,e));if((f[1]||"").length<c)f[1]=f[1]||"",f[1]+=Array(c-f[1].length+1).join("0");return f.join(d)}function Z(){D?(u["ready!"].state=2,D.checkDeps()):ob.forEach(function(b){b(avalon)});Z=z}var F=Date.now(),p=t.document,E=p.head;E.insertAdjacentHTML("afterBegin",'<avalon ms-skip><style id="avalonStyle">.avalonHide{ display: none!important }</style></avalon>');
|
29
|
+
var Aa=E.firstChild,I="$"+F,ic=t.require,jc=t.define,na=!1,y=/[^, ]+/g,Oa=/^(?:object|array)$/,pb=/^\[object SVG\w*Element\]$/,kc=/^\[object (?:Window|DOMWindow|global)\]$/,Ba=Object.prototype,La=Ba.hasOwnProperty,$=Ba.toString,N=Array.prototype,da=N.slice,V={},Q=t.dispatchEvent,B=p.documentElement,S=p.createDocumentFragment(),ja=p.createElement("div"),qb={};"Boolean Number String Function Array Date RegExp Object Error".replace(y,function(b){qb["[object "+b+"]"]=b.toLowerCase()});var J=function(b){return((b||
|
30
|
+
"avalon")+Math.random()+Math.random()).replace(/0\./g,"")},wa=function(){if(t.VBArray){var b=document.documentMode;return b?b:t.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?qb[$.call(b)]||"object":typeof b};var P=function(b){return"[object Function]"==$.call(b)};avalon.isFunction=
|
31
|
+
P;avalon.isWindow=function(b){return kc.test($.call(b))};avalon.isPlainObject=function(b){return"[object Object]"===$.call(b)&&Object.getPrototypeOf(b)===Ba};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&&!P(g)&&(g={});h===k&&(g=this,h--);for(;h<k;h++)if(null!=(b=arguments[h]))for(c in b)d=g[c],e=b[c],g!==e&&(l&&e&&(avalon.isPlainObject(e)||(f=Array.isArray(e)))?(f?(f=!1,d=d&&
|
32
|
+
Array.isArray(d)?d:[]):d=d&&avalon.isPlainObject(d)?d:{},g[c]=avalon.mix(l,d,e)):void 0!==e&&(g[c]=e));return g};avalon.mix({rword:y,subscribers:I,version:1.391,ui:{},log:x,slice:function(b,c,d){return da.call(b,c,d)},noop:z,error:function(b,c){throw new (c||Error)(b);},oneObject:O,range:function(b,c,d){d||(d=1);null==c&&(c=b||0,b=0);var e=-1;c=Math.max(0,Math.ceil((c-b)/d));for(var f=Array(c);++e<c;)f[e]=b,b+=d;return f},eventHooks:{},bind:function(b,c,d,e){var f=avalon.eventHooks[c];"object"===
|
33
|
+
typeof f&&(c=f.type,f.deel&&(d=f.deel(b,d)));b.addEventListener(c,d,!!e);return d},unbind:function(b,c,d,e){var f=avalon.eventHooks[c];d=d||z;"object"===typeof f&&(c=f.type);b.removeEventListener(c,d,!!e)},css:function(b,c,d){b instanceof avalon&&(b=b[0]);var e=/[_-]/.test(c)?ga(c):c;c=avalon.cssName(e)||e;if(void 0===d||"boolean"===typeof d)return e=w[e+":get"]||w["@:get"],"background"===c&&(c="backgroundColor"),b=e(b,c),!0===d?parseFloat(b)||0:b;""===d?b.style[c]="":null==d||d!==d||(isFinite(d)&&
|
34
|
+
!avalon.cssNumber[e]&&(d+="px"),e=w[e+":set"]||w["@:set"],e(b,c,d))},each:function(b,c){if(b){var d=0,e;a:{if(b&&"object"===typeof b){e=b.length;var f=$.call(b);if(/(Array|List|Collection|Map|Arguments)\]$/.test(f)){e=!0;break a}else if("[object Object]"===f&&e===e>>>0){e=!0;break a}}e=!1}if(e)for(e=b.length;d<e&&!1!==c(d,b[d]);d++);else for(d in b)if(b.hasOwnProperty(d)&&c(d,!1===b[d]))break}},getWidgetData:function(b,c){var d=avalon(b).data(),e={},f;for(f in d)0===f.indexOf(c)&&(e[f.replace(c,"").replace(/\w/,
|
35
|
+
function(b){return b.toLowerCase()})]=d[f]);return e},Array:{ensure:function(b,c){if(-1===b.indexOf(c))return b.push(c)},removeAt:function(b,c){return!!b.splice(c,1).length},remove:function(b,c){var d=b.indexOf(c);return~d?avalon.Array.removeAt(b,d):!1}}});var v=avalon.bindingHandlers={},C=avalon.bindingExecutors={};avalon.nextTick=t.setImmediate?setImmediate.bind(t):function(b){setTimeout(b,0)};B.contains||(Node.prototype.contains=function(b){return!!(this.compareDocumentPosition(b)&16)});avalon.contains=
|
36
|
+
function(b,c){try{for(;c=c.parentNode;)if(c===b)return!0;return!1}catch(d){return!1}};if(t.SVGElement){var rb=p.createElementNS("http://www.w3.org/2000/svg","svg");rb.innerHTML='<circle cx="50" cy="50" r="40" fill="red" />';if(!pb.test(rb.firstChild)){var Ca=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)});Ca(f,
|
37
|
+
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(),Ca(b,c),d.insertBefore(c,this));d.removeChild(this)}},innerHTML:{enumerable:!0,configurable:!0,get:function(){var b=RegExp("</"+this.nodeName+">$","i");return this.outerHTML.replace(RegExp("<"+
|
38
|
+
this.nodeName+'\\b(?:(["\'])[^"]*?(\\1)|[^>])*>',"i"),"").replace(b,"")},set:function(b){avalon.clearHTML&&(avalon.clearHTML(this),b=avalon.parseHTML(b),Ca(b,this))}}})}}var ka=avalon.eventHooks;"onmouseenter"in B||avalon.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(b,c){ka[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",
|
39
|
+
WebKitAnimationEvent:"webkitAnimationEnd"},function(b,c){t[b]&&!ka.animationend&&(ka.animationend={type:c})});void 0===p.onmousewheel&&(ka.mousewheel={type:"wheel",deel:function(b,c){return function(d){d.wheelDeltaY=d.wheelDelta=0<d.deltaY?-120:120;d.wheelDeltaX=0;Object.defineProperty(d,"type",{value:"mousewheel"});c.call(b,d)}}});var A,L,W,sb,bb,tb=/[-.*+?^${}()|[\]\/\\]/g,D=z,aa={loader:function(b){t.define=b?D.define:jc;t.require=b?D:ic},interpolate:function(b){A=b[0];L=b[1];if(A===L)throw new SyntaxError("openTag!==closeTag");
|
40
|
+
if("\x3c!--,--\x3e"===b+"")q.commentInterpolate=!0;else{b=A+"test"+L;ja.innerHTML=b;if(ja.innerHTML!==b&&-1<ja.innerHTML.indexOf("<"))throw new SyntaxError("\u6b64\u5b9a\u754c\u7b26\u4e0d\u5408\u6cd5");ja.innerHTML=""}b=(A+"").replace(tb,"\\$&");var c=(L+"").replace(tb,"\\$&");W=RegExp(b+"(.*?)"+c);sb=RegExp(b+"(.*?)"+c,"g");bb=RegExp(b+".*?"+c+"|\\sms-")}};q.debug=!0;q.plugins=aa;q.plugins.interpolate(["{{","}}"]);q.paths={};q.shim={};q.maxRepeatSize=100;avalon.config=q;var H={$watch:function(b,
|
41
|
+
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=da.call(arguments,1),f=[b].concat(e);
|
42
|
+
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?p.querySelectorAll(d.expr):[];if(0!==k.length){for(g in avalon.vmodels)h=avalon.vmodels[g],h!==this&&h.$events.expr&&(e=p.querySelectorAll(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,
|
43
|
+
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++];)P(m)&&m.apply(this,e);for(g=0;m=d[g++];)P(m)&&m.apply(this,arguments)}}},ub=avalon.vmodels={};avalon.define=function(b,c){var d=b.$id||b;d||x("warning: vm\u5fc5\u987b\u6307\u5b9a$id");ub[d]&&x("warning: "+d+" \u5df2\u7ecf\u5b58\u5728\u4e8eavalon.vmodels\u4e2d");if("object"===typeof b)var e=
|
44
|
+
G(b);else e={$watch:z},c(e),e=G(e),na=!0,c(e),na=!1;e.$id=d;return ub[d]=e};var Ma="$id,$watch,$unwatch,$fire,$events,$model,$skipArray".match(y),ma={},lc=Object.defineProperty,Pa=!0;try{lc({},"_",{value:"x"});var Eb=Object.defineProperties}catch(Fc){Pa=!1}var Na=Object.is||function(b,c){return 0===b&&0===c?1/b===1/c:b!==b?c!==c:b===c},Fb=Q?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},pa=N.splice,Qa={_splice:pa,_fire:function(b,
|
45
|
+
c,d){ca(this.$events[I],b,c,d)},size:function(){return this._.length},pushArray:function(b){var c=b.length,d=this.length;c&&(N.push.apply(this.$model,b),R.call(this,"add",d,c,d));return c+d},push:function(){var b,c=arguments.length;for(b=0;b<c;b++);return this.pushArray(arguments)},unshift:function(){var b=arguments.length,c=this.length;b&&(N.unshift.apply(this.$model,arguments),R.call(this,"add",0,b,0));return b+c},shift:function(){if(this.length){var b=this.$model.shift();R.call(this,"del",0,1,
|
46
|
+
0);return b}},pop:function(){var b=this.length;if(b){var c=this.$model.pop();R.call(this,"del",b-1,1,Math.max(0,b-2));return c}},splice:function(b){var c=arguments.length,d=[],e,f=pa.apply(this.$model,arguments);f.length&&(d.push("del",b,f.length,0),e=!0);2<c&&(e?d.splice(3,1,0,"add",b,c-2):d.push("add",b,c-2,0),e=!0);return e?R.apply(this,d):[]},contains:function(b){return-1!==this.indexOf(b)},remove:function(b){return this.removeAt(this.indexOf(b))},removeAt:function(b){return 0<=b?(this.$model.splice(b,
|
47
|
+
1),R.call(this,"del",b,1,0)):[]},clear:function(){this.$model.length=this.length=this._.length=0;this._fire("clear",0);return this},removeAll:function(b){if(Array.isArray(b))b.forEach(function(b){this.remove(b)},this);else if("function"===typeof b)for(var c=this.length-1;0<=c;c--)b(this[c],c)&&this.removeAt(c);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)&&
|
48
|
+
(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(y,function(b){Qa[b]=function(){var c=this.$model,d=c.concat(),e=Math.random(),f=[],g;N[b].apply(c,arguments);for(var h=0,k=d.length;h<k;h++){var l=c[h];Na(l,d[h])?f.push(h):(g=d.indexOf(l),f.push(g),d[g]=e,g=!0)}g&&(qa(this,f),this._fire("move",f),this._fire("index",0));return this}});var Gb=/^(duplex|on)$/,M=avalon.$$subscribers=[],Ua=new Date,Ta={},
|
49
|
+
la=new function(){avalon.mix(this,{option:p.createElement("select"),thead:p.createElement("table"),td:p.createElement("tr"),area:p.createElement("map"),tr:p.createElement("tbody"),col:p.createElement("colgroup"),legend:p.createElement("fieldset"),_default:p.createElement("div"),g:p.createElementNS("http://www.w3.org/2000/svg","svg")});this.optgroup=this.option;this.tbody=this.tfoot=this.colgroup=this.caption=this.thead;this.th=this.td};"circle,defs,ellipse,image,line,path,polygon,polyline,rect,symbol,text,use".replace(y,
|
50
|
+
function(b){la[b]=la.g});var mc=/<([\w:]+)/,nc=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,oc=O(["","text/javascript","text/ecmascript","application/ecmascript","application/javascript"]),pc=p.createElement("script");avalon.parseHTML=function(b){if("string"!==typeof b)return p.createDocumentFragment();b=b.replace(nc,"<$1></$2>").trim();var c=(mc.exec(b)||["",""])[1].toLowerCase(),c=la[c]||la._default,d=S.cloneNode(!1);c.innerHTML=b;b=c.getElementsByTagName("script");
|
51
|
+
if(b.length)for(var e=0,f;f=b[e++];)if(oc[f.type]){var g=pc.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};avalon.scan=function(b,c,d){b=b||B;c=c?[].concat(c):[];Wa(b,c)};var Pb=
|
52
|
+
O("AREA,BASE,BASEFONT,BR,COL,COMMAND,EMBED,HR,IMG,INPUT,LINK,META,PARAM,SOURCE,TRACK,WBR,NOSCRIPT,SCRIPT,STYLE,TEXTAREA"),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]}},cb=wa&&t.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,Kb=/ms-(\w+)-?(.*)/,$a={"if":10,repeat:90,data:100,widget:110,each:1400,"with":1500,
|
53
|
+
duplex:2E3,on:3E3},Lb=O("animationend,blur,change,input,click,dblclick,focus,keydown,keypress,keyup,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,scan,scroll,submit"),Mb=O("value,title,alt,checked,selected,disabled,readonly,enabled"),Nb=/^if|widget|repeat$/,Ob=/^each|with|html|include$/,ab=/\|\s*html\s*/,Qb=/\|\|/g;"add,remove".replace(y,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)});
|
54
|
+
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-"+db(b||"");switch(arguments.length){case 2:return this.attr(b,c),this;case 1:var d=this.attr(b);
|
55
|
+
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-"+db(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():
|
56
|
+
(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&&"static"===avalon.css(b,"position");)b=b.offsetParent;return avalon(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],
|
57
|
+
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=qc,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}});B.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}});
|
58
|
+
var Rb=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;avalon.parseJSON=JSON.parse;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 w=avalon.cssHooks={},vb=["","-webkit-","-moz-","-ms-"],Da={"float":"cssFloat"};avalon.cssNumber=O("columnCount,order,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom");
|
59
|
+
avalon.cssName=function(b,c,d){if(Da[b])return Da[b];c=c||B.style;for(var e=0,f=vb.length;e<f;e++)if(d=ga(vb[e]+b),d in c)return Da[b]=d;return null};w["@:set"]=function(b,c,d){b.style[c]=d};w["@:get"]=function(b,c){if(!b||!b.style)throw Error("getComputedStyle\u8981\u6c42\u4f20\u5165\u4e00\u4e2a\u8282\u70b9 "+b);var d,e=getComputedStyle(b,null);e&&(d="filter"===c?e.getPropertyValue(c):e[c],""===d&&(d=b.style[c]));return d};w["opacity:get"]=function(b){b=w["@:get"](b,"opacity");return""===b?"1":b};
|
60
|
+
"top,left".replace(y,function(b){w[b+":get"]=function(c){var d=w["@:get"](c,b);return/px$/.test(d)?d:avalon(c).position()[b]+"px"}});var fb={position:"absolute",visibility:"hidden",display:"block"},Sb=/^(none|table(?!-c[ea]).+)/;"Width,Height".replace(y,function(b){var c=b.toLowerCase(),d="client"+b,e="scroll"+b,f="offset"+b;w[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,
|
61
|
+
"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};w[c+"&get"]=function(b){var d=[];eb(b,d);for(var e=w[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];if(9===h.nodeType){var k=h.documentElement;return Math.max(h.body[e],
|
62
|
+
k[e],h.body[f],k[f],k[d])}return w[c+"&get"](h)}return this.css(c,g)};avalon.fn["inner"+b]=function(){return w[c+":get"](this[0],void 0,-2)};avalon.fn["outer"+b]=function(b){return w[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-
|
63
|
+
e.clientTop,left:c.left+d.pageXOffset-e.clientLeft}};var qc={"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<k;l++)if(d=e[l],(d.selected||l===f)&&!d.disabled){c=d.value;if(g)return c;h.push(c)}return h},"select:set":function(b,c,d){c=[].concat(c);for(var e=0,f;f=b.options[e++];)if(f.selected=-1<c.indexOf(f.value))d=!0;d||(b.selectedIndex=-1)}},hb=JSON.stringify,rc=/\/\*[\w\W]*?\*\/|\/\/[^\n]*\n|\/\/[^\n]*$|"(?:[^"\\]|\\[\w\W])*"|'(?:[^'\\]|\\[\w\W])*'|[\s\t\n]*\.[\s\t\n]*[$\w\.]+/g,
|
64
|
+
sc=/[^\w$]+/g,tc=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"),uc=/\b\d[^,]*/g,
|
65
|
+
vc=/^,+|,+$/g,Ea=Ka(512),ac=function(b){var c=","+b.trim();if(Ea[c])return Ea[c];b=b.replace(rc,"").replace(sc,",").replace(tc,"").replace(uc,"").replace(vc,"").split(/^$|,+/);return Ea(c,gb(b))},xa=Ka(128),bc=/\w\[.*\]|\w\.\w/,$b=/(\$proxy\$[a-z]+)\d+$/,Vb=/\)\s*$/,Wb=/\)\s*\|/g,Xb=/\|\s*([$\w]+)/g,Yb=/"\s*\["/g,Zb=/"\s*\(/g;avalon.parseExprProxy=K;var Fa={};"autofocus,autoplay,async,allowTransparency,checked,controls,declare,disabled,defer,defaultChecked,defaultSelectedcontentEditable,isMap,loop,multiple,noHref,noResize,noShade,open,readOnly,selected".replace(y,
|
66
|
+
function(b){Fa[b.toLowerCase()]=b});var Ga={"accept-charset":"acceptCharset","char":"ch",charoff:"chOff","class":"className","for":"htmlFor","http-equiv":"httpEquiv"};"accessKey,bgColor,cellPadding,cellSpacing,codeBase,codeType,colSpan,dateTime,defaultValue,frameBorder,longDesc,maxLength,marginWidth,marginHeight,rowSpan,tabIndex,useMap,vSpace,valueType,vAlign".replace(y,function(b){Ga[b.toLowerCase()]=b});var wc=/<noscript.*?>(?:[\s\S]+?)<\/noscript>/img,xc=/<noscript.*?>([\s\S]+?)<\/noscript>/im,
|
67
|
+
Ha=function(){return new (t.XMLHttpRequest||ActiveXObject)("Microsoft.XMLHTTP")},Ia=avalon.templateCache={};v.attr=function(b,c){var d=b.value.trim(),e=!0;-1<d.indexOf(A)&&2<d.indexOf(L)&&(e=!1,W.test(d)&&(""===RegExp.rightContext&&""===RegExp.leftContext)&&(e=!0,d=RegExp.$1));if("include"===b.type){var f=b.element;b.includeRendered=ba(f,"data-include-rendered",c);b.includeLoaded=ba(f,"data-include-loaded",c);var g=b.includeReplaced=!!avalon(f).data("includeReplace");b.startInclude=p.createComment("ms-include");
|
68
|
+
b.endInclude=p.createComment("ms-include-end");g?(b.element=b.startInclude,f.parentNode.insertBefore(b.startInclude,f),f.parentNode.insertBefore(b.endInclude,f.nextSibling)):(f.insertBefore(b.startInclude,f.firstChild),f.appendChild(b.endInclude))}b.handlerName="attr";K(d,c,b,e?0:va(b.value))};C.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(Fa[f]&&(e=Fa[f],"boolean"===typeof c[e]))return c[e]=!!b;!Q&&Ga[f]&&(f=Ga[f]);if(!1===b||null===b||void 0===
|
69
|
+
b)return c.removeAttribute(f);(pb.test(c)?0:p.namespaces&&isVML(c)||f in c.cloneNode(!1))?c[f]=b:c.setAttribute(f,b)}else if("include"===e&&b){var g=d.vmodels,h=d.includeRendered,k=d.includeLoaded,l=d.includeReplaced?c.parentNode:c,m=function(b){k&&(b=k.apply(l,[b].concat(g)));for(h&&ea(l,function(){h.call(l)},NaN);;){var c=d.startInclude.nextSibling;if(c&&c!==d.endInclude)l.removeChild(c);else break}b=avalon.parseHTML(b);c=avalon.slice(b.childNodes);l.insertBefore(b,d.endInclude);fa(c,g)};if("src"===
|
70
|
+
d.param)if(Ia[b])avalon.nextTick(function(){m(Ia[b])});else{var n=Ha();n.onreadystatechange=function(){if(4===n.readyState){var c=n.status;if(200<=c&&300>c||304===c||1223===c)m(Ia[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=Ha();n.open("GET",location,!1);n.send(null);c=p.getElementsByTagName("noscript");
|
71
|
+
for(var f=(n.responseText||"").match(wc)||[],e=f.length,s=0;s<e;s++){var q=c[s];q&&(q.style.display="none",q.fixIE78=(f[s].match(xc)||[""," "])[1])}}avalon.nextTick(function(){m(r.fixIE78||r.value||r.innerText||r.innerHTML)})}}}else{if(!B.hasAttribute&&"string"===typeof b&&("src"===e||"href"===e))b=b.replace(/&/g,"&");c[e]=b;t.chrome&&"EMBED"===c.tagName&&(f=c.parentNode,e=document.createComment("ms-src"),f.replaceChild(e,c),f.replaceChild(c,e))}};"title,alt,src,value,css,include,href".replace(y,
|
72
|
+
function(b){v[b]=v.attr});v["class"]=function(b,c){var d=b.param,e=b.value;b.handlerName="class";if(!d||isFinite(d)){b.param="";var f=e.replace(sb,function(b){return b.replace(/./g,"0")}).indexOf(":");if(-1===f)d=e;else if(d=e.slice(0,f),e=e.slice(f+1),ib(e,c,b),b.evaluator)b._evaluator=b.evaluator,b._args=b.args;else return x("debug: ms-class '"+(e||"").trim()+"' \u4e0d\u5b58\u5728\u4e8eVM\u4e2d"),!1;e=W.test(d);e||(b.immobileClass=d);K("",c,b,e?va(d):0)}else b.immobileClass=b.oldStyle=b.param,K(e,
|
73
|
+
c,b)};C["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){var g="mouseenter",h="mouseleave";if("active"===f){c.tabIndex=c.tabIndex||-1;var g="mousedown",
|
74
|
+
h="mouseup",k=e.bind("mouseleave",function(){d.toggleClass&&e.removeClass(d.newClass)})}var l=e.bind(g,function(){d.toggleClass&&e.addClass(d.newClass)}),m=e.bind(h,function(){d.toggleClass&&e.removeClass(d.newClass)});d.rollback=function(){e.unbind("mouseleave",k);e.unbind(g,l);e.unbind(h,m)};d.hasBindEvent=!0}}};"hover,active".replace(y,function(b){v[b]=v["class"]});C.data=function(b,c,d){d="data-"+d.param;b&&"object"===typeof b?c[d]=b:c.setAttribute(d,String(b))};C.text=function(b,c){b=null==b?
|
75
|
+
"":b;if(3===c.nodeType)try{c.data=b}catch(d){}else c.textContent=b};C.html=function(b,c,d){b=null==b?"":b;var e="group"in d,f=e?c.parentNode:c;if(f){if(11!==b.nodeType)if(1===b.nodeType||b.item){var g=1===b.nodeType?b.childNodes:b.item?b:[];for(b=S.cloneNode(!0);g[0];)b.appendChild(g[0])}else b=avalon.parseHTML(b);var h=p.createComment("ms-html");if(e){f.insertBefore(h,c);for(var g=d.group,k=1;k<g;){var l=c.nextSibling;l&&(f.removeChild(l),k++)}f.removeChild(c);d.element=h}else avalon.clearHTML(f).appendChild(h);
|
76
|
+
e&&(d.group=b.childNodes.length||1);g=avalon.slice(b.childNodes);g[0]&&(h.parentNode&&h.parentNode.replaceChild(b,h),e&&(d.element=g[0]));fa(g,d.vmodels)}};v["if"]=v.data=v.text=v.html=function(b,c){K(b.value,c,b)};C["if"]=function(b,c,d){b?(8===c.nodeType&&(c.parentNode.replaceChild(d.template,c),c=d.element=d.template),c.getAttribute(d.name)&&(c.removeAttribute(d.name),Xa(c,d.vmodels)),d.rollback=null):1===c.nodeType&&(b=d.element=p.createComment("ms-if"),c.parentNode.replaceChild(b,c),d.template=
|
77
|
+
c,Aa.appendChild(c),d.rollback=function(){c.parentNode===Aa&&Aa.removeChild(c)})};avalon.parseDisplay=X;v.visible=function(b,c){var d=avalon(b.element),e=d.css("display");if("none"===e){var f=d[0].style,g=/visibility/i.test(f.cssText),h=d.css("visibility");f.display="";f.visibility="hidden";e=d.css("display");"none"===e&&(e=X(d[0].nodeName));f.visibility=g?h:""}b.display=e;K(b.value,c,b)};C.visible=function(b,c,d){c.style.display=b?d.display:"none"};var wb=/\(([^)]*)\)/;v.on=function(b,c){var d=b.value;
|
78
|
+
b.type="on";var e=b.param.replace(/-\d+$/,"");if("function"===typeof v.on[e+"Hook"])v.on[e+"Hook"](b);if(0<d.indexOf("(")&&-1<d.indexOf(")")&&(e=(d.match(wb)||["",""])[1].trim(),""===e||"$event"===e))d=d.replace(wb,"");K(d,c,b)};C.on=function(b,c,d){b=function(b){return(d.evaluator||z).apply(this,d.args.concat(b))};var e=d.param.replace(/-\d+$/,"");if("scan"===e)b.call(c,{type:e});else if("function"===typeof d.specialBind)d.specialBind(c,b);else var f=avalon.bind(c,e,b);d.rollback=function(){"function"===
|
79
|
+
typeof d.specialUnbind?d.specialUnbind():avalon.unbind(c,e,f)}};v.widget=function(b,c){var d=b.value.match(y),e=b.element,f=d[0],g=d[1];if(!g||"$"===g)g=J(f);var d=d[2]||f,h=avalon.ui[f];if("function"===typeof h){c=e.vmodels||c;for(var k=0,l;l=c[k++];)if(l.hasOwnProperty(d)&&"object"===typeof l[d]){var m=l[d],m=m.$model||m;break}m&&(k=m[f+"Id"],"string"===typeof k&&(g=k));k=avalon.getWidgetData(e,f);b.value=[f,g,d].join();b[f+"Id"]=g;b.evaluator=z;e.msData["ms-widget-id"]=g;var n=b[f+"Options"]=avalon.mix({},
|
80
|
+
h.defaults,m||{},k);e.removeAttribute("ms-widget");var r=h(e,b,c)||{};r.$id?(avalon.vmodels[g]=r,Va(e,r),r.hasOwnProperty("$init")&&r.$init(function(){avalon.scan(e,[r].concat(c));"function"===typeof n.onInit&&n.onInit.call(e,r,n,c)}),b.rollback=function(){try{r.widgetElement=null,r.$remove()}catch(b){}e.msData={};delete avalon.vmodels[r.$id]},sa(b,yc),t.chrome&&e.addEventListener("DOMNodeRemovedFromDocument",function(){setTimeout(Sa)})):avalon.scan(e,c)}else c.length&&(e.vmodels=c)};var yc=[],T=
|
81
|
+
v.duplex=function(b,c){var d=b.element,e;K(b.value,c,b,0,1);b.changed=ba(d,"data-duplex-changed",c)||z;if(b.evaluator&&b.args){var f=[],g=O("string,number,boolean,checked");"radio"===d.type&&""===b.param&&(b.param="checked");d.msData&&(d.msData["ms-duplex"]=b.value);b.param.replace(/\w+/g,function(c){/^(checkbox|radio)$/.test(d.type)&&/^(radio|checked)$/.test(c)&&("radio"===c&&x("ms-duplex-radio\u5df2\u7ecf\u66f4\u540d\u4e3ams-duplex-checked"),c="checked",b.isChecked=!0);"bool"===c?(c="boolean",x("ms-duplex-bool\u5df2\u7ecf\u66f4\u540d\u4e3ams-duplex-boolean")):
|
82
|
+
"text"===c&&(c="string",x("ms-duplex-text\u5df2\u7ecf\u66f4\u540d\u4e3ams-duplex-string"));g[c]&&(e=!0);avalon.Array.ensure(f,c)});e||f.push("string");b.param=f.join("-");b.bound=function(c,e){d.addEventListener?d.addEventListener(c,e,!1):d.attachEvent("on"+c,e);var f=b.rollback;b.rollback=function(){d.avalonSetter=null;avalon.unbind(d,c,e);f&&f()}};for(var h in avalon.vmodels)avalon.vmodels[h].$fire("avalon-ms-duplex-init",b);(b.pipe||(b.pipe=cc))(null,b,"init");h=d.tagName;T[h]&&T[h](d,b.evaluator.apply(null,
|
83
|
+
b.args),b)}};avalon.duplexHooks={checked:{get:function(b,c){return!c.element.oldValue}},string:{get:function(b){return b},set:ya},"boolean":{get:function(b){return"true"===b},set:ya},number:{get:function(b){return isFinite(b)?parseFloat(b)||0:b},set:ya}};var jb,Y=[];avalon.tick=function(b){1===Y.push(b)&&(jb=setInterval(dc,60))};var xb=z;new function(){try{var b={},c=HTMLInputElement.prototype,d=HTMLTextAreaElement.prototype,e=function(c){avalon.contains(B,this)&&(b[this.tagName].call(this,c),this.avalonSetter&&
|
84
|
+
this.avalonSetter())};Object.getOwnPropertyNames(HTMLInputElement.prototype);b.INPUT=Object.getOwnPropertyDescriptor(c,"value").set;Object.defineProperty(c,"value",{set:e});b.TEXTAREA=Object.getOwnPropertyDescriptor(d,"value").set;Object.defineProperty(d,"value",{set:e})}catch(f){xb=avalon.tick}};T.INPUT=function(b,c,d){function e(b){d.changed.call(this,b,d)}function f(){n=!0}function g(){n=!1}function h(){if(!n){var f=b.oldValue=b.value,f=d.pipe(f,d,"get");!1!==m.data("duplex-observe")&&(c(f),e.call(b,
|
85
|
+
f),m.data("duplex-focus")&&avalon.nextTick(function(){b.focus()}))}}var k=b.type,l=d.bound,m=avalon(b),n=!1;d.handler=function(){var e=d.pipe(c(),d,"set")+"";e!==b.oldValue&&(b.value=e)};d.isChecked||"radio"===b.type?(h=function(){if(!1!==m.data("duplex-observe")){var f=d.pipe(b.value,d,"get");c(f);e.call(b,f)}},d.handler=function(){var e=c();b.checked=b.oldValue=d.isChecked?!!e:e+""===b.value},l("click",h)):"checkbox"===k?(h=function(){if(!1!==m.data("duplex-observe")){var f=b.checked?"ensure":"remove",
|
86
|
+
g=c();Array.isArray(g)||(x("ms-duplex\u5e94\u7528\u4e8echeckbox\u4e0a\u8981\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"),g=[g]);avalon.Array[f](g,d.pipe(b.value,d,"get"));e.call(b,g)}},d.handler=function(){var e=[].concat(c());b.checked=-1<e.indexOf(d.pipe(b.value,d,"get"))},l("change",h)):(k=b.getAttribute("data-duplex-event")||b.getAttribute("data-event")||"input",b.attributes["data-event"]&&x("data-event\u6307\u4ee4\u5df2\u7ecf\u5e9f\u5f03\uff0c\u8bf7\u6539\u7528data-duplex-event"),k.replace(y,function(b){switch(b){case "input":l("input",
|
87
|
+
h);l("DOMAutoComplete",h);wa||(l("compositionstart",f),l("compositionend",g));break;default:l(b,h)}}));/text|password/.test(b.type)&&xb(function(){if(B.contains(b))b.value!==b.oldValue&&h();else if(!b.msRetain)return!1});b.avalonSetter=h;b.oldValue=b.value;ra(d);e.call(b,b.value)};T.TEXTAREA=T.INPUT;T.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||x("ms-duplex\u5728<select multiple=true>\u4e0a\u8981\u6c42\u5bf9\u5e94\u4e00\u4e2a\u6570\u7ec4"):
|
88
|
+
b.multiple&&x("ms-duplex\u5728<select multiple=false>\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)}});ea(b,function(){ra(d);d.changed.call(b,c(),d)},NaN)};v.repeat=function(b,c){var d=b.type;K(b.value,c,b,0,
|
89
|
+
1);b.proxies=[];var e=!1;try{var f=b.$repeat=b.evaluator.apply(0,b.args||[]),g=avalon.type(f);"object"!==g&&"array"!==g&&(e=!0,avalon.log("warning:"+b.value+"\u5bf9\u5e94\u7c7b\u578b\u4e0d\u6b63\u786e"))}catch(h){e=!0,avalon.log("warning:"+b.value+"\u7f16\u8bd1\u51fa\u9519")}var k=b.value.split(".")||[];if(1<k.length){k.pop();for(var l=k[0],k=0,m;m=c[k++];)if(m&&m.hasOwnProperty(l)){k=m[l].$events||{};k[I]=k[I]||[];k[I].push(b);break}}k=b.element;k.removeAttribute(b.name);b.sortedCallback=ba(k,"data-with-sorted",
|
90
|
+
c);b.renderedCallback=ba(k,"data-"+d+"-rendered",c);l=J(d);m=b.element=p.createComment(l+":end");b.clone=p.createComment(l);S.appendChild(m);"each"===d||"with"===d?(b.template=k.innerHTML.trim(),avalon.clearHTML(k).appendChild(m)):(b.template=k.outerHTML.trim(),k.parentNode.replaceChild(m,k));b.template=avalon.parseHTML(b.template);b.rollback=function(){var c=b.element;if(c){C.repeat.call(b,"clear");var d=c.parentNode,e=b.template,f=e.firstChild;d.replaceChild(e,c);(c=b.$stamp)&&c.parentNode&&c.parentNode.removeChild(c);
|
91
|
+
b.element="repeat"===b.type?f:d}};if(!e){b.handler=C.repeat;b.$outer={};d="$key";e="$val";Array.isArray(f)&&(d="$first",e="$last");for(k=0;l=c[k++];)if(l.hasOwnProperty(d)&&l.hasOwnProperty(e)){b.$outer=l;break}d=f.$events;(e=(d||{})[I])&&avalon.Array.ensure(e,b)&&sa(b,e);"object"===g?(b.$with=!0,g=!d?{}:d.$withProxyPool||(d.$withProxyPool={}),b.handler("append",f,g)):f.length&&b.handler("add",0,f.length)}};C.repeat=function(b,c,d){if(b){var e=this.element,f=e.parentNode,g=this.proxies,h=S.cloneNode(!1);
|
92
|
+
switch(b){case "add":for(var e=c+d,k=this.$repeat.length-1,k=[],l=lb(this,c),m=c;m<e;m++){var n=fc(m,this);g.splice(m,0,n);kb(this,h,n,k)}f.insertBefore(h,l);for(m=0;h=k[m++];)fa(h.nodes,h.vmodels),h.nodes=h.vmodels=null;break;case "del":l=g[c].$stamp;e=lb(this,c+d);za(l,e);h=g.splice(c,d);oa(h,"each");break;case "clear":if(h=this.$stamp||g[0])l=h.$stamp||h,za(l,e);oa(g,"each");break;case "move":var l=g[0].$stamp,r=l.nodeValue,s=[],p=[];za(l,e,function(){p.unshift(this);this.nodeValue===r&&(s.unshift(p),
|
93
|
+
p=[])});qa(g,c);for(qa(s,c);p=s.shift();)for(;k=p.shift();)h.appendChild(k);f.insertBefore(h,e);break;case "index":for(k=g.length-1;d=g[c];c++)d.$index=c,d.$first=0===c,d.$last=c===k;return;case "set":(n=g[c])&&ca(n.$events.$index);return;case "append":g=d;l=[];k=[];for(n in c)c.hasOwnProperty(n)&&"hasOwnProperty"!==n&&l.push(n);this.sortedCallback&&(m=this.sortedCallback.call(f,l))&&(Array.isArray(m)&&m.length)&&(l=m);for(m=0;n=l[m++];)"hasOwnProperty"!==n&&(g[n]||(g[n]=hc(n,this)),kb(this,h,g[n],
|
94
|
+
k));m=this.$stamp=this.clone;f.insertBefore(m,e);f.insertBefore(h,e);for(m=0;h=k[m++];)fa(h.nodes,h.vmodels),h.nodes=h.vmodels=null}"clear"===b&&(b="del");var q=this.renderedCallback||z,t=arguments;ea(f,function(){q.apply(f,t);f.oldValue&&"SELECT"===f.tagName&&avalon(f).val(f.oldValue.split(","))},NaN)}};"with,each".replace(y,function(b){v[b]=v.repeat});var ia=[],mb=[],zc=/<script[^>]*>([\S\s]*?)<\/script\s*>/gim,Ac=/\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,Bc=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/ig,
|
95
|
+
Cc={a:/\b(href)\=("javascript[^"]*"|'javascript[^']*')/ig,img:/\b(src)\=("javascript[^"]*"|'javascript[^']*')/ig,form:/\b(action)\=("javascript[^"]*"|'javascript[^']*')/ig},Dc=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ec=/([^\#-~| |!])/g,Ja=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)},$filter:function(b){for(var c=1,d=arguments.length;c<
|
96
|
+
d;c++){var e=arguments[c],f=avalon.filters[e.shift()];"function"===typeof f&&(e=[b].concat(e),b=f.apply(null,e))}return b},camelize:ga,sanitize:function(b){return b.replace(zc,"").replace(Bc,function(b,d){var e=b.toLowerCase().match(/<(\w+)\s/);e&&(e=Cc[e[1]])&&(b=b.replace(e,function(b,c,d){b=d.charAt(0);return c+"="+b+"javascript:void(0)"+b}));return b.replace(Ac," ").replace(/\s+/g," ")})},escape:function(b){return String(b).replace(/&/g,"&").replace(Dc,function(b){var d=b.charCodeAt(0);b=
|
97
|
+
b.charCodeAt(1);return"&#"+(1024*(d-55296)+(b-56320)+65536)+";"}).replace(Ec,function(b){return"&#"+b.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")},currency:function(b,c,d){return(c||"\uffe5")+nb(b,isFinite(d)?d:2)},number:function(b,c){return nb(b,isFinite(c)?c:3)}};new function(){function b(b,c,d){var e="";0>b&&(e="-",b=-b);for(b=""+b;b.length<c;)b="0"+b;d&&(b=b.substr(b.length-c));return e+b}function c(c,d,e,f){return function(g){g=g["get"+c]();if(0<e||g>-e)g+=e;0===g&&-12===e&&
|
98
|
+
(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)));
|
99
|
+
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]},Z:function(c){c=-1*c.getTimezoneOffset();return c=
|
100
|
+
(0<=c?"+":"")+(b(Math[0<c?"floor":"ceil"](c/60),2)+b(Math.abs(c%60),2))}},g=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,h=/^\d+$/,k=/^(\d{4})-?(\d+)-?(\d+)(?:T(\d+)(?::?(\d+)(?::?(\d+)(?:\.(\d+))?)?)?(Z|([+-])(\d+):?(\d+))?)?$/,l=/^(\d+)\D(\d+)\D(\d+)/;Ja.date=function(b,c){var d=Ja.date.locate,k="",m=[],p,q;c=c||"mediumDate";c=d[c]||c;"string"===typeof b&&(h.test(b)?b=parseInt(b,10):(b=b.trim().replace(l,function(b,c,d,e){return(4===e.length?[e,c,d]:[c,d,e]).join("-")}),
|
101
|
+
b=e(b)),b=new Date(b));"number"===typeof b&&(b=new Date(b));if("date"===avalon.type(b)){for(;c;)(q=g.exec(c))?(m=m.concat(q.slice(1)),c=m.pop()):(m.push(c),c=null);m.forEach(function(c){p=f[c];k+=p?p(b,d):c.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return k}};var m={AMPMS:{"0":"\u4e0a\u5348",1:"\u4e0b\u5348"},DAY:{"0":"\u661f\u671f\u65e5",1:"\u661f\u671f\u4e00",2:"\u661f\u671f\u4e8c",3:"\u661f\u671f\u4e09",4:"\u661f\u671f\u56db",5:"\u661f\u671f\u4e94",6:"\u661f\u671f\u516d"},MONTH:{"0":"1\u6708",
|
102
|
+
1:"2\u6708",2:"3\u6708",3:"4\u6708",4:"5\u6708",5:"6\u6708",6:"7\u6708",7:"8\u6708",8:"9\u6708",9:"10\u6708",10:"11\u6708",11:"12\u6708"},SHORTDAY:{"0":"\u5468\u65e5",1:"\u5468\u4e00",2:"\u5468\u4e8c",3:"\u5468\u4e09",4:"\u5468\u56db",5:"\u5468\u4e94",6:"\u5468\u516d"},fullDate:"y\u5e74M\u6708d\u65e5EEEE",longDate:"y\u5e74M\u6708d\u65e5",medium:"yyyy-M-d H:mm:ss",mediumDate:"yyyy-M-d",mediumTime:"H:mm:ss","short":"yy-M-d ah:mm",shortDate:"yy-M-d",shortTime:"ah:mm"};m.SHORTMONTH=m.MONTH;Ja.date.locate=
|
103
|
+
m};var u=avalon.modules={"ready!":{exports:avalon},avalon:{exports:avalon,state:2}};u.exports=u.avalon;new function(){function b(c,d){for(var e in c)if("\u53f8\u5f92\u6b63\u7f8e"===c[e]&&2!==u[e].state&&(e===d||b(u[e].deps,d)))return!0}function c(b,c,d){var f=e(b.src);b.onload=b.onreadystatechange=b.onerror=null;if(c||d&&!u[f].state)setTimeout(function(){E.removeChild(b);b=null}),x("debug: \u52a0\u8f7d "+f+" \u5931\u8d25"+c+" "+!u[f].state);else return!0}function d(){var b=w.length,c;a:for(;c=w[--b];){var e=
|
104
|
+
u[c];c=e.deps;for(var f in c)if(La.call(c,f)&&2!==u[f].state)continue a;if(2!==e.state){w.splice(b,1);c=e.id;var g=e.args,e=e.factory,h=Object(u[c]);h.state=2;for(var k=0,l=[],m=void 0;m=g[k++];)"exports"===m?(m=h.exports||(h.exports={}),l.push(m)):l.push(u[m].exports);g=e.apply(t,l);void 0!==g&&(u[c].exports=g);d()}}}function e(b){return(b||"").replace(H,"")}function f(b){return b?b.substr(0,b.lastIndexOf("/")):q.baseUrl?q.baseUrl:q.loaderUrl}function g(b){var c;try{a.b.c()}catch(d){c=d.stack,!c&&
|
105
|
+
t.opera&&(c=(String(d).match(/of linked script \S+/g)||[]).join(" "))}if(c)return c=c.split(/[@ ]/g).pop(),c="("===c[0]?c.slice(1,-1):c.replace(/\s/,""),c.replace(/(:\d+)?:\d+$/i,"");for(var e=(b?p:E).getElementsByTagName("script"),f=e.length;c=e[--f];)if((b||c.className===I)&&"interactive"===c.readyState)return b="1"[0]?c.src:c.getAttribute("src",4),c.className=b}function h(b,c,d){if("ready!"===b||u[b]&&2===u[b].state)return b;var e=b.match(/(\w+!)?(.+)/),g=e[1]||"js",g=aa[g]||z,h="",e=e[2].replace(H,
|
106
|
+
function(b){h=b;return""}),k=g.ext||"";k&&e.substr(e.length-k.length)===k&&(b=e.slice(0,-k.length),e=e.slice(-k.length));var l=0;r(e,q.paths,function(c,d){b=b.replace(d,c);l=1});l||r(e,q.packages,function(c,d,e){b=b.replace(e.name,e.location)});d&&r(d,q.map,function(c){r(b,c,function(c,d){b=b.replace(d,c)})});/^(?:[a-z]+:)?\/\//i.test(String(b))||(b=v(/\w/.test(b.charAt(0))?f():c,b));b+=k+h;r(e,q.urlArgs,function(c){b+=(-1===b.indexOf("?")?"?":"&")+c});return g(b,q.shim[e])}function k(b,e,f){var g=
|
107
|
+
p.createElement("script");g.className=I;g[Q?"onload":"onreadystatechange"]=function(){if(Q||/loaded|complete/i.test(g.readyState)){var h=B.pop();h&&h.require(e);f&&f();c(g,!1,!Q)&&(x("debug: \u5df2\u6210\u529f\u52a0\u8f7d "+b),w.push(e),d())}};g.onerror=function(){c(g,!0)};g.src=b;E.insertBefore(g,E.firstChild);x("debug: \u6b63\u51c6\u5907\u52a0\u8f7d "+b)}function l(b,c,d){var e=[],f;for(f in b)if(b.hasOwnProperty(f)){var g={name:f,val:b[f]};e.push(g);g.reg="*"===f&&c?/^/:RegExp("^"+f+"(/|$)");d&&
|
108
|
+
"*"!==f&&(g.reg=RegExp("/"+f.replace(/^\//,"")+"(/|$)"))}e.sort(s);return e}function m(b){return function(){var c;b.init&&(c=b.init.apply(t,arguments));return c||b.exports&&y(b.exports)}}function n(b,c,d,e,f){return{id:b,state:c||1,factory:d||z,deps:e||{},args:f||[]}}function r(b,c,d){c=c||[];for(var e=0,f;f=c[e++];)if(f.reg.test(b))return d(f.val,f.name,f),!1}function s(b,c){var d=b.name,e=c.name;return"*"===e?-1:"*"===d?1:e.length-d.length}function v(b,c){"/"!==b.charAt(b.length-1)&&(b+="/");if("./"===
|
109
|
+
c.slice(0,2))return b+c.slice(2);if(".."===c.slice(0,2)){for(b+=c;J.test(b);)b=b.replace(J,"");return b}return"/"===c.slice(0,1)?b+c.slice(1):b+c}function y(b){if(!b)return b;var c=t;b.split(".").forEach(function(b){c=c[b]});return c}var w=[],B=[];D=avalon.require=function(b,c,e){Array.isArray(b)||avalon.error("require\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u5fc5\u987b\u662f\u4f9d\u8d56\u5217\u6570,\u7c7b\u578b\u4e3a\u6570\u7ec4 "+b);var g=[],k={},l=e||"callback"+setTimeout("1"),m=e&&e.replace(/\.js$/i,
|
110
|
+
"");e=f(e);b.forEach(function(b){if((b=h(b,e,m))&&!k[b])g.push(b),k[b]="\u53f8\u5f92\u6b63\u7f8e"});b=u[l];if(!b||2!==b.state)u[l]=n(l,1,c,k,g);b||w.push(l);d()};D.define=function(c,d,f){var h=da.call(arguments);if("string"===typeof c)var k=h.shift();"function"===typeof h[0]&&h.unshift([]);var l=u[k]&&1<=u[k].state?k:e(g());f=h[1];f.id=k;!u[l]&&k&&(u[l]=n(l,1,f));f.require=function(c){h.push(c);var d=!0;try{d=b(u[c].deps,c)}catch(e){}d&&avalon.error(c+"\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"+
|
111
|
+
c+"\u6a21\u5757");delete f.require;D.apply(null,h)};l?f.require(l):B.push(f)};D.config=q;D.define.amd=u;var C=q["orig.paths"]={},F=q["orig.map"]={},K=q.packages=[],G=q["orig.args"]={};avalon.mix(aa,{paths:function(b){avalon.mix(C,b);q.paths=l(C)},map:function(b){avalon.mix(F,b);b=l(F,1,1);avalon.each(b,function(b,c){c.val=l(c.val)});q.map=b},packages:function(b){b=b.concat(K);for(var c={},d=[],e=0,f;f=b[e++];){f="string"===typeof f?{name:f}:f;var g=f.name;if(!c[g]){var h=f.location?f.location:v(g,
|
112
|
+
f.main||"main"),h=h.replace(/\.js$/i,"");d.push(f);c[g]=f.location=h;f.reg=RegExp("^"+g+"(/|$)")}}q.packages=d.sort()},urlArgs:function(b){"string"===typeof b&&(b={"*":b});avalon.mix(G,b);q.urlArgs=l(G,1)},bundles:function(b){var c=q.bundles={},d;for(d in b)avalon.each(b[d],function(b,e){c[e]=d})},baseUrl:function(b){if(!/^(?:[a-z]+:)?\/\//i.test(String(b))){var c=E.getElementsByTagName("base")[0];c&&E.removeChild(c);var d=p.createElement("a");d.href=b;b="1"[0]?d.href:d.getAttribute("href",4);c&&
|
113
|
+
E.insertBefore(c,E.firstChild)}q.baseUrl=b},shim:function(b){for(var c in b){var d=b[c];Array.isArray(d)&&(d=b[c]={deps:d});if(!d.exportsFn&&(d.exports||d.init))d.exportsFn=m(d)}q.shim=b},js:function(b,c){var d=e(b);if(!u[d]){var f=u[d]=n(d);c?D(c.deps||[],function(){var e=avalon.slice(arguments);k(b,d,function(){f.state=2;c.exportsFn&&(f.exports=c.exportsFn.apply(0,e));D.checkDeps()})}):k(b,d)}return d},css:function(b){var c=e(b).replace(/\W/g,"_");if(!p.getElementById(c)){var d=p.createElement("link");
|
114
|
+
d.rel="stylesheet";d.href=b;d.id=c;E.insertBefore(d,E.firstChild)}},text:function(b){var c=Ha(),d=e(b);u[d]={};c.onreadystatechange=function(){if(4===c.readyState){var e=c.status;399<e&&600>e?avalon.error(b+" \u5bf9\u5e94\u8d44\u6e90\u4e0d\u5b58\u5728\u6216\u6ca1\u6709\u5f00\u542f CORS"):(u[d].state=2,u[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}});aa.css.ext=
|
115
|
+
".css";aa.js.ext=".js";D.checkDeps=d;var H=/(\?[^#]*)$/,J=/\/\w+\/\.\./,A=g(!0);A||(A=p.scripts[p.scripts.length-1].src);A=e(A);q.loaderUrl=A.slice(0,A.lastIndexOf("/")+1)};var ob=[];"complete"===p.readyState?setTimeout(Z):(p.addEventListener("DOMContentLoaded",Z),t.addEventListener("load",Z));avalon.ready=function(b){D?D(["ready!"],b):Z===z?b(avalon):ob.push(b)};avalon.config({loader:!0});avalon.ready(function(){avalon.scan(p.body)});"function"===typeof define&&define.amd&&define("avalon",[],function(){return avalon});
|
116
|
+
avalon.noConflict=function(b){b&&t.avalon===avalon&&(t.avalon=avalon);return avalon};void 0===U&&(t.avalon=avalon);return avalon});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avalon-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zj0713001
|
@@ -29,8 +29,11 @@ files:
|
|
29
29
|
- lib/avalon-rails/.DS_Store
|
30
30
|
- lib/avalon-rails/version.rb
|
31
31
|
- vendor/assets/javascripts/avalon.js
|
32
|
+
- vendor/assets/javascripts/avalon.min.js
|
32
33
|
- vendor/assets/javascripts/avalon.mobile.js
|
34
|
+
- vendor/assets/javascripts/avalon.mobile.min.js
|
33
35
|
- vendor/assets/javascripts/avalon.modern.js
|
36
|
+
- vendor/assets/javascripts/avalon.modern.min.js
|
34
37
|
homepage: https://github.com/zj0713001/avalon-rails
|
35
38
|
licenses:
|
36
39
|
- MIT
|