// 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/ParcelDrafter/XYInput.html":'\x3cdiv class\x3d"esriCTAlignCenter" data-dojo-attach-point\x3d"newTraverseXYInputNode"\x3e\r\n  \x3cdiv class\x3d"xyRowWrapper" data-dojo-attach-point\x3d"xRowWrapper"\x3e\r\n    X:\r\n    \x3cdiv data-dojo-attach-point\x3d"newTraverseX" data-dojo-type\x3d"dijit/form/ValidationTextBox"\r\n      data-dojo-props\x3d"intermediateChanges:true,regExp:\'^[+-]?\\\\d+(\\\\.\\\\d+)?$\'" trim\x3d"true" required\x3d"true"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"xyRowWrapper" data-dojo-attach-point\x3d"yRowWrapper"\x3e\r\n    Y:\r\n    \x3cdiv data-dojo-attach-point\x3d"newTraverseY" data-dojo-type\x3d"dijit/form/ValidationTextBox"\r\n      data-dojo-props\x3d"intermediateChanges:true,regExp:\'^[+-]?\\\\d+(\\\\.\\\\d+)?$\'" trim\x3d"true" required\x3d"true"\x3e\x3c/div\x3e\r\n  \x3c/div\x3e\r\n  \x3cdiv class\x3d"jimu-btn jimu-trailing-margin1 jimu-state-disabled" title\x3d"${nls.newTraverseButtonLabel}"\r\n    data-dojo-attach-point\x3d"xyStartButton" tabindex\x3d"-1" role\x3d"button" aria-label\x3d"${nls.newTraverseButtonLabel}"\x3e\r\n    ${nls.newTraverseButtonLabel}\r\n  \x3c/div\x3e\r\n\x3c/div\x3e'}});
define("dojo/_base/declare jimu/BaseWidget dijit/_WidgetsInTemplateMixin dojo/text!./XYInput.html dojo/on dojo/_base/lang dojo/Evented esri/geometry/Point dojo/keys jimu/utils dojo/dom-attr dojo/dom-class dijit/form/ValidationTextBox".split(" "),function(h,k,l,m,d,c,n,p,f,g,e,a){return h([k,l,n],{baseClass:"jimu-widget-ParcelDrafter-XYInput",templateString:m,constructor:function(b){c.mixin(this,b)},postCreate:function(){this.inherited(arguments);this.spatialReference=this.map.getLayer(this.config.polygonLayer.id).spatialReference;
this.xRowWrapper.title=this.nls.xyInput.explanation;this.yRowWrapper.title=this.nls.xyInput.explanation;e.set(this.newTraverseX,"aria-label","x"+this.xRowWrapper.title);e.set(this.newTraverseY,"aria-label","y"+this.yRowWrapper.title);this.own(d(this.newTraverseX,"change",c.hitch(this,function(){this._onTextBoxValueChanged()})));this.own(d(this.newTraverseY,"change",c.hitch(this,function(){this._onTextBoxValueChanged()})));this.own(d(this.xyStartButton,"click",c.hitch(this,function(){a.contains(this.xyStartButton,
"jimu-state-disabled")||this.emit("newPoint",this.project(this.newTraverseX.value,this.newTraverseY.value))})));this.own(d(this.xyStartButton,"keydown",c.hitch(this,function(b){if(b.keyCode===f.ENTER||b.keyCode===f.SPACE)a.contains(this.xyStartButton,"jimu-state-disabled")||this.emit("newPoint",this.project(this.newTraverseX.value,this.newTraverseY.value))})))},project:function(b,q){return new p(b,q,this.spatialReference)},_updateLastFocusNode:function(){a.contains(this.xyStartButton,"jimu-state-disabled")?
(a.add(this.xyStartButton,"jimu-state-disabled"),e.set(this.xyStartButton,"tabIndex","-1"),g.initLastFocusNode(this.widgetDomNode,this.newTraverseY.domNode)):(a.remove(this.xyStartButton,"jimu-state-disabled"),e.set(this.xyStartButton,"tabIndex","0"),g.initLastFocusNode(this.widgetDomNode,this.xyStartButton))},_onTextBoxValueChanged:function(){this.newTraverseX.isValid()&&this.newTraverseY.isValid()?a.remove(this.xyStartButton,"jimu-state-disabled"):a.add(this.xyStartButton,"jimu-state-disabled");
this._updateLastFocusNode()},resetXYTextBoxes:function(){this.newTraverseX.reset();this.newTraverseY.reset()}})});