/* Copyright 2014, KISSY v1.43 MIT Licensed build time: May 22 12:18 */ KISSY.add("dom/base/api",[],function(i){var m=i.Env.host||{},n=m.document,q=i.UA,d={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},e={isCustomDomain:function(d){var d=d||m,d=e.get(d),h=d.document.domain,d=d.location.hostname;return h!==d&&h!=="["+d+"]"},getEmptyIframeSrc:function(d){d=d||m;d=e.get(d);return q.ie&&e.isCustomDomain(d)? "javascript:void(function(){"+encodeURIComponent('document.open();document.domain="'+d.document.domain+'";document.close();')+"}())":""},NodeType:d,getWindow:function(j){if(!j)return m;j=e.get(j);if(i.isWindow(j))return j;var h=j;h.nodeType!==d.DOCUMENT_NODE&&(h=j.ownerDocument);return h.defaultView||h.parentWindow},getDocument:function(j){if(!j)return n;j=e.get(j);return i.isWindow(j)?j.document:j.nodeType===d.DOCUMENT_NODE?j:j.ownerDocument},isDomNodeList:function(d){return d&&!d.nodeType&&d.item&& !d.setTimeout},nodeName:function(d){var h=e.get(d),d=h.nodeName.toLowerCase();q.ie&&(h=h.scopeName)&&"HTML"!==h&&(d=h.toLowerCase()+":"+d);return d},_RE_NUM_NO_PX:RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i")};i.mix(e,d);return e}); KISSY.add("dom/base/attr",["./api"],function(i,m){function n(a){return null==a?"":a+""}function q(a,b){var b=g[b]||b,d=o[b];return d&&d.get?d.get(a,b):a[b]}var d=m("./api"),e=i.Env.host.document,j=d.NodeType,e=e&&e.documentElement,h=d.nodeName,f=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,k=/^(?:button|input|object|select|textarea)$/i,l=/^a(?:rea)?$/i,c=/:|^on/,b=/\r/g,a={},s={val:1,css:1,html:1,text:1,data:1,width:1, height:1,offset:1,scrollTop:1,scrollLeft:1},t={tabindex:{get:function(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?parseInt(b.value,10):k.test(a.nodeName)||l.test(a.nodeName)&&a.href?0:void 0}}},g={hidefocus:"hideFocus",tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},p= {get:function(a,b){return d.prop(a,b)?b.toLowerCase():void 0},set:function(a,b,c){!1===b?d.removeAttr(a,c):(b=g[c]||c,b in a&&(a[b]=!0),a.setAttribute(c,c.toLowerCase()));return c}},o={},u={},y={select:{get:function(a){var b=a.selectedIndex,c=a.options,g;if(0>b)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("