// 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:{"widgets/DistanceAndDirection/setting/js/ColorPickerEditor":function(){define("dojo/_base/declare dojo/_base/Color dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!../templates/ColorPickerEditor.html jimu/dijit/ColorPickerPopup dijit/form/NumberSpinner".split(" "),function(r,t,f,l,k,m,u){return r([f,l,k],{_defaultColor:"#485566",templateString:m,nls:null,postCreate:function(){this.colorPicker=new u({color:this._defaultColor,width:this._defaultWidth},
this.colorPicker);this.colorPicker.startup();this.inherited(arguments)},startup:function(){this.inherited(arguments)},_isSameVal:function(){return this.slider.getValue()===this.spinner.getValue()},getValues:function(){var b=null,n=this.colorPicker.getColor();n&&(b=n);return b},setValues:function(b){if("object"===typeof b||"string"===typeof b)b=this._rgbToHex(b.color),this.colorPicker.setColor(new t(b))},_hexToRgb:function(b){return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],
16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},_componentToHex:function(b){b=b.toString(16);return 1===b.length?"0"+b:b},_rgbToHex:function(b){return"#"+this._componentToHex(b.r)+this._componentToHex(b.g)+this._componentToHex(b.b)}})})},"jimu/dijit/ColorPickerPopup":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dojo/_base/lang dojo/_base/html dojo/on dojo/_base/Color dijit/TooltipDialog dijit/popup jimu/dijit/ColorPalette jimu/utils".split(" "),function(r,t,f,l,
k,m,u,b,n,v,w){return r([t,f],{baseClass:"jimu-color-pickerPopup",declaredClass:"jimu.dijit.ColorPickerPopup",templateString:'\x3cdiv class\x3d"jimu-color-picker"\x3e\x3c/div\x3e',_isTooltipDialogOpened:!1,color:null,showLabel:!1,around:null,_ENABLE:!0,recordUID:"",postCreate:function(){this.inherited(arguments);this._createTooltipDialog(this.domNode);this._hideTooltipDialog()},destroy:function(){n.close(this.tooltipDialog);this.picker.destroy();this.tooltipDialog.destroy();this.inherited(arguments)},
enable:function(){this._ENABLE=!0;k.removeClass(this.domNode,"disable")},disable:function(){this._ENABLE=!1;k.addClass(this.domNode,"disable")},isPartOfPopup:function(e){var g=this.tooltipDialog.domNode;return e===g||k.isDescendant(e,g)},hideTooltipDialog:function(){this._hideTooltipDialog()},showTooltipDialog:function(){this._showTooltipDialog()},initUI:function(){this.picker.initUI()},isOpen:function(){return this._isTooltipDialogOpened},_showTooltipDialog:function(){n.open({parent:this.getParent(),
popup:this.tooltipDialog,around:this.around?this.around:this.domNode,orient:this.orient});this._isTooltipDialogOpened=!0},_hideTooltipDialog:function(){n.hide(this.tooltipDialog);this._isTooltipDialogOpened=!1},_createTooltipDialog:function(){var e=k.create("div");this.tooltipDialog=new b({content:e});k.addClass(this.tooltipDialog.domNode,"jimu-color-picker-popup-dialog");var g=new v({appearance:{showTransparent:!1,showColorPalette:!0,showCoustom:!0,showColorPickerOK:!0,showColorPickerApply:!0,showCoustomRecord:!0,
closeDialogWhenChange:!0},recordUID:this.recordUID,onChange:l.hitch(this,function(h){h&&(h=new u(h),this.setColor(h),this.onChange(h))})});g.placeAt(e);g.startup();this.own(m(g,"close",l.hitch(this,function(){this._hideTooltipDialog()})));this.own(m(g,"change-style",l.hitch(this,function(){this._hideTooltipDialog();this._showTooltipDialog()})));this.own(m(this.domNode,"click",l.hitch(this,function(h){h.stopPropagation();h.preventDefault();this._isTooltipDialogOpened?this._hideTooltipDialog():!1!==
this._ENABLE&&this._showTooltipDialog()})));this.own(m(document,"click",l.hitch(this,function(h){this.isPartOfPopup(h.srcElement||h.target)||this._hideTooltipDialog()})));this.picker=g},setColor:function(e){if(e instanceof u){null===this.color&&!0===this.showLabel&&this._changeLabel(e);var g=e.toHex();this.color=e;k.setStyle(this.domNode,"backgroundColor",g);this.picker&&(this.picker.refreshRecords(),this.picker.setColor(g,!1,!0));this.showLabel&&this._changeLabel(this.color)}},getColor:function(){return this.color},
_changeLabel:function(e){k.empty(this.domNode);k.create("span",{innerHTML:e.toHex(),className:"color-label",style:{color:w.invertColor(e.toHex())}},this.domNode)},onChange:function(e){e&&this.showLabel&&this._changeLabel(e)},changeColor:function(){this.picker&&this.picker.changeColor();this.showLabel&&this._changeLabel(this.color)},setTitle:function(e){this.domNode.title=e},getTooltipDialog:function(){return this.tooltipDialog||null}})})},"widgets/DistanceAndDirection/setting/_build-generate_module":function(){define(["dojo/text!./Setting.html",
"dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:widgets/DistanceAndDirection/setting/templates/ColorPickerEditor.html":'\x3cdiv class\x3d"colorPickerEditor"\x3e\r\n  \x3cdiv class\x3d"colorPicker" data-dojo-attach-point\x3d"colorPicker"\x3e\x3c/div\x3e\r\n\x3c/div\x3e',"url:widgets/DistanceAndDirection/setting/Setting.html":'\x3cdiv style\x3d"width:100%;height:100%;" class\x3d"nihilo"\x3e\r\n  \x3cdiv class\x3d"tabConfigurationContainer"\x3e\r\n    \x3c!-- tabs --\x3e\r\n    \x3cdiv class\x3d"tabConfigurationContainer" data-dojo-attach-point\x3d"tabsContainer"\x3e\r\n      \x3cdiv class\x3d"ddfeedbackStyle-tab" data-dojo-attach-point\x3d"ddFeedbackStyleTab"\x3e\r\n        \x3cdiv\x3e\r\n          \x3ch3 class\x3d"distance-and-direction-setting-h3"\x3e${nls.feedbackStyleLabel}\x3c/h3\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"feedbackTable" class\x3d"table-feedbacks"\x3e\x3c/div\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"labelTable" class\x3d"table-labels"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n      \x3cdiv class\x3d"miscellaneous-tab" data-dojo-attach-point\x3d"miscellaneousTab"\x3e\r\n        \x3cdiv class\x3d"miscellaneousTabContainer"\x3e\r\n          \x3clabel class\x3d"opLayerlabelSettings"\x3e${nls.operationalLineLayerSelectLabel}\x3c/label\x3e\r\n          \x3cselect class\x3d"opLayerSelectSettings" data-dojo-attach-point\x3d"opLineLayerList"\x3e\x3c/select\x3e\r\n          \x3cdiv title\x3d"${nls.helpIconPolylineTooltip}" class\x3d"jimu-icon helpBtn safari_only"\r\n            data-dojo-attach-point\x3d"helpLineBtn"\x3e\r\n          \x3c/div\x3e\r\n          \x3clabel class\x3d"opLayerlabelSettings"\x3e${nls.operationalPolygonLayerSelectLabel}\x3c/label\x3e\r\n          \x3cselect class\x3d"opLayerSelectSettings" data-dojo-attach-point\x3d"opPolygonLayerList"\x3e\x3c/select\x3e\r\n          \x3cdiv title\x3d"${nls.helpIconPolygonTooltip}" class\x3d"jimu-icon helpBtn safari_only"\r\n            data-dojo-attach-point\x3d"helpPolygonBtn"\x3e\r\n          \x3c/div\x3e\r\n        \x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e',
"url:widgets/DistanceAndDirection/setting/css/style.css":".distance-and-direction-setting .table-feedbacks {width: 100%; height: 197px; margin-top: 15px;}.distance-and-direction-setting .table-labels {width: 100%; height: 77px; margin-top: 15px;}.distance-and-direction-setting .simple-table-row {height: 40px;}.jimu-simple-table .body-section .table-div {background-image: url(./images/table_under_line.png) !important;}.distance-and-direction-setting {margin-left: 0px;}.distance-and-direction-setting-h3 {color: #596679;}.distance-and-direction-setting-style table {color: #333333; width: 100%; border-collapse: collapse;}.distance-and-direction-setting-style th {background-color: #518dca; padding: 8px; text-align: left; color: #ffffff;}.distance-and-direction-setting-style tr {background-color: #ffffff;}.distance-and-direction-setting-style td {padding: 8px;}.settings-section tr {vertical-align: top;}.distance-and-direction-setting-line-size {width: 70px;}.distance-and-direction-setting-color-picker {width: 70px;}.distance-and-direction-setting-interval-width {border-color: #000; border-style: hidden solid solid solid; border-width: 1px; height: 10px; margin: auto;}.distance-and-direction-setting-style-map {width: 500px; height: 550px; float: left;}.distance-and-direction-setting .tabs .titles {font-weight: bold; font-family: \"Avenir Medium\"; font-size: 12px; margin: 10px 0 5px 0;}.distance-and-direction-setting .helpBtn {float: right; background: url(./images/help_black.png); background-repeat: no-repeat; background-color: transparent; width: 16px; height: 16px; margin-top: 13px; vertical-align: middle;}@media not all and (min-resolution:.001dpcm) {@supports (-webkit-appearance:none) and (stroke-color:transparent) {.distance-and-direction-setting .helpBtn.safari_only {margin-top: 8px;}}}.jimu-rtl .distance-and-direction-setting .helpBtn {float: left; transform: rotateY(180deg);}.jimu-rtl .distance-and-direction-setting .helpBtn:lang(he) {transform: rotateY(0deg);}.distance-and-direction-setting .helpBtn:hover {background: url(./images/help_black_hover.png);}.distance-and-direction-setting .opLayerlabelSettings {padding: 0px; font-size: initial;}.distance-and-direction-setting .opLayerSelectSettings {height: 30px; color: #7d7d7d; padding: 0 5px 0 5px; font-size: 13px; width: 96%; font-family: 'Avenir Medium'; margin: 7px 0px 20px 0px;}.distance-and-direction-setting .DropdownLabel {line-height: 28px; padding-bottom: 5px; padding-top: 5px;}.distance-and-direction-setting .Ellipsis {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}.distance-and-direction-setting .miscellaneousTabContainer {margin: 20px; width: 50%;}.distance-and-direction-setting .miscellaneous-tab {height: 60%;}.distance-and-direction-setting .tabConfigurationContainer {width: 100%; height: 100%;}.distance-and-direction-setting .jimu-tab3 {height: 100%; overflow: hidden;}.distance-and-direction-setting .jimu-viewstack {height: calc(100% - 45px); overflow: auto;}",
"*now":function(r){r(['dojo/i18n!*preload*widgets/DistanceAndDirection/setting/nls/Setting*["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/html dojo/_base/lang dojo/_base/array dojo/_base/Color dojo/query jimu/dijit/TabContainer3 jimu/BaseWidgetSetting jimu/dijit/SimpleTable jimu/LayerStructure jimu/utils dijit/form/NumberSpinner dijit/registry jimu/dijit/Message dijit/_WidgetsInTemplateMixin ./js/ColorPickerEditor dijit/ColorPalette".split(" "),function(r,t,f,l,k,m,u,b,n,v,w,e,g,h,x,y){return r([b,x],{baseClass:"distance-and-direction-setting",postCreate:function(){this.inherited(arguments);this._populateLayerSelect(this._getAllMapLayers("esriGeometryPolyline"),
this.opLineLayerList);this._populateLayerSelect(this._getAllMapLayers("esriGeometryPolygon"),this.opPolygonLayerList);var a=this.config.operationalLineLayer?this.config.operationalLineLayer.name:"";this._setSelectedOption(this.opLineLayerList,a);a=this.config.operationalPolygonLayer?this.config.operationalPolygonLayer.name:"";this._setSelectedOption(this.opPolygonLayerList,a)},startup:function(){this.tab=new u({tabs:[{title:this.nls.ddFeedbackStyleTabLabel,content:this.ddFeedbackStyleTab},{title:this.nls.miscellaneousTabLabel,
content:this.miscellaneousTab}],selected:this.nls.gridTabLabel});this.tab.placeAt(this.tabsContainer);this.tab.startup();this.inherited(arguments);var a={fields:[{name:"showTab",title:this.nls.showTabLabel,width:"16%",type:"checkbox",onChange:f.hitch(this,this._checkBoxChange),"class":"show"},{name:"index",title:"index",type:"text",hidden:!0},{name:"feedbackShape",title:this.nls.feedbackShapeLabel,width:"28%",type:"text"},{name:"lineColor",title:this.nls.lineColorLabel,create:f.hitch(this,this._createColorPicker),
setValue:f.hitch(this,this._setColorPicker),getValue:f.hitch(this,this._getColorPicker),width:"28%",type:"extension"},{name:"lineWidth",title:this.nls.lineWidthLabel,create:f.hitch(this,this._createNumberSpinner),setValue:f.hitch(this,this._setNumberSpinnerValue),getValue:f.hitch(this,this._getNumberSpinnerValue),type:"extension",width:"28%"}],selectable:!0,autoHeight:!1};this.displayFeedbackTable=new n(a);this.displayFeedbackTable.placeAt(this.feedbackTable);t.setStyle(this.displayFeedbackTable.domNode,
{height:"100%"});a={fields:[{name:"index",title:"index",type:"text",hidden:!0},{name:"feedbackLabel",title:this.nls.feedbackLabel,width:"44%",type:"text"},{name:"textColor",title:this.nls.textColorLabel,create:f.hitch(this,this._createColorPicker),setValue:f.hitch(this,this._setColorPicker),getValue:f.hitch(this,this._getColorPicker),width:"28%",type:"extension"},{name:"textSize",title:this.nls.textSizeLabel,create:f.hitch(this,this._createTextNumberSpinner),setValue:f.hitch(this,this._setNumberSpinnerValue),
getValue:f.hitch(this,this._getNumberSpinnerValue),type:"extension",width:"28%"}],selectable:!0,autoHeight:!1};this.displayLabelTable=new n(a);this.displayLabelTable.placeAt(this.labelTable);t.setStyle(this.displayLabelTable.domNode,{height:"100%"});this.setConfig(this.config)},_createColorPicker:function(a){var d=new y({nls:this.nls});d.placeAt(a);d.startup()},_getColorPicker:function(a){return g.byId(a.childNodes[0].id).getValues()},_setColorPicker:function(a,d){g.byId(a.childNodes[0].id).setValues({color:new k(d)})},
_createNumberSpinner:function(a){(new e({value:2,smallDelta:1,constraints:{min:1,max:10,places:0},style:"width:100px"})).placeAt(a)},_createTextNumberSpinner:function(a){(new e({value:12,smallDelta:1,constraints:{min:1,max:36,places:0},style:"width:100px"})).placeAt(a)},_getNumberSpinnerValue:function(a){return m(".dijitInputInner",a)[0].value},_setNumberSpinnerValue:function(a,d){m(".dijitInputInner",a)[0].value=d},setConfig:function(a){a=[{showTab:a.feedback.lineSymbol.showTab,color:a.feedback.lineSymbol.color,
width:a.feedback.lineSymbol.width},{showTab:a.feedback.circleSymbol.showTab,color:a.feedback.circleSymbol.outline.color,width:a.feedback.circleSymbol.outline.width},{showTab:a.feedback.ellipseSymbol.showTab,color:a.feedback.ellipseSymbol.outline.color,width:a.feedback.ellipseSymbol.outline.width},{showTab:a.feedback.rangeRingSymbol.showTab,color:a.feedback.rangeRingSymbol.color,width:a.feedback.rangeRingSymbol.width},{color:a.feedback.labelSymbol.color,width:a.feedback.labelSymbol.font.size}];this._setFeedbackTable([{shape:this.nls.lineLabel},
{shape:this.nls.circleLabel},{shape:this.nls.ellipseLabel},{shape:this.nls.ringsLabel}],a);this.config.hasOwnProperty("operationalLineLayer")&&""!==this.config.operationalLineLayer.name?this._setSelectedOption(this.opLineLayerList,this.config.operationalLineLayer.name):this.opLineLayerList.value="";this.config.hasOwnProperty("operationalPolygonLayer")&&""!==this.config.operationalPolygonLayer.name?this._setSelectedOption(this.opPolygonLayerList,this.config.operationalPolygonLayer.name):this.opPolygonLayerList.value=
"";this.displayLabelTable.clear();this.displayLabelTable.addRow({feedbackLabel:this.nls.feedbackLabel,index:"0",textColor:a[4].color,textSize:a[4].width})},_setSelectedOption:function(a,d){for(var c=0;c<a.options.length;c++)if(a.options[c].value===d){a.selectedIndex=c;break}},_setFeedbackTable:function(a,d){this.displayFeedbackTable.clear();for(var c=0;c<a.length;c++)this.displayFeedbackTable.addRow({feedbackShape:a[c].shape,index:""+c,showTab:d[c].showTab,lineColor:d[c].color,lineWidth:d[c].width})},
getConfig:function(){var a=this.displayFeedbackTable.getData(),d=this.displayLabelTable.getData(),c=0,p=!0;l.forEach(a,function(q){this._validateLineWidthValue(q.lineWidth)||(p=!1);q.showTab&&(c+=1)},this);if(!p||!this._validateLabelTextSizeValue(d[0].textSize))return!1;if(0!==c)return this.config.feedback={lineSymbol:{showTab:a[0].showTab,type:"esriSLS",style:"esriSLSSolid",color:a[0].lineColor,width:a[0].lineWidth},circleSymbol:{showTab:a[1].showTab,type:"esriSFS",style:"esriSFSNull",color:[255,
0,0,0],outline:{color:a[1].lineColor,width:a[1].lineWidth,type:"esriSLS",style:"esriSLSSolid"}},ellipseSymbol:{showTab:a[2].showTab,type:"esriSFS",style:"esriSFSNull",color:[255,0,0,0],outline:{color:a[2].lineColor,width:a[2].lineWidth,type:"esriSLS",style:"esriSLSSolid"}},rangeRingSymbol:{showTab:a[3].showTab,type:"esriSLS",style:"esriSLSSolid",color:a[3].lineColor,width:a[3].lineWidth},labelSymbol:{type:"esriTS",color:d[0].textColor,verticalAlignment:"middle",horizontalAlignment:"center",xoffset:0,
yoffset:0,kerning:!0,font:{family:"arial",size:d[0].textSize,style:"normal",weight:"normal",decoration:"none"}}},this.config.operationalLineLayer={name:this.opLineLayerList.value},this.config.operationalPolygonLayer={name:this.opPolygonLayerList.value},this.config;new h({message:this.nls.tabErrorMessage});return!1},_getAllMapLayers:function(a){var d=[];v.getInstance().traversal(function(c){"undefined"!==typeof c._layerInfo.layerObject.type&&-1===c._layerInfo.layerObject.type.indexOf("tile")&&c._layerInfo.layerObject.geometryType===
a&&d.push(c._layerInfo.layerObject)});return d},_validateLineWidthValue:function(a){return!isNaN(a)&&0<a&&11>a?!0:!1},_validateLabelTextSizeValue:function(a){return!isNaN(a)&&0<a&&37>a?!0:!1},_populateLayerSelect:function(a,d){var c=document.createElement("option");c.value="";c.innerHTML="";c.selected=!0;d.appendChild(c);l.forEach(a,f.hitch(this,function(p){if(p.url&&"Feature Layer"===p.type&&this._containsSupportedCapabilities(p.capabilities)){var q=document.createElement("option");q.value=p.name;
q.id=p.id;q.innerHTML=w.sanitizeHTML(p.name);q.selected=!1;d.appendChild(q)}}))},_containsSupportedCapabilities:function(a){var d=!0;["create","delete","query","update","editing"].forEach(function(c){-1===a.toLowerCase().split(",").indexOf(c)&&(d=!1)});return d}})});