// 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
require({cache:{"themes/LaunchpadTheme/widgets/AnchorBarController/DockableItem":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-attr dojo/_base/fx ./BaseIconItem".split(" "),function(C,r,g,n,t,k){return C([k],{visible:!0,postCreate:function(){this.inherited(arguments);g.add(this.iconItemNode,"dockable");n.set(this.domNode,"settingid",this.config.id)},hideAnim:function(){var q=this.domNode.style,v=[],z={};window.isRTL?z["margin-right"]=0:z["margin-left"]=0;g.remove(this.iconItemStatus,
"selected");v.push(t.animateProperty({node:this.domNode,duration:500,properties:z,onEnd:r.hitch(this,function(){q.display="none";this.visible=!1})}));v.push(t.animateProperty({node:this.iconItemNode,duration:500,properties:{width:1}}));v.push(t.animateProperty({node:this.imgNode,duration:500,properties:{width:1}}));return v},showAnim:function(q){var v=this.domNode.style,z=this.iconItemNode.style,A=this.imgNode.style,w=[],B=this.size,d={};q={start:function(){v.display="";return 0},end:q};window.isRTL?
d["margin-right"]=q:d["margin-left"]=q;w.push(t.animateProperty({node:this.domNode,duration:500,properties:d,onEnd:r.hitch(this,function(){this.isOpen&&g.add(this.iconItemStatus,"selected");this.visible=!0})}));w.push(t.animateProperty({node:this.iconItemNode,duration:500,properties:{width:{start:function(){z.width="1px";return 1},end:B}}}));w.push(t.animateProperty({node:this.imgNode,duration:500,properties:{width:{start:function(){A.width="1px";return 1},end:20}}}));return w}})})},"themes/LaunchpadTheme/widgets/AnchorBarController/BaseIconItem":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/dom-class dojo/dom-style dojo/on dojo/keys dojo/mouse dojo/Evented dijit/_WidgetBase dijit/_TemplatedMixin dijit/popup dijit/TooltipDialog dojo/text!./BaseIconItem.html".split(" "),
function(C,r,g,n,t,k,q,v,z,A,w,B,d,p){return C([A,w,z],{baseClass:"jimu-anchorbar-iconitem jimu-float-leading",templateString:p,config:null,backgroundIndex:-1,isOpen:!1,panelIndex:-1,size:40,postCreate:function(){this.inherited(arguments);this.tooltipDialog=new d({content:this.config.label,"class":"launchpad-tooltip"});window.isRTL&&this.config.mirrorIconForRTL&&n.add(this.imgNode,"jimu-flipx");g.setAttr(this.iconItemNode,"tabindex",this.itemTabIndex);g.setAttr(this.iconItemNode,"aria-label",this.config.label);
n.add(this.iconItemNode,"icon-item-background"+this.getBackgroundColorIndex());this.own(k(this.iconItemNode,v.enter,r.hitch(this,function(){window.appInfo.isRunInMobile||B.open({parent:this,popup:this.tooltipDialog,around:this.iconItemNode,orient:["above-centered"],onCancel:r.hitch(this,function(){B.close(this.tooltipDialog)})})})));this.own(k(this.iconItemNode,v.leave,r.hitch(this,function(){window.appInfo.isRunInMobile||B.close(this.tooltipDialog)})))},getConfigForPanel:function(){var e=r.clone(this.config);
e.backgroundColor=this.getColor();e.panel.position=this._initPosition();e.panel.position.index=this.panelIndex;return e},_initPosition:function(){return{top:window.appInfo.isRunInMobile?20:120,left:10,width:350,height:480,margin:10}},_onNodeClick:function(){n.toggle(this.iconItemStatus,"selected");n.toggle(this.iconItemNode,"selected");this.isOpen=n.contains(this.iconItemNode,"selected");this.isOpen||(this.panelIndex=-1);this.emit("nodeClick",{target:this})},_onNodeKeydown:function(e){e.keyCode!==
q.ENTER&&e.keyCode!==q.SPACE||this._onNodeClick()},isGroup:function(){return this.config.widgets&&1<this.config.widgets.length?!0:!1},isOpenAtStart:function(){return this.config&&!0===this.config.openAtStart},setOpened:function(e){e?(this.iconItemStatus&&n.add(this.iconItemStatus,"selected"),this.iconItemNode&&n.add(this.iconItemNode,"selected"),this.isOpen=!0):(this.iconItemStatus&&n.remove(this.iconItemStatus,"selected"),this.iconItemNode&&n.remove(this.iconItemNode,"selected"),this.isOpen=!1,this.panelIndex=
-1)},getPanelIndex:function(){return this.panelIndex},setPanelIndex:function(e){this.panelIndex=e},getColor:function(){return t.get(this.iconItemNode,"background-color")||"#FFFFFF"},getBackgroundColorIndex:function(){return this.backgroundIndex%6}})})},"themes/LaunchpadTheme/widgets/AnchorBarController/GroupItems":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/_base/html dojo/fx dojo/on dojo/keys dijit/Tooltip jimu/utils dojo/Evented dojo/dom-style dojo/dom-class dojo/dom-geometry dojo/dnd/move dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./GroupItems.html ./BaseIconItem".split(" "),
function(C,r,g,n,t,k,q,v,z,A,w,B,d,p,e,m,u,y){return C([e,m,A],{baseClass:"jimu-anchorbar-controller-group",templateString:u,config:null,dockableItem:null,backgroundColor:null,itemList:[],box:null,postMixInProperties:function(){this.headerNls=window.jimuNls.panelHeader},postCreate:function(){this.inherited(arguments);r.forEach(this.config.widgets,function(l,x){x=new y({config:l,backgroundIndex:x,itemTabIndex:0});x.placeAt(this.containerNode);this.own(k(x,"nodeClick",g.hitch(this,this._onIconClick)));
this.itemList.push(x);z.addTooltipByDomNode(v,x.iconItemNode,l.label)},this);B.add(this.colorfulHeader,"icon-item-background"+this.dockableItem.getBackgroundColorIndex());this.own(k(this.domNode,"keydown",g.hitch(this,function(l){if(!n.hasClass(l.target,"close-icon")&&l.keyCode===q.ESCAPE)this.closeNode.focus();else if(l.keyCode===q.TAB&&n.hasClass(l.target,"icon-item")){var x;l.shiftKey||l.target.parentNode.nextElementSibling?l.shiftKey&&!l.target.parentNode.previousElementSibling&&(x=this.itemList[this.itemList.length-
1]):x=this.itemList[0];x&&(l.preventDefault(),x.iconItemNode.focus())}})))},startup:function(){this.inherited(arguments);this.box=d.getMarginBox(this.domNode);this.makeMoveable(this.titleNode,this.box)},getItemList:function(){return this.itemList},makeMoveable:function(l,x){this.disableMoveable();var a=d.getMarginBox(jimuConfig.layoutId);a.l-=.5*x.w;a.w+=x.w;this.moveable=new p.boxConstrainedMoveable(this.domNode,{box:a,handle:l||this.titleNode,within:!0});this.own(k(this.moveable,"Moving",g.hitch(this,
this.onMoving)));this.own(k(this.moveable,"MoveStop",g.hitch(this,this.onMoveStop)))},getItemNum:function(){return this.config.widgets.length},disableMoveable:function(){this.moveable&&(this.moveable.destroy(),this.moveable=null)},onMoving:function(l){w.set(l.node,"opacity",.9)},onMoveStop:function(l){w.set(l.node,"opacity",1)},open:function(){t.wipeIn({node:this.domNode,duration:400}).play();setTimeout(g.hitch(this,function(){this.itemList[0].iconItemNode.focus()}),405)},close:function(){t.wipeOut({node:this.domNode,
duration:400}).play();this.dockableItem.setOpened(!1)},closeImmedaite:function(){w.set(this.domNode,"display","none");this.dockableItem.setOpened(!1)},_onCloseBtnClicked:function(){this.close();this.emit("groupCloseBtnClicked")},_onCloseBtnKeydown:function(l){l.keyCode===q.ENTER||l.keyCode===q.SPACE?this._onCloseBtnClicked():l.keyCode===q.TAB&&l.shiftKey&&l.preventDefault()},_onIconClick:function(l){this.emit("groupItemClicked",g.mixin({group:this},l))},setPosition:function(l){w.set(this.domNode,
{top:"number"===typeof l.top?l.top+"px":"auto",left:"number"===typeof l.left?l.left+"px":"auto",right:"number"===typeof l.right?l.right+"px":"auto"})}})})},"themes/LaunchpadTheme/widgets/AnchorBarController/PopupMoreNodes":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/html dojo/on dojo/dom-construct dojo/dom-style dojo/query dijit/_WidgetBase dijit/_TemplatedMixin jimu/dijit/ViewStack jimu/utils".split(" "),function(C,r,g,n,t,k,q,v,z,A,w,B){return C([z,A],{baseClass:"jimu-anchorbar-more-pupup jimu-main-background",
templateString:'\x3cdiv\x3e\x3cdiv class\x3d"pages" data-dojo-attach-point\x3d"pagesNode"\x3e\x3c/div\x3e\x3cdiv class\x3d"points jimu-corner-bottom"\x3e\x3cdiv class\x3d"points-inner"data-dojo-attach-point\x3d"pointsNode"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',margin:4,nodes:[],forIcon:null,postCreate:function(){this.pages=[];this.createCloseBtn()},startup:function(){this.viewStack=new w({views:[],viewType:"dom"},this.pagesNode);this.viewStack.startup()},setForIcon:function(d){this.forIcon=d},
setNodes:function(d){this.nodes=d;this.oldGridParam=null;this.resize()},resize:function(){var d=this._calculateGridParam();if(null!==d){n.setStyle(this.domNode,B.getPositionStyle(d.position));this.nodeWidth=d.cellSize-this.margin;this.clearPages();this.createPages(d);g.forEach(v(".icon-node",this.domNode),r.hitch(this,function(e,m){this.setItemNodePosition(e,m,d)}));this.oldGridParam=d;var p=v("div.close",this.domNode)[0];n.setStyle(p,{width:.25*this.nodeWidth+"px",height:.25*this.nodeWidth+"px"})}else this.oldGridParam=
null,n.setStyle(this.domNode,B.getPositionStyle({left:0,top:0,width:0,height:0,zIndex:111})),this.nodeWidth=0},setItemNodePosition:function(d,p,e){var m=0===p%e.cols?0:this.margin/2;p=p%(e.rows*e.cols)<e.cols?0:this.margin/2;e={};"number"===typeof this.nodeWidth&&(e.width=this.nodeWidth+"px",e.height=this.nodeWidth+"px");"number"===typeof m&&(window.isRTL?e.marginRight=m+"px":e.marginLeft=m+"px");"number"===typeof p&&(e.marginTop=p+"px");n.setStyle(d,e)},clearPages:function(){g.forEach(this.pages,
function(d){this.viewStack.removeView(d.pageNode)},this);k.empty(this.pointsNode);this.pages=[]},createPages:function(d){var p;var e=Math.ceil(this.nodes.length/(d.rows*d.cols));for(p=0;p<e;p++){var m=k.create("div",{"class":"page"});this.createPageItems(p,m,d);this.viewStack.addView(m);if(1<e){var u=k.create("div",{"class":"point"},this.pointsNode);this.own(t(u,"click",r.hitch(this,this._onPageNodeClick,p)))}this.pages.push({pageNode:m,pointNode:u})}0<this.viewStack.views.length&&this._selectPage(0)},
_onPageNodeClick:function(d){this._selectPage(d)},_selectPage:function(d){1<this.pages.length&&(v(".point",this.domNode).removeClass("point-selected"),n.addClass(this.pages[d].pointNode,"point-selected"));this.viewStack.switchView(this.pages[d].pageNode)},createPageItems:function(d,p,e){var m=this.nodes.length;var u=e.rows*e.cols;e=(d+1)*u;var y=e-m;e=Math.min(e,m);for(d*=u;d<e;d++)this.createItemNode(d,p);for(d=m;d<m+y;d++)this.createEmptyItemNode(p)},createItemNode:function(d,p){p=k.create("div",
{"class":"icon-node jimu-float-leading"},p);var e=(this.nodeWidth-this.nodes[d].size)/2;q.set(this.nodes[d].domNode,{position:"absolute",left:e+"px",top:e+"px","margin-left":""});this.nodes[d].placeAt(p)},createEmptyItemNode:function(d){return k.create("div",{"class":"icon-node jimu-float-leading"},d)},createCloseBtn:function(){var d=k.create("div",{"class":"close"},this.domNode);k.create("div",{"class":"close-inner"},d);t(d,"click",r.hitch(this,function(){this.hide()}));return d},hide:function(){n.setStyle(this.domNode,
"display","none");this.forIcon&&this.forIcon.setOpened(!1)},show:function(){n.setStyle(this.domNode,"display","block")},_calculateGridParam:function(){var d=!1,p=!0;var e=n.getContentBox(jimuConfig.mapId);var m=Math.min(e.w,e.h)-40;if(240<=m)var u=80;else{u=Math.floor(m/3);if(10>u)return null;d=!0;60>u&&(p=!1)}m=Math.floor((e.h-40)/u);var y=Math.floor((e.w-40)/u);m=4<m?4:m;m=3>m?3:m;y=3>m?3:4<y?4:y;return{rows:m,cols:y,cellSize:u,iconScaled:d,showLabel:p,position:{top:(e.h-u*m)/2,bottom:(e.h-u*m)/
2,left:(e.w-u*y)/2,right:(e.w-u*y)/2,width:u*y-this.margin*(y-1)/2,height:u*m-this.margin*(m-1)/2,zIndex:111}}}})})},"themes/LaunchpadTheme/widgets/AnchorBarController/_build-generate_module":function(){define(["dojo/text!./Widget.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:themes/LaunchpadTheme/widgets/AnchorBarController/BaseIconItem.html":'\x3cdiv\x3e\r\n  \x3cdiv role\x3d"button" class\x3d"icon-item" data-dojo-attach-point\x3d"iconItemNode"\r\n       data-dojo-attach-event\x3d"onclick:_onNodeClick,onkeydown:_onNodeKeydown"\x3e\r\n    \x3cimg class\x3d"icon" src\x3d"${config.icon}" data-dojo-attach-point\x3d"imgNode"/\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"status" data-dojo-attach-point\x3d"iconItemStatus"\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:themes/LaunchpadTheme/widgets/AnchorBarController/GroupItems.html":'\x3cdiv\x3e\r\n  \x3cdiv class\x3d"title jimu-panel-title jimu-main-background jimu-corner-top" data-dojo-attach-point\x3d"titleNode"\x3e\r\n    \x3cdiv class\x3d"color-header" data-dojo-attach-point\x3d"colorfulHeader"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"widget-icon"\x3e\r\n      \x3cimg class\x3d"icon" src\x3d"${config.icon}"/\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"title-label" data-dojo-attach-point\x3d"titleLabelNode"\x3e\r\n      ${config.label}\r\n    \x3c/div\x3e\r\n    \x3cdiv role\x3d"button" tabindex\x3d"0" aria-label\x3d"${headerNls.closeWindow}" class\x3d"close-icon jimu-float-trailing" data-dojo-attach-point\x3d"closeNode"\r\n      data-dojo-attach-event\x3d"onclick:_onCloseBtnClicked,onkeydown:_onCloseBtnKeydown"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"jimu-panel-content jimu-corner-bottom" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',
"url:themes/LaunchpadTheme/widgets/AnchorBarController/Widget.html":'\x3cdiv aria-label\x3d"${label}"\x3e\r\n  \x3cdiv class\x3d"docker jimu-main-background jimu-corner-all"\x3e\r\n    \x3cdiv role\x3d"button" aria-label\x3d"${previousNls}" class\x3d"previousBtn jimu-corner-left" data-dojo-attach-point\x3d"previousButton"\r\n      data-dojo-attach-event\x3d"onclick:_previous,onkeydown:_previousKeyDown"\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"seperatorLeft" data-dojo-attach-point\x3d"seperatorLeft"\x3e\x3c/div\x3e\r\n\r\n    \x3cdiv class\x3d"iconList" data-dojo-attach-point\x3d"widgetList"\x3e\r\n      \x3cdiv class\x3d"iconGroup" data-dojo-attach-point\x3d"iconGroupNode"\x3e\x3c/div\x3e\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv class\x3d"seperatorRight" data-dojo-attach-point\x3d"seperatorRight"\x3e\x3c/div\x3e\r\n    \x3cdiv role\x3d"button" aria-label\x3d"${nextNls}" class\x3d"nextBtn jimu-corner-right" data-dojo-attach-point\x3d"nextButton"\r\n      data-dojo-attach-event\x3d"onclick:_next,onkeydown:_nextKeyDown"\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:themes/LaunchpadTheme/widgets/AnchorBarController/css/style.css":".jimu-anchorbar-iconitem .icon-item{width: 40px; height: 40px; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; text-align: center; cursor: pointer;}.jimu-anchorbar-iconitem .icon-item.dockable{margin-top: -20px;}.jimu-anchorbar-iconitem .icon-item:hover{}.jimu-anchorbar-iconitem .icon-item.selected{margin-top: -5px;}.jimu-anchorbar-iconitem .icon-item.dockable.selected{margin-top: -25px;}.jimu-anchorbar-iconitem .status{margin-top: 4px; width: 4px; height: 4px; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; display: none;}.jimu-anchorbar-iconitem .status.selected{display: block; margin: 5px 18px;}.jimu-anchorbar-iconitem .icon-item .icon{width: 24px; height: 24px; margin-top: 8px; cursor: pointer;}.jimu-panel-content .jimu-anchorbar-iconitem{margin: 10px;}.jimu-anchorbar-controller .docker{position: relative; height: 30px;}.jimu-anchorbar-controller .docker .iconList{position: absolute; left: 30px; right: 30px;}.jimu-anchorbar-controller.mobile .docker .iconList{left: 0; right: 0;}.jimu-anchorbar-controller .docker .iconList .iconGroup{position: absolute; top: 0; left: 0; height: 30px;}.jimu-rtl .jimu-anchorbar-controller .docker .iconList .iconGroup{right: 0; left: auto;}.jimu-anchorbar-controller .docker .previousBtn{position: absolute; left: 0; width: 30px; height: 30px; cursor: pointer; z-index: 60;}.jimu-anchorbar-controller.mobile .docker .previousBtn{display: none;}.jimu-rtl .jimu-anchorbar-controller .docker .previousBtn{left: auto; right: 0;}.jimu-anchorbar-controller .docker .nextBtn{position: absolute; right: 0; width: 30px; height: 30px; cursor: pointer; z-index: 60;}.jimu-anchorbar-controller.mobile .docker .nextBtn{display: none;}.jimu-rtl .jimu-anchorbar-controller .docker .nextBtn{right: auto; left: 0;}.jimu-anchorbar-controller .docker .seperatorLeft{position: absolute; left: 30px; top: 2px; width: 1px; height: 26px; z-index: 60;}.jimu-anchorbar-controller.mobile .docker .seperatorLeft{display: none;}.jimu-anchorbar-controller .docker .seperatorRight{position: absolute; right: 30px; top: 2px; width: 1px; height: 26px; z-index: 60;}.jimu-anchorbar-controller.mobile .docker .seperatorRight{display: none;}.jimu-anchorbar-controller-group{position: absolute; height: auto;}.jimu-anchorbar-controller-group .color-header{height: 2px; width: 100%;}.jimu-anchorbar-controller-group .title{position: relative; height: 30px; width: 100%; cursor: move;}.jimu-anchorbar-controller-group .title .widget-icon{position: absolute; left: 4px; top: 8px; width: 24px; height: 24px; cursor: default;}.jimu-anchorbar-controller-group .title .widget-icon .icon{width: 16px; height: 16px;}.jimu-rtl .jimu-anchorbar-controller-group .title .widget-icon{right: 4px;}.jimu-anchorbar-controller-group .title-label{overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 28px; position: absolute; left: 48px; right: 96px;}.jimu-rtl .jimu-anchorbar-controller-group .title-label{right: 48px; left: 96px;}.jimu-anchorbar-controller-group .title .close-icon{width: 24px; height: 28px; cursor: pointer; background: transparent url(images/x.png) center no-repeat;}.jimu-anchorbar-controller-group .jimu-panel-content{background-color: #ffffff; overflow: hidden;}.jimu-anchorbar-controller-group .jimu-widgets-controller-item{margin: 5px 10px; display: inline; float: left;}.jimu-rtl .jimu-anchorbar-controller-group .jimu-widgets-controller-item{float: right;}.jimu-anchorbar-more-pupup{position: absolute; border-radius: 2px; z-index: 111;}.jimu-anchorbar-more-pupup .pages{position: relative; overflow: hidden; padding: 2px;}.jimu-anchorbar-more-pupup .points{position: absolute; overflow: hidden; bottom: -15px; left: 0; right: 0; text-align: center; background-color: #bababa;}.jimu-anchorbar-more-pupup .points-inner{display: inline-block; overflow: hidden;}.jimu-anchorbar-more-pupup .point{float: left; width: 8px; height: 8px; margin-left: 5px; border-radius: 4px; background-color: #f2f6f9; cursor: pointer;}.jimu-rtl .jimu-anchorbar-more-pupup .point{float: right; margin-right: 5px; margin-left: 0;}.jimu-anchorbar-more-pupup .point-selected{background-color: #485566;}.jimu-anchorbar-more-pupup .page{position: relative; overflow: hidden;}.jimu-anchorbar-more-pupup .close{position: absolute; top: -04.46428571428571%; right: -04.46428571428571%; border-radius: 50%; background-color: #697a8c; cursor: pointer;}.jimu-rtl .jimu-anchorbar-more-pupup .close{left: -04.46428571428571%; right: auto;}.jimu-anchorbar-more-pupup .close-inner{width: 80%; height: 80%; margin-left: 10%; margin-top: 10%; border-radius: 50%; background: #1d2123 url(images/close.png) no-repeat center center;}.jimu-rtl .jimu-anchorbar-more-pupup .close-inner{margin-right: 10%; margin-left: 0;}.jimu-anchorbar-more-pupup .icon-node{background-color: #697a8c; cursor: pointer; position: relative;}.jimu-anchorbar-more-pupup .jimu-anchorbar-iconitem .icon-item.dockable{margin-top: 0;}.jimu-more-icon-cover{z-index: 110; position: absolute; left: 0; top: 0; width: 100%; height: 100%;}.jimu-rtl .jimu-more-icon-cover{right: 0; left: auto;}",
"*now":function(C){C(['dojo/i18n!*preload*themes/LaunchpadTheme/widgets/AnchorBarController/nls/Widget*["ar","bs","ca","cs","da","de","en","el","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nb","nl","pl","pt-br","pt-pt","ro","ru","sk","sl","sr","sv","th","tr","zh-cn","uk","vi","zh-hk","zh-tw","ROOT"]'])},"*noref":1}});
define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/html dojo/dom-geometry dojo/dom-style dojo/dom-class dojo/dom-construct dojo/fx dojo/on dojo/keys dijit/Tooltip jimu/utils dojo/query dojo/aspect jimu/BaseWidget jimu/PoolControllerMixin ./DockableItem ./GroupItems ./PopupMoreNodes".split(" "),function(C,r,g,n,t,k,q,v,z,A,w,B,d,p,e,m,u,y,l,x){return C([m,u],{baseClass:"jimu-anchorbar-controller",visibleIcons:0,iconList:[],enableNext:!1,enablePrevious:!1,currentMode:1,iconMargin:8,
groupList:[],openedIds:[],currentStyle:"default",constructor:function(){this.previousNls=window.jimuNls.common.previous;this.nextNls=window.jimuNls.common.next},postCreate:function(){this.inherited(arguments);this.iconList=[];this.groupList=[];this.openedIds=[];this.currentStyle=this.appConfig.theme.styles[0];this.allConfigs=this.getAllConfigs();g.forEach(this.allConfigs,function(a,b){this._createItem(a,b)},this);n.setAttr(this.previousButton,"tabindex",this.tabIndex);n.setAttr(this.nextButton,"tabindex",
this.tabIndex)},_createItem:function(a,b){var c=new y({config:a,backgroundIndex:b,itemTabIndex:this.tabIndex});c.placeAt(this.iconGroupNode);this.iconList.push(c);if(c.isGroup()){var f=new l({config:a,dockableItem:c});b=window.appInfo.isRunInMobile?jimuConfig.layoutId:jimuConfig.mapId;f.placeAt(b);k.set(f.domNode,"display","none");this.own(A(f,"groupItemClicked",r.hitch(this,function(h){this._onDockableNodeClick(h.target)})));this.own(A(f,"groupCloseBtnClicked",r.hitch(this,function(){c.iconItemNode.focus()})));
this.own(A(c,"nodeClick",r.hitch(this,function(h){this._onGroupNodeClick(h.target,f)})));this.groupList.push(f)}else this.own(A(c,"nodeClick",r.hitch(this,function(h){this._onDockableNodeClick(h.target)})));d.addTooltipByDomNode(B,c.iconItemNode,a.label);return c},startup:function(){this.inherited(arguments);this.resize();g.some(this.iconList,function(a,b){if(a.isOpenAtStart())return window.appInfo.isRunInMobile||this._makeIconVisible(b),a._onNodeClick(),!0},this)},destroy:function(){this.inherited(arguments);
g.forEach(this.groupList,function(a){a.destroy()})},onAction:function(a,b){"highLight"===a&&b&&(b=p('div[settingid\x3d"'+b.widgetId+'"]',this.domNode)[0],this._highLight(b));"removeHighLight"===a&&this._removeHighLight()},onOpen:function(){0===this.iconList.length&&"config"!==this.appConfig.mode&&this.widgetManager.closeWidget(this)},onAppConfigChanged:function(a){this.currentStyle=a.theme.styles[0]},setOpenedIds:function(a){var b;0!==a.length&&g.forEach(a,function(c){b=this._getIconItemById(c);null!==
b&&b._onNodeClick()},this)},getOpenedIds:function(){this.inherited(arguments);return g.filter(this.openedIds,function(a){return"undefined"!==typeof a})},_highLight:function(a){this.hlDiv&&this._removeHighLight();if(a&&"none"!==k.get(a,"display")){var b=k.get(a,"margin-left"),c=t.getMarginBox(a);b={position:"absolute",left:c.l+b+"px",top:c.t+"px",width:"40px",height:"40px"};"style2"!==this.currentStyle&&(b["margin-top"]="-20px");this.hlDiv=v.create("div",{style:b,"class":"icon-highlight"},a,"before")}},
_removeHighLight:function(){this.hlDiv&&(v.destroy(this.hlDiv),this.hlDiv=null)},clearIconGroupNode:function(){for(;this.iconGroupNode.firstChild;)this.iconGroupNode.removeChild(this.iconGroupNode.firstChild)},resize:function(){window.appInfo.isRunInMobile?(1===this.currentMode&&(this.currentMode=2,q.add(this.domNode,"mobile"),this.clearIconGroupNode(),this.lastVisibleIcons=0),this.popupMore&&this.popupMore.hide(),this.switchToMobileStyle()):(2===this.currentMode&&(this.currentMode=1,q.remove(this.domNode,
"mobile"),this.clearIconGroupNode(),this.lastVisibleIcons=0,k.set(this.iconGroupNode,"width",80*this.allConfigs.length+"px"),g.forEach(this.iconList,function(a){a.placeAt(this.iconGroupNode)},this)),this.switchToNormalStyle());this._resizeOpenedPanel()},switchToMobileStyle:function(){var a=t.getContentBox(jimuConfig.mapId).w;k.set(this.iconGroupNode,"width",Math.max(a,80*this.allConfigs.length)+"px");this.visibleIcons=Math.floor(a/48);this.visibleIcons>=this.iconList.length&&(this.visibleIcons=this.iconList.length);
this.visibleIcons!==this.lastVisibleIcons?(this.lastVisibleIcons=this.visibleIcons,this.clearIconGroupNode(),this._reArrangeIconItems(a)):this._adjustIconMargin(a)},_reArrangeIconItems:function(a){var b,c=[];var f=(b=this.visibleIcons<this.iconList.length)?this.visibleIcons-1:this.visibleIcons;this.iconMargin=Math.floor((a-40*this.visibleIcons)/(this.visibleIcons+1));g.forEach(this.iconList,function(D,E){h={display:"",position:"",left:"",top:""};k.set(D.iconItemNode,{width:"40px",height:"40px"});
k.set(D.imgNode,{width:"20px",height:"20px"});E<f?(window.isRTL?h["margin-right"]=this.iconMargin+"px":h["margin-left"]=this.iconMargin+"px",k.set(D.domNode,h),D.placeAt(this.iconGroupNode)):(k.set(D.domNode,h),c.push(D))},this);if(b){a=this._createIconItemForMore();var h={};window.isRTL?h["margin-right"]=this.iconMargin+"px":h["margin-left"]=this.iconMargin+"px";k.set(a.domNode,h);a.placeAt(this.iconGroupNode);this.own(A(a,"nodeClick",r.hitch(this,function(D){this._onShowMoreNodeClick(D.target,c)})))}},
_createIconItemForMore:function(){return new y({config:{id:"show_more_widget_icons",label:this.nls.more,icon:this.folderUrl+"images/more_icon.png"},backgroundIndex:this.visibleIcons})},_adjustIconMargin:function(a){var b={};this.iconMargin=Math.floor((a-40*this.visibleIcons)/(this.visibleIcons+1));window.isRTL?b["margin-right"]=this.iconMargin+"px":b["margin-left"]=this.iconMargin+"px";p("div.jimu-anchorbar-iconitem",this.iconGroupNode).forEach(function(c){k.set(c,b)},this)},switchToNormalStyle:function(){var a=
0;var b=t.getContentBox(jimuConfig.mapId);var c=Math.floor(b.w/2);c>48*this.allConfigs.length+60&&(c=48*this.allConfigs.length+60);k.set(this.domNode,{width:c+"px",left:Math.floor((b.w-c)/2)+"px"});b=c-60;this.visibleIcons=Math.floor(b/48);this.visibleIcons>this.iconList.length&&(this.visibleIcons=this.iconList.length);g.some(this.iconList,function(f,h){if(f.visible)return a=h,!0});c=a+this.visibleIcons-1;c>=this.iconList.length&&(c=this.iconList.length-1,a=c-this.visibleIcons+1);this.iconMargin=
Math.floor((b-40*this.visibleIcons)/(this.visibleIcons+1));this._adjustIconStyle(a,c)},_previous:function(){var a=-1,b=-1,c=[];this.enablePrevious&&(g.some(this.iconList,function(f,h){if(f.visible)return a=h-1,!0},this),0<=a&&(b=a+this.visibleIcons,c=c.concat(this.iconList[b].hideAnim(this.iconMargin),this.iconList[a].showAnim(this.iconMargin)),z.combine(c).play(),this.enableNext=!0,q.add(this.nextButton,"enabled"),n.setAttr(this.nextButton,"aria-disabled","false"),0===a&&(this.enablePrevious=!1,
q.remove(this.previousButton,"enabled"),n.setAttr(this.previousButton,"aria-disabled","true"))))},_previousKeyDown:function(a){!this.enablePrevious||a.keyCode!==w.ENTER&&a.keyCode!==w.SPACE||this._previous()},_next:function(){var a=-1,b=-1,c=[];this.enableNext&&(g.some(this.iconList,function(f,h){if(f.visible)return a=h,!0},this),0<=a&&(b=a+this.visibleIcons,c=c.concat(this.iconList[a].hideAnim(this.iconMargin),this.iconList[b].showAnim(this.iconMargin)),z.combine(c).play(),this.enablePrevious=!0,
q.add(this.previousButton,"enabled"),n.setAttr(this.previousButton,"aria-disabled","false"),b===this.iconList.length-1&&(this.enableNext=!1,q.remove(this.nextButton,"enabled"),n.setAttr(this.nextButton,"aria-disabled","true"))))},_nextKeyDown:function(a){!this.enableNext||a.keyCode!==w.ENTER&&a.keyCode!==w.SPACE||this._next()},_getGroupPanelPosition:function(a,b){var c={};a=t.position(a.iconItemNode);var f=t.getContentBox(jimuConfig.mapId);c.top=a.y-b.h-8;c.left=window.isRTL?a.x<b.w+8?8:a.x-b.w+a.w:
a.x+b.w+8>f.w?f.w-b.w-8:a.x;return c},_getOffPanelPosition:function(a,b){var c={},f=t.position(a.iconItemNode),h=t.getContentBox(jimuConfig.mapId);c.bottom=h.h-(f.y+8)+20;window.isRTL?c.right=f.x<b.w+8?h.w-b.w-8:f.x-b.w:c.left=f.x+b.w+8>h.w?h.w-b.w-8:f.x;a.config.position&&(c.relativeTo=a.config.position.relativeTo);return c},_createPopupMoreNodes:function(){this.popupMore||(this._createCoverNode(),this.popupMore=new x,this.popupMore.placeAt(jimuConfig.mapId),e.after(this.popupMore,"show",r.hitch(this,
function(){k.set(this.moreIconPaneCoverNode,"display","")}),!0),e.after(this.popupMore,"hide",r.hitch(this,function(){k.set(this.moreIconPaneCoverNode,"display","none")}),!0))},_onShowMoreNodeClick:function(a,b){this._createPopupMoreNodes();a.isOpen?(this.popupMore.setForIcon(a),this.popupMore.setNodes(b),this.popupMore.show()):this.popupMore.hide()},_getIconItemById:function(a){var b=null;g.some(this.iconList,function(c){if(c.config.id===a)return b=c,!0});null===b&&g.some(this.groupList,function(c){return g.some(c.getItemList(),
function(f){if(f.config.id===a)return b=f,!0})});return b},_addToOpenedIds:function(a){-1===this.openedIds.indexOf(a)&&this.openedIds.push(a)},_removeFromOpenedIds:function(a){a=this.openedIds.indexOf(a);-1!==a&&(this.openedIds[a]=void 0)},_onGroupNodeClick:function(a,b){if(a.isOpen){var c=this._getGroupPanelPosition(a,b.box);b.setPosition(c);b.open();this._addToOpenedIds(a.config.id)}else b.close(),this._removeFromOpenedIds(a.config.id)},_onDockableNodeClick:function(a){if(!1===a.config.inPanel)a.isOpen?
this.widgetManager.loadWidget(a.config).then(r.hitch(this,function(f){this._addToOpenedIds(a.config.id);var h=this._getOffPanelPosition(a,this.widgetManager.getWidgetMarginBox(f));h.zIndex=100;f.setPosition(h,this.containerNode);this.widgetManager.openWidget(f);this.own(e.after(f,"onClose",r.hitch(this,function(){a.setOpened(!1);this._removeFromOpenedIds(a.config.id);a.iconItemNode.focus()})))})):(this.widgetManager.closeWidget(a.config.id),this._removeFromOpenedIds(a.config.id));else{var b=a.config.id+
"_panel";if(a.isOpen){a.setPanelIndex(this._calPanelIndex());var c=a.getConfigForPanel();this.panelManager.showPanel(c).then(r.hitch(this,function(f){f.setPosition(c.panel.position);e.after(f,"onClose",r.hitch(this,function(){a.setOpened(!1);this._removeFromOpenedIds(a.config.id);a.iconItemNode&&a.iconItemNode.focus()}))}));this.popupMore&&this.popupMore.hide();this._addToOpenedIds(a.config.id)}else this.panelManager.closePanel(b),this._removeFromOpenedIds(a.config.id)}},_calPanelIndex:function(){var a=
[],b;g.forEach(this.iconList,function(f){!f.isGroup()&&!1!==f.config.inPanel&&f.isOpen&&a.push(f.getPanelIndex())});g.forEach(this.groupList,function(f){g.forEach(f.getItemList(),function(h){!1!==h.config.inPanel&&h.isOpen&&a.push(h.getPanelIndex())})});if(0===a.length)return 0;a.sort(function(f,h){return f-h});if(0<a[0])return 0;var c=0;for(b=a.length-1;c<b;c++)if(1<a[c+1]-a[c])return a[c]+1;return a[b]+1},_createCoverNode:function(){this.moreIconPaneCoverNode=v.create("div",{"class":"jimu-more-icon-cover"},
jimuConfig.layoutId)},_resizeOpenedPanel:function(){var a;g.forEach(this.iconList,function(b){if(!b.isGroup()&&!1!==b.config.inPanel&&b.isOpen&&(a=this.panelManager.getPanelById(b.config.id+"_panel")))a.onWindowResize()},this);g.forEach(this.groupList,function(b){g.forEach(b.getItemList(),function(c){if(!1!==c.config.inPanel&&c.isOpen&&(a=this.panelManager.getPanelById(c.config.id+"_panel")))a.onWindowResize()},this)},this)},_makeIconVisible:function(a){if(this.visibleIcons!==this.iconList.length){a-=
Math.floor(this.visibleIcons/2);a=0<=a?a:0;var b=a+this.visibleIcons-1;b>=this.iconList.length&&(b=this.iconList.length-1,a=b-this.visibleIcons+1);this._adjustIconStyle(a,b)}},_adjustIconStyle:function(a,b){var c;g.forEach(this.iconList,function(f,h){f.visible=h>=a&&h<=b;c={position:"",left:"",top:"",display:f.visible?"":"none"};window.isRTL?c["margin-right"]=this.iconMargin+"px":c["margin-left"]=this.iconMargin+"px";k.set(f.domNode,c);k.set(f.iconItemNode,{width:"40px",height:"40px"});k.set(f.imgNode,
{width:"20px",height:"20px"})},this);b<this.allConfigs.length-1?(q.add(this.nextButton,"enabled"),this.enableNext=!0):(q.remove(this.nextButton,"enabled"),this.enableNext=!1);0<a?(this.enablePrevious=!0,q.add(this.previousButton,"enabled")):(this.enablePrevious=!1,q.remove(this.previousButton,"enabled"))}})});