/*
Copyright 2014, KISSY v1.43
MIT Licensed
build time: May 22 12:16
*/
KISSY.add("combobox/combobox-xtpl",[],function(){return function(f){var a,d=this;a=this.config.utils;var j=a.runBlockCommand,k=a.renderOutput,g=a.getProperty,h=a.runInlineCommand,e=a.getPropertyOrRunCommand;a='
\n\n';var b={},c=[],m=g(d,f,"hasTrigger",0,6);c.push(m);b.params=c;b.fn=function(b){var a;a='\n\n'};a+=j(d,f,b,"if",6);a+='\n\n\n\n \n\n\n \n
\n"}});
KISSY.add("combobox/render",["component/control","./combobox-xtpl"],function(f,a){var d=a("component/control"),j=a("./combobox-xtpl");return d.getDefaultRender().extend({beforeCreateDom:function(a,d){f.mix(d,{input:"#ks-combobox-input-{id}",trigger:"#ks-combobox-trigger-{id}",invalidEl:"#ks-combobox-invalid-el-{id}",placeholderEl:"#ks-combobox-placeholder-{id}"})},getKeyEventTarget:function(){return this.control.get("input")},_onSetCollapsed:function(a){this.control.get("input").attr("aria-expanded",
!a)},_onSetDisabled:function(a,d){this.callSuper(a,d);this.control.get("input").attr("disabled",a)}},{ATTRS:{contentTpl:{value:j}},HTML_PARSER:{value:function(a){return a.one("."+this.getBaseCssClass("input")).val()},input:function(a){return a.one("."+this.getBaseCssClass("input"))},trigger:function(a){return a.one("."+this.getBaseCssClass("trigger"))},invalidEl:function(a){return a.one("."+this.getBaseCssClass("invalid-el"))},placeholderEl:function(a){return a.one("."+this.getBaseCssClass("placeholder"))}}})});
KISSY.add("combobox/control",["node","component/control","./render","menu"],function(f,a){function d(a){for(var b=0;b',g,h="paddingLeft,paddingTop,paddingBottom,paddingRight,marginLeft,marginTop,marginBottom,marginRight,borderLeftStyle,borderTopStyle,borderBottomStyle,borderRightStyle,borderLeftWidth,borderTopWidth,borderBottomWidth,borderRightWidth,line-height,outline,height,fontFamily,fontSize,fontWeight,fontVariant,fontStyle".split(",");
return function(a){var b=j(a),a=b[0],c=a.ownerDocument,g=j(c),h=a.scrollTop,i=a.scrollLeft;if(c.selection)return a=c.selection.createRange(),{left:a.boundingLeft+i+g.scrollLeft(),top:a.boundingTop+h+a.boundingHeight+g.scrollTop()};g=b.offset();if("textarea"!==a.type)return g.top+=a.offsetHeight,g;c=d(b);b=a.selectionStart;c.html(f.escapeHtml(a.value.substring(0,b-1))+"x");c.offset(g);g=c.last();a=g.offset();a.top+=g.height();0'}});
KISSY.add("component/control/render",["node","xtemplate/runtime","./process","./render-xtpl","component/manager"],function(e,b){function g(k){"number"===typeof k&&(k+="px");return k}function n(k){k||(k=[""]);"string"===typeof k&&(k=k.split(/\s+/));return k}function m(k,a,b){for(var d="",f=0,c=b.length,a=k+a;ft.ieMode&&(e.hideFocus="true"),e.tabindex=h?"-1":"0")},createDom:function(){this.beforeCreateDom(this.renderData={},this.childrenElSelectors=
{},this.renderCommands={getBaseCssClasses:c,getBaseCssClass:i});var b=this.control,p;p=this.renderTpl(a)+this.renderTpl(this.get("contentTpl"))+"";b.setInternal("el",this.$el=s(p));this.el=this.$el[0];this.fillChildrenElsBySelectors()},decorateDom:function(a){var b=this.control;a.attr("id")||a.attr("id",b.get("id"));var d=this.constructor.HTML_PARSER,c,f;for(c in d)f=d[c],"function"===typeof f?(f=f.call(this,a),void 0!==f&&b.setInternal(c,f)):"string"===typeof f?b.setInternal(c,a.one(f)):e.isArray(f)&&
f[0]&&b.setInternal(c,a.all(f[0]));b.setInternal("el",this.$el=a);this.el=a[0]},renderUI:function(){var a=this.control,b=this.$el;if(!a.get("srcNode")){var d=a.get("render");(a=a.get("elBefore"))?b.insertBefore(a,void 0):d?b.appendTo(d,void 0):b.appendTo(u.body,void 0)}},bindUI:function(){var a=this.control,b=a.getAttrs(),d,c;for(d in b){c=b[d];var f=e.ucfirst(d),g=this[q+f];if(c.view&&g)a.on("after"+f+"Change",h,this)}},destructor:function(){this.$el&&this.$el.remove()},$:function(a){return this.$el.all(a)},
fillChildrenElsBySelectors:function(a){var b=this.$el,d=this.control,c,f,a=a||this.childrenElSelectors;for(c in a)f=a[c],"function"===typeof f?d.setInternal(c,f(b)):d.setInternal(c,this.$(e.substitute(f,this.renderData))),delete a[c]},renderTpl:function(a,b,d){b=b||this.renderData;d=d||this.renderCommands;return(new (this.get("xtemplate"))(a,{control:this.control,view:this,commands:d})).render(b)},getComponentConstructorByNode:function(a,b){var c=b[0].className;return c?(c=c.replace(RegExp("\\b"+
a,"ig"),""),d.getConstructorByXClass(c)):null},getComponentCssClasses:function(){if(this.componentCssClasses)return this.componentCssClasses;for(var a=this.control.constructor,b,d=[];a&&!a.prototype.hasOwnProperty("isControl");)(b=a.xclass)&&d.push(b),a=a.superclass&&a.superclass.constructor;return this.componentCssClasses=d},getBaseCssClasses:function(a){for(var a=n(a),b=this.getComponentCssClasses(),d=0,c=this.get("control"),f="",e=b.length,c=c.get("prefixCls");di)a.on("dblclick",this.handleDblClick,this)}},sync:function(){this.fire("beforeSyncUI");this.syncUI();this.view.sync();this.__callPluginsMethod("pluginSyncUI");this.fire("afterSyncUI")},createComponent:function(a,b){return h.createComponent(a,b||this)},_onSetFocused:function(a){var b=
this.view.getKeyEventTarget()[0];a?b.focus():b.ownerDocument.activeElement===b&&b.ownerDocument.body.focus()},_onSetX:function(a){this.$el.offset({left:a})},_onSetY:function(a){this.$el.offset({top:a})},_onSetVisible:function(a){this.fire(a?"show":"hide")},show:function(){this.render();this.set("visible",!0);return this},hide:function(){this.set("visible",!1);return this},focus:function(){this.get("focusable")&&this.set("focused",!0)},blur:function(){this.get("focusable")&&this.set("focused",!1)},
move:function(a,b){this.set({x:a,y:b})},handleDblClick:function(a){this.get("disabled")||this.handleDblClickInternal(a)},handleDblClickInternal:function(a){this.handleClickInternal(a)},handleMouseEnter:function(a){this.get("disabled")||this.handleMouseEnterInternal(a)},handleMouseEnterInternal:function(a){this.set("highlighted",!!a)},handleMouseLeave:function(a){this.get("disabled")||this.handleMouseLeaveInternal(a)},handleMouseLeaveInternal:function(a){this.set("active",!1);this.set("highlighted",
!a)},handleMouseDown:function(a){this.get("disabled")||this.handleMouseDownInternal(a)},handleMouseDownInternal:function(a){var b;if(1===a.which||o)this.get("activeable")&&this.set("active",!0),this.get("focusable")&&this.focus(),!this.get("allowTextSelection")&&-1!==a.type.indexOf("mouse")&&(b=(b=a.target.nodeName)&&b.toLowerCase(),"input"!==b&&"textarea"!==b&&"button"!==b&&a.preventDefault())},handleMouseUp:function(a){this.get("disabled")||this.handleMouseUpInternal(a)},handleMouseUpInternal:function(a){this.get("active")&&
(1===a.which||o)&&this.set("active",!1)},handleContextMenu:function(a){this.get("disabled")||this.handleContextMenuInternal(a)},handleContextMenuInternal:function(){},handleFocus:function(){this.get("disabled")||this.handleFocusInternal()},handleFocusInternal:function(){this.focus();this.fire("focus")},handleBlur:function(){this.get("disabled")||this.handleBlurInternal()},handleBlurInternal:function(){this.blur();this.fire("blur")},handleKeydown:function(a){if(!this.get("disabled")&&this.handleKeyDownInternal(a))return a.halt(),
!0},handleKeyDownInternal:function(a){if(a.keyCode===n.KeyCode.ENTER)return this.handleClickInternal(a)},handleClick:function(a){this.get("disabled")||this.handleClickInternal(a)},handleClickInternal:function(){this.get("focusable")&&this.focus()},destructor:function(){h.removeComponent(this.get("id"));this.view?this.view.destroy():this.get("srcNode")&&this.get("srcNode").remove()}},{name:"control",ATTRS:{id:{view:1,valueFn:function(){return e.guid("ks-component")}},content:{view:1,value:""},width:{view:1},
height:{view:1},elCls:{view:1,value:[],setter:function(a){"string"===typeof a&&(a=a.split(/\s+/));return a||[]}},elStyle:{view:1,value:{}},elAttrs:{view:1,value:{}},elBefore:{},el:{setter:function(a){this.$el=a;this.el=a[0]}},x:{},y:{},xy:{setter:function(a){var b=e.makeArray(a);b.length&&(void 0!==b[0]&&this.set("x",b[0]),void 0!==b[1]&&this.set("y",b[1]));return a},getter:function(){return[this.get("x"),this.get("y")]}},zIndex:{view:1},render:{},visible:{sync:0,value:!0,view:1},srcNode:{setter:function(a){return n.all(a)}},
handleMouseEvents:{value:!0},focusable:{value:!0,view:1},allowTextSelection:{value:!1},activeable:{value:!0},focused:{view:1},active:{view:1,value:!1},highlighted:{view:1,value:!1},prefixCls:{view:1,value:e.config("component/prefixCls")||"ks-"},prefixXClass:{},parent:{setter:function(a,b){(b=this.get("parent"))&&this.removeTarget(b);a&&this.addTarget(a)}},disabled:{view:1,value:!1},xrender:{value:c},view:{setter:function(a){this.view=a}}}});c.getDefaultRender=g;c.extend=function d(b,c,j){var i=e.makeArray(arguments),
l,k=i[i.length-1];if(l=k.xclass)k.name=l;i=m.extend.apply(this,i);l&&h.setConstructorByXClass(l,i);i.extend=d;i.getDefaultRender=g;return i};return c});
/*
Copyright 2014, KISSY v1.43
MIT Licensed
build time: May 22 12:17
*/
KISSY.add("component/manager",[],function(){var h=0,e,g={},c={};return e={__instances:c,addComponent:function(a,b){c[a]=b},removeComponent:function(a){delete c[a]},getComponent:function(a){return c[a]},createComponent:function(a,b){var d;if(a){if(!a.isControl&&b&&(a.prefixCls||(a.prefixCls=b.get("prefixCls")),!a.xclass&&a.prefixXClass))a.xclass=a.prefixXClass,a.xtype&&(a.xclass+="-"+a.xtype);if(!a.isControl&&(d=a.xclass))d=e.getConstructorByXClass(d),a=new d(a);a.isControl&&b&&a.setInternal("parent",
b)}return a},getConstructorByXClass:function(a){var a=a.split(/\s+/),b=-1,d,c,f,e=null;for(c=0;cb)b=d,e=f.constructor;return e},setConstructorByXClass:function(a,b){g[a]={constructor:b,priority:h++}}}});
/*
Copyright 2014, KISSY v1.43
MIT Licensed
build time: May 22 12:31
*/
KISSY.add("xtemplate/runtime/scope",[],function(g){function l(e,f){this.data=e||{};this.affix=f;this.root=this}l.prototype={isScope:1,setParent:function(e){this.parent=e;this.root=e.root},getParent:function(){return this.parent},getRoot:function(){return this.root},set:function(e,f){this.affix||(this.affix={});this.affix[e]=f},setData:function(e){this.data=e},getData:function(){return this.data},mix:function(e){this.affix||(this.affix={});g.mix(this.affix,e)},has:function(e){var f=this.data,i=this.affix;
return i&&e in i?!0:"object"===typeof f&&e in f},get:function(e){var f=this.data,i=this.affix;if(i&&e in i)return i[e];if("object"===typeof f&&e in f)return f[e]},resolve:function(e,f){"."===e&&(e="this");var i=e.split("."),d=this,b,c,a,g,k;if("root"===i[0])i.shift(),d=d.root;else if(f)for(;d&&f--;)d=d.parent;var h=0;for(b=i.length;d;){k=1;a=d;for(c=0;c\n\n';f={};k=[];k.push("component/extension/content-xtpl");f.params=k;g&&(a("component/extension/content-xtpl"),f.params[0]=g.resolveByName(f.params[0]));b=j(this,
b,f,"include",3);return d+=e(b,!1)}});KISSY.add("menu/check-menuitem-render",["./menuitem-render","component/extension/content-render","./check-menuitem-xtpl"],function(e,a){var b=a("./menuitem-render"),c=a("component/extension/content-render"),h=a("./check-menuitem-xtpl");return b.extend([c],{beforeCreateDom:function(a){a.checked&&a.elCls.push(this.getBaseCssClasses("checked"))},_onSetChecked:function(a){var b=this.getBaseCssClasses("checked");this.$el[a?"addClass":"removeClass"](b)}},{ATTRS:{contentTpl:{value:h}}})});
KISSY.add("menu/check-menuitem",["./menuitem","./check-menuitem-render"],function(e,a){var b=a("./menuitem"),c=a("./check-menuitem-render");return b.extend({handleClickInternal:function(){this.callSuper();this.set("checked",!this.get("checked"));this.fire("click");return!0}},{ATTRS:{checked:{view:1},xrender:{value:c}},xclass:"check-menuitem"})});
KISSY.add("menu/submenu-xtpl",[],function(){return function(e){var a;a=this.config.utils;var b=a.renderOutput,c=a.runInlineCommand,h=a.getPropertyOrRunCommand;a='';c=h(this,e,{},"content",0,2);a+=b(c,!1);a+='
\n\u25ba'}});
KISSY.add("menu/submenu-render",["./submenu-xtpl","./menuitem-render","component/extension/content-render"],function(e,a){var b=a("./submenu-xtpl"),c=a("./menuitem-render"),h=a("component/extension/content-render");return c.extend([h],{decorateDom:function(a){var b=this.control,c=b.get("prefixCls"),a=a.one("."+c+"popupmenu"),e=a[0].ownerDocument.body;e.insertBefore(a[0],e.firstChild);e=this.getComponentConstructorByNode(c,a);b.setInternal("menu",new e({srcNode:a,prefixCls:c}))}},{ATTRS:{contentTpl:{value:b}}})});
KISSY.add("menu/submenu",["node","./menuitem","./submenu-render"],function(e,a){function b(a){var b=a.target;b!==this&&b.isMenuItem&&a.newVal&&(this.clearHidePopupMenuTimers(),this.get("highlighted")||(this.set("highlighted",!0),b.set("highlighted",!1),b.set("highlighted",!0)))}function c(){var a=this.get("menu"),b={node:this.$el,points:["tr","tl"],overflow:{adjustX:1,adjustY:1}};e.mix(a.get("align"),b,!1);a.show();this.el.setAttribute("aria-haspopup",a.get("el").attr("id"))}function h(){this.get("menu").hide()}
var d=a("node"),g=a("./menuitem"),i=a("./submenu-render"),j=d.KeyCode;return g.extend({isSubMenu:1,clearShowPopupMenuTimers:function(){var a;if(a=this._showTimer)a.cancel(),this._showTimer=null},clearHidePopupMenuTimers:function(){var a;if(a=this._dismissTimer)a.cancel(),this._dismissTimer=null},clearSubMenuTimers:function(){this.clearHidePopupMenuTimers();this.clearShowPopupMenuTimers()},bindUI:function(){this.on("afterHighlightedChange",b,this)},handleMouseLeaveInternal:function(){this.set("highlighted",
!1,{data:{fromMouse:1}});this.clearSubMenuTimers();this.get("menu").get("visible")&&(this._dismissTimer=e.later(h,1E3*this.get("menuDelay"),!1,this))},handleMouseEnterInternal:function(){this.set("highlighted",!0,{data:{fromMouse:1}});this.clearSubMenuTimers();this.get("menu").get("visible")||(this._showTimer=e.later(c,1E3*this.get("menuDelay"),!1,this))},_onSetHighlighted:function(a,b){b&&(this.callSuper(b),b.fromMouse||(a&&!b.fromKeyboard?c.call(this):a||h.call(this)))},handleClickInternal:function(){c.call(this);
this.callSuper()},handleKeyDownInternal:function(a){var b=this.get("menu"),d,e=b.get("visible"),g=a.keyCode;if(e){if(!b.handleKeyDownInternal(a))if(g===j.LEFT)this.set("highlighted",!1),this.set("highlighted",!0,{data:{fromKeyboard:1}});else return}else if(g===j.RIGHT)c.call(this),a=b.get("children"),(d=a[0])&&d.set("highlighted",!0,{data:{fromKeyboard:1}});else{if(g===j.ENTER)return this.handleClickInternal(a);return}return!0},containsElement:function(a){return this.get("menu").containsElement(a)},
destructor:function(){var a=this.get("menu");this.clearSubMenuTimers();a.destroy()}},{ATTRS:{menuDelay:{value:0.15},menu:{value:{},getter:function(a){a.isControl||(a.xclass=a.xclass||"popupmenu",a=this.createComponent(a),this.setInternal("menu",a));return a},setter:function(a){a.isControl&&a.setInternal("parent",this)}},xrender:{value:i}},xclass:"submenu"})});
KISSY.add("menu/popupmenu-render",["component/extension/content-render","./menu-render"],function(e,a){var b=a("component/extension/content-render");return a("./menu-render").extend([b])});
KISSY.add("menu/popupmenu",["component/extension/align","component/extension/shim","./control","./popupmenu-render"],function(e,a){var b=a("component/extension/align"),c=a("component/extension/shim"),h=a("./control"),d=a("./popupmenu-render");return h.extend([c,b],{getRootMenu:function(){var a=this,b;do b=a,a=a.get("parent");while(a&&(a.isMenuItem||a.isMenu));return b===this?null:b},handleMouseLeaveInternal:function(a){this.callSuper(a);if(this.get("autoHideOnMouseLeave")){var b=this.getRootMenu();
b&&(clearTimeout(b._popupAutoHideTimer),b._popupAutoHideTimer=setTimeout(function(){var a;(a=b.get("highlightedItem"))&&a.set("highlighted",!1)},1E3*this.get("parent").get("menuDelay")))}},isPopupMenu:1,handleBlurInternal:function(a){this.callSuper(a);this.hide()}},{ATTRS:{focusable:{value:!1},autoHideOnMouseLeave:{},contentEl:{},visible:{value:!1},xrender:{value:d}},xclass:"popupmenu"})});
KISSY.add("menu",["menu/control","menu/menuitem","menu/check-menuitem","menu/submenu","menu/popupmenu"],function(e,a){var b=a("menu/control"),c=a("menu/menuitem"),h=a("menu/check-menuitem"),d=a("menu/submenu"),g=a("menu/popupmenu");b.Item=c;b.CheckItem=h;b.SubMenu=d;b.PopupMenu=g;return b});
/*
Copyright 2014, KISSY v1.43
MIT Licensed
build time: May 22 12:16
*/
KISSY.add("component/container/render",["component/control","component/manager"],function(g,d){var f=d("component/control"),i=d("component/manager");return f.getDefaultRender().extend([],{decorateDom:function(){var d=this,f=d.getChildrenContainerEl(),a=d.control,b=a.get("defaultChildCfg"),c=b.prefixCls,e=b.xclass,h=[];f.children().each(function(a){var f=d.getComponentConstructorByNode(c,a)||e&&i.getConstructorByXClass(e);f&&h.push(new f(g.merge(b,{srcNode:a})))});a.set("children",h)},getChildrenContainerEl:function(){return this.$el}},
{name:"ContainerRender"})});
KISSY.add("component/container",["component/control","./container/render"],function(g,d){function f(a){if(a.target===this){var b=a.component,c=this.get("children"),a=a.index;c.splice(a,0,b);c=this.get("children");b=c[a];b.setInternal("parent",this);this.get("rendered")&&this.renderChild(a);this.fire("afterAddChild",{component:b,index:a})}}function i(a){if(a.target===this){var b=a.component,c,e,h=a.destroy,d=this.get("children"),a=a.index;-1!==a&&d.splice(a,1);b.setInternal("parent",null);if(h)b.destroy&&
b.destroy();else if(b.get&&(e=b.el))(c=e.parentNode)&&c.removeChild(e);this.fire("afterRemoveChild",{component:b,index:a})}}var j=d("component/control"),k=d("./container/render");return j.extend({isContainer:!0,initializer:function(){var a=this.get("prefixCls"),b=this.get("defaultChildCfg");this.publish("beforeAddChild",{defaultFn:f});this.publish("beforeRemoveChild",{defaultFn:i});b.prefixCls=b.prefixCls||a},createDom:function(){this.createChildren()},renderUI:function(){this.renderChildren()},renderChildren:function(){var a,
b=this.get("children");for(a=0;a
g?"dblclick ":"");this.$el.delegate(a,"."+this.__childClsTag,this.handleChildrenEvents,this)},getOwnerControl:function(a){return k.getComponent(a.currentTarget.id)}});return f});
/*
Copyright 2014, KISSY v1.43
MIT Licensed
build time: May 22 12:16
*/
KISSY.add("component/extension/content-render",["component/extension/content-xtpl"],function(e,g){function f(a){var b=a.control,c=b.get("contentEl");a.$contentEl=b.$contentEl=c;a.contentEl=b.contentEl=c[0]}function d(){}var h=g("component/extension/content-xtpl");d.prototype={__beforeCreateDom:function(a,b){e.mix(b,{contentEl:"#ks-content-{id}"})},__createDom:function(){f(this)},__decorateDom:function(){f(this)},getChildrenContainerEl:function(){return this.control.get("contentEl")},_onSetContent:function(a){var b=
this.control,c=b.$contentEl;c.html(a);b.get("allowTextSelection")||c.unselectable()}};e.mix(d,{ATTRS:{contentTpl:{value:h}},HTML_PARSER:{content:function(a){return a.one("."+this.getBaseCssClass("content")).html()},contentEl:function(a){return a.one("."+this.getBaseCssClass("content"))}}});return d});
/*
Copyright 2014, KISSY v1.43
MIT Licensed
build time: May 22 12:16
*/
KISSY.add("component/extension/content-xtpl",[],function(){return function(b){var a;a=this.config.utils;var d=a.renderOutput,e=a.runInlineCommand,f=a.getPropertyOrRunCommand;a='';b=f(this,b,{},"content",0,2);a+=d(b,!1);return a+"
"}});
/*
Copyright 2014, KISSY v1.43
MIT Licensed
build time: May 22 12:16
*/
KISSY.add("component/extension/align",["node"],function(k,u){function m(a){var c=a.ownerDocument.body,d=j(a).css("position");if(!("fixed"===d||"absolute"===d))return"html"===a.nodeName.toLowerCase()?null:a.parentNode;for(a=a.parentNode;a&&a!==c;a=a.parentNode)if(d=j(a).css("position"),"static"!==d)return a;return null}function n(a){var c,d,b={left:0,right:Infinity,top:0,bottom:Infinity},f;f=a.ownerDocument;d=j(f).getWindow();c=f.body;for(f=f.documentElement;a=m(a);)if((!v.ie||0!==a.clientWidth)&&
a!==c&&a!==f&&"visible"!==j(a).css("overflow")){var h=j(a).offset();h.left+=a.clientLeft;h.top+=a.clientTop;b.top=Math.max(b.top,h.top);b.right=Math.min(b.right,h.left+a.clientWidth);b.bottom=Math.min(b.bottom,h.top+a.clientHeight);b.left=Math.max(b.left,h.left)}f=d.scrollLeft();a=d.scrollTop();b.left=Math.max(b.left,f);b.top=Math.max(b.top,a);c=d.width();d=d.height();b.right=Math.min(b.right,f+c);b.bottom=Math.min(b.bottom,a+d);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}function o(a,
c,d,b){var f,h;f=a.left;h=a.top;c=p(c,d[0]);a=p(a,d[1]);a=[a.left-c.left,a.top-c.top];return{left:f-a[0]+ +b[0],top:h-a[1]+ +b[1]}}function q(a,c,d){var b=[];k.each(a,function(a){b.push(a.replace(c,function(a){return d[a]}))});return b}function l(){}function r(a){var c,d;c=a[0];k.isWindow(c)?(a=j(c).getWindow(),c={left:a.scrollLeft(),top:a.scrollTop()},d=a.width(),a=a.height()):(c=a.offset(),d=a.outerWidth(),a=a.outerHeight());c.width=d;c.height=a;return c}function p(a,c){var d=c.charAt(0),b=c.charAt(1),
f=a.width,h=a.height,e,g;e=a.left;g=a.top;"c"===d?g+=h/2:"b"===d&&(g+=h);"c"===b?e+=f/2:"r"===b&&(e+=f);return{left:e,top:g}}function w(a){a.target===this&&a.newVal&&this._onSetAlign(this.get("align"))}function s(){this.get("visible")&&this._onSetAlign(this.get("align"))}var t=u("node"),x=k.Env.host,j=t.all,v=k.UA;l.__getOffsetParent=m;l.__getVisibleRectForElement=n;l.ATTRS={align:{value:{}}};l.prototype={__bindUI:function(){this.on("beforeVisibleChange",w,this);this.$el.getWindow().on("resize",s,
this)},_onSetAlign:function(a){a&&a.points&&this.align(a.node,a.points,a.offset,a.overflow)},align:function(a,c,d,b){var a=t.one(a||x),d=d&&[].concat(d)||[0,0],b=b||{},f=this.$el,h=0,e=n(f[0]),g=r(f),j=r(a),a=o(g,j,c,d),i=k.merge(g,a);if(e&&(b.adjustX||b.adjustY)){if(a.lefte.right)h=1,c=q(c,/[lr]/ig,{l:"r",r:"l"}),d[0]=-d[0];if(a.tope.bottom)h=1,c=q(c,/[tb]/ig,{t:"b",b:"t"}),d[1]=-d[1];h&&(a=o(g,j,c,d),k.mix(i,a));c=b.adjustX&&(a.lefte.right);b=b.adjustY&&(a.tope.bottom);if(c||b)a=k.clone(a),i={width:g.width,height:g.height},c&&a.lefte.right&&(a.left=Math.max(e.right-i.width,e.left)),b&&a.tope.bottom&&(a.top=Math.max(e.bottom-i.height,e.top)),i=k.mix(a,i)}this.set({x:i.left,y:i.top},{force:1});i.width!==g.width&&this.set("width",f.width()+i.width-g.width);i.height!==g.height&&this.set("height",f.height()+i.height-
g.height);return this},center:function(a){this.set("align",{node:a,points:["cc","cc"],offset:[0,0]});return this},__destructor:function(){this.$el&&this.$el.getWindow().detach("resize",s,this)}};return l});
/*
Copyright 2014, KISSY v1.43
MIT Licensed
build time: May 22 12:17
*/
KISSY.add("component/extension/shim",[],function(a){function b(){}var a=6===a.UA.ie,c='';b.ATTRS={shim:{value:a}};b.prototype.__createDom=function(){this.get("shim")&&this.get("el").prepend(c)};return b});