forked from ktmud/kwiki_tpl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkissy-min.js
95 lines (95 loc) · 39.8 KB
/
kissy-min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
Copyright 2010, KISSY UI Library v1.1.3
MIT Licensed
build time: Sep 9 13:08
*/
(function(b,i,p){if(b[i]===p)b[i]={};i=b[i];var r=b.document,h=location,m=function(e,j,o,s){if(!j||!e)return e;if(o===p)o=true;var d,a,c;if(s&&(c=s.length))for(d=0;d<c;d++){a=s[d];if(a in j)if(o||!(a in e))e[a]=j[a]}else for(a in j)if(o||!(a in e))e[a]=j[a];return e},k=false,f=[],x=false,z=/^#?([\w-]+)$/,u=0;m(i,{version:"1.1.3",__init:function(){this.Env={mods:{},_loadQueue:{}};var e=r.getElementsByTagName("script");this.Config={debug:"",base:e[e.length-1].src.replace(/^(.*)(seed|kissy).*$/i,
"$1"),timeout:10}},ready:function(e){x||this._bindReady();k?e.call(b,this):f.push(e);return this},_bindReady:function(){var e=this,j=r.documentElement.doScroll,o=j?"onreadystatechange":"DOMContentLoaded",s=function(){e._fireReady()};x=true;if(r.readyState==="complete")return s();if(r.addEventListener){var d=function(){r.removeEventListener(o,d,false);s()};r.addEventListener(o,d,false);b.addEventListener("load",s,false)}else{var a=function(){if(r.readyState==="complete"){r.detachEvent(o,a);s()}};r.attachEvent(o,
a);b.attachEvent("onload",s);if(b==b.top){var c=function(){try{j("left");s()}catch(n){setTimeout(c,1)}};c()}}},_fireReady:function(){if(!k){k=true;if(f){for(var e,j=0;e=f[j++];)e.call(b,this);f=null}}},available:function(e,j){if((e=(e+"").match(z)[1])&&i.isFunction(j))var o=1,s=i.later(function(){if(r.getElementById(e)&&(j()||1)||++o>500)s.cancel()},40,true)},mix:m,merge:function(){var e={},j,o=arguments.length;for(j=0;j<o;++j)m(e,arguments[j]);return e},augment:function(){var e=arguments,j=e.length-
2,o=e[0],s=e[j],d=e[j+1],a=1;if(!i.isArray(d)){s=d;d=p;j++}if(!i.isBoolean(s)){s=p;j++}for(;a<j;a++)m(o.prototype,e[a].prototype||e[a],s,d);return o},extend:function(e,j,o,s){if(!j||!e)return e;var d=Object.prototype,a=j.prototype,c=function(n){function l(){}l.prototype=n;return new l}(a);e.prototype=c;c.constructor=e;e.superclass=a;if(j!==Object&&a.constructor===d.constructor)a.constructor=j;o&&m(c,o);s&&m(e,s);return e},namespace:function(){var e=arguments.length,j=null,o,s,d;for(o=0;o<e;++o){d=
(""+arguments[o]).split(".");j=this;for(s=b[d[0]]===j?1:0;s<d.length;++s)j=j[d[s]]=j[d[s]]||{}}return j},app:function(e,j){var o=i.isString(e),s=o?b[e]||{}:e;m(s,this,true,i.__APP_MEMBERS);s.__init();m(s,i.isFunction(j)?j():j);o&&(b[e]=s);return s},log:function(e,j,o){if(i.Config.debug){if(o)e=o+": "+e;if(b.console!==p&&console.log)console[j&&console[j]?j:"log"](e)}},error:function(e){if(i.Config.debug)throw e;},guid:function(e){var j=u++ +"";return e?e+j:j}});i.__init();i.__APP_MEMBERS=["__init",
"namespace"];if(h&&(h.search||"").indexOf("ks-debug")!==-1)i.Config.debug=true})(window,"KISSY");
(function(b,i,p){function r(g){var t=typeof g;return g===null||t!=="object"&&t!=="function"}function h(g){return f.slice.call(g)}var m=document,k=m.documentElement,f=Array.prototype,x=f.indexOf,z=f.lastIndexOf,u=f.filter,e=String.prototype.trim,j=Object.prototype.toString,o=encodeURIComponent,s=decodeURIComponent,d=o("[]"),a=/^\s+|\s+$/g,c=/^(\w+)\[\]$/,n=/\S/;i.mix(i,{isUndefined:function(g){return g===p},isBoolean:function(g){return j.call(g)==="[object Boolean]"},isString:function(g){return j.call(g)===
"[object String]"},isNumber:function(g){return j.call(g)==="[object Number]"&&isFinite(g)},isPlainObject:function(g){return g&&j.call(g)==="[object Object]"&&!g.nodeType&&!g.setInterval},isEmptyObject:function(g){for(var t in g)return false;return true},isFunction:function(g){return j.call(g)==="[object Function]"},isArray:function(g){return j.call(g)==="[object Array]"},trim:e?function(g){return g==p?"":e.call(g)}:function(g){return g==p?"":g.toString().replace(a,"")},substitute:function(g,t,q){if(!i.isString(g)||
!i.isPlainObject(t))return g;return g.replace(q||/\\?\{([^{}]+)\}/g,function(w,A){if(w.charAt(0)==="\\")return w.slice(1);return t[A]!==p?t[A]:""})},each:function(g,t,q){var w,A=0,v=g.length,y=v===p||i.isFunction(g);q=q||b;if(y)for(w in g){if(t.call(q,g[w],w,g)===false)break}else for(w=g[0];A<v&&t.call(q,w,A,g)!==false;w=g[++A]);return g},indexOf:x?function(g,t){return x.call(t,g)}:function(g,t){for(var q=0,w=t.length;q<w;++q)if(t[q]===g)return q;return-1},lastIndexOf:z?function(g,t){return z.call(t,
g)}:function(g,t){for(var q=t.length-1;q>=0;q--)if(t[q]===g)break;return q},unique:function(g,t){t&&g.reverse();g=g.slice();for(var q=0,w,A;q<g.length;){for(A=g[q];(w=i.lastIndexOf(A,g))!==q;)g.splice(w,1);q+=1}t&&g.reverse();return g},inArray:function(g,t){return i.indexOf(g,t)>-1},makeArray:function(g){if(g===null||g===p)return[];if(i.isArray(g))return g;if(typeof g.length!=="number"||i.isString(g)||i.isFunction(g))return[g];return h(g)},filter:u?function(g,t,q){return u.call(g,t,q)}:function(g,
t,q){var w=[];i.each(g,function(A,v,y){t.call(q,A,v,y)&&w.push(A)});return w},param:function(g,t){if(!i.isPlainObject(g))return"";t=t||"&";var q=[],w,A;for(w in g){A=g[w];w=o(w);if(r(A))q.push(w,"=",o(A+""),t);else if(i.isArray(A)&&A.length)for(var v=0,y=A.length;v<y;++v)r(A[v])&&q.push(w,d+"=",o(A[v]+""),t)}q.pop();return q.join("")},unparam:function(g,t){if(typeof g!=="string"||(g=i.trim(g)).length===0)return{};var q={};g=g.split(t||"&");for(var w,A,v,y=0,B=g.length;y<B;++y){t=g[y].split("=");w=
s(t[0]);try{A=s(t[1]||"")}catch(C){A=t[1]||""}if((v=w.match(c))&&v[1]){q[v[1]]=q[v[1]]||[];q[v[1]].push(A)}else q[w]=A}return q},later:function(g,t,q,w,A){t=t||0;w=w||{};var v=g,y=i.makeArray(A),B;if(i.isString(g))v=w[g];v||i.error("method undefined");g=function(){v.apply(w,y)};B=q?setInterval(g,t):setTimeout(g,t);return{id:B,interval:q,cancel:function(){this.interval?clearInterval(B):clearTimeout(B)}}},clone:function(g){var t=g,q,w;if(g&&((q=i.isArray(g))||i.isPlainObject(g))){t=q?[]:{};for(w in g)if(g.hasOwnProperty(w))t[w]=
i.clone(g[w])}return t},now:function(){return(new Date).getTime()},globalEval:function(g){if(g&&n.test(g)){var t=m.getElementsByTagName("head")[0]||k,q=m.createElement("script");q.text=g;t.insertBefore(q,t.firstChild);t.removeChild(q)}}});try{h(k.childNodes)}catch(l){h=function(g){for(var t=[],q=g.length-1;q>=0;q--)t[q]=g[q];return t}}})(window,KISSY);
(function(b,i,p){var r=b.document,h=r.getElementsByTagName("head")[0]||r.documentElement,m=2,k=3,f=4,x=i.mix,z=r.createElement("script").readyState?function(e,j){var o=e.onreadystatechange;e.onreadystatechange=function(){var s=e.readyState;if(s==="loaded"||s==="complete"){e.onreadystatechange=null;o&&o();j.call(this)}}}:function(e,j){e.addEventListener("load",j,false)},u=/\.css(?:\?|$)/i;b={add:function(e,j,o){var s=this.Env.mods,d;if(i.isString(e)&&!o&&i.isPlainObject(j)){d={};d[e]=j;e=d}if(i.isPlainObject(e)){i.each(e,
function(a,c){a.name=c;s[c]&&x(a,s[c],false)});x(s,e)}else{o=o||{};d=s[e]||{};e=o.host||d.host||e;d=s[e]||{};x(d,{name:e,status:m});if(!d.fns)d.fns=[];j&&d.fns.push(j);x(s[e]=d,o);d.attach!==false&&this.__isAttached(d.requires)&&this.__attachMod(d)}return this},use:function(e,j,o){e=e.replace(/\s+/g,"").split(",");o=o||{};var s=this,d=s.Env.mods,a=(o||0).global,c,n=e.length,l,g,t;a&&s.__mixMods(a);if(s.__isAttached(e))j&&j(s);else{for(c=0;c<n&&(l=d[e[c]]);c++)if(l.status!==f){if(o.order&&c>0){if(!l.requires)l.requires=
[];l._requires=l.requires.concat();g=e[c-1];if(!i.inArray(g,l.requires)&&!i.inArray(l.name,d[g].requires||[]))l.requires.push(g)}s.__attach(l,function(){if(!t&&s.__isAttached(e)){t=true;if(l._requires)l.requires=l._requires;j&&j(s)}},a)}return s}},__attach:function(e,j,o){function s(){if(d.__isAttached(a)){e.status===m&&d.__attachMod(e);e.status===f&&j()}}for(var d=this,a=e.requires||[],c=0,n=a.length;c<n;c++)d.__attach(d.Env.mods[a[c]],s,o);d.__buildPath(e);d.__load(e,s,o)},__mixMods:function(e){var j=
this.Env.mods,o=e.Env.mods,s;for(s in o)this.__mixMod(j,o,s,e)},__mixMod:function(e,j,o,s){var d=e[o]||{},a=d.status;i.mix(d,i.clone(j[o]));if(a)d.status=a;s&&this.__buildPath(d,s.Config.base);e[o]=d},__attachMod:function(e){var j=this;if(e.fns){i.each(e.fns,function(o){o&&o(j)});e.fns=p}e.status=f},__isAttached:function(e){for(var j=this.Env.mods,o,s=(e=i.makeArray(e)).length-1;s>=0&&(o=j[e[s]]);s--)if(o.status!==f)return false;return true},__load:function(e,j,o){function s(){d();if(e.status!==k){o&&
a.__mixMod(a.Env.mods,o.Env.mods,e.name,o);if(e.status!==f)e.status=m;j()}}function d(){n[c]=m}var a=this,c=e.fullpath,n=i.Env._loadQueue,l=n[c];e.status=e.status||0;if(e.status<1&&l)e.status=l.nodeName?1:m;if(i.isString(e.cssfullpath)){a.getScript(e.cssfullpath);e.cssfullpath=m}if(e.status<1&&c){e.status=1;l=a.getScript(c,{success:function(){KISSY.log(e.name+" is loaded.","info");s()},error:function(){e.status=k;d()},charset:e.charset});u.test(c)||(n[c]=l)}else e.status===1?z(l,s):j()},__buildPath:function(e,
j){function o(d,a){if(!e[a]&&e[d])e[a]=(j||s.base)+e[d];if(e[a]&&s.debug)e[a]=e[a].replace(/-min/g,"")}var s=this.Config;o("path","fullpath");e.cssfullpath!==m&&o("csspath","cssfullpath")},getScript:function(e,j,o){var s=u.test(e),d=r.createElement(s?"link":"script"),a=j,c,n,l;if(i.isPlainObject(a)){j=a.success;c=a.error;n=a.timeout;o=a.charset}if(s){d.href=e;d.rel="stylesheet"}else{d.src=e;d.async=true}if(o)d.charset=o;if(i.isFunction(j))s?j.call(d):z(d,function(){if(l){l.cancel();l=p}j.call(d)});
if(i.isFunction(c))l=i.later(function(){l=p;c()},(n||this.Config.timeout)*1E3);h.insertBefore(d,h.firstChild);return d}};x(i,b);i.each(b,function(e,j){i.__APP_MEMBERS.push(j)})})(window,KISSY);(function(b){var i={core:{path:"packages/core-min.js",charset:"utf-8"}};b.each(["sizzle","datalazyload","flash","switchable","suggest","overlay"],function(p){i[p]={path:p+"/"+p+"-pkg-min.js",requires:["core"],charset:"utf-8"}});b.add(i)})(KISSY);
KISSY.add("ua",function(b){var i=navigator.userAgent,p="",r="",h,m={},k=function(f){var x=0;return parseFloat(f.replace(/\./g,function(){return x++===0?".":""}))};if((h=i.match(/AppleWebKit\/([\d.]*)/))&&h[1]){m[p="webkit"]=k(h[1]);if((h=i.match(/Chrome\/([\d.]*)/))&&h[1])m[r="chrome"]=k(h[1]);else if((h=i.match(/\/([\d.]*) Safari/))&&h[1])m[r="safari"]=k(h[1]);if(/ Mobile\//.test(i))m.mobile="apple";else if(h=i.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/))m.mobile=h[0].toLowerCase()}else if((h=
i.match(/Presto\/([\d.]*)/))&&h[1]){m[p="presto"]=k(h[1]);if((h=i.match(/Opera\/([\d.]*)/))&&h[1]){m[r="opera"]=k(h[1]);if((h=i.match(/Opera\/.* Version\/([\d.]*)/))&&h[1])m[r]=k(h[1]);if((h=i.match(/Opera Mini[^;]*/))&&h)m.mobile=h[0].toLowerCase();else if((h=i.match(/Opera Mobi[^;]*/))&&h)m.mobile=h[0]}}else if((h=i.match(/MSIE\s([^;]*)/))&&h[1]){m[p="trident"]=0.1;m[r="ie"]=k(h[1]);if((h=i.match(/Trident\/([\d.]*)/))&&h[1])m[p]=k(h[1])}else if(h=i.match(/Gecko/)){m[p="gecko"]=0.1;if((h=i.match(/rv:([\d.]*)/))&&
h[1])m[p]=k(h[1]);if((h=i.match(/Firefox\/([\d.]*)/))&&h[1])m[r="firefox"]=k(h[1])}m.core=p;m.shell=r;m._numberify=k;b.UA=m});
KISSY.add("ua-extra",function(b){var i=b.UA,p=navigator.userAgent,r,h,m={},k=i._numberify;if(p.match(/360SE/))m[h="se360"]=3;else if(p.match(/Maxthon/)&&(r=window.external)){h="maxthon";try{m[h]=k(r.max_version)}catch(f){m[h]=0.1}}else if(r=p.match(/TencentTraveler\s([\d.]*)/))m[h="tt"]=r[1]?k(r[1]):0.1;else if(p.match(/TheWorld/))m[h="theworld"]=3;else if(r=p.match(/SE\s([\d.]*)/))m[h="sougou"]=r[1]?k(r[1]):0.1;h&&(m.shell=h);b.mix(i,m)});
KISSY.add("dom",function(b,i){function p(r,h){return r&&r.nodeType===h}b.DOM={_isElementNode:function(r){return p(r,1)},_isKSNode:function(r){return b.Node&&p(r,b.Node.TYPE)},_getWin:function(r){return r&&"scrollTo"in r&&r.document?r:p(r,9)?r.defaultView||r.parentWindow:r===i?window:false},_nodeTypeIs:p}});
KISSY.add("selector",function(b,i){function p(a,c){var n,l=[],g,t;c=r(c);if(b.isString(a)){a=b.trim(a);if(s.test(a)){if(a=h(a.slice(1),c))l=[a]}else if(n=d.exec(a)){g=n[1];t=n[2];n=n[3];if(c=g?h(g,c):c)if(n)if(!g||a.indexOf(u)!==-1)l=k(n,t,c);else{if((a=h(g,c))&&z.hasClass(a,n))l=[a]}else if(t)l=m(t,c)}else if(b.ExternalSelector)return b.ExternalSelector(a,c);else f(a)}else if(a&&(a[j]||a[o]))l=a[j]?[a[j]()]:a[o]();else if(a&&(b.isArray(a)||a.item&&!a.nodeType))l=a;else if(a)l=[a];if(l.item)l=b.makeArray(l);
l.each=function(q,w){return b.each(l,q,w)};return l}function r(a){if(a===i)a=x;else if(b.isString(a)&&s.test(a))a=h(a.slice(1),x);else if(a&&a.nodeType!==1&&a.nodeType!==9)a=null;return a}function h(a,c){if(c.nodeType!==9)c=c.ownerDocument;return c.getElementById(a)}function m(a,c){return c.getElementsByTagName(a)}function k(a,c,n){n=a=n.getElementsByClassName(a);var l=0,g=0,t=a.length,q;if(c&&c!==e){n=[];for(c=c.toUpperCase();l<t;++l){q=a[l];if(q.tagName===c)n[g++]=q}}return n}function f(a){b.error("Unsupported selector: "+
a)}var x=document,z=b.DOM,u=" ",e="*",j="getDOMNode",o=j+"s",s=/^#[\w-]+$/,d=/^(?:#([\w-]+))?\s*([\w-]+|\*)?\.?([\w-]+)?$/;(function(){var a=x.createElement("div");a.appendChild(x.createComment(""));if(a.getElementsByTagName(e).length>0)m=function(c,n){n=n.getElementsByTagName(c);if(c===e){c=[];for(var l=0,g=0,t;t=n[l++];)if(t.nodeType===1)c[g++]=t;n=c}return n}})();x.getElementsByClassName||(k=x.querySelectorAll?function(a,c,n){return n.querySelectorAll((c?c:"")+"."+a)}:function(a,c,n){c=n.getElementsByTagName(c||
e);n=[];var l=0,g=0,t=c.length,q,w;for(a=u+a+u;l<t;++l){q=c[l];if((w=q.className)&&(u+w+u).indexOf(a)>-1)n[g++]=q}return n});b.query=p;b.get=function(a,c){return p(a,c)[0]||null};b.mix(z,{query:p,get:b.get,filter:function(a,c){var n=p(a),l,g,t,q=[];if(b.isString(c)&&(l=d.exec(c))&&!l[1]){g=l[2];t=l[3];c=function(w){return!(g&&w.tagName!==g.toUpperCase()||t&&!z.hasClass(w,t))}}if(b.isFunction(c))q=b.filter(n,c);else if(c&&b.ExternalSelector)q=b.ExternalSelector._filter(a,c);else f(c);return q},test:function(a,
c){a=p(a);return z.filter(a,c).length===a.length}})});
KISSY.add("dom-class",function(b,i){function p(k,f,x,z){if(!(f=b.trim(f)))return z?false:i;k=b.query(k);var u=0,e=k.length;f=f.split(h);for(var j;u<e;u++){j=k[u];if(r._isElementNode(j)){j=x(j,f,f.length);if(j!==i)return j}}if(z)return false}var r=b.DOM,h=/[\.\s]\s*\.?/,m=/[\n\t]/g;b.mix(r,{hasClass:function(k,f){return p(k,f,function(x,z,u){if(x=x.className){x=" "+x+" ";for(var e=0,j=true;e<u;e++)if(x.indexOf(" "+z[e]+" ")<0){j=false;break}if(j)return true}},true)},addClass:function(k,f){p(k,f,function(x,
z,u){var e=x.className;if(e){var j=" "+e+" ";e=e;for(var o=0;o<u;o++)if(j.indexOf(" "+z[o]+" ")<0)e+=" "+z[o];x.className=b.trim(e)}else x.className=f})},removeClass:function(k,f){p(k,f,function(x,z,u){var e=x.className;if(e)if(u){e=(" "+e+" ").replace(m," ");for(var j=0,o;j<u;j++)for(o=" "+z[j]+" ";e.indexOf(o)>=0;)e=e.replace(o," ");x.className=b.trim(e)}else x.className=""})},replaceClass:function(k,f,x){r.removeClass(k,f);r.addClass(k,x)},toggleClass:function(k,f,x){var z=b.isBoolean(x),u;p(k,
f,function(e,j,o){for(var s=0,d;s<o;s++){d=j[s];u=z?!x:r.hasClass(e,d);r[u?"removeClass":"addClass"](e,d)}})}})});
KISSY.add("dom-attr",function(b,i){function p(d,a){return a&&a.nodeName.toUpperCase()===d.toUpperCase()}var r=b.UA,h=r.ie,m=h&&h<8,k=document.documentElement.textContent!==i?"textContent":"innerText",f=b.DOM,x=f._isElementNode,z=function(d){return f._nodeTypeIs(d,3)},u=/href|src|style/,e=/href|src|colspan|rowspan/,j=/\r/g,o=/radio|checkbox/,s={readonly:"readOnly"};m&&b.mix(s,{"for":"htmlFor","class":"className"});b.mix(f,{attr:function(d,a,c){if(b.isPlainObject(a))for(var n in a)f.attr(d,n,a[n]);
else if(a=b.trim(a)){a=a.toLowerCase();a=s[a]||a;if(c===i){d=b.get(d);if(!x(d))return i;var l;u.test(a)||(l=d[a]);if(l===i)l=d.getAttribute(a);if(m)if(e.test(a))l=d.getAttribute(a,2);else if(a==="style")l=d.style.cssText;return l===null?i:l}b.each(b.query(d),function(g){if(x(g))if(a==="style")g.style.cssText=c;else{if(a==="checked")g[a]=!!c;g.setAttribute(a,""+c)}})}},removeAttr:function(d,a){b.each(b.query(d),function(c){if(x(c)){f.attr(c,a,"");c.removeAttribute(a)}})},val:function(d,a){if(a===i){var c=
b.get(d);if(!x(c))return i;if(p("option",c))return(c.attributes.value||{}).specified?c.value:c.text;if(p("select",c)){var n=c.selectedIndex;d=c.options;if(n<0)return null;else if(c.type==="select-one")return f.val(d[n]);c=[];for(var l=0,g=d.length;l<g;++l)d[l].selected&&c.push(f.val(d[l]));return c}if(r.webkit&&o.test(c.type))return c.getAttribute("value")===null?"on":c.value;return(c.value||"").replace(j,"")}b.each(b.query(d),function(t){if(p("select",t)){if(b.isNumber(a))a+="";var q=b.makeArray(a),
w=t.options,A;l=0;for(g=w.length;l<g;++l){A=w[l];A.selected=b.inArray(f.val(A),q)}if(!q.length)t.selectedIndex=-1}else if(x(t))t.value=a})},text:function(d,a){if(a===i){d=b.get(d);if(x(d))return d[k]||"";else if(z(d))return d.nodeValue}else b.each(b.query(d),function(c){if(x(c))c[k]=a;else if(z(c))c.nodeValue=a})}})});
KISSY.add("dom-style",function(b,i){function p(a,c){var n=b.get(a),l=c===x?n.offsetWidth:n.offsetHeight;b.each(c===x?["Left","Right"]:["Top","Bottom"],function(g){l-=parseFloat(h._getComputedStyle(n,"padding"+g))||0;l-=parseFloat(h._getComputedStyle(n,"border"+g+"Width"))||0});return l}function r(a,c,n){var l=n;if(n===z&&e.test(c)){l=0;if(h.css(a,"position")==="absolute"){n=a[c==="left"?"offsetLeft":"offsetTop"];if(m.ie===8||m.opera)n-=u(h.css(a.offsetParent,"border-"+c+"-width"))||0;l=n-(u(h.css(a,
"margin-"+c))||0)}}return l}var h=b.DOM,m=b.UA,k=document,f=k.documentElement,x="width",z="auto",u=parseInt,e=/^left|top$/,j=/width|height|top|left|right|bottom|margin|padding/i,o=/-([a-z])/ig,s=function(a,c){return c.toUpperCase()},d={};b.mix(h,{_CUSTOM_STYLES:d,_getComputedStyle:function(a,c){var n="",l=a.ownerDocument;if(a.style)n=l.defaultView.getComputedStyle(a,null)[c];return n},css:function(a,c,n){if(b.isPlainObject(c))for(var l in c)h.css(a,l,c[l]);else{if(c.indexOf("-")>0)c=c.replace(o,s);
c=d[c]||c;if(n===i){a=b.get(a);l="";if(a&&a.style){l=c.get?c.get(a):a.style[c];if(l===""&&!c.get)l=r(a,c,h._getComputedStyle(a,c))}return l===i?"":l}else{if(n===null||n==="")n="";else if(!isNaN(new Number(n))&&j.test(c))n+="px";(c===x||c==="height")&&parseFloat(n)<0||b.each(b.query(a),function(g){if(g&&g.style){c.set?c.set(g,n):(g.style[c]=n);if(n==="")g.style.cssText||g.removeAttribute("style")}})}}},width:function(a,c){if(c===i)return p(a,x);else h.css(a,x,c)},height:function(a,c){if(c===i)return p(a,
"height");else h.css(a,"height",c)},addStyleSheet:function(a,c){var n;if(c)n=b.get("#"+c);if(!n){n=h.create("<style>",{id:c});b.get("head").appendChild(n);if(n.styleSheet)n.styleSheet.cssText=a;else n.appendChild(k.createTextNode(a))}}});if(f.style.cssFloat!==i)d["float"]="cssFloat";else if(f.style.styleFloat!==i)d["float"]="styleFloat"});
KISSY.add("dom-style-ie",function(b,i){if(b.UA.ie){var p=b.DOM;b=document;var r=b.documentElement,h=p._CUSTOM_STYLES,m=/^-?\d+(?:px)?$/i,k=/^-?\d/,f=/^width|height$/;try{if(r.style.opacity===i&&r.filters)h.opacity={get:function(z){var u=100;try{u=z.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(e){try{u=z.filters("alpha").opacity}catch(j){}}return u/100+""},set:function(z,u){var e=z.style;z=(z.currentStyle||0).filter||"";e.zoom=1;if(z)if(z=z.replace(/alpha\(opacity=.+\)/ig,""))z+=", ";
e.filter=z+"alpha(opacity="+u*100+")"}}}catch(x){}if(!(b.defaultView||{}).getComputedStyle&&r.currentStyle)p._getComputedStyle=function(z,u){var e=z.style,j=z.currentStyle[u];if(f.test(u))j=p[u](z)+"px";else if(!m.test(j)&&k.test(j)){var o=e.left,s=z.runtimeStyle.left;z.runtimeStyle.left=z.currentStyle.left;e.left=u==="fontSize"?"1em":j||0;j=e.pixelLeft+"px";e.left=o;z.runtimeStyle.left=s}return j}}});
KISSY.add("dom-offset",function(b,i){function p(q){var w=0,A=0,v=u(q[a]);if(q[t]){q=q[t]();w=q[c];A=q[n];if(m.mobile!=="apple"){w+=h[l](v);A+=h[g](v)}}return{left:w,top:A}}function r(q,w){if(h.css(q,s)==="static")q.style[s]=d;var A=p(q),v={},y,B;for(B in w){y=o(h.css(q,B),10)||0;v[B]=y+w[B]-A[B]}h.css(q,v)}var h=b.DOM,m=b.UA,k=window,f=document,x=h._isElementNode,z=h._nodeTypeIs,u=h._getWin,e=f.compatMode==="CSS1Compat",j=Math.max,o=parseInt,s="position",d="relative",a="ownerDocument",c="left",n=
"top",l="scrollLeft",g="scrollTop",t="getBoundingClientRect";b.mix(h,{offset:function(q,w){if(!(q=b.get(q))||!q[a])return null;if(w===i)return p(q);r(q,w)},scrollIntoView:function(q,w,A,v){if((q=b.get(q))&&q[a]){v=v===i?true:!!v;A=A===i?true:!!A;if(!w||w===k)return q.scrollIntoView(A);w=b.get(w);if(z(w,9))w=u(w);var y=w&&"scrollTo"in w&&w.document,B=h.offset(q),C=y?{left:h.scrollLeft(w),top:h.scrollTop(w)}:h.offset(w),D={left:B[c]-C[c],top:B[n]-C[n]};B=y?h.viewportHeight(w):w.clientHeight;C=y?h.viewportWidth(w):
w.clientWidth;var G=h[l](w),E=h[g](w),F=G+C,M=E+B,I=q.offsetHeight;q=q.offsetWidth;var H=D.left+G-(o(h.css(w,"borderLeftWidth"))||0);D=D.top+E-(o(h.css(w,"borderTopWidth"))||0);var N=H+q,J=D+I,K,L;if(I>B||D<E||A)K=D;else if(J>M)K=J-B;if(v)if(q>C||H<G||A)L=H;else if(N>F)L=N-C;if(y){if(K!==i||L!==i)w.scrollTo(L,K)}else{if(K!==i)w[g]=K;if(L!==i)w[l]=L}}}});b.each(["Left","Top"],function(q,w){var A="scroll"+q;h[A]=function(v){var y=0,B=u(v),C;if(B&&(C=B.document))y=B[w?"pageYOffset":"pageXOffset"]||C.documentElement[A]||
C.body[A];else if(x(v=b.get(v)))y=v[A];return y}});b.each(["Width","Height"],function(q){h["doc"+q]=function(w){w=w||f;return j(e?w.documentElement["scroll"+q]:w.body["scroll"+q],h["viewport"+q](w))};h["viewport"+q]=function(w){var A="inner"+q;w=u(w);var v=w.document;return A in w?w[A]:e?v.documentElement["client"+q]:v.body["client"+q]}})});
KISSY.add("dom-traversal",function(b,i){function p(k,f,x,z){if(!(k=b.get(k)))return null;if(f===i)f=1;var u=null,e,j;if(b.isNumber(f)&&f>=0){if(f===0)return k;e=0;j=f;f=function(){return++e===j}}for(;k=k[x];)if(m(k)&&(!f||h.test(k,f))&&(!z||z(k))){u=k;break}return u}function r(k,f,x){var z=[];var u=k=b.get(k);if(k&&x)u=k.parentNode;if(u){x=0;for(u=u.firstChild;u;u=u.nextSibling)if(m(u)&&u!==k&&(!f||h.test(u,f)))z[x++]=u}return z}var h=b.DOM,m=h._isElementNode;b.mix(h,{parent:function(k,f){return p(k,
f,"parentNode",function(x){return x.nodeType!=11})},next:function(k,f){return p(k,f,"nextSibling")},prev:function(k,f){return p(k,f,"previousSibling")},siblings:function(k,f){return r(k,f,true)},children:function(k,f){return r(k,f)},contains:function(k,f){var x=false;if((k=b.get(k))&&(f=b.get(f)))if(k.contains)return k.contains(f);else if(k.compareDocumentPosition)return!!(k.compareDocumentPosition(f)&16);else for(;!x&&(f=f.parentNode);)x=f==k;return x}})});
KISSY.add("dom-create",function(b,i){function p(v,y){j(v)&&b.isPlainObject(y)&&x.attr(v,y);return v}function r(v,y){var B=null,C;if(v&&(v.push||v.item)&&v[0]){y=y||v[0].ownerDocument;B=y.createDocumentFragment();if(v.item)v=b.makeArray(v);y=0;for(C=v.length;y<C;y++)B.appendChild(v[y])}return B}function h(v){var y=v.cloneNode(true);if(z.ie<8)y.innerHTML=v.innerHTML;return y}function m(v,y,B,C){if(B){var D=b.guid("ks-tmp-"),G=new RegExp(a);y+='<span id="'+D+'"></span>';b.available(D,function(){var E=
b.get("head"),F,M,I,H,N,J;for(G.lastIndex=0;F=G.exec(y);)if((I=(M=F[1])?M.match(n):false)&&I[2]){F=f.createElement("script");F.src=I[2];if((H=M.match(l))&&H[2])F.charset=H[2];F.async=true;E.appendChild(F)}else if((J=F[2])&&J.length>0)b.globalEval(J);(N=f.getElementById(D))&&x.remove(N);b.isFunction(C)&&C()});k(v,y)}else{k(v,y);b.isFunction(C)&&C()}}function k(v,y){y=(y+"").replace(a,"");try{v.innerHTML=y}catch(B){for(;v.firstChild;)v.removeChild(v.firstChild);y&&v.appendChild(x.create(y))}}var f=
document,x=b.DOM,z=b.UA,u=z.ie,e=x._nodeTypeIs,j=x._isElementNode,o=x._isKSNode,s=f.createElement("div"),d=/<(\w+)/,a=/<script([^>]*)>([\s\S]*?)<\/script>/ig,c=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/\ssrc=(['"])(.*?)\1/i,l=/\scharset=(['"])(.*?)\1/i;b.mix(x,{create:function(v,y,B){if(e(v,1)||e(v,3))return h(v);if(o(v))return h(v[0]);if(!(v=b.trim(v)))return null;var C=null;C=x._creators;var D,G="div",E;if(D=c.exec(v))C=(B||f).createElement(D[1]);else{if((D=d.exec(v))&&(E=D[1])&&b.isFunction(C[E=E.toLowerCase()]))G=
E;v=C[G](v,B).childNodes;C=v.length===1?v[0].parentNode.removeChild(v[0]):r(v,B||f)}return p(C,y)},_creators:{div:function(v,y){y=y?y.createElement("div"):s;y.innerHTML=v;return y}},html:function(v,y,B,C){if(y===i){v=b.get(v);if(j(v))return v.innerHTML}else b.each(b.query(v),function(D){j(D)&&m(D,y,B,C)})},remove:function(v){b.each(b.query(v),function(y){j(y)&&y.parentNode&&y.parentNode.removeChild(y)})}});if(z.gecko||u){var g=x._creators,t=x.create,q=/(?:\/(?:thead|tfoot|caption|col|colgroup)>)+\s*<tbody/,
w={option:"select",td:"tr",tr:"tbody",tbody:"table",col:"colgroup",legend:"fieldset"};for(var A in w)(function(v){g[A]=function(y,B){return t("<"+v+">"+y+"</"+v+">",null,B)}})(w[A]);if(u){g.script=function(v,y){y=y?y.createElement("div"):s;y.innerHTML="-"+v;y.removeChild(y.firstChild);return y};if(u<8)g.tbody=function(v,y){y=t("<table>"+v+"</table>",null,y);var B=y.children.tags("tbody")[0];y.children.length>1&&B&&!q.test(v)&&B.parentNode.removeChild(B);return y}}b.mix(g,{optgroup:g.option,th:g.td,
thead:g.tbody,tfoot:g.tbody,caption:g.tbody,colgroup:g.tbody})}});KISSY.add("dom-insertion",function(b){b.mix(b.DOM,{insertBefore:function(i,p){if((i=b.get(i))&&(p=b.get(p))&&p.parentNode)p.parentNode.insertBefore(i,p);return i},insertAfter:function(i,p){if((i=b.get(i))&&(p=b.get(p))&&p.parentNode)p.nextSibling?p.parentNode.insertBefore(i,p.nextSibling):p.parentNode.appendChild(i);return i}})});
KISSY.add("event",function(b,i){function p(d,a,c,n,l){if(b.isString(a))a=b.query(a);if(b.isArray(a)){b.each(a,function(g){s[d](g,c,n,l)});return true}if((c=b.trim(c))&&c.indexOf(e)>0){b.each(c.split(e),function(g){s[d](a,g,n,l)});return true}}function r(d){return k(d)?d[u]:-1}function h(d,a){if(!k(d))return b.error("Text or comment node is not valid event target.");try{d[u]=a}catch(c){b.error(c)}}function m(d){try{d[u]=i;delete d[u]}catch(a){}}function k(d){return d&&d.nodeType!==3&&d.nodeType!==
8}var f=document,x=f.addEventListener?function(d,a,c,n){d.addEventListener&&d.addEventListener(a,c,!!n)}:function(d,a,c){d.attachEvent&&d.attachEvent("on"+a,c)},z=f.removeEventListener?function(d,a,c,n){d.removeEventListener&&d.removeEventListener(a,c,!!n)}:function(d,a,c){d.detachEvent&&d.detachEvent("on"+a,c)},u="ksEventTargetId",e=" ",j=b.now(),o={},s={EVENT_GUID:u,special:{},add:function(d,a,c,n){if(!p("add",d,a,c,n)){var l=r(d),g,t,q,w,A;if(!(l===-1||!a||!b.isFunction(c))){if(!l){h(d,l=j++);
o[l]={target:d,events:{}}}t=o[l].events;if(!t[a]){g=((l=!d.isCustomEventTarget)||d._supportSpecialEvent)&&s.special[a]||{};q=function(v,y){if(!v||!v.fixed){v=new b.EventObject(d,v,a);b.isPlainObject(y)&&b.mix(v,y)}g.setup&&g.setup(v);return(g.handle||s._handle)(d,v,t[a].listeners)};t[a]={handle:q,listeners:[]};w=g.fix||a;A=g.capture;if(l)x(d,w,q,A);else d._addEvent&&d._addEvent(w,q,A)}t[a].listeners.push({fn:c,scope:n||d})}}},remove:function(d,a,c,n){if(!p("remove",d,a,c,n)){var l=r(d),g,t,q,w,A,
v,y;if(l!==-1)if(l&&(g=o[l]))if(g.target===d){n=n||d;g=g.events||{};if(t=g[a]){q=t.listeners;v=q.length;if(b.isFunction(c)&&v){A=w=0;for(y=[];w<v;++w)if(c!==q[w].fn||n!==q[w].scope)y[A++]=q[w];t.listeners=y;v=y.length}if(c===i||v===0){if(d.isCustomEventTarget)d._addEvent&&d._removeEvent(a,t.handle);else{c=s.special[a]||{};z(d,c.fix||a,t.handle)}delete g[a]}}if(a===i||b.isEmptyObject(g)){for(a in g)s.remove(d,a);delete o[l];m(d)}}}},_handle:function(d,a,c){c=c.slice(0);for(var n,l=0,g=c.length;l<g;++l){n=
c[l];n=n.fn.call(n.scope||d,a);if(n===false&&d.isCustomEventTarget||a.isImmediatePropagationStopped)break}return n},_getCache:function(d){return o[d]},_simpleAdd:x,_simpleRemove:z};s.on=s.add;b.Event=s});
KISSY.add("event-object",function(b,i){function p(m,k,f){this.currentTarget=m;this.originalEvent=k||{};if(k){this.type=k.type;this._fix()}else{this.type=f;this.target=m}this.currentTarget=m;this.fixed=true}var r=document,h="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" ");b.augment(p,
{_fix:function(){var m=this.originalEvent,k=h.length,f,x=this.currentTarget;for(x=x.nodeType===9?x:x.ownerDocument||r;k;){f=h[--k];this[f]=m[f]}if(!this.target)this.target=this.srcElement||r;if(this.target.nodeType===3)this.target=this.target.parentNode;if(!this.relatedTarget&&this.fromElement)this.relatedTarget=this.fromElement===this.target?this.toElement:this.fromElement;if(this.pageX===i&&this.clientX!==i){m=x.documentElement;k=x.body;this.pageX=this.clientX+(m&&m.scrollLeft||k&&k.scrollLeft||
0)-(m&&m.clientLeft||k&&k.clientLeft||0);this.pageY=this.clientY+(m&&m.scrollTop||k&&k.scrollTop||0)-(m&&m.clientTop||k&&k.clientTop||0)}if(this.which===i)this.which=this.charCode!==i?this.charCode:this.keyCode;if(this.metaKey===i)this.metaKey=this.ctrlKey;if(!this.which&&this.button!==i)this.which=this.button&1?1:this.button&2?3:this.button&4?2:0},preventDefault:function(){var m=this.originalEvent;if(m.preventDefault)m.preventDefault();else m.returnValue=false;this.isDefaultPrevented=true},stopPropagation:function(){var m=
this.originalEvent;if(m.stopPropagation)m.stopPropagation();else m.cancelBubble=true;this.isPropagationStopped=true},stopImmediatePropagation:function(){var m=this.originalEvent;m.stopImmediatePropagation?m.stopImmediatePropagation():this.stopPropagation();this.isImmediatePropagationStopped=true},halt:function(m){m?this.stopImmediatePropagation():this.stopPropagation();this.preventDefault()}});b.EventObject=p});
KISSY.add("event-target",function(b,i){var p=b.Event,r=p.EVENT_GUID;b.EventTarget={isCustomEventTarget:true,fire:function(h,m){if((h=((p._getCache(this[r]||-1)||{}).events||{})[h])&&b.isFunction(h.handle))return h.handle(i,m);return this},on:function(h,m,k){p.add(this,h,m,k);return this},detach:function(h,m,k){p.remove(this,h,m,k);return this}}});
KISSY.add("event-mouseenter",function(b){var i=b.Event;b.UA.ie||b.each([{name:"mouseenter",fix:"mouseover"},{name:"mouseleave",fix:"mouseout"}],function(p){i.special[p.name]={fix:p.fix,setup:function(r){r.type=p.name},handle:function(r,h,m){var k=h.relatedTarget;try{for(;k&&k!==r;)k=k.parentNode;k!==r&&i._handle(r,h,m)}catch(f){}}}})});
KISSY.add("event-focusin",function(b){var i=b.Event;document.addEventListener&&b.each([{name:"focusin",fix:"focus"},{name:"focusout",fix:"blur"}],function(p){i.special[p.name]={fix:p.fix,capture:true,setup:function(r){r.type=p.name}}})});
KISSY.add("node",function(b){function i(h,m,k){var f;if(!(this instanceof i))return new i(h,m,k);if(h){if(r(h,1)||r(h,3))f=h;else if(b.isString(h))f=p.create(h,m,k);this[0]=f}else this.length=0}var p=b.DOM,r=p._nodeTypeIs;i.TYPE="-ks-Node";b.augment(i,{length:1,getDOMNode:function(){return this[0]},nodeType:i.TYPE});b.one=function(h,m){return(h=b.get(h,m))?new i(h):null};b.Node=i});
KISSY.add("nodelist",function(b){function i(h){if(!(this instanceof i))return new i(h);r.push.apply(this,h||[])}var p=b.DOM,r=Array.prototype;b.mix(i.prototype,{length:0,item:function(h){var m=null;if(p._isElementNode(this[h]))m=new b.Node(this[h]);return m},getDOMNodes:function(){return r.slice.call(this)},each:function(h,m){var k=this.length,f=0,x;for(x=new b.Node(this[0]);f<k&&h.call(m||x,x,f,this)!==false;x=new b.Node(this[++f]));return this}});b.all=function(h,m){return new i(b.query(h,m,true))};
b.NodeList=i});
KISSY.add("node-attach",function(b,i){function p(d,arguments,a,c){var n=[this[d?e:u]()].concat(b.makeArray(arguments));if(arguments[a]===i)return c.apply(h,n);else{c.apply(h,n);return this}}function r(d,a){b.each(d,function(c){b.each([x,z],function(n,l){n[c]=function(g){switch(a){case j:return function(){return p.call(this,l,arguments,1,g)};case o:return function(){return p.call(this,l,arguments,0,g)};case s:return function(){var t=this[l?e:u]();return(t=g.apply(h,[t].concat(b.makeArray(arguments))))?new (b[b.isArray(t)?
"NodeList":"Node"])(t):null};default:return function(){var t=this[l?e:u]();t=g.apply(h,[t].concat(b.makeArray(arguments)));return t===i?this:t}}}(h[c])})})}var h=b.DOM,m=b.Event,k=h._nodeTypeIs,f=h._isKSNode,x=b.Node.prototype,z=b.NodeList.prototype,u="getDOMNode",e=u+"s",j=1,o=2,s=4;b.mix(x,{one:function(d){return b.one(d,this[0])},all:function(d){return b.all(d,this[0])}});r(["hasClass","addClass","removeClass","replaceClass","toggleClass"]);r(["attr","removeAttr"],j);r(["val","text"],o);r(["css"],
j);r(["width","height"],o);r(["offset"],o);r(["scrollIntoView"]);r(["parent","next","prev","siblings","children"],s);r(["contains"]);r(["html"],o);r(["remove"]);b.each(["insertBefore","insertAfter"],function(d){x[d]=function(a){h[d].call(h,this[0],a);return this}});b.each([x,z],function(d,a){b.mix(d,{append:function(c){c&&b.each(this,function(n){var l;if(a||b.isString(c))l=h.create(c);else{if(k(c,1)||k(c,3))l=c;if(f(c))l=c[0]}n.appendChild(l)});return this},appendTo:function(c){if((c=b.get(c))&&c.appendChild)b.each(this,
function(n){c.appendChild(n)});return this}})});b.each([x,z],function(d){b.mix(d,b.EventTarget,{_supportSpecialEvent:true});d._addEvent=function(a,c,n){for(var l=0,g=this.length;l<g;l++)m._simpleAdd(this[l],a,c,n)};d._removeEvent=function(a,c,n){for(var l=0,g=this.length;l<g;l++)m._simpleRemove(this[l],a,c,n)};delete d.fire})});
KISSY.add("cookie",function(b){function i(m){return b.isString(m)&&m!==""}var p=document,r=encodeURIComponent,h=decodeURIComponent;b.Cookie={get:function(m){var k;if(i(m))if(m=p.cookie.match("(?:^| )"+m+"(?:(?:=([^;]*))|;|$)"))k=m[1]?h(m[1]):"";return k},set:function(m,k,f,x,z,u){k=r(k);var e=f;if(typeof e==="number"){e=new Date;e.setTime(e.getTime()+f*864E5)}if(e instanceof Date)k+="; expires="+e.toUTCString();if(i(x))k+="; domain="+x;if(i(z))k+="; path="+z;if(u)k+="; secure";p.cookie=m+"="+k},remove:function(m,
k,f,x){this.set(m,"",0,k,f,x)}}});
KISSY.add("json",function(b){function i(u){return u<10?"0"+u:u}function p(u){m.lastIndex=0;return m.test(u)?'"'+u.replace(m,function(e){var j=x[e];return typeof j==="string"?j:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+u+'"'}function r(u,e){var j,o,s=k,d,a=e[u];if(a&&typeof a==="object"&&typeof a.toJSON==="function")a=a.toJSON(u);if(typeof z==="function")a=z.call(e,u,a);switch(typeof a){case "string":return p(a);case "number":return isFinite(a)?String(a):"null";case "boolean":case "null":return String(a);
case "object":if(!a)return"null";k+=f;d=[];if(Object.prototype.toString.apply(a)==="[object Array]"){o=a.length;for(u=0;u<o;u+=1)d[u]=r(u,a)||"null";e=d.length===0?"[]":k?"[\n"+k+d.join(",\n"+k)+"\n"+s+"]":"["+d.join(",")+"]";k=s;return e}if(z&&typeof z==="object"){o=z.length;for(u=0;u<o;u+=1){j=z[u];if(typeof j==="string")if(e=r(j,a))d.push(p(j)+(k?": ":":")+e)}}else for(j in a)if(Object.hasOwnProperty.call(a,j))if(e=r(j,a))d.push(p(j)+(k?": ":":")+e);e=d.length===0?"{}":k?"{\n"+k+d.join(",\n"+k)+
"\n"+s+"}":"{"+d.join(",")+"}";k=s;return e}}b=b.JSON=window.JSON||{};if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var h=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
m=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,k,f,x={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},z;if(typeof b.stringify!=="function")b.stringify=function(u,e,j){var o;f=k="";if(typeof j==="number")for(o=0;o<j;o+=1)f+=" ";else if(typeof j==="string")f=j;if((z=e)&&typeof e!=="function"&&(typeof e!=="object"||typeof e.length!=="number"))throw new Error("JSON.stringify");return r("",
{"":u})};if(typeof b.parse!=="function")b.parse=function(u,e){function j(o,s){var d,a,c=o[s];if(c&&typeof c==="object")for(d in c)if(Object.hasOwnProperty.call(c,d)){a=j(c,d);if(a!==undefined)c[d]=a;else delete c[d]}return e.call(o,s,c)}u=String(u);h.lastIndex=0;if(h.test(u))u=u.replace(h,function(o){return"\\u"+("0000"+o.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(u.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){u=eval("("+u+")");return typeof e==="function"?j({"":u},""):u}throw new SyntaxError("JSON.parse");}});
KISSY.add("anim-easing",function(b){var i=Math,p=i.PI,r=i.pow,h=i.sin,m=1.70158,k={easeNone:function(f){return f},easeIn:function(f){return f*f},easeOut:function(f){return(2-f)*f},easeBoth:function(f){return(f*=2)<1?0.5*f*f:0.5*(1- --f*(f-2))},easeInStrong:function(f){return f*f*f*f},easeOutStrong:function(f){return 1- --f*f*f*f},easeBothStrong:function(f){return(f*=2)<1?0.5*f*f*f*f:0.5*(2-(f-=2)*f*f*f)},elasticIn:function(f){if(f===0||f===1)return f;return-(r(2,10*(f-=1))*h((f-0.075)*2*p/0.3))},
elasticOut:function(f){if(f===0||f===1)return f;return r(2,-10*f)*h((f-0.075)*2*p/0.3)+1},elasticBoth:function(f){if(f===0||(f*=2)===2)return f;if(f<1)return-0.5*r(2,10*(f-=1))*h((f-0.1125)*2*p/0.45);return r(2,-10*(f-=1))*h((f-0.1125)*2*p/0.45)*0.5+1},backIn:function(f){if(f===1)f-=0.0010;return f*f*((m+1)*f-m)},backOut:function(f){return(f-=1)*f*((m+1)*f+m)+1},backBoth:function(f){if((f*=2)<1)return 0.5*f*f*(((m*=1.525)+1)*f-m);return 0.5*((f-=2)*f*(((m*=1.525)+1)*f+m)+2)},bounceIn:function(f){return 1-
k.bounceOut(1-f)},bounceOut:function(f){return f<1/2.75?7.5625*f*f:f<2/2.75?7.5625*(f-=1.5/2.75)*f+0.75:f<2.5/2.75?7.5625*(f-=2.25/2.75)*f+0.9375:7.5625*(f-=2.625/2.75)*f+0.984375},bounceBoth:function(f){if(f<0.5)return k.bounceIn(f*2)*0.5;return k.bounceOut(f*2-1)*0.5+0.5}};b.Easing=k});
KISSY.add("anim",function(b,i){function p(d,a,c,n,l){if(d=b.get(d)){if(!(this instanceof p))return new p(d,a,c,n,l);var g=b.isPlainObject(c);a=a;this.domEl=d;if(b.isPlainObject(a))a=b.param(a,";").replace(/=/g,":");this.props=r(a);this.targetStyle=a;if(g)d=b.merge(s,c);else{d=b.clone(s);c&&(d.duration=u(c,10)||1);b.isString(n)&&(n=z[n]);b.isFunction(n)&&(d.easing=n);b.isFunction(l)&&(d.complete=l)}this.config=d;b.isFunction(l)&&this.on(o,l)}}function r(d){var a={},c=j.length,n;e.innerHTML='<div style="'+
d+'"></div>';for(d=e.firstChild.style;c--;)if(n=d[j[c]])a[j[c]]=h(n);return a}function h(d){var a=u(d);d=(d+"").replace(/^[-\d\.]+/,"");return isNaN(a)?{v:d,u:"",f:k}:{v:a,u:d,f:m}}function m(d,a,c){return(d+(a-d)*c).toFixed(3)}function k(d,a,c){for(var n=2,l,g,t=[],q=[];l=3,g=arguments[n-1],n--;)if(f(g,0,4)==="rgb(")for(g=g.match(/\d+/g);l--;)t.push(~~g[l]);else if(f(g,0)==="#"){if(g.length===4)g="#"+f(g,1)+f(g,1)+f(g,2)+f(g,2)+f(g,3)+f(g,3);for(;l--;)t.push(parseInt(f(g,1+l*2,2),16))}else return a;
for(;l--;){n=~~(t[l+3]+(t[l]-t[l+3])*c);q.push(n<0?0:n>255?255:n)}return"rgb("+q.join(",")+")"}function f(d,a,c){return d.substr(a,c||1)}var x=b.DOM,z=b.Easing,u=parseFloat,e=x.create("<div>"),j="backgroundColor borderBottomColor borderBottomWidth borderBottomStyle borderLeftColor borderLeftWidth borderLeftStyle borderRightColor borderRightWidth borderRightStyle borderSpacing borderTopColor borderTopWidth borderTopStyle bottom color font fontFamily fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex".split(" "),
o="complete",s={duration:1,easing:z.easeNone};b.augment(p,b.EventTarget,{run:function(){var d=this,a=d.config,c=d.domEl,n=a.duration*1E3,l=a.easing,g=b.now(),t=g+n,q=d.props,w={},A;for(A in q)w[A]=h(x.css(c,A));if(d.fire("start")!==false){d.stop();d.timer=b.later(a=function(){var v=b.now(),y=v>t?1:(v-g)/n,B,C,D;for(A in q){B=w[A];C=q[A];if(C.v==0)C.u=B.u;if(B.u!==C.u)B.v=0;x.css(c,A,C.f(B.v,C.v,l(y))+C.u)}if(d.fire("step")===false||(D=v>t)){d.stop();D&&d.fire(o)}},13,true);a();return d}},stop:function(d){var a=
this.domEl,c=this.targetStyle;if(this.timer){this.timer.cancel();this.timer=i}if(d){b.UA.ie&&c.indexOf("opacity")>-1&&x.css(a,"opacity",this.props.opacity.v);a.style.cssText+=";"+c;this.fire(o)}return this}});b.Anim=p});KISSY.add("anim-node-plugin",function(b,i){var p=b.Anim;b.each([b.Node.prototype,b.NodeList.prototype],function(r){r.animate=function(){var h=b.makeArray(arguments);b.each(this,function(m){p.apply(i,[m].concat(h)).run()});return this}})});KISSY.add("core");