// 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:{"url:widgets/Visibility/templates/symbologySettings.html":'\x3cdiv\x3e\r\n       \x3c!-- Visible Section DropDown --\x3e\r\n       \x3cdiv class\x3d"esriCTSettingsRow"\x3e\r\n        \x3cdiv class\x3d"esriCTLabelSettingsRightButton esriCTSettingsButtonIcon esriCTPointer"\r\n          title\x3d"${nls.visibleSectionButtonLabel}" data-dojo-attach-point\x3d"visibleSectionSettingsButton"\r\n          role\x3d"button" aria-label\x3d"${nls.visibleSectionButtonLabel}" tabindex\x3d"0" aria-expanded \x3d"false"\x3e\x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTInputLabelSettings esriCTEllipsis esriCTSubTitle" title\x3d"${nls.visibleSectionLabel}"\x3e\r\n          ${nls.visibleSectionLabel}\x3c/div\x3e\r\n      \x3c/div\x3e\r\n\r\n      \x3c!-- Visible Section Color Pickers --\x3e\r\n      \x3cdiv class\x3d"container esriCTGroupHidden" data-dojo-attach-point\x3d"visibleSectionContainer"\x3e\r\n        \x3cdiv class\x3d"esriCTEllipsis" title\x3d"${nls.outline}"\x3e${nls.outline}\x3c/div\x3e\r\n        \x3cdiv class\x3d"colorPicker Line" id\x3d"visibleSectionOutlineColor"\r\n          data-dojo-attach-point\x3d"visibleAreaOutlineColorPicker"\x3e\x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTEllipsis" title\x3d"${nls.fill}"\x3e${nls.fill}\x3c/div\x3e\r\n        \x3cdiv class\x3d"colorPicker Fill" id\x3d"visibleSectionFillColor"\r\n          data-dojo-attach-point\x3d"visibleAreaFillColorPicker"\x3e\x3c/div\x3e\r\n      \x3c/div\x3e\r\n\r\n      \x3c!-- Non-visible Section DropDown --\x3e\r\n      \x3cdiv class\x3d"esriCTSettingsRow"\x3e\r\n        \x3cdiv class\x3d"esriCTLabelSettingsRightButton esriCTSettingsButtonIcon esriCTPointer"\r\n        title\x3d"${nls.nonVisibleSectionButtonLabel}" data-dojo-attach-point\x3d"nonVisibleSectionSettingsButton"\r\n        role\x3d"button" aria-label\x3d"${nls.nonVisibleSectionButtonLabel}" tabindex\x3d"0" aria-expanded \x3d"false"\x3e\x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTInputLabelSettings esriCTEllipsis esriCTSubTitle" title\x3d"${nls.nonVisibleSectionLabel}"\x3e${nls.nonVisibleSectionLabel}\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n\r\n      \x3c!-- Non-visible Section --\x3e\r\n      \x3cdiv class\x3d"container esriCTGroupHidden" data-dojo-attach-point\x3d"nonVisibleSectionContainer"\x3e\r\n        \x3cdiv class\x3d"esriCTEllipsis" title\x3d"${nls.outline}"\x3e${nls.outline}\x3c/div\x3e\r\n        \x3cdiv class\x3d"colorPicker Line" id\x3d"nonVisibleSectionOutlineColor" data-dojo-attach-point\x3d"nonVisibleAreaOutlineColorPicker"\x3e\x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTEllipsis" title\x3d"${nls.fill}"\x3e${nls.fill}\x3c/div\x3e\r\n        \x3cdiv class\x3d"colorPicker Fill" id\x3d"nonVisibleSectionFillColor" data-dojo-attach-point\x3d"nonVisibleAreaFillColorPicker"\x3e\x3c/div\x3e\r\n      \x3c/div\x3e   \r\n\x3c/div\x3e'}});
define("dojo/_base/declare dojo/_base/array dojo/_base/html dojo/on ./ColorPickerEditor jimu/BaseWidget dijit/_WidgetsInTemplateMixin dojo/text!../templates/symbologySettings.html dojo/_base/lang dojo/Evented dojo/dom-class dojo/dom-attr dojo/query dojo/keys dojo/dom dijit/registry jimu/utils dijit/focus jimu/dijit/formSelect jimu/dijit/SymbolChooser".split(" "),function(v,e,f,l,w,x,y,z,c,A,p,q,g,h,B,n,r,t){return v([x,y,A],{baseClass:"jimu-widget-visibility-symbologySettings",templateString:z,selectedSettings:{},
colorPickerNodes:[],constructor:function(a){c.mixin(this,a)},startup:function(){if(!this.config.hasOwnProperty("symbology"))var a={visibleSectionOutlineColor:{color:"#000000",transparency:1,type:"esriSLSSolid"},visibleSectionFillColor:{color:"#00ff00",transparency:.5,type:"esriSFSSolid"},nonVisibleSectionOutlineColor:{color:"#000000",transparency:1,type:"esriSLSSolid"},nonVisibleSectionFillColor:{color:"#ff0000",transparency:.5,type:"esriSFSSolid"}};this.colorPickerNodes=g(".colorPicker",this.domNode);
e.forEach(this.colorPickerNodes,c.hitch(this,function(b){b=new w({nls:this.nls,type:p.contains(b,"Line")?"line":"fill"},b);b.setValues({color:a?a[b.id].color:this.config.symbology[b.id].color,transparency:a?a[b.id].transparency:this.config.symbology[b.id].transparency});b.startup();b.dropdown.set("value",a?a[b.id].type:this.config.symbology[b.id].type)}));var d=g(".jimu-color-pickerPopup",this.domNode);e.forEach(d,c.hitch(this,function(b){this.own(l(b,"keydown",c.hitch(this,function(k){k.keyCode!==
h.ENTER&&k.keyCode!==h.SPACE||k.currentTarget.click()})))}));this.onSettingsChanged()},postCreate:function(){this.inherited(arguments);this._handleClickEvents();this.visibleSectionSettingsButton.click()},_handleClickEvents:function(){this.own(l(this.visibleSectionSettingsButton,"click",c.hitch(this,function(){this._openCloseNodes(this.visibleSectionSettingsButton,this.visibleSectionContainer)})));this.own(l(this.nonVisibleSectionSettingsButton,"click",c.hitch(this,function(){this._openCloseNodes(this.nonVisibleSectionSettingsButton,
this.nonVisibleSectionContainer)})));this.own(l(this.visibleSectionSettingsButton,"keydown",c.hitch(this,function(a){a.keyCode!==h.ENTER&&a.keyCode!==h.SPACE||this._openCloseNodes(this.visibleSectionSettingsButton,this.visibleSectionContainer)})));this.own(l(this.nonVisibleSectionSettingsButton,"keydown",c.hitch(this,function(a){a.keyCode!==h.ENTER&&a.keyCode!==h.SPACE||this._openCloseNodes(this.nonVisibleSectionSettingsButton,this.nonVisibleSectionContainer)})))},_openCloseNodes:function(a,d){var b=
g(".container",this.domNode),k=g(".esriCTSettingsButtonIcon",this.domNode),u=!1;this.validInputs()&&(a&&p.contains(a,"esriCTLabelSettingsRightButton")&&(u=!0),e.forEach(b,c.hitch(this,function(m){f.addClass(m,"esriCTGroupHidden")})),e.forEach(k,c.hitch(this,function(m,C){f.removeClass(m,"esriCTLabelSettingsDownButton");f.addClass(m,"esriCTLabelSettingsRightButton");q.set(m,"aria-expanded","false");C===k.length-1&&setTimeout(c.hitch(this,function(){this._setLastFocusNode()}),100)})),u?(f.removeClass(d,
"esriCTGroupHidden"),f.removeClass(a,"esriCTLabelSettingsRightButton"),f.addClass(a,"esriCTLabelSettingsDownButton"),q.set(a,"aria-expanded","true"),a=g(".jimu-color-picker",d),a.length&&t.focus(a[0])):t.focus(a))},onClose:function(){if(!this.validInputs())return!1;this.onSettingsChanged();this._openCloseNodes()},onSettingsChanged:function(){e.forEach(this.colorPickerNodes,c.hitch(this,function(a){var d={color:n.byId(a.id).getValues().color,transparency:n.byId(a.id).getValues().transparency,type:n.byId(a.id).dropdown.getValue()};
this.selectedSettings[a.id]=d}));this.emit("settingsChanged",this.selectedSettings)},validInputs:function(){var a=!0;e.some(this.colorPickerNodes,function(d){if(!n.byId(d.id).validateSpinner())return a=!1,!0},this);return a},_setLastFocusNode:function(){if(p.contains(this.nonVisibleSectionSettingsButton,"esriCTLabelSettingsDownButton")){var a=g(".dijit",B.byId("nonVisibleSectionFillColor").lastElementChild)[0];r.initLastFocusNode(this.refDomNode,a)}else r.initLastFocusNode(this.refDomNode,this.nonVisibleSectionSettingsButton)}})});