/* copyright 2014, kissy v1.43 mit licensed build time: may 22 12:29 */ kissy.add("node/base",["dom","event/dom"],function(b,e){function c(f,m,g){if(!(this instanceof c))return new c(f,m,g);if(f)if("string"===typeof f){if(f=h.create(f,m,g),f.nodetype===k.document_fragment_node)return d.apply(this,a(f.childnodes)),this}else{if(b.isarray(f)||j(f))return d.apply(this,a(f)),this}else return this;this[0]=f;this.length=1;return this}var h=e("dom"),i=e("event/dom"),g=array.prototype,l=g.slice,k=h.nodetype,d=g.push,a=b.makearray,j=h.isdomnodelist;c.prototype={constructor:c,isnodelist:!0, length:0,item:function(f){return"number"===typeof f?f>=this.length?null:new c(this[f]):new c(f)},add:function(f,a,b){"number"===typeof a&&(b=a,a=void 0);f=c.all(f,a).getdomnodes();a=new c(this);void 0===b?d.apply(a,f):(b=[b,0],b.push.apply(b,f),g.splice.apply(a,b));return a},slice:function(){return new c(l.apply(this,arguments))},getdomnodes:function(){return l.call(this)},each:function(a,d){var k=this;b.each(k,function(b,j){b=new c(b);return a.call(d||b,b,j,k)});return k},getdomnode:function(){return this[0]}, end:function(){return this.__parent||this},filter:function(a){return new c(h.filter(this,a))},all:function(a){a=0")?(d&&(d.getdomnode&&(d=d[0]),d=d.ownerdocument||d),new c(a,void 0,d)):new c(h.query(a,d))},one:function(a,d){var b=c.all(a, d);return b.length?b.slice(0,1):null}});c.nodetype=k;c.keycode=i.keycode;c.gesture=i.gesture;c.replace_history=i.replace_history;return c}); kissy.add("node/attach",["dom","event/dom","./base"],function(b,e){function c(d,a,b){b.unshift(a);d=h[d].apply(h,b);return void 0===d?a:d}var h=e("dom"),i=e("event/dom"),g=e("./base"),l=g.prototype,k=b.makearray;g.keycode=i.keycode;b.each("nodename,iscustomdomain,getemptyiframesrc,equals,contains,index,scrolltop,scrollleft,height,width,innerheight,innerwidth,outerheight,outerwidth,addstylesheet,appendto,prependto,insertbefore,before,after,insertafter,test,hasclass,addclass,removeclass,replaceclass,toggleclass,removeattr,hasattr,hasprop,scrollintoview,remove,empty,removedata,hasdata,unselectable,wrap,wrapall,replacewith,wrapinner,unwrap".split(","),function(d){l[d]= function(){var a=k(arguments);return c(d,this,a)}});b.each("getwindow,getdocument,filter,first,last,parent,closest,next,prev,clone,siblings,contents,children".split(","),function(d){l[d]=function(){var a=k(arguments);a.unshift(this);a=h[d].apply(h,a);return a===void 0?this:a===null?null:new g(a)}});b.each({attr:1,text:0,css:1,style:1,val:0,prop:1,offset:0,html:0,outerhtml:0,outerhtml:0,data:1},function(d,a){l[a]=function(){var j;j=k(arguments);void 0===j[d]&&!b.isobject(j[0])?(j.unshift(this),j=h[a].apply(h, j)):j=c(a,this,j);return j}});b.each(["on","detach","delegate","undelegate"],function(d){l[d]=function(){var a=k(arguments);a.unshift(this);i[d].apply(i,a);return this}});b.each(["fire","firehandler"],function(d){l[d]=function(){var a=k(arguments);a.unshift(this);return i[d].apply(i,a)}})}); kissy.add("node/override",["dom","./base","./attach"],function(b,e){var c=e("dom"),h=e("./base");e("./attach");var i=h.prototype;b.each(["append","prepend","before","after"],function(b){i[b]=function(e){"object"!==typeof e&&(e=c.create(e+""));if(e)c[b](e,this);return this}});b.each(["wrap","wrapall","replacewith","wrapinner"],function(b){var c=i[b];i[b]=function(b){"string"===typeof b&&(b=h.all(b,this[0].ownerdocument));return c.call(this,b)}})}); kissy.add("node/anim",["./base","dom","anim"],function(b,e){function c(b,d,a){for(var c=[],f={},a=a||0;ab)return null;if("select-one"===""+a.type)return d.val(c[b]);a=[];b=0;for(g=c.length;b"+a+"";return d.lastchild}function d(a,b){if(b)if(o&&b.canhavechildren&&"removenode"in a){if(a.firstchild)a:{try{a.innerhtml="";break a}catch(g){}for(var c;c=a.lastchild;)d(c,a)}a.removenode(!1)}else b.removechild(a)}function e(a,b,d){var g=b.nodetype;if(g===l.document_fragment_node){b=b.childnodes;d=d.childnodes;for(g= 0;b[g];)d[g]&&e(a,b[g],d[g]),g++}else if(g===l.element_node){b=b.getelementsbytagname("*");d=d.getelementsbytagname("*");for(g=0;b[g];)d[g]&&a(b[g],d[g]),g++}}function j(a,b){var g=i.env.mods["event/dom/base"],d,c,g=g&&g.exports;if(b.nodetype!==l.element_node||f.hasdata(a)){d=f.data(a);for(c in d)f.data(b,c,d[c]);g&&g.clone&&g.clone(a,b)}}function h(a){var b=null,g,d;if(a&&(a.push||a.item)&&a[0]){b=a[0].ownerdocument;b=b.createdocumentfragment();a=i.makearray(a);g=0;for(d=a.length;g]*)\/>/ig,t=/<([\w:]+)/,g=/^\s+/,p=/\s+$/,o=!!(c&&9>c),u=o,y=/<|&#?\w+;/,z=k&&"outerhtml"in k.documentelement,g=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;i.mix(f,{create:function(a,d,c,e){var o=null;if(!a)return o;if(a.nodetype)return f.clone(a);if("string"!==typeof a)return o;void 0===e&&(e=!0);e&&(a=i.trim(a));var e=f._creators,j,n,c=c||k,z,m=b;if(y.test(a))if(z= g.exec(a))o=c.createelement(z[1]);else{a=a.replace(s,"<$1>");if((z=t.exec(a))&&(j=z[1]))m=j.tolowercase();j=(e[m]||q)(a,c);u&&(n=a.match(g))&&j.insertbefore(c.createtextnode(n[0]),j.firstchild);u&&/\s/.test(a)&&(n=a.match(p))&&j.appendchild(c.createtextnode(n[0]));a=j.childnodes;1===a.length?o=a[0].parentnode.removechild(a[0]):a.length&&(o=h(a))}else o=c.createtextnode(a);i.isplainobject(d)&&(o.nodetype===l.element_node?f.attr(o,d,!0):o.nodetype===l.document_fragment_node&&f.attr(o.childnodes, d,!0));return o},_fixcloneattributes:function(a,b){"textarea"===f.nodename(a)&&(b.defaultvalue=a.defaultvalue,b.value=a.value)},_creators:{div:q},_defaultcreator:q,html:function(a,b,d){var a=f.query(a),c=a[0],e=!1,h,p;if(!c)return null;if(void 0===b)return c.nodetype===l.element_node?c.innerhtml:c.nodetype===l.document_fragment_node?(d=n(c.ownerdocument),d.appendchild(c),d.innerhtml):null;b+="";if(!b.match(/<(?:script|style|link)/i)&&(!u||!b.match(g))&&!c[(b.match(t)||["",""])[1].tolowercase()])try{for(h= a.length-1;0<=h;h--)p=a[h],p.nodetype===l.element_node&&(f.cleandata(p.getelementsbytagname("*")),p.innerhtml=b);e=!0}catch(s){}e||(b=f.create(b,0,c.ownerdocument,0),f.empty(a),f.append(b,a,d))},outerhtml:function(a,b,d){var a=f.query(a),g=a.length,c=a[0];if(!c)return null;if(void 0===b){if(z&&c.nodetype!==f.document_fragment_node)return c.outerhtml;b=n(c.ownerdocument);b.appendchild(f.clone(c,!0));return b.innerhtml}b+="";if(!b.match(/<(?:script|style|link)/i)&&z)for(d=g-1;0<=d;d--)c=a[d],c.nodetype=== l.element_node&&(f.cleandata(c,1),c.outerhtml=b);else b=f.create(b,0,c.ownerdocument,0),f.insertbefore(b,a,d),f.remove(a)},remove:function(a,b){var c,g=f.query(a),e,h=i.env.mods["event/dom/base"],p,h=h&&h.exports;for(p=g.length-1;0<=p;p--)c=g[p],!b&&c.nodetype===l.element_node&&(e=i.makearray(c.getelementsbytagname("*")),e.push(c),f.removedata(e),h&&h.detach&&h.detach(e)),d(c,c.parentnode)},clone:function(a,b,c,d){"object"===typeof b&&(d=b.deepwithdataandevent,c=b.withdataandevent,b=b.deep);var a= f.get(a),g,h=f._fixcloneattributes,p;if(!a)return null;p=a.nodetype;g=a.clonenode(b);if(p===l.element_node||p===l.document_fragment_node)h&&p===l.element_node&&h(a,g),b&&h&&e(h,a,g);c&&(j(a,g),b&&d&&e(j,a,g));return g},empty:function(a){var a=f.query(a),b,c;for(c=a.length-1;0<=c;c--)b=a[c],f.remove(b.childnodes)},_nodelisttofragment:h});f.outerhtml=f.outerhtml;var d=f._creators,h=f.create,c={area:"map",thead:"table",td:"tr",th:"tr",tr:"tbody",tbody:"table",tfoot:"table",caption:"table",colgroup:"table", col:"colgroup",legend:"fieldset"},w;for(w in c)(function(a){d[w]=function(b,c){return h("<"+a+">"+b+"",void 0,c)}})(c[w]);d.option=d.optgroup=function(a,b){return h('",void 0,b)};return f}); kissy.add("dom/base/data",["./api"],function(i,m){var n=m("./api"),q=i.env.host,d="_ks_data_"+i.now(),e={},j={},h={applet:1,object:1,embed:1},f={hasdata:function(c,b){if(c)if(void 0!==b){if(b in c)return!0}else if(!i.isemptyobject(c))return!0;return!1}},k={hasdata:function(c,b){return c==q?k.hasdata(j,b):f.hasdata(c[d],b)},data:function(c,b,a){if(c==q)return k.data(j,b,a);var e=c[d];if(void 0!==a)e=c[d]=c[d]||{},e[b]=a;else return void 0!==b?e&&e[b]:e=c[d]=c[d]||{}},removedata:function(c,b){if(c== q)return k.removedata(j,b);var a=c[d];if(void 0!==b)delete a[b],i.isemptyobject(a)&&k.removedata(c);else try{delete c[d]}catch(e){c[d]=void 0}}},l={hasdata:function(c,b){var a=c[d];return!a?!1:f.hasdata(e[a],b)},data:function(c,b,a){if(!h[c.nodename.tolowercase()]){var f=c[d];if(!f){if(void 0!==b&&void 0===a)return;f=c[d]=i.guid()}c=e[f];if(void 0!==a)c=e[f]=e[f]||{},c[b]=a;else return void 0!==b?c&&c[b]:c=e[f]=e[f]||{}}},removedata:function(c,b){var a=c[d],f;if(a)if(f=e[a],void 0!==b)delete f[b], i.isemptyobject(f)&&l.removedata(c);else{delete e[a];try{delete c[d]}catch(h){c[d]=void 0}c.removeattribute&&c.removeattribute(d)}}};i.mix(n,{__expando:d,hasdata:function(c,b){for(var a=!1,d=n.query(c),f=0;fm||0m?d.scrolltop(e,v.top+m):d.scrolltop(e,v.top+c)}else(h=void 0===h?!0:!!h)?d.scrolltop(e,v.top+m):d.scrolltop(e,v.top+c);if(k)if(q){if(0>n||0n?d.scrollleft(e,v.left+n):d.scrollleft(e,v.left+j)}else void 0===h||h?d.scrollleft(e,v.left+n):d.scrollleft(e,v.left+j)}},docwidth:0,docheight:0,viewportheight:0,viewportwidth:0,scrolltop:0,scrollleft:0});i.each(["left","top"],function(a,b){var c="scroll"+a;d[c]=function(h,i){if("number"===typeof h)return arguments.callee(e,h);var h=d.get(h),k,j,n,m;h&&h.nodetype===f.element_node?void 0!==i?h[c]=parsefloat(i):k=h[c]:(m=l(h),void 0!==i?(i=parsefloat(i),j="left"===a?i:d.scrollleft(m),n= "top"===a?i:d.scrolltop(m),m.scrollto(j,n)):(k=m["page"+(b?"y":"x")+"offset"],"number"!==typeof k&&(j=m.document,k=j.documentelement[c],"number"!==typeof k&&(k=j.body[c]))));return k}});i.each(["width","height"],function(a){d["doc"+a]=function(b){b=d.get(b);b=d.getdocument(b);return c(b.documentelement["scroll"+a],b.body["scroll"+a],d["viewport"+a](b))};d["viewport"+a]=function(b){var b=d.get(b),c=l(b),b=c["inner"+a];if(j.mobile&&b)return b;var b="client"+a,c=c.document,e=c.body,f=c.documentelement[b]; return"css1compat"===c.compatmode&&f||e&&e[b]||f}});return d}); kissy.add("dom/base/style",["./api","ua"],function(i,m){function n(a,b){return b.touppercase()}function q(a){-1!==a.indexof("-")&&(a=a.replace(c,n));if(a in t)return t[a];if(!u||a in u)t[a]={propertyname:a,propertynameprefix:""};else{for(var b=a.charat(0).touppercase()+a.slice(1),d,e=0;e=g){g=void 0;j=a._getcomputedstyle(c,e,i);if(null==j||0>number(j))j=c.style[e]||0;j=parsefloat(j)||0}void 0===d&&(d=r?d:z);e=void 0!==g||r;g=g||j;return d===z?e?g-f(c,["border","padding"],h,i):j:e?g+(d===d?0:d===g?-f(c,["border"],h,i):f(c,["margin"],h,i)):j+f(c,y.slice(d),h,i)}var c=/-([a-z])/ig,b=i,a=m("./api"),s=i.env.host,t={},g=["webkit", "moz","o","ms"],p=g.length,o=s.document||{},u=(o&&o.documentelement).style;m("ua");var y=["margin","border","padding"],z=-1,g=2,d=1,h=a.nodename,c=/^margin/,w="width",r="display"+b.now(),v={fillopacity:1,fontweight:1,lineheight:1,opacity:1,orphans:1,widows:1,zindex:1,zoom:1},i="",l="px",m=/\d(?!px)[a-z%]+$/i,j={},k={},x={},a=q("userselect"),f=a&&a.propertyname;k["float"]="cssfloat";b.mix(a,{_csshooks:j,_cssprops:k,_getcomputedstyle:function(b,c,e){var f="",h,g;h=b.ownerdocument;c=d(c);if(e=e||h.defaultview.getcomputedstyle(b, null))f=e.getpropertyvalue(c)||e[c];""===f&&!a.contains(h,b)&&(f=b.style[c]);a._re_num_no_px.test(f)&&c.test(c)&&(g=b.style,b=g.width,c=g.minwidth,h=g.maxwidth,g.minwidth=g.maxwidth=g.width=f,f=e.width,g.width=b,g.minwidth=c,g.maxwidth=h);return f},style:function(c,e,d){var c=a.query(c),f,h=c[0];if(b.isplainobject(e))for(f in e)for(h=c.length-1;0<=h;h--)j(c[h],f,e[f]);else{if(void 0===d)return f="",h&&(f=j(h,e,d)),f;for(h=c.length-1;0<=h;h--)j(c[h],e,d)}},css:function(e,d,f){var e=a.query(e),h=e[0], g;if(b.isplainobject(d))for(g in d)for(h=e.length-1;0<=h;h--)j(e[h],g,d[g]);else{d=d.replace(c,n);g=j[d];if(void 0===f){f="";if(h&&(!g||!("get"in g&&void 0!==(f=g.get(h,!0)))))f=a._getcomputedstyle(h,d);return"undefined"===typeof f?"":f}for(h=e.length-1;0<=h;h--)j(e[h],d,f)}},show:function(b){var b=a.query(b),c,e,d;for(d=b.length-1;0<=d;d--)if(e=b[d],e.style.display=a.data(e,r)||i,"none"===a.css(e,"display")){c=e.tagname.tolowercase();var f=void 0,h=x[c],g=void 0;x[c]||(f=o.body||o.documentelement, g=o.createelement(c),a.prepend(g,f),h=a.css(g,"display"),f.removechild(g),x[c]=h);c=h;a.data(e,r,c);e.style.display=c}},hide:function(b){var b=a.query(b),c,e;for(e=b.length-1;0<=e;e--){c=b[e];var d=c.style,f=d.display;"none"!==f&&(f&&a.data(c,r,f),d.display="none")}},toggle:function(b){var b=a.query(b),c,e;for(e=b.length-1;0<=e;e--)c=b[e],"none"===a.css(c,"display")?a.show(c):a.hide(c)},addstylesheet:function(b,c,e){"string"===typeof b&&(e=c,c=b,b=s);var b=a.getdocument(b),d;if(e&&(e=e.replace("#", i)))d=a.get("#"+e,b);d||(d=a.create("