// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
define("dojo/_base/lang dojo/on dojo/query dojo/Deferred dojo/_base/html jimu/utils dojo/keys dijit/a11yclick dijit/Tooltip".split(" "),function(f,d,g,h,c,l,e,k,m){return{a11y_init:function(){c.setAttr(this.domNode,"aria-label",this.nls._widgetLabel);this.a11y_useDoResizeNode();this.own(d(this.doResizeNode,k,f.hitch(this,function(){this._doResize()})))},a11y_nodeSelect:function(a,b){this.own(d(a,k,b))},a11y_nodeEscEvent:function(a){this.own(d(a,"keydown",f.hitch(this,function(b){b.keyCode===e.ESCAPE&&
(b.stopPropagation(),b.preventDefault(),this.doResizeNode.focus())})))},a11y_getIconNodeById:function(a){var b=!0===("block"===c.getStyle(this.maxStateNode,"display"))?this.maxStateNode:this.minStateNode;a=g('.title-node[settingId\x3d"'+a+'"]',b);if(0!==a.length)return a[0]},a11y_addTooltip:function(a,b){l.addTooltipByDomNode(m,a,b)},a11y_useDoResizeNode:function(){c.setAttr(this.doResizeNode,"tabindex",this.tabIndex)},a11y_ignoreDoResizeNode:function(){c.removeAttr(this.doResizeNode,"tabindex")},
a11y_resizeNodeAriaLabel:function(a){var b="e"===a?window.jimuNls.common.expand:window.jimuNls.common.collapse;b=b.replace("${value}",this.nls._widgetLabel);c.setAttr(this.doResizeNode,"aria-label",b);c.setAttr(this.doResizeNode,"aria-expanded","e"===a?"false":"true")},a11y_focusToItemInMoreTab:function(a){a&&(a=g(".other-group[data-widget-id\x3d'"+a+"']",this.otherGroupNode))&&a[0]&&a[0].focus&&a[0].focus()},a11y_switchNodeToClose:function(a){g(".title-node",this.domNode).removeClass("jimu-state-selected");
var b=this.appConfig.getConfigElementById(a);if(b)return!1===b.inPanel?(this.widgetManager.closeWidget(a),a=new h,a.resolve(),a):this.panelManager.closePanel(a+"_panel");a=new h;a.resolve();return a},a11y_moreTabCloseAriaLabel:function(a){c.setAttr(a,"title",window.jimuNls.common.close)},a11y_moreTabCloseEvent:function(a){this.own(d(a,"click",f.hitch(this,function(){this._hideOtherGroupPane();-1!==this.lastSelectedIndex&&this.selectTab(this.lastSelectedIndex)})));this.own(d(a,"keydown",f.hitch(this,
function(b){if(b.shiftKey&&b.keyCode===e.TAB)b.stopPropagation(),b.preventDefault(),this.a11y_moreTab_last&&this.a11y_moreTab_last.focus&&this.a11y_moreTab_last.focus();else if(b.keyCode===e.ENTER||b.keyCode===e.SPACE||b.keyCode===e.ESCAPE)b.stopPropagation(),this._hideOtherGroupPane(),g('.title-node[title\x3d"more"]',this.titleListNode)[0].focus()})))},a11y_moreTabEscapeEvent:function(a){this.own(d(a,"keydown",f.hitch(this,function(b){b.keyCode===e.ESCAPE&&(b.stopPropagation(),b.preventDefault(),
this.a11y_moreTab_close.focus())})))},a11y_cleanTabIndex_otherGroupPane:function(){this.a11y_moreTab_close&&c.removeAttr(this.a11y_moreTab_close,"tabindex");for(var a=g(".other-group",this.otherGroupNode),b=0,n=a.length;b<n;b++)c.removeAttr(a[b],"tabindex")},a11y_moreTabLastNodeTabEvent:function(){this.own(d(this.a11y_moreTab_last,"keydown",f.hitch(this,function(a){a.shiftKey||a.keyCode!==e.TAB||(a.stopPropagation(),a.preventDefault(),this.a11y_moreTab_close.focus())})))},a11y_moreTabInonEscEvent:function(a){this.own(d(a,
"keydown",f.hitch(this,function(b){b.keyCode===e.ESCAPE&&(b.stopPropagation(),b.preventDefault(),this.a11y_moreTab_close.focus())})))},a11y_getEventOps:function(a){var b={};"keyup"===a._origType&&(b.a11y_byKeyEvent=!0);return b}}});