//>>built
define("dojox/layout/ToggleSplitter",["dojo","dijit","dijit/layout/BorderContainer"],function(c,l){c.experimental("dojox.layout.ToggleSplitter");var n=c.declare("dojox.layout.ToggleSplitter",l.layout._Splitter,{container:null,child:null,region:null,state:"full",_closedSize:"0",baseClass:"dojoxToggleSplitter",templateString:'\x3cdiv class\x3d"dijitSplitter dojoxToggleSplitter" dojoAttachEvent\x3d"onkeypress:_onKeyPress,onmousedown:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse"\x3e\x3cdiv dojoAttachPoint\x3d"toggleNode" class\x3d"dijitSplitterThumb dojoxToggleSplitterIcon" tabIndex\x3d"0" role\x3d"separator" dojoAttachEvent\x3d"onmousedown:_onToggleNodeMouseDown,onclick:_toggle,onmouseenter:_onToggleNodeMouseMove,onmouseleave:_onToggleNodeMouseMove,onfocus:_onToggleNodeMouseMove,onblur:_onToggleNodeMouseMove"\x3e\x3cspan class\x3d"dojoxToggleSplitterA11y" dojoAttachPoint\x3d"a11yText"\x3e\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e',
postCreate:function(){this.inherited(arguments);var a=this.region;c.addClass(this.domNode,this.baseClass+a.charAt(0).toUpperCase()+a.substring(1))},startup:function(){this.inherited(arguments);var a=this.child.domNode,e=c.style(a,this.horizontal?"height":"width");this.domNode.setAttribute("aria-controls",a.id);c.forEach(["toggleSplitterState","toggleSplitterFullSize","toggleSplitterCollapsedSize"],function(d){var b=d.substring(14);b=b.charAt(0).toLowerCase()+b.substring(1);d in this.child&&(this[b]=
this.child[d])},this);this.fullSize||(this.fullSize="full"==this.state?e+"px":"75px");this._openStyleProps=this._getStyleProps(a,"full");this._started=!0;this.set("state",this.state);return this},_onKeyPress:function(a){"full"==this.state&&this.inherited(arguments);if(a.charCode==c.keys.SPACE||a.keyCode==c.keys.ENTER)this._toggle(a),c.stopEvent(a)},_onToggleNodeMouseDown:function(a){c.stopEvent(a);this.toggleNode.focus()},_startDrag:function(a){"full"==this.state&&this.inherited(arguments)},_stopDrag:function(a){this.inherited(arguments);
this.toggleNode.blur()},_toggle:function(a){switch(this.state){case "full":a=this.collapsedSize?"collapsed":"closed";break;case "collapsed":a="closed";break;default:a="full"}this.set("state",a)},_onToggleNodeMouseMove:function(a){var e=this.baseClass,d=this.toggleNode,b="full"==this.state||"collapsed"==this.state;a="mouseout"==a.type||"blur"==a.type;c.toggleClass(d,e+"IconOpen",a&&b);c.toggleClass(d,e+"IconOpenHover",!a&&b);c.toggleClass(d,e+"IconClosed",a&&!b);c.toggleClass(d,e+"IconClosedHover",
!a&&!b)},_handleOnChange:function(a){a=this.child.domNode;var e,d=this.horizontal?"height":"width";if("full"==this.state){var b=c.mixin({display:"block",overflow:"auto",visibility:"visible"},this._openStyleProps);b[d]=this._openStyleProps&&this._openStyleProps[d]?this._openStyleProps[d]:this.fullSize;c.style(this.domNode,"cursor","");c.style(a,b)}else"collapsed"==this.state?(b=c.getComputedStyle(a),this._openStyleProps=e=this._getStyleProps(a,"full",b),c.style(this.domNode,"cursor","auto"),c.style(a,
d,this.collapsedSize)):(this.collapsedSize||(b=c.getComputedStyle(a),this._openStyleProps=e=this._getStyleProps(a,"full",b)),b=this._getStyleProps(a,"closed",b),c.style(this.domNode,"cursor","auto"),c.style(a,b));this._setStateClass();this.container._started&&this.container._layoutChildren(this.region)},_getStyleProps:function(a,e,d){d||(d=c.getComputedStyle(a));var b={},f=this.horizontal?"height":"width";b.overflow="closed"!=e?d.overflow:"hidden";b.visibility="closed"!=e?d.visibility:"hidden";b[f]=
"closed"!=e?a.style[f]||d[f]:this._closedSize;var g=["Top","Right","Bottom","Left"];c.forEach(["padding","margin","border"],function(m){for(var k=0;k<g.length;k++){var h=m+g[k];"border"==m&&(h+="Width");void 0!==d[h]&&(b[h]="closed"!=e?d[h]:0)}});return b},_setStateClass:function(){var a="\x26#9652",e=this.region.toLowerCase(),d=this.baseClass,b=this.toggleNode,f="full"==this.state||"collapsed"==this.state,g=this.focused;c.toggleClass(b,d+"IconOpen",f&&!g);c.toggleClass(b,d+"IconClosed",!f&&!g);c.toggleClass(b,
d+"IconOpenHover",f&&g);c.toggleClass(b,d+"IconClosedHover",!f&&g);if("top"==e&&f||"bottom"==e&&!f)a="\x26#9650";else if("top"==e&&!f||"bottom"==e&&f)a="\x26#9660";else if("right"==e&&f||"left"==e&&!f)a="\x26#9654";else if("right"==e&&!f||"left"==e&&f)a="\x26#9664";this.a11yText.innerHTML=a},_setStateAttr:function(a){if(this._started){var e=this.state;this.state=a;this._handleOnChange(e);switch(a){case "full":this.domNode.setAttribute("aria-expanded",!0);a="onOpen";break;case "collapsed":this.domNode.setAttribute("aria-expanded",
!0);a="onCollapsed";break;default:this.domNode.setAttribute("aria-expanded",!1),a="onClosed"}this[a](this.child)}},onOpen:function(a){},onCollapsed:function(a){},onClosed:function(a){}});c.extend(l._Widget,{toggleSplitterState:"full",toggleSplitterFullSize:"",toggleSplitterCollapsedSize:""});return n});