// 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/Coordinate/setting/Edit":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/html dojo/_base/array dijit/_WidgetsInTemplateMixin jimu/BaseWidgetSetting jimu/dijit/CheckBox dojo/text!./Edit.html jimu/utils jimu/SpatialReference/srUtils dijit/form/ValidationTextBox dijit/form/Select".split(" "),function(u,l,n,w,y,v,x,t,m,e){var f=[{value:"",label:"Default",selected:!0,disabled:!1},{value:"",label:"",selected:!0,disabled:!1},{value:"INCHES",label:"Inches",selected:!1,
disabled:!1},{value:"FOOT",label:"Foot",selected:!1,disabled:!1},{value:"FOOT_US",label:"Foot_US",selected:!1,disabled:!1},{value:"YARDS",label:"Yards",selected:!1,disabled:!1},{value:"MILES",label:"Miles",selected:!1,disabled:!1},{value:"NAUTICAL_MILES",label:"Nautical_Miles",selected:!1,disabled:!1},{value:"MILLIMETERS",label:"Millimeters",selected:!1,disabled:!1},{value:"CENTIMETERS",label:"Centimeters",selected:!1,disabled:!1},{value:"METER",label:"Meter",selected:!1,disabled:!1},{value:"KILOMETERS",
label:"Kilometers",selected:!1,disabled:!1},{value:"DECIMETERS",label:"Decimeters",selected:!1,disabled:!1},{value:"",label:"",selected:!0,disabled:!1},{value:"DECIMAL_DEGREES",label:"Decimal_Degrees",selected:!1,disabled:!1},{value:"DEGREES_DECIMAL_MINUTES",label:"Degrees_Decimal_Minutes",selected:!1,disabled:!1},{value:"DEGREE_MINUTE_SECONDS",label:"Degree_Minutes_Seconds",selected:!1,disabled:!1},{value:"",label:"",selected:!0,disabled:!1},{value:"MGRS",label:"MGRS",selected:!1,disabled:!1},{value:"USNG",
label:"USNG",selected:!1,disabled:!1}];return u([v,y],{baseClass:"jimu-coordinate-edit",templateString:t,currentWkid:null,version:null,enhanceVersion:10.1,_config:null,postCreate:function(){this.inherited(arguments);this.transformForward=new x({label:this.nls.forward,checked:!1},this.transformForward);this.version<this.enhanceVersion?(n.setStyle(this.olderVersionDiv,"display","block"),n.setStyle(this.enhanceVersionDiv,"display","none")):(n.setStyle(this.olderVersionDiv,"display","none"),n.setStyle(this.enhanceVersionDiv,
"display","block"));n.setStyle(this.transformDiv,"display","none");n.setStyle(this.transformForward.domNode,"display","none");this.wkid.set("missingMessage",this.nls.warning);this.transformationWkid.set("missingMessage",this.nls.tfWarning)},setConfig:function(a){this._config=l.clone(a);e.loadResource().then(l.hitch(this,function(){a.wkid&&(this.wkid.set("value",parseInt(a.wkid,10)),this.currentWkid=parseInt(a.wkid,10),this._adjustUnitOption());a.label&&(this.wkidLabel.innerHTML=m.sanitizeHTML(a.label));
a.outputUnit&&this.outputUnit.set("value",a.outputUnit);a.transformationWkid&&this.transformationWkid.set("value",parseInt(a.transformationWkid,10));a.transformationLabel&&(this.transformationLabel.innerHTML=m.sanitizeHTML(a.transformationLabel));a.transformForward&&this.transformForward.setValue(a.transformForward)}),l.hitch(this,function(k){console.error(k)}))},getConfig:function(){var a={wkid:e.standardizeWkid(this.wkid.get("value")),label:this.wkidLabel.innerHTML,outputUnit:this.outputUnit.get("value"),
transformationWkid:parseInt(this.transformationWkid.get("value"),10),transformationLabel:this.transformationLabel.innerHTML,transformForward:this.transformForward.getValue()};a.outputUnit=a.outputUnit||e.getCSUnit(a.wkid);var k={sameSRWithMap:e.isSameSR(a.wkid,this.map.spatialReference.wkid),isGeographicCS:e.isGeographicCS(a.wkid),isGeographicUnit:e.isGeographicUnit(a.outputUnit),isProjectedCS:e.isProjectedCS(a.wkid),isProjectUnit:e.isProjectUnit(a.outputUnit),spheroidCS:e.isProjectedCS(a.wkid)?e.getGeoCSByProj(a.wkid):
a.wkid,defaultUnit:e.getCSUnit(a.wkid),unitRate:e.getUnitRate(e.getCSUnit(a.wkid),a.outputUnit)};"DEGREES_DECIMAL_MINUTES"===a.outputUnit&&(k.isGeographicUnit=!0,k.unitRate=1);k.isGeographicUnit&&k.isProjectedCS&&(k.unitRate=1);a.options=k;return a},_removeGeoUnits:function(){w.forEach(e.getGeographicUnits(),l.hitch(this,function(a){this.outputUnit.removeOption(a)}));this.outputUnit.removeOption("DEGREES_DECIMAL_MINUTES")},_removeProjUnits:function(){w.forEach(e.getProjectUnits(),l.hitch(this,function(a){this.outputUnit.removeOption(a)}))},
_removeAllUnits:function(){for(var a=0,k=f.length;a<k;a++)this.outputUnit.removeOption(f[a].value)},_addAllUnits:function(){for(var a=0,k=f.length;a<k;a++){var r=l.clone(f[a]);r.label=this.nls[f[a].label];this.outputUnit.addOption(r)}},_adjustUnitOption:function(){if(this.currentWkid===this.map.spatialReference.wkid){if(e.isWebMercator(this.currentWkid))return;4326===this.currentWkid?this._removeProjUnits():e.isGeographicCS(this.currentWkid)?this._removeProjUnits():e.isProjectedCS(this.currentWkid)&&
(this._removeGeoUnits(),this.outputUnit.removeOption("USNG"),this.outputUnit.removeOption("MGRS"))}else e.isGeographicCS(this.currentWkid)&&this._removeProjUnits();this._config.outputUnit&&this.outputUnit.set("value",this._config.outputUnit)},_isDefaultSR:function(){var a=this.wkid.get("value");return e.isSameSR(a,this.map.spatialReference.wkid)},onWkidChange:function(a){var k="",r=parseInt(a,10);this.popup.disableButton(0);e.isValidWkid(r)?(k=e.getSRLabel(r),this.wkidLabel.innerHTML=m.sanitizeHTML(k),
e.isSameSpheroid(r,this.map.spatialReference.wkid)?(this.transformationWkid.set("value",""),n.setStyle(this.transformDiv,"display","none")):n.setStyle(this.transformDiv,"display","block"),this.popup.enableButton(0)):a&&(this.wkid.set("value",""),this.wkidLabel.innerHTML=this.nls.cName);this.currentWkid!==r&&this.transformationWkid.set("value","");this.currentWkid=r;this._removeAllUnits();this._addAllUnits();this._adjustUnitOption();this.outputUnit.closeDropDown()},ontfWkidChange:function(a){if(a){var k=
"",r="";a=parseInt(a,10);e.isValidTfWkid(a)?(k=a,r=e.getTransformationLabel(a),this.transformationLabel.innerHTML=m.sanitizeHTML(r),n.setStyle(this.transformForward.domNode,"display","block")):(this.transformationLabel.innerHTML=this.nls.tName,n.setStyle(this.transformForward.domNode,"display","none"));this.transformationWkid.set("value",k)}else this.transformationLabel.innerHTML=this.nls.tName,n.setStyle(this.transformForward.domNode,"display","none")}})})},"jimu/SpatialReference/srUtils":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred dojo/promise/all dojo/request esri/SpatialReference ./unitUtils".split(" "),
function(u,l,n,w,y,v,x,t){var m=null,e=null,f=!1,a=u(null,function(){});u=require.toUrl("jimu");var k=v(u+"/SpatialReference/cs.json",{handleAs:"json"}),r=v(u+"/SpatialReference/transform.json",{handleAs:"json"});a.loadResource=function(){var b=new w;if(m&&e)return b.resolve(),b;y([k,r]).then(function(g){m=g[0];e=g[1];f=!0;b.resolve()},function(g){console.error(g);f=!1;b.reject(g)});return b};a.getAllCSUnits=function(){if(f){var b=[];n.forEach(m.wkids,l.hitch(this,function(g){g=this.getCSUnit(g);
-1===n.indexOf(b,g)&&b.push(g)}));return b}};a.convertUnit=function(b,g,z){if(f)return t.convertUnit(b,g,z)};a.getUnitRate=function(b,g){if(f)return t.getUnitRate(b,g)};a.isProjectUnit=function(b){if(f)return t.isProjectUnit(b)};a.isGeographicUnit=function(b){if(f)return t.isGeographicUnit(b)};a.getGeographicUnits=function(){if(f)return t.getGeographicUnits()};a.getProjectUnits=function(){if(f)return t.getProjectUnits()};a.getCSUnit=function(b){if(f)return b=n.indexOf(m.wkids,b),m.units[b]};a.isSameSR=
function(b,g){if(f)return b=this.indexOfWkid(b),g=this.indexOfWkid(g),m.labels[b]===m.labels[g]};a.isValidWkid=function(b){if(f)return-1<this.indexOfWkid(b)};a.getSRLabel=function(b){if(f&&this.isValidWkid(b))return b=this.indexOfWkid(b),m.labels[b]};a.indexOfWkid=function(b){if(f)return n.indexOf(m.wkids,b)};a.isWebMercator=function(b){return x.prototype._isWebMercator?x.prototype._isWebMercator.apply({wkid:parseInt(b,10)},[]):(new x(parseInt(b,10))).isWebMercator()};a.standardizeWkid=function(b){return this.isWebMercator(b)?
3857:parseInt(b,10)};a.isValidTfWkid=function(b){if(f)return-1<this.indexOfTfWkid(b)};a.getTransformationLabel=function(b){if(f)return this.isValidTfWkid(b)?(b=this.indexOfTfWkid(b),e.labels[b]):""};a.indexOfTfWkid=function(b){if(f)return n.indexOf(e.tfWkids,b)};a.isGeographicCS=function(b){if(f)return this.isValidWkid(b)?(b=this.indexOfWkid(b),!m.projSR[b]):!1};a.isProjectedCS=function(b){if(f)return this.isValidWkid(b)?(b=this.indexOfWkid(b),m.projSR[b]):!1};a.getGeoCSByProj=function(b){if(f&&this.isProjectedCS(b))return b=
this.indexOfWkid(b),m.spheroids[b]};a.getSpheroidStr=function(b){if(f)return this.isGeographicCS(b)?m.labels[this.indexOfWkid(b)]:this.isProjectedCS(b)?(b=a.getGeoCSByProj(b),m.labels[this.indexOfWkid(b)]):null};a.isSameSpheroid=function(b,g){if(f)return b=this.getSpheroidStr(b),g=this.getSpheroidStr(g),b&&g&&b===g?!0:!1};return a})},"widgets/Coordinate/setting/_build-generate_module":function(){define(["dojo/text!./Setting.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},
"url:widgets/Coordinate/setting/Edit.html":'  \x3cdiv style\x3d"width:100%"\x3e\r\n    \x3cdiv class\x3d"output-wkid edit-module" data-dojo-attach-point\x3d"outputDiv"\x3e\r\n      \x3ctable cellspacing\x3d"0"\x3e\r\n        \x3ctbody\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd\x3e\r\n              \x3cdiv class\x3d"wkid-header"\x3e\r\n                \x3cspan\x3e${nls.output}\x3c/span\x3e\r\n                \x3ca href\x3d"https://developers.arcgis.com/javascript/jshelp/ref_coordsystems.html" target\x3d"blank"\x3eWKID\x3c/a\x3e\r\n              \x3c/div\x3e\r\n            \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd\x3e\r\n              \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/ValidationTextBox" required\x3d"true"\r\n            placeHolder\x3d"WKID" data-dojo-attach-event\x3d"onChange:onWkidChange"\r\n            data-dojo-attach-point\x3d"wkid" data-dojo-props\x3d\'style:{width:"100%"}\' /\x3e\r\n            \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd\x3e\r\n              \x3cspan class\x3d"wkid-label" data-dojo-attach-point\x3d"wkidLabel"\x3e${nls.cName}\x3c/span\x3e\r\n            \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n        \x3c/tbody\x3e\r\n      \x3c/table\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"display-units edit-module" data-dojo-attach-point\x3d"displayUnits"\x3e\r\n      \x3ctable cellspacing\x3d"0"\x3e\r\n        \x3ctbody\x3e\r\n          \x3ctr\x3e\r\n            \x3ctd class\x3d"display"\x3e\r\n              \x3cspan title\x3d"${nls.units}"\x3e${nls.units}\x3c/span\x3e\r\n            \x3c/td\x3e\r\n            \x3ctd class\x3d"units"\x3e\r\n              \x3cselect data-dojo-attach-point\x3d"outputUnit" data-dojo-type\x3d"dijit/form/Select"\x3e\r\n                \x3coption value\x3d""\x3e${nls.Default}\x3c/option\x3e\r\n                \x3coption type\x3d"separator"\x3e\x3c/option\x3e\r\n                \x3coption value\x3d"INCHES"\x3e${nls.Inches}\x3c/option\x3e\r\n                \x3coption value\x3d"FOOT"\x3e${nls.Foot}\x3c/option\x3e\r\n                \x3coption value\x3d"FOOT_US"\x3e${nls.Foot_US}\x3c/option\x3e\r\n                \x3coption value\x3d"YARDS"\x3e${nls.Yards}\x3c/option\x3e\r\n                \x3coption value\x3d"MILES"\x3e${nls.Miles}\x3c/option\x3e\r\n                \x3coption value\x3d"NAUTICAL_MILES"\x3e${nls.Nautical_Miles}\x3c/option\x3e\r\n                \x3coption value\x3d"MILLIMETERS"\x3e${nls.Millimeters}\x3c/option\x3e\r\n                \x3coption value\x3d"CENTIMETERS"\x3e${nls.Centimeters}\x3c/option\x3e\r\n                \x3coption value\x3d"METER"\x3e${nls.Meter}\x3c/option\x3e\r\n                \x3coption value\x3d"KILOMETERS"\x3e${nls.Kilometers}\x3c/option\x3e\r\n                \x3coption value\x3d"DECIMETERS"\x3e${nls.Decimeters}\x3c/option\x3e\r\n                \x3coption type\x3d"separator"\x3e\x3c/option\x3e\r\n                \x3coption value\x3d"DECIMAL_DEGREES"\x3e${nls.Decimal_Degrees}\x3c/option\x3e\r\n                \x3coption value\x3d"DEGREES_DECIMAL_MINUTES"\x3e${nls.Degrees_Decimal_Minutes}\x3c/option\x3e\r\n                \x3coption value\x3d"DEGREE_MINUTE_SECONDS"\x3e${nls.Degree_Minutes_Seconds}\x3c/option\x3e\r\n                \x3coption type\x3d"separator"\x3e\x3c/option\x3e\r\n                \x3coption value\x3d"MGRS"\x3e${nls.MGRS}\x3c/option\x3e\r\n                \x3coption value\x3d"USNG"\x3e${nls.USNG}\x3c/option\x3e\r\n              \x3c/select\x3e\r\n            \x3c/td\x3e\r\n          \x3c/tr\x3e\r\n        \x3c/tbody\x3e\r\n      \x3c/table\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"enhanceVersionDiv"\x3e\r\n      \x3cdiv class\x3d"datum-wkid edit-module" data-dojo-attach-point\x3d"transformDiv"\x3e\r\n        \x3ctable cellspacing\x3d"0"\x3e\r\n          \x3ctbody\x3e\r\n            \x3ctr\x3e\r\n              \x3ctd\x3e\r\n                \x3cdiv class\x3d"wkid-header"\x3e\r\n                  \x3cspan\x3e${nls.datum}\x3c/span\x3e\r\n                  \x3ca href\x3d"http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000r8000000" target\x3d"blank"\x3eTFWKID\x3c/a\x3e\r\n                \x3c/div\x3e\r\n              \x3c/td\x3e\r\n            \x3c/tr\x3e\r\n            \x3ctr\x3e\r\n              \x3ctd\x3e\r\n                \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/ValidationTextBox" required\x3d"true" placeHolder\x3d"${nls.tWKIDPlaceHolder}"\r\n              data-dojo-attach-point\x3d"transformationWkid" data-dojo-attach-event\x3d"onChange:ontfWkidChange" data-dojo-props\x3d\'style:{width:"100%"}\' /\x3e\r\n              \x3c/td\x3e\r\n            \x3c/tr\x3e\r\n            \x3ctr\x3e\r\n              \x3ctd\x3e\r\n                \x3cspan class\x3d"wkid-label" data-dojo-attach-point\x3d"transformationLabel"\x3e${nls.tName}\x3c/span\x3e\r\n              \x3c/td\x3e\r\n            \x3c/tr\x3e\r\n          \x3c/tbody\x3e\r\n        \x3c/table\x3e\r\n        \x3cdiv class\x3d"check" data-dojo-attach-point\x3d"transformForward"\x3e\x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"older-version" data-dojo-attach-point\x3d"olderVersionDiv"\x3e${nls.olderVersion}\x3c/div\x3e\r\n  \x3c/div\x3e',
"url:widgets/Coordinate/setting/Setting.html":'\x3cdiv class\x3d"jimu-widget-coordinate-setting"\x3e\r\n  \x3cdiv class\x3d"settings-section" data-dojo-attach-point\x3d"searchesSection"\x3e\r\n    \x3cp\x3e${nls.state}\x3c/p\x3e\r\n    \x3cdiv class\x3d"add-output-coordinate" data-dojo-attach-event\x3d"onclick: onAddClick"\x3e\r\n      \x3cspan class\x3d"add-output-coordinate-icon"\x3e\x3c/span\x3e\r\n      \x3cspan class\x3d"add-output-coordinate-label"\x3e${nls.add}\x3c/span\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"coordinate-table" data-dojo-attach-point\x3d"tableCoordinate"\x3e\x3c/div\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"displayNumber" class\x3d"display-number"\x3e\r\n      \x3cspan class\x3d"spinner-label ops-label"\x3e${nls.spinnerLabel}\x3c/span\x3e\r\n      \x3cinput type\x3d"text" data-dojo-type\x3d"dijit/form/NumberSpinner" value\x3d"3" data-dojo-attach-point\x3d"spinner" data-dojo-props\x3d"constraints: {min:0}"\x3e\r\n      \x3cspan class\x3d"demical-place"\x3e${nls.decimalPlace}\x3c/span\x3e\r\n      \x3cdiv class\x3d"separator"\x3e\r\n        \x3cdiv class\x3d"check" data-dojo-attach-point\x3d"separator"\x3e\x3c/div\x3e\r\n      \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\r\n    \x3cdiv class\x3d"displayOrder"\x3e\r\n      \x3cspan class\x3d"jimu-float-leading displayOrderTips"\x3e${nls.displayOrderLonLatTips}\x3c/span\x3e\r\n      \x3cspan class\x3d"order"\x3e\r\n        \x3cdiv class\x3d"jimu-float-leading order-btn"\x3e\r\n          \x3cinput data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"lonLat" id\x3d"lonLat"/\x3e\r\n          \x3clabel for\x3d"lonLat"\x3e${nls.lonLatTips}\x3c/label\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"jimu-float-leading order-btn"\x3e\r\n          \x3cinput data-dojo-type\x3d"dijit/form/RadioButton" data-dojo-attach-point\x3d"latLon" id\x3d"latLon"/\x3e\r\n          \x3clabel for\x3d"latLon"\x3e${nls.latLonTips}\x3c/label\x3e\r\n        \x3c/div\x3e\r\n      \x3c/span\x3e\r\n    \x3c/div\x3e\r\n  \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/Coordinate/setting/css/style.css":".jimu-widget-coordinate-setting{margin:0; padding:0; font-size: 14px; padding-top: 20px; color: #596679;}.jimu-widget-coordinate-setting .dijitSelect{height: 30px; width: 100%;}.jimu-widget-coordinate-setting .dijitArrowButtonContainer{width: 17px;}.jimu-widget-coordinate-setting .zoom-scale-table{margin-top:12px;}.jimu-widget-coordinate-setting .settings-section p{font-size: 14px; margin-bottom: 20px;}.jimu-widget-coordinate-setting .add-output-coordinate{margin-bottom: 7px; cursor: pointer; display: inline-block;}.jimu-widget-coordinate-setting .add-output-coordinate-icon{background-image: url(images/add_icon.png); background-repeat: no-repeat; background-position: center; width: 14px; height: 14px; display: inline-block; vertical-align: middle;}.jimu-widget-coordinate-setting .add-output-coordinate-label{font-size: 14px; color: #518dca; margin-left: 10px; display: inline-block; height: 100%; text-decoration: underline;}.jimu-widget-coordinate-setting .wkid, .jimu-widget-coordinate-setting .transformationWkid,.jimu-widget-coordinate-setting .actions{width: 120px;}.jimu-widget-coordinate-setting .coordinate-table{height: 186px;}.jimu-widget-coordinate-setting .display-number,.jimu-widget-coordinate-setting .separator{margin-top: 10px;}.jimu-widget-coordinate-setting .display-number .ops-label{min-width: 150px; display: inline-block;}.jimu-widget-coordinate-setting .display-number .dijitNumberTextBox {width: 70px;}.jimu-coordinate-edit{width: 100%; font-size: 16px; color: #596679;}.jimu-coordinate-edit table{width: calc(100% - 2px);}.jimu-coordinate-edit .wkid-header{margin: 0 0 10px;}.jimu-coordinate-edit .check{margin-top: 10px;}.jimu-coordinate-edit .label{font-size: 14px;}.jimu-coordinate-edit .wkid-label{font-size: 14px; font-style: italic; color: #a0acbf; width: 100%; display: inline-block; margin-top: 5px;}.jimu-coordinate-edit .edit-module{margin-bottom: 10px;}.jimu-coordinate-edit .edit-module:last-child{margin-bottom: 0;}.jimu-coordinate-edit .display-units .display{width: 20%; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}.jimu-coordinate-edit .older-version{font-size: 14px; font-style: italic; color: #e84b4b;}.jimu-widget-coordinate-setting{width:100%; height:100%;}.jimu-widget-coordinate-setting .displayOrder{margin-top: 16px;}.jimu-widget-coordinate-setting .displayOrder .displayOrderTips{margin-right: 10px;}.jimu-rtl .jimu-widget-coordinate-setting .displayOrder .displayOrderTips{margin-left: 10px; margin-right: auto;}.jimu-widget-coordinate-setting .displayOrder .order-btn{margin: 0 10px 0 10px;}",
"*now":function(u){u(['dojo/i18n!*preload*widgets/Coordinate/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/lang dojo/_base/html dojo/on dojo/aspect dojo/query dojo/keys dojo/json esri/request jimu/BaseWidgetSetting dijit/_WidgetsInTemplateMixin jimu/dijit/SimpleTable jimu/dijit/Message jimu/dijit/Popup jimu/dijit/CheckBox jimu/dijit/LoadingIndicator jimu/portalUtils ./Edit jimu/SpatialReference/srUtils jimu/dijit/RadioBtn dojo/NodeList-dom dijit/form/NumberSpinner dijit/form/NumberTextBox".split(" "),function(u,l,n,w,y,v,x,t,m,e,f,a,k,r,b,g,z,A,q){return u([e,f],{baseClass:"jimu-widget-coordinate-setting",
edit:null,popup:null,popupState:"",editTr:null,gsVersion:0,postCreate:function(){this.inherited(arguments);this.separator=new b({label:this.nls.separator,checked:!1},this.separator);this.shelter1=new g({hidden:!0});this.shelter1.placeAt(this.domNode);this.shelter1.startup();this.shelter2=new g({hidden:!0});this.shelter2.placeAt(this.domNode);this.shelter2.startup()},startup:function(){this.inherited(arguments);this.outputCoordinateTable=new a({autoHeight:!1,fields:[{name:"id",title:this.nls.id,type:"text",
unique:!0,hidden:!0,editable:!1},{name:"wkid",title:this.nls.wkid,type:"text","class":"wkid",hidden:!0,editable:!1},{name:"isDefault",title:this.nls.defaultTitle,type:"radio",editable:!0,width:"100px"},{name:"label",title:this.nls.label,type:"text",editable:!1},{name:"alias",title:this.nls.alias,type:"text",editable:!0},{name:"outputUnit",title:this.nls.output,type:"text",hidden:!0,editable:!1},{name:"transformationWkid",title:this.nls.transformationWkid,type:"text","class":"transformationWkid",editable:!1,
hidden:!0},{name:"transformationLabel",title:this.nls.transformationLabel,type:"text",editable:!1,hidden:!0},{name:"transformForward",title:this.nls.transformForward,type:"checkbox",editable:!1,hidden:!0},{name:"options",title:"options",type:"text",editable:!1,hidden:!0},{name:"actions",title:this.nls.actions,type:"actions","class":"actions",actions:["edit","up","down","delete"]}],selectable:!1,singleClickEdit:!0});n.setStyle(this.outputCoordinateTable.domNode,"height","100%");this.outputCoordinateTable.placeAt(this.tableCoordinate);
this.outputCoordinateTable.startup();this.own(w(this.outputCoordinateTable,"actions-edit",l.hitch(this,"onEditClick")));this.setConfig(this.config);this._initOrderLonLatRadioBtns();this._getGeometryServiceVersion()},setConfig:function(c){this.config=c;this.outputCoordinateTable.clear();this.shelter1.show();q.loadResource().then(l.hitch(this,function(){if(c.spatialReferences&&c.spatialReferences.length){for(var d=[],h=c.spatialReferences.length,p=0;p<h;p++){var B=parseInt(c.spatialReferences[p].wkid,
10),C=c.spatialReferences[p].isDefault,D=c.spatialReferences[p].alias;d.push({id:p,wkid:q.standardizeWkid(B),isDefault:C||!1,label:c.spatialReferences[p].label,alias:D||c.spatialReferences[p].label,outputUnit:c.spatialReferences[p].outputUnit,transformationWkid:c.spatialReferences[p].transformationWkid,transformationLabel:c.spatialReferences[p].transformationLabel,transformForward:c.spatialReferences[p].transformForward,options:t.stringify(c.spatialReferences[p].options)})}this.outputCoordinateTable.addRows(d)}else this._addMapCoordinate()}),
l.hitch(this,function(d){console.error(d)})).always(l.hitch(this,function(){this.shelter1.hide()}));isFinite(parseInt(c.decimalPlaces,10))&&this.spinner.set("value",parseInt(c.decimalPlaces,10));c.addSeparator&&this.separator.setValue(c.addSeparator)},_getGeometryServiceVersion:function(){this.shelter2.show();if(esriConfig.defaults.geometryService&&esriConfig.defaults.geometryService.url){var c=esriConfig.defaults.geometryService.url;c=c.slice(0,c.indexOf("/Geometry/"));m({url:c,handleAs:"json",callbackParamName:"callback",
content:{f:"json"}}).then(l.hitch(this,function(d){console.log(d);d&&d.currentVersion&&(this.gsVersion=parseFloat(d.currentVersion))}),l.hitch(this,function(d){console.error(d)})).always(l.hitch(this,function(){this.shelter2.hide()}))}else this.shelter2.hide(),new k({message:this.nls.getVersionError})},_addMapCoordinate:function(){var c=this.map.spatialReference.wkid;z.getUnits(this.appConfig.portalUrl).then(l.hitch(this,function(d){if(q.isValidWkid(c)){var h={wkid:q.standardizeWkid(c),label:q.getSRLabel(parseInt(c,
10))};h.alias=h.label;q.isProjectedCS(h.wkid)?h.outputUnit="english"===d?"FOOT":"METER":h.outputUnit=h.outputUnit||q.getCSUnit(h.wkid);d={sameSRWithMap:q.isSameSR(h.wkid,this.map.spatialReference.wkid),isGeographicCS:q.isGeographicCS(h.wkid),isGeographicUnit:q.isGeographicUnit(h.outputUnit),isProjectedCS:q.isProjectedCS(h.wkid),isProjectUnit:q.isProjectUnit(h.outputUnit),spheroidCS:q.isProjectedCS(h.wkid)?q.getGeoCSByProj(h.wkid):h.wkid,defaultUnit:q.getCSUnit(h.wkid),unitRate:q.getUnitRate(q.getCSUnit(h.wkid),
h.outputUnit)};this.map.spatialReference.isWebMercator()&&(d.isGeographicUnit=!0,d.isProjectUnit=!1,d.unitRate=1,h.outputUnit="DECIMAL_DEGREES");"DEGREES_DECIMAL_MINUTES"===h.outputUnit&&(d.isGeographicUnit=!0,d.unitRate=1);h.options=t.stringify(d);this.outputCoordinateTable.addRow(h)}}))},_keepDefaultOnlyEdit:function(){var c=v("."+this.baseClass+" .body-section tr[rowid\x3drow1]")[0];v(".action-item",c).style("display","none");v(".row-edit-div",c).style("display","block");y.after(this.outputCoordinateTable,
"onBeforeRowUp",l.hitch(this,function(d){if(v(".body-section .simple-table-row")[1]===d)return!1}),!0)},onAddClick:function(){this.popupState="ADD";this._openEdit(this.nls.add,{})},onEditClick:function(c){var d=this.outputCoordinateTable.getRowData(c);this.popupState="EDIT";this.editTr=c;this._openEdit(this.nls.edit,d)},_openEdit:function(c,d){this.edit=new A({version:this.gsVersion,map:this.map,nls:this.nls});this.popup=new r({titleLabel:c,autoHeight:!0,content:this.edit,container:"main-page",width:640,
buttons:[{label:this.nls.ok,key:x.ENTER,disable:!0,onClick:l.hitch(this,"_onEditOk")},{label:this.nls.cancel,classNames:["jimu-btn-vacation"],key:x.ESCAPE}],onClose:l.hitch(this,"_onEditClose")});this.edit.setConfig(d||{});n.addClass(this.popup.domNode,"widget-setting-popup");this.edit.startup()},_onEditOk:function(){var c=this.edit.getConfig(),d=null;c.wkid=q.standardizeWkid(c.wkid);c.options=t.stringify(c.options);c.label&&(c.alias=c.label);"ADD"===this.popupState?d=this.outputCoordinateTable.addRow(c):
"EDIT"===this.popupState&&(d=this.outputCoordinateTable.editRow(this.editTr,c));d.success?(this.popup.close(),this.popupState="",this.editTr=null):new k({message:c.wkid+this.nls[d.errorCode]})},_onEditClose:function(){this.popup=this.edit=null},getConfig:function(){for(var c=this.outputCoordinateTable.getData(),d=[],h=c.length,p=0;p<h;p++)delete c[p].id,c[p].options=t.parse(c[p].options),d.push(c[p]);this.config.spatialReferences=d;this.config.decimalPlaces=this.spinner.get("value");this.config.addSeparator=
this.separator.getValue();return this.config},_initOrderLonLatRadioBtns:function(){this.own(w(this.lonLat,"click",l.hitch(this,function(){this.config.displayOrderLonLat=!0})));this.own(w(this.latLon,"click",l.hitch(this,function(){this.config.displayOrderLonLat=!1})));this.config.displayOrderLonLat?(this.lonLat.set("checked",!0),this.config.displayOrderLonLat=!0):(this.latLon.set("checked",!0),this.config.displayOrderLonLat=!1)}})});