/*! slide - v1.1 - 2013-12-10 7:07:53 PM * Copyright (c) 2013 拔赤; Licensed */ KISSY.add("gallery/slide/1.1/slide-util",function(a){"use strict";a.mix(a,{setHash:function(a,b){var c,d;"object"==typeof a?(c=window.location.href,b=a):c=a,c.indexOf("#")<0&&(c+="#");var e=this.getHash(c);for(d in b)e[d]=b[d];c=c.split("#")[0]+"#";for(d in e)c+=d+"="+e[d]+"&";return c=c.substr(0,c.length-1)},getHash:function(b){var c=b||window.location.href;if(c.indexOf("#")<0)return{};var d=c.split("#")[1];if(""===d)return{};"&"==d[d.length-1]&&(d=d.substr(0,d.length-1)),d=d.replace(/"/gi,"'"),d=d.replace(/=/gi,'":"'),d=d.replace(/&/gi,'","'),d+='"',d='{"'+d+"}";var e=a.JSON.parse(d);return e},_globalEval:function(a){if(a&&/\S/.test(a)){var b=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0],c=document.createElement("script");c.text=a,b.insertBefore(c,b.firstChild),setTimeout(function(){b.removeChild(c)},1)}},execScript:function(b){var c,d,e,f,g,h,i=this,j=new RegExp(/]*)>([^<]*(?:(?!<\/script>)<[^<]*)*)<\/script>/gi),k=a.one("head").getDOMNode(),l=/\ssrc=(['"])(.*?)\1/i,m=/\scharset=(['"])(.*?)\1/i;for(j.lastIndex=0;c=j.exec(b);)d=c[1],e=d?d.match(l):!1,e&&e[2]?(g=document.createElement("script"),g.src=e[2],(f=d.match(m))&&f[2]&&(g.charset=f[2]),g.async=!0,k.appendChild(g)):(h=c[2])&&h.length>0&&i._globalEval(h)},isDaily:function(){return/daily\.taobao\.net/.test(window.location.hostname)?!0:!1}})},{requires:["node","sizzle","json","event"]}),KISSY.add("gallery/slide/1.1/kissy2yui",function(a){"use strict";a.augment(a.Node,{_delegate:function(){var b=this;return a.isFunction(arguments[1])?b.delegate(arguments[0],arguments[2],arguments[1]):b.delegate.apply(b,arguments),b},indexOf:function(b){var c=this;if(a.isUndefined(b))return null;b[0]&&(b=b[0]);var d=0;return c.each(function(a,c){a[0]===b&&(d=c)}),d},size:function(){return this.length},set:function(a,b){return"innerHTML"===a?this.html(b):this.attr(a,b),this},get:function(a){var b=this,c={innerHTML:function(){return b.html()},region:function(){return{height:b.height(),width:b.width()}}};return a in c?c[a]():void 0},appendChild:function(){return this.append.apply(this,arguments),this},setStyle:function(){return this.css.apply(this,arguments),this},setStyles:function(){return this.css.apply(this,arguments),this},cloneNode:function(){return this.clone.apply(this,arguments)}}),a.Node.create=function(b){return a.Node(b)}},{requires:["node","event"]}),KISSY.add("gallery/slide/1.1/base",function(a){"use strict";var b=(a.Node.all,function(){if(!(this instanceof b))throw new Error('please use "new Slide()"');this.init.apply(this,arguments)});return b.plug=function(){},a.augment(b,a.Event.Target,{init:function(b,c){var d=this;if(a.isObject(b))d.con=b;else if(/^#/i.test(b))d.con=a.one(b);else if(/^\./i.test(b))d.con=a.one(b);else if(a.one("#"+b))d.con=a.one("#"+b);else{if(!a.one(b))throw new Error("Slide Container Hooker not found");d.con=a.one(b)}if(d.buildParam(c),d.buildHTML(),d.bindEvent(),d.fire("ready",{index:0,navnode:d.tabs.item(0),pannelnode:d.pannels.item(0)}),d.reverse){var e;e=d.previous,d.previous=d.next,d.next=e}if(d.carousel)for(var f=0;fd.length)&&(c=d.length),a.isString(b)&&(b=a.one(b)),d.transitions&&b.css({visibility:"hidden"}),c==d.length?(setTimeout(function(){d.setWrapperSize(1)},0),b.insertAfter(d.pannels[c-1])):b.insertBefore(d.pannels[c]),d.setWrapperSize(),d.fixSlideSize(d.currentTab),d.transitions&&b.css({visibility:""}),d.transitions,this},remove:function(b){var c=this;if(1!==c.length)return b<=c.currentTab&&(c.currentTab--,c.length--),c.transitions&&c.con.css({display:"none"}),a.one(c.pannels[b]).remove(),c.setWrapperSize(),c.transitions&&c.con.css({display:"block"}),c.fixSlideSize(c.currentTab),this},removeLast:function(){var a=this;return a.remove(a.length-1),a},renderLazyData:function(b){if(b.setStyle("display","none"),"1"!=b.attr("lazy-data")){b.attr("lazy-data","1");var c=(a.stamp(d),b.get("innerHTML").replace(/</gi,"<").replace(/>/gi,">")),d=a.Node.create("
"+c+"
");a.DOM.insertBefore(d,b),a.execScript(c)}},renderPannelTextarea:function(b){var c=this;if(c.pannels.item(b))for(var d=function(b){var d=(a.one(c.pannels.item(b)),c.pannels.item(b).all(".data-lazyload"));d&&d.each(function(a){c.renderLazyData(a)})},e=0;e'),b.animwrap.set("innerHTML",b.animcon.get("innerHTML")),b.animcon.set("innerHTML",""),b.animcon.appendChild(b.animwrap),b.pannels=b.con.all("."+b.contentClass+" ."+b.pannelClass),b},doEffectInit:function(){var a=this,b={none:function(){a.pannels=a.con.all("."+a.contentClass+" ."+a.pannelClass),a.pannels.setStyles({display:"none"}),a.pannels.item(a.defaultTab).setStyles({display:"block"})},vSlide:function(){a.buildWrap();var b=a.animcon.get("region");a.pannels.setStyles({"float":"none",overflow:"hidden"}),a.animwrap.setStyles({height:a.length*b.height/a.colspan+"px",overflow:"hidden",top:-1*a.defaultTab*b.height+"px"})},hSlide:function(){a.buildWrap();var b=a.animcon.get("region");a.pannels.setStyles({"float":"left",overflow:"hidden"}),a.animwrap.setStyles({width:a.length*b.width/a.colspan+"px",overflow:"hidden",left:-1*a.defaultTab*b.width+"px"})},fade:function(){a.pannels=a.con.all("."+a.contentClass+" ."+a.pannelClass),a.pannels.setStyles({position:"absolute",zIndex:0}),a.pannels.each(function(b,c){c==a.defaultTab?b.setStyles({opacity:1,display:"block"}):b.setStyles({opacity:0,diaplay:"none"})})}};return b[a.effect](),this},buildHTML:function(){var b=this,c=b.con;b.tabs=c.all("."+b.navClass+" "+b.triggerSelector);var d=c.all("."+b.contentClass+" ."+b.pannelClass);if(b.length=d.size(),c.one("."+b.navClass)||a.Node('').appendTo(b.con),0===b.tabs.size()){for(var e=c.all("."+b.navClass),f="",g=0;g'+(g+1)+""}e.set("innerHTML",f)}return b.tabs=c.all("."+b.navClass+" "+b.triggerSelector),b.animcon=c.one("."+b.contentClass),b.animwrap=null,b.doEffectInit(),b.fixSlideSize(b.currentTab),b.hightlightNav(b.getWrappedIndex(b.currentTab)),b.autoSlide===!0&&b.play(),this},getCurrentPannel:function(){var b=this;return a.one(b.pannels[b.currentTab])},renderWidth:function(){var a=this,b=a.animcon.get("region").width;return"hSlide"==a.effect&&(b/=a.colspan),a.pannels.setStyles({width:b+"px"}),this},renderHeight:function(){var a=this,b=a.animcon.get("region").height;return"vSlide"==a.effect&&(b/=a.colspan),a.pannels.setStyles({height:b+"px"}),this},relocateCurrentTab:function(b){var c=this;return a.isUndefined(b)&&(b=c.currentTab),"hSlide"==c.effect?(c.transitions?c.animwrap.setStyles({"-webkit-transition-duration":"0s","-webkit-transform":"translate3d("+-1*b*c.animcon.get("region").width/c.colspan+"px,0,0)","-webkit-backface-visibility":"hidden"}):c.animwrap.setStyles({left:-1*b*c.animcon.get("region").width/c.colspan}),c.currentTab=b,this):void 0},fixSlideSize:function(a){var b=this;return b.adaptive_fixed_width&&b.renderWidth(),b.adaptive_fixed_height&&b.renderHeight(),b.adaptive_fixed_size&&b.renderHeight().renderWidth(),b.resetSlideSize(a),this},removeHeightTimmer:function(){var b=this;a.isNull(b.heightTimmer)||(clearInterval(b.heightTimmer),b.heightTimmer=null)},addHeightTimmer:function(){var b=this;a.isNull(b.heightTimmer)||(clearInterval(b.heightTimmer),b.heightTimmer=null);var c=function(){"hSlide"==b.effect&&b.animcon.setStyles({height:b.pannels.item(b.currentTab).get("region").height+"px"})};b.heightTimmer=setInterval(c,100),c()},resetSlideSize:function(a){var b,c,d=this;return("undefined"==typeof a||null===a)&&(a=d.currentTab),"hSlide"==d.effect||"vSlide"==d.effect?("hSlide"==d.effect&&(b=d.adaptive_width?d.adaptive_width():d.animcon.get("region").width,c=d.pannels.item(a).get("region").height,b/=d.colspan,d.pannels.setStyles({width:b+"px",display:"block"}),d.animcon.setStyles({width:b*d.colspan+"px",overflow:"hidden"}),d.animWrapperAutoHeightSetting&&d.animcon.setStyles({height:c+"px"})),"vSlide"==d.effect&&(b=d.pannels.item(a).get("region").width,c=d.adaptive_height?d.adaptive_height():d.animcon.get("region").height,c/=d.colspan,d.pannels.setStyles({height:c*d.colspan+"px",display:"block"}),d.animcon.setStyles({height:c*d.colspan+"px",overflow:"hidden"}),d.animWrapperAutoHeightSetting&&d.animcon.setStyles({width:b+"px"})),this):void 0},getWrappedIndex:function(a){var b=this,c=0;return c=b.carousel?a=b.length-b.colspan?a-(b.length-b.colspan):a-b.colspan:a},getMousePosition:function(){var b=this,c=function(a){b._t_mouseX=a.clientX,b._t_mouseY=a.clientY};a.Event.on(document,"mousemove",c),setTimeout(function(){a.Event.detach(window,"mouseover",c)},b.triggerDelay)},massTrigger:function(b,c){var d=this;return a.inArray(d.eventType,["mouseover","mouseenter"])?(d.getMousePosition(),a.isUndefined(d._fired)||a.isNull(d._fired)?d._fired=setTimeout(function(){d.inRegion([d._t_mouseX+a.DOM.scrollLeft(),d._t_mouseY+a.DOM.scrollTop()],a.one(c))&&b(a.one(c)),d._fired=null},d.triggerDelay):(clearTimeout(d._fired),d._fired=setTimeout(function(){d.inRegion([d._t_mouseX+a.DOM.scrollLeft(),d._t_mouseY+a.DOM.scrollTop()],a.one(c))&&b(a.one(c)),d._fired=null},d.triggerDelay)),void 0):(b(a.one(c)),void 0)},getMaxAnimDelay:function(b){var c=this,d=0;if(c.sublayers)return a.each(c.sublayers[b],function(a){a.durationout+a.delayout>d&&(d=a.durationout+a.delayout)}),d},inRegion:function(a,b){var c=b.offset(),d={width:b.width(),height:b.height()};return a[0]>=c.left&&a[0]<=c.left+d.width&&a[1]>=c.top&&a[1]<=c.top+d.height?!0:!1},bindEvent:function(){var b=this;a.inArray(b.eventType,["click","mouseover","mouseenter"])&&b.con._delegate(b.eventType,function(a){a.preventDefault(),b.massTrigger(function(a){var c=Number(b.tabs.indexOf(a));b.carousel&&(c=(c+1)%b.length),b.go(c),b.autoSlide&&b.stop().play()},a.currentTarget)},"."+b.navClass+" "+b.triggerSelector),b.hoverStop&&(b.con._delegate("mouseover",function(){b.autoSlide&&b.stop()},"."+b.contentClass+" ."+b.pannelClass),b.con._delegate("mouseout",function(){b.autoSlide&&b.play()},"."+b.contentClass+" ."+b.pannelClass));try{a.Event.on("resize",function(){b.fixSlideSize(b.currentTab),b.relocateCurrentTab()},window)}catch(c){}if(b.on("beforeSwitch",function(){return this.layerSlide&&this.isAming()?!1:void 0}),"ontouchstart"in document.documentElement){if(!b.touchmove)return this;b.con._delegate("touchstart",function(a){b.stop(),b.touching=!0,b.is_last()&&b.carousel&&b.fix_next_carousel(),b.is_first()&&b.carousel&&b.fix_pre_carousel(),b.startX=a.changedTouches[0].clientX,b.startY=a.changedTouches[0].clientY,b.animwrap.setStyles({"-webkit-transition-duration":"0s"}),b.startT=Number(new Date)},"."+b.contentClass),b.con._delegate("touchend",function(a){b.touching=!1;var c=a.changedTouches[0].clientX,d=Number(b.animcon.get("region").width);b.deltaX=Math.abs(c-b.startX);var e=Math.abs(c)=1&&b.length>2&&(b.currentTab+=c+1,b.currentTab>=b.length-b.colspan&&(b.currentTab=b.length-b.colspan-1)),b.next()):(c>=1&&b.length>2&&(b.currentTab+=-1*c-1,b.currentTab<=0&&(b.currentTab=1)),b.previous())};return b.touchmove&&b.deltaX<30?(h(),void 0):(!g&&(b.touchmove&&b.deltaX>d/3||!b.touchmove&&b.carousel||!b.carousel&&b.touchmove&&"hSlide"==b.effect||!b.touchmove&&!b.carousel||Number(new Date)-b.startT<550)?i():h(),b.autoSlide&&b.play(),void 0)},"."+b.contentClass),b.touchmove&&(b.con._delegate("touchmove",function(a){if(!(a.touches.length>1)){b.deltaX=a.touches[0].clientX-b.startX;var c=b.is_last()&&b.deltaX<0||b.is_first()&&b.deltaX>0;if(!b.carousel&&"hSlide"==b.effect&&c&&(b.deltaX=b.deltaX/3),b.isScrolling=Math.abs(b.deltaX)0&&a.UA.ie<9)){var c=["durationin","easingin","durationout","easingout","delayin","delayout","slideindirection","slideoutdirection","offsetin","offsetout","alpha","easeInStrong","easeOutStrong","easeBothStrong","easeNone","easeIn","easeOut","easeBoth","elasticIn","elasticOut","elasticBoth","backIn","backOut","backBoth","bounceIn","bounceOut","bounceBoth","left","top","right","bottom"],d={durationin:1e3,easingin:"easeIn",durationout:1e3,easingout:"easeOut",delayin:300,delayout:300,slideindirection:"right",slideoutdirection:"left",alpha:!0,offsetin:50,offsetout:50},e=function(b){function e(a,b){var c=h[b];f[b]=void 0===c||null===c?a:c}var f=this,g=b.attr("rel").replace(/"'/gi,"").replace(new RegExp("("+c.join("|")+")","ig"),'"$1"'),h=a.JSON.parse("{"+g+"}");a.each(d,e),this.el=b,this.left=Number(b.css("left").replace("px","")),this.top=Number(b.css("top").replace("px","")),this.animIn=function(){var b=this,c=b.offsetin,d=b.slideindirection,e={left:function(){b.el.css({left:b.left-c})},top:function(){b.el.css({top:b.top-c})},right:function(){b.el.css({left:b.left+c})},bottom:function(){b.el.css({top:b.top+c})}};e[d](),setTimeout(function(){var c={left:{left:b.left},top:{top:b.top},bottom:{top:b.top},right:{left:b.left}},e={};a.mix(e,c[d]),b.alpha&&a.mix(e,{opacity:1}),a.Anim(b.el,e,b.durationin/1e3,b.easingin,function(){}).run()},b.delayin),b.alpha&&b.el.css({opacity:0})},this.animOut=function(){var b=this,c=b.offsetout,d=b.slideoutdirection,e={left:function(){b.el.css({left:b.left})},top:function(){b.el.css({top:b.top})},right:function(){b.el.css({left:b.left})},bottom:function(){b.el.css({top:b.top})}};e[d](),setTimeout(function(){var e={left:{left:b.left+c},top:{top:b.top+c},bottom:{top:b.top-c},right:{left:b.left-c}},f={};a.mix(f,e[d]),b.alpha&&a.mix(f,{opacity:0}),a.Anim(b.el,f,b.durationout/1e3,b.easingout,function(){}).run()},b.delayout),b.alpha&&b.el.css({opacity:1})}};b.sublayers=[],b.pannels.each(function(a,c){return("vSlide"==b.effect||"hSlide"==b.effect)&&a.css({position:"relative"}),0===a.all('[alt="sublayer"]').length?(b.sublayers[c]=[],void 0):(void 0===b.sublayers[c]&&(b.sublayers[c]=[]),a.all('[alt="sublayer"]').each(function(a){b.sublayers[c].push(new e(a))}),void 0)}),b.on("beforeSwitch",function(a){return a.index===b.currentTab?!1:(b.subLayerRunin(a.index),void 0)}),b.on("beforeTailSwitch",function(a){return b.subLayerRunout(a.index),b.getMaxAnimDelay(a.index)})}},subLayerRunin:function(b){var c=this,d=c.sublayers[b];a.each(d,function(a){a.animIn()})},subLayerRunout:function(b){var c=this,d=c.sublayers[b];a.each(d,function(a){a.animOut()})},buildParam:function(b){function c(a,c){var e=b[c];d[c]=void 0===e||null===e?a:e}var d=this;return(void 0===b||null===b)&&(b={}),a.each({autoSlide:!1,speed:500,timeout:3e3,effect:"none",eventType:"click",easing:"easeBoth",hoverStop:!0,selectedClass:"selected",conClass:"t-slide",navClass:"tab-nav",triggerSelector:"li",contentClass:"tab-content",pannelClass:"tab-pannel",carousel:!1,reverse:!1,touchmove:!1,adaptive_fixed_width:!1,adaptive_fixed_height:!1,adaptive_fixed_size:!1,adaptive_width:!1,adaptive_height:!1,defaultTab:0,layerSlide:!1,layerClass:"tab-animlayer",colspan:1,animWrapperAutoHeightSetting:!0,webkitOptimize:!0,triggerDelay:300},c),a.mix(d,{tabs:[],animcon:null,pannels:[],timmer:null,touching:!1}),d.speed=d.speed/1e3,0!==d.defaultTab&&(d.defaultTab=Number(d.defaultTab)-1),d.carousel&&(d.defaultTab=d.colspan,d.effect="hSlide"),d.currentTab=d.defaultTab,d.transitions="webkitTransition"in document.body.style&&d.webkitOptimize,d},fix_for_transition_when_carousel:function(a){var b=this;"undefined"==typeof a&&(a=0);var c=b.con;if(b.animcon=b.con.one("."+b.contentClass),b.animwrap=b.animcon.one("div"),b.pannels=c.all("."+b.contentClass+" ."+b.pannelClass),"hSlide"==b.effect){{var d=Number(b.animcon.get("region").width/b.colspan);Number(b.animcon.get("region").height)}b.animwrap.setStyle("width",b.pannels.size()*d+2*d);var e=b.pannels.item(a).cloneNode(!0),f=b.pannels.item(b.pannels.size()-1-a).cloneNode(!0);b.animwrap.append(e),b.animwrap.prepend(f),b.transitions?b.animwrap.setStyles({"-webkit-transition-duration":"0s","-webkit-transform":"translate3d("+-1*d*(a/2+1)+"px,0,0)","-webkit-backface-visibility":"hidden",left:"0"}):b.animwrap.setStyle("left",-1*d*(a/2+1))}return b.pannels=c.all("."+b.contentClass+" ."+b.pannelClass),b.length=b.pannels.size(),this},isAming:function(){var a=this;return a.anim?a.anim.isRunning():!1},previous:function(a){var b=this;try{if(b.isAming()&&b.carousel)return this}catch(c){}var d=b.currentTab+b.length-1-(b.colspan-1);return d>=b.length-b.colspan+1&&(d%=b.length-b.colspan+1),b.carousel&&b.is_first()?(b.fix_pre_carousel(),b.previous.call(b),this):(b.go(d,a),this)},is_last:function(){var a=this;return a.currentTab==a.length-(a.colspan-1)-1?!0:!1},is_first:function(){var a=this;return 0===a.currentTab?!0:!1},next:function(a){var b=this;try{if(b.isAming()&&b.carousel)return this}catch(c){}var d=b.currentTab+1;return d>=b.length-b.colspan+1&&(d%=b.length-b.colspan+1),b.carousel&&b.is_last()?(b.fix_next_carousel(),b.next.call(b),this):(b.go(d,a),this)},fix_next_carousel:function(){var a=this;a.currentTab=a.colspan;var b=a.con;"none"!=a.effect&&(a.pannels=b.all("."+a.contentClass+" ."+a.pannelClass));var c="-"+Number(a.animcon.get("region").width).toString()+"px";"hSlide"==a.effect?a.transitions?a.animwrap.setStyles({"-webkit-transition-duration":"0s","-webkit-transform":"translate3d("+c+",0,0)"}):a.animwrap.setStyle("left",c):"vSlide"==a.effect},fix_pre_carousel:function(){var a=this;a.currentTab=a.length-1-2*a.colspan+1;var b=a.con;"none"!=a.effect&&(a.pannels=b.all("."+a.contentClass+" ."+a.pannelClass));var c="-"+(Number(a.animcon.get("region").width/a.colspan)*a.currentTab).toString()+"px";"hSlide"==a.effect?a.transitions?a.animwrap.setStyles({"-webkit-transition-duration":"0s","-webkit-transform":"translate3d("+c+",0,0)"}):a.animwrap.setStyle("left",c):"vSlide"==a.effect},hightlightNav:function(a){var b=this;return b.carousel&&b.colspan>1?this:(b.tabs.item(a)&&(b.tabs.removeClass(b.selectedClass),b.tabs.item(a).addClass(b.selectedClass)),this)},switch_to:function(b,c){var d=this;if(c===!1)var e=!1;else var e=!0;var f=function(){a.isFunction(c)&&c.call(d,d),d.fire("afterSwitch",{index:d.currentTab,navnode:d.tabs.item(d.getWrappedIndex(d.currentTab)),pannelnode:d.pannels.item(d.currentTab)})},g=d.fire("beforeTailSwitch",{index:d.currentTab,navnode:d.tabs.item(d.getWrappedIndex(d.currentTab)),pannelnode:d.pannels.item(d.currentTab)});if(d.fixSlideSize(b),d.autoSlide&&d.stop().play(),b>=d.length&&(b%=d.length),b==d.currentTab)return this;if(d.anim)try{d.anim.stop(),d.anim=null}catch(h){}var i={none:function(a){d.pannels.setStyles({display:"none"}),d.pannels.item(a).setStyles({display:"block"}),f()},vSlide:function(b){d.transitions?(d.animwrap.setStyles({"-webkit-transition-duration":(e?d.speed:"0")+"s","-webkit-transform":"translate3d(0,"+-1*b*d.animcon.get("region").height/d.colspan+"px,0)","-webkit-backface-visibility":"hidden"}),e?(d.anim=a.Anim(d.animwrap,{opacity:1},d.speed,d.easing,function(){f()}),d.anim.run()):f()):e?(d.anim=a.Anim(d.animwrap,{top:-1*b*d.animcon.get("region").height/d.colspan},d.speed,d.easing,function(){f()}),d.anim.run()):(d.animwrap.css({top:-1*b*d.animcon.get("region").height/d.colspan}),f())},hSlide:function(b){d.transitions?(d.animwrap.setStyles({"-webkit-transition-duration":(e?d.speed:"0")+"s","-webkit-transform":"translate3d("+-1*b*d.animcon.get("region").width/d.colspan+"px,0,0)","-webkit-backface-visibility":"hidden"}),e?(d.anim=a.Anim(d.animwrap,{opacity:1},d.speed,d.easing,function(){f()}),d.anim.run()):f()):e?(d.anim=a.Anim(d.animwrap,{left:-1*b*d.animcon.get("region").width/d.colspan},d.speed,d.easing,function(){f()}),d.anim.run()):(d.animwrap.css({left:-1*b*d.animcon.get("region").width/d.colspan}),f())},fade:function(b){var c=d.currentTab;d.anim=a.Anim(d.pannels.item(b),{opacity:1},e?d.speed:.01,d.easing,function(){d.pannels.item(c).setStyle("zIndex",0),d.pannels.item(b).setStyle("zIndex",1),d.pannels.item(c).setStyle("opacity",0),d.pannels.item(c).setStyles({display:"none"}),f()}),d.pannels.item(b).setStyles({display:"block"}),d.pannels.item(b).setStyle("opacity",0),d.pannels.item(c).setStyle("zIndex",1),d.pannels.item(b).setStyle("zIndex",2),d.anim.run()}},j=function(){var a=d.fire("beforeSwitch",{index:b,navnode:d.tabs.item(b),pannelnode:d.pannels.item(b)});a!==!1&&(b+d.colspan>d.pannels.size()&&(b=d.pannels.size()-d.colspan),i[d.effect](b),d.currentTab=b,d.hightlightNav(d.getWrappedIndex(b)),d.fire("switch",{index:b,navnode:d.tabs.item(d.getWrappedIndex(b)),pannelnode:d.pannels.item(b)}),d.renderPannelTextarea(b))};a.isNumber(g)?setTimeout(function(){j()},g):j()},go:function(a,b){var c=this;return c.switch_to(a,b),this},play:function(){var a=this;return null!==a.timer&&clearTimeout(a.timer),a.timer=setTimeout(function(){a.next().play()},Number(a.timeout)),this},stop:function(){var a=this;return clearTimeout(a.timer),a.timer=null,this}}),b},{requires:["node","json","event","./slide-util","./kissy2yui"]}),KISSY.add("gallery/slide/1.1/index",function(a,b){return b},{requires:["./base"]});/* Copyright 2012, KISSY UI Library v1.30 MIT Licensed build time: Dec 20 22:28 */ KISSY.add("sizzle",function(){function k(a,b,c,d){var c=c||[],b=b||j,g,f,e,i,h=b.nodeType;if(!a||"string"!==typeof a)return c;if(1!==h&&9!==h)return[];e=E(b);if(!e&&!d&&(g=fa.exec(a)))if(i=g[1])if(9===h)if((f=b.getElementById(i))&&f.parentNode){if(f.id===i)return c.push(f),c}else return c;else{if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&v(b,f)&&f.id===i)return c.push(f),c}else{if(g[2])return z.apply(c,A.call(b.getElementsByTagName(a),0)),c;if((i=g[3])&&X&&b.getElementsByClassName)return z.apply(c, A.call(b.getElementsByClassName(i),0)),c}return L(a.replace(F,"$1"),b,c,d,e)}function B(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function Y(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function y(a){return s(function(b){b=+b;return s(function(c,d){for(var g,f=a([],c.length,b),e=f.length;e--;)if(c[g=f[e]])c[g]=!(d[g]=c[g])})})}function Z(a,b){if(a&&b)for(var c=a.nextSibling;c;){if(c===b)return-1;c=c.nextSibling}return a? 1:-1}function G(a,b){var c,d,g,f,e,i,h;if(e=$[m][a+" "])return b?0:e.slice(0);e=a;i=[];for(h=l.preFilter;e;){if(!c||(d=ga.exec(e)))d&&(e=e.slice(d[0].length)||e),i.push(g=[]);c=!1;if(d=ha.exec(e))g.push(c=new aa(d.shift())),e=e.slice(c.length),c.type=d[0].replace(F," ");for(f in l.filter)if((d=H[f].exec(e))&&(!h[f]||(d=h[f](d))))g.push(c=new aa(d.shift())),e=e.slice(c.length),c.type=f,c.matches=d;if(!c)break}return b?e.length:e?k.error(a):$(a,i).slice(0)}function M(a,b,c){var d=b.dir,g=c&&"parentNode"=== b.dir,f=ia++;return b.first?function(b,c,f){for(;b=b[d];)if(g||1===b.nodeType)return a(b,c,f)}:function(b,c,h){if(h)for(;b=b[d];){if((g||1===b.nodeType)&&a(b,c,h))return b}else for(var n,r=C+" "+f+" ",w=r+N;b=b[d];)if(g||1===b.nodeType){if((n=b[m])===w)return b.sizset;if("string"===typeof n&&0===n.indexOf(r)){if(b.sizset)return b}else{b[m]=w;if(a(b,c,h))return b.sizset=!0,b;b.sizset=!1}}}}function O(a){return 1l.cacheLength&&delete a[b.shift()];return a[c+" "]=d},a)},da=t(),$=t(),ea=t(),t="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[-\\w]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+"(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+".replace("w","w#")+ ")|)|)[\\x20\\t\\r\\n\\f]*\\]",W=":((?:\\\\.|[-\\w]|[^\\x00-\\xa0])+)(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+t+")|[^:]|\\\\.)*|.*))\\)|)",F=RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),ga=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,ha=/^[\x20\t\r\n\f]*([\x20\t\r\n\f>+~])[\x20\t\r\n\f]*/,la=RegExp(W),fa=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,S=/[\x20\t\r\n\f]*[+~]/,ma=/h\d/i,na=/input|select|textarea|button/i,x=/\\(?!\\)/g,H={ID:/^#((?:\\.|[-\w]|[^\x00-\xa0])+)/, CLASS:/^\.((?:\\.|[-\w]|[^\x00-\xa0])+)/,NAME:/^\[name=['"]?((?:\\.|[-\w]|[^\x00-\xa0])+)['"]?\]/,TAG:RegExp("^("+"(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:RegExp("^"+t),PSEUDO:RegExp("^"+W),CHILD:RegExp("^:(only|nth|first|last)-child(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),needsContext:RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)", "i")},u=function(a){var b=j.createElement("div");try{return a(b)}catch(c){return!1}finally{}},t=u(function(a){a.appendChild(j.createComment(""));return!a.getElementsByTagName("*").length}),oa=u(function(a){a.innerHTML="";return a.firstChild&&"undefined"!==typeof a.firstChild.getAttribute&&"#"===a.firstChild.getAttribute("href")}),pa=u(function(a){a.innerHTML="";a=typeof a.lastChild.getAttribute("multiple");return"boolean"!==a&&"string"!==a}),X=u(function(a){a.innerHTML= "";if(!a.getElementsByClassName||!a.getElementsByClassName("e").length)return!1;a.lastChild.className="e";return 2===a.getElementsByClassName("e").length}),qa=u(function(a){a.id=m+0;a.innerHTML="
";o.insertBefore(a,o.firstChild);var b=j.getElementsByName&&j.getElementsByName(m).length===2+j.getElementsByName(m+0).length;U=!j.getElementById(m);o.removeChild(a);return b});try{A.call(o.childNodes,0)[0].nodeType}catch(ra){A= function(a){for(var b,c=[];b=this[a];a++)c.push(b);return c}}k.matches=function(a,b){return k(a,null,null,b)};k.matchesSelector=function(a,b){return 0":{dir:"parentNode",first:!0}, " ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(x,"");a[3]=(a[4]||a[5]||"").replace(x,"");"~="===a[2]&&(a[3]=" "+a[3]+" ");return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();"nth"===a[1]?(a[2]||k.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*("even"===a[2]||"odd"===a[2])),a[4]=+(a[6]+a[7]||"odd"===a[2])):a[2]&&k.error(a[0]);return a},PSEUDO:function(a){var b,c;if(H.CHILD.test(a[0]))return null;if(a[3])a[2]= a[3];else if(b=a[4]){if(la.test(b)&&(c=G(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length))b=b.slice(0,c),a[0]=a[0].slice(0,c);a[2]=b}return a.slice(0,3)}},filter:{ID:U?function(a){a=a.replace(x,"");return function(b){return b.getAttribute("id")===a}}:function(a){a=a.replace(x,"");return function(b){return(b="undefined"!==typeof b.getAttributeNode&&b.getAttributeNode("id"))&&b.value===a}},TAG:function(a){if("*"===a)return function(){return!0};a=a.replace(x,"").toLowerCase();return function(b){return b.nodeName&& b.nodeName.toLowerCase()===a}},CLASS:function(a){var b=da[m][a+" "];return b||(b=RegExp("(^|[\\x20\\t\\r\\n\\f])"+a+"([\\x20\\t\\r\\n\\f]|$)"))&&da(a,function(a){return b.test(a.className||"undefined"!==typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){d=k.attr(d,a);if(null==d)return"!="===b;if(!b)return!0;d+="";return"="===b?d===c:"!="===b?d!==c:"^="===b?c&&0===d.indexOf(c):"*="===b?c&&-1c?c+b:c]}),even:y(function(a,b){for(var c=0;cc?c+b:c;0<=--b;)a.push(b);return a}),gt:y(function(a,b,c){for(c=0>c?c+b:c;++c";a.querySelectorAll(":enabled").length||g.push(":enabled",":disabled")}); g=RegExp(g.join("|"));L=function(a,d,e,f,l){if(!f&&!l&&!g.test(a)){var j,k,o=!0,p=m;k=d;j=9===d.nodeType&&a;if(1===d.nodeType&&"object"!==d.nodeName.toLowerCase()){j=G(a);(o=d.getAttribute("id"))?p=o.replace(c,"\\$&"):d.setAttribute("id",p);p="[id='"+p+"'] ";for(k=j.length;k--;)j[k]=p+j[k].join("");k=S.test(a)&&d.parentNode||d;j=j.join(",")}if(j)try{return z.apply(e,A.call(k.querySelectorAll(j),0)),e}catch(q){}finally{o||d.removeAttribute("id")}}return b(a,d,e,f,l)};e&&(u(function(b){a=e.call(b,"div"); try{e.call(b,"[test!='']:sizzle"),f.push("!=",W)}catch(c){}}),f=RegExp(f.join("|")),k.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!E(b)&&!f.test(c)&&!g.test(c))try{var j=e.call(b,c);if(j||a||b.document&&11!==b.document.nodeType)return j}catch(l){}return 0",p,q),o=this.get("elBefore"),m=this.get("src"),k=this.get("version");l=f.id=f.id||h.guid("ks-swf-");if(A()){if(k&&!y(k)&&(this.set("status",i.Status.TOO_LOW),b)){m=b;if(!("width"in f)||!/%$/.test(f.width)&&310>parseInt(f.width,10))f.width="310";if(!("height"in f)||!/%$/.test(f.height)&&137>parseInt(f.height,10))f.height="137";b=d.flashVars=d.flashVars||{};h.mix(b,{MMredirectURL:location.href,MMplayerType:n.ie?"ActiveX":"PlugIn",MMdoctitle:q.title.slice(0,47)+" - Flash Player Installation"})}"full"==g?(n.ie?(b=c(m,f,d,1),delete f.id,delete f.style,k=c(m,f,d,0)):(k=c(m,f,d,0),delete f.id,delete f.style,b=c(m,f,d,1)),d=b+k+t+"/"+u+v+t+"/"+u+v):d=c(m,f,d,n.ie)+t+"/"+u+v;this.set("html",d);o?e.insertBefore(j,o):e.append(j,this.get("render"));"outerHTML"in j? j.outerHTML=d:j.parentNode.replaceChild(e.create(d),j);l=e.get("#"+l,q);this.set("swfObject",l);"full"==g&&(n.ie?this.set("swfObject",l):this.set("swfObject",l.parentNode));this.set("el",l);this.get("status")||this.set("status",i.Status.SUCCESS)}else this.set("status",i.Status.NOT_INSTALLED)}function z(a){var b=g;h.each(a,function(a,d){d=d.toLowerCase();d in B?b+=o(d,a):d==C&&(b+=o(d,q(a)))});return b}function c(a,b,l,d){var c=g,f=g;d==p&&(d=n.ie);h.each(b,function(a,b){c=c+(w+b+x+j+a+j)});d?(c+= w+"classid"+x+j+D+j,f+=o("movie",a)):(c+=w+"data"+x+j+a+j,c+=w+"type"+x+j+E+j);f+=z(l);return t+u+c+v+f}function q(a){var b=[];h.each(a,function(a,d){"string"!=typeof a&&(a=r.stringify(a));a&&b.push(d+"="+F(a))});return b.join("&")}function o(a,b){return''}var n=h.UA,E="application/x-shockwave-flash",D="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000",C="flashvars",g="",w=" ",x="=",j='"',t="<",v=">",G=h.Env.host.document,A=k.fpv,y=k.fpvGTE,u="object",F=encodeURIComponent, B={wmode:g,allowscriptaccess:g,allownetworking:g,allowfullscreen:g,play:"false",loop:g,menu:g,quality:g,scale:g,salign:g,bgcolor:g,devicefont:g,hasPriority:g,base:g,swliveconnect:g,seamlesstabbing:g};h.extend(i,s,{callSWF:function(a,b){var c=this.get("el"),d,b=b||[];try{c[a]&&(d=c[a].apply(c,b))}catch(g){d="",0!==b.length&&(d="'"+b.join("', '")+"'"),d=(new Function("swf","return swf."+a+"("+d+");"))(c)}return d},destroy:function(){this.detach();var a=this.get("swfObject");n.ie?(a.style.display="none", function(){if(4==a.readyState){for(var b in a)"function"==typeof a[b]&&(a[b]=null);a.parentNode.removeChild(a)}else setTimeout(arguments.callee,10)}()):a.parentNode.removeChild(a)}},{ATTRS:{expressInstall:{value:h.config("base")+"swf/assets/expressInstall.swf"},src:{},version:{value:"9"},params:{value:{}},attrs:{value:{}},render:{setter:function(a){"string"==typeof a&&(a=e.get(a,this.get("document")));return a},valueFn:function(){return document.body}},elBefore:{setter:function(a){"string"==typeof a&& (a=e.get(a,this.get("document")));return a}},document:{value:G},status:{},el:{},swfObject:{},html:{},htmlMode:{value:"default"}},fpv:A,fpvGTE:y});i.fpvGEQ=y;i.getSrc=function(a){var b=a=e.get(a),c="",d,a=[],c=e.nodeName(b);if("object"==c){(c=e.attr(b,"data"))&&a.push(b);b=b.childNodes;for(c=0;c=r(c)}}});/* Copyright 2013, KISSY UI Library v1.30 MIT Licensed build time: Jan 5 20:44 */ KISSY.add("overlay/base",function(d,e,b,a,c,g,f,h){return e.Controller.extend([b.ContentBox,b.Position,a,b.Align,c,g,h],{},{ATTRS:{focusable:{value:!1},allowTextSelection:{value:!0},closable:{value:!1},handleMouseEvents:{value:!1},xrender:{value:f}}},{xclass:"overlay",priority:10})},{requires:"component/base,component/extension,./extension/loading,./extension/close,./extension/mask,./overlay-render,./extension/overlay-effect".split(",")}); KISSY.add("overlay/dialog-render",function(d,e,b){return e.extend([b],{createDom:function(){var a=this.get("el"),c,b=this.get("header");if(!(c=b.attr("id")))b.attr("id",c=d.guid("ks-dialog-header"));a.attr("role","dialog").attr("aria-labelledby",c);a.append("
")}})},{requires:["./overlay-render","./extension/stdmod-render"]}); KISSY.add("overlay/dialog",function(d,e,b,a,c,g){var f=e.extend([c,g],{handleKeyEventInternal:function(f){if(this.get("escapeToClose")&&f.keyCode===a.KeyCodes.ESC){if("select"!=f.target.nodeName.toLowerCase()||f.target.disabled)this.close(),f.halt()}else a:if(f.keyCode==h){var c=this.get("el"),b=a.all(f.target),g=c.last();if(b.equals(c)&&f.shiftKey)g[0].focus(),f.halt();else if(b.equals(g)&&!f.shiftKey)c[0].focus(),f.halt();else if(b.equals(c)||c.contains(b))break a;f.halt()}},_onSetVisible:function(a){var c= this.get("el");if(a)this.__lastActive=c[0].ownerDocument.activeElement,this.set("focused",!0),c.attr("aria-hidden","false");else{c.attr("aria-hidden","true");try{this.__lastActive&&this.__lastActive.focus()}catch(b){}}f.superclass._onSetVisible.apply(this,arguments)}},{ATTRS:{closable:{value:!0},xrender:{value:b},focusable:{value:!0},escapeToClose:{value:!0}}},{xclass:"dialog",priority:20}),h=a.KeyCodes.TAB;return f},{requires:["./base","./dialog-render","node","./extension/stdmod","./extension/dialog-effect"]}); KISSY.add("overlay/extension/close-render",function(d,e){function b(a){return new e("\u5173\u95ed")}function a(){}var c="ext-";a.ATTRS={closable:{value:!0},closeBtn:{}};a.HTML_PARSER={closeBtn:function(a){return a.one("."+this.get("prefixCls")+c+"close")}};a.prototype={_onSetClosable:function(a){var f=this.get("closeBtn");a?(f||this.setInternal("closeBtn",f=b(this.get("prefixCls"))), this.get("el").prepend(f)):f&&f.remove()}};return a},{requires:["node"]}); KISSY.add("overlay/extension/close",function(){function d(){}d.ATTRS={closable:{view:1},closeBtn:{view:1},closeAction:{value:"hide"}};var e={hide:"hide",destroy:"destroy"};d.prototype={_onSetClosable:function(b){var a=this;b&&!a.__bindCloseEvent&&(a.__bindCloseEvent=1,a.get("closeBtn").on("click",function(c){a.close();c.preventDefault()}))},close:function(){this[e[this.get("closeAction")]||"hide"]();return this},__destructor:function(){var b=this.get("closeBtn");b&&b.detach()}};return d}); KISSY.add("overlay/extension/dialog-effect",function(){function d(){}d.prototype={__afterCreateEffectGhost:function(d){var b=this.get("body");d.all("."+this.get("prefixCls")+"stdmod-body").css({height:b.height(),width:b.width()}).html("");return d}};return d}); KISSY.add("overlay/extension/loading-render",function(d,e){function b(){}b.prototype={loading:function(){this._loadingExtEl||(this._loadingExtEl=(new e("
")).appendTo(this.get("el")));this._loadingExtEl.show()},unloading:function(){var a=this._loadingExtEl;a&&a.hide()}};return b},{requires:["node"]}); KISSY.add("overlay/extension/loading",function(){function d(){}d.prototype={loading:function(){this.get("view").loading();return this},unloading:function(){this.get("view").unloading();return this}};return d}); KISSY.add("overlay/extension/mask-render",function(d,e){function b(a){a=a.get("prefixCls")+"ext-mask "+a.getCssClassWithState("-mask");a=g("
"+(c?"": "")+"
").prependTo("body");a.unselectable();a.on("mousedown",function(a){a.preventDefault()});return a}function a(){}var c=6===d.UA.ie,g=e.all;a.ATTRS={mask:{value:!1},maskNode:{}};a.prototype={__renderUI:function(){this.get("mask")&&this.set("maskNode",b(this))},__syncUI:function(){this.get("mask")&&this.ksSetMaskVisible(this.get("visible"),1)},ksSetMaskVisible:function(a,c){var b=this.getCssClassWithState("-mask-shown"),d=this.get("maskNode"),g=this.getCssClassWithState("-mask-hidden");a?d.removeClass(g).addClass(b): d.removeClass(b).addClass(g);c||d.css("visibility",a?"visible":"hidden")},__destructor:function(){var a;(a=this.get("maskNode"))&&a.remove()}};return a},{requires:["node"]}); KISSY.add("overlay/extension/mask",function(d,e){function b(){}b.ATTRS={mask:{view:1},maskNode:{view:1}};var a={fade:["Out","In"],slide:["Up","Down"]};b.prototype={__bindUI:function(){var c,b,f=this.get("el"),d=this.get("view");if(b=this.get("mask")){c=this.get("maskNode");if(b.closeOnClick)c.on(e.Gesture.tap,this.close,this);this.on("afterVisibleChange",function(e){if(e=e.newVal){var i=parseInt(f.css("z-index"))||1;c.css("z-index",i-1)}i=b.effect||"none";if("none"==i)d.ksSetMaskVisible(e);else{d.ksSetMaskVisible(e, 1);var n=b.duration,o=b.easing,p=e?1:0;c.stop(1,1);c.css("display",e?"none":"block");c[i+a[i][p]](n,null,o)}})}}};return b},{requires:["event"]}); KISSY.add("overlay/extension/overlay-effect",function(d){function e(a){var b=a.get("el").clone(!0);b.css({visibility:"",overflow:h}).addClass(a.get("prefixCls")+"overlay-ghost");return a.__afterCreateEffectGhost(b)}function b(a,b,c){a.__effectGhost&&a.__effectGhost.stop(1);var f=a.get("el"),g=d.all,h=a.get("effect"),i=g(h.target),g=h.duration,i=d.mix(i.offset(),{width:i.width(),height:i.height()}),k=d.mix(f.offset(),{width:f.width(),height:f.height()}),j=e(a),h=h.easing;j.insertAfter(f);f.hide(); b?(b=i,i=k):b=k;j.css(b);a.__effectGhost=j;j.animate(i,{duration:g,easing:h,complete:function(){a.__effectGhost=null;j.remove();f.show();c()}})}function a(a,c,d){var e=a.get("el"),h=a.get("effect"),m=h.effect||g,l=h.target;if(m==g&&!l)d();else if(l)b(a,c,d);else{var a=h.duration,h=h.easing,q=e.css("visibility"),l=c?1:0;e.stop(1,1);e.css({visibility:k,display:c?g:f});e[m+i[m][l]](a,function(){e.css({display:f,visibility:q});d()},h)}}function c(){}var g="none",f="block",h="hidden",k="visible",i={fade:["Out", "In"],slide:["Up","Down"]};c.ATTRS={effect:{value:{effect:"",target:null,duration:0.5,easing:"easeOut"},setter:function(a){var b=a.effect;"string"==typeof b&&!i[b]&&(a.effect="")}}};c.prototype={__afterCreateEffectGhost:function(a){return a},_onSetVisible:function(b){var c=this;c.get("rendered")&&a(c,b,function(){c.fire(b?"show":"hide")})}};return c}); KISSY.add("overlay/extension/stdmod-render",function(d,e){function b(){}function a(a,b){var c=a.get("contentEl"),d=a.get(b);d||(d=new e("
"),d.appendTo(c),a.setInternal(b,d))}function c(a,b,c){b=a.get(b);"string"==typeof c?b.html(c):b.html("").append(c)}var g="stdmod-";b.ATTRS={header:{},body:{},footer:{},bodyStyle:{},footerStyle:{},headerStyle:{},headerContent:{},bodyContent:{},footerContent:{}};b.HTML_PARSER={header:function(a){return a.one("."+this.get("prefixCls")+ g+"header")},body:function(a){return a.one("."+this.get("prefixCls")+g+"body")},footer:function(a){return a.one("."+this.get("prefixCls")+g+"footer")}};b.prototype={__createDom:function(){a(this,"header");a(this,"body");a(this,"footer")},_onSetBodyStyle:function(a){this.get("body").css(a)},_onSetHeaderStyle:function(a){this.get("header").css(a)},_onSetFooterStyle:function(a){this.get("footer").css(a)},_onSetBodyContent:function(a){c(this,"body",a)},_onSetHeaderContent:function(a){c(this,"header", a)},_onSetFooterContent:function(a){c(this,"footer",a)}};return b},{requires:["node"]});KISSY.add("overlay/extension/stdmod",function(){function d(){}d.ATTRS={header:{view:1},body:{view:1},footer:{view:1},bodyStyle:{view:1},footerStyle:{view:1},headerStyle:{view:1},headerContent:{view:1},bodyContent:{view:1},footerContent:{view:1}};return d}); KISSY.add("overlay/overlay-render",function(d,e,b,a,c,g){return e.Render.extend([b.ContentBox.Render,b.Position.Render,a,6===d.UA.ie?b.Shim.Render:null,c,g])},{requires:["component/base","component/extension","./extension/loading-render","./extension/close-render","./extension/mask-render"]}); KISSY.add("overlay",function(d,e,b,a,c,g){e.Render=b;a.Render=c;e.Dialog=a;d.Dialog=a;e.Popup=g;return d.Overlay=e},{requires:["overlay/base","overlay/overlay-render","overlay/dialog","overlay/dialog-render","overlay/popup"]}); KISSY.add("overlay/popup",function(d,e,b){return e.extend({initializer:function(){var a=this;a.get("trigger")&&("mouse"===a.get("triggerType")?(a._bindTriggerMouse(),a.on("afterRenderUI",function(){a._bindContainerMouse()})):a._bindTriggerClick())},_bindTriggerMouse:function(){var a=this,c=a.get("trigger"),e;a.__mouseEnterPopup=function(c){a._clearHiddenTimer();e=d.later(function(){a._showing(c);e=b},1E3*a.get("mouseDelay"))};c.on("mouseenter",a.__mouseEnterPopup);a._mouseLeavePopup=function(){e&& (e.cancel(),e=b);a._setHiddenTimer()};c.on("mouseleave",a._mouseLeavePopup)},_bindContainerMouse:function(){this.get("el").on("mouseleave",this._setHiddenTimer,this).on("mouseenter",this._clearHiddenTimer,this)},_setHiddenTimer:function(){var a=this;a._hiddenTimer=d.later(function(){a._hiding()},1E3*a.get("mouseDelay"))},_clearHiddenTimer:function(){this._hiddenTimer&&(this._hiddenTimer.cancel(),this._hiddenTimer=b)},_bindTriggerClick:function(){var a=this;a.__clickPopup=function(b){b.halt();if(a.get("toggle"))a[a.get("visible")? "_hiding":"_showing"](b);else a._showing(b)};a.get("trigger").on("click",a.__clickPopup)},_showing:function(a){this.set("currentTrigger",d.one(a.target));this.show()},_hiding:function(){this.set("currentTrigger",b);this.hide()},destructor:function(){var a,b=this.get("trigger");b&&(this.__clickPopup&&b.detach("click",this.__clickPopup),this.__mouseEnterPopup&&b.detach("mouseenter",this.__mouseEnterPopup),this._mouseLeavePopup&&b.detach("mouseleave",this._mouseLeavePopup));(a=this.get("el"))&&a.detach("mouseleave", this._setHiddenTimer,this).detach("mouseenter",this._clearHiddenTimer,this)}},{ATTRS:{trigger:{setter:function(a){return d.all(a)}},triggerType:{value:"click"},currentTrigger:{},mouseDelay:{value:0.1},toggle:{value:!1}}},{xclass:"popup",priority:20})},{requires:["./base"]});/* Copyright 2013, KISSY UI Library v1.30 MIT Licensed build time: May 15 15:40 */ KISSY.add("datalazyload",function(d,e,g,s,o){function l(a,b){a.style.display=t;a.className="";var c=e.create("
");a.parentNode.insertBefore(c,a);e.html(c,a.value,b)}function p(a,b){var c,f;if(!(c=a.id))c=a.id=d.guid("ks-lazyload");if(!(f=b.ksLazyloadId))f=b.ksLazyloadId=d.guid("ks-lazyload");return c+f}function m(a,b,c){if(!a.offsetWidth)return!1;var f=e.offset(a),d=!0,k=f.left,f=f.top,a={left:k,top:f,right:k+(a._ks_lazy_width?a._ks_lazy_width:a._ks_lazy_width=e.outerWidth(a)),bottom:f+(a._ks_lazy_height? a._ks_lazy_height:a._ks_lazy_height=e.outerHeight(a))};(b=q(b,a))&&c&&(d=q(c,a));return d&&b}function i(a,b){if(!(this instanceof i))return new i(a,b);var c=a;d.isPlainObject(c)||(c=b||{},a&&(c.container=a));i.superclass.constructor.call(this,c);this._callbacks={};this._containerIsNotDocument=9!=this.get("container").nodeType;this._filterItems();this._initLoadEvent()}function q(a,b){var c,f,d,e;c=Math.max(a.top,b.top);f=Math.min(a.bottom,b.bottom);d=Math.max(a.left,b.left);e=Math.min(a.right,b.right); return f>=c&&e>=d}var j=d.Env.host,r=j.document,t="none",n=function(a,b){var b=b||"data-ks-lazyload",c=a.getAttribute(b);c&&a.src!=c&&(a.src=c,a.removeAttribute(b))};i.ATTRS={diff:{value:"default"},placeholder:{value:"http://a.tbcdn.cn/kissy/1.0.0/build/imglazyload/spaceball.gif"},execScript:{value:!0},container:{setter:function(a){a=a||r;d.isWindow(a)?a=a.document:(a=e.get(a),"body"==e.nodeName(a)&&(a=a.ownerDocument));return a},valueFn:function(){return r}},autoDestroy:{value:!0}};d.extend(i,s, {_filterItems:function(){var a=this,b=a.userConfig,c=[],f=[],h=[a.get("container")];d.isArray(b.container)&&(a._backCompact=1,h=b.container);d.each(h,function(b){c=c.concat(d.filter(e.query("img",b),a._filterImg,a));f=f.concat(e.query("textarea.ks-datalazyload",b))});a._images=c;a._textareas=f},_filterImg:function(a){var b=this.get("placeholder");return a.getAttribute("data-ks-lazyload")?(a.src||(a.src=b),!0):o},_initLoadEvent:function(){function a(){b._isLoadAllLazyElements()||d.ready(k)}var b=this, c=new Image,f=b.get("placeholder"),e=b.get("autoDestroy"),k=function(){b._loadItems();e&&b._isLoadAllLazyElements()&&b.destroy()};b._loadFn=d.buffer(k,100,b);b.resume();c.src=f;c.complete?a():c.onload=a},refresh:function(){this._loadFn()},_loadItems:function(){var a,b=this.get("container");if(!this._containerIsNotDocument||b.offsetWidth)b=this._getBoundingRect(),!this._backCompact&&this._containerIsNotDocument&&(a=this._getBoundingRect(this.get("container"))),this._loadImgs(b,a),this._loadTextAreas(b, a),this._fireCallbacks(b,a)},_loadImgs:function(a,b){this._images=d.filter(this._images,function(c){return m(c,a,b)?n(c):!0},this)},_loadTextAreas:function(a,b){var c=this.get("execScript");this._textareas=d.filter(this._textareas,function(f){return m(f,a,b)?l(f,c):!0},this)},_fireCallbacks:function(a,b){var c=this._callbacks;d.each(c,function(f,d){var e=f.el,g=!1,i=f.fn;m(e,a,b)&&(g=i.call(e));!1!==g&&delete c[d]})},addCallback:function(a,b){var c=this._callbacks,a=e.get(a);c[p(a,b)]={el:e.get(a), fn:b};this._loadFn()},removeCallback:function(a,b){var c=this._callbacks,a=e.get(a);delete c[p(a,b)]},getElements:function(){return{images:this._images,textareas:this._textareas}},addElements:function(a){"string"==typeof a?a=e.query(a):d.isArray(a)||(a=[a]);var b=this._images||[],c=this._textareas||[];d.each(a,function(a){var e=a.nodeName.toLowerCase();"img"==e?d.inArray(a,b)||b.push(a):"textarea"==e&&(d.inArray(a,c)||c.push(a))});this._images=b;this._textareas=c},removeElements:function(a){"string"== typeof a?a=e.query(a):d.isArray(a)||(a=[a]);var b=[],c=[];d.each(this._images,function(c){d.inArray(c,a)||b.push(c)});d.each(this._textareas,function(b){d.inArray(b,a)||c.push(b)});this._images=b;this._textareas=c},_getBoundingRect:function(a){var b,c,f;a!==o?(b=e.outerHeight(a),c=e.outerWidth(a),f=e.offset(a),a=f.left,f=f.top):(b=e.viewportHeight(),c=e.viewportWidth(),a=e.scrollLeft(),f=e.scrollTop());var h=this.get("diff"),k=0,g="default"===h?c:h,i=0,j="default"===h?b:h;c=a+c;b=f+b;d.isObject(h)&& (k=h.left||0,g=h.right||0,i=h.top||0,j=h.bottom||0);return{left:a-k,top:f-i,right:c+g,bottom:b+j}},_isLoadAllLazyElements:function(){return 0==this._images.length+this._textareas.length+(d.isEmptyObject(this._callbacks)?0:1)},pause:function(){var a=this._loadFn;if(!this._destroyed&&(g.remove(j,"scroll",a),g.remove(j,"touchmove",a),g.remove(j,"resize",a),a.stop(),this._containerIsNotDocument)){var b=this.get("container");g.remove(b,"scroll",a);g.remove(b,"touchmove",a)}},resume:function(){var a=this._loadFn; if(!this._destroyed&&(g.on(j,"scroll",a),g.on(j,"touchmove",a),g.on(j,"resize",a),this._containerIsNotDocument)){var b=this.get("container");g.on(b,"scroll",a);g.on(b,"touchmove",a)}},destroy:function(){this.pause();this._callbacks={};this._images=[];this._textareas=[];this.fire("destroy");this._destroyed=1}});i.loadCustomLazyData=function(a,b,c){"img-src"===b&&(b="img");d.isArray(a)||(a=[e.get(a)]);var f=c||"data-ks-lazyload-custom",g=c||"ks-datalazyload-custom";d.each(a,function(a){"img"==b?"img"== a.nodeName.toLowerCase()?n(a,f):e.query("img",a).each(function(a){n(a,f)}):"textarea"==a.nodeName.toLowerCase()&&e.hasClass(a,g)?l(a,!0):e.query("textarea."+g,a).each(function(a){l(a,!0)})})};return d.DataLazyload=i},{requires:["dom","event","base"]});/* Copyright 2013, KISSY UI Library v1.30 MIT Licensed build time: Jun 7 13:04 */ KISSY.add("combobox/base",function(h,c,k,l,i,f){function a(e){for(var b=0;bx";c.offset(f,d);d=f.lastChild;a=c.offset(d);a.top+=c.height(d);0
',{prefixCls:b})),c=d.one("."+b+"combobox-input-wrap"),a=a||h.all(h.substitute('',{prefixCls:b})), c.append(a),this.setInternal("input",a));i||this.setInternal("trigger",h.all(h.substitute('
',{prefixCls:b})));this.get("trigger").unselectable(k);this.setInternal("invalidEl",l("
").insertBefore(a.parent(k,k),k));if(i=this.get("placeholder")){if(!(c=a.attr("id")))a.attr("id",c=h.guid("ks-combobox-input")); this.setInternal("placeholderEl",l('").appendTo(d))}},getKeyEventTarget:function(){return this.get("input")},_onSetCollapsed:function(c){this.get("input").attr("aria-expanded",c)},_onSetHasTrigger:function(c){var a=this.get("trigger");c?this.get("el").prepend(a):a.remove()},_onSetDisabled:function(c){i.superclass._onSetDisabled.apply(this,arguments);this.get("input").attr("disabled",c)}},{ATTRS:{collapsed:{value:!0},hasTrigger:{value:!0}, input:{},trigger:{},placeholder:{},placeholderEl:{},invalidEl:{}},HTML_PARSER:{input:function(c){return c.one("."+this.get("prefixCls")+"combobox-input")},trigger:function(c){return c.one("."+this.get("prefixCls")+"combobox-trigger")}}});return i},{requires:["component/base"]}); /* Copyright 2013, KISSY UI Library v1.30 MIT Licensed build time: Jan 30 22:39 */ KISSY.add("component/base",function(d,g,e,c,h,a,b,i){d.mix(g,{Controller:e,Render:c,Container:h,DelegateChildren:a,DecorateChild:i,DecorateChildren:b});return g},{requires:"./base/impl,./base/controller,./base/render,./base/container,./base/delegate-children,./base/decorate-children,./base/decorate-child".split(",")}); KISSY.add("component/base/box-render",function(d){function g(){}var e=d.all,c=d.UA,h=d.Env.host.document;g.ATTRS={el:{setter:function(a){return e(a)}},elCls:{},elStyle:{},width:{},height:{},elTagName:{value:"div"},elAttrs:{},content:{},elBefore:{},render:{},visible:{value:!0},visibleMode:{value:"display"},contentEl:{valueFn:function(){return this.get("el")}}};g.HTML_PARSER={el:function(a){return a},content:function(a){return(this.get("contentEl")||a).html()}};g.prototype={__createDom:function(){var a, b;this.get("srcNode")||(b=this.get("contentEl"),a=e("<"+this.get("elTagName")+">"),b&&a.append(b),this.setInternal("el",a),b||this.setInternal("contentEl",a))},__renderUI:function(){if(!this.get("srcNode")){var a=this.get("render"),b=this.get("el"),i=this.get("elBefore");i?b.insertBefore(i,void 0):a?b.appendTo(a,void 0):b.appendTo(h.body,void 0)}},_onSetElAttrs:function(a){this.get("el").attr(a)},_onSetElCls:function(a){this.get("el").addClass(a)},_onSetElStyle:function(a){this.get("el").css(a)}, _onSetWidth:function(a){this.get("el").width(a)},_onSetHeight:function(a){this.get("el").height(a)},_onSetContent:function(a){var b=this.get("contentEl");if(!this.get("srcNode")||this.get("rendered"))"string"==typeof a?b.html(a):a&&b.empty().append(a);9>c.ie&&!this.get("allowTextSelection")&&b.unselectable(void 0)},_onSetVisible:function(a){var b=this.get("el"),i=this.getCssClassWithState("-shown"),c=this.getCssClassWithState("-hidden"),d=this.get("visibleMode");a?(b.removeClass(c),b.addClass(i)): (b.removeClass(i),b.addClass(c));"visibility"==d?b.css("visibility",a?"visible":"hidden"):b.css("display",a?"":"none")},__destructor:function(){var a=this.get("el");a&&a.remove()}};return g},{requires:["node"]}); KISSY.add("component/base/box",function(){function d(){}d.ATTRS={content:{view:1},width:{view:1},height:{view:1},elCls:{view:1},elStyle:{view:1},elAttrs:{view:1},elBefore:{view:1},el:{view:1},render:{view:1},visibleMode:{view:1},visible:{value:!0,view:1},srcNode:{view:1}};d.prototype={_onSetVisible:function(d){this.get("rendered")&&this.fire(d?"show":"hide")},show:function(){this.render();this.set("visible",!0);return this},hide:function(){this.set("visible",!1);return this}};return d}); KISSY.add("component/base/container",function(d,g,e,c){return g.extend([e,c])},{requires:["./controller","./delegate-children","./decorate-children"]}); KISSY.add("component/base/controller",function(d,g,e,c,h,a,b,i){function o(a){return function(b){this==b.target&&(b=b.newVal,this.get("view").set(a,b))}}function t(a){return function(b){var c=this.get("view");return b===i?c.get(a):b}}function u(j){var b,c,e,f={},h,g=j.get("xrender");b=j.getAttrs();for(e in b)if(c=b[e],c.view){if((h=j.get(e))!==i)f[e]=h;j.on("after"+d.ucfirst(e)+"Change",o(e));c.getter=t(e)}j=j.constructor;for(c=[];j&&j!=r;)(b=a.getXClassByConstructor(j))&&c.push(b),j=j.superclass&& j.superclass.constructor;j=c.join(" ");f.ksComponentCss=j;return new g(f)}function s(a,b){var c=a.relatedTarget;return c&&(c===b[0]||b.contains(c))}function f(a,b){return function(c){if(!a.get("disabled"))a[b](c)}}var k=d.Env.host.document.documentMode||d.UA.ie,l=d.Features,p=e.Gesture,n=".-ks-component-focus"+d.now(),m=".-ks-component-mouse"+d.now(),q=l.isTouchSupported(),r=h.extend([g],{isController:!0,getCssClassWithPrefix:a.getCssClassWithPrefix,initializer:function(){this.setInternal("view", u(this))},createDom:function(){var a;a=this.get("view");a.create(i);a=a.getKeyEventTarget();this.get("allowTextSelection")||a.unselectable(i)},renderUI:function(){var a,b,c;this.get("view").render();b=this.get("children").concat();for(a=this.get("children").length=0;ak)b.on("dblclick"+m,f(this,"handleDblClick"))}else b.detach(m)},_onSetFocused:function(a){a&& this.getKeyEventTarget()[0].focus()},getContentElement:function(){return this.get("view").getContentElement()},getKeyEventTarget:function(){return this.get("view").getKeyEventTarget()},addChild:function(a,b){var d=this.get("children"),e;b===i&&(b=d.length);e=d[b]&&d[b].get("el")||null;var f=a;this.create();var h=this.getContentElement(),f=c.create(f,this);f.setInternal("parent",this);f.set("render",h);f.set("elBefore",e);f.create(i);a=f;d.splice(b,0,a);this.get("rendered")&&a.render();return a},removeChild:function(a, b){var c=this.get("children"),i=d.indexOf(a,c);-1!=i&&c.splice(i,1);b&&a.destroy&&a.destroy();return a},removeChildren:function(a){var b,c=[].concat(this.get("children"));for(b=0;ba?"dblclick ":"")),this.get("el").on(d,c,this))},getOwnerControl:function(a){for(var b=this.get("children"),c=b.length,d=this.get("el")[0];a&&a!==d;){for(var i=0;ib)b=c,d=h.constructor}return d},setConstructorByXClass:function(a,b){d.isFunction(b)?e[a]={constructor:b,priority:0}:(b.priority=b.priority||0,e[a]=b)}};h.getCssClassWithPrefix=g;return h}); KISSY.add("component/base/render",function(d,g,e,c,h){return c.extend([g],{getCssClassWithState:function(a){var b=this.get("ksComponentCss")||"",a=a||"";return this.getCssClassWithPrefix(b.split(/\s+/).join(a+" ")+a)},getCssClassWithPrefix:h.getCssClassWithPrefix,createDom:function(){this.get("el").addClass(this.getCssClassWithState())},getKeyEventTarget:function(){return this.get("el")},_onSetHighlighted:function(a){var b=this.getCssClassWithState("-hover");this.get("el")[a?"addClass":"removeClass"](b)}, _onSetDisabled:function(a){var b=this.getCssClassWithState("-disabled");this.get("el")[a?"addClass":"removeClass"](b).attr("aria-disabled",a);this.get("focusable")&&this.getKeyEventTarget().attr("tabIndex",a?-1:0)},_onSetActive:function(a){var b=this.getCssClassWithState("-active");this.get("el")[a?"addClass":"removeClass"](b).attr("aria-pressed",!!a)},_onSetFocused:function(a){var b=this.get("el"),c=this.getCssClassWithState("-focused");b[a?"addClass":"removeClass"](c)},getContentElement:function(){return this.get("contentEl")|| this.get("el")}},{ATTRS:{prefixCls:{value:"ks-"},focusable:{value:!0},focused:{},active:{},disabled:{},highlighted:{}},HTML_PARSER:{disabled:function(){var a=this.getCssClassWithState("-disabled");return this.get("el").hasClass(a)}}})},{requires:["./box-render","./impl","./uibase","./manager"]}); KISSY.add("component/base/uibase",function(d,g,e,c,h){var e=d.noop,a=g.extend({constructor:function(){var b;a.superclass.constructor.apply(this,arguments);this.decorateInternal&&(b=this.get("srcNode"))&&this.decorateInternal(b);this.get("autoRender")&&this.render()},bindInternal:e,syncInternal:e,initializer:function(){var a,b=d.one(this.get("srcNode"));(a=this.get("id"))&&c.addComponent(a,this);if(b){var e=this.constructor,g,h;h=this.collectConstructorChains();for(a=h.length-1;0<=a;a--)if(e=h[a], g=e.HTML_PARSER){var e=b,f=void 0,k=void 0,l=this.userConfig||{};for(f in g)f in l||(k=g[f],d.isFunction(k)?this.setInternal(f,k.call(this,e)):"string"==typeof k?this.setInternal(f,e.one(k)):d.isArray(k)&&k[0]&&this.setInternal(f,e.all(k[0])))}this.setInternal("srcNode",b)}},create:function(){this.get("created")||(this.fire("beforeCreateDom"),this.callMethodByHierarchy("createDom","__createDom"),this.setInternal("created",!0),this.fire("afterCreateDom"),this.callPluginsMethod("createDom"));return this}, render:function(){this.get("rendered")||(this.create(h),this.fire("beforeRenderUI"),this.callMethodByHierarchy("renderUI","__renderUI"),this.fire("afterRenderUI"),this.callPluginsMethod("renderUI"),this.fire("beforeBindUI"),a.superclass.bindInternal.call(this),this.callMethodByHierarchy("bindUI","__bindUI"),this.fire("afterBindUI"),this.callPluginsMethod("bindUI"),this.fire("beforeSyncUI"),a.superclass.syncInternal.call(this),this.callMethodByHierarchy("syncUI","__syncUI"),this.fire("afterSyncUI"), this.callPluginsMethod("syncUI"),this.setInternal("rendered",!0));return this},createDom:e,renderUI:e,bindUI:e,syncUI:e,plug:function(){var b;b=this.get("plugins");a.superclass.plug.apply(this,arguments);b=b[b.length-1];this.get("rendered")?(b.pluginCreateDom&&b.pluginCreateDom(this),b.pluginRenderUI&&b.pluginRenderUI(this),b.pluginBindUI&&b.pluginBindUI(this),b.pluginSyncUI&&b.pluginSyncUI(this)):this.get("created")&&b.pluginCreateDom&&b.pluginCreateDom(this);return this},destructor:function(){var a; (a=this.get("id"))&&c.removeComponent(a)}},{ATTRS:{rendered:{value:!1},created:{value:!1},xclass:{valueFn:function(){return c.getXClassByConstructor(this.constructor)}}}}),b=a.extend;d.mix(a,{HTML_PARSER:{},extend:function o(a,e,g){var f=d.makeArray(arguments),h={},l=f[f.length-1];l.xclass&&(f.pop(),f.push(l.xclass));f=b.apply(this,f);d.isArray(a)&&(d.each(a.concat(f),function(a){a&&d.each(a.HTML_PARSER,function(a,b){h[b]=a})}),f.HTML_PARSER=h);l.xclass&&c.setConstructorByXClass(l.xclass,{constructor:f, priority:l.priority});f.extend=o;return f}});return a},{requires:["rich-base","node","./manager"]});/* Copyright 2013, KISSY UI Library v1.30 MIT Licensed build time: Jan 29 20:39 */ KISSY.add("menu/base",function(e,c,a,g){function d(b){this.set("highlightedItem",null);b.stopPropagation()}var b=c.KeyCodes,f=a.Container.extend({_onSetHighlightedItem:function(b,d){var a=d&&d.prevVal;a&&a.set("highlighted",!1);b&&b.set("highlighted",!0);this.set("activeItem",b)},handleBlur:function(b){f.superclass.handleBlur.call(this,b);this.set("highlightedItem",null)},_getNextEnabledHighlighted:function(b,d){var a=this.get("children"),c=a.length,e=b;do{var f=a[b];if(!f.get("disabled")&&!1!==f.get("visible"))return a[b]; b=(b+d+c)%c}while(b!=e)},handleKeyEventInternal:function(d){var a=this.get("highlightedItem");if(a&&a.handleKeydown(d))return!0;var c=this.get("children"),f=c.length;if(0!==f){switch(d.keyCode){case b.ESC:return;case b.HOME:this.set("highlightedItem",this._getNextEnabledHighlighted(0,1));break;case b.END:this.set("highlightedItem",this._getNextEnabledHighlighted(f-1,-1));break;case b.UP:a?(d=e.indexOf(a,c),f=(d-1+f)%f):f-=1;this.set("highlightedItem",this._getNextEnabledHighlighted(f,-1));break;case b.DOWN:a? (d=e.indexOf(a,c),f=(d+1+f)%f):f=0;this.set("highlightedItem",this._getNextEnabledHighlighted(f,1));break;default:return}return!0}},bindUI:function(){this.on("hide",d,this)},containsElement:function(b){if(!1===this.get("visible")||!this.get("view"))return!1;if(this.get("view").containsElement(b))return!0;for(var d=this.get("children"),a=0,f=d.length;a").appendTo(b,void 0));this.get("labelEl")||this.set("labelEl",g("
").appendTo(f,void 0)); this.get("filterInput")||this.set("filterInput",g("").appendTo(f,void 0));this.get("menuContent")||this.set("menuContent",g("
").appendTo(b,void 0))},_onSetLabel:function(d){this.get("labelEl").html(d)}},{ATTRS:{label:{}},HTML_PARSER:{labelEl:function(d){return d.one("."+this.get("prefixCls")+"menu-filter").one("."+this.get("prefixCls")+"menu-filter-label")},filterWrap:function(d){return d.one("."+this.get("prefixCls")+"menu-filter")},menuContent:function(d){return d.one("."+ this.get("prefixCls")+"menu-content")},filterInput:function(d){return d.one("."+this.get("prefixCls")+"menu-filter").one("input")}}})},{requires:["node","./menu-render"]}); KISSY.add("menu/filtermenu",function(e,c,a,g){var d=a.extend([c.DecorateChild],{bindUI:function(){this.get("view").get("filterInput").on("keyup",this.handleFilterEvent,this)},handleMouseEnter:function(){d.superclass.handleMouseEnter.apply(this,arguments);this.getKeyEventTarget()[0].select()},handleFilterEvent:function(){var b=this.get("view").get("filterInput"),d=this.get("highlightedItem");this.set("filterStr",b.val());(!d||!d.get("visible"))&&this.set("highlightedItem",this._getNextEnabledHighlighted(0, 1))},_onSetFilterStr:function(b){this.filterItems(b)},filterItems:function(b){var d=this.get("prefixCls"),a=this.get("view"),c=a.get("labelEl"),a=a.get("filterInput");c[b?"hide":"show"]();if(this.get("allowMultiple")){var c=[],g;g=b.match(/(.+)[,\uff0c]\s*([^\uff0c,]*)/);var h=[];g&&(h=g[1].split(/[,\uff0c]/));/[,\uff0c]$/.test(b)?(c=[],g&&(c=h,g=h[h.length-1],(h=(h=this.get("highlightedItem"))&&h.get("content"))&&-1"+b+""}))):a.set("visible",!1):(a.get("el").html(c),a.set("visible",!0))})},reset:function(){var b=this.get("view");this.set("filterStr", "");this.set("enteredItems",[]);(b=b&&b.get("filterInput"))&&b.val("")},destructor:function(){var b=this.get("view");(b=b&&b.get("filterInput"))&&b.detach()}},{ATTRS:{allowTextSelection:{value:!0},label:{view:1},filterStr:{},enteredItems:{value:[]},allowMultiple:{value:!1},decorateChildCls:{valueFn:function(){return this.get("prefixCls")+"menu-content"}},xrender:{value:g}}},{xclass:"filter-menu",priority:20});return d},{requires:["component/base","./base","./filtermenu-render"]}); KISSY.add("menu/menu-render",function(e,c){return c.Render.extend({renderUI:function(){var a=this.get("el");a.attr("role","menu").attr("aria-haspopup",!0);a.attr("id")||a.attr("id",e.guid("ks-menu"))},_onSetActiveItem:function(a){var c=this.get("el");a?(a=a.get("el").attr("id"),c.attr("aria-activedescendant",a)):c.attr("aria-activedescendant","")},containsElement:function(a){var c=this.get("el");return c[0]===a||c.contains(a)}},{ATTRS:{activeItem:{}}})},{requires:["component/base"]}); KISSY.add("menu",function(e,c,a,g,d,b,f,i,j,l){c.Render=a;c.Item=g;g.Render=d;c.SubMenu=b;b.Render=f;c.PopupMenu=i;i.Render=j;c.FilterMenu=l;return c},{requires:"menu/base,menu/menu-render,menu/menuitem,menu/menuitem-render,menu/submenu,menu/submenu-render,menu/popupmenu,menu/popupmenu-render,menu/filtermenu".split(",")}); KISSY.add("menu/menuitem-render",function(e,c,a,g){return a.Render.extend({_onSetChecked:function(a){var b=this.get("el"),c=this.getCssClassWithState("-checked");b[a?"addClass":"removeClass"](c)},_onSetSelected:function(a){var b=this.get("el"),c=this.getCssClassWithState("-selected");b[a?"addClass":"removeClass"](c)},_onSetSelectable:function(a){this.get("el").attr("role",a?"menuitemradio":"menuitem")},_onSetCheckable:function(a){if(a){var b=this.get("el"),f=this.get("prefixCls"),e=b.one("."+f+"menuitem-checkbox"); e||(e=(new c("
")).prependTo(b),e.unselectable(g))}this.get("el").attr("role",a?"menuitemcheckbox":"menuitem")},containsElement:function(a){var b=this.get("el");return b&&(b[0]==a||b.contains(a))}},{ATTRS:{checkable:{},elAttrs:{valueFn:function(){return{role:"menuitem",id:e.guid("ks-menuitem")}}},selected:{},checked:{}},HTML_PARSER:{selectable:function(a){var b=this.getCssClassWithPrefix("menuitem-selectable");return a.hasClass(b)},checkable:function(a){var b=this.getCssClassWithPrefix("menuitem-checkable"); return a.hasClass(b)}}})},{requires:["node","component/base"]}); KISSY.add("menu/menuitem",function(e,c,a){var g=e.all,d=c.Controller.extend({handleMouseEnter:function(b){if(d.superclass.handleMouseEnter.call(this,b))return!0;this.get("parent").set("highlightedItem",this)},handleMouseLeave:function(b){if(d.superclass.handleMouseLeave.call(this,b))return!0;this.get("parent").set("highlightedItem",null)},handleMouseDown:function(b){if(d.superclass.handleMouseDown.call(this,b))return!0;this.get("parent").set("highlightedItem",this)},performActionInternal:function(){this.get("selectable")&& this.set("selected",!0);this.get("checkable")&&this.set("checked",!this.get("checked"));this.fire("click");return!0},_onSetHighlighted:function(b){if(b){var b=this.get("el"),a=b.parent(function(b){return"visible"!=g(b).css("overflow")},this.get("parent").get("el").parent());a&&b.scrollIntoView(a,{alignWithTop:!0,allowHorizontalScroll:!0,onlyScrollIfNeeded:!0})}},containsElement:function(b){return this.get("view")&&this.get("view").containsElement(b)}},{ATTRS:{focusable:{value:!1},handleMouseEvents:{value:!1}, selectable:{view:1},checkable:{view:1},value:{},checked:{view:1},selected:{view:1},xrender:{value:a}}},{xclass:"menuitem",priority:10});return d},{requires:["component/base","./menuitem-render"]});KISSY.add("menu/popupmenu-render",function(e,c,a){return a.extend([c.ContentBox.Render,c.Position.Render,6===e.UA.ie?c.Shim.Render:null])},{requires:["component/extension","./menu-render"]}); KISSY.add("menu/popupmenu",function(e,c,a,g){var d=a.extend([c.ContentBox,c.Position,c.Align],{handleMouseLeave:function(){this.get("autoHideOnMouseLeave")&&this.get("parent").hideParentMenusBuffer()},handleBlur:function(){d.superclass.handleBlur.apply(this,arguments);this.hide()}},{ATTRS:{focusable:{value:!1},autoHideOnMouseLeave:{},xrender:{value:g}}},{xclass:"popupmenu",priority:20});return d},{requires:["component/extension","./base","./popupmenu-render"]}); KISSY.add("menu/submenu-render",function(e,c){return c.extend({createDom:function(){this.get("el").attr("aria-haspopup","true").append(e.substitute('\u25ba',{prefixCls:this.get("prefixCls")}))}},{ATTRS:{arrowEl:{},contentEl:{valueFn:function(){return e.all(e.substitute('',{prefixCls:this.get("prefixCls")}))}}},HTML_PARSER:{contentEl:function(a){return a.children("."+this.get("prefixCls")+"menuitem-content")}}})}, {requires:["./menuitem-render"]}); KISSY.add("menu/submenu",function(e,c,a,g,d){function b(b,c){var d=b.get("menu");if(d&&!d.isController)if(c)d=a.create(d,b),b.setInternal("menu",d);else return null;return d}function f(a){var c=b(this),a=a.target,d=this.get("parent");this.get("el");d.containsElement(a)||(c&&c.hide(),this.get("parent").set("highlightedItem",null))}function i(){var a=b(this,1);if(a){this.bindSubMenu();var c=e.clone(a.get("align"));c.node=this.get("el");c.points=c.points||["tr","tl"];a.set("align",c);a.show();this.get("el").attr("aria-haspopup", a.get("el").attr("id"))}}function j(){var a=b(this);a&&a.hide()}function l(a){a.newVal&&(this.clearSubMenuTimers(),this.get("parent").set("highlightedItem",this));a.stopPropagation()}function h(a){var c=b(this);c&&c.hide();a.stopPropagation()}var k=c.KeyCodes,n=e.Env.host.document,m=g.extend([a.DecorateChild],{bindSubMenu:function(){var a=this,b=a.get("menu"),d=a.get("parent");d&&(d.on("hide",h,a),d.__bindDocClickToHide||(c.on(n,"click",f,a),d.__bindDocClickToHide=1,b.__bindDocClickToHide=1),b.on("afterActiveItemChange", function(a){d.set("activeItem",a.newVal);a.stopPropagation()}),b.on("afterHighlightedItemChange",function(b){b.newVal&&a.set("highlighted",true);b.stopPropagation()}),a.bindSubMenu=e.noop);b.on("beforeHighlightedItemChange",l,a)},handleMouseEnter:function(a){if(m.superclass.handleMouseEnter.call(this,a))return!0;this.clearSubMenuTimers();this.showTimer_=e.later(i,1E3*this.get("menuDelay"),!1,this)},_onSetHighlighted:function(a){a||(this.dismissTimer_=e.later(j,1E3*this.get("menuDelay"),!1,this))}, clearSubMenuTimers:function(){var a;if(a=this.dismissTimer_)a.cancel(),this.dismissTimer_=null;if(a=this.showTimer_)a.cancel(),this.showTimer_=null},performActionInternal:function(){this.clearSubMenuTimers();i.call(this);m.superclass.performActionInternal.apply(this,arguments)},handleKeydown:function(a){var d=b(this),f=d&&d.get("visible"),e=a.keyCode;if(f){if(!d.handleKeydown(a))if(e==k.LEFT)j.call(this),this.get("parent").set("activeItem",this);else return}else if(e==k.RIGHT){if(i.call(this),d=b(this))a= d.get("children"),a[0]&&d.set("highlightedItem",a[0])}else{if(a.keyCode==c.KeyCodes.ENTER)return this.performActionInternal(a);return}return!0},hideParentMenusBuffer:function(){var a=this,b=a.get("parent");a.dismissTimer_=e.later(function(){for(var c=a,d=a.get("menu");d.get("autoHideOnMouseLeave");){c.set("highlighted",!1);if(b.get("highlightedItem")!=c)break;c=b.get("parent");if(!c)break;b=c.get("parent");d=c.get("menu")}},1E3*a.get("menuDelay"),!1,a)},containsElement:function(a){var c=b(this);return c&& c.containsElement(a)},decorateChildrenInternal:function(a,b){b.css("visibility","hidden");e.one(b[0].ownerDocument.body).prepend(b);this.setInternal("menu",new a({srcNode:b,prefixCls:this.get("prefixCls")}))},destructor:function(){var a=this.get("parent"),d=b(this);this.clearSubMenuTimers();d&&d.__bindDocClickToHide&&(d.__bindDocClickToHide=0,c.remove(n,"click",f,this));a&&a.detach("hide",h,this);d&&d.destroy&&d.destroy()}},{ATTRS:{menuDelay:{value:0.15},menu:{setter:function(b){b instanceof a.Controller&& b.setInternal("parent",this)}},defaultChildXClass:{value:"popupmenu"},decorateChildCls:{valueFn:function(){return this.get("prefixCls")+"popupmenu"}},xrender:{value:d}}},{xclass:"submenu",priority:20});return m},{requires:["event","component/base","./menuitem","./submenu-render"]});/* Copyright 2013, KISSY UI Library v1.30 MIT Licensed build time: May 28 17:30 */ KISSY.add("component/extension/align",function(e,c,n){function h(a){var d=a.ownerDocument.body,g=c.css(a,"position");if(!("fixed"==g||"absolute"==g))return"html"==a.nodeName.toLowerCase()?null:a.parentNode;for(a=a.parentNode;a&&a!=d;a=a.parentNode)if(g=c.css(a,"position"),"static"!=g)return a;return null}function o(a){var d,g,b={left:0,right:Infinity,top:0,bottom:Infinity},k;g=a.ownerDocument;d=g.body;for(g=g.documentElement;a=h(a);)if((!t.ie||0!=a.clientWidth)&&a!=d&&a!=g&&"visible"!=c.css(a,"overflow"))k= c.offset(a),k.left+=a.clientLeft,k.top+=a.clientTop,b.top=Math.max(b.top,k.top),b.right=Math.min(b.right,k.left+a.clientWidth),b.bottom=Math.min(b.bottom,k.top+a.clientHeight),b.left=Math.max(b.left,k.left);a=c.scrollLeft();k=c.scrollTop();b.left=Math.max(b.left,a);b.top=Math.max(b.top,k);d=c.viewportWidth();g=c.viewportHeight();b.right=Math.min(b.right,a+d);b.bottom=Math.min(b.bottom,k+g);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}function q(a,d,g,b){var c,j;c=a.left;j=a.top; d=r(d,g[0]);a=r(a,g[1]);a=[a.left-d.left,a.top-d.top];return{left:c-a[0]+ +b[0],top:j-a[1]+ +b[1]}}function m(a,d,g){var b=[];e.each(a,function(a){b.push(a.replace(d,function(a){return g[a]}))});return b}function p(){}function s(a){var d,g;e.isWindow(a[0])?(d={left:c.scrollLeft(),top:c.scrollTop()},g=c.viewportWidth(),a=c.viewportHeight()):(d=a.offset(),g=a.outerWidth(),a=a.outerHeight());d.width=g;d.height=a;return d}function r(a,d){var g=d.charAt(0),b=d.charAt(1),c=a.width,e=a.height,f,i;f=a.left; i=a.top;"c"===g?i+=e/2:"b"===g&&(i+=e);"c"===b?f+=c/2:"r"===b&&(f+=c);return{left:f,top:i}}var u=e.Env.host,t=e.UA;p.__getOffsetParent=h;p.__getVisibleRectForElement=o;p.ATTRS={align:{value:{}}};p.prototype={_onSetAlign:function(a){a&&a.points&&this.align(a.node,a.points,a.offset,a.overflow)},align:function(a,d,c,b){var a=n.one(a||u),c=c&&[].concat(c)||[0,0],b=b||{},k=this.get("el"),j=0,f=o(k[0]),i=s(k),h=s(a),a=q(i,h,d,c),l=e.merge(i,a);if(f&&(b.adjustX||b.adjustY)){if(a.left f.right)j=1,d=m(d,/[lr]/ig,{l:"r",r:"l"}),c[0]=-c[0];if(a.topf.bottom)j=1,d=m(d,/[tb]/ig,{t:"b",b:"t"}),c[1]=-c[1];j&&(a=q(i,h,d,c),e.mix(l,a));d={};d.adjustX=b.adjustX&&(a.leftf.right);d.adjustY=b.adjustY&&(a.topf.bottom);if(d.adjustX||d.adjustY)b=e.clone(a),j={width:i.width,height:i.height},d.adjustX&&b.left=f.left&&b.left+j.width>f.right&&(j.width-=b.left+j.width-f.right),d.adjustX&& b.left+j.width>f.right&&(b.left=Math.max(f.right-j.width,f.left)),d.adjustY&&b.top=f.top&&b.top+j.height>f.bottom&&(j.height-=b.top+j.height-f.bottom),d.adjustY&&b.top+j.height>f.bottom&&(b.top=Math.max(f.bottom-j.height,f.top)),l=e.mix(b,j)}l.left!=i.left&&(this.setInternal("x",null),this.get("view").setInternal("x",null),this.set("x",l.left));l.top!=i.top&&(this.setInternal("y",null),this.get("view").setInternal("y",null),this.set("y",l.top));l.width!= i.width&&k.width(k.width()+l.width-i.width);l.height!=i.height&&k.height(k.height()+l.height-i.height);return this},center:function(a){this.set("align",{node:a,points:["cc","cc"],offset:[0,0]});return this}};return p},{requires:["dom","node"]}); KISSY.add("component/extension/content-box-render",function(e,c,n){function h(){}h.ATTRS={contentEl:{}};h.prototype={__createDom:function(){var e,h=this.get("el");e=h[0].childNodes;var m=e.length&&n._nodeListToFragment(e);e=c.all("
");m&&e.append(m);h.append(e);this.setInternal("contentEl",e)}};return h},{requires:["node","dom"]});KISSY.add("component/extension/content-box",function(){function e(){}e.ATTRS={contentEl:{view:1}};return e}); KISSY.add("component/extension",function(e,c,n,h,o,q,m){o.Render=q;n.Render=h;return{Align:c,ContentBox:n,Position:o,Shim:{Render:m}}},{requires:"./extension/align,./extension/content-box,./extension/content-box-render,./extension/position,./extension/position-render,./extension/shim-render".split(",")}); KISSY.add("component/extension/position-render",function(){function e(){}e.ATTRS={x:{},y:{},zIndex:{},visibleMode:{value:"visibility"}};e.prototype={__createDom:function(){this.get("el").addClass(this.get("prefixCls")+"ext-position")},_onSetZIndex:function(c){this.get("el").css("z-index",c)},_onSetX:function(c){null!=c&&this.get("el").offset({left:c})},_onSetY:function(c){null!=c&&this.get("el").offset({top:c})}};return e}); KISSY.add("component/extension/position",function(e){function c(){}c.ATTRS={x:{view:1},y:{view:1},xy:{setter:function(c){var h=e.makeArray(c);h.length&&(h[0]&&this.set("x",h[0]),h[1]&&this.set("y",h[1]));return c},getter:function(){return[this.get("x"),this.get("y")]}},zIndex:{view:1},visible:{value:!1}};c.prototype={move:function(c,h){e.isArray(c)&&(h=c[1],c=c[0]);this.set("xy",[c,h]);return this}};return c}); KISSY.add("component/extension/shim-render",function(){function e(){}e.prototype={__createDom:function(){this.get("el").prepend("