// 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/ParcelDrafter/PlanSettings":function(){define("dojo/_base/declare dojo/_base/array jimu/BaseWidget dijit/_WidgetsInTemplateMixin dojo/text!./PlanSettings.html dojo/_base/lang dojo/Evented dojo/dom-class dojo/query ./utils jimu/utils libs/storejs/store jimu/dijit/formSelect".split(" "),function(F,c,k,m,n,f,p,d,v,C,w,l){return F([k,m,p],{baseClass:"jimu-widget-ParcelDrafter-PlanSettings",templateString:n,selectedPlanSettings:{},planSettingsOptions:f.clone(C.planSettingsOptions),
planSettingsKey:null,constructor:function(q){f.mixin(this,q)},startup:function(){var q=this._retriveFromLocalCache();q||(q={areaUnits:this.planSettingsOptions.areaUnits[1],circularCurveParameters:this.planSettingsOptions.circularCurveParameters[0],directionOrAngleType:this.planSettingsOptions.directionOrAngleType[0],directionOrAngleUnits:this.planSettingsOptions.directionOrAngleUnits[0],distanceAndLengthUnits:this.planSettingsOptions.distanceAndLengthUnits[1]});this._loadOptionsForDropDown(this.directionOrAngleType,
this.planSettingsOptions.directionOrAngleType,q.directionOrAngleType);this._loadOptionsForDropDown(this.directionOrAngleUnits,this.planSettingsOptions.directionOrAngleUnits,q.directionOrAngleUnits);this._loadOptionsForDropDown(this.distanceAndLengthUnits,this.planSettingsOptions.distanceAndLengthUnits,q.distanceAndLengthUnits);this._loadOptionsForDropDown(this.areaUnits,this.planSettingsOptions.areaUnits,q.areaUnits);this._loadOptionsForDropDown(this.circularCurveParameters,this.planSettingsOptions.circularCurveParameters,
q.circularCurveParameters);this.onPlansettingsChanged()},postCreate:function(){this.inherited(arguments);this.planSettingsKey=this.getKey();this.selectedPlanSettings={};this.planSettingsOptions=f.clone(C.planSettingsOptions);d.add(this.domNode,"esriCTPlanSettingsContainer esriCTFullWidth");setTimeout(f.hitch(this,this._setBackgroundColorForDartTheme),500)},postMixInProperties:function(){this.inherited(arguments);this.isRenderIdForAttrs=!0},_setBackgroundColorForDartTheme:function(){var q;if("DartTheme"===
this.appConfig.theme.name){var K=v(".dijitSelect .dijitButtonContents",this.planSettingsNode);var A=v(".dijitSelect .dijitArrowButton",this.planSettingsNode);for(q=0;q<K.length&&q<A.length;q++)d.add(K[q],"dijitButtonContentsDartTheme"),d.add(A[q],"dijitArrowButtonDartTheme")}},_loadOptionsForDropDown:function(q,K,A){var r=[],t;c.forEach(K,f.hitch(this,function(B){t={value:B,label:this.nls.planSettings[B]||window.jimuNls.units[B]};A===B&&(t.selected=!0);r.push(t)}));q.addOption(r)},_isSettingsChanged:function(){var q=
!1;this.selectedPlanSettings.directionOrAngleType!==this.directionOrAngleType.get("value")?q=!0:this.selectedPlanSettings.directionOrAngleUnits!==this.directionOrAngleUnits.get("value")?q=!0:this.selectedPlanSettings.distanceAndLengthUnits!==this.distanceAndLengthUnits.get("value")?q=!0:this.selectedPlanSettings.areaUnits!==this.areaUnits.get("value")?q=!0:this.selectedPlanSettings.circularCurveParameters!==this.circularCurveParameters.get("value")&&(q=!0);return q},onClose:function(){if(this._isSettingsChanged())this.onPlansettingsChanged()},
onPlansettingsChanged:function(){this.selectedPlanSettings={directionOrAngleType:this.directionOrAngleType.get("value"),directionOrAngleUnits:this.directionOrAngleUnits.get("value"),distanceAndLengthUnits:this.distanceAndLengthUnits.get("value"),areaUnits:this.areaUnits.get("value"),circularCurveParameters:this.circularCurveParameters.get("value")};this._saveToLocalCache(this.selectedPlanSettings);this.emit("planSettingsChanged",this.selectedPlanSettings)},_saveToLocalCache:function(q){try{l.set(this.planSettingsKey,
q)}catch(K){console.log("ParcelDrafter: Error in storeing settings to local cache.")}},_retriveFromLocalCache:function(){var q=null;try{q=l.get(this.planSettingsKey)}catch(K){console.log("ParcelDrafter: Error in retriving settings from local cache.")}return q},getKey:function(){return"ParcelDrafterPlanSettings."+encodeURIComponent(w.getAppIdFromUrl())+"."+this.widgetId},updateLastNodeInPlanSetting:function(){w.initLastFocusNode(this.widgetDomNode,this.circularCurveParameters.domNode)}})})},"widgets/ParcelDrafter/utils":function(){define([],
function(){var F={bearingFieldPlaces:2,planSettingsOptions:{directionOrAngleType:["northAzimuth","southAzimuth","quadrantBearing"],directionOrAngleUnits:["decimalDegree","degreeMinuteSeconds"],distanceAndLengthUnits:["uSSurveyFeet","feet","meters"],areaUnits:["squareUSSurveyFeet","squareFeet","acres","squareMeters"],circularCurveParameters:["radiusAndChordLength","radiusAndArcLength"]},getQuadrant:function(c){return{"-1":"NE","-2":"SE","-3":"SW","-4":"NW"}[c]},getQuadrantShortcut:function(c){c=c.toUpperCase();
return{NE:"-1",SE:"-2",SW:"-3",NW:"-4"}[c]},getQuadrantShortcutFromDD:function(c){var k;0<=c&&90>=c?k="-1":90<c&&180>=c?k="-2":180<c&&270>c?k="-3":270<=c&&360>c&&(k="-4");return k},getQuadrantAngleFromNADD:function(c){c=F.getQuadrantAngleAndShortcut(c);return c.quadrant.charAt(0)+c.quadrantAngle+c.quadrant.charAt(1)},getSouthAzimuthFromNorthAzimuth:function(c){var k;180<c?k=c-180:180>c?k=c+180:180===c&&(k=0);return k},DMStoDD:function(c){var k=Math.abs(parseFloat(c.degree));var m=parseFloat(c.minutes);
var n=parseFloat(c.seconds);k=k+m/60+n/3600;c.isNegative&&(k*=-1);return k},DDtoDMS:function(c){var k=3600*c.angle;c=Math.round(k%60);c=60==c?0:c;var m=(k-c)/60;k=Math.round(m%60);k=60==k?0:k;return{degree:Math.round((m-k)/60),minutes:k,seconds:c}},getBearingObjForFormat0:function(c){var k;var m={};m.degree=parseInt(c[1],10);m.minutes=parseInt(c[2]||0,10);m.seconds=parseInt(c[3]||0,10);m.quadrant=F.getQuadrant("-"+c[4]);m.quadrantShortcut="-"+c[4];"string"===typeof c[1]&&(k="-"===c[1].charAt(0));
m.decimalDegrees=F.DMStoDD({degree:m.degree,minutes:m.minutes,seconds:m.seconds,isNegative:k});return m},getBearingObjForFormat1:function(c){var k;var m={};m.degree=parseInt(c[2],10);m.minutes=parseInt(c[3]||0,10);m.seconds=parseInt(c[4]||0,10);m.quadrant=c[1]+c[5];m.quadrantShortcut=F.getQuadrantShortcut(c[1]+c[5]);"string"===typeof c[2]&&(k="-"===c[2].charAt(0));m.decimalDegrees=F.DMStoDD({degree:m.degree,minutes:m.minutes,seconds:m.seconds,isNegative:k});return m},getBearingObjForFormat2:function(c){var k;
var m={};m.degree=parseInt(c[2],10);m.minutes=parseInt(c[3]||0,10);m.seconds=parseInt(c[4]||0,10);m.quadrant=c[1]+c[5];m.quadrantShortcut=F.getQuadrantShortcut(c[1]+c[5]);"string"===typeof c[2]&&(k="-"===c[2].charAt(0));m.decimalDegrees=F.DMStoDD({degree:m.degree,minutes:m.minutes,seconds:m.seconds,isNegative:k});return m},getBearingObjForFormat3:function(c){var k;var m={};m.degree=parseInt(c[1],10);m.minutes=parseInt(c[2]||0,10);m.seconds=parseInt(c[3]||0,10);"string"===typeof c[1]&&(k="-"===c[1].charAt(0));
m.decimalDegrees=F.DMStoDD({degree:m.degree,minutes:m.minutes,seconds:m.seconds,isNegative:k});m.quadrantShortcut=F.getQuadrantShortcutFromDD(m.decimalDegrees);m.quadrant=F.getQuadrant(m.quadrantShortcut);return m},getBearingObjForFormat4:function(c){var k=F.DDtoDMS({angle:c[1]});var m={};m.degree=k.degree;m.minutes=k.minutes;m.seconds=k.seconds;m.decimalDegrees=c[1];m.quadrantShortcut=F.getQuadrantShortcutFromDD(m.decimalDegrees);m.quadrant=F.getQuadrant(m.quadrantShortcut);return m},getBearingObjForFormat5:function(c){var k;
var m={};m.degree=parseInt(c[1],10);m.minutes=parseInt(c[2]||0,10);m.seconds=parseInt(c[3]||0,10);"string"===typeof c[1]&&(k="-"===c[1].charAt(0));m.decimalDegrees=F.DMStoDD({degree:m.degree,minutes:m.minutes,seconds:m.seconds,isNegative:k});m.quadrantShortcut=F.getQuadrantShortcutFromDD(m.decimalDegrees);m.quadrant=F.getQuadrant(m.quadrantShortcut);return m},getBearingObjForFormat6:function(c){var k;var m={};m.degree=parseInt(c[1],10);m.minutes=parseInt(c[2]||0,10);m.seconds=parseInt(c[3]||0,10);
m.quadrantShortcut=c[4];m.quadrant=F.getQuadrant(m.quadrantShortcut);"string"===typeof c[1]&&(k="-"===c[1].charAt(0));m.decimalDegrees=F.DMStoDD({degree:m.degree,minutes:m.minutes,seconds:m.seconds,isNegative:k});return m},getBearingObjForFormat7:function(c){var k={};k.decimalDegrees=c[2];var m=F.DDtoDMS({angle:k.decimalDegrees});k.degree=parseInt(m.degree,10);k.minutes=parseInt(m.minutes||0,10);k.seconds=parseInt(m.seconds||0,10);k.quadrant=c[1]+c[3];k.quadrantShortcut=F.getQuadrantShortcut(k.quadrant);
return k},getBearingObjForFormat8:function(c){var k={};k.decimalDegrees=c[1];var m=F.DDtoDMS({angle:k.decimalDegrees});k.degree=parseInt(m.degree,10);k.minutes=parseInt(m.minutes||0,10);k.seconds=parseInt(m.seconds||0,10);k.quadrantShortcut=c[2];k.quadrant=F.getQuadrant(k.quadrantShortcut);return k},getQuadrantAngleAndShortcut:function(c){var k={};0<=c&&90>=c?(k.quadrantAngle=c,k.quadrant="NE"):90<c&&180>=c?(k.quadrantAngle=180-c,k.quadrant="SE"):180<c&&270>c?(k.quadrantAngle=c-180,k.quadrant="SW"):
270<=c&&360>c&&(k.quadrantAngle=360-c,k.quadrant="NW");return k},roundSeconds:function(c){c=Number(c);return 10>c?"0"+c:c},showFixedPlacesAfterDecimal:function(c,k){var m=0;k||(k=2);c=c.toString();m=c.indexOf(".");0<m&&(c=c.slice(0,m+k+1));return Number(c)},honourPopupRounding:function(c,k){if(isNaN(c)||null===c)c=4;var m=Math.pow(10,c);k=Math.round(k*m)/m;return k=k.toFixed(c)},convertBearingToOutputFormats:function(c){var k={};var m={};360===c.degree&&(c.degree=0);k=c.decimalDegrees;360===k&&(k=
0);m.naDD=k;m.naDDRound=F.honourPopupRounding(F.bearingFieldPlaces,k);360===Number(m.naDDRound)&&(m.naDDRound=0);var n=10>c.minutes?"0"+c.minutes:c.minutes;var f=c.seconds;0<Number(n)&&0<Number(F.roundSeconds(f))?m.naDMS=c.degree+"-"+n+"-"+F.roundSeconds(f):0===Number(n)&&0<Number(F.roundSeconds(f))?m.naDMS=c.degree+"-"+n+"-"+F.roundSeconds(f):0<Number(n)&&0===Number(F.roundSeconds(f))?m.naDMS=c.degree+"-"+n+"-00":0===Number(n)&&0===Number(F.roundSeconds(f))&&(m.naDMS=c.degree+"-00-00");c=F.getQuadrantAngleAndShortcut(k);
m.qb3DD=c.quadrant.charAt(0)+c.quadrantAngle+c.quadrant.charAt(1);m.qb3DDRound=c.quadrant.charAt(0)+F.honourPopupRounding(F.bearingFieldPlaces,c.quadrantAngle)+c.quadrant.charAt(1);n=F.DDtoDMS({angle:c.quadrantAngle});f=10>n.minutes?"0"+n.minutes:n.minutes;var p=n.seconds;0<Number(f)&&0<Number(F.roundSeconds(p))?m.qb3DMS=c.quadrant.charAt(0)+n.degree+"-"+f+"-"+F.roundSeconds(p)+c.quadrant.charAt(1):0===Number(f)&&0<Number(F.roundSeconds(p))?m.qb3DMS=c.quadrant.charAt(0)+n.degree+"-"+f+"-"+F.roundSeconds(p)+
c.quadrant.charAt(1):0<Number(f)&&0===Number(F.roundSeconds(p))?m.qb3DMS=c.quadrant.charAt(0)+n.degree+"-"+f+"-00"+c.quadrant.charAt(1):0===Number(f)&&0===Number(F.roundSeconds(p))&&(m.qb3DMS=c.quadrant.charAt(0)+n.degree+"-00-00"+c.quadrant.charAt(1));k=F.getSouthAzimuthFromNorthAzimuth(k);360===k&&(k=0);m.saDD=k;m.saDDRound=F.honourPopupRounding(F.bearingFieldPlaces,k);360===Number(m.saDDRound)&&(m.saDDRound=0);k=F.DDtoDMS({angle:k});360===k.degree&&(k.degree=0);c=10>k.minutes?"0"+k.minutes:k.minutes;
n=k.seconds;0<Number(c)&&0<Number(F.roundSeconds(n))?m.saDMS=k.degree+"-"+c+"-"+F.roundSeconds(n):0===Number(c)&&0<Number(F.roundSeconds(n))?m.saDMS=k.degree+"-"+c+"-"+F.roundSeconds(n):0<Number(c)&&0===Number(F.roundSeconds(n))?m.saDMS=k.degree+"-"+c+"-00":0===Number(c)&&0===Number(F.roundSeconds(n))&&(m.saDMS=k.degree+"-00-00");return m},getBearingDetailsOfRequiredFormat:function(c,k){var m={};switch(k){case 0:m=F.getBearingObjForFormat0(c);break;case 1:m=F.getBearingObjForFormat1(c);break;case 2:m=
F.getBearingObjForFormat2(c);break;case 3:m=F.getBearingObjForFormat3(c);break;case 4:m=F.getBearingObjForFormat4(c);break;case 5:m=F.getBearingObjForFormat5(c);break;case 6:m=F.getBearingObjForFormat6(c);break;case 7:m=F.getBearingObjForFormat7(c);break;case 8:m=F.getBearingObjForFormat8(c)}return F.convertBearingToOutputFormats(m)},getBearingFormatArr:function(){var c=[];c.push({regex:/^((?:\-)?(?:3[0-5]\d|[12]\d{2}|[0-9]\d?|0))(?:\-(0|[0-5]?\d)\-(0|[0-5]\d))?\-([1-4])$/,type:"degreeMinuteSeconds"});
c.push({regex:/^([nNsS])((?:\-)?(?:3[0-5]\d|[12]\d{2}|[0-9]\d?|0))(?:\-(0|[0-5]?\d)\-(0|[0-5]\d))?([eEwW])$/,type:"degreeMinuteSeconds"});c.push({regex:/^([nNsS])((?:\-)?(?:3[0-5]\d|[12]\d{2}|[0-9]\d?|0))(?:\.([0-5]\d)(?:([0-5]\d))?)?([eEwW])$/,type:"degreeMinuteSeconds"});c.push({regex:/^((?:\-)?(?:3[0-5]\d|[12]\d{2}|[0-9]\d?|0))(?:\.([0-5]\d)(?:([0-5]\d))?)?$/,type:"degreeMinuteSeconds"});c.push({regex:/^((?:(?:\-?)(?:3[0-5]\d|[12]\d{2}|[0-9]\d?|0)(?:\.\d+)?)|(?:\-?)(?:\.\d+))$/,type:"decimalDegree"});
c.push({regex:/^((?:\-)?(?:3[0-5]\d|[12]\d{2}|[0-9]\d?|0))(?:\-(0|[0-5]?\d)\-((?:[0-5]\d)))?$/,type:"degreeMinuteSeconds"});c.push({regex:/^((?:\-)?(?:3[0-5]\d|[12]\d{2}|[0-9]\d?|0))(?:\.([0-5]\d)(?:([0-5]\d))?)?(\-[1-4])$/,type:"degreeMinuteSeconds"});c.push({regex:/^([nNsS])((?:(?:\-?)(?:3[0-5]\d|[12]\d{2}|[0-9]\d?|0)(?:\.\d+)?)|(?:\-?)(?:\.\d+))([eEwW])$/,type:"decimalDegree"});c.push({regex:/^((?:(?:\-?)(?:3[0-5]\d|[12]\d{2}|[0-9]\d?|0)(?:\.\d+)?)|(?:\-?)(?:\.\d+))(\-[1-4])$/,type:"decimalDegree"});
return c},getNorthAzimuthAngle:function(c,k){k=k.toUpperCase();c=Number(c);switch(k){case "-1":case "NE":return(c+360)%360;case "-2":case "SE":return(540-c)%360;case "-3":case "SW":return(540+c)%360;case "-4":case "NW":return(360-c)%360}},convertBearingToNorthAzimuth:function(c,k,m){switch(k){case 0:k=F.getBearingObjForFormat0(c);k=F.getNorthAzimuthAngle(k.decimalDegrees,"-"+c[4]);k=F.DDtoDMS({angle:k});c[1]=k.degree;c[2]=k.minutes;c[3]=k.seconds;break;case 1:k=F.getBearingObjForFormat1(c);k=F.getNorthAzimuthAngle(k.decimalDegrees,
c[1]+c[5]);k=F.DDtoDMS({angle:k});c[2]=k.degree;c[3]=k.minutes;c[4]=k.seconds;break;case 2:k=F.getBearingObjForFormat2(c);k=F.getNorthAzimuthAngle(k.decimalDegrees,c[1]+c[5]);k=F.DDtoDMS({angle:k});c[2]=k.degree;c[3]=k.minutes;c[4]=k.seconds;break;case 3:"northAzimuth"===m.directionOrAngleType||"quadrantBearing"===m.directionOrAngleType?(k=F.getBearingObjForFormat3(c),k=F.getNorthAzimuthAngle(k.decimalDegrees,"-1"),k=F.DDtoDMS({angle:k}),c[1]=k.degree,c[2]=k.minutes,c[3]=k.seconds):"southAzimuth"===
m.directionOrAngleType&&(k=F.getBearingObjForFormat3(c),k=F.getNorthAzimuthAngle(k.decimalDegrees,"-3"),k=F.DDtoDMS({angle:k}),c[1]=k.degree,c[2]=k.minutes,c[3]=k.seconds);break;case 4:"northAzimuth"===m.directionOrAngleType||"quadrantBearing"===m.directionOrAngleType?c[1]=F.getNorthAzimuthAngle(c[1],"-1"):"southAzimuth"===m.directionOrAngleType&&(c[1]=F.getNorthAzimuthAngle(c[1],"-3"));break;case 5:"northAzimuth"===m.directionOrAngleType?(k=F.getBearingObjForFormat5(c),k=F.getNorthAzimuthAngle(k.decimalDegrees,
"-1"),k=F.DDtoDMS({angle:k}),c[1]=k.degree,c[2]=k.minutes,c[3]=k.seconds):"southAzimuth"===m.directionOrAngleType?(k=F.getBearingObjForFormat5(c),k=F.getNorthAzimuthAngle(k.decimalDegrees,"-3"),k=F.DDtoDMS({angle:k}),c[1]=k.degree,c[2]=k.minutes,c[3]=k.seconds):"quadrantBearing"===m.directionOrAngleType&&(c=null);break;case 6:k=F.getBearingObjForFormat6(c);k=F.getNorthAzimuthAngle(k.decimalDegrees,c[4]);k=F.DDtoDMS({angle:k});c[1]=k.degree;c[2]=k.minutes;c[3]=k.seconds;break;case 7:c[2]=F.getNorthAzimuthAngle(c[2],
c[1]+c[3]);break;case 8:c[1]=F.getNorthAzimuthAngle(c[1],c[2])}return c},categorizeBearingFormat:function(c,k){var m,n;c=c.toString();var f=F.getBearingFormatArr();for(n=0;n<f.length;n++)if(f[n].type===k.directionOrAngleUnits&&(m=f[n].regex.exec(c.trim()))&&0<m.length){m=F.convertBearingToNorthAzimuth(m,n,k);break}if(!m)for(n=0;n<f.length;n++)if(f[n].type!==k.directionOrAngleUnits&&(m=f[n].regex.exec(c.trim()))&&0<m.length){m=F.convertBearingToNorthAzimuth(m,n,k);break}return m?F.getBearingDetailsOfRequiredFormat(m,
n):null},metersToUSSurveyFeet:function(c){c=Number(c);return 3.28083333333*c},usSurveyFeetToMeters:function(c){c=Number(c);return.304800609601*c},feetToUSSurveyFeet:function(c){c=Number(c);return F.metersToUSSurveyFeet(.3048*c)},feetToMeters:function(c){c=Number(c);return.3048*c},usSurveyFeetToFeet:function(c){c=Number(c);return 1.000001999999281*c},metersToFeet:function(c){c=Number(c);return 3.280839895*c},getLengthObjForFormat0:function(c,k){var m={};"feet"===k?(m.feet=Number(c[0]),m.feetRound=
Math.round(1E4*m.feet)/1E4,m.uSSurveyFeet=F.feetToUSSurveyFeet(c[0]),m.uSSurveyFeetRound=Math.round(1E4*m.uSSurveyFeet)/1E4,m.meters=F.feetToMeters(c[0]),m.metersRound=Math.round(1E4*m.meters)/1E4):"uSSurveyFeet"===k?(m.uSSurveyFeet=Number(c[0]),m.uSSurveyFeetRound=Math.round(1E4*m.uSSurveyFeet)/1E4,m.meters=F.usSurveyFeetToMeters(c[0]),m.metersRound=Math.round(1E4*m.meters)/1E4,m.feet=F.usSurveyFeetToFeet(m.uSSurveyFeet),m.feetRound=Math.round(1E4*m.feet)/1E4):"meters"===k&&(m.uSSurveyFeet=F.metersToUSSurveyFeet(c[0]),
m.uSSurveyFeetRound=Math.round(1E4*m.uSSurveyFeet)/1E4,m.meters=Number(c[0]),m.metersRound=Math.round(1E4*m.meters)/1E4,m.feet=F.metersToFeet(m.meters),m.feetRound=Math.round(1E4*m.feet)/1E4);return m},getLengthObjForFormat3:function(c){var k={};k.uSSurveyFeet=Number(c[2]);k.uSSurveyFeetRound=Math.round(1E4*k.uSSurveyFeet)/1E4;k.meters=F.usSurveyFeetToMeters(c[2]);k.metersRound=Math.round(1E4*k.meters)/1E4;k.feet=F.usSurveyFeetToFeet(k.uSSurveyFeet);k.feetRound=Math.round(1E4*k.feet)/1E4;return k},
getLengthObjForFormat2:function(c){var k={};k.uSSurveyFeet=F.metersToUSSurveyFeet(c[2]);k.uSSurveyFeetRound=Math.round(1E4*k.uSSurveyFeet)/1E4;k.meters=Number(c[2]);k.metersRound=Math.round(1E4*k.meters)/1E4;k.feet=F.metersToFeet(k.meters);k.feetRound=Math.round(1E4*k.feet)/1E4;return k},getLengthObjForFormat1:function(c){var k={};k.feet=Number(c[2]);k.feetRound=Math.round(1E4*k.feet)/1E4;k.uSSurveyFeet=F.feetToUSSurveyFeet(c[2]);k.uSSurveyFeetRound=Math.round(1E4*k.uSSurveyFeet)/1E4;k.meters=F.feetToMeters(c[2]);
k.metersRound=Math.round(1E4*k.meters)/1E4;return k},categorizeLengthFormat:function(c,k){var m,n;var f=[];c=c.toString();f.push(/^((\-?)((0?|([1-9]\d*))(\.\d+)?))$/);f.push(/^(((\-?)((0?|([1-9]\d*))(\.\d+)?))(ft|FT|fT|Ft))$/);f.push(/^(((\-?)((0?|([1-9]\d*))(\.\d+)?))(m|M))$/);f.push(/^(((\-?)((0?|([1-9]\d*))(\.\d+)?))(FTUS|FTUs|FTuS|FTus|FtUS|FtUs|FtuS|Ftus|fTUS|fTUs|fTuS|fTus|ftUS|ftUs|ftuS|ftus))$/);for(n=0;n<f.length&&!((m=f[n].exec(c.trim()))&&0<m.length);n++);m?(c=F.getLengthOfRequiredFormat(m,
n,k))&&isNaN(c.meters)&&(c=null):c=null;return c},getLengthOfRequiredFormat:function(c,k,m){var n={};switch(k){case 0:n=F.getLengthObjForFormat0(c,m);break;case 1:n=F.getLengthObjForFormat1(c);break;case 2:n=F.getLengthObjForFormat2(c);break;case 3:n=F.getLengthObjForFormat3(c)}return n}};return F})},"widgets/ParcelDrafter/XYInput":function(){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(F,c,k,m,n,f,p,d,v,C,w,l){return F([c,k,p],{baseClass:"jimu-widget-ParcelDrafter-XYInput",templateString:m,constructor:function(q){f.mixin(this,q)},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;w.set(this.newTraverseX,"aria-label","x"+this.xRowWrapper.title);w.set(this.newTraverseY,"aria-label","y"+this.yRowWrapper.title);
this.own(n(this.newTraverseX,"change",f.hitch(this,function(){this._onTextBoxValueChanged()})));this.own(n(this.newTraverseY,"change",f.hitch(this,function(){this._onTextBoxValueChanged()})));this.own(n(this.xyStartButton,"click",f.hitch(this,function(){l.contains(this.xyStartButton,"jimu-state-disabled")||this.emit("newPoint",this.project(this.newTraverseX.value,this.newTraverseY.value))})));this.own(n(this.xyStartButton,"keydown",f.hitch(this,function(q){if(q.keyCode===v.ENTER||q.keyCode===v.SPACE)l.contains(this.xyStartButton,
"jimu-state-disabled")||this.emit("newPoint",this.project(this.newTraverseX.value,this.newTraverseY.value))})))},project:function(q,K){return new d(q,K,this.spatialReference)},_updateLastFocusNode:function(){l.contains(this.xyStartButton,"jimu-state-disabled")?(l.add(this.xyStartButton,"jimu-state-disabled"),w.set(this.xyStartButton,"tabIndex","-1"),C.initLastFocusNode(this.widgetDomNode,this.newTraverseY.domNode)):(l.remove(this.xyStartButton,"jimu-state-disabled"),w.set(this.xyStartButton,"tabIndex",
"0"),C.initLastFocusNode(this.widgetDomNode,this.xyStartButton))},_onTextBoxValueChanged:function(){this.newTraverseX.isValid()&&this.newTraverseY.isValid()?l.remove(this.xyStartButton,"jimu-state-disabled"):l.add(this.xyStartButton,"jimu-state-disabled");this._updateLastFocusNode()},resetXYTextBoxes:function(){this.newTraverseX.reset();this.newTraverseY.reset()}})})},"widgets/ParcelDrafter/NewTraverse":function(){define("dojo/_base/declare jimu/BaseWidget dijit/_WidgetsInTemplateMixin dojo/Evented dojo/text!./NewTraverse.html dojo/_base/lang dojo/_base/array dojo/dom-class dojo/dom-construct dojo/dom-style dojo/dnd/Source dojo/on dijit/form/ValidationTextBox ./SymbolSelector ./MiscloseDetails ./ParcelTools ./PlanInfo ./geometryUtils ./utils esri/graphic esri/symbols/jsonUtils esri/layers/GraphicsLayer esri/graphicsUtils dojo/dom-attr dojo/query esri/SpatialReference dojo/keys dijit/focus dijit/TooltipDialog dijit/popup dojo/Deferred esri/geometry/Extent esri/geometry/Point dojo/dom-geometry".split(" "),
function(F,c,k,m,n,f,p,d,v,C,w,l,q,K,A,r,t,B,M,I,O,R,P,G,U,Q,W,J,V,y,b,g,x,H){return F([c,k,m],{baseClass:"jimu-widget-ParcelDrafter",templateString:n,parcelLinesGraphicsLayer:null,parcelPointsGraphicsLayer:null,parcelPolygonGraphicsLayer:null,lineLayerSpatialReference:null,polygonLayerSpatialReference:null,_itemList:[],_nodes:[],_dndContainer:null,startPoint:null,_startPointForNextLine:null,_planSettings:null,_arrayOfAllBoundaryLines:[],_rotationAngle:0,_scaleValue:1,polygonDeleteArr:[],polylineDeleteArr:[],
_popupDialog:null,_popupCoords:null,_setExtentTimer:null,numberFieldTypes:["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"],lengthFieldPlaces:2,radiusFieldPlaces:2,miscloseDistanceFieldPlaces:2,postCreate:function(){this.numberFieldTypes=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"];this.polygonDeleteArr=[];this.polylineDeleteArr=[];this._arrayOfAllBoundaryLines=[];this._nodes=[];this._itemList=[];this._setExtentTimer=
null;d.add(this.domNode,"esriCTNewTraverseGrid");this._addGraphicsLayer();this._createTraverseGrid();this._setValidatorForInitialRow();this._handleEventsOnInitialRow();this._symbolSelector=this._createLineSelector(this.lineSymbolNode,null);this.own(l(this.screenDigitizationNode,"click",f.hitch(this,this._onDigitizationButtonClicked)));this.own(l(this.screenDigitizationNode,"keydown",f.hitch(this,function(a){if(a.keyCode===W.ENTER||a.keyCode===W.SPACE)a.preventDefault(),this._onDigitizationButtonClicked()})));
this.own(l(this.updateRotationPointNode,"click",f.hitch(this,this._onUpdateRotationPointButtonClicked)));this.own(l(this.updateRotationPointNode,"keydown",f.hitch(this,function(a){if(a.keyCode===W.ENTER||a.keyCode===W.SPACE)a.preventDefault(),this._onUpdateRotationPointButtonClicked()})));this.own(l(this.zoomToNode,"click",f.hitch(this,this._onZoomButtonClicked)));this.own(l(this.zoomToNode,"keydown",f.hitch(this,function(a){if(a.keyCode===W.ENTER||a.keyCode===W.SPACE)a.preventDefault(),this._onZoomButtonClicked()})));
this.own(l(this.expandCollapseNode,"click",f.hitch(this,this._onExpandCollapseClicked)));this.own(l(this.expandCollapseNode,"keydown",f.hitch(this,function(a){if(a.keyCode===W.ENTER||a.keyCode===W.SPACE)a.preventDefault(),this._onExpandCollapseClicked()})));this.own(l(this.addButton,"click",f.hitch(this,function(){this._addNewItem(!1)})));this.own(l(this.addButton,"keydown",f.hitch(this,function(a){a.keyCode!==W.ENTER&&a.keyCode!==W.SPACE||this._addNewItem(!1)})));this._createMiscloseDetails();this._createParcelTools();
this._createPlanInfo();this._createTooltip();this.config.polylineLayer&&this.config.polylineLayer.popupInfo&&this.config.polylineLayer.popupInfo.fieldInfos&&p.forEach(this.config.polylineLayer.popupInfo.fieldInfos,f.hitch(this,function(a){a.fieldName===this.config.polylineLayer.bearing.name&&a.format&&(M.bearingFieldPlaces=a.format.places);a.fieldName===this.config.polylineLayer.distance.name&&a.format&&(this.lengthFieldPlaces=a.format.places);a.fieldName===this.config.polylineLayer.radius.name&&
a.format&&(this.radiusFieldPlaces=a.format.places)}));this.config.polygonLayer&&this.config.polygonLayer.popupInfo&&this.config.polygonLayer.popupInfo.fieldInfos&&p.forEach(this.config.polygonLayer.popupInfo.fieldInfos,f.hitch(this,function(a){a.fieldName===this.config.polygonLayer.miscloseDistance.name&&a.format&&(this.miscloseDistanceFieldPlaces=a.format.places)}))},_addGraphicsLayer:function(){this.parcelPolygonGraphicsLayer=new R;this.parcelLinesGraphicsLayer=new R;this.parcelPointsGraphicsLayer=
new R;this.rotationPointsGraphicsLayer=new R;this.own(l(this.parcelPointsGraphicsLayer,"click",f.hitch(this,function(a){d.contains(this.updateRotationPointNode,"esriCTEnableButton")&&(this._setRotationPoint(a.graphic.attributes.rowIndex,a.graphic.geometry),this._showRotationPoint())})));this.map.addLayer(this.parcelPolygonGraphicsLayer);this.map.addLayer(this.parcelLinesGraphicsLayer);this.map.addLayer(this.parcelPointsGraphicsLayer);this.map.addLayer(this.rotationPointsGraphicsLayer)},_setValidatorForInitialRow:function(){this.bearingNode.validator=
f.hitch(this,function(a){return this._bearingValidator(a,["*","*tb"])});this.bearingNode.invalidMessage=this.nls.newTraverse.invalidBearingMessage;this.lengthNode.validator=f.hitch(this,function(a){if("*"===a&&this._itemList&&0<this._itemList.length)return!0;if(""===this.radiusNode.get("value")&&0>parseFloat(a))return this.lengthNode.invalidMessage=this.nls.newTraverse.negativeLengthMessage,!1;this.lengthNode.invalidMessage=this.nls.newTraverse.invalidLengthMessage;return this._lengthValidator(a)});
this.lengthNode.invalidMessage=this.nls.newTraverse.invalidLengthMessage;this.radiusNode.validator=f.hitch(this,function(a){if("*"===a&&this._itemList&&0<this._itemList.length)return!0;var e=this._radiusValidator(a);if(""!==a)if((a=this.lengthNode.isValid())&&e){if(!this._validateLengthRadiusProportion(e,a))return null;e&&(a=this.lengthNode.value,this.lengthNode.reset(),this.lengthNode.set("value",a))}else e=null;return e});this.radiusNode.invalidMessage=this.nls.newTraverse.invalidRadiusMessage},
_bearingValidator:function(a,e){return-1!==e.indexOf(a)&&this._itemList&&0<this._itemList.length?!0:this._validateBearing(a,e)},_lengthValidator:function(a,e){return""===a||"0"===a||0===a?!1:this._validateLength(a,e)},_radiusValidator:function(a,e){return""===a?!0:this._validateLength(a,e)},_handleEventsOnInitialRow:function(){this.own(l(this.bearingNode,"keypress",f.hitch(this,this._bearingValueEntered)));this.own(l(this.lengthNode,"keypress",f.hitch(this,this._lengthValueEntered)));this.own(l(this.radiusNode,
"keypress",f.hitch(this,this._radiusValueEntered)))},_copyPrevValue:function(a){switch(a){case "Bearing":a=this.bearingNode.get("value");"*"===a&&0<this._itemList.length&&(a=this._itemList[this._itemList.length-1].BearingConversions?this._getBearingAccordingToPlanSettings(this._itemList[this._itemList.length-1].BearingConversions):this._itemList[this._itemList.length-1].Bearing,this.bearingNode.set("value",a));break;case "Length":a=this.lengthNode.get("value");"*"===a&&0<this._itemList.length&&(a=
"radiusAndArcLength"===this._planSettings.circularCurveParameters&&this._itemList[this._itemList.length-1].ArcLengthConversions?this._itemList[this._itemList.length-1].ArcLengthConversions[this._planSettings.distanceAndLengthUnits]:this._itemList[this._itemList.length-1].LengthConversions?this._itemList[this._itemList.length-1].LengthConversions[this._planSettings.distanceAndLengthUnits]:this._itemList[this._itemList.length-1].Length,this.lengthNode.set("value",a));break;case "Radius":a=this.radiusNode.get("value"),
"*"===a&&0<this._itemList.length&&(a=this._itemList[this._itemList.length-1].RadiusConversions?this._itemList[this._itemList.length-1].RadiusConversions[this._planSettings.distanceAndLengthUnits]:this._itemList[this._itemList.length-1].Radius,this.radiusNode.set("value",a))}},_bearingValueEntered:function(a){a=a.charCode||a.keyCode;a===W.ENTER||a===W.TAB?(this.bearingNode.get("value"),this._copyPrevValue("Bearing"),a===W.ENTER&&this.bearingNode.isValid()?J.focus(this.lengthNode.focusNode):this.bearingNode.validate(!1)):
setTimeout(f.hitch(this,function(){this.bearingNode.validate(!1)}),100)},_lengthValueEntered:function(a){a=a.charCode||a.keyCode;a===W.ENTER||a===W.TAB?(this.lengthNode.get("value"),this._copyPrevValue("Length"),a===W.ENTER&&this.lengthNode.isValid()?J.focus(this.radiusNode.focusNode):this.lengthNode.validate(!1)):setTimeout(f.hitch(this,function(){this.lengthNode.validate(!1)}),100)},_radiusValueEntered:function(a){(a.charCode||a.keyCode)===W.ENTER?(a=this.radiusNode.get("value"),this._copyPrevValue("Radius"),
""===a||this.radiusNode.isValid()?this.bearingNode.isValid()?this.lengthNode.isValid()?(this._addNewItem(),J.focus(this.bearingNode.focusNode)):(this.lengthNode.validate(!1),J.focus(this.lengthNode.focusNode)):(this.bearingNode.validate(!1),J.focus(this.bearingNode.focusNode)):this.radiusNode.validate(!1)):setTimeout(f.hitch(this,function(){this.radiusNode.validate(!1)}),100)},_validateBearing:function(a){return(a=M.categorizeBearingFormat(a,this._planSettings))?a:null},_validateLength:function(a,
e){switch(e){case "feet":a=M.categorizeLengthFormat(a,"feet");break;case "meters":a=M.categorizeLengthFormat(a,"meters");break;case "uSSurveyFeet":a=M.categorizeLengthFormat(a,"uSSurveyFeet");break;default:a=M.categorizeLengthFormat(a,this._planSettings.distanceAndLengthUnits)}return a?a:null},_validateLengthRadiusProportion:function(a,e){return a&&e&&(a=a[this._planSettings.distanceAndLengthUnits],e=e[this._planSettings.distanceAndLengthUnits],0!==a&&(a=2*parseFloat(Math.abs(a)),"radiusAndArcLength"===
this._planSettings.circularCurveParameters&&(a*=Math.PI),a<parseFloat(Math.abs(e))))?null:!0},_getValidatedValues:function(a,e,h){var u={},z;a?(u=a,e&&("Bearing"!==e&&u.BearingConversions&&(u.Bearing=this._getBearingAccordingToPlanSettings(u.BearingConversions)),"Length"!==e&&u.LengthConversions&&(u.Length=u.LengthConversions[this._planSettings.distanceAndLengthUnits]),"Radius"!==e&&u.RadiusConversions&&(u.Radius=u.RadiusConversions[this._planSettings.distanceAndLengthUnits]),"Bearing"===e&&"*tb"===
u.Bearing.toString().toLowerCase()&&0<this._itemList.length&&0!==h&&(u.isTB=!0))):(this._copyPrevValue("Bearing"),this._copyPrevValue("Length"),this._copyPrevValue("Radius"),u.LineSymbol=this._symbolSelector.selectedSymbol,u.Bearing=this.bearingNode.get("value"),u.Length=this.lengthNode.get("value"),u.Radius=this.radiusNode.get("value"),"*tb"===u.Bearing.toString().toLowerCase()&&0<this._itemList.length?u.isTB=!0:u.isTB=!1);if(""!==f.trim(u.Bearing.toString())&&""!==f.trim(u.Length.toString())&&((e=
this._validateBearing(u.Bearing))||u.isTB)){u.BearingConversions=e;if(""===f.trim(u.Length.toString())&&""===f.trim(u.Radius.toString()))return null;if(""!==f.trim(u.Length.toString()))if((e=this._validateLength(u.Length))&&0!==e.meters){if(""!==f.trim(u.Radius.toString()))if(z=this._validateLength(u.Radius)){if(!this._validateLengthRadiusProportion(z,e))return null;u.RadiusConversions=z}else return null;else{if(0>parseInt(e.meters,10))return null;u.RadiusConversions=null}u.LengthConversions=e}else return null;
u.RadiusConversions&&(u=this._createValuesForArc(u));u.isTB&&(a=a&&!isNaN(h)?this._itemList[h-1]:this._itemList[this._itemList.length-1],u=this._setTangentBearing(u,a))}else return null;return u},_setTangentBearing:function(a,e){var h=f.clone(this._planSettings);h.directionOrAngleType="northAzimuth";h.directionOrAngleUnits="decimalDegree";var u=e.BearingConversions.naDD;e.RadiusConversions&&0!==e.RadiusConversions.meters&&(u=B.chordBearingToTangentBearing(u,e.RadiusConversions.meters,e.ChordLengthConversions.meters));
a.RadiusConversions&&0!==a.RadiusConversions.meters?(u=B.tangentBearingToChordBearing(u,a.RadiusConversions.meters,a.ChordLengthConversions.meters),a.Bearing=u,a.BearingConversions=M.categorizeBearingFormat(a.Bearing,h)):e.RadiusConversions&&0!==e.RadiusConversions.meters?(a.Bearing=u,a.BearingConversions=M.categorizeBearingFormat(a.Bearing,h)):(a.Bearing=e.Bearing,a.BearingConversions=f.clone(e.BearingConversions));return a},_updateTBFromIndex:function(a){var e;for(e=!1;a<this._itemList.length;a++)if(this._itemList[a]&&
this._itemList[a].isTB)this._itemList[a]=this._setTangentBearing(this._itemList[a],this._itemList[a-1]),e=!0;else break;return e},_onZoomButtonClicked:function(){this._setExtentToLayer(this.parcelLinesGraphicsLayer,!0)},_onExpandCollapseClicked:function(){d.toggle(this.traverseGrid,"esriCTHidden");d.contains(this.expandCollapseNode,"esriCTExpand")?(G.set(this.expandCollapseNode,"title",this.nls.planSettings.collapseGridTooltipText),d.replace(this.expandCollapseNode,"esriCTCollapse","esriCTExpand"),
G.set(this.expandCollapseNode,"aria-expanded",!0)):(G.set(this.expandCollapseNode,"title",this.nls.planSettings.expandGridTooltipText),d.replace(this.expandCollapseNode,"esriCTExpand","esriCTCollapse"),G.set(this.expandCollapseNode,"aria-expanded",!1))},setRotation:function(a){var e,h;var u=this.startPoint;this._rotationPointInfo&&this._rotationPointInfo.rotationPoint&&(u=this._rotationPointInfo.rotationPoint);var z=new Q(4326);B.getProjectedGeometry(a,z,this.geometryService).then(f.hitch(this,function(N){e=
B.getRotationAngleBetweenPoints(u,N);0<this._itemList.length&&(h=0,this._rotationPointInfo&&this._rotationPointInfo.rotationPointIndex<this._itemList.length&&(h=this._rotationPointInfo.rotationPointIndex),e-=this._itemList[h].BearingConversions.naDDRound);360===e&&(e=0);this._parcelToolInstance.setRotation(e)}))},setScaling:function(a){a=B.getScaleDistanceBetweenPoints(this.startPoint,a);this.distance?(a/=this.distance,.1>a&&(a=.1),this._parcelToolInstance.setScale(a)):this.distance=a},_addNewItem:function(a){var e;
if(e=this._getValidatedValues()){if(a&&this._rotationAngle){var h=e.BearingConversions.naDD-this._rotationAngle;h=this.getAngleFromDDTOQB(360<=h?h%360:h);e.Bearing=h;e.BearingConversions=this._validateBearing(h)}h=f.trim(e.Radius.toString());e.rowIndex=this._itemList.length;this._itemList.push(e);this._createRow(e,this._itemList.length-1);J.focus(this.bearingNode.focusNode);this._resetEntryRow(a);""===h||"0"===h||0===h?this._drawStraightLine(e,!0):this._drawArc(e,!0);this._showHideTraverseTools();
this.appliedCompassRule&&this.setParcelClosure()}else this.bearingNode.isValid()?""!==this.lengthNode.get("value")&&this.lengthNode.isValid()?""===this.radiusNode.get("value")||this.radiusNode.isValid()||(J.focus(this.radiusNode.focusNode),this.radiusNode.validate(!1)):(J.focus(this.lengthNode.focusNode),this.lengthNode.validate(!1)):(J.focus(this.bearingNode.focusNode),this.bearingNode.validate(!1))},_createValuesForArc:function(a){if(a.RadiusConversions){var e=a.RadiusConversions.meters;"radiusAndArcLength"===
this._planSettings.circularCurveParameters?(a.ArcLength=a.LengthConversions.meters,a.ArcLengthConversions=f.clone(a.LengthConversions),a.ChordLength=B.getChordLengthFromArcLength(a.ArcLength,e),a.ChordLengthConversions=this._validateLength(a.ChordLength,"meters")):(a.ChordLength=a.LengthConversions.meters,a.ChordLengthConversions=f.clone(a.LengthConversions),a.ArcLength=B.getArcLengthFromChordLength(a.ChordLength,e),a.ArcLengthConversions=this._validateLength(a.ArcLength,"meters"))}else"radiusAndArcLength"===
this._planSettings.circularCurveParameters&&a.ArcLengthConversions&&(a.Length=a.ArcLength,a.LengthConversions=f.clone(a.ArcLengthConversions)),a.ChordLength=0,a.ChordLengthConversions=null,a.ArcLength=0,a.ArcLengthConversions=null;return a},_onDigitizationButtonClicked:function(){d.toggle(this.screenDigitizationNode,"esriCTEnableButton");d.contains(this.screenDigitizationNode,"esriCTEnableButton")?(G.set(this.screenDigitizationNode,"aria-pressed","true"),this.emit("activateDigitizationTool"),this.deActivateUpdateRotationPointTool()):
(G.set(this.screenDigitizationNode,"aria-pressed","false"),this.emit("deActivateDigitizationTool"))},_onUpdateRotationPointButtonClicked:function(){d.toggle(this.updateRotationPointNode,"esriCTEnableButton");d.contains(this.updateRotationPointNode,"esriCTEnableButton")?(G.set(this.updateRotationPointNode,"aria-pressed","true"),this.emit("activateUpdateRotationPointTool"),this.deActivateDigitizationTool()):(G.set(this.updateRotationPointNode,"aria-pressed","false"),this.emit("deActivateUpdateRotationPointTool"))},
_createMiscloseDetails:function(){this._misCloseDetailsInstance=new A({nls:this.nls,config:this.config,appConfig:this.appConfig,numberFieldTypes:this.numberFieldTypes,validateNumericField:this.validateNumericField},v.create("div",{},this.misCloseDetailsNode));this._misCloseDetailsInstance.setMiscloseDetails(null)},_createParcelTools:function(){this._parcelToolInstance=new r({nls:this.nls,config:this.config,canProjectLocally:B.canProjectLocally(this.map.spatialReference)},v.create("div",{},this.parcelToolsNode));
this.own(this._parcelToolInstance.on("rotateGeometries",f.hitch(this,function(a){a!==this._rotationAngle&&(this._rotationAngle=a,this._rotationPointInfo&&this._rotationPointInfo.rotationPoint?this._updateStartPointFromRotationPoint():this._itemList&&0<this._itemList.length&&this.setStartPoint(this.startPoint))})));this.own(this._parcelToolInstance.on("scaleGeometries",f.hitch(this,function(a){a!==this._scaleValue&&(this._scaleValue=a,this._rotationPointInfo&&this._rotationPointInfo.rotationPoint?
this._updateStartPointFromRotationPoint():this._itemList&&0<this._itemList.length&&this.setStartPoint(this.startPoint))})));this.own(this._parcelToolInstance.on("toggleRotating",f.hitch(this,function(a){this.emit("toggleRotating",a)})));this.own(this._parcelToolInstance.on("toggleScaling",f.hitch(this,function(a){this.emit("toggleScaling",a)})))},_createPlanInfo:function(){this._planInfoInstance=new t({map:this.map,nls:this.nls,config:this.config,loading:this.loading,numberFieldTypes:this.numberFieldTypes,
validateNumericField:this.validateNumericField,geometryService:this.geometryService,parcelPolygonGraphicsLayer:this.parcelPolygonGraphicsLayer,parcelLinesGraphicsLayer:this.parcelLinesGraphicsLayer,polylineLayerUnit:B.getUnitValueForSR(this.lineLayerSpatialReference),polygonLayerUnit:B.getUnitValueForSR(this.polygonLayerSpatialReference),widgetDomNode:this.widgetDomNode},v.create("div",{},this.planInfoNode));this.own(this._planInfoInstance.on("cancelTraversedParcel",f.hitch(this,function(){this.emit("cancelTraverse")})));
this.own(this._planInfoInstance.on("showMessage",f.hitch(this,function(a){this._showMessage(a)})));this.own(this._planInfoInstance.on("showParcelSavedAndDeleteMsg",f.hitch(this,function(a){this._showParcelSavedAndDeleteMsg(a)})));this.own(this._planInfoInstance.on("saveTraversedParcel",f.hitch(this,function(){this.closePopup();if(this._itemList&&0<this._itemList.length){var a=this._misCloseDetailsInstance.traverseStatedArea.get("value").trim();var e=this._planInfoInstance.validateParcelDetails(a);
e.status?(""===this._misCloseDetailsInstance.traverseStatedArea.get("value")&&(a=null),e={},e.itemList=this._itemList,e.statedArea=a,e.rotation=this._rotationAngle,e.scale=this._scaleValue,e.appliedCompassRule=this.appliedCompassRule,e.miscloseDetails=this._misCloseDetailsInstance.getMiscloseDetails(),e.polygonDeleteArr=this.polygonDeleteArr,e.polylineDeleteArr=this.polylineDeleteArr,e.planSettings=this._planSettings,this._planInfoInstance.saveData(e)):e.message&&this._showMessage(e.message)}else this._showMessage(this.nls.newTraverse.enterValidParcelInfoMessage)})));
this.own(this._planInfoInstance.on("displayMainPageAfterSave",f.hitch(this,function(){this.emit("displayMainPageAfterSave",!1)})))},_createTraverseGrid:function(){var a;this._nodes=[];v.empty(this.traverseGrid);this._dndContainer=new w(this.traverseGrid,{skipForm:!0,singular:!0});this._dndContainer.copyState=function(){return!1};for(a=0;a<this._itemList.length;a++)this._createRow(this._itemList[a],a);this.own(this._dndContainer.on("DndDrop",f.hitch(this,this._onDndDrop)));this._dndContainer.insertNodes(!1,
this._nodes)},_createFieldInputs:function(a,e,h,u){var z=new q({value:e,"class":h?h:""});z.placeAt(a);"esriCTBearingRow"===h?(G.set(z,"aria-label",this.nls.traverseSettings.bearingLabel),z.validator=f.hitch(this,function(N){"*tb"!==N&&"*"===N.charAt(0)&&(N=N.slice(1));return this._bearingValidator(N,["*tb"])}),z.invalidMessage=this.nls.newTraverse.invalidBearingMessage):"esriCTLengthRow"===h?(G.set(z,"aria-label",this.nls.traverseSettings.lengthLabel),z.validator=f.hitch(this,this._lengthValidator),
z.invalidMessage=this.nls.newTraverse.invalidLengthMessage):"esriCTRadiusRow"===h&&(G.set(z,"aria-label",this.nls.traverseSettings.radiusLabel),z.validator=f.hitch(this,this._radiusValidator),z.invalidMessage=this.nls.newTraverse.invalidRadiusMessage);this.own(l(z,"blur",f.hitch(this,function(){var N=parseInt(G.get(a,"rowIndex"),10);this._updateParcelValues(z,N,u)})));this.own(l(z,"keypress",f.hitch(this,function(N){(N.charCode||N.keyCode)===W.ENTER&&(N=parseInt(G.get(a,"rowIndex"),10),this._updateParcelValues(z,
N,u));setTimeout(f.hitch(this,function(){z.validate(!1)}),100)})))},_createRow:function(a,e){var h=v.create("div",{"class":"dojoDndItem esriCTRow",rowIndex:e});var u=v.create("div",{rowIndex:e},h);this._createLineSelector(u,a.LineSymbol,e);u=this._getBearingAccordingToPlanSettings(a.BearingConversions);a.isTB&&(u="*"+u);this._createFieldInputs(h,u,"esriCTBearingRow");a.RadiusConversions?(u=this._getRoundedValue(a.RadiusConversions,"Radius"),a="radiusAndArcLength"===this._planSettings.circularCurveParameters?
this._getRoundedValue(a.ArcLengthConversions,"Length"):this._getRoundedValue(a.ChordLengthConversions,"Length")):(u="",a=this._getRoundedValue(a.LengthConversions,"Length"));this._createFieldInputs(h,a,"esriCTLengthRow");this._createFieldInputs(h,u,"esriCTRadiusRow");this._createDeleteButton(h,e);this._nodes.push(h);this._dndContainer.clearItems();this._dndContainer.insertNodes(!1,this._nodes)},_createLineSelector:function(a,e,h){var u=new K({hideOnSelect:!0,symbolData:this.config.lineTypes,tabindex:"0",
"aria-label":this.nls.newTraverse.lineTypeLabel,role:"button","aria-haspopup":"true"},a);d.add(u.domNode,"esriCTSymbolContainer");e?(u.selectSymbol(e),G.set(u.domNode,"rowIndex",h),u.onSelect=f.hitch(this,function(z){var N=parseInt(G.get(u.domNode,"rowIndex"),10);this._itemList[N].LineSymbol=z;this.setStartPoint(this.startPoint)})):u.setDefault();return u},_createDeleteButton:function(a,e){var h=v.create("div",{"class":"esriCTDeleteRow"},a);e=v.create("div",{"class":"esriCTDeleteIcon",rowIndex:e,
title:this.nls.traverseSettings.deleteButtonTitle,tabindex:"0",role:"button","aria-label":this.nls.traverseSettings.deleteButtonTitle},h);this.own(l(e,"click",f.hitch(this,function(u){u=parseInt(G.get(u.currentTarget,"rowIndex"),10);this._deleteRow(a,u)})));this.own(l(e,"keydown",f.hitch(this,function(u){if(u.keyCode===W.ENTER||u.keyCode===W.SPACE)u=parseInt(G.get(u.currentTarget,"rowIndex"),10),this._deleteRow(a,u),J.focus(this.bearingNode.focusNode)})))},_deleteRow:function(a,e){var h;if(this._itemList.length){this._dndContainer.delItem(a.id);
v.destroy(a);this._nodes.splice(e,1);this._itemList.splice(e,1);this._dndContainer.sync();this._updateRowIndexes();if(this._itemList[e]&&this._itemList[e].isTB){if(1===this._itemList.length||0===e)this._itemList[0].isTB=!1,e++;1<this._itemList.length&&(h=this._updateTBFromIndex(e))}this.appliedCompassRule?this.setParcelClosure(!0,!0):this.setStartPoint(this.startPoint,!0);h&&this._reGenerateTraverseGrid();this._showHideTraverseTools()}},_updateRowIndexes:function(){var a=U(".esriCTRow",this.traverseGrid);
p.forEach(a,f.hitch(this,function(e,h){var u;this._itemList[h].rowIndex=h;G.set(e,"rowIndex",h);(u=U(".esriCTDeleteIcon",e)[0])&&G.set(u,"rowIndex",h);(e=U(".esriCTSymbolContainer",e)[0])&&G.set(e,"rowIndex",h)}))},_onDndDrop:function(){var a=[];this._dndContainer.sync();var e=this._dndContainer.getAllNodes();e.forEach(f.hitch(this,function(u,z){u=parseInt(G.get(u,"rowIndex"),10);a.push(this._itemList[u])}));this._nodes=e;this._itemList=[];this._itemList=a;this._updateRowIndexes();for(e=0;e<this._itemList.length;e++){if(0===
e&&this._itemList[e].isTB){this._itemList[e].isTB=!1;var h=!0}this._itemList[e]&&this._itemList[e].isTB&&(this._itemList[e]=this._setTangentBearing(this._itemList[e],this._itemList[e-1]),h=!0)}this.setStartPoint(this.startPoint,!0);h&&this._reGenerateTraverseGrid()},_updateParcelValues:function(a,e,h){var u,z=!1;if(u=this._itemList[e]){var N=(N=a.get("value"))?f.trim(N.toString()):"";if(d.contains(a.domNode,"esriCTBearingRow")&&String(this._getBearingAccordingToPlanSettings(u.BearingConversions))!==
N){var T="Bearing";u.Bearing=N;z=!0;-1===N.indexOf("*")&&(u.isTB=!1)}else d.contains(a.domNode,"esriCTLengthRow")&&String(this._getRoundedValue(u.LengthConversions,"Length"))!==N?(T="Length",u.Length=N,z=!0):d.contains(a.domNode,"esriCTRadiusRow")&&String(u.Radius)!==N&&(u.RadiusConversions?String(this._getRoundedValue(u.RadiusConversions,"Radius"))!==N&&(T="Radius",u.Radius=N,z=!0):(T="Radius",u.Radius=N,z=!0));if(z)if(N=this._getValidatedValues(u,T,e)){if("Bearing"===T){T=this._getBearingAccordingToPlanSettings(N.BearingConversions);
u.Bearing=this._getBearingAccordingToPlanSettings(N.BearingConversions,!0);u.isTB&&(T="*"+T);a.set("value",T);var aa=this._updateTBFromIndex(e+1)}else"Length"===T?(T=this._getRoundedValue(u.LengthConversions,"Length"),u.Length=u.LengthConversions[this._planSettings.distanceAndLengthUnits],u.RadiusConversions&&(u=this._createValuesForArc(u)),a.set("value",T),aa=this._updateTBFromIndex(e)):"Radius"===T&&(u.RadiusConversions?(u.Radius=u.RadiusConversions[this._planSettings.distanceAndLengthUnits],T=
this._getRoundedValue(u.RadiusConversions,"Radius")):T=u.Radius="",u=this._createValuesForArc(u),a.set("value",T),aa=this._updateTBFromIndex(e));this.appliedCompassRule?this.setParcelClosure(!0,!0):this.setStartPoint(this.startPoint,!0);if(aa||h)this._reGenerateTraverseGrid(),h&&this._popupCoords&&this._openPopup(this._popupCoords)}else this._updateValues(u,T,a)}},_updateValues:function(a,e,h){if("Bearing"===e){a.Bearing=this._getBearingAccordingToPlanSettings(a.BearingConversions,!0);var u=this._getBearingAccordingToPlanSettings(a.BearingConversions)}else"Length"===
e?(a.Length=a.LengthConversions[this._planSettings.distanceAndLengthUnits],u=this._getRoundedValue(a.LengthConversions,"Length")):"Radius"===e&&(a.RadiusConversions?(a.Radius=a.RadiusConversions[this._planSettings.distanceAndLengthUnits],u=this._getRoundedValue(a.RadiusConversions,"Radius")):u=a.Radius="");h.set("value",u)},_showHideTraverseTools:function(){this._itemList&&0<this._itemList.length?(d.remove(this.expandCollapseNode,"esriCTHidden"),d.remove(this.zoomToNode,"esriCTHidden")):(d.add(this.expandCollapseNode,
"esriCTHidden"),d.add(this.zoomToNode,"esriCTHidden"))},_getBearingAccordingToPlanSettings:function(a,e){if("northAzimuth"===this._planSettings.directionOrAngleType&&"decimalDegree"===this._planSettings.directionOrAngleUnits)return e?a.naDD:a.naDDRound;if("northAzimuth"===this._planSettings.directionOrAngleType&&"degreeMinuteSeconds"===this._planSettings.directionOrAngleUnits)return a.naDMS;if("southAzimuth"===this._planSettings.directionOrAngleType&&"decimalDegree"===this._planSettings.directionOrAngleUnits)return e?
a.saDD:a.saDDRound;if("southAzimuth"===this._planSettings.directionOrAngleType&&"degreeMinuteSeconds"===this._planSettings.directionOrAngleUnits)return a.saDMS;if("quadrantBearing"===this._planSettings.directionOrAngleType&&"decimalDegree"===this._planSettings.directionOrAngleUnits)return e?a.qb3DD:a.qb3DDRound;if("quadrantBearing"===this._planSettings.directionOrAngleType&&"degreeMinuteSeconds"===this._planSettings.directionOrAngleUnits)return a.qb3DMS},_getRoundedValue:function(a,e){a=a[this._planSettings.distanceAndLengthUnits];
switch(e){case "Length":var h=this.lengthFieldPlaces;break;case "Radius":h=this.radiusFieldPlaces;break;case "MiscloseDistance":h=this.miscloseDistanceFieldPlaces}return M.honourPopupRounding(h,a)},_resetEntryRow:function(a){this.bearingNode.set("value","");this.lengthNode.set("value","");this.radiusNode.set("value","");this.bearingNode.reset();this.lengthNode.reset();this.radiusNode.reset();0<this._itemList.length&&(a=this._itemList[this._itemList.length-1].isTB?"*tb":a?this._getBearingAccordingToPlanSettings(this._itemList[this._itemList.length-
1].BearingConversions):this._itemList[this._itemList.length-1].Bearing,this.bearingNode.set("value",a),this.bearingNode.textbox.setSelectionRange(0,a.length))},_reGenerateTraverseGrid:function(){this._dndContainer&&(this._dndContainer.destroy(),this._dndContainer=null);v.empty(this.traverseGrid);this._createTraverseGrid()},_showRotationPoint:function(){var a=this.startPoint;if(this.config.startOrRotaionSymbol)var e=O.fromJson(this.config.startOrRotaionSymbol);else{var h={color:[136,136,136,255],size:11.25,
angle:0,xoffset:0,yoffset:0,type:"esriSMS",style:"esriSMSCircle",outline:{color:[29,29,53,255],width:.75,type:"esriSLS",style:"esriSLSSolid"}};e=O.fromJson(h)}this._rotationPointInfo&&this._rotationPointInfo.rotationPoint&&(a=this._rotationPointInfo.rotationPoint);4326!==this.map.spatialReference.wkid?B.getProjectedGeometry(a,this.map.spatialReference,this.geometryService).then(f.hitch(this,function(u){u&&(u=new I(u),u.setSymbol(e),this.rotationPointsGraphicsLayer.clear(),this.rotationPointsGraphicsLayer.add(u))})):
(h=new I(a),h.setSymbol(e),this.rotationPointsGraphicsLayer.clear(),this.rotationPointsGraphicsLayer.add(h))},resetRotationPoint:function(a){this._setRotationPoint(0,a)},_setRotationPoint:function(a,e){var h=e;e=new Q(4326);B.getProjectedGeometry(h,e,this.geometryService).then(f.hitch(this,function(u){h=u;this._rotationPointInfo={rotationPointIndex:a,rotationPoint:h}}))},_updateStartPointFromRotationPoint:function(){var a=this._rotationPointInfo.rotationPoint,e=this._rotationPointInfo.rotationPointIndex;
if(null!==this._rotationAngle){for(--e;0<=e;e--){var h=this._itemList[e];var u=Number(h.BearingConversions.naDD)+this._rotationAngle;var z=h.LengthConversions.meters;this._scaleValue&&(z*=this._scaleValue);u=M.getSouthAzimuthFromNorthAzimuth(u);""===h.Radius||"0"===h.Radius||0===h.Radius?a=B.getDestinationPoint(a,u,z):(z=h.RadiusConversions.meters,h=h.ChordLengthConversions.meters,this._scaleValue&&(z*=this._scaleValue,h*=this._scaleValue),a=this.getArcInfo(a,u,z,h),a=a.endPoint)}this.setStartPoint(a)}},
_reDrawParcel:function(){this.parcelLinesGraphicsLayer.clear();this.parcelPointsGraphicsLayer.clear();this._arrayOfAllBoundaryLines=[];this._drawPoint(this.startPoint);p.forEach(this._itemList,f.hitch(this,function(a){""===a.Radius||"0"===a.Radius||0===a.Radius?this._drawStraightLine(a,!1):this._drawArc(a,!1)}));this._setExtentToLayer(this.parcelLinesGraphicsLayer);this.setParcelClosure()},setStartPoint:function(a,e,h,u){var z=new Q(4326);B.getProjectedGeometry(a,z,this.geometryService).then(f.hitch(this,
function(N){h&&this._rotationPointInfo?(this._setRotationPoint(this._rotationPointInfo.rotationPointIndex,N),this._updateStartPointFromRotationPoint()):(this.startPoint=N,e&&this.resetRotationPoint(this.startPoint),this._showRotationPoint(),this._startPointForNextLine=f.clone(N),this._orgStartPointForNextLine=f.clone(N),this.appliedCompassRule=!1,0<this._itemList.length?this._reDrawParcel():(this.parcelPointsGraphicsLayer.clear(),this.parcelLinesGraphicsLayer.clear(),this._arrayOfAllBoundaryLines=
[],this._drawPoint(a,u)))}))},_addProjectedGraphic:function(a,e,h,u){var z,N={},T=h.setExtentToLayer,aa=h.setParcelClosure,D=h.startNewTraverseBtnClick;N.rowIndex=u?u.rowIndex:a.graphics.length;e.attributes=N;4326!==this.map.spatialReference.wkid?B.getProjectedGeometry(e.geometry,this.map.spatialReference,this.geometryService).then(f.hitch(this,function(E){E&&(z=new I(E),z.setAttributes(N),z.setSymbol(e.symbol),a.add(z),u&&(u.graphic=z),D&&a.graphics&&0<a.graphics.length&&this.map.centerAt(a.graphics[0].geometry),
T&&(this._setExtentToLayer(a),aa&&this.setParcelClosure()))})):(a.add(e),D&&a.graphics&&0<a.graphics.length&&this.map.centerAt(a.graphics[0].geometry),T&&(this._setExtentToLayer(a),aa&&this.setParcelClosure()))},_drawPoint:function(a,e){a=new I(a,O.fromJson(this.config.pointSymbol));this._addProjectedGraphic(this.parcelPointsGraphicsLayer,a,{setExtentToLayer:!1,setParcelClosure:!1,startNewTraverseBtnClick:e})},_drawLineAndEndPoint:function(a,e,h,u){var z=!0;a?(e=B.getLineBetweenPoints(e))?(e=new I(e,
O.fromJson(h.LineSymbol.symbol)),this._addProjectedGraphic(this.parcelLinesGraphicsLayer,e,{setExtentToLayer:u,setParcelClosure:!0,startNewTraverseBtnClick:!1},h),this._startPointForNextLine=f.clone(a),this.appliedCompassRule&&this.parcelLinesGraphicsLayer.graphics.length===this._itemList.length&&(z=!1),z&&this._drawPoint(a)):this._showMessage(this.nls.newTraverse.unableToDrawLineMessage):this._showMessage(this.nls.newTraverse.invalidEndPointMessage)},setInfoForCalculatingMisclose:function(a,e,h){a.startPoint=
f.clone(this._orgStartPointForNextLine);a.endpoint=f.clone(e);h=B.getLineBetweenPoints(h);if(a.LineSymbol.type===this.config.BoundaryLineType)for(var u=0;u<h.paths.length;u++)this._arrayOfAllBoundaryLines.push(h.paths[u]);this._orgStartPointForNextLine=f.clone(e);return a},getArcInfo:function(a,e,h,u){var z=B.getDestinationPoint(a,e,Math.abs(u));var N=Math.abs(u)/2;var T=B.getDestinationPoint(a,e,N);a={distance:u,radius:h,initBearing:e,chordMidPoint:T,centerAndChordDistance:Math.sqrt(Math.abs(h*h-
N*N)),chordEndPoint:z,chordStartPoint:a};e=B.getArcParam(a);e.startAngle=e.startAngle>e.endAngle?e.startAngle-360:e.startAngle;e=B.getPointsForArc(e.startAngle,e.endAngle,e.centerPoint,h);0===e.length&&(e.push(a.chordStartPoint),e.push(a.chordEndPoint));0>h&&e.reverse();return{endPoint:z,arcGeometryPointsArray:e}},_drawStraightLine:function(a,e){var h=a.BearingConversions.naDD;var u=a.LengthConversions.meters;if(a.adjustedValues&&this.adjustPoints){h=a.adjustedValues.adjustedBearing;if("S"===a.BearingConversions.qb3DDRound.charAt(0)||
0>a.adjustedValues.lat)h=a.adjustedValues.adjustedBearingNADD;u=a.adjustedValues.adjustedLength;this.appliedCompassRule=!0}this._rotationAngle&&(h=Number(h)+this._rotationAngle);this._scaleValue&&(u*=this._scaleValue);var z=B.getDestinationPoint(this._orgStartPointForNextLine,a.BearingConversions.naDD,a.LengthConversions.meters);h=B.getDestinationPoint(this._startPointForNextLine,h,u);a=this.setInfoForCalculatingMisclose(a,z,[this._orgStartPointForNextLine,z]);this._drawLineAndEndPoint(h,[this._startPointForNextLine,
h],a,e)},_drawArc:function(a,e){var h=a.BearingConversions.naDD;var u=a.RadiusConversions.meters;var z=a.ChordLengthConversions.meters;if(a.adjustedValues&&this.adjustPoints){h=a.adjustedValues.adjustedBearing;if("S"===a.BearingConversions.qb3DDRound.charAt(0)||0>a.adjustedValues.lat)h=a.adjustedValues.adjustedBearingNADD;z=a.adjustedValues.adjustedLength;0>a.ChordLengthConversions.meters&&(z*=-1);this.appliedCompassRule=!0}this._rotationAngle&&(h=Number(h)+this._rotationAngle);this._scaleValue&&
(z*=this._scaleValue,u*=this._scaleValue);var N=this.getArcInfo(this._orgStartPointForNextLine,a.BearingConversions.naDD,a.RadiusConversions.meters,a.ChordLengthConversions.meters);a=this.setInfoForCalculatingMisclose(a,N.endPoint,N.arcGeometryPointsArray);u=this.getArcInfo(this._startPointForNextLine,h,u,z);this._drawLineAndEndPoint(u.endPoint,u.arcGeometryPointsArray,a,e)},_setExtentToLayer:function(a,e){this._setExtentTimer&&clearTimeout(this._setExtentTimer);this._setExtentTimer=setTimeout(f.hitch(this,
function(){if(0<a.graphics.length){var h=P.graphicsExtent(a.graphics);!e&&this.map.extent.contains(h)||this.map.setExtent(h.expand(1.5))}}),200)},_showMessage:function(a){this.emit("showMessage",a)},updateAccordingToPlanSettings:function(a){this._planSettings=a;this.bearingNode.set("placeHolder",this._getAbbreviatedUnits(a.directionOrAngleUnits));this.lengthNode.set("placeHolder",this._getAbbreviatedUnits(a.distanceAndLengthUnits));this.radiusNode.set("placeHolder",this._getAbbreviatedUnits(a.distanceAndLengthUnits));
this._reGenerateTraverseGrid();this._misCloseDetailsInstance&&(a=this._misCloseDetailsInstance.getMiscloseDetails())&&(a=this._getMiscloseDetailsAccordingToPlanSettings(a),this._misCloseDetailsInstance.updateAccordingToPlanSettings(a))},deActivateUpdateRotationPointTool:function(){d.remove(this.updateRotationPointNode,"esriCTEnableButton");G.set(this.updateRotationPointNode,"aria-pressed","false")},deActivateDigitizationTool:function(){d.remove(this.screenDigitizationNode,"esriCTEnableButton");G.set(this.screenDigitizationNode,
"aria-pressed","false")},pointAddedFromDigitization:function(a){var e,h,u;var z=new Q(4326);B.getProjectedGeometry(a,z,this.geometryService).then(f.hitch(this,function(N){e=B.getAngleBetweenPoints(this._startPointForNextLine,N);360===e&&(e=0);h=B.getDistanceBetweenPoints(this._startPointForNextLine,N);u=this.getAngleFromDDTOQB(e);this.bearingNode.set("value",u);"uSSurveyFeet"===this._planSettings.distanceAndLengthUnits?h=M.metersToUSSurveyFeet(h):"feet"===this._planSettings.distanceAndLengthUnits&&
(h=M.metersToFeet(h));0<this._scaleValue&&(h/=this._scaleValue);this.lengthNode.set("value",h);this.radiusNode.set("value","");this._addNewItem(!0)}))},getParcelCloseDetails:function(){var a,e,h,u;var z={isClosed:!1,compassStartPoint:null,compassEndPoint:null};var N=!0;var T=a=e=0;p.forEach(this._itemList,f.hitch(this,function(E,L){E.LineSymbol.type===this.config.BoundaryLineType?(0===e?h=E.startPoint:u=E.endpoint,e++,a+=Math.cos(E.BearingConversions.naDD/180*Math.PI)*E.LengthConversions.meters,T+=
Math.sin(E.BearingConversions.naDD/180*Math.PI)*E.LengthConversions.meters):0<L&&0!==e&&(N=!1)}));if(1<e&&N){var aa=Math.sqrt(a*a+T*T);aa=B.removeNegativeExponents(aa);h.x=M.showFixedPlacesAfterDecimal(h.x,6);h.y=M.showFixedPlacesAfterDecimal(h.y,6);u.x=M.showFixedPlacesAfterDecimal(u.x,6);u.y=M.showFixedPlacesAfterDecimal(u.y,6);var D=B.getAngleBetweenPoints(u,h);z.isClosed=!0;z.compassStartPoint=h;z.compassEndPoint=u;z.miscloseDistance=aa;z.miscloseBearing=D}return z},setParcelClosure:function(a,
e){var h=this.getParcelCloseDetails();if(h.isClosed)h=this.getCalculatedMiscloseDetails(h),this._misCloseDetailsInstance.setMiscloseDetails(h),h.adjustPoints?((this.adjustPoints=this._applyCompassRule(h))&&!this.appliedCompassRule||a)&&this.setStartPoint(this.startPoint,e):(this.adjustPoints=!1,(this.appliedCompassRule||a)&&this.setStartPoint(this.startPoint,e));else if(this._misCloseDetailsInstance.setMiscloseDetails(null),this.adjustPoints=!1,this.appliedCompassRule||a)this.appliedCompassRule=!1,
this.setStartPoint(this.startPoint,e)},_getMiscloseDetailsAccordingToPlanSettings:function(a){var e={};a.BearingConversions&&(e.miscloseBearing=this._getBearingAccordingToPlanSettings(a.BearingConversions));var h=this._getRoundedValue(a.LengthConversions,"MiscloseDistance");e.miscloseDistance=h+" "+this._getAbbreviatedUnits(this._planSettings.distanceAndLengthUnits);a.AreaConversions?(a=a.AreaConversions[this._planSettings.areaUnits],isNaN(parseFloat(a))||(a=M.honourPopupRounding(2,a.toFixed(1)))):
a=0;a=a+" "+this._getAbbreviatedUnits(this._planSettings.areaUnits);e.calculatedArea=a;return e},getCalculatedMiscloseDetails:function(a){var e,h={},u=e=0;u=0;var z=!1;e=a.compassStartPoint;if(a.compassEndPoint&&e){e=a.miscloseDistance;u=a.miscloseBearing;0===e&&(u=0);u=this.getAngleFromDDTOQB(u);if(a=M.categorizeBearingFormat(u,this._planSettings))h.BearingConversions=a;h.AreaConversions=this._getCalculatedArea();a=this._getMiscloseRatioInfo(e);u=a.miscloseRatio;h.miscloseValue=a.miscloseValue;e=
M.categorizeLengthFormat(e,"meters");h.LengthConversions=e;e=e[this.config.miscloseSnapDistanceUnit+"Round"];1E5<=u&&(z=!0);h.miscloseRatio=u;h.accuracy=z;h=f.mixin(h,this._getMiscloseDetailsAccordingToPlanSettings(h));if(0<e&&e<=this.config.miscloseSnapDistance||isFinite(u)&&u>=this.config.miscloseRatioSnap)h.adjustPoints=!0,h.compassCompleteLength=a.compassCompleteLength}return h},_getPolygonAtOrigin:function(){var a=new x(0,0,new Q(4326)),e=[];p.forEach(this._itemList,f.hitch(this,function(h){if(h.LineSymbol.type===
this.config.BoundaryLineType){if(""===h.Radius||"0"===h.Radius||0===h.Radius){if(h.adjustedValues&&this.adjustPoints){var u=h.adjustedValues.adjustedBearing;if("S"===h.BearingConversions.qb3DDRound.charAt(0)||0>h.adjustedValues.lat)u=h.adjustedValues.adjustedBearingNADD;var z=h.adjustedValues.adjustedLength}else u=h.BearingConversions.naDD,z=h.LengthConversions.meters;h=B.getDestinationPoint(a,u,z);z=B.getLineBetweenPoints([a,h])}else{if(h.adjustedValues&&this.adjustPoints){u=h.adjustedValues.adjustedBearing;
if("S"===h.BearingConversions.qb3DDRound.charAt(0)||0>h.adjustedValues.lat)u=h.adjustedValues.adjustedBearingNADD;z=h.adjustedValues.adjustedLength;0>h.ChordLengthConversions.meters&&(z*=-1)}else u=h.BearingConversions.naDD,z=h.ChordLengthConversions.meters;z=this.getArcInfo(a,u,h.RadiusConversions.meters,z);h=z.endPoint;z=B.getLineBetweenPoints(z.arcGeometryPointsArray)}a=h;for(h=0;h<z.paths.length;h++)e.push(z.paths[h])}}));return B.getPolygonFromPolyLines(e,!0)},_getCalculatedArea:function(){var a;
if(this._arrayOfAllBoundaryLines&&0<this._arrayOfAllBoundaryLines.length&&(a=this._getPolygonAtOrigin())){var e=new I(a);this.parcelPolygonGraphicsLayer.clear();this.parcelPolygonGraphicsLayer.add(e);e=B.getAreaOfGeometry(a)}return e},_applyCompassRule:function(a){var e,h;var u=h=0;var z={};for(e=0;e<this._itemList.length;e++){var N=this._itemList[e];if(N.LineSymbol.type===this.config.BoundaryLineType){if(""===N.Radius||"0"===N.Radius||0===N.Radius)var T=N.LengthConversions.meters;else N.ChordLengthConversions&&
(T=N.ChordLengthConversions.meters);T=Math.abs(T);N.lat=T*Math.cos(Math.PI/180*N.BearingConversions.naDD);N.dep=T*Math.sin(Math.PI/180*N.BearingConversions.naDD);h+=N.lat;u+=N.dep}}z.sumOfLat=h;z.sumOfDep=u;z.sumOfAllLinesLength=a.compassCompleteLength;for(e=0;e<this._itemList.length;e++)N=this._itemList[e],""===N.Radius||"0"===N.Radius||0===N.Radius?T=N.LengthConversions.meters:N.ChordLengthConversions&&(T=N.ChordLengthConversions.meters),T=Math.abs(T),N.LineSymbol.type===this.config.BoundaryLineType&&
(N.adjustedValues=this._adjustBearingAndDistance(N.lat,N.dep,T,z));for(e=T=a=0;e<this._itemList.length;e++)N=this._itemList[e],N.LineSymbol.type===this.config.BoundaryLineType&&(a+=parseFloat(N.adjustedValues.lat.toFixed(2)),T+=parseFloat(N.adjustedValues.dep.toFixed(2)),a=parseFloat(a.toFixed(2)),T=parseFloat(T.toFixed(2)));return 0===parseInt(a,10)&&0===parseInt(T,10)?!0:!1},_adjustBearingAndDistance:function(a,e,h,u){var z={};a=parseFloat(a.toFixed(6));e=parseFloat(e.toFixed(6));h=parseFloat(h.toFixed(6));
var N=-u.sumOfLat/u.sumOfAllLinesLength*h;h*=-u.sumOfDep/u.sumOfAllLinesLength;N=parseFloat(N.toFixed(6));h=parseFloat(h.toFixed(6));e+=h;a=parseFloat((a+N).toFixed(6));e=parseFloat(e.toFixed(6));N=Math.sqrt(Math.pow(a,2)+Math.pow(e,2));h=Math.atan(e/a);h=parseFloat(h.toFixed(6));z.lat=a;z.dep=e;z.adjustedLength=N;z.adjustedBearing=180/Math.PI*h;a=M.categorizeBearingFormat(z.adjustedBearing,{directionOrAngleType:"southAzimuth",directionOrAngleUnits:"decimalDegree"});z.adjustedBearingNADD=a.naDD;return z},
_getMiscloseRatioInfo:function(a){var e,h=e=0;var u=0;this._arrayOfAllBoundaryLines&&0<this._arrayOfAllBoundaryLines.length&&(e=B.getPolyLineFromPaths(this._arrayOfAllBoundaryLines),e=B.getLengthOfGeometry(e),0<e&&(h=1/(a/e),10>h?h=0:1E5>h&&(u=parseInt(h,10),h="1:"+parseInt(h,10))));return{miscloseRatio:h,miscloseValue:u,compassCompleteLength:e}},getAngleFromDDTOQB:function(a){var e;var h=f.clone(this._planSettings);h.directionOrAngleType="northAzimuth";h.directionOrAngleUnits="decimalDegree";(a=
M.categorizeBearingFormat(a,h))&&(e="degreeMinuteSeconds"===this._planSettings.directionOrAngleUnits?a.qb3DMS:a.qb3DD);return e},initEditing:function(a,e,h){var u;this._planInfoInstance.setParcelInformation(this.polygonDeleteArr,e.features);var z=this.polygonDeleteArr[0].attributes[this.config.polygonLayer.rotation.name];(u=this.polygonDeleteArr[0].attributes[this.config.polygonLayer.scale.name])||(u=1);var N=this.polygonDeleteArr[0].attributes[this.config.polygonLayer.statedArea.name];this._parcelToolInstance.setRotation(z);
this._parcelToolInstance.setScale(u);null!==N&&void 0!==N&&this._misCloseDetailsInstance.traverseStatedArea.set("value",N);u=[];var T=B.getUnitValueForSR(h);var aa=f.clone(this._planSettings);aa.directionOrAngleType="northAzimuth";aa.directionOrAngleUnits="decimalDegree";for(h=0;h<e.features.length;h++)if(z={},z.Bearing=e.features[h].attributes[this.config.polylineLayer.bearing.name],null!==z.Bearing&&void 0!==z.Bearing&&""!==z.Bearing){z.BearingConversions=M.categorizeBearingFormat(z.Bearing,aa);
z.Bearing=this._getBearingAccordingToPlanSettings(z.BearingConversions,!0);z.Length=e.features[h].attributes[this.config.polylineLayer.distance.name];null!==z.Length&&""!==z.Length&&(z.LengthConversions=this._validateLength(z.Length,T),z.Length=z.LengthConversions[this._planSettings.distanceAndLengthUnits]);if(N=this.getLineSymbolForType(e.features[h].attributes[this.config.polylineLayer.lineType.name]))z.LineSymbol=N;z.Radius=e.features[h].attributes[this.config.polylineLayer.radius.name];null!==
z.Radius&&""!==z.Radius?(z.RadiusConversions=this._validateLength(z.Radius,T),z.Radius=z.RadiusConversions[this._planSettings.distanceAndLengthUnits],z.ArcLength=e.features[h].attributes[this.config.polylineLayer.arcLength.name],null!==z.ArcLength&&""!==z.ArcLength&&(z.ArcLengthConversions=this._validateLength(z.ArcLength,T),z.ArcLength=z.ArcLengthConversions[this._planSettings.distanceAndLengthUnits]),z.ChordLength=e.features[h].attributes[this.config.polylineLayer.chordLength.name],null!==z.ChordLength&&
""!==z.ChordLength&&(z.ChordLengthConversions=this._validateLength(z.ChordLength,T),z.ChordLength=z.ChordLengthConversions[this._planSettings.distanceAndLengthUnits]),"radiusAndArcLength"===this._planSettings.circularCurveParameters?(z.Length=z.ArcLength,z.LengthConversions=f.clone(z.ArcLengthConversions)):(z.Length=z.ChordLength,z.LengthConversions=f.clone(z.ChordLengthConversions))):(z.Radius="",z.RadiusConversions=null);z.rowIndex=u.length;u.push(z)}this._itemList=u;this._reGenerateTraverseGrid();
this._showHideTraverseTools();this.setStartPoint(a,!0);this.setBoundaryLineSymbol()},setBoundaryLineSymbol:function(){this._symbolSelector&&p.some(this.config.lineTypes,f.hitch(this,function(a){if(this.config.BoundaryLineType===a.type)return this._symbolSelector.selectSymbol(a),!1}))},getLineSymbolForType:function(a){var e;p.some(this.config.lineTypes,f.hitch(this,function(h){if(h.type===a)return e=f.clone(h),!0}));return e},deactivateParcelTools:function(){this._parcelToolInstance.disableRotating();
this._parcelToolInstance.disableScaling()},clearAll:function(){this.parcelLinesGraphicsLayer.clear();this.parcelPointsGraphicsLayer.clear();this.parcelPolygonGraphicsLayer.clear();this.rotationPointsGraphicsLayer.clear();this._resetEntryRow();this._dndContainer.clearItems();v.empty(this.traverseGrid);this._itemList=[];this._nodes=[];this._showHideTraverseTools();this._orgStartPointForNextLine=this._startPointForNextLine=this.startPoint=null;this._rotationAngle=0;this._scaleValue=1;this._symbolSelector.setDefault();
d.remove(this.screenDigitizationNode,"esriCTEnableButton");d.remove(this.updateRotationPointNode,"esriCTEnableButton");this._parcelToolInstance.resetTools();this.deactivateParcelTools();this._misCloseDetailsInstance.setMiscloseDetails(null);this._arrayOfAllBoundaryLines=[];this.polygonDeleteArr=[];this.polylineDeleteArr=[];this.domNode.scrollTop=0;this._planInfoInstance.resetValues();this._misCloseDetailsInstance.traverseStatedArea.set("value",null);this._rotationPointInfo=null;this.closePopup()},
_showParcelPopup:function(a){var e=[];var h=new b;var u=this._pointToExtent(a.mapPoint,8);e=p.filter(this.parcelLinesGraphicsLayer.graphics,function(z){return u.intersects(z.geometry)});e[0]?(this._createPopupContent(a,e[0]),h.resolve(!0)):(this.closePopup(),h.resolve(!1));return h},_getAbbreviatedUnits:function(a){return window.jimuNls.units[a+"Abbr"]},_pointToExtent:function(a,e){var h=this.map.extent.getWidth()/this.map.width;e*=h;return new g(a.x-e,a.y-e,a.x+e,a.y+e,this.map.spatialReference)},
_createPopupContent:function(a,e){var h;if(h=this._itemList[e.attributes.rowIndex]){var u=v.create("div",{"class":"esriCTParcelInfoPopup "+this.baseClass},null);var z=v.create("div",{"class":"esriCTLabelRows"},u);this._createFieldLabels(z,this.nls.traverseSettings.bearingLabel);this._createFieldLabels(z,this.nls.traverseSettings.lengthLabel);this._createFieldLabels(z,this.nls.traverseSettings.radiusLabel);e=v.create("div",{"class":"esriCTRowContainer esriCTRow",rowIndex:e.attributes.rowIndex},u);
this._createFieldInputs(e,this._getBearingAccordingToPlanSettings(h.BearingConversions),"esriCTBearingRow",!0);(z=h.RadiusConversions)?(z=this._getRoundedValue(h.RadiusConversions,"Radius"),h="radiusAndArcLength"===this._planSettings.circularCurveParameters?this._getRoundedValue(h.ArcLengthConversions,"Length"):this._getRoundedValue(h.ChordLengthConversions,"Length")):(z="",h=this._getRoundedValue(h.LengthConversions,"Length"));this._createFieldInputs(e,h,"esriCTLengthRow",!0);this._createFieldInputs(e,
z,"esriCTRadiusRow",!0);H.position(this.traverseEntryNode)&&H.position(this.traverseEntryNode).w&&(h=H.position(this.traverseEntryNode).w-42,C.set(this._popupDialog.domNode,"width",h+"px"));this._popupDialog.setContent(u);this._popupCoords={pageX:a.pageX,pageY:a.pageY};this._openPopup(a)}},_openPopup:function(a){C.set(this._popupDialog.domNode,"opacity",.9);y.open({popup:this._popupDialog,x:a.pageX,y:a.pageY})},closePopup:function(){this._popupDialog&&y.close(this._popupDialog)},_createFieldLabels:function(a,
e){v.create("div",{innerHTML:e,title:e,"class":"esriCTParcelInfoLabels"},a)},_createTooltip:function(){this._popupDialog=new V({"class":"esriCTEditParcelDialog"});this._popupDialog.startup()},validateNumericField:function(a,e){var h=/^[-+]?[0-9]+\.[0-9]+$/,u=/^[-+]?[0-9]+$/;a=f.trim(a);switch(e){case "esriFieldTypeSmallInteger":e=parseInt(a,10);var z=a.match(u)&&-32768<=e&&32767>=e&&0!==a.length?!0:!1;break;case "esriFieldTypeInteger":e=parseInt(a,10);z=a.match(u)&&-2147483648<=e&&2147483647>=e&&
0!==a.length?!0:!1;break;case "esriFieldTypeSingle":e=parseFloat(a);z=(a.match(u)||a.match(h))&&e>=-3.4*Math.pow(10,38)&&e<=1.2*Math.pow(10,38)&&0!==a.length?!0:!1;break;case "esriFieldTypeDouble":e=parseFloat(a),z=(a.match(u)||a.match(h))&&e>=-2.2*Math.pow(10,308)&&e<=1.8*Math.pow(10,38)&&0!==a.length?!0:!1}return z},updateLastNodeInTraversePanel:function(){this._planInfoInstance.setPlanInfoCancelBtnAsLastNode()},_showParcelSavedAndDeleteMsg:function(a){this.emit("showParcelSavedAndDeleteMsg",a)}})})},
"widgets/ParcelDrafter/SymbolSelector":function(){define("dojo/_base/declare jimu/BaseWidget dojo/_base/lang dojo/on dojo/dom-construct dojo/_base/array jimu/symbolUtils esri/symbols/jsonUtils dijit/popup dijit/TooltipDialog dojo/_base/html dojo/keys dojo/query dijit/focus".split(" "),function(F,c,k,m,n,f,p,d,v,C,w,l,q,K){return F([c],{_tooltipDialog:null,selectedSymbol:null,symbolData:[],constructor:function(A){k.mixin(this,A)},postCreate:function(){this.symbolData||(this.symbolData=[]);this._createSelectedSymbolNode();
this._hideTooltipDialog();this.symbolData&&0<this.symbolData.length&&(this._createTooltipDialog(),this.symbolData[1].isDefault?this.selectSymbol(this.symbolData[1]):this.selectSymbol(this.symbolData[0]));this.own(m(document.body,"click",k.hitch(this,function(A){this.isPartOfPopup(A.target||A.srcElement)||this._hideTooltipDialog()})))},setDefault:function(){this.symbolData&&1<this.symbolData.length&&this.symbolData[1].isDefault?this.selectSymbol(this.symbolData[1]):this.selectSymbol(this.symbolData[0])},
_createSelectedSymbolNode:function(){var A=n.create("div",{},this.domNode);this.selectedSymbolNode=n.create("div",{"class":"esriCTSelectedSymbol"},A)},_createTooltipDialog:function(){var A=this._createSymbolListMenu();this._tooltipDialog=new C({content:A,"class":"esriCTSymbolPopup"});this.own(m(this.domNode,"click",k.hitch(this,function(r){r.stopPropagation();r.preventDefault();this._isTooltipDialogOpened?this._hideTooltipDialog():this._showTooltipDialog()})));this.own(m(this.domNode,"keydown",k.hitch(this,
function(r){if(r.keyCode===l.ENTER||r.keyCode===l.SPACE)this._isTooltipDialogOpened?this._hideTooltipDialog():this._showTooltipDialog()})));this.own(m(document.body,"click",k.hitch(this,function(r){this.isPartOfPopup(r.target||r.srcElement)||this._hideTooltipDialog()})))},_createSymbolListMenu:function(){var A=n.create("div",{"class":"esriCTSymbolListContainer"},null);var r=n.create("div",{"class":"esriCTSymbolListContent",role:"menu"},A);f.forEach(this.symbolData,k.hitch(this,function(t){var B=n.create("div",
{"class":"esriCTSymbolOption",title:t.label,tabindex:"0",role:"menuitem","aria-label":t.label},r);this._attachRowClick(B,t);var M=n.create("div",{"class":"esriCTSymbolIcon"},B);n.create("div",{"class":"esriCTSymbolName",innerHTML:t.label},B);B=n.create("div",{},M);this._createSymbol(t,B)}));return A},_attachRowClick:function(A,r){this.own(m(A,"click",k.hitch(this,function(){this.selectSymbol(r);this.hideOnSelect&&this._hideTooltipDialog()})));this.own(m(A,"keydown",k.hitch(this,function(t){if(t.keyCode===
l.ENTER||t.keyCode===l.SPACE||t.keyCode===l.ESCAPE)this.selectSymbol(r),this.hideOnSelect&&(this._hideTooltipDialog(),K.focus(this.domNode))})))},_createSymbol:function(A,r){A&&(A=d.fromJson(A.symbol),(A=p.createSymbolNode(A))||(A=n.create("div")),n.place(A,r))},selectSymbol:function(A){n.empty(this.selectedSymbolNode);this.selectedSymbol={label:A.label||A.type,type:A.type,symbol:A.symbol};this._createSymbol(this.selectedSymbol,this.selectedSymbolNode);this.onSelect(A)},destroy:function(){v.close(this._tooltipDialog);
this._tooltipDialog.destroy();this.inherited(arguments)},isPartOfPopup:function(A){var r=this._tooltipDialog.domNode;return A===r||w.isDescendant(A,r)},onSelect:function(A){return A},_showTooltipDialog:function(){v.open({parent:this.getParent(),popup:this._tooltipDialog,around:this.domNode,"class":"esriCTSymbolPopup"});this._isTooltipDialogOpened=!0;this.focusFirstSymbolOption()},_hideTooltipDialog:function(){v.close(this._tooltipDialog);this._isTooltipDialogOpened=!1},focusFirstSymbolOption:function(){var A=
q(".esriCTSymbolOption",this._tooltipDialog.domNode);K.focus(A[0])}})})},"widgets/ParcelDrafter/MiscloseDetails":function(){define("dojo/_base/declare jimu/BaseWidget dijit/_WidgetsInTemplateMixin dojo/text!./MiscloseDetails.html dojo/_base/lang dojo/Evented dojo/dom-class dojo/dom-attr".split(" "),function(F,c,k,m,n,f,p,d){return F([c,k,f],{baseClass:"jimu-widget-ParcelDrafter-MisclosedDetails",templateString:m,details:null,constructor:function(v){n.mixin(this,v)},postCreate:function(){this.inherited(arguments);
p.add(this.domNode,"esriCTFullWidth");this.config.polygonLayer.statedArea&&this.config.polygonLayer.statedArea.hasOwnProperty("name")&&(p.remove(this.traverseStatedAreaNode,"esriCTHidden"),this.traverseStatedArea.trim=!0,this.config.polygonLayer.statedArea.nullable||(this.traverseStatedArea.required=!0),0<=this.numberFieldTypes.indexOf(this.config.polygonLayer.statedArea.type)&&(this.traverseStatedArea.validator=n.hitch(this,function(v){return!this.config.polygonLayer.statedArea.nullable&&(null===
v||""===v)||""!==v&&!this.validateNumericField(v,this.config.polygonLayer.statedArea.type)?!1:!0})));this._setBackgroundColorForDartTheme()},_setBackgroundColorForDartTheme:function(){"DartTheme"===this.appConfig.theme.name&&p.add(this.traverseDetailsContainer,"esriCTMiscloseHeaderDiv")},getMiscloseDetails:function(){return this.details},updateAccordingToPlanSettings:function(v){d.set(this.miscloseBearingNode,"innerHTML",v.miscloseBearing);d.set(this.miscloseDistanceNode,"innerHTML",v.miscloseDistance);
d.set(this.calculatedAreaNode,"innerHTML",v.calculatedArea)},setMiscloseDetails:function(v){(this.details=v)?(d.set(this.miscloseBearingNode,"innerHTML",v.miscloseBearing),d.set(this.miscloseDistanceNode,"innerHTML",v.miscloseDistance),0!==v.miscloseRatio?(p.remove(this.traverseMiscloseRatioNode,"esriCTHidden"),d.set(this.miscloseRatioNode,"innerHTML",v.miscloseRatio)):p.add(this.traverseMiscloseRatioNode,"esriCTHidden"),v.accuracy?(p.add(this.traverseMiscloseRatioNode,"esriCTHidden"),p.remove(this.traverseAccuracyNode,
"esriCTHidden")):p.add(this.traverseAccuracyNode,"esriCTHidden"),v.calculatedArea?(d.set(this.calculatedAreaNode,"innerHTML",v.calculatedArea),p.remove(this.traverseCalculatedAreaNode,"esriCTHidden")):p.add(this.traverseCalculatedAreaNode,"esriCTHidden"),p.add(this.noMiscloseCalculated,"esriCTHidden"),p.remove(this.miscloseDetailsContainer,"esriCTHidden")):(p.add(this.miscloseDetailsContainer,"esriCTHidden"),p.remove(this.noMiscloseCalculated,"esriCTHidden"))}})})},"widgets/ParcelDrafter/ParcelTools":function(){define("dojo/_base/declare jimu/BaseWidget dijit/_WidgetsInTemplateMixin dojo/text!./ParcelTools.html dojo/_base/lang dojo/Evented dojo/dom-class dojo/dom-attr dojo/on dojo/keys dijit/form/NumberTextBox".split(" "),
function(F,c,k,m,n,f,p,d,v,C){return F([c,k,f],{baseClass:"jimu-widget-ParcelDrafter-ParcelTools",templateString:m,rotationAngle:0,scaledValue:1,constructor:function(w){n.mixin(this,w)},postCreate:function(){this.inherited(arguments);p.add(this.domNode,"esriCTFullWidth");this.rotationTxt.constraints={min:-360,max:360,places:3};this.scaleTxt.constraints={min:.1,places:3};this.rotationTxt.set("value",this.rotationAngle);this.scaleTxt.set("value",this.scaledValue);this.own(v(this.rotationTxt,"blur",
n.hitch(this,function(){this.setRotation(this.rotationTxt.displayedValue)})));this.own(v(this.scaleTxt,"blur",n.hitch(this,function(){this.setScale(this.scaleTxt.displayedValue)})));this.canProjectLocally?(this.own(v(this.rotateButton,"click",n.hitch(this,function(){this._toggleRotating()}))),this.own(v(this.rotateButton,"keydown",n.hitch(this,function(w){if(w.keyCode===C.ENTER||w.keyCode===C.SPACE)w.preventDefault(),this._toggleRotating()}))),this.own(v(this.scaleButton,"click",n.hitch(this,function(){this._toggleScaling()}))),
this.own(v(this.scaleButton,"keydown",n.hitch(this,function(w){if(w.keyCode===C.ENTER||w.keyCode===C.SPACE)w.preventDefault(),this._toggleScaling()})))):(p.add(this.rotateButton,"esriCTDisabledParcelToolButton"),d.set(this.rotateButton,"tabindex","-1"),p.add(this.scaleButton,"esriCTDisabledParcelToolButton"),d.set(this.scaleButton,"tabindex","-1"));this.own(v(this.rotationTxt,"keypress",n.hitch(this,function(w){(w.charCode||w.keyCode)===C.ENTER&&this.setRotation(this.rotationTxt.displayedValue)})));
this.own(v(this.scaleTxt,"keypress",n.hitch(this,function(w){(w.charCode||w.keyCode)===C.ENTER&&this.setScale(this.scaleTxt.displayedValue)})))},setScale:function(w){var l=this.scaledValue;isNaN(Number(w))||(this.scaleTxt.set("value",Number(w)),this.scaleTxt.set("value",Number(this.scaleTxt.displayedValue)));this.scaleTxt.isValid()?this.scaleGeometries():(this.scaleTxt.set("value",Number(l)),this.scaleTxt.set("value",Number(this.scaleTxt.displayedValue)))},scaleGeometries:function(){var w=Number(this.scaleTxt.get("value"));
isNaN(w)||(this.scaledValue=w,this.emit("scaleGeometries",w))},setRotation:function(w){var l=this.rotationAngle;isNaN(Number(w))||(this.rotationTxt.set("value",Number(w)),this.rotationTxt.set("value",Number(this.rotationTxt.displayedValue)));this.rotationTxt.isValid()?this.rotateGeometries():(this.rotationTxt.set("value",Number(l)),this.rotationTxt.set("value",Number(this.rotationTxt.displayedValue)))},rotateGeometries:function(){var w=Number(this.rotationTxt.get("value"));isNaN(w)||(this.rotationAngle=
w,this.emit("rotateGeometries",w))},resetTools:function(){this.rotationAngle=0;this.scaledValue=1;this.rotationTxt.set("value",Number(0));this.scaleTxt.set("value",Number(1))},_toggleRotating:function(){p.contains(this.rotateButton.parentElement,"esriCTDisableButton")?(p.remove(this.rotateButton.parentElement,"esriCTDisableButton"),d.set(this.rotateButton,"aria-pressed","true"),this.disableScaling(),this.emit("toggleRotating",!0)):(this.disableRotating(),this.emit("toggleRotating",!1))},_toggleScaling:function(){p.contains(this.scaleButton.parentElement,
"esriCTDisableButton")?(p.remove(this.scaleButton.parentElement,"esriCTDisableButton"),d.set(this.scaleButton,"aria-pressed","true"),this.disableRotating(),this.emit("toggleScaling",!0)):(this.disableScaling(),this.emit("toggleScaling",!1))},disableRotating:function(){p.add(this.rotateButton.parentElement,"esriCTDisableButton");d.set(this.rotateButton,"aria-pressed","false")},disableScaling:function(){p.add(this.scaleButton.parentElement,"esriCTDisableButton");d.set(this.scaleButton,"aria-pressed",
"false")}})})},"widgets/ParcelDrafter/PlanInfo":function(){define("dojo/_base/declare jimu/BaseWidget dijit/_WidgetsInTemplateMixin dojo/text!./PlanInfo.html dojo/_base/lang dojo/_base/array dojo/Evented dojo/dom-attr dojo/dom-construct dojo/dom-class dojo/dom-style dojo/query dijit/registry dijit/form/ValidationTextBox dojo/store/Memory dijit/form/ComboBox dojo/on esri/geometry/Polyline esri/graphic esri/tasks/query esri/tasks/QueryTask esri/dijit/AttributeInspector esri/layers/FeatureLayer jimu/dijit/Message ./geometryUtils jimu/utils jimu/LayerInfos/LayerInfos dojo/keys dojo/aspect".split(" "),
function(F,c,k,m,n,f,p,d,v,C,w,l,q,K,A,r,t,B,M,I,O,R,P,G,U,Q,W,J,V){return F([c,k,p],{baseClass:"jimu-widget-ParcelDrafter-PlanInfo",templateString:m,_itemList:null,_polygonLayer:null,parcelNameTextBox:null,planNameTextBox:null,documentTypeControl:null,planSettings:null,_savedPolygonObjectId:null,_savedPolyLines:null,fieldInfosForPolygonLayer:null,constructor:function(y){n.mixin(this,y)},postCreate:function(){this.inherited(arguments);W.getInstance(this.map,this.map.itemInfo).then(n.hitch(this,function(y){this._layerInfosObj=
y;this._init()}))},_init:function(){if(0<this._getFieldInfosForPolygonLayer().length)if(this._addGraphicToLocalLayer(),this.config.polygonLayer.attributeListTitle){var y=Q.sanitizeHTML(this.config.polygonLayer.attributeListTitle);d.set(this.attributeListTitle,"innerHTML",y)}else y=this._layerInfosObj.getLayerInfoById(this.config.polygonLayer.id),d.set(this.attributeListTitle,"innerHTML",y.layerObject.name);else C.add(this.expandCollapseParentNode,"esriCTHidden");C.add(this.domNode,"esriCTFullWidth");
this.own(t(this.planInfoCancelButton,"click",n.hitch(this,function(){this.emit("cancelTraversedParcel")})));this.own(t(this.planInfoCancelButton,"keydown",n.hitch(this,function(b){b.keyCode!==J.ENTER&&b.keyCode!==J.SPACE||this.emit("cancelTraversedParcel")})));this.own(t(this.planInfoSaveButton,"click",n.hitch(this,function(){this.emit("saveTraversedParcel")})));this.own(t(this.planInfoSaveButton,"keydown",n.hitch(this,function(b){b.keyCode!==J.ENTER&&b.keyCode!==J.SPACE||this.emit("saveTraversedParcel")})));
this.own(t(this.planInfoDeleteButton,"click",n.hitch(this,this.deleteParcel)));this.own(t(this.planInfoDeleteButton,"keydown",n.hitch(this,function(b){b.keyCode!==J.ENTER&&b.keyCode!==J.SPACE||this.deleteParcel()})));this.own(t(this.expandCollapseNode,"click",n.hitch(this,this._onExpandCollapseClicked)));this.own(t(this.expandCollapseNode,"keydown",n.hitch(this,function(b){if(b.keyCode===J.ENTER||b.keyCode===J.SPACE)b.preventDefault(),this._onExpandCollapseClicked()})))},_onExpandCollapseClicked:function(){C.toggle(this.expandCollapseNode,
"esriCTCollapsedParceLayer");C.toggle(this.attributeListNode,"esriCTHidden");var y=this.nls.planInfo.showAttributeList;C.contains(this.expandCollapseNode,"esriCTCollapsedParceLayer")&&(y=this.nls.planInfo.hideAttributeList);d.set(this.expandCollapseNode,"aria-label",y);d.set(this.expandCollapseNode,"title",y)},resetValues:function(){C.contains(this.expandCollapseNode,"esriCTCollapsedParceLayer")&&this._onExpandCollapseClicked();this._addGraphicToLocalLayer();this.parcelNameTextBox&&this.parcelNameTextBox.set("value",
"");this.planNameTextBox&&this.planNameTextBox.set("value","");this.documentTypeControl&&(this.config.polygonLayer.documentType.domain?this.documentTypeControl.set("item",null):this.documentTypeControl.set("value",""));C.add(this.planInfoDeleteButton,"esriCTHidden")},_showMessage:function(y){this.emit("showMessage",y)},_createDocumentTypeControl:function(){this.config.polygonLayer.documentType.domain?(this.documentTypeControl=this._createFieldSelect(this.config.polygonLayer.documentType,this.documentType,
this.nls.planInfo.parcelDocumentTypeText,!this.config.polygonLayer.documentType.nullable),this.own(t(this.documentTypeControl,"change",n.hitch(this,function(y){""===y||null===y||void 0===y||this.documentTypeControl.store.data.some(function(b){return b.name===y})||(this.documentTypeControl.set("item",null),this._showMessage(this.nls.planInfo.enterValidDocumentTypeMessage))})))):this.documentTypeControl=this._createFieldInputs(this.config.polygonLayer.documentType,this.documentType,this.nls.planInfo.parcelDocumentTypeText,
!this.config.polygonLayer.documentType.nullable)},_createFieldInputs:function(y,b,g,x){y.alias&&(g=y.alias);g=x?g+" "+this.nls.planInfo.requiredText:g+" "+this.nls.planInfo.optionalText;g=new K({placeHolder:g,"class":"esriCTFullWidth",required:x,"aria-label":g});0<=this.numberFieldTypes.indexOf(y.type)&&(g.validator=n.hitch(this,function(H){return""===H||this.validateNumericField(H,y.type)?!0:!1}));g.placeAt(b);return g},_createFieldSelect:function(y,b,g,x){var H=this._createDocTypeDataArr();H=new A({data:H});
y&&y.alias&&(g=y.alias);g=x?g+" "+this.nls.planInfo.requiredText:g+" "+this.nls.planInfo.optionalText;this.selectBox=new r({placeHolder:g,"class":"esriCTFullWidth",required:x,store:H},b);d.set(this.selectBox.domNode,"aria-label",g);d.set(this.selectBox.domNode,"role","combobox");d.set(this.selectBox.domNode,"aria-expanded","false");V.after(this.selectBox,"loadAndOpenDropDown",n.hitch(this,function(){d.set(this.selectBox.domNode,"aria-expanded","true")}));V.after(this.selectBox,"closeDropDown",n.hitch(this,
function(){d.set(this.selectBox.domNode,"aria-expanded","false")}));return this.selectBox},_createDocTypeDataArr:function(){var y=[];this.config.polygonLayer.documentType.domain.codedValues&&f.forEach(this.config.polygonLayer.documentType.domain.codedValues,n.hitch(this,function(b){y.push({name:b.name,id:b.code})}));return y},saveData:function(y){if(y.miscloseDetails&&(0===y.miscloseDetails.LengthConversions.meters||y.appliedCompassRule))this._saveParcel(y);else var b=new G({message:this.nls.planInfo.saveNonClosedParcelConfirmationMessage,
type:"question",buttons:[{label:this.nls.common.yes,onClick:n.hitch(this,function(){b.close();this._saveParcel(y)})},{label:this.nls.common.no}]})},_saveParcel:function(y){this._itemList=y.itemList;this.planSettings=y.planSettings;0===y.polygonDeleteArr.length?this._createPolygonData(y):this._deletePolygonBeforeSaving(y)},_createParcelPolygon:function(){var y,b,g;var x=[];var H=this.parcelLinesGraphicsLayer.graphics;for(y=0;y<this._itemList.length;y++)if(this._itemList[y].LineSymbol.type===this.config.BoundaryLineType)for(b=
0;b<this._itemList[y].graphic.geometry.paths.length;b++)x.push(this._itemList[y].graphic.geometry.paths[b]);0<x.length&&(g=U.getPolygonFromPolyLines(x,!1,!0,H[0].geometry.spatialReference))&&(this.parcelPolygonGraphicsLayer.clear(),y=new M(g),this.parcelPolygonGraphicsLayer.add(y),g=this.parcelPolygonGraphicsLayer.graphics[0].geometry);return g},_createPolygonData:function(y){this.loading.show();var b=[];var g={};var x=this.polygonLayerUnit;this.documentTypeControl&&(this.config.polygonLayer.documentType.domain?
this.documentTypeControl.hasOwnProperty("item")&&this.documentTypeControl.item&&this.documentTypeControl.item.hasOwnProperty("id"):""!==this.documentTypeControl.get("value")&&this.documentTypeControl.get("value"));var H=!1;if(y.miscloseDetails&&(0===y.miscloseDetails.LengthConversions.meters||y.appliedCompassRule))var a=this._createParcelPolygon();else a={},H=!0;a?(H&&(a=null),this._currentFeatureDetails&&this._currentFeatureDetails.attributes&&(g=n.clone(this._currentFeatureDetails.attributes)),
g[this.config.polygonLayer.rotation.name]=y.rotation,g[this.config.polygonLayer.scale.name]=y.scale,y.miscloseDetails&&(g[this.config.polygonLayer.miscloseRatio.name]=y.miscloseDetails.miscloseValue,g[this.config.polygonLayer.miscloseDistance.name]=this._getValueAccToFeatureLayerUnit(x,y.miscloseDetails,"LengthConversions")),this.config.polygonLayer.statedArea.hasOwnProperty("name")&&(g[this.config.polygonLayer.statedArea.name]=y.statedArea),y=new M(a,null,g),b.push(y),this._saveParcelPolygon(b)):
this._showMessage(this.nls.planInfo.unableToCreatePolygonParcel)},setParcelInformation:function(y,b){var g=this.map.getLayer(this.config.polygonLayer.id).objectIdField;this._savedPolygonObjectId=y[0].attributes[g];var x=n.clone(y[0].attributes);x[g]=x[g]?x[g]:0;this._addGraphicToLocalLayer(x);this._savedPolyLines=b;C.remove(this.planInfoDeleteButton,"esriCTHidden");this.parcelNameTextBox&&this.parcelNameTextBox.set("value",y[0].attributes[this.config.polygonLayer.parcelName.name]);this.planNameTextBox&&
this.planNameTextBox.set("value",y[0].attributes[this.config.polygonLayer.planName.name]);this.documentTypeControl&&(y=y[0].attributes[this.config.polygonLayer.documentType.name],null!==y&&""!==y&&void 0!==y&&(this.config.polygonLayer.documentType.domain?this.documentTypeControl.set("item",this.documentTypeControl.store.get(y)):this.documentTypeControl.set("value",y)))},_rollbackSavedPolygon:function(){var y;var b={attributes:{}};if((y=this.map.getLayer(this.config.polygonLayer.id))&&null!==this._savedPolygonObjectId){b.attributes[y.objectIdField]=
this._savedPolygonObjectId;var g=y.applyEdits(null,null,[b])}return g},_rollbackSavedPolyLines:function(y){var b,g;var x=[];var H=this.map.getLayer(this.config.polylineLayer.id);f.forEach(y,n.hitch(this,function(a){b={attributes:{}};a.hasOwnProperty("objectId")?(b.attributes[H.objectIdField]=a.objectId,x.push(b)):a.attributes.hasOwnProperty(H.objectIdField)&&(b.attributes[H.objectIdField]=a.attributes[H.objectIdField],x.push(b))}));H&&0<x.length&&(g=H.applyEdits(null,null,x));return g},_deletePolygonBeforeSaving:function(y){(this._polygonLayer=
this.map.getLayer(this.config.polygonLayer.id))?this._polygonLayer.applyEdits(null,null,y.polygonDeleteArr,n.hitch(this,function(){this._deleteLinesBeforeSaving(y)}),n.hitch(this,function(){this._showMessage(this.nls.planInfo.unableToSavePolygonParcel)})):this._showMessage(this.nls.planInfo.unableToSavePolygonParcel)},_deleteLinesBeforeSaving:function(y){var b;(b=this.map.getLayer(this.config.polylineLayer.id))?b.applyEdits(null,null,y.polylineDeleteArr,n.hitch(this,function(){this._createPolygonData(y)}),
n.hitch(this,function(){this._showMessage(this.nls.planInfo.unableToUpdateParcelLines)})):this._showMessage(this.nls.planInfo.unableToUpdateParcelLines)},_saveParcelPolygon:function(y){(this._polygonLayer=this.map.getLayer(this.config.polygonLayer.id))?(this._savedPolygonObjectId=null,this._polygonLayer.applyEdits(y,null,null,n.hitch(this,function(b){b&&0<b.length&&b[0].success?(this._savedPolygonObjectId=b[0].objectId,this._polygonLayer.refresh(),b=new I,b.objectIds=[this._savedPolygonObjectId],
b.returnGeometry=!1,b.outFields=[this.config.polygonLayer.relatedGUID.name],(new O(this._polygonLayer.url)).execute(b,n.hitch(this,function(g){this.loading.hide();this._createPolylineData(g.features[0].attributes[this.config.polygonLayer.relatedGUID.name])}),n.hitch(this,function(){this.loading.hide();this._showMessage(this.nls.planInfo.unableToSaveParcelLines)}))):(this.loading.hide(),this._showMessage(this.nls.planInfo.unableToSavePolygonParcel))}),n.hitch(this,function(){this.loading.hide();this._showMessage(this.nls.planInfo.unableToSavePolygonParcel)}))):
(this.loading.hide(),this._showMessage(this.nls.planInfo.unableToSavePolygonParcel))},_getValueAccToFeatureLayerUnit:function(y,b,g){if(b.hasOwnProperty(g)&&b[g])switch(y){case "meters":case "degrees":return b[g].meters;case "feet":return b[g].feet;case "uSSurveyFeet":return b[g].uSSurveyFeet;default:return null}else return null},_getCurrentLineFeatures:function(){for(var y=[],b=0;b<this._itemList.length;b++)y.push(this._itemList[b].graphic);return y},_createPolylineData:function(y){this.loading.show();
var b=this._getCurrentLineFeatures();var g=this.polylineLayerUnit;var x=this._itemList;var H=[];for(var a=0;a<b.length;a++){var e={};var h=x[a];e[this.config.polylineLayer.bearing.name]=h.BearingConversions.naDD;e[this.config.polylineLayer.distance.name]=this._getValueAccToFeatureLayerUnit(g,h,"LengthConversions");e[this.config.polylineLayer.lineType.name]=h.LineSymbol.type;e[this.config.polylineLayer.radius.name]=this._getValueAccToFeatureLayerUnit(g,h,"RadiusConversions");null!==e[this.config.polylineLayer.radius.name]&&
""!==e[this.config.polylineLayer.radius.name]&&void 0!==e[this.config.polylineLayer.radius.name]?(e[this.config.polylineLayer.arcLength.name]=this._getValueAccToFeatureLayerUnit(g,h,"ArcLengthConversions"),h=this._getValueAccToFeatureLayerUnit(g,h,"ChordLengthConversions"),e[this.config.polylineLayer.chordLength.name]=h,e[this.config.polylineLayer.distance.name]=h):(e[this.config.polylineLayer.arcLength.name]=null,e[this.config.polylineLayer.chordLength.name]=null);e[this.config.polylineLayer.relatedGUID.name]=
y;e[this.config.polylineLayer.sequenceId.name]=a;h=b[a].geometry.toJson();h=new B(h);e=new M(h,null,e,null);H.push(e)}this._saveParcelLines(H)},_saveParcelLines:function(y){var b;(b=this.map.getLayer(this.config.polylineLayer.id))?b.applyEdits(y,null,null,n.hitch(this,function(g){var x=[],H=[];f.forEach(g,function(a){a.success?H.push(a):x.push(a)});0<x.length?(this._rollbackSavedPolygon(),0<H.length&&x.length!==y.length&&this._rollbackSavedPolyLines(H),this._showMessage(this.nls.planInfo.unableToSaveParcelLines)):
(this._showParcelSavedAndDeleteMsg(this.nls.planInfo.parcelSavedSuccessMessage),this._savedPolygonObjectId=null,this.emit("displayMainPageAfterSave",!1));this.loading.hide()}),n.hitch(this,function(){this._rollbackSavedPolygon();this.loading.hide();this._showMessage(this.nls.planInfo.unableToSaveParcelLines)})):(this._rollbackSavedPolygon(),this.loading.hide(),this._showMessage(this.nls.planInfo.unableToSaveParcelLines))},_validateRequiredFields:function(){var y=[],b=this._currentFeatureDetails;if(!b)return y;
var g=b.getLayer();g=f.filter(g.fields,n.hitch(this,function(x){return!1===x.nullable&&!0===x.editable}));f.forEach(g,n.hitch(this,function(x){if(b.attributes.hasOwnProperty(x.name))if("undefined"===b.attributes[x.name])y.push(x.name);else if(null===b.attributes[x.name])y.push(x.name);else switch(x.type){case "esriFieldTypeString":(""===b.attributes[x.name]||b.attributes[x.name]&&""===b.attributes[x.name].trim())&&y.push(x.name)}else y.push(x.name)}));return y},_validateAttributes:function(){var y=
[],b;y=this._validateRequiredFields();var g=l("td.atiLabel",this._attributeInspector.domNode),x=[];this._clonedProjectPolygonLayerObject.globalIdField&&x.push(this._clonedProjectPolygonLayerObject.globalIdField);this._clonedProjectPolygonLayerObject.objectIdField&&x.push(this._clonedProjectPolygonLayerObject.objectIdField);g&&f.forEach(g,n.hitch(this,function(H){var a=d.get(H,"data-fieldname");-1===x.indexOf(a)&&(a=this._getAttrInspectorRowInfo(H))&&(0>y.indexOf(a[1])?a[0].isValid&&!a[0].isValid()?
(y.push(a[1]),b||(b=a[0])):1<H.parentNode.childNodes[1].childNodes.length&&(H=H.parentNode.childNodes[1].childNodes[1],H=q.getEnclosingWidget(H),H.isValid&&!H.isValid()&&(y.push(a[1]),b||(b=H))):b||(b=a[0]))}));b&&(C.contains(this.expandCollapseNode,"esriCTCollapsedParceLayer")||this._onExpandCollapseClicked(),b.focus());return y},validateParcelDetails:function(y){var b={};if(this._attributeInspector){var g=this._validateAttributes();if(g&&0<g.length)return b.status=!1,b.message="",b}if(this.config.polygonLayer.statedArea&&
this.config.polygonLayer.statedArea.hasOwnProperty("name")&&(!this.config.polygonLayer.statedArea.nullable&&(null===y||""===y)||null!==y&&""!==y&&-1<this.numberFieldTypes.indexOf(this.config.polygonLayer.statedArea.type)&&!this.validateNumericField(y,this.config.polygonLayer.statedArea.type)))return b.status=!1,b.message=this.nls.planInfo.enterValidStatedAreaNameMessage,b;b.status=!0;return b},deleteParcel:function(){this.loading.show();this._rollbackSavedPolygon().then(n.hitch(this,function(){this._rollbackSavedPolyLines(this._savedPolyLines).then(n.hitch(this,
function(){this.loading.hide();this._showParcelSavedAndDeleteMsg(this.nls.planInfo.parcelDeletedSuccessMessage);this._savedPolygonObjectId=null;this.emit("displayMainPageAfterSave",!1)}),n.hitch(this,function(){this.loading.hide();this._savedPolygonObjectId=null;this._showParcelSavedAndDeleteMsg(this.nls.planInfo.parcelDeleteErrorMessage);this.emit("displayMainPageAfterSave",!1)}))}),n.hitch(this,function(){this.loading.hide();this._savedPolygonObjectId=null;this._showParcelSavedAndDeleteMsg(this.nls.planInfo.parcelDeleteErrorMessage);
this.emit("displayMainPageAfterSave",!1)}))},setPlanInfoCancelBtnAsLastNode:function(){Q.initLastFocusNode(this.widgetDomNode,this.planInfoCancelButton)},_showParcelSavedAndDeleteMsg:function(y){this.emit("showParcelSavedAndDeleteMsg",y)},mergeFirstToLast:function(){for(var y={},b=arguments.length-1,g;0<=b;b--)for(g in arguments[b])arguments[b].hasOwnProperty(g)&&(y[g]=arguments[b][g]);return y},_getFieldInfosFromLayer:function(y){var b=[];y&&y.layerObject&&f.forEach(y.layerObject.fields,function(g){var x=
Q.getDefaultPortalFieldInfo(g);x=this.mergeFirstToLast(x,g);x.format&&x.format.dateFormat&&x.format.dateFormat.toLowerCase()&&0<=x.format.dateFormat.toLowerCase().indexOf("time")&&(x.format.time=!0);x.visible=!0;b.push(x)},this);return b},_createFieldsDetailsObject:function(y){var b={};f.forEach(y,n.hitch(this,function(g){b[g.name]=g.type}));return b},getFieldInfoByFieldName:function(y,b){var g={};f.some(y,function(x){if(x.name===b)return n.mixin(g,x),!0});return g},_getFieldInfosForPolygonLayer:function(){if(this.fieldInfosForPolygonLayer)return this.fieldInfosForPolygonLayer;
var y=[],b=[this.config.polygonLayer.rotation.name,this.config.polygonLayer.scale.name,this.config.polygonLayer.miscloseRatio.name,this.config.polygonLayer.miscloseDistance.name,this.config.polygonLayer.statedArea.name],g=this._layerInfosObj.getLayerInfoById(this.config.polygonLayer.id),x=this._createFieldsDetailsObject(g.layerObject.fields);var H=this._getFieldInfosFromLayer(g);if(this.config.hasOwnProperty("useFieldInfosFromWebmap")&&this.config.useFieldInfosFromWebmap&&g.controlPopupInfo&&g.controlPopupInfo.enablePopup&&
g.controlPopupInfo.infoTemplate)H=n.clone(g.controlPopupInfo.infoTemplate.info.fieldInfos);else if(this.config.polygonLayer.hasOwnProperty("additionalFieldsInfo")&&0<this.config.polygonLayer.additionalFieldsInfo.length){var a=[];f.forEach(this.config.polygonLayer.additionalFieldsInfo,function(h){var u=this.getFieldInfoByFieldName(H,h.fieldName);u=n.mixin(u,h);!u.nullable&&u.editable&&(u.visible=!0,u.isEditable=!0);a.push(u)},this);H=a}else this.config.polygonLayer.documentType.hasOwnProperty("name")&&
y.push(this.config.polygonLayer.documentType.name),this.config.polygonLayer.parcelName.hasOwnProperty("name")&&y.push(this.config.polygonLayer.parcelName.name),this.config.polygonLayer.planName.hasOwnProperty("name")&&y.push(this.config.polygonLayer.planName.name);var e=[];f.forEach(H,n.hitch(this,function(h){y&&0<y.length&&0>y.indexOf(h.fieldName)&&(h.visible=!1);-1<b.indexOf(h.fieldName)&&(h.visible=!1);h.visible&&x[h.fieldName]&&"esriFieldTypeRaster"!==x[h.fieldName]&&"esriFieldTypeBlob"!==x[h.fieldName]&&
"esriFieldTypeXML"!==x[h.fieldName]&&(h.format&&h.format.dateFormat&&h.format.dateFormat.toLowerCase()&&0<=h.format.dateFormat.toLowerCase().indexOf("time")&&(h.format.time=!0),e.push(h))}));return this.fieldInfosForPolygonLayer=e},_clearAttributeInspectorData:function(){this._attributeInspector&&(this._attributeInspector.layerInfos&&f.forEach(this._attributeInspector.layerInfos,function(y){y=y.featureLayer;y.clearSelection();y.refresh()}),this._attributeInspector.destroy())},_add508SupportToATI:function(){var y;
this._attributeInspector&&this._attributeInspector.domNode&&(y=l("td.atiLabel",this._attributeInspector.domNode))&&f.forEach(y,n.hitch(this,function(b){var g=this._getAttrInspectorRowInfo(b);g&&(g[0].set("aria-label",g[1]),1<b.parentNode.childNodes[1].childNodes.length&&(b=b.parentNode.childNodes[1].childNodes[1],b=q.getEnclosingWidget(b),b.set("aria-label",g[1])))}))},_getAttrInspectorRowInfo:function(y){try{if(y&&y.parentNode){var b=y.parentNode.childNodes[1].childNodes[0];return[q.getEnclosingWidget(b),
y.childNodes[0].data,b]}return null}catch(g){return console.log(g),null}},_getCurrentFieldDijit:function(y){var b;f.some(this._attributeInspector._currentLInfo.fieldInfos,n.hitch(this,function(g){if(g.name===y||g.field&&g.field.name===y||g.fieldName===y)return b=g.dijit,!0}));return b},_addGraphicToLocalLayer:function(y){var b,g,x,H;if((H=this._getFieldInfosForPolygonLayer())&&0!=H.length){this._clearAttributeInspectorData();this._removeClonedProjectPolygonLayer();var a=this.map.getLayer(this.config.polygonLayer.id);
this._clonedProjectPolygonLayerObject=this._cloneProjectPolygonLayer(a,H);var e=this.own(t(this._clonedProjectPolygonLayerObject,"load",n.hitch(this,function(){e&&e[0]&&e[0].remove();b=this._layerInfosObj.getLayerInfoById(this._clonedProjectPolygonLayerObject.originalLayerId);b.featureLayer=this._clonedProjectPolygonLayerObject;this._createAttributeInspector(H);g=new M(null,null,y?y:{},null);g.preEditAttrs=JSON.parse(JSON.stringify(g.attributes));this._clonedProjectPolygonLayerObject.applyEdits([g],
null,null,n.hitch(this,function(h){x=new I;x.objectIds=[h[0].objectId];this._clonedProjectPolygonLayerObject.selectFeatures(x,P.SELECTION_NEW,n.hitch(this,function(){var u=this._attributeInspector.attributeTable.childNodes[0];d.set(u,"cellspacing","5");d.set(u,"cellpadding","5");this._currentFeatureDetails=g;this._add508SupportToATI();this._attributeInspector.attachmentEditor&&w.set(this._attributeInspector.attachmentEditor,"display","none");this._attributeInspector.editorTrackingInfoDiv&&w.set(this._attributeInspector.editorTrackingInfoDiv,
"display","none");if(u=this._clonedProjectPolygonLayerObject.objectIdField){var z=this._getCurrentFieldDijit(u);z&&g.preEditAttrs[u]&&z.set("value",g.preEditAttrs[u])}}),n.hitch(this,function(){}))}),n.hitch(this,function(){}))}),n.hitch(this,function(){})))}},_removeClonedProjectPolygonLayer:function(){this._clonedProjectPolygonLayerObject&&null!==this._clonedProjectPolygonLayerObject&&(this._clonedProjectPolygonLayerObject.clearSelection(),this._clonedProjectPolygonLayerObject.clear(),this.map.removeLayer(this._clonedProjectPolygonLayerObject),
this._clonedProjectPolygonLayerObject=null)},_filterFields:function(y,b){var g=[];f.forEach(b,n.hitch(this,function(x){x.visible&&f.forEach(y.fields,n.hitch(this,function(H){H.hasOwnProperty("name")&&x.hasOwnProperty("fieldName")&&H.name===x.fieldName&&g.push(H)}))}));y.fields=g},_cloneProjectPolygonLayer:function(y,b){var g=Q.getFeatureLayerDefinition(y);this._filterFields(g,b);g.id="clonedPolygonLayer"+this.id;g.name=y.name+this.id;b={layerDefinition:g};g=y.fields.map(function(x){return x.name});
b=new P(b,{outFields:g});b.visible=!0;b.renderer=y.renderer;b.originalLayerId=y.id;b._wabProperties={isTemporaryLayer:!0};this.map.addLayer(b);return b},_processLayerFields:function(y){f.forEach(y,function(b){void 0!==b.domain&&null!==b.domain&&void 0!==b.domain.type&&null!==b.domain.type&&"range"===b.domain.type&&!1===b.domain.hasOwnProperty("range")&&(b.domain.range=[b.domain.minValue,b.domain.maxValue])});return y},_createAttributeInspector:function(y){v.empty(this.attributeInspectorContainer);
this._attributeInspector=new (F([R],{constructor:function(){this._aiConnects=[];this._selection=[];this._toolTips=[]}}))({layerInfos:[{featureLayer:this._clonedProjectPolygonLayerObject,fieldInfos:y}]},v.create("div",{"class":"esriCTAttributeInspectorWidgetContainer"}));this.own(t(this._attributeInspector,"attribute-change",n.hitch(this,function(b){this._currentFeatureDetails&&(this._currentFeatureDetails.attributes[b.fieldName]=b.fieldValue)})));this._attributeInspector.startup();this.attributeInspectorContainer.appendChild(this._attributeInspector.domNode)}})})},
"esri/dijit/AttributeInspector":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/sniff dojo/_base/kernel dojo/has dojo/dom-style dojo/dom-construct ../kernel ../lang ../domUtils ../layers/InheritedDomain ../layers/FeatureLayer dojo/i18n!../nls/jsapi dojo/fx dojox/gfx dijit/_Widget dijit/_Templated dijit/Editor dijit/_editor/plugins/LinkDialog dijit/_editor/plugins/TextColor ./_EventedWidget ./editing/AttachmentEditor ./editing/Util ../tasks/query dijit/form/DateTextBox dijit/form/TextBox dijit/form/NumberTextBox dijit/form/FilteringSelect dijit/form/NumberSpinner dijit/form/Button dijit/form/SimpleTextarea dijit/form/ValidationTextBox dijit/form/TimeTextBox dijit/Tooltip dojo/data/ItemFileReadStore dojox/date/islamic dojox/date/islamic/Date dojox/date/islamic/locale dojo/text!./templates/AttributeInspector.html".split(" "),
function(F,c,k,m,n,f,p,d,v,C,w,l,q,K,A,r,t,B,M,I,O,R,P,G,U,Q,W,J,V,y,b,g,x,H,a,e,h,u,z,N,T){var aa=F([P,B,M],{declaredClass:"esri.dijit.AttributeInspector",widgetsInTemplate:!0,templateString:T,onUpdate:function(){},onDelete:function(){},onAttributeChange:function(){},onNext:function(){},onReset:function(){},onCancel:function(){},_navMessage:"( ${idx} ${of} ${numFeatures} )",_currentAttributeFieldName:null,_aiConnects:[],_selection:[],_toolTips:[],_numFeatures:0,_featureIdx:0,_currentLInfo:null,_currentFeature:null,
_rollbackInfo:null,_eventMap:{update:!0,"delete":["feature"],"attribute-change":["feature","fieldName","fieldValue"],next:["feature"],reset:!0,cancel:!0},_defaultRichTextPlugins:"bold italic underline foreColor hiliteColor | justifyLeft justifyCenter justifyRight justifyFull | insertOrderedList insertUnorderedList indent outdent | createLink".split(" "),css:{label:"atiLabel",field:"atiField",textArea:"atiTextAreaField",richText:"atiRichTextField",attachmentEditor:"atiAttachmentEditor",red:"atiRequiredField"},
constructor:function(D,E){c.mixin(this,A.widgets.attributeInspector);D=D||{};D.featureLayer||D.layerInfos||console.error("esri.AttributeInspector: please provide correct parameter in the constructor");this._datePackage=this._getDatePackage(D);this._layerInfos=D.layerInfos||[{featureLayer:D.featureLayer,options:D.options||[]}];this._layerInfos=k.filter(this._layerInfos,function(L){return!L.disableAttributeUpdate});this._hideNavButtons=D.hideNavButtons||!1},postCreate:function(){if(k.every(this._layerInfos,
function(E){return E.featureLayer.loaded}))this._initLayerInfos(),this._createAttachmentEditor(),this.onFirstFeature();else{var D=this._layerInfos.length;k.forEach(this._layerInfos,function(E){E=E.featureLayer;if(E.loaded)D--;else var L=m.connect(E,"onLoad",this,function(S){m.disconnect(L);L=null;D--;D||(this._initLayerInfos(),this._createAttachmentEditor(),this.onFirstFeature())})},this)}},destroy:function(){this._destroyAttributeTable();k.forEach(this._aiConnects,m.disconnect);delete this._aiConnects;
this._attachmentEditor&&(this._attachmentEditor.destroy(),delete this._attachmentEditor);delete this._layerInfos;this._selection=this._currentFeature=this._currentLInfo=this._attributes=this._layerInfos=null;this.inherited(arguments)},refresh:function(){this._updateSelection()},first:function(){this.onFirstFeature()},last:function(){this.onLastFeature()},next:function(){this.onNextFeature()},previous:function(){this.onPreviousFeature()},showFeature:function(D,E){E&&(this._createOnlyFirstTime=!0);
this._updateSelection([D],E);this._updateUI()},onLayerSelectionChange:function(D,E,L){this._createOnlyFirstTime=!1;this._featureIdx=L===K.SELECTION_NEW?0:this._featureIdx;this._updateSelection();this._updateUI()},onLayerSelectionClear:function(){!this._selection||0>=this._selection.length||(this._featureIdx=this._numFeatures=0,this._selection=[],this._currentLInfo=this._currentFeature=null,this._updateUI())},onLayerUpdateEnd:function(D,E,L,S){},onLayerError:function(D,E,L,S){},onLayerEditsError:function(D,
E,L,S){},onLayerEditsComplete:function(D,E,L,S){S=S||[];if(S.length){var X=this._selection,ba=D.featureLayer.objectIdField;k.forEach(S,c.hitch(this,function(ca){k.some(X,c.hitch(this,function(Z,da){if(Z.attributes[ba]!==ca.objectId)return!1;this._selection.splice(da,1);return!0}))}))}E=E||[];E.length&&(this._selection=U.findFeatures(E,D.featureLayer),this._featureIdx=0);S=this._numFeatures=(this._selection=U.sortFeaturesById(this._layerInfos,this._selection))?this._selection.length:0;if(E.length){if(E=
S?this._selection[this._featureIdx]:null)S=E.getLayer().getEditCapabilities(),S.canCreate&&!S.canUpdate||this._showFeature(E);this._updateUI()}L=L||[];if(L.length){var Y=this._rollbackInfo;k.forEach(L,function(ca){var Z=U.findFeatures(L,D.featureLayer)[0];if(!ca.success&&Z.attributes[D.featureLayer.objectIdField]===ca.objectId&&Y){var da=Y.field;ca=Y.graphic.attributes[da.name];var ea=k.filter(this._currentLInfo.fieldInfos,function(fa){return fa.fieldName===da.name},this)[0].dijit;Z.attributes[da.name]=
ca;"esriFieldTypeDate"===da.type&&(ca=new Date(ca));this._setValue(ea,ca)}},this)}this._rollbackInfo=null},onFieldValueChange:function(D,E){var L=D.field,S=D.dijit,X=this._currentFeature,ba=this._currentLInfo,Y=L.name;D=this._isFieldRequired(L,D);if(""===S.displayedValue||"dijit.form.ValidationTextBox"!==S.declaredClass||S.isValid())if(""!==S.displayedValue&&S.displayedValue!==E&&S.isValid&&!S.isValid())this._setValue(S,X.attributes[L.name]);else{var ca=!("esriFieldTypeInteger"!==L.type&&"esriFieldTypeSmallInteger"!==
L.type&&"esriFieldTypeSingle"!==L.type&&"esriFieldTypeDouble"!==L.type);if(D&&(null===E||""===E||"undefined"===typeof E||ca&&isNaN(E))){Y=X.attributes[L.name];if("esriFieldTypeDate"===L.type&&(Y=new Date(Y),S instanceof Array)){this._setValue(S[0],Y);this._setValue(S[1],Y);return}this._setValue(S,Y)}else{if(ca){if(isNaN(E)||""===E)E=null;ca&&null!==E&&(E=Number(E))}"esriFieldTypeDate"===L.type&&(S instanceof Array?(E=S[0].getValue(),S=S[1].getValue(),E=E&&S?new Date(E.getFullYear(),E.getMonth(),E.getDate(),
S.getHours(),S.getMinutes(),S.getSeconds(),S.getMilliseconds()):E||S||null):(E=S.getValue(),L.domain&&(E=Number(E))),E=E&&E.getTime?E.getTime():E&&E.toGregorian?E.toGregorian().getTime():E);if(this._currentFeature.attributes[L.name]!==E){if(Y===ba.typeIdField){var Z=this._findFirst(ba.types,"id",E);k.forEach(ba.fieldInfos,function(da){(L=da.field)&&L.name!==ba.typeIdField&&(da=da.dijit,this._setFieldDomain(da,Z,L)&&da&&(this._setValue(da,X.attributes[L.name]+""),!1===da.isValid()&&this._setValue(da,
null)))},this)}this.onAttributeChange(X,Y,E)}}}else this._setValue(S,X.attributes[L.name])},onDeleteBtn:function(D){this._deleteFeature()},onNextFeature:function(D){this._onNextFeature(1)},onPreviousFeature:function(D){this._onNextFeature(-1)},onFirstFeature:function(D){this._onNextFeature(-1*this._featureIdx)},onLastFeature:function(D){this._onNextFeature(this._numFeatures-1-this._featureIdx)},_initLayerInfos:function(){var D=this._layerInfos;this._editorTrackingInfos={};k.forEach(D,this._initLayerInfo,
this)},_initLayerInfo:function(D){var E=D.featureLayer,L;this._userIds={};var S=E.id;E.credential&&(this._userIds[S]=E.credential.userId);D.userId&&(this._userIds[S]=D.userId);this._connect(E,"onSelectionComplete",c.hitch(this,"onLayerSelectionChange",D));this._connect(E,"onSelectionClear",c.hitch(this,"onLayerSelectionClear",D));this._connect(E,"onEditsComplete",c.hitch(this,"onLayerEditsComplete",D));this._connect(E,"error",c.hitch(this,"onLayerError",D));this._connect(E,"onUpdateEnd",c.hitch(this,
"onLayerUpdateEnd",D));D.showAttachments=E.hasAttachments?w.isDefined(D.showAttachments)?D.showAttachments:!0:!1;D.hideFields=D.hideFields||[];D.htmlFields=D.htmlFields||[];D.isEditable=E.isEditable()?w.isDefined(D.isEditable)?D.isEditable:!0:!1;D.typeIdField=E.typeIdField;D.layerId=E.id;D.types=E.types;E.globalIdField&&((L=this._findFirst(D.fieldInfos,"fieldName",E.globalIdField))||D.showGlobalID||D.hideFields.push(E.globalIdField));(S=this._findFirst(D.fieldInfos,"fieldName",E.objectIdField))||
D.showObjectID||D.hideFields.push(E.objectIdField);var X=this._getFields(D.featureLayer);if(X){var ba=D.fieldInfos||[];ba=k.map(ba,function(Y){return c.mixin({},Y)});ba.length?D.fieldInfos=k.filter(k.map(ba,c.hitch(this,function(Y){var ca=Y.stringFieldOption||(this._isInFields(Y.fieldName,D.htmlFields)?aa.STRING_FIELD_OPTION_RICHTEXT:aa.STRING_FIELD_OPTION_TEXTBOX);return c.mixin(Y,{field:this._findFirst(X,"name",Y.fieldName),stringFieldOption:ca})})),"return item.field;"):(X=k.filter(X,c.hitch(this,
function(Y){return!this._isInFields(Y.name,D.hideFields)})),D.fieldInfos=k.map(X,c.hitch(this,function(Y){var ca=this._isInFields(Y.name,D.htmlFields)?aa.STRING_FIELD_OPTION_RICHTEXT:aa.STRING_FIELD_OPTION_TEXTBOX;return{fieldName:Y.name,field:Y,stringFieldOption:ca}})));D.showGlobalID&&!L&&ba.push(this._findFirst(X,"name",E.globalIdField));D.showObjectID&&!S&&ba.push(this._findFirst(X,"name",E.objectIdField));L=[];E.editFieldsInfo&&(E.editFieldsInfo.creatorField&&L.push(E.editFieldsInfo.creatorField),
E.editFieldsInfo.creationDateField&&L.push(E.editFieldsInfo.creationDateField),E.editFieldsInfo.editorField&&L.push(E.editFieldsInfo.editorField),E.editFieldsInfo.editDateField&&L.push(E.editFieldsInfo.editDateField));this._editorTrackingInfos[E.id]=L}},_createAttachmentEditor:function(){this._attachmentEditor=null;var D=k.filter(this._layerInfos,function(E){return E.showAttachments});D&&D.length&&(this._attachmentEditor=new G({"class":this.css.attachmentEditor},this.attachmentEditor),this._attachmentEditor.startup())},
_setCurrentLInfo:function(D){var E=this._currentLInfo?this._currentLInfo.featureLayer:null,L=D.featureLayer;if(E&&E.id===L.id&&!E.ownershipBasedAccessControlForFeatures&&(E=L.getEditCapabilities(),!E.canCreate||E.canUpdate))return;this._currentLInfo=D;this._createTable()},_updateSelection:function(D,E){this._selection=D||[];k.forEach(this._layerInfos,this._getSelection,this);this._selection=U.sortFeaturesById(this._layerInfos,this._selection);this._numFeatures=this._selection.length;this._showFeature(this._numFeatures?
this._selection[this._featureIdx]:null,E)},_getSelection:function(D){D=D.featureLayer.getSelectedFeatures();this._selection=this._selection.concat(D)},_updateUI:function(){var D=this._numFeatures,E=this._currentLInfo;this.layerName.innerHTML=E&&0!==D?E.featureLayer?E.featureLayer.name:"":this.NLS_noFeaturesSelected;d.set(this.attributeTable,"display",D?"":"none");d.set(this.editButtons,"display",D?"":"none");d.set(this.navButtons,"display",!this._hideNavButtons&&1<D?"":"none");this.navMessage.innerHTML=
w.substitute({idx:this._featureIdx+1,of:this.NLS_of,numFeatures:this._numFeatures},this._navMessage);this._attachmentEditor&&d.set(this._attachmentEditor.domNode,"display",E&&E.showAttachments&&D?"":"none");d.set(this.deleteBtn.domNode,"display",E&&!1===E.showDeleteButton||!this._canDelete?"none":"");this.domNode.parentNode&&0<this.domNode.parentNode.scrollTop&&(this.domNode.parentNode.scrollTop=0)},_onNextFeature:function(D){this._featureIdx+=D;0>this._featureIdx?this._featureIdx=this._numFeatures-
1:this._featureIdx>=this._numFeatures&&(this._featureIdx=0);D=this._selection.length?this._selection[this._featureIdx]:null;this._showFeature(D);this._updateUI();this.onNext(D)},_deleteFeature:function(){this.onDelete(this._currentFeature)},_showFeature:function(D,E){if(D){this._currentFeature=D;E=E?E:D.getLayer();var L=E.getEditCapabilities({feature:D,userId:this._userIds[E.id]});this._canUpdate=L.canUpdate;this._canDelete=L.canDelete;if(L=this._getLInfoFromFeatureLayer(E)){this._setCurrentLInfo(L);
var S=D.attributes,X=this._findFirst(L.types,"id",S[L.typeIdField]),ba=null;k.forEach(L.fieldInfos,function(Y){ba=Y.field;var ca=[];Y.dijit&&1<Y.dijit.length?k.forEach(Y.dijit,function(Z){ca.push(Z)}):ca.push(Y.dijit);k.forEach(ca,c.hitch(this,function(Z){if(Z){var da=this._setFieldDomain(Z,X,ba),ea=S[ba.name];ea=ea&&da&&da.codedValues&&da.codedValues.length?da.codedValues[ea]?da.codedValues[ea].name:ea:ea;w.isDefined(ea)||(ea="");"dijit.form.DateTextBox"===Z.declaredClass||"dijit.form.TimeTextBox"===
Z.declaredClass?ea=""===ea?null:new Date(ea):"dijit.form.FilteringSelect"===Z.declaredClass&&(Z._lastValueReported=null,ea=S[ba.name]+"");try{this._setValue(Z,ea),"dijit.form.FilteringSelect"===Z.declaredClass&&!1===Z.isValid()&&this._setValue(Z,null)}catch(fa){Z.set("displayedValue",this.NLS_errorInvalid,!1)}}}))},this);this._attachmentEditor&&L.showAttachments&&this._attachmentEditor.showAttachments(this._currentFeature,E);(D=E.getEditSummary(D))?(this.editorTrackingInfoDiv.innerHTML=D,l.show(this.editorTrackingInfoDiv)):
l.hide(this.editorTrackingInfoDiv)}}},_setFieldDomain:function(D,E,L){if(!D)return null;var S=L.domain;E&&E.domains&&E.domains[L.name]&&!1===E.domains[L.name]instanceof q&&(S=E.domains[L.name]);if(!S)return null;S.codedValues&&0<S.codedValues.length?(D.set("store",this._toStore(k.map(S.codedValues,function(X){return{id:X.code+"",name:X.name}}))),this._setValue(D,S.codedValues[0].code+"")):(D.constraints={min:w.isDefined(S.minValue)?S.minValue:Number.MIN_VALUE,max:w.isDefined(S.maxValue)?S.maxValue:
Number.MAX_VALUE},this._setValue(D,D.constraints.min));return S},_setValue:function(D,E){D.set&&(D._onChangeActive=!1,D.set("value",E,!0),D._onChangeActive=!0)},_getFields:function(D){var E=D._getOutFields();if(!E)return null;D=D.fields;return"*"==E?D:k.filter(k.map(E,c.hitch(this,"_findFirst",D,"name")),w.isDefined)},_isInFields:function(D,E){return D&&(E||E.length)?k.some(E,function(L){return L.toLowerCase()===D.toLowerCase()}):!1},_isFieldNullable:function(D,E){return!(!1===D.nullable||E.field&&
!1===E.field.nullable)},_isFieldRequired:function(D,E){return!1!==D.editable&&!1!==E.isEditable&&!this._isFieldNullable(D,E)},_findFirst:function(D,E,L){return(D=k.filter(D,function(S){return S.hasOwnProperty(E)&&S[E]===L}))&&D.length?D[0]:null},_getLInfoFromFeatureLayer:function(D){return this._findFirst(this._layerInfos,"layerId",D?D.id:null)},_createTable:function(){this._destroyAttributeTable();this.attributeTable.innerHTML="";this._attributes=v.create("table",{cellspacing:"0",cellpadding:"0"},
this.attributeTable);var D=v.create("tbody",null,this._attributes),E=this._currentLInfo,L=this._findFirst(E.types,"id",this._currentFeature.attributes[E.typeIdField]);k.forEach(E.fieldInfos,c.hitch(this,"_createField",L,D),this);this._createOnlyFirstTime=!1},_createField:function(D,E,L){var S=this._currentLInfo,X=L.field;if(!this._isInFields(X.name,S.hideFields)&&!this._isInFields(X.name,this._editorTrackingInfos[S.featureLayer.id])){var ba=!1,Y;E=v.create("tr",null,E);var ca=v.create("td",{innerHTML:L.label||
X.alias||X.name,"class":this.css.label,"data-fieldname":X.name},E);this._isFieldRequired(X,L)&&v.create("span",{"class":this.css.red,innerHTML:" *"},ca);E=v.create("td",null,E);if(L.customField){v.place(L.customField.domNode||L.customField,v.create("div",null,E),"first");var Z=L.customField}else if(!1===S.isEditable||!1===X.editable||!1===L.isEditable||"esriFieldTypeOID"===X.type||"esriFieldTypeGlobalID"===X.type||!this._canUpdate&&!this._createOnlyFirstTime)ba=!0;S=S.typeIdField&&X.name.toLowerCase()==
S.typeIdField.toLowerCase();ca=!!this._getDomainForField(X,D);!Z&&S?Z=this._createTypeField(X,L,E):!Z&&ca&&(Z=this._createDomainField(X,L,D,E));if(!Z)switch(X.type){case "esriFieldTypeString":Z=this._createStringField(X,L,E);break;case "esriFieldTypeDate":Z=this._createDateField(X,L,E);L.format&&L.format.time&&(Y=this._createTimeField(X,L,E));break;case "esriFieldTypeInteger":case "esriFieldTypeSmallInteger":Z=this._createIntField(X,L,E);break;case "esriFieldTypeSingle":case "esriFieldTypeDouble":Z=
this._createFltField(X,L,E);break;default:Z=this._createStringField(X,L,E)}L.tooltip&&L.tooltip.length&&this._toolTips.push(new e({connectId:[Z.id],label:L.tooltip}));Z.onChange=c.hitch(this,"onFieldValueChange",L);Z.set("disabled",ba);Y?(L.dijit=[Z,Y],Y.onChange=c.hitch(this,"onFieldValueChange",L),Y.set("disabled",ba)):L.dijit=Z}},_createTypeField:function(D,E,L){L=v.create("div",null,L);var S=D.domain;return S&&"range"===S.type&&S.minValue===S.maxValue?new H({"class":this.css.field,trim:!0,maxLength:D.length,
name:D.alias||D.name,required:this._isFieldRequired(D,E)},L):new y({"class":this.css.field,name:D.alias||D.name,required:this._isFieldRequired(D,E),store:this._toStore(k.map(this._currentLInfo.types,function(X){return{id:X.id,name:X.name}})),searchAttr:"name"},L)},_getDomainForField:function(D,E){var L=D.domain;(D=D.name)&&E&&E.domains&&E.domains[D]&&!1===E.domains[D]instanceof q&&(L=E.domains[D]);return L||null},_createDomainField:function(D,E,L,S){L=this._getDomainForField(D,L);S=v.create("div",
null,S);return L.codedValues?new y({"class":this.css.field,name:D.alias||D.name,searchAttr:"name",required:this._isFieldRequired(D,E)},S):new b({"class":this.css.field},S)},_createStringField:function(D,E,L){L=v.create("div",null,L);var S={trim:!0,maxLength:D.length,required:this._isFieldRequired(D,E)};if(E.stringFieldOption===aa.STRING_FIELD_OPTION_TEXTAREA)return S["class"]=this.css.field+" "+this.css.textArea,new x(S,L);if(E.stringFieldOption===aa.STRING_FIELD_OPTION_RICHTEXT)return S["class"]=
this.css.field+" "+this.css.richText,S.height="100%",S.width="100%",S.plugins=E.richTextPlugins||this._defaultRichTextPlugins,L=new I(S,L),L.startup(),L;var X=this;S.validator=function(ba,Y){this._maskValidSubsetError=!1;this._hasBeenBlurred=!0;return X._isFieldNullable(D,E)||!(""===ba||null===ba)};return new H(S,L)},_createTimeField:function(D,E,L){L=v.create("div",null,L);D={"class":this.css.field,trim:!0,required:this._isFieldRequired(D,E),constraints:{formatLength:"medium"}};this._datePackage&&
(D.datePackage=this._datePackage);return new a(D,L)},_createDateField:function(D,E,L){L=v.create("div",null,L);D={"class":this.css.field,trim:!0,required:this._isFieldRequired(D,E)};this._datePackage&&(D.datePackage=this._datePackage);return new W(D,L)},_createIntField:function(D,E,L){L=v.create("div",null,L);return new V({"class":this.css.field,constraints:"esriFieldTypeSmallInteger"===D.type?{min:-32768,max:32767,places:0}:{places:0},trim:!0,invalidMessage:this.NLS_validationInt,required:this._isFieldRequired(D,
E)},L)},_createFltField:function(D,E,L){L=v.create("div",null,L);return new V({"class":this.css.field,constraints:{max:Infinity,min:-Infinity,places:"0,20"},trim:!0,invalidMessage:this.NLS_validationFlt,required:this._isFieldRequired(D,E)},L)},_toStore:function(D){return new h({data:{identifier:"id",label:"name",items:D}})},_connect:function(D,E,L){this._aiConnects.push(m.connect(D,E,L))},_getDatePackage:function(D){return null===D.datePackage?null:D.datePackage?D.datePackage:"ar"===f.locale?"dojox.date.islamic":
null},_destroyAttributeTable:function(){k.forEach(this._layerInfos,function(D){k.forEach(D.fieldInfos,function(E){var L=E.dijit;if(L){L._onChangeHandle=null;if(E.customField)return;L instanceof Array?k.forEach(L,c.hitch(this,function(S){S.destroyRecursive?S.destroyRecursive():S.destroy&&S.destroy();S._onChangeHandle=null})):L.destroyRecursive?L.destroyRecursive():L.destroy&&L.destroy()}E.dijit=null},this)},this);k.forEach(this._toolTips,function(D){D.destroy()});this._toolTips=[];this._attributes&&
v.destroy(this._attributes)}});c.mixin(aa,{STRING_FIELD_OPTION_RICHTEXT:"richtext",STRING_FIELD_OPTION_TEXTAREA:"textarea",STRING_FIELD_OPTION_TEXTBOX:"textbox"});p("extend-esri")&&c.setObject("dijit.AttributeInspector",aa,C);return aa})},"dijit/Editor":function(){define("require dojo/_base/array dojo/_base/declare dojo/Deferred dojo/i18n dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/sniff dojo/string dojo/topic ./_Container ./Toolbar ./ToolbarSeparator ./layout/_LayoutWidget ./form/ToggleButton ./_editor/_Plugin ./_editor/plugins/EnterKeyHandling ./_editor/html ./_editor/range ./_editor/RichText ./main dojo/i18n!./_editor/nls/commands".split(" "),
function(F,c,k,m,n,f,p,d,v,C,w,l,q,K,A,r,t,B,M,I,O,R,P,G,U){function Q(J){return new I({command:J.name})}function W(J){return new I({buttonClass:M,command:J.name})}k=k("dijit.Editor",G,{plugins:null,extraPlugins:null,constructor:function(){w.isArray(this.plugins)||(this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",O]);this._plugins=
[];this._editInterval=1E3*this.editActionInterval;if(l("ie")||l("trident")||l("edge"))this.events.push("onBeforeDeactivate"),this.events.push("onBeforeActivate")},postMixInProperties:function(){this.setValueDeferred=new m;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);w.isArray(this.extraPlugins)&&(this.plugins=this.plugins.concat(this.extraPlugins));this.commands=n.getLocalization("dijit._editor",
"commands",this.lang);l("webkit")&&v.set(this.domNode,"KhtmlUserSelect","none")},startup:function(){this.inherited(arguments);this.toolbar||(this.toolbar=new r({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,"aria-label":this.id}),this.header.appendChild(this.toolbar.domNode));c.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.resolve(!0);p.add(this.iframe.parentNode,"dijitEditorIFrameContainer");p.add(this.iframe,"dijitEditorIFrame");f.set(this.iframe,"allowTransparency",
!0);this.toolbar.startup();this.onNormalizedDisplayChanged()},destroy:function(){c.forEach(this._plugins,function(J){J&&J.destroy&&J.destroy()});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments)},addPlugin:function(J,V){var y=w.isString(J)?{name:J}:w.isFunction(J)?{ctor:J}:J;if(!y.setEditor){var b={args:y,plugin:null,editor:this};y.name&&(I.registry[y.name]?b.plugin=I.registry[y.name](y):K.publish(U._scopeName+".Editor.getPlugin",b));if(!b.plugin)try{var g=
y.ctor||w.getObject(y.name)||F(y.name);g&&(b.plugin=new g(y))}catch(x){throw Error(this.id+": cannot find plugin ["+y.name+"]");}if(!b.plugin)throw Error(this.id+": cannot find plugin ["+y.name+"]");J=b.plugin}1<arguments.length?this._plugins[V]=J:this._plugins.push(J);J.setEditor(this);w.isFunction(J.setToolbar)&&J.setToolbar(this.toolbar)},resize:function(J){J&&B.prototype.resize.apply(this,arguments)},layout:function(){var J=this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+d.getPadBorderExtents(this.iframe.parentNode).h+
d.getMarginExtents(this.iframe.parentNode).h);this.editingArea.style.height=J+"px";this.iframe&&(this.iframe.style.height="100%");this._layoutMode=!0},_onIEMouseDown:function(J){var V,y=this.document.body,b=y.clientWidth,g=y.clientHeight,x=y.clientLeft,H=y.offsetWidth,a=y.offsetHeight,e=y.offsetLeft;/^rtl$/i.test(y.dir||"")?b<H&&J.x>b&&J.x<H&&(V=!0):J.x<x&&J.x>e&&(V=!0);V||g<a&&J.y>g&&J.y<a&&(V=!0);V||(delete this._cursorToStart,delete this._savedSelection,"BODY"==J.target.tagName&&this.defer("placeCursorAtEnd"),
this.inherited(arguments))},onBeforeActivate:function(){this._restoreSelection()},onBeforeDeactivate:function(J){this.customUndo&&this.endEditing(!0);"BODY"!=J.target.tagName&&this._saveSelection()},customUndo:!0,editActionInterval:3,beginEditing:function(J){this._inEditing||(this._inEditing=!0,this._beginEditing(J));0<this.editActionInterval&&(this._editTimer&&this._editTimer.remove(),this._editTimer=this.defer("endEditing",this._editInterval))},_steps:[],_undoedSteps:[],execCommand:function(J){if(!this.customUndo||
"undo"!=J&&"redo"!=J){this.customUndo&&(this.endEditing(),this._beginEditing());var V=this.inherited(arguments);this.customUndo&&this._endEditing();return V}return this[J]()},_pasteImpl:function(){return this._clipboardCommand("paste")},_cutImpl:function(){return this._clipboardCommand("cut")},_copyImpl:function(){return this._clipboardCommand("copy")},_clipboardCommand:function(J){try{var V=this.document.execCommand(J,!1,null);if(l("webkit")&&!V)throw{};}catch(y){V=q.substitute,alert(V(this.commands.systemShortcut,
[this.commands[J],V(this.commands[l("mac")?"appleKey":"ctrlKey"],[{cut:"X",copy:"C",paste:"V"}[J]])])),V=!1}return V},queryCommandEnabled:function(J){return!this.customUndo||"undo"!=J&&"redo"!=J?this.inherited(arguments):"undo"==J?1<this._steps.length:0<this._undoedSteps.length},_moveToBookmark:function(J){var V=J.mark,y=J.mark;J=J.isCollapsed;var b;if(y)if(9>l("ie")||9===l("ie")&&l("quirks"))if(w.isArray(y))V=[],c.forEach(y,function(H){V.push(P.getNode(H,this.editNode))},this),this.selection.moveToBookmark({mark:V,
isCollapsed:J});else{if(y.startContainer&&y.endContainer&&(b=P.getSelection(this.window))&&b.removeAllRanges){b.removeAllRanges();J=P.create(this.window);var g=P.getNode(y.startContainer,this.editNode);var x=P.getNode(y.endContainer,this.editNode);g&&x&&(J.setStart(g,y.startOffset),J.setEnd(x,y.endOffset),b.addRange(J))}}else(b=P.getSelection(this.window))&&b.removeAllRanges&&(b.removeAllRanges(),J=P.create(this.window),g=P.getNode(y.startContainer,this.editNode),x=P.getNode(y.endContainer,this.editNode),
g&&x&&(J.setStart(g,y.startOffset),J.setEnd(x,y.endOffset),b.addRange(J)))},_changeToStep:function(J,V){this.setValue(V.text);(J=V.bookmark)&&this._moveToBookmark(J)},undo:function(){var J=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var V=this._steps.pop();V&&0<this._steps.length&&(this.focus(),this._changeToStep(V,this._steps[this._steps.length-1]),this._undoedSteps.push(V),this.onDisplayChanged(),delete this._undoRedoActive,J=!0);delete this._undoRedoActive}return J},
redo:function(){var J=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var V=this._undoedSteps.pop();V&&0<this._steps.length&&(this.focus(),this._changeToStep(this._steps[this._steps.length-1],V),this._steps.push(V),this.onDisplayChanged(),J=!0);delete this._undoRedoActive}return J},endEditing:function(J){this._editTimer&&(this._editTimer=this._editTimer.remove());this._inEditing&&(this._endEditing(J),this._inEditing=!1)},_getBookmark:function(){var J=this.selection.getBookmark(),
V=[];if(J&&J.mark){var y=J.mark;if(9>l("ie")||9===l("ie")&&l("quirks")){var b=P.getSelection(this.window);if(w.isArray(y))c.forEach(J.mark,function(x){V.push(P.getIndex(x,this.editNode).o)},this),J.mark=V;else if(b){var g;b.rangeCount&&(g=b.getRangeAt(0));J.mark=g?g.cloneRange():this.selection.getBookmark()}}try{J.mark&&J.mark.startContainer&&(V=P.getIndex(J.mark.startContainer,this.editNode).o,J.mark={startContainer:V,startOffset:J.mark.startOffset,endContainer:J.mark.endContainer===J.mark.startContainer?
V:P.getIndex(J.mark.endContainer,this.editNode).o,endOffset:J.mark.endOffset})}catch(x){J.mark=null}}return J},_beginEditing:function(){0===this._steps.length&&this._steps.push({text:R.getChildrenHtml(this.editNode),bookmark:this._getBookmark()})},_endEditing:function(){var J=R.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:J,bookmark:this._getBookmark()})},onKeyDown:function(J){l("ie")||this.iframe||J.keyCode!=C.TAB||this.tabIndent||this._saveSelection();if(this.customUndo){var V=
J.keyCode;if(J.ctrlKey&&!J.shiftKey&&!J.altKey){if(90==V||122==V){J.stopPropagation();J.preventDefault();this.undo();return}if(89==V||121==V){J.stopPropagation();J.preventDefault();this.redo();return}}this.inherited(arguments);switch(V){case C.ENTER:case C.BACKSPACE:case C.DELETE:this.beginEditing();break;case 88:case 86:if(J.ctrlKey&&!J.altKey&&!J.metaKey){this.endEditing();88==J.keyCode?this.beginEditing("cut"):this.beginEditing("paste");this.defer("endEditing",1);break}default:if(!J.ctrlKey&&!J.altKey&&
!J.metaKey&&(J.keyCode<C.F1||J.keyCode>C.F15)){this.beginEditing();break}case C.ALT:this.endEditing();break;case C.UP_ARROW:case C.DOWN_ARROW:case C.LEFT_ARROW:case C.RIGHT_ARROW:case C.HOME:case C.END:case C.PAGE_UP:case C.PAGE_DOWN:this.endEditing(!0);case C.CTRL:case C.SHIFT:case C.TAB:}}else this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this.endEditing(!0)},_saveSelection:function(){try{this._savedSelection=this._getBookmark()}catch(J){}},_restoreSelection:function(){this._savedSelection&&
(delete this._cursorToStart,this.selection.isCollapsed()&&this._moveToBookmark(this._savedSelection),delete this._savedSelection)},onClick:function(){this.endEditing(!0);this.inherited(arguments)},replaceValue:function(J){this.customUndo?this.isClosed?this.setValue(J):(this.beginEditing(),J||(J="\x26#160;"),this.setValue(J),this.endEditing()):this.inherited(arguments)},_setDisabledAttr:function(J){this.setValueDeferred.then(w.hitch(this,function(){!this.disabled&&J||!this._buttonEnabledPlugins&&J?
c.forEach(this._plugins,function(V){V.set("disabled",!0)}):this.disabled&&!J&&c.forEach(this._plugins,function(V){V.set("disabled",!1)})}));this.inherited(arguments)},_setStateClass:function(){try{this.inherited(arguments),this.document&&this.document.body&&(v.set(this.document.body,"color",v.get(this.iframe,"color")),v.set(this.document.body,"background-color",v.get(this.iframe,"background-color")))}catch(J){}}});w.mixin(I.registry,{undo:Q,redo:Q,cut:Q,copy:Q,paste:Q,insertOrderedList:Q,insertUnorderedList:Q,
indent:Q,outdent:Q,justifyCenter:Q,justifyFull:Q,justifyLeft:Q,justifyRight:Q,"delete":Q,selectAll:Q,removeFormat:Q,unlink:Q,insertHorizontalRule:Q,bold:W,italic:W,underline:W,strikethrough:W,subscript:W,superscript:W,"|":function(){return new I({setEditor:function(J){this.editor=J;this.button=new t({ownerDocument:J.ownerDocument})}})}});return k})},"dijit/Toolbar":function(){define("require dojo/_base/declare dojo/has dojo/keys dojo/ready ./_Widget ./_KeyNavContainer ./_TemplatedMixin".split(" "),
function(F,c,k,m,n,f,p,d){k("dijit-legacy-requires")&&n(0,function(){F(["dijit/ToolbarSeparator"])});return c("dijit.Toolbar",[f,d,p],{templateString:'\x3cdiv class\x3d"dijit" role\x3d"toolbar" tabIndex\x3d"${tabIndex}" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e',baseClass:"dijitToolbar",_onLeftArrow:function(){this.focusPrev()},_onRightArrow:function(){this.focusNext()}})})},"dijit/ToolbarSeparator":function(){define(["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],
function(F,c,k,m){return F("dijit.ToolbarSeparator",[k,m],{templateString:'\x3cdiv class\x3d"dijitToolbarSeparator dijitInline" role\x3d"presentation"\x3e\x3c/div\x3e',buildRendering:function(){this.inherited(arguments);c.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"dijit/_editor/_Plugin":function(){define(["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../Destroyable","../form/Button"],function(F,c,k,m,n){c=c("dijit._editor._Plugin",m,{constructor:function(f){this.params=
f||{};k.mixin(this,this.params);this._attrPairNames={}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:!0,buttonClass:n,disabled:!1,getLabel:function(f){return this.editor.commands[f]},_initButton:function(){if(this.command.length){var f=this.getLabel(this.command),p=this.editor,d=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);this.button||(f=k.mixin({label:f,ownerDocument:p.ownerDocument,dir:p.dir,
lang:p.lang,showLabel:!1,iconClass:d,dropDown:this.dropDown,tabIndex:"-1"},this.params||{}),delete f.name,this.button=new this.buttonClass(f))}this.get("disabled")&&this.button&&this.button.set("disabled",this.get("disabled"))},destroy:function(){this.dropDown&&this.dropDown.destroyRecursive();this.inherited(arguments)},connect:function(f,p,d){this.own(F.connect(f,p,this,d))},updateState:function(){var f=this.editor,p=this.command;if(f&&f.isLoaded&&p.length){var d=this.get("disabled");if(this.button)try{var v=
f._implCommand(p);var C=!d&&(this[v]?this[v](p):f.queryCommandEnabled(p));this.enabled!==C&&(this.enabled=C,this.button.set("disabled",!C));if(C&&"boolean"==typeof this.button.checked){var w=f.queryCommandState(p);this.checked!==w&&(this.checked=w,this.button.set("checked",f.queryCommandState(p)))}}catch(l){console.log(l)}}},setEditor:function(f){this.editor=f;this._initButton();this.button&&this.useDefaultCommand&&(this.editor.queryCommandAvailable(this.command)?this.own(this.button.on("click",k.hitch(this.editor,
"execCommand",this.command,this.commandArg))):this.button.domNode.style.display="none");this.own(this.editor.on("NormalizedDisplayChanged",k.hitch(this,"updateState")))},setToolbar:function(f){this.button&&f.addChild(this.button)},set:function(f,p){if("object"===typeof f){for(var d in f)this.set(d,f[d]);return this}d=this._getAttrNames(f);if(this[d.s])var v=this[d.s].apply(this,Array.prototype.slice.call(arguments,1));else this._set(f,p);return v||this},get:function(f){var p=this._getAttrNames(f);
return this[p.g]?this[p.g]():this[f]},_setDisabledAttr:function(f){this._set("disabled",f);this.updateState()},_getAttrNames:function(f){var p=this._attrPairNames;if(p[f])return p[f];var d=f.charAt(0).toUpperCase()+f.substr(1);return p[f]={s:"_set"+d+"Attr",g:"_get"+d+"Attr"}},_set:function(f,p){this[f]=p}});c.registry={};return c})},"dijit/_editor/plugins/EnterKeyHandling":function(){define("dojo/_base/declare dojo/dom-construct dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/_base/window dojo/window ../_Plugin ../RichText ../range".split(" "),
function(F,c,k,m,n,f,p,d,v,C,w){return F("dijit._editor.plugins.EnterKeyHandling",v,{blockNodeForEnter:"BR",constructor:function(l){l&&("blockNodeForEnter"in l&&(l.blockNodeForEnter=l.blockNodeForEnter.toUpperCase()),m.mixin(this,l))},setEditor:function(l){if(this.editor!==l)if(this.editor=l,"BR"==this.blockNodeForEnter)this.editor.customUndo=!0,l.onLoadDeferred.then(m.hitch(this,function(K){this.own(n(l.document,"keydown",m.hitch(this,function(A){if(A.keyCode==k.ENTER){var r=m.mixin({},A);r.shiftKey=
!0;this.handleEnterKey(r)||(A.stopPropagation(),A.preventDefault())}})));9<=f("ie")&&10>=f("ie")&&this.own(n(l.document,"paste",m.hitch(this,function(A){setTimeout(m.hitch(this,function(){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();r.move("character",1);r.select()}),0)})));return K}));else if(this.blockNodeForEnter){var q=m.hitch(this,"handleEnterKey");l.addKeyHandler(13,0,0,q);l.addKeyHandler(13,0,1,q);this.own(this.editor.on("KeyPressed",m.hitch(this,"onKeyPressed")))}},
onKeyPressed:function(){if(this._checkListLater){if(this.editor.selection.isCollapsed()){var l=this.editor.selection.getAncestorElement("LI");if(l){f("mozilla")&&"LI"==l.parentNode.parentNode.nodeName&&(l=l.parentNode.parentNode);var q=l.firstChild;!q||1!=q.nodeType||"UL"!=q.nodeName&&"OL"!=q.nodeName||(l.insertBefore(q.ownerDocument.createTextNode("\u00a0"),q),q=w.create(this.editor.window),q.setStart(l.firstChild,0),l=w.getSelection(this.editor.window,!0),l.removeAllRanges(),l.addRange(q))}else C.prototype.execCommand.call(this.editor,
"formatblock",this.blockNodeForEnter),(l=this.editor.selection.getAncestorElement(this.blockNodeForEnter))?(l.innerHTML=this.bogusHtmlContent,9>=f("ie")&&(l=this.editor.document.selection.createRange(),l.move("character",-1),l.select())):console.error("onKeyPressed: Cannot find the new block node")}this._checkListLater=!1}this._pressedEnterInBlock&&(this._pressedEnterInBlock.previousSibling&&this.removeTrailingBr(this._pressedEnterInBlock.previousSibling),delete this._pressedEnterInBlock)},bogusHtmlContent:"\x26#160;",
blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(l){var q,K=this.editor.document,A;if(l.shiftKey){l=this.editor.selection.getParentElement();if(q=w.getAncestor(l,this.blockNodes)){if("LI"==q.tagName)return!0;l=w.getSelection(this.editor.window);var r=l.getRangeAt(0);r.collapsed||(r.deleteContents(),l=w.getSelection(this.editor.window),r=l.getRangeAt(0));if(w.atBeginningOfContainer(q,r.startContainer,r.startOffset)){var t=K.createElement("br");r=w.create(this.editor.window);q.insertBefore(t,
q.firstChild);r.setStartAfter(t);l.removeAllRanges();l.addRange(r)}else if(w.atEndOfContainer(q,r.startContainer,r.startOffset))r=w.create(this.editor.window),t=K.createElement("br"),q.appendChild(t),q.appendChild(K.createTextNode("\u00a0")),r.setStart(q.lastChild,0),l.removeAllRanges(),l.addRange(r);else{if((A=r.startContainer)&&3==A.nodeType){var B=A.nodeValue;var M=K.createTextNode(B.substring(0,r.startOffset));var I=K.createTextNode(B.substring(r.startOffset));q=K.createElement("br");""==I.nodeValue&&
f("webkit")&&(I=K.createTextNode("\u00a0"));c.place(M,A,"after");c.place(q,M,"after");c.place(I,q,"after");c.destroy(A);r=w.create(this.editor.window);r.setStart(I,0);l.removeAllRanges();l.addRange(r);return!1}return!0}}else l=w.getSelection(this.editor.window),l.rangeCount?(r=l.getRangeAt(0))&&r.startContainer&&(r.collapsed||(r.deleteContents(),l=w.getSelection(this.editor.window),r=l.getRangeAt(0)),(A=r.startContainer)&&3==A.nodeType?(q=r.startOffset,A.length<q&&(I=this._adjustNodeAndOffset(A,q),
A=I.node,q=I.offset),B=A.nodeValue,M=K.createTextNode(B.substring(0,q)),I=K.createTextNode(B.substring(q)),q=K.createElement("br"),I.length||(I=K.createTextNode("\u00a0")),M.length?c.place(M,A,"after"):M=A,c.place(q,M,"after"),c.place(I,q,"after"),c.destroy(A)):(0<=r.startOffset&&(t=A.childNodes[r.startOffset]),q=K.createElement("br"),I=K.createTextNode("\u00a0"),t?(c.place(q,t,"before"),c.place(I,q,"after")):(A.appendChild(q),A.appendChild(I))),r=w.create(this.editor.window),r.setStart(I,0),r.setEnd(I,
I.length),l.removeAllRanges(),l.addRange(r),this.editor.selection.collapse(!0)):C.prototype.execCommand.call(this.editor,"inserthtml","\x3cbr\x3e");return!1}var O=!0;l=w.getSelection(this.editor.window);r=l.getRangeAt(0);r.collapsed||(r.deleteContents(),l=w.getSelection(this.editor.window),r=l.getRangeAt(0));t=w.getBlockAncestor(r.endContainer,null,this.editor.editNode);var R=t.blockNode;if(this._checkListLater=R&&("LI"==R.nodeName||"LI"==R.parentNode.nodeName))return f("mozilla")&&(this._pressedEnterInBlock=
R),/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(R.innerHTML)&&(R.innerHTML="",f("webkit")&&(r=w.create(this.editor.window),r.setStart(R,0),l.removeAllRanges(),l.addRange(r)),this._checkListLater=!1),!0;if(!t.blockNode||t.blockNode===this.editor.editNode){try{C.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(P){}t={blockNode:this.editor.selection.getAncestorElement(this.blockNodeForEnter),
blockContainer:this.editor.editNode};if(t.blockNode){if(t.blockNode!=this.editor.editNode&&!(t.blockNode.textContent||t.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)return this.removeTrailingBr(t.blockNode),!1}else t.blockNode=this.editor.editNode;l=w.getSelection(this.editor.window);r=l.getRangeAt(0)}R=K.createElement(this.blockNodeForEnter);R.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(t.blockNode);I=r.endOffset;O=r.endContainer;O.length<I&&(I=this._adjustNodeAndOffset(O,I),O=
I.node,I=I.offset);if(w.atEndOfContainer(t.blockNode,O,I))t.blockNode===t.blockContainer?t.blockNode.appendChild(R):c.place(R,t.blockNode,"after"),O=!1,r=w.create(this.editor.window),r.setStart(R,0),l.removeAllRanges(),l.addRange(r),this.editor.height&&d.scrollIntoView(R);else if(w.atBeginningOfContainer(t.blockNode,r.startContainer,r.startOffset))c.place(R,t.blockNode,t.blockNode===t.blockContainer?"first":"before"),R.nextSibling&&this.editor.height&&(r=w.create(this.editor.window),r.setStart(R.nextSibling,
0),l.removeAllRanges(),l.addRange(r),d.scrollIntoView(R.nextSibling)),O=!1;else{t.blockNode===t.blockContainer?t.blockNode.appendChild(R):c.place(R,t.blockNode,"after");O=!1;t.blockNode.style&&R.style&&t.blockNode.style.cssText&&(R.style.cssText=t.blockNode.style.cssText);if((A=r.startContainer)&&3==A.nodeType){I=r.endOffset;A.length<I&&(I=this._adjustNodeAndOffset(A,I),A=I.node,I=I.offset);B=A.nodeValue;M=K.createTextNode(B.substring(0,I));I=K.createTextNode(B.substring(I,B.length));c.place(M,A,
"before");c.place(I,A,"after");c.destroy(A);for(r=M.parentNode;r!==t.blockNode;){B=K.createElement(r.tagName);r.style&&B.style&&r.style.cssText&&(B.style.cssText=r.style.cssText);"FONT"===r.tagName&&(r.color&&(B.color=r.color),r.face&&(B.face=r.face),r.size&&(B.size=r.size));for(;I;)A=I.nextSibling,B.appendChild(I),I=A;c.place(B,r,"after");M=r;I=B;r=r.parentNode}if(1==I.nodeType||3==I.nodeType&&I.nodeValue)R.innerHTML="";for(M=I;I;)A=I.nextSibling,R.appendChild(I),I=A}r=w.create(this.editor.window);
K=M;if("BR"!==this.blockNodeForEnter){for(;K;)q=K,K=A=K.firstChild;q&&q.parentNode?(R=q.parentNode,r.setStart(R,0),l.removeAllRanges(),l.addRange(r),this.editor.height&&d.scrollIntoView(R),f("mozilla")&&(this._pressedEnterInBlock=t.blockNode)):O=!0}else r.setStart(R,0),l.removeAllRanges(),l.addRange(r),this.editor.height&&d.scrollIntoView(R),f("mozilla")&&(this._pressedEnterInBlock=t.blockNode)}return O},_adjustNodeAndOffset:function(l,q){for(;l.length<q&&l.nextSibling&&3==l.nextSibling.nodeType;)q-=
l.length,l=l.nextSibling;return{node:l,offset:q}},removeTrailingBr:function(l){if(l=/P|DIV|LI/i.test(l.tagName)?l:this.editor.selection.getParentOfType(l,["P","DIV","LI"]))l.lastChild&&(1<l.childNodes.length&&3==l.lastChild.nodeType&&/^[\s\xAD]*$/.test(l.lastChild.nodeValue)||"BR"==l.lastChild.tagName)&&c.destroy(l.lastChild),l.childNodes.length||(l.innerHTML=this.bogusHtmlContent)}})})},"dijit/_editor/RichText":function(){define("dojo/_base/array dojo/_base/config dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/query dojo/domReady dojo/sniff dojo/string dojo/topic dojo/_base/unload dojo/_base/url dojo/window ../_Widget ../_CssStateMixin ../selection ./range ./html ../focus ../main".split(" "),
function(F,c,k,m,n,f,p,d,v,C,w,l,q,K,A,r,t,B,M,I,O,R,P,G,U,Q,W,J,V){var y=k("dijit._editor.RichText",[P,G],{constructor:function(b){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};b&&q.isString(b.value)&&(this.value=b.value);this.onLoadDeferred=new m},baseClass:"dijitEditor",inheritWidth:!1,focusOnLoad:!1,name:"",styleSheets:"",height:"300px",minHeight:"1em",
isClosed:!0,isLoaded:!1,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:!1,disableSpellCheck:!1,postCreate:function(){"textarea"===this.domNode.tagName.toLowerCase()&&console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");this.contentPreFilters=[q.trim,q.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);t("mozilla")&&(this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters),
this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters));t("webkit")&&(this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters),this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters));if(t("ie")||t("trident"))this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters),this.contentDomPostFilters=[q.hitch(this,"_stripBreakerNodes")].concat(this.contentDomPostFilters);this.contentDomPostFilters=[q.hitch(this,
"_stripTrailingEmptyNodes")].concat(this.contentDomPostFilters);this.inherited(arguments);M.publish(V._scopeName+"._editor.RichText::init",this)},startup:function(){this.inherited(arguments);this.open();this.setupDefaultShortcuts()},setupDefaultShortcuts:function(){var b=q.hitch(this,function(H,a){return function(){return!this.execCommand(H,a)}}),g={b:b("bold"),i:b("italic"),u:b("underline"),a:b("selectall"),s:function(){this.save(!0)},m:function(){this.isTabIndent=!this.isTabIndent},1:b("formatblock",
"h1"),2:b("formatblock","h2"),3:b("formatblock","h3"),4:b("formatblock","h4"),"\\":b("insertunorderedlist")};t("ie")||(g.Z=b("redo"));for(var x in g)this.addKeyHandler(x,!0,!1,g[x])},events:["onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:!1,_localizeEditorCommands:function(){if(y._editorCommandsLocalized)this._local2NativeFormatNames=y._local2NativeFormatNames,this._native2LocalFormatNames=y._native2LocalFormatNames;else{y._editorCommandsLocalized=!0;y._local2NativeFormatNames={};
y._native2LocalFormatNames={};this._local2NativeFormatNames=y._local2NativeFormatNames;this._native2LocalFormatNames=y._native2LocalFormatNames;for(var b="div p pre h1 h2 h3 h4 h5 h6 ol ul address".split(" "),g="",x,H=0;x=b[H++];)g="l"!==x.charAt(1)?g+("\x3c"+x+"\x3e\x3cspan\x3econtent\x3c/span\x3e\x3c/"+x+"\x3e\x3cbr/\x3e"):g+("\x3c"+x+"\x3e\x3cli\x3econtent\x3c/li\x3e\x3c/"+x+"\x3e\x3cbr/\x3e");var a=d.create("div",{style:{position:"absolute",top:"0px",zIndex:10,opacity:.01},innerHTML:g});this.ownerDocumentBody.appendChild(a);
b=q.hitch(this,function(){for(var e=a.firstChild;e;)try{this.selection.selectElement(e.firstChild);var h=e.tagName.toLowerCase();this._local2NativeFormatNames[h]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[h]]=h;e=e.nextSibling.nextSibling}catch(u){}d.destroy(a)});this.defer(b)}},open:function(b){if(!this.onLoadDeferred||0<=this.onLoadDeferred.fired)this.onLoadDeferred=new m;this.isClosed||this.close();M.publish(V._scopeName+"._editor.RichText::open",
this);1===arguments.length&&b.nodeName&&(this.domNode=b);var g=this.domNode;if(q.isString(this.value)){var x=this.value;g.innerHTML=""}else if(g.nodeName&&"textarea"==g.nodeName.toLowerCase()){var H=this.textarea=g;this.name=H.name;x=H.value;g=this.domNode=this.ownerDocument.createElement("div");g.setAttribute("widgetId",this.id);H.removeAttribute("widgetId");g.cssText=H.cssText;g.className+=" "+H.className;d.place(g,H,"before");var a=q.hitch(this,function(){C.set(H,{display:"block",position:"absolute",
top:"-1000px"});if(t("ie")){var z=H.style;this.__overflow=z.overflow;z.overflow="hidden"}});t("ie")?this.defer(a,10):a();if(H.form){var e=H.value;this.reset=function(){this.getValue()!==e&&this.replaceValue(e)};K(H.form,"submit",q.hitch(this,function(){f.set(H,"disabled",this.disabled);H.value=this.getValue()}))}}else x=W.getChildrenHtml(g),g.innerHTML="";this.value=x;g.nodeName&&"LI"===g.nodeName&&(g.innerHTML=" \x3cbr\x3e");this.header=g.ownerDocument.createElement("div");g.appendChild(this.header);
this.editingArea=g.ownerDocument.createElement("div");g.appendChild(this.editingArea);this.footer=g.ownerDocument.createElement("div");g.appendChild(this.footer);this.name||(this.name=this.id+"_AUTOGEN");if(""!==this.name&&(!c.useXDomain||c.allowXdRichTextSave)){if((x=n.byId(V._scopeName+"._editor.RichText.value"))&&""!==x.value){a=x.value.split(this._SEPARATOR);for(var h=0,u;u=a[h++];)if(u=u.split(this._NAME_CONTENT_SEP),u[0]===this.name){this.value=u[1];a=a.splice(h,1);x.value=a.join(this._SEPARATOR);
break}}y._globalSaveHandler||(y._globalSaveHandler={},I.addOnUnload(function(){for(var z in y._globalSaveHandler){var N=y._globalSaveHandler[z];q.isFunction(N)&&N()}}));y._globalSaveHandler[this.id]=q.hitch(this,"_saveContent")}this.isClosed=!1;x=this.editorObject=this.iframe=this.ownerDocument.createElement("iframe");x.id=this.id+"_iframe";x.style.border="none";x.style.width="100%";this._layoutMode?x.style.height="100%":7<=t("ie")?(this.height&&(x.style.height=this.height),this.minHeight&&(x.style.minHeight=
this.minHeight)):x.style.height=this.height?this.height:this.minHeight;x.frameBorder=0;x._loadFunc=q.hitch(this,function(z){this.window=z;this.document=z.document;this.selection=new U.SelectionManager(z);t("ie")&&this._localizeEditorCommands();this.onLoad(this.get("value"))});a=this._getIframeDocTxt().replace(/\\/g,"\\\\").replace(/'/g,"\\'");a=11>t("ie")?'javascript:document.open();try{parent.window;}catch(e){document.domain\x3d"'+document.domain+"\";}document.write('"+a+"');document.close()":"javascript: '"+
a+"'";this.editingArea.appendChild(x);x.src=a;"LI"===g.nodeName&&(g.lastChild.style.marginTop="-1.2em");p.add(this.domNode,this.baseClass)},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var b=C.getComputedStyle(this.domNode);if(this["aria-label"])var g=this["aria-label"];else{var x=A('label[for\x3d"'+this.id+'"]',this.ownerDocument)[0]||n.byId(this["aria-labelledby"],this.ownerDocument);x&&(g=x.textContent||x.innerHTML||"")}x="\x3cdiv id\x3d'dijitEditorBody' role\x3d'textbox' aria-multiline\x3d'true' "+
(g?" aria-label\x3d'"+B.escape(g)+"'":"")+"\x3e\x3c/div\x3e";var H=[b.fontWeight,b.fontSize,b.fontFamily].join(" "),a=b.lineHeight;a=0<=a.indexOf("px")?parseFloat(a)/parseFloat(b.fontSize):0<=a.indexOf("em")?parseFloat(a):"normal";var e="",h=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(u){u=u.replace(/^;/ig,"")+";";var z=u.split(":")[0];if(z){z=q.trim(z);z=z.toLowerCase();var N,T="";for(N=0;N<z.length;N++){var aa=z.charAt(N);switch(aa){case "-":N++,aa=z.charAt(N).toUpperCase();
default:T+=aa}}C.set(h.domNode,T,"")}e+=u+";"});this.iframe.setAttribute("title",g);return["\x3c!DOCTYPE html\x3e","\x3chtml lang\x3d'"+(this.lang||w.locale.replace(/-.*/,""))+"'"+(this.isLeftToRight()?"":" dir\x3d'rtl'")+"\x3e\n","\x3chead\x3e\n\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html'\x3e\n",g?"\x3ctitle\x3e"+B.escape(g)+"\x3c/title\x3e":"","\x3cstyle\x3e\n\tbody,html {\n\t\tbackground:transparent;\n\t\tpadding: 1px 0 0 0;\n\t\tmargin: -1px 0 0 0;\n\t}\n\tbody,html,#dijitEditorBody { outline: none; }html { height: 100%; width: 100%; overflow: hidden; }\n",
this.height?"\tbody,#dijitEditorBody { height: 100%; width: 100%; overflow: auto; }\n":"\tbody,#dijitEditorBody { min-height: "+this.minHeight+"; width: 100%; overflow-x: auto; overflow-y: hidden; }\n","\tbody{\n\t\ttop:0px;\n\t\tleft:0px;\n\t\tright:0px;\n\t\tfont:",H,";\n",this.height||t("opera")?"":"\t\tposition: fixed;\n","\t\tline-height:",a,";\n\t}\n\tp{ margin: 1em 0; }\n\tli \x3e ul:-moz-first-node, li \x3e ol:-moz-first-node{ padding-top: 1.2em; }\n",t("ie")||t("trident")||t("edge")?"":"\tli{ min-height:1.2em; }\n",
"\x3c/style\x3e\n",this._applyEditingAreaStyleSheets(),"\n\x3c/head\x3e\n\x3cbody role\x3d'application'",g?" aria-label\x3d'"+B.escape(g)+"'":"","onload\x3d'try{frameElement \x26\x26 frameElement._loadFunc(window,document)}catch(e){document.domain\x3d\""+document.domain+"\";frameElement._loadFunc(window,document)}' ","style\x3d'"+e+"'\x3e",x,"\x3c/body\x3e\n\x3c/html\x3e"].join("")},_applyEditingAreaStyleSheets:function(){var b=[];this.styleSheets&&(b=this.styleSheets.split(";"),this.styleSheets=
"");b=b.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];for(var g="",x=0,H,a=R.get(this.ownerDocument);H=b[x++];)H=(new O(a.location,H)).toString(),this.editingAreaStyleSheets.push(H),g+='\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+H+'"/\x3e';return g},addStyleSheet:function(b){var g=b.toString(),x=R.get(this.ownerDocument);if("."===g.charAt(0)||"/"!==g.charAt(0)&&!b.host)g=(new O(x.location,g)).toString();-1<F.indexOf(this.editingAreaStyleSheets,g)||(this.editingAreaStyleSheets.push(g),
this.onLoadDeferred.then(q.hitch(this,function(){if(this.document.createStyleSheet)this.document.createStyleSheet(g);else{var H=this.document.getElementsByTagName("head")[0],a=this.document.createElement("link");a.rel="stylesheet";a.type="text/css";a.href=g;H.appendChild(a)}})))},removeStyleSheet:function(b){var g=b.toString(),x=R.get(this.ownerDocument);if("."===g.charAt(0)||"/"!==g.charAt(0)&&!b.host)g=(new O(x.location,g)).toString();b=F.indexOf(this.editingAreaStyleSheets,g);-1!==b&&(delete this.editingAreaStyleSheets[b],
A('link[href\x3d"'+g+'"]',this.window.document).orphan())},disabled:!1,_mozSettingProps:{styleWithCSS:!1},_setDisabledAttr:function(b){b=!!b;this._set("disabled",b);if(this.isLoaded){var g=t("ie")&&(this.isLoaded||!this.focusOnLoad);g&&(this.editNode.unselectable="on");this.editNode.contentEditable=!b;this.editNode.tabIndex=b?"-1":this.tabIndex;g&&this.defer(function(){this.editNode&&(this.editNode.unselectable="off")});if(t("mozilla")&&!b&&this._mozSettingProps){b=this._mozSettingProps;for(var x in b)if(b.hasOwnProperty(x))try{this.document.execCommand(x,
!1,b[x])}catch(H){}}this._disabledOK=!0}},onLoad:function(b){this.window.__registeredWindow||(this.window.__registeredWindow=!0,this._iframeRegHandle=J.registerIframe(this.iframe));this.editNode=this.document.body.firstChild;var g=this;this.beforeIframeNode=d.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"before");this.afterIframeNode=d.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"after");this.iframe.onfocus=this.document.onfocus=function(){g.editNode.focus()};this.focusNode=
this.editNode;var x=this.events.concat(this.captureEvents),H=this.iframe?this.document:this.editNode;this.own.apply(this,F.map(x,function(a){var e=a.toLowerCase().replace(/^on/,"");return K(H,e,q.hitch(this,a))},this));this.own(K(H,"mouseup",q.hitch(this,"onClick")));t("ie")&&(this.own(K(this.document,"mousedown",q.hitch(this,"_onIEMouseDown"))),this.editNode.style.zoom=1);t("webkit")&&(this._webkitListener=this.own(K(this.document,"mouseup",q.hitch(this,"onDisplayChanged")))[0],this.own(K(this.document,
"mousedown",q.hitch(this,function(a){a=a.target;!a||a!==this.document.body&&a!==this.document||this.defer("placeCursorAtEnd")}))));if(t("ie"))try{this.document.execCommand("RespectVisibilityInDesign",!0,null)}catch(a){}this.isLoaded=!0;this.set("disabled",this.disabled);x=q.hitch(this,function(){this.setValue(b);this.onLoadDeferred&&!this.onLoadDeferred.isFulfilled()&&this.onLoadDeferred.resolve(!0);this.onDisplayChanged();this.focusOnLoad&&r(q.hitch(this,"defer","focus",this.updateInterval));this.value=
this.getValue(!0)});this.setValueDeferred?this.setValueDeferred.then(x):x()},onKeyDown:function(b){if(b.keyCode===l.SHIFT||b.keyCode===l.ALT||b.keyCode===l.META||b.keyCode===l.CTRL)return!0;b.keyCode===l.TAB&&this.isTabIndent&&(b.stopPropagation(),b.preventDefault(),this.queryCommandEnabled(b.shiftKey?"outdent":"indent")&&this.execCommand(b.shiftKey?"outdent":"indent"));if(b.keyCode==l.TAB&&!this.isTabIndent&&!b.ctrlKey&&!b.altKey)return b.shiftKey?this.beforeIframeNode.focus():this.afterIframeNode.focus(),
!0;9>t("ie")&&b.keyCode===l.BACKSPACE&&"Control"===this.document.selection.type&&(b.stopPropagation(),b.preventDefault(),this.execCommand("delete"));t("ff")&&(b.keyCode===l.PAGE_UP||b.keyCode===l.PAGE_DOWN)&&this.editNode.clientHeight>=this.editNode.scrollHeight&&b.preventDefault();var g=this._keyHandlers[b.keyCode],x=arguments;g&&!b.altKey&&F.some(g,function(H){if(!(H.shift^b.shiftKey||H.ctrl^(b.ctrlKey||b.metaKey)))return H.handler.apply(this,x)||b.preventDefault(),!0},this);this.defer("onKeyPressed",
1);return!0},onKeyUp:function(){},setDisabled:function(b){w.deprecated("dijit.Editor::setDisabled is deprecated",'use dijit.Editor::attr("disabled",boolean) instead',2);this.set("disabled",b)},_setValueAttr:function(b){this.setValue(b)},_setDisableSpellCheckAttr:function(b){this.document?f.set(this.document.body,"spellcheck",!b):this.onLoadDeferred.then(q.hitch(this,function(){f.set(this.document.body,"spellcheck",!b)}));this._set("disableSpellCheck",b)},addKeyHandler:function(b,g,x,H){"string"==
typeof b&&(b=b.toUpperCase().charCodeAt(0));q.isArray(this._keyHandlers[b])||(this._keyHandlers[b]=[]);this._keyHandlers[b].push({shift:x||!1,ctrl:g||!1,handler:H})},onKeyPressed:function(){this.onDisplayChanged()},onClick:function(b){this.onDisplayChanged(b)},_onIEMouseDown:function(){this.focused||this.disabled||this.focus()},_onBlur:function(b){(t("ie")||t("trident"))&&this.defer(function(){J.curNode||this.ownerDocumentBody.focus()});this.inherited(arguments);var g=this.getValue(!0);if(g!==this.value)this.onChange(g);
this._set("value",g)},_onFocus:function(b){this.disabled||(this._disabledOK||this.set("disabled",!1),this.inherited(arguments))},blur:function(){!t("ie")&&this.window.document.documentElement&&this.window.document.documentElement.focus?this.window.document.documentElement.focus():this.ownerDocumentBody.focus&&this.ownerDocumentBody.focus()},focus:function(){this.isLoaded?9>t("ie")?this.iframe.fireEvent("onfocus",document.createEventObject()):this.editNode.focus():this.focusOnLoad=!0},updateInterval:200,
_updateTimer:null,onDisplayChanged:function(){this._updateTimer&&this._updateTimer.remove();this._updateTimer=this.defer("onNormalizedDisplayChanged",this.updateInterval)},onNormalizedDisplayChanged:function(){delete this._updateTimer},onChange:function(){},_normalizeCommand:function(b,g){b=b.toLowerCase();"formatblock"===b?t("safari")&&void 0===g&&(b="heading"):"hilitecolor"!==b||t("mozilla")||(b="backcolor");return b},_implCommand:function(b){return"_"+this._normalizeCommand(b)+"EnabledImpl"},_qcaCache:{},
queryCommandAvailable:function(b){var g=this._qcaCache[b];return void 0!==g?g:this._qcaCache[b]=this._queryCommandAvailable(b)},_queryCommandAvailable:function(b){switch(b.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":case "toggledir":case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":case "tabindent":case "cut":case "copy":case "paste":return!0;
case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":return t("ie")||t("trident")||t("edge");case "inserttable":case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":return!t("webkit");default:return!1}},execCommand:function(b,g){this.focused&&this.focus();b=this._normalizeCommand(b,g);if(void 0!==g){if("heading"===b)throw Error("unimplemented");"formatblock"===
b&&(t("ie")||t("trident"))&&(g="\x3c"+g+"\x3e")}var x="_"+b+"Impl";if(this[x])var H=this[x](g);else if((g=1<arguments.length?g:null)||"createlink"!==b)H=this.document.execCommand(b,!1,g);this.onDisplayChanged();return H},queryCommandEnabled:function(b){if(this.disabled||!this._disabledOK)return!1;b=this._normalizeCommand(b);var g=this._implCommand(b);return this[g]?this[g](b):this._browserQueryCommandEnabled(b)},queryCommandState:function(b){if(this.disabled||!this._disabledOK)return!1;b=this._normalizeCommand(b);
try{return this.document.queryCommandState(b)}catch(g){return!1}},queryCommandValue:function(b){if(this.disabled||!this._disabledOK)return!1;b=this._normalizeCommand(b);if(t("ie")&&"formatblock"===b)b=this._native2LocalFormatNames[this.document.queryCommandValue(b)];else if(t("mozilla")&&"hilitecolor"===b){try{var g=this.document.queryCommandValue("styleWithCSS")}catch(x){g=!1}this.document.execCommand("styleWithCSS",!1,!0);b=this.document.queryCommandValue(b);this.document.execCommand("styleWithCSS",
!1,g)}else b=this.document.queryCommandValue(b);return b},_sCall:function(b,g){return this.selection[b].apply(this.selection,g)},placeCursorAtStart:function(){this.focus();var b=!1;if(t("mozilla"))for(var g=this.editNode.firstChild;g;){if(3===g.nodeType){if(0<g.nodeValue.replace(/^\s+|\s+$/g,"").length){b=!0;this.selection.selectElement(g);break}}else if(1===g.nodeType){b=!0;var x=g.tagName?g.tagName.toLowerCase():"";/br|input|img|base|meta|area|basefont|hr|link/.test(x)?this.selection.selectElement(g):
this.selection.selectElementChildren(g);break}g=g.nextSibling}else b=!0,this.selection.selectElementChildren(this.editNode);b&&this.selection.collapse(!0)},placeCursorAtEnd:function(){this.focus();var b=!1;if(t("mozilla"))for(var g=this.editNode.lastChild;g;){if(3===g.nodeType){if(0<g.nodeValue.replace(/^\s+|\s+$/g,"").length){b=!0;this.selection.selectElement(g);break}}else if(1===g.nodeType){b=!0;this.selection.selectElement(g.lastChild||g);break}g=g.previousSibling}else b=!0,this.selection.selectElementChildren(this.editNode);
b&&this.selection.collapse(!1)},getValue:function(b){return!this.textarea||!this.isClosed&&this.isLoaded?this.isLoaded?this._postFilterContent(null,b):this.value:this.textarea.value},_getValueAttr:function(){return this.getValue(!0)},setValue:function(b){if(this.isLoaded){if(!this.textarea||!this.isClosed&&this.isLoaded){b=this._preFilterContent(b);var g=this.isClosed?this.domNode:this.editNode;g.innerHTML=b;this._preDomFilterContent(g)}else this.textarea.value=b;this.onDisplayChanged();this._set("value",
this.getValue(!0))}else this.onLoadDeferred.then(q.hitch(this,function(){this.setValue(b)}))},replaceValue:function(b){this.isClosed?this.setValue(b):this.window&&this.window.getSelection&&!t("mozilla")?this.setValue(b):this.window&&this.window.getSelection?(b=this._preFilterContent(b),this.execCommand("selectall"),this.execCommand("inserthtml",b),this._preDomFilterContent(this.editNode)):this.document&&this.document.selection&&this.setValue(b);this._set("value",this.getValue(!0))},_preFilterContent:function(b){var g=
b;F.forEach(this.contentPreFilters,function(x){x&&(g=x(g))});return g},_preDomFilterContent:function(b){b=b||this.editNode;F.forEach(this.contentDomPreFilters,function(g){g&&q.isFunction(g)&&g(b)},this)},_postFilterContent:function(b,g){if(q.isString(b))var x=b;else b=b||this.editNode,this.contentDomPostFilters.length&&(g&&(b=q.clone(b)),F.forEach(this.contentDomPostFilters,function(H){b=H(b)})),x=W.getChildrenHtml(b);q.trim(x.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length||(x="");F.forEach(this.contentPostFilters,
function(H){x=H(x)});return x},_saveContent:function(){var b=n.byId(V._scopeName+"._editor.RichText.value");b&&(b.value&&(b.value+=this._SEPARATOR),b.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(!0))},escapeXml:function(b,g){b=b.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");g||(b=b.replace(/'/gm,"\x26#39;"));return b},getNodeHtml:function(b){w.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",
2);return W.getNodeHtml(b)},getNodeChildrenHtml:function(b){w.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return W.getChildrenHtml(b)},close:function(b){if(!this.isClosed){arguments.length||(b=!0);b&&this._set("value",this.getValue(!0));this.interval&&clearInterval(this.interval);this._webkitListener&&(this._webkitListener.remove(),delete this._webkitListener);t("ie")&&(this.iframe.onfocus=null);this.iframe._loadFunc=null;this._iframeRegHandle&&
(this._iframeRegHandle.remove(),delete this._iframeRegHandle);if(this.textarea){var g=this.textarea.style;g.position="";g.left=g.top="";t("ie")&&(g.overflow=this.__overflow,this.__overflow=null);this.textarea.value=this.value;d.destroy(this.domNode);this.domNode=this.textarea}else this.domNode.innerHTML=this.value;delete this.iframe;p.remove(this.domNode,this.baseClass);this.isClosed=!0;this.isLoaded=!1;delete this.editNode;delete this.focusNode;this.window&&this.window._frameElement&&(this.window._frameElement=
null);this.editorObject=this.editingArea=this.document=this.window=null}},destroy:function(){this.isClosed||this.close(!1);this._updateTimer&&this._updateTimer.remove();this.inherited(arguments);y._globalSaveHandler&&delete y._globalSaveHandler[this.id]},_removeMozBogus:function(b){return b.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"")},_removeWebkitBogus:function(b){b=b.replace(/\sclass="webkit-block-placeholder"/gi,"");b=b.replace(/\sclass="apple-style-span"/gi,
"");return b=b.replace(/<meta charset="utf-8" \/>/gi,"")},_normalizeFontStyle:function(b){return b.replace(/<(\/)?strong([ >])/gi,"\x3c$1b$2").replace(/<(\/)?em([ >])/gi,"\x3c$1i$2")},_preFixUrlAttributes:function(b){return b.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2")},_browserQueryCommandEnabled:function(b){if(!b)return!1;
if(t("ie")||t("trident")||t("edge"))return this.focused&&!this.disabled;var g=9>t("ie")?this.document.selection.createRange():this.document;try{return g.queryCommandEnabled(b)}catch(x){return!1}},_createlinkEnabledImpl:function(){var b=!0;return b=t("opera")?this.window.getSelection().isCollapsed?!0:this.document.queryCommandEnabled("createlink"):this._browserQueryCommandEnabled("createlink")},_unlinkEnabledImpl:function(){var b=!0;return b=t("mozilla")||t("webkit")||t("ie")||t("trident")||t("edge")?
this.selection.hasAncestorElement("a"):this._browserQueryCommandEnabled("unlink")},_inserttableEnabledImpl:function(){var b=!0;return b=t("mozilla")||t("webkit")?!0:this._browserQueryCommandEnabled("inserttable")},_cutEnabledImpl:function(){var b=!0;t("webkit")?((b=this.window.getSelection())&&(b=b.toString()),b=!!b):b=this._browserQueryCommandEnabled("cut");return b},_copyEnabledImpl:function(){var b=!0;t("webkit")?((b=this.window.getSelection())&&(b=b.toString()),b=!!b):b=this._browserQueryCommandEnabled("copy");
return b},_pasteEnabledImpl:function(){var b=!0;return t("webkit")?!0:b=this._browserQueryCommandEnabled("paste")},_inserthorizontalruleImpl:function(b){return t("ie")?this._inserthtmlImpl("\x3chr\x3e"):this.document.execCommand("inserthorizontalrule",!1,b)},_unlinkImpl:function(b){return this.queryCommandEnabled("unlink")&&(t("mozilla")||t("webkit"))?(b=this.selection.getAncestorElement("a"),this.selection.selectElement(b),this.document.execCommand("unlink",!1,null)):this.document.execCommand("unlink",
!1,b)},_hilitecolorImpl:function(b){if(!this._handleTextColorOrProperties("hilitecolor",b))if(t("mozilla")){this.document.execCommand("styleWithCSS",!1,!0);console.log("Executing color command.");var g=this.document.execCommand("hilitecolor",!1,b);this.document.execCommand("styleWithCSS",!1,!1)}else g=this.document.execCommand("hilitecolor",!1,b);return g},_backcolorImpl:function(b){t("ie")&&(b=b?b:null);var g=this._handleTextColorOrProperties("backcolor",b);g||(g=this.document.execCommand("backcolor",
!1,b));return g},_forecolorImpl:function(b){t("ie")&&(b=b?b:null);var g=!1;(g=this._handleTextColorOrProperties("forecolor",b))||(g=this.document.execCommand("forecolor",!1,b));return g},_inserthtmlImpl:function(b){b=this._preFilterContent(b);var g=!0;if(9>t("ie")){var x=this.document.selection.createRange();if("CONTROL"===this.document.selection.type.toUpperCase()){for(var H=x.item(0);x.length;)x.remove(x.item(0));H.outerHTML=b}else x.pasteHTML(b);x.select()}else if(8>t("trident")){var a=Q.getSelection(this.window);
if(a&&a.rangeCount&&a.getRangeAt){x=a.getRangeAt(0);x.deleteContents();var e=d.create("div");e.innerHTML=b;for(H=this.document.createDocumentFragment();b=e.firstChild;)var h=H.appendChild(b);x.insertNode(H);h&&(x=x.cloneRange(),x.setStartAfter(h),x.collapse(!1),a.removeAllRanges(),a.addRange(x))}}else t("mozilla")&&!b.length?this.selection.remove():g=this.document.execCommand("inserthtml",!1,b);return g},_boldImpl:function(b){var g=!1;if(t("ie")||t("trident"))this._adaptIESelection(),g=this._adaptIEFormatAreaAndExec("bold");
g||(g=this.document.execCommand("bold",!1,b));return g},_italicImpl:function(b){var g=!1;if(t("ie")||t("trident"))this._adaptIESelection(),g=this._adaptIEFormatAreaAndExec("italic");g||(g=this.document.execCommand("italic",!1,b));return g},_underlineImpl:function(b){var g=!1;if(t("ie")||t("trident"))this._adaptIESelection(),g=this._adaptIEFormatAreaAndExec("underline");g||(g=this.document.execCommand("underline",!1,b));return g},_strikethroughImpl:function(b){var g=!1;if(t("ie")||t("trident"))this._adaptIESelection(),
g=this._adaptIEFormatAreaAndExec("strikethrough");g||(g=this.document.execCommand("strikethrough",!1,b));return g},_superscriptImpl:function(b){var g=!1;if(t("ie")||t("trident"))this._adaptIESelection(),g=this._adaptIEFormatAreaAndExec("superscript");g||(g=this.document.execCommand("superscript",!1,b));return g},_subscriptImpl:function(b){var g=!1;if(t("ie")||t("trident"))this._adaptIESelection(),g=this._adaptIEFormatAreaAndExec("subscript");g||(g=this.document.execCommand("subscript",!1,b));return g},
_fontnameImpl:function(b){if(t("ie")||t("trident"))var g=this._handleTextColorOrProperties("fontname",b);g||(g=this.document.execCommand("fontname",!1,b));return g},_fontsizeImpl:function(b){if(t("ie")||t("trident"))var g=this._handleTextColorOrProperties("fontsize",b);g||(g=this.document.execCommand("fontsize",!1,b));return g},_insertorderedlistImpl:function(b){var g=!1;if(t("ie")||t("trident")||t("edge"))g=this._adaptIEList("insertorderedlist",b);g||(g=this.document.execCommand("insertorderedlist",
!1,b));return g},_insertunorderedlistImpl:function(b){var g=!1;if(t("ie")||t("trident")||t("edge"))g=this._adaptIEList("insertunorderedlist",b);g||(g=this.document.execCommand("insertunorderedlist",!1,b));return g},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header)},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer)},_getNodeChildrenHeight:function(b){var g=0;if(b&&b.childNodes){var x;for(x=0;x<b.childNodes.length;x++){var H=v.position(b.childNodes[x]);
g+=H.h}}return g},_isNodeEmpty:function(b,g){return 1===b.nodeType?0<b.childNodes.length?this._isNodeEmpty(b.childNodes[0],g):!0:3===b.nodeType?""===b.nodeValue.substring(g):!1},_removeStartingRangeFromRange:function(b,g){if(b.nextSibling)g.setStart(b.nextSibling,0);else{for(b=b.parentNode;b&&null==b.nextSibling;)b=b.parentNode;b&&g.setStart(b.nextSibling,0)}return g},_adaptIESelection:function(){var b=Q.getSelection(this.window);if(b&&b.rangeCount&&!b.isCollapsed){for(var g=b.getRangeAt(0),x=g.startContainer,
H=g.startOffset;3===x.nodeType&&H>=x.length&&x.nextSibling;)H-=x.length,x=x.nextSibling;for(var a=null;this._isNodeEmpty(x,H)&&x!==a;)a=x,g=this._removeStartingRangeFromRange(x,g),x=g.startContainer,H=0;b.removeAllRanges();b.addRange(g)}},_adaptIEFormatAreaAndExec:function(b){var g=Q.getSelection(this.window),x=this.document,H;if(b&&g&&g.isCollapsed){if(this.queryCommandValue(b)){b=this._tagNamesForCommand(b);var a=g.getRangeAt(0);var e=a.startContainer;if(3===e.nodeType){var h=a.endOffset;e.length<
h&&(h=this._adjustNodeAndOffset(u,h),e=h.node,h=h.offset)}for(;e&&e!==this.editNode;){var u=e.tagName?e.tagName.toLowerCase():"";if(-1<F.indexOf(b,u)){var z=e;break}e=e.parentNode}if(z&&(u=a.startContainer,b=x.createElement(z.tagName),d.place(b,z,"after"),u&&3===u.nodeType)){h=a.endOffset;u.length<h&&(h=this._adjustNodeAndOffset(u,h),u=h.node,h=h.offset);e=u.nodeValue;a=x.createTextNode(e.substring(0,h));var N=e.substring(h,e.length);N&&(H=x.createTextNode(N));d.place(a,u,"before");if(H){var T=x.createElement("span");
T.className="ieFormatBreakerSpan";d.place(T,u,"after");d.place(H,T,"after");H=T}d.destroy(u);h=a.parentNode;for(u=[];h!==z;){e=h.tagName;a={tagName:e};u.push(a);e=x.createElement(e);h.style&&e.style&&h.style.cssText&&(e.style.cssText=h.style.cssText,a.cssText=h.style.cssText);"FONT"===h.tagName&&(h.color&&(e.color=h.color,a.color=h.color),h.face&&(e.face=h.face,a.face=h.face),h.size&&(e.size=h.size,a.size=h.size));h.className&&(e.className=h.className,a.className=h.className);if(H)for(;H;)a=H.nextSibling,
e.appendChild(H),H=a;e.tagName==h.tagName?(T=x.createElement("span"),T.className="ieFormatBreakerSpan",d.place(T,h,"after"),d.place(e,T,"after")):d.place(e,h,"after");a=h;H=e;h=h.parentNode}if(H){if(1===H.nodeType||3===H.nodeType&&H.nodeValue)b.innerHTML="";for(;H;)a=H.nextSibling,b.appendChild(H),H=a}if(u.length){a=u.pop();H=x.createElement(a.tagName);a.cssText&&H.style&&(H.style.cssText=a.cssText);a.className&&(H.className=a.className);"FONT"===a.tagName&&(a.color&&(H.color=a.color),a.face&&(H.face=
a.face),a.size&&(H.size=a.size));for(d.place(H,b,"before");u.length;)a=u.pop(),z=x.createElement(a.tagName),a.cssText&&z.style&&(z.style.cssText=a.cssText),a.className&&(z.className=a.className),"FONT"===a.tagName&&(a.color&&(z.color=a.color),a.face&&(z.face=a.face),a.size&&(z.size=a.size)),H.appendChild(z),H=z;z=x.createTextNode(".");T.appendChild(z);H.appendChild(z)}else T=x.createElement("span"),T.className="ieFormatBreakerSpan",z=x.createTextNode("."),T.appendChild(z),d.place(T,b,"before");H=
Q.create(this.window);H.setStart(z,0);H.setEnd(z,z.length);g.removeAllRanges();g.addRange(H);this.selection.collapse(!1);z.parentNode.innerHTML="";b.firstChild||d.destroy(b);return!0}return!1}a=g.getRangeAt(0);if((u=a.startContainer)&&3===u.nodeType)return h=a.startOffset,u.length<h&&(h=this._adjustNodeAndOffset(u,h),u=h.node,h=h.offset),e=u.nodeValue,a=x.createTextNode(e.substring(0,h)),N=e.substring(h),""!==N&&(H=x.createTextNode(e.substring(h))),T=x.createElement("span"),z=x.createTextNode("."),
T.appendChild(z),a.length?d.place(a,u,"after"):a=u,d.place(T,a,"after"),H&&d.place(H,T,"after"),d.destroy(u),H=Q.create(this.window),H.setStart(z,0),H.setEnd(z,z.length),g.removeAllRanges(),g.addRange(H),x.execCommand(b),d.place(T.firstChild,T,"before"),d.destroy(T),H.setStart(z,0),H.setEnd(z,z.length),g.removeAllRanges(),g.addRange(H),this.selection.collapse(!1),z.parentNode.innerHTML="",!0}else return!1},_adaptIEList:function(b){var g=Q.getSelection(this.window);if(g.isCollapsed&&g.rangeCount&&
!this.queryCommandValue(b)){var x=g.getRangeAt(0),H=x.startContainer;if(H&&3==H.nodeType&&!x.startOffset)return x="ul","insertorderedlist"===b&&(x="ol"),b=this.document.createElement(x),x=d.create("li",null,b),d.place(b,H,"before"),x.appendChild(H),d.create("br",null,b,"after"),b=Q.create(this.window),b.setStart(H,0),b.setEnd(H,H.length),g.removeAllRanges(),g.addRange(b),this.selection.collapse(!0),!0}return!1},_handleTextColorOrProperties:function(b,g){var x=Q.getSelection(this.window),H=this.document,
a,e;g=g||null;if(b&&x&&x.isCollapsed&&x.rangeCount){var h=x.getRangeAt(0);if((a=h.startContainer)&&3===a.nodeType){var u=h.startOffset;a.length<u&&(h=this._adjustNodeAndOffset(a,u),a=h.node,u=h.offset);var z=a.nodeValue;h=H.createTextNode(z.substring(0,u));""!==z.substring(u)&&(e=H.createTextNode(z.substring(u)));z=H.createElement("span");u=H.createTextNode(".");z.appendChild(u);H=H.createElement("span");z.appendChild(H);h.length?d.place(h,a,"after"):h=a;d.place(z,h,"after");e&&d.place(e,z,"after");
d.destroy(a);a=Q.create(this.window);a.setStart(u,0);a.setEnd(u,u.length);x.removeAllRanges();x.addRange(a);if(t("webkit")){x="color";if("hilitecolor"===b||"backcolor"===b)x="backgroundColor";C.set(z,x,g);this.selection.remove();d.destroy(H);z.innerHTML="\x26#160;";this.selection.selectElement(z);this.focus()}else this.execCommand(b,g),d.place(z.firstChild,z,"before"),d.destroy(z),a.setStart(u,0),a.setEnd(u,u.length),x.removeAllRanges(),x.addRange(a),this.selection.collapse(!1),u.parentNode.removeChild(u);
return!0}}return!1},_adjustNodeAndOffset:function(b,g){for(;b.length<g&&b.nextSibling&&3===b.nextSibling.nodeType;)g-=b.length,b=b.nextSibling;return{node:b,offset:g}},_tagNamesForCommand:function(b){return"bold"===b?["b","strong"]:"italic"===b?["i","em"]:"strikethrough"===b?["s","strike"]:"superscript"===b?["sup"]:"subscript"===b?["sub"]:"underline"===b?["u"]:[]},_stripBreakerNodes:function(b){if(this.isLoaded)return A(".ieFormatBreakerSpan",b).forEach(function(g){for(;g.firstChild;)d.place(g.firstChild,
g,"before");d.destroy(g)}),b},_stripTrailingEmptyNodes:function(b){function g(x){return/^(p|div|br)$/i.test(x.nodeName)&&0==x.children.length&&/^[\s\xA0]*$/.test(x.textContent||x.innerText||"")||3===x.nodeType&&/^[\s\xA0]*$/.test(x.nodeValue)}for(;b.lastChild&&g(b.lastChild);)d.destroy(b.lastChild);return b},_setTextDirAttr:function(b){this._set("textDir",b);this.onLoadDeferred.then(q.hitch(this,function(){this.editNode.dir=b}))}});return y})},"dijit/_editor/range":function(){define(["dojo/_base/array",
"dojo/_base/declare","dojo/_base/lang"],function(F,c,k){var m={getIndex:function(p,d){for(var v=[],C=[],w=p,l,q;p!=d;){var K=0;for(l=p.parentNode;q=l.childNodes[K++];)if(q===p){--K;break}v.unshift(K);C.unshift(K-l.childNodes.length);p=l}if(0<v.length&&3==w.nodeType){for(q=w.previousSibling;q&&3==q.nodeType;)v[v.length-1]--,q=q.previousSibling;for(q=w.nextSibling;q&&3==q.nodeType;)C[C.length-1]++,q=q.nextSibling}return{o:v,r:C}},getNode:function(p,d){if(!k.isArray(p)||0==p.length)return d;var v=d;
F.every(p,function(C){if(0<=C&&C<v.childNodes.length)v=v.childNodes[C];else return v=null,!1;return!0});return v},getCommonAncestor:function(p,d,v){v=v||p.ownerDocument.body;var C=function(q){for(var K=[];q;)if(K.unshift(q),q!==v)q=q.parentNode;else break;return K};p=C(p);d=C(d);C=Math.min(p.length,d.length);for(var w=p[0],l=1;l<C;l++)if(p[l]===d[l])w=p[l];else break;return w},getAncestor:function(p,d,v){for(v=v||p.ownerDocument.body;p&&p!==v;){var C=p.nodeName.toUpperCase();if(d.test(C))return p;
p=p.parentNode}return null},BlockTagNames:/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/,getBlockAncestor:function(p,d,v){v=v||p.ownerDocument.body;d=d||m.BlockTagNames;for(var C=null,w;p&&p!==v;){var l=p.nodeName.toUpperCase();!C&&d.test(l)&&(C=p);!w&&/^(?:BODY|TD|TH|CAPTION)$/.test(l)&&(w=p);p=p.parentNode}return{blockNode:C,blockContainer:w||p.ownerDocument.body}},atBeginningOfContainer:function(p,d,v){var C=!1,w=0==v;w||3!=d.nodeType||/^[\s\xA0]+$/.test(d.nodeValue.substr(0,v))&&(w=
!0);if(w)for(C=!0;d&&d!==p;){if(d.previousSibling){C=!1;break}d=d.parentNode}return C},atEndOfContainer:function(p,d,v){var C=!1,w=v==(d.length||d.childNodes.length);w||3!=d.nodeType||/^[\s\xA0]+$/.test(d.nodeValue.substr(v))&&(w=!0);if(w)for(C=!0;d&&d!==p;){if(d.nextSibling){C=!1;break}d=d.parentNode}return C},adjacentNoneTextNode:function(p,d){var v=p;p=0-p.length||0;for(d=d?"nextSibling":"previousSibling";v&&3==v.nodeType;)p+=v.length,v=v[d];return[v,p]},create:function(p){p=p||window;return p.getSelection?
p.document.createRange():new f},getSelection:function(p,d){if(p.getSelection)return p.getSelection();p=new n.selection(p);d||p._getCurrentSelection();return p}};if(!window.getSelection)var n=m.ie={cachedSelection:{},selection:function(p){this._ranges=[];this.addRange=function(d,v){this._ranges.push(d);v||d._select();this.rangeCount=this._ranges.length};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0};this.getRangeAt=function(d){return this._ranges[d]};this._getCurrentSelection=function(){this.removeAllRanges();
var d=p.document.selection.createRange();d="CONTROL"==p.document.selection.type.toUpperCase()?new f(n.decomposeControlRange(d)):new f(n.decomposeTextRange(d));this.addRange(d,!0),this.isCollapsed=d.collapsed}},decomposeControlRange:function(p){var d=p.item(0),v=p.item(p.length-1);p=d.parentNode;var C=v.parentNode;d=m.getIndex(d,p).o[0];v=m.getIndex(v,C).o[0]+1;return[p,d,C,v]},getEndPoint:function(p,d){var v=p.duplicate();v.collapse(!d);var C="EndTo"+(d?"End":"Start"),w=v.parentElement(),l;if(0<w.childNodes.length)F.every(w.childNodes,
function(A,r){if(3!=A.nodeType)if(v.moveToElementText(A),0<v.compareEndPoints(C,p))if(l&&3==l.nodeType){q=l;var t=!0}else return q=w,K=r,!1;else{if(r==w.childNodes.length-1)return q=w,K=w.childNodes.length,!1}else r==w.childNodes.length-1&&(q=A,t=!0);if(t&&q)return q=(A=m.adjacentNoneTextNode(q)[0])?A.nextSibling:w.firstChild,r=m.adjacentNoneTextNode(q),A=r[0],r=r[1],A?(v.moveToElementText(A),v.collapse(!1)):v.moveToElementText(w),v.setEndPoint(C,p),K=v.text.length-r,!1;l=A;return!0});else{var q=
w;var K=0}d||1!=q.nodeType||K!=q.childNodes.length||(d=q.nextSibling)&&3==d.nodeType&&(q=d,K=0);return[q,K]},setEndPoint:function(p,d,v){p=p.duplicate();var C;if(3!=d.nodeType)if(0<v){if(C=d.childNodes[v-1])if(3==C.nodeType)d=C,v=C.length;else if(C.nextSibling&&3==C.nextSibling.nodeType)d=C.nextSibling,v=0;else{p.moveToElementText(C.nextSibling?C:d);var w=C.parentNode;C=w.insertBefore(C.ownerDocument.createTextNode(" "),C.nextSibling);p.collapse(!1);w.removeChild(C)}}else p.moveToElementText(d),p.collapse(!0);
3==d.nodeType&&(C=m.adjacentNoneTextNode(d),w=C[0],C=C[1],w?(p.moveToElementText(w),p.collapse(!1),"inherit"!=w.contentEditable&&C++):(p.moveToElementText(d.parentNode),p.collapse(!0),p.move("character",1),p.move("character",-1)),v+=C,0<v&&p.move("character",v)!=v&&console.error("Error when moving!"));return p},decomposeTextRange:function(p){var d=n.getEndPoint(p),v=d[0],C=d[1],w=d[0];d=d[1];p.htmlText.length&&(p.htmlText==p.text?d=C+p.text.length:(d=n.getEndPoint(p,!0),w=d[0],d=d[1]));return[v,C,
w,d]},setRange:function(p,d,v,C,w,l){d=n.setEndPoint(p,d,v);p.setEndPoint("StartToStart",d);if(!l)var q=n.setEndPoint(p,C,w);p.setEndPoint("EndToEnd",q||d);return p}},f=m.W3CRange=c(null,{constructor:function(){0<arguments.length?(this.setStart(arguments[0][0],arguments[0][1]),this.setEnd(arguments[0][2],arguments[0][3])):(this.startContainer=this.commonAncestorContainer=null,this.startOffset=0,this.endContainer=null,this.endOffset=0,this.collapsed=!0)},_updateInternal:function(){this.commonAncestorContainer=
this.startContainer!==this.endContainer?m.getCommonAncestor(this.startContainer,this.endContainer):this.startContainer;this.collapsed=this.startContainer===this.endContainer&&this.startOffset==this.endOffset},setStart:function(p,d){d=parseInt(d);if(this.startContainer!==p||this.startOffset!=d)delete this._cachedBookmark,this.startContainer=p,this.startOffset=d,this.endContainer?this._updateInternal():this.setEnd(p,d)},setEnd:function(p,d){d=parseInt(d);if(this.endContainer!==p||this.endOffset!=d)delete this._cachedBookmark,
this.endContainer=p,this.endOffset=d,this.startContainer?this._updateInternal():this.setStart(p,d)},setStartAfter:function(p,d){this._setPoint("setStart",p,d,1)},setStartBefore:function(p,d){this._setPoint("setStart",p,d,0)},setEndAfter:function(p,d){this._setPoint("setEnd",p,d,1)},setEndBefore:function(p,d){this._setPoint("setEnd",p,d,0)},_setPoint:function(p,d,v,C){v=m.getIndex(d,d.parentNode).o;this[p](d.parentNode,v.pop()+C)},_getIERange:function(){var p=(this._body||this.endContainer.ownerDocument.body).createTextRange();
n.setRange(p,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return p},getBookmark:function(){this._getIERange();return this._cachedBookmark},_select:function(){this._getIERange().select()},deleteContents:function(){var p=this.startContainer,d=this._getIERange();3!==p.nodeType||this.startOffset||this.setStartBefore(p);d.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=!0},cloneRange:function(){var p=new f([this.startContainer,
this.startOffset,this.endContainer,this.endOffset]);p._body=this._body;return p},detach:function(){this.startContainer=this.commonAncestorContainer=this._body=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=!0}});k.setObject("dijit.range",m);return m})},"dijit/_editor/html":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(F,c,k){var m={};c.setObject("dijit._editor.html",m);var n=m.escapeXml=function(f,p){f=f.replace(/&/gm,"\x26amp;").replace(/</gm,
"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");p||(f=f.replace(/'/gm,"\x26#39;"));return f};m.getNodeHtml=function(f){var p=[];m.getNodeHtmlHelper(f,p);return p.join("")};m.getNodeHtmlHelper=function(f,p){switch(f.nodeType){case 1:var d=f.nodeName.toLowerCase();if(!d||"/"==d.charAt(0))return"";p.push("\x3c",d);var v=[],C={},w;if(k("dom-attributes-explicit")||k("dom-attributes-specified-flag"))for(var l=0;w=f.attributes[l++];){var q=w.name;"_dj"===q.substr(0,3)||k("dom-attributes-specified-flag")&&
!w.specified||q in C||(w=w.value,("src"==q||"href"==q)&&f.getAttribute("_djrealurl")&&(w=f.getAttribute("_djrealurl")),8===k("ie")&&"style"===q&&(w=w.replace("HEIGHT:","height:").replace("WIDTH:","width:")),v.push([q,w]),C[q]=w)}else{var K=(/^input$|^img$/i.test(f.nodeName)?f:f.cloneNode(!1)).outerHTML;C=K.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi);K=K.substr(0,K.indexOf("\x3e"));F.forEach(C,function(A){if(A){var r=A.indexOf("\x3d");if(0<r&&(A=A.substring(0,r),"_dj"!=A.substr(0,3)))if("src"!=A&&"href"!=
A||!f.getAttribute("_djrealurl")){switch(A){case "style":var t=f.style.cssText.toLowerCase();break;case "class":t=f.className;break;case "width":if("img"===d){(r=/width=(\S+)/i.exec(K))&&(t=r[1]);break}case "height":if("img"===d){(r=/height=(\S+)/i.exec(K))&&(t=r[1]);break}default:t=f.getAttribute(A)}null!=t&&v.push([A,t.toString()])}else v.push([A,f.getAttribute("_djrealurl")])}},this)}v.sort(function(A,r){return A[0]<r[0]?-1:A[0]==r[0]?0:1});for(C=0;w=v[C++];)p.push(" ",w[0],'\x3d"',"string"===
typeof w[1]?n(w[1],!0):w[1],'"');switch(d){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":p.push(" /\x3e");break;case "script":p.push("\x3e",f.innerHTML,"\x3c/",d,"\x3e");break;default:p.push("\x3e"),f.hasChildNodes()&&m.getChildrenHtmlHelper(f,p),p.push("\x3c/",d,"\x3e")}break;case 4:case 3:p.push(n(f.nodeValue,!0));break;case 8:p.push("\x3c!--",n(f.nodeValue,!0),"--\x3e");break;default:p.push("\x3c!-- Element not recognized - Type: ",f.nodeType," Name: ",
f.nodeName,"--\x3e")}};m.getChildrenHtml=function(f){var p=[];m.getChildrenHtmlHelper(f,p);return p.join("")};m.getChildrenHtmlHelper=function(f,p){if(f)for(var d=f.childNodes||f,v=!k("ie")||d!==f,C,w=0;C=d[w++];)v&&C.parentNode!=f||m.getNodeHtmlHelper(C,p)};return m})},"dijit/_editor/plugins/LinkDialog":function(){define("require dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/query dojo/string ../_Plugin ../../form/DropDownButton ../range".split(" "),
function(F,c,k,m,n,f,p,d,v,C,w,l,q){var K=k("dijit._editor.plugins.LinkDialog",w,{allowUnsafeHtml:!1,linkFilter:[[/</g,"\x26lt;"]],buttonClass:l,useDefaultCommand:!1,urlRegExp:"((https?|ftps?|file)\\://|./|../|/|)(/[a-zA-Z]{1,1}:/|)(((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)*(?:[a-zA-Z](?:[-\\da-zA-Z]{0,80}[\\da-zA-Z])?)\\.?)|(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])|(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]|(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]|(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])|0[xX]0*[\\da-fA-F]{1,8}|([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}|([\\da-fA-F]{1,4}\\:){6}((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])))(\\:\\d+)?(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]{0,}(?:\\?[^?#\\s/]*)?(?:#.*)?)?)?",
emailRegExp:"\x3c?(mailto\\:)([!#-'*+\\-\\/-9\x3d?A-Z^-~]+[.])*[!#-'*+\\-\\/-9\x3d?A-Z^-~]+@((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)+(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)\\.?)|localhost|^[^-][a-zA-Z0-9_-]*\x3e?",htmlTemplate:'\x3ca href\x3d"${urlInput}" _djrealurl\x3d"${urlInput}" target\x3d"${targetSelect}"\x3e${textInput}\x3c/a\x3e',tag:"a",_hostRxp:/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,_userAtRxp:/^([!#-'*+\-\/-9=?A-Z^-~]+[.])*[!#-'*+\-\/-9=?A-Z^-~]+@/i,
linkDialogTemplate:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_urlInput'\x3e${url}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_urlInput' name\x3d'urlInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_textInput' name\x3d'textInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_targetSelect'\x3e${target}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cselect id\x3d'${id}_targetSelect' name\x3d'targetSelect' data-dojo-type\x3d'dijit.form.Select'\x3e\x3coption selected\x3d'selected' value\x3d'_self'\x3e${currentWindow}\x3c/option\x3e\x3coption value\x3d'_blank'\x3e${newWindow}\x3c/option\x3e\x3coption value\x3d'_top'\x3e${topWindow}\x3c/option\x3e\x3coption value\x3d'_parent'\x3e${parentWindow}\x3c/option\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
_initButton:function(){this.inherited(arguments);this.button.loadDropDown=f.hitch(this,"_loadDropDown");this._connectTagEvents()},_loadDropDown:function(r){F("dojo/i18n ../../TooltipDialog ../../registry ../../form/Button ../../form/Select ../../form/ValidationTextBox dojo/i18n!../../nls/common dojo/i18n!../nls/LinkDialog".split(" "),f.hitch(this,function(t,B,M){var I=this;this.tag="insertImage"==this.command?"img":"a";t=f.delegate(t.getLocalization("dijit","common",this.lang),t.getLocalization("dijit._editor",
"LinkDialog",this.lang));var O=this.dropDown=this.button.dropDown=new B({title:t[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:f.hitch(this,"setValue"),onOpen:function(){I._onOpenDialog();B.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(f.hitch(I,"_onCloseDialog"),0)}});t.urlRegExp=this.urlRegExp;t.id=M.getUniqueId(this.editor.id);this._uniqueId=t.id;this._setContent(O.title+"\x3cdiv style\x3d'border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'\x3e\x3c/div\x3e"+
C.substitute(this.linkDialogTemplate,t));O.startup();this._urlInput=M.byId(this._uniqueId+"_urlInput");this._textInput=M.byId(this._uniqueId+"_textInput");this._setButton=M.byId(this._uniqueId+"_setButton");this.own(M.byId(this._uniqueId+"_cancelButton").on("click",f.hitch(this.dropDown,"onCancel")));this._urlInput&&this.own(this._urlInput.on("change",f.hitch(this,"_checkAndFixInput")));this._textInput&&this.own(this._textInput.on("change",f.hitch(this,"_checkAndFixInput")));this._urlRegExp=new RegExp("^"+
this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=f.hitch(this,function(){var R=this._urlInput.get("value");return this._urlRegExp.test(R)||this._emailRegExp.test(R)});this.own(p(O.domNode,"keydown",f.hitch(this,f.hitch(this,function(R){!R||R.keyCode!=n.ENTER||R.shiftKey||R.metaKey||R.ctrlKey||R.altKey||this._setButton.get("disabled")||(O.onExecute(),O.execute(O.get("value")))}))));r()}))},_checkAndFixInput:function(){var r=this,t=this._urlInput.get("value");
this._delayedCheck&&(clearTimeout(this._delayedCheck),this._delayedCheck=null);this._delayedCheck=setTimeout(function(){var B=t,M=!1,I=!1;B&&1<B.length&&(B=f.trim(B),0!==B.indexOf("mailto:")&&(0<B.indexOf("/")?-1===B.indexOf("://")&&"/"!==B.charAt(0)&&B.indexOf("./")&&0!==B.indexOf("../")&&r._hostRxp.test(B)&&(M=!0):r._userAtRxp.test(B)&&(I=!0)));M&&r._urlInput.set("value","http://"+B);I&&r._urlInput.set("value","mailto:"+B);r._setButton.set("disabled",!r._isValid())},250)},_connectTagEvents:function(){this.editor.onLoadDeferred.then(f.hitch(this,
function(){this.own(p(this.editor.editNode,"mouseup",f.hitch(this,"_onMouseUp")));this.own(p(this.editor.editNode,"dblclick",f.hitch(this,"_onDblClick")))}))},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid()},_setContent:function(r){this.dropDown.set({parserScope:"dojo",content:r})},_checkValues:function(r){r&&r.urlInput&&(r.urlInput=r.urlInput.replace(/"/g,"\x26quot;"));!this.allowUnsafeHtml&&r&&r.textInput&&("function"===typeof this.linkFilter?r.textInput=this.linkFilter(r.textInput):
c.forEach(this.linkFilter,function(t){r.textInput=r.textInput.replace(t[0],t[1])}));return r},_createlinkEnabledImpl:function(){return!0},setValue:function(r){this._onCloseDialog();if(9>d("ie")){var t=q.getSelection(this.editor.window).getRangeAt(0).endContainer;3===t.nodeType&&(t=t.parentNode);t&&t.nodeName&&t.nodeName.toLowerCase()!==this.tag&&(t=this.editor.selection.getSelectedElement(this.tag));t&&t.nodeName&&t.nodeName.toLowerCase()===this.tag&&this.editor.queryCommandEnabled("unlink")&&(this.editor.selection.selectElementChildren(t),
this.editor.execCommand("unlink"))}r=this._checkValues(r);this.editor.execCommand("inserthtml",C.substitute(this.htmlTemplate,r));v("a",this.editor.document).forEach(function(B){B.innerHTML||m.has(B,"name")||B.parentNode.removeChild(B)},this)},_onCloseDialog:function(){this.editor.focused&&this.editor.focus()},_getCurrentValues:function(r){if(r&&r.tagName.toLowerCase()===this.tag){var t=r.getAttribute("_djrealurl")||r.getAttribute("href");var B=r.getAttribute("target")||"_self";var M=r.textContent||
r.innerText;this.editor.selection.selectElement(r,!0)}else M=this.editor.selection.getSelectedText();return{urlInput:t||"",textInput:M||"",targetSelect:B||""}},_onOpenDialog:function(){if(d("ie")){var r=q.getSelection(this.editor.window);if(r.rangeCount){var t=r.getRangeAt(0);var B=t.endContainer;3===B.nodeType&&(B=B.parentNode);B&&B.nodeName&&B.nodeName.toLowerCase()!==this.tag&&(B=this.editor.selection.getSelectedElement(this.tag));if(!B||B.nodeName&&B.nodeName.toLowerCase()!==this.tag)(r=this.editor.selection.getAncestorElement(this.tag))&&
r.nodeName&&r.nodeName.toLowerCase()==this.tag?(B=r,this.editor.selection.selectElement(B)):t.startContainer===t.endContainer&&(r=t.startContainer.firstChild)&&r.nodeName&&r.nodeName.toLowerCase()==this.tag&&(B=r,this.editor.selection.selectElement(B))}}else B=this.editor.selection.getAncestorElement(this.tag);this.dropDown.reset();this._setButton.set("disabled",!0);this.dropDown.set("value",this._getCurrentValues(B))},_onDblClick:function(r){if(r&&r.target&&(r=r.target,(r.tagName?r.tagName.toLowerCase():
"")===this.tag&&m.get(r,"href"))){var t=this.editor;this.editor.selection.selectElement(r);t.onDisplayChanged();t._updateTimer&&(t._updateTimer.remove(),delete t._updateTimer);t.onNormalizedDisplayChanged();var B=this.button;setTimeout(function(){B.set("disabled",!1);B.loadAndOpenDropDown().then(function(){B.dropDown.focus&&B.dropDown.focus()})},10)}},_onMouseUp:function(){if(d("ff")){var r=this.editor.selection.getAncestorElement(this.tag);if(r){var t=q.getSelection(this.editor.window).getRangeAt(0);
if(t.collapsed&&r.childNodes.length){var B=t.cloneRange();B.selectNodeContents(r.childNodes[r.childNodes.length-1]);B.setStart(r.childNodes[0],0);1!==t.compareBoundaryPoints(B.START_TO_START,B)?t.setStartBefore(r):-1!==t.compareBoundaryPoints(B.END_TO_START,B)&&t.setStartAfter(r)}}}}}),A=k("dijit._editor.plugins.ImgLinkDialog",[K],{linkDialogTemplate:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_urlInput'\x3e${url}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput dojoType\x3d'dijit.form.ValidationTextBox' regExp\x3d'${urlRegExp}' required\x3d'true' id\x3d'${id}_urlInput' name\x3d'urlInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'false' id\x3d'${id}_textInput' name\x3d'textInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
htmlTemplate:'\x3cimg src\x3d"${urlInput}" _djrealurl\x3d"${urlInput}" alt\x3d"${textInput}" /\x3e',tag:"img",_getCurrentValues:function(r){if(r&&r.tagName.toLowerCase()===this.tag){var t=r.getAttribute("_djrealurl")||r.getAttribute("src");var B=r.getAttribute("alt");this.editor.selection.selectElement(r,!0)}else B=this.editor.selection.getSelectedText();return{urlInput:t||"",textInput:B||""}},_isValid:function(){return this._urlInput.isValid()},_connectTagEvents:function(){this.inherited(arguments);
this.editor.onLoadDeferred.then(f.hitch(this,function(){this.own(p(this.editor.editNode,"mousedown",f.hitch(this,"_selectTag")))}))},_selectTag:function(r){r&&r.target&&(r=r.target,(r.tagName?r.tagName.toLowerCase():"")===this.tag&&this.editor.selection.selectElement(r))},_checkValues:function(r){r&&r.urlInput&&(r.urlInput=r.urlInput.replace(/"/g,"\x26quot;"));r&&r.textInput&&(r.textInput=r.textInput.replace(/"/g,"\x26quot;"));return r},_onDblClick:function(r){if(r&&r.target&&(r=r.target,(r.tagName?
r.tagName.toLowerCase():"")===this.tag&&m.get(r,"src"))){var t=this.editor;this.editor.selection.selectElement(r);t.onDisplayChanged();t._updateTimer&&(t._updateTimer.remove(),delete t._updateTimer);t.onNormalizedDisplayChanged();var B=this.button;setTimeout(function(){B.set("disabled",!1);B.loadAndOpenDropDown().then(function(){B.dropDown.focus&&B.dropDown.focus()})},10)}}});w.registry.createLink=function(r){var t={command:"createLink",allowUnsafeHtml:"allowUnsafeHtml"in r?r.allowUnsafeHtml:!1};
"linkFilter"in r&&(t.linkFilter=r.linkFilter);return new K(t)};w.registry.insertImage=function(){return new A({command:"insertImage"})};K.ImgLinkDialog=A;return K})},"dijit/_editor/plugins/TextColor":function(){define("require dojo/colors dojo/_base/declare dojo/_base/lang ../_Plugin ../../form/DropDownButton".split(" "),function(F,c,k,m,n,f){var p=k("dijit._editor.plugins.TextColor",n,{buttonClass:f,colorPicker:"dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command=this.name;
this.inherited(arguments);var d=this;this.button.loadDropDown=function(v){function C(w){d.button.dropDown=new w({dir:d.editor.dir,ownerDocument:d.editor.ownerDocument,value:d.value,onChange:function(l){d.editor.execCommand(d.command,l)},onExecute:function(){d.editor.execCommand(d.command,this.get("value"))}});v()}"string"==typeof d.colorPicker?F([d.colorPicker],C):C(d.colorPicker)}},updateState:function(){var d=this.editor,v=this.command;if(d&&d.isLoaded&&v.length){if(this.button){var C=this.get("disabled");
this.button.set("disabled",C);if(C)return;try{var w=d.queryCommandValue(v)||""}catch(l){w=""}}""==w&&(w="#000000");"transparent"==w&&(w="#ffffff");"string"==typeof w?-1<w.indexOf("rgb")&&(w=c.fromRgb(w).toHex()):(w=((w&255)<<16|w&65280|(w&16711680)>>>16).toString(16),w="#000000".slice(0,7-w.length)+w);this.value=w;(d=this.button.dropDown)&&d.get&&w!==d.get("value")&&d.set("value",w,!1)}}});n.registry.foreColor=function(d){return new p(d)};n.registry.hiliteColor=function(d){return new p(d)};return p})},
"esri/dijit/editing/AttachmentEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/_base/array dojo/_base/kernel dojo/has dojo/query dojo/io-query dojo/dom-attr dijit/_Widget dijit/_Templated dijit/ProgressBar ../../kernel ../../lang ../../domUtils dojo/text!./templates/AttachmentEditor.html dojo/i18n!../../nls/jsapi dojo/NodeList-dom".split(" "),function(F,c,k,m,n,f,p,d,v,C,w,l,q,K,A,r,t){F=F([C,w],{declaredClass:"esri.dijit.editing.AttachmentEditor",widgetsInTemplate:!0,
templateString:r,_listHtml:"\x3cspan id\x3d'node_${oid}_${attid}' style\x3d'display: flex;'\x3e\x3ca href\x3d'${href}' target\x3d'_blank'\x3e${name}\x3c/a\x3e",_deleteBtnHtml:"\x3cspan style\x3d'cursor:pointer;color:red;font-weight:bold;padding:0 2px;' class\x3d'deleteAttachment' id\x3d'${attid}');'\x3eX\x3c/span\x3e",_endHtml:"\x3cbr/\x3e\x3c/span\x3e",_aeConnects:[],_layerEditingCapChecked:{},_layerEditingCap:{},constructor:function(B,M){c.mixin(this,t.widgets.attachmentEditor)},startup:function(){this.inherited(arguments);
this._uploadField_connect=k.connect(this._uploadField,"onchange",this,function(){0<this._uploadField.value.length&&this._addAttachment()});this._uploadFieldFocus_connect=k.connect(this._uploadField,"onfocus",c.hitch(this,function(B){A.hide(this._attachmentError)}))},destroy:function(){m.forEach(this._aeConnects,k.disconnect);k.disconnect(this._uploadField_connect);k.disconnect(this._uploadFieldFocus_connect);this.inherited(arguments)},showAttachments:function(B,M){this._attachmentList.innerHTML=this.NLS_none;
this._uploadField.value="";m.forEach(this.domNode.children,function(I,O){A.show(I)});A.hide(this._attachmentError);B&&(this._featureLayer=B.getLayer()||M)&&("esri.layers.FeatureLayer"===this._featureLayer.declaredClass&&this._featureLayer.getEditCapabilities?(this._currentLayerId=this._featureLayer.id,this._layerEditingCapChecked[this._currentLayerId]||(this._layerEditingCap[this._currentLayerId]=this._featureLayer.getEditCapabilities(),this._layerEditingCapChecked[this._currentLayerId]=!0),this._featureCanUpdate=
this._featureLayer.getEditCapabilities({feature:B}).canUpdate,this._oid=B.attributes[this._featureLayer.objectIdField],this._getAttachments(B)):M&&M.getEditCapabilities()||(A.hide(this._uploadForm),m.forEach(this.domNode.children,function(I,O){A.hide(I)})))},_getAttachments:function(B){this._featureLayer&&this._featureLayer.queryAttachmentInfos&&this._featureLayer.queryAttachmentInfos(this._oid,c.hitch(this,"_onQueryAttachmentInfosComplete"))},_addAttachment:function(){A.hide(this._attachmentError);
this._featureLayer&&this._featureLayer.addAttachment?(A.show(this._attachmentProgress),this._featureLayer.addAttachment(this._oid,this._uploadForm,c.hitch(this,"_onAddAttachmentComplete"),c.hitch(this,"_onAddAttachmentError"))):this._tempUpload=this._uploadForm},_chainAttachment:function(B,M){this._tempUpload&&(A.show(this._attachmentProgress),M.addAttachment(B,this._tempUpload,c.hitch(this,"_onAddAttachmentComplete"),c.hitch(this,"_onAddAttachmentError")));this._tempUpload=null},_deleteAttachment:function(B,
M){A.show(this._attachmentProgress);this._featureLayer.deleteAttachments(B,[M],c.hitch(this,"_onDeleteAttachmentComplete"))},_onQueryAttachmentInfosComplete:function(B){var M=this._listHtml+this._deleteBtnHtml+this._endHtml;this._uploadForm.style.display="block";!this._featureCanUpdate&&this._layerEditingCap[this._currentLayerId].canUpdate||!this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate?(M=this._listHtml+this._endHtml,this._uploadForm.style.display=
"none"):this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate&&(M=this._listHtml+this._endHtml);var I=this._attachmentList;B=m.map(B,c.hitch(this,function(O){return K.substitute({href:O.url,name:O.name,oid:O.objectId,attid:O.id},M)}));I.innerHTML=B.join("")||this.NLS_none;this._updateConnects()},_onAddAttachmentComplete:function(B){A.hide(this._attachmentProgress.domNode);var M=this._attachmentList,I=this._uploadField,O=I.value,R=O.lastIndexOf("\\");
-1<R&&(O=O.substring(R+1,O.length));O=O.replace(/ /g,"_");R=d.objectToQuery({gdbVersion:this._featureLayer.gdbVersion,token:this._featureLayer._getToken()});var P=this._listHtml+this._deleteBtnHtml+this._endHtml;this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate&&(P=this._listHtml+this._endHtml);B=K.substitute({href:this._featureLayer._url.path+"/"+B.objectId+"/attachments/"+B.attachmentId+(R?"?"+R:""),name:O,oid:B.objectId,attid:B.attachmentId},
P);M.innerHTML=M.innerHTML==this.NLS_none?B:M.innerHTML+B;this._updateConnects();I.value=""},_onAddAttachmentError:function(B){A.hide(this._attachmentProgress.domNode);if(B){var M=this.NLS_error,I=this._attachmentError;K.isDefined(B.code)&&400===B.code&&(M=this.NLS_fileNotSupported);v.set(I,"innerHTML",M);A.show(I)}},_onDeleteAttachmentComplete:function(B){A.hide(this._attachmentProgress.domNode);var M=this._attachmentList;m.every(B,function(I){return I.success})&&(n.query("#node_"+B[0].objectId+
"_"+B[0].attachmentId).orphan(),M.children&&M.children.length||(M.innerHTML=this.NLS_none))},_updateConnects:function(){m.forEach(this._aeConnects,k.disconnect);n.query(".deleteAttachment").forEach(function(B){this._aeConnects.push(k.connect(B,"onclick",c.hitch(this,"_deleteAttachment",this._oid,B.id)))},this)}});f("extend-esri")&&c.setObject("dijit.editing.AttachmentEditor",F,q);return F})},"dijit/ProgressBar":function(){define("require dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/number ./_Widget ./_TemplatedMixin dojo/text!./templates/ProgressBar.html".split(" "),
function(F,c,k,m,n,f,p,d){return c("dijit.ProgressBar",[f,p],{progress:"0",value:"",maximum:100,places:0,indeterminate:!1,label:"",name:"",templateString:d,_indeterminateHighContrastImagePath:F.toUrl("./themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);this.params&&"value"in this.params||(this.value=this.indeterminate?Infinity:this.progress)},buildRendering:function(){this.inherited(arguments);this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());
this.update()},_setDirAttr:function(v){var C="rtl"==v.toLowerCase();k.toggle(this.domNode,"dijitProgressBarRtl",C);k.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&C);this.inherited(arguments)},update:function(v){m.mixin(this,v||{});v=this.internalProgress;var C=this.domNode,w=1;this.indeterminate?C.removeAttribute("aria-valuenow"):(-1!=String(this.progress).indexOf("%")?(w=Math.min(parseFloat(this.progress)/100,1),this.progress=w*this.maximum):(this.progress=Math.min(this.progress,
this.maximum),w=this.maximum?this.progress/this.maximum:0),C.setAttribute("aria-valuenow",this.progress));C.setAttribute("aria-labelledby",this.labelNode.id);C.setAttribute("aria-valuemin",0);C.setAttribute("aria-valuemax",this.maximum);this.labelNode.innerHTML=this.report(w);k.toggle(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);k.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&!this.isLeftToRight());v.style.width=100*w+"%";this.onChange()},_setValueAttr:function(v){this._set("value",
v);Infinity==v?this.update({indeterminate:!0}):this.update({indeterminate:!1,progress:v})},_setLabelAttr:function(v){this._set("label",v);this.update()},_setIndeterminateAttr:function(v){this._set("indeterminate",v);this.update()},report:function(v){return this.label?this.label:this.indeterminate?"\x26#160;":n.format(v,{type:"percent",places:this.places,locale:this.lang})},onChange:function(){}})})},"esri/dijit/editing/Util":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/has","../../kernel"],
function(F,c,k,m){var n={};n={findFeatures:function(f,p,d){var v=p.objectIdField;p=c.filter(p.graphics,function(C){return c.some(f,function(w){return C.attributes[v]===w.objectId})});if(d)d(p);else return p},getSelection:function(f){var p=[];c.forEach(f,function(d){d=d.getSelectedFeatures();c.forEach(d,function(v){p.push(v)})});return p},sortFeaturesById:function(f,p){var d=c.map(f,function(v){return v.featureLayer});p.sort(function(v,C){var w=v.getLayer(),l=C.getLayer();if(!w)return-1;if(!l)return 1;
var q=c.indexOf(d,w);l=c.indexOf(d,l);q-=l;q||(w=w.objectIdField,q=v.attributes[w]-C.attributes[w]);return q});return p}};k("extend-esri")&&F.setObject("dijit.editing.Util.LayerHelper",n,m);return n})},"dojox/date/islamic":function(){define(["dojox/main","dojo/_base/lang","dojo/date","./islamic/Date"],function(F,c,k,m){var n=c.getObject("date.islamic",!0,F);n.getDaysInMonth=function(f){return f.getDaysInIslamicMonth(f.getMonth(),f.getFullYear())};n.compare=function(f,p,d){f instanceof m&&(f=f.toGregorian());
p instanceof m&&(p=p.toGregorian());return k.compare.apply(null,arguments)};n.add=function(f,p,d){var v=new m(f);switch(p){case "day":v.setDate(f.getDate()+d);break;case "weekday":var C=f.getDay();if(5>C+d&&0<C+d)v.setDate(f.getDate()+d);else{var w=p=0;5==C?(C=4,w=0<d?-1:1):6==C&&(C=4,w=0<d?-2:2);C=0<d?5-C-1:-C;var l=d-C,q=parseInt(l/5);0!=l%5&&(p=0<d?2:-2);p=p+7*q+l%5+C;v.setDate(f.getDate()+p+w)}break;case "year":v.setFullYear(f.getFullYear()+d);break;case "week":d*=7;v.setDate(f.getDate()+d);break;
case "month":f=f.getMonth();v.setMonth(f+d);break;case "hour":v.setHours(f.getHours()+d);break;case "minute":v._addMinutes(d);break;case "second":v._addSeconds(d);break;case "millisecond":v._addMilliseconds(d)}return v};n.difference=function(f,p,d){p=p||new m;d=d||"day";var v=p.getFullYear()-f.getFullYear(),C=1;switch(d){case "weekday":v=Math.round(n.difference(f,p,"day"));C=parseInt(n.difference(f,p,"week"));if(0==v%7)v=5*C;else{d=0;var w=f.getDay(),l=p.getDay();C=parseInt(v/7);p=v%7;f=new m(f);
f.setDate(f.getDate()+7*C);f=f.getDay();if(0<v)switch(!0){case 5==w:d=-1;break;case 6==w:d=0;break;case 5==l:d=-1;break;case 6==l:d=-2;break;case 5<f+p:d=-2}else if(0>v)switch(!0){case 5==w:d=0;break;case 6==w:d=1;break;case 5==l:d=2;break;case 6==l:d=1;break;case 0>f+p:d=2}v=v+d-2*C}C=v;break;case "year":C=v;break;case "month":d=p.toGregorian()>f.toGregorian()?p:f;w=p.toGregorian()>f.toGregorian()?f:p;C=d.getMonth();l=w.getMonth();if(0==v)C=d.getMonth()-w.getMonth();else for(C=12-l+C,v=w.getFullYear()+
1,d=d.getFullYear(),v;v<d;v++)C+=12;p.toGregorian()<f.toGregorian()&&(C=-C);break;case "week":C=parseInt(n.difference(f,p,"day")/7);break;case "day":C/=24;case "hour":C/=60;case "minute":C/=60;case "second":C/=1E3;case "millisecond":C*=p.toGregorian().getTime()-f.toGregorian().getTime()}return Math.round(C)};return n})},"dojox/date/islamic/Date":function(){define(["dojo/_base/lang","dojo/_base/declare","dojo/date"],function(F,c,k){var m=c("dojox.date.islamic.Date",null,{_date:0,_month:0,_year:0,_hours:0,
_minutes:0,_seconds:0,_milliseconds:0,_day:0,_GREGORIAN_EPOCH:1721425.5,_ISLAMIC_EPOCH:1948439.5,constructor:function(){var n=arguments.length;n?1==n?(n=arguments[0],"number"==typeof n&&(n=new Date(n)),n instanceof Date?this.fromGregorian(n):""==n?this._date=new Date(""):(this._year=n._year,this._month=n._month,this._date=n._date,this._hours=n._hours,this._minutes=n._minutes,this._seconds=n._seconds,this._milliseconds=n._milliseconds)):3<=n&&(this._year+=arguments[0],this._month+=arguments[1],this._date+=
arguments[2],this._hours+=arguments[3]||0,this._minutes+=arguments[4]||0,this._seconds+=arguments[5]||0,this._milliseconds+=arguments[6]||0):this.fromGregorian(new Date)},getDate:function(){return this._date},getMonth:function(){return this._month},getFullYear:function(){return this._year},getDay:function(){return this.toGregorian().getDay()},getHours:function(){return this._hours},getMinutes:function(){return this._minutes},getSeconds:function(){return this._seconds},getMilliseconds:function(){return this._milliseconds},
setDate:function(n){n=parseInt(n);if(!(0<n&&n<=this.getDaysInIslamicMonth(this._month,this._year))){var f;if(0<n)for(f=this.getDaysInIslamicMonth(this._month,this._year);n>f;n-=f,f=this.getDaysInIslamicMonth(this._month,this._year))this._month++,12<=this._month&&(this._year++,this._month-=12);else for(f=this.getDaysInIslamicMonth(0<=this._month-1?this._month-1:11,0<=this._month-1?this._year:this._year-1);0>=n;f=this.getDaysInIslamicMonth(0<=this._month-1?this._month-1:11,0<=this._month-1?this._year:
this._year-1))this._month--,0>this._month&&(this._year--,this._month+=12),n+=f}this._date=n;return this},setFullYear:function(n){this._year=+n},setMonth:function(n){this._year+=Math.floor(n/12);this._month=0<n?Math.floor(n%12):Math.floor((n%12+12)%12)},setHours:function(){var n=arguments.length,f=0;1<=n&&(f=parseInt(arguments[0]));2<=n&&(this._minutes=parseInt(arguments[1]));3<=n&&(this._seconds=parseInt(arguments[2]));4==n&&(this._milliseconds=parseInt(arguments[3]));for(;24<=f;)this._date++,n=this.getDaysInIslamicMonth(this._month,
this._year),this._date>n&&(this._month++,12<=this._month&&(this._year++,this._month-=12),this._date-=n),f-=24;this._hours=f},_addMinutes:function(n){n+=this._minutes;this.setMinutes(n);this.setHours(this._hours+parseInt(n/60));return this},_addSeconds:function(n){n+=this._seconds;this.setSeconds(n);this._addMinutes(parseInt(n/60));return this},_addMilliseconds:function(n){n+=this._milliseconds;this.setMilliseconds(n);this._addSeconds(parseInt(n/1E3));return this},setMinutes:function(n){this._minutes=
n%60;return this},setSeconds:function(n){this._seconds=n%60;return this},setMilliseconds:function(n){this._milliseconds=n%1E3;return this},toString:function(){if(isNaN(this._date))return"Invalidate Date";var n=new Date;n.setHours(this._hours);n.setMinutes(this._minutes);n.setSeconds(this._seconds);n.setMilliseconds(this._milliseconds);return this._month+" "+this._date+" "+this._year+" "+n.toTimeString()},toGregorian:function(){var n=this._year;n=Math.floor(this._date+Math.ceil(29.5*this._month)+354*
(n-1)+Math.floor((3+11*n)/30)+this._ISLAMIC_EPOCH-1-.5)+.5;var f=n-this._GREGORIAN_EPOCH,p=Math.floor(f/146097),d=this._mod(f,146097);f=Math.floor(d/36524);var v=this._mod(d,36524);d=Math.floor(v/1461);v=this._mod(v,1461);v=Math.floor(v/365);p=400*p+100*f+4*d+v;4!=f&&4!=v&&p++;f=n-(this._GREGORIAN_EPOCH+365*(p-1)+Math.floor((p-1)/4)-Math.floor((p-1)/100)+Math.floor((p-1)/400));d=this._GREGORIAN_EPOCH-1+365*(p-1)+Math.floor((p-1)/4)-Math.floor((p-1)/100)+Math.floor((p-1)/400)+Math.floor(739/12+(k.isLeapYear(new Date(p,
3,1))?-1:-2)+1);d=n<d?0:k.isLeapYear(new Date(p,3,1))?1:2;f=Math.floor((12*(f+d)+373)/367);d=this._GREGORIAN_EPOCH-1+365*(p-1)+Math.floor((p-1)/4)-Math.floor((p-1)/100)+Math.floor((p-1)/400)+Math.floor((367*f-362)/12+(2>=f?0:k.isLeapYear(new Date(p,f-1,1))?-1:-2)+1);return new Date(p,f-1,n-d+1,this._hours,this._minutes,this._seconds,this._milliseconds)},fromGregorian:function(n){n=new Date(n);var f=n.getFullYear(),p=n.getMonth(),d=n.getDate();f=this._GREGORIAN_EPOCH-1+365*(f-1)+Math.floor((f-1)/4)+
-Math.floor((f-1)/100)+Math.floor((f-1)/400)+Math.floor((367*(p+1)-362)/12+(2>=p+1?0:k.isLeapYear(n)?-1:-2)+d);f=Math.floor(f)+.5;f-=this._ISLAMIC_EPOCH;p=Math.floor((30*f+10646)/10631);d=Math.ceil((f-29-this._yearStart(p))/29.5);d=Math.min(d,11);this._date=Math.ceil(f-this._monthStart(p,d))+1;this._month=d;this._year=p;this._hours=n.getHours();this._minutes=n.getMinutes();this._seconds=n.getSeconds();this._milliseconds=n.getMilliseconds();this._day=n.getDay();return this},valueOf:function(){return this.toGregorian().valueOf()},
_yearStart:function(n){return 354*(n-1)+Math.floor((3+11*n)/30)},_monthStart:function(n,f){return Math.ceil(29.5*f)+354*(n-1)+Math.floor((3+11*n)/30)},_civilLeapYear:function(n){return 11>(14+11*n)%30},getDaysInIslamicMonth:function(n,f){var p=0;p=29+(n+1)%2;11==n&&this._civilLeapYear(f)&&p++;return p},_mod:function(n,f){return n-f*Math.floor(n/f)}});m.getDaysInIslamicMonth=function(n){return(new m).getDaysInIslamicMonth(n.getMonth(),n.getFullYear())};return m})},"dojox/date/islamic/locale":function(){define("dojox/main dojo/_base/lang dojo/_base/array dojo/date dojo/i18n dojo/regexp dojo/string ./Date dojo/i18n!dojo/cldr/nls/islamic".split(" "),
function(F,c,k,m,n,f,p,d,v){function C(A,r,t,B,M){return M.replace(/([a-z])\1*/ig,function(I){var O=I.charAt(0);I=I.length;var R=["abbr","wide","narrow"];switch(O){case "G":var P=r.eraAbbr[0];break;case "y":P=String(A.getFullYear());break;case "M":P=A.getMonth();if(3>I){P+=1;var G=!0}else O=["months-format",R[I-3]].join("-"),P=r[O][P];break;case "d":P=A.getDate(!0);G=!0;break;case "E":P=A.getDay();3>I?(P+=1,G=!0):(O=["days-format",R[I-3]].join("-"),P=r[O][P]);break;case "a":P=12>A.getHours()?"am":
"pm";P=r["dayPeriods-format-wide-"+P];break;case "h":case "H":case "K":case "k":G=A.getHours();switch(O){case "h":P=G%12||12;break;case "H":P=G;break;case "K":P=G%12;break;case "k":P=G||24}G=!0;break;case "m":P=A.getMinutes();G=!0;break;case "s":P=A.getSeconds();G=!0;break;case "S":P=Math.round(A.getMilliseconds()*Math.pow(10,I-3));G=!0;break;case "z":if(P=m.getTimezoneName(A.toGregorian()))break;I=4;case "Z":P=A.toGregorian().getTimezoneOffset();P=[0>=P?"+":"-",p.pad(Math.floor(Math.abs(P)/60),2),
p.pad(Math.abs(P)%60,2)];4==I&&(P.splice(0,0,"GMT"),P.splice(3,0,":"));P=P.join("");break;default:throw Error("dojox.date.islamic.locale.formatPattern: invalid pattern char: "+M);}G&&(P=p.pad(P,I));return P})}function w(A,r,t,B){var M=function(R){return R};r=r||M;t=t||M;B=B||M;var I=A.match(/(''|[^'])+/g),O="'"==A.charAt(0);k.forEach(I,function(R,P){R?(I[P]=(O?t:r)(R),O=!O):I[P]=""});return B(I.join(""))}function l(A,r,t,B){B=f.escapeString(B);n.normalizeLocale(t.locale);return B.replace(/([a-z])\1*/ig,
function(M){var I=M.charAt(0);var O=M.length,R="";t.strict?1<O&&(R="0{"+(O-1)+"}"):R="0?";switch(I){case "y":I="\\d+";break;case "M":I=2<O?"\\S+ ?\\S+":R+"[1-9]|1[0-2]";break;case "d":I="[12]\\d|"+R+"[1-9]|3[01]";break;case "E":I="\\S+";break;case "h":I=R+"[1-9]|1[0-2]";break;case "k":I=R+"\\d|1[01]";break;case "H":I=R+"\\d|1\\d|2[0-3]";break;case "K":I=R+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":I=R+"\\d|[0-5]\\d";break;case "S":I="\\d{"+O+"}";break;case "a":O=t.am||r["dayPeriods-format-wide-am"];
R=t.pm||r["dayPeriods-format-wide-pm"];t.strict?I=O+"|"+R:(I=O+"|"+R,O!=O.toLowerCase()&&(I+="|"+O.toLowerCase()),R!=R.toLowerCase()&&(I+="|"+R.toLowerCase()));break;default:I=".*"}A&&A.push(M);return"("+I+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var q=c.getObject("date.islamic.locale",!0,F);q.format=function(A,r){r=r||{};var t=n.normalizeLocale(r.locale),B=r.formatLength||"short",M=q._getIslamicBundle(t),I=[];t=c.hitch(this,C,A,M,t,r.fullYear);if("year"==r.selector)return A.getFullYear();"time"!=r.selector&&
(A=r.datePattern||M["dateFormat-"+B])&&I.push(w(A,t));"date"!=r.selector&&(r=r.timePattern||M["timeFormat-"+B])&&I.push(w(r,t));return I.join(" ")};q.regexp=function(A){return q._parseInfo(A).regexp};q._parseInfo=function(A){A=A||{};var r=n.normalizeLocale(A.locale);r=q._getIslamicBundle(r);var t=A.formatLength||"short",B=A.datePattern||r["dateFormat-"+t];t=A.timePattern||r["timeFormat-"+t];var M=[];return{regexp:w("date"==A.selector?B:"time"==A.selector?t:"undefined"==typeof t?B:B+" "+t,c.hitch(this,
l,M,r,A)),tokens:M,bundle:r}};q.parse=function(A,r){A=A.replace(/[\u200E\u200F\u202A\u202E]/g,"");r||(r={});var t=q._parseInfo(r),B=t.tokens,M=t.bundle;t=t.regexp.replace(/[\u200E\u200F\u202A\u202E]/g,"");A=(new RegExp("^"+t+"$")).exec(A);n.normalizeLocale(r.locale);if(!A)return null;var I=[1389,0,1,0,0,0,0],O="",R=["abbr","wide","narrow"];k.every(A,function(P,G){if(!G)return!0;G=B[G-1];var U=G.length;switch(G.charAt(0)){case "y":I[0]=Number(P);break;case "M":if(2<U){if(G=M["months-format-"+R[U-3]].concat(),
r.strict||(P=P.replace(".","").toLowerCase(),G=k.map(G,function(W){return W?W.replace(".","").toLowerCase():W})),P=k.indexOf(G,P),-1==P)return!1}else P--;I[1]=Number(P);break;case "D":I[1]=0;case "d":I[2]=Number(P);break;case "a":G=r.am||M["dayPeriods-format-wide-am"];U=r.pm||M["dayPeriods-format-wide-pm"];if(!r.strict){var Q=/\./g;P=P.replace(Q,"").toLowerCase();G=G.replace(Q,"").toLowerCase();U=U.replace(Q,"").toLowerCase()}if(r.strict&&P!=G&&P!=U)return!1;O=P==U?"p":P==G?"a":"";break;case "K":24==
P&&(P=0);case "h":case "H":case "k":I[3]=Number(P);break;case "m":I[4]=Number(P);break;case "s":I[5]=Number(P);break;case "S":I[6]=Number(P)}return!0});A=+I[3];"p"===O&&12>A?I[3]=A+12:"a"===O&&12==A&&(I[3]=0);return new d(I[0],I[1],I[2],I[3],I[4],I[5],I[6])};var K=[];q.addCustomFormats=function(A,r){K.push({pkg:A,name:r})};q._getIslamicBundle=function(A){var r={};k.forEach(K,function(t){t=n.getLocalization(t.pkg,t.name,A);r=c.mixin(r,t)},this);return r};q.addCustomFormats("dojo.cldr","islamic");q.getNames=
function(A,r,t,B,M){B=q._getIslamicBundle(B);A=[A,t,r];if("standAlone"==t){t=A.join("-");var I=B[t];1==I[0]&&(I=void 0)}A[1]="format";return(I||B[A.join("-")]).concat()};q.weekDays=q.getNames("days","wide","format");q.months=q.getNames("months","wide","format");return q})},"widgets/ParcelDrafter/geometryUtils":function(){define("esri/geometry/Point esri/geometry/Polyline esri/geometry/Polygon esri/geometry/webMercatorUtils dojo/Deferred dojo/_base/array dojo/_base/lang esri/geometry/geometryEngine esri/SpatialReference esri/geometry/scaleUtils".split(" "),
function(F,c,k,m,n,f,p,d,v,C){var w={canProjectLocally:function(l){l=new F({x:0,y:0,spatialReference:l});return m.canProject(l,new v(4326))?!0:!1},getProjectedGeometry:function(l,q,K){var A=new n;if(m.canProject(l,q)){var r=m.project(l,q);A.resolve(r)}else K.project([l],q,function(t){r=t[0];A.resolve(r)});return A.promise},getDestinationPoint:function(l,q,K){var A=l.x*Math.PI/180,r=q*Math.PI/180;q=Math.sin(r);r=Math.cos(r);var t=.9966471893352243*Math.tan(l.y*Math.PI/180);l=1/Math.sqrt(1+t*t);var B=
t*l,M=Math.atan2(t,r);t=l*q;var I=1-t*t,O=2.7233160610984375E11*I/4.040829998465916E13,R=1+O/16384*(4096+O*(-768+O*(320-175*O))),P=O/1024*(256+O*(-128+O*(74-47*O))),G=K/(6356752.314245*R),U=0;do{O=Math.cos(2*M+G);var Q=Math.sin(G);var W=Math.cos(G);var J=P*Q*(O+P/4*(W*(-1+2*O*O)-P/6*O*(-3+4*Q*Q)*(-3+4*O*O)));var V=G;G=K/(6356752.314245*R)+J}while(1E-12<Math.abs(G-V)&&200>++U);if(200<=U)return console.log("Formula failed to converge"),null;K=B*Q-l*W*r;K=Math.atan2(B*W+l*Q*r,.9966471893352243*Math.sqrt(t*
t+K*K));I=2.0955066654848088E-4*I*(4+.003352810664775694*(4-3*I));A=(A+(Math.atan2(Q*q,l*W-B*Q*r)-.003352810664775694*(1-I)*t*(G+I*Q*(O+I*W*(-1+2*O*O))))+3*Math.PI)%(2*Math.PI)-Math.PI;K=180*K/Math.PI;A=180*A/Math.PI;return new F(A,K,new v(4326))},getInverseCalculations:function(l,q){var K=q.x*Math.PI/180-l.x*Math.PI/180,A=.9966471893352243*Math.tan(l.y*Math.PI/180);l=1/Math.sqrt(1+A*A);A*=l;var r=.9966471893352243*Math.tan(q.y*Math.PI/180);q=1/Math.sqrt(1+r*r);r*=q;var t=K,B=0;do{var M=Math.sin(t);
var I=Math.cos(t);var O=q*M*q*M+(l*r-A*q*I)*(l*r-A*q*I);O=Math.sqrt(O);if(0==O)return{distance:0,initialBearing:0,finalBearing:0};var R=A*r+l*q*I;var P=Math.atan2(O,R);var G=l*q*M/O;var U=1-G*G;var Q=R-2*A*r/U;isNaN(Q)&&(Q=0);var W=2.0955066654848088E-4*U*(4+.003352810664775694*(4-3*U));var J=t;t=K+.003352810664775694*(1-W)*G*(P+W*O*(Q+W*R*(-1+2*Q*Q)))}while(1E-12<Math.abs(t-J)&&200>++B);if(200<=B)return null;t=2.7233160610984375E11*U/4.040829998465916E13;B=t/1024*(256+t*(-128+t*(74-47*t)));K=Math.atan2(q*
M,l*r-A*q*I);l=Math.atan2(l*M,-A*q+l*r*I);K=(K+2*Math.PI)%(2*Math.PI);l=(l+2*Math.PI)%(2*Math.PI);A=Number((6356752.314245*(1+t/16384*(4096+t*(-768+t*(320-175*t))))*(P-B*O*(Q+B/4*(R*(-1+2*Q*Q)-B/6*Q*(-3+4*O*O)*(-3+4*Q*Q))))).toFixed(3));K=180*K/Math.PI;l=180*l/Math.PI;return{distance:A,initialBearing:K,finalBearing:l}},getLineBetweenPoints:function(l){var q,K=[];f.forEach(l,p.hitch(this,function(A){K.push([w.removeNegativeExponents(A.x),w.removeNegativeExponents(A.y)])}));0<K.length&&(q=new c({paths:[K],
spatialReference:{wkid:4326}}));return q},getAngleBetweenPoints:function(l,q){l=w.getInverseCalculations(l,q);return null===l?0:l.initialBearing},getDistanceBetweenPoints:function(l,q){l=w.getInverseCalculations(l,q);return null===l?0:l.distance},getLengthOfGeometry:function(l){return(l=d.simplify(l))?d.geodesicLength(l,9001):0},getAreaOfGeometry:function(l){l=d.simplify(l);var q={};l?(q.acres=d.geodesicArea(l,109402),q.squareMeters=d.geodesicArea(l,109404),q.squareFeet=d.geodesicArea(l,109405),q.squareUSSurveyFeet=
d.geodesicArea(l,109406)):(q.acres=0,q.squareMeters=0,q.squareFeet=0,q.squareUSSurveyFeet=0);return q},getPolyLineFromPaths:function(l){var q;var K=new c(new v({wkid:4326}));for(q=0;q<l.length;q++)K.addPath(l[q]);return K},getPolygonFromPolyLines:function(l,q,K,A){var r,t;var B=[];A=A?new k(new v(A)):new k(new v({wkid:4326}));for(r=0;r<l.length;r++)for(t=0;t<l[r].length;t++)B.push(l[r][t]);q?B.push(p.clone(B[0])):K&&(B[B.length-1][0]=B[0][0],B[B.length-1][1]=B[0][1]);A.isClockwise(B)||B.reverse();
A.addRing(B);return A},getPointsForArc:function(l,q,K,A){var r=[];var t=q-l;q=parseInt(t,10);0>=q&&(q=1);var B=Math.abs(t)/Math.abs(q);if(0<B)for(t=0;t<Math.abs(q)+1;t++){var M=l+B*t;(M=w.getDestinationPoint(K,M,Math.abs(A)))&&r.push(M)}return r},getArcParam:function(l){var q={};0>l.distance?0>l.radius?(q.bearing=l.initBearing+90,q.centerPoint=w.getDestinationPoint(l.chordMidPoint,q.bearing,l.centerAndChordDistance),q.startAngle=w.getAngleBetweenPoints(q.centerPoint,l.chordEndPoint),q.endAngle=w.getAngleBetweenPoints(q.centerPoint,
l.chordStartPoint)):(q.bearing=l.initBearing-90,q.centerPoint=w.getDestinationPoint(l.chordMidPoint,q.bearing,l.centerAndChordDistance),q.startAngle=w.getAngleBetweenPoints(q.centerPoint,l.chordStartPoint),q.endAngle=w.getAngleBetweenPoints(q.centerPoint,l.chordEndPoint)):0<l.radius?(q.bearing=l.initBearing+90,q.centerPoint=w.getDestinationPoint(l.chordMidPoint,q.bearing,l.centerAndChordDistance),q.startAngle=w.getAngleBetweenPoints(q.centerPoint,l.chordStartPoint),q.endAngle=w.getAngleBetweenPoints(q.centerPoint,
l.chordEndPoint)):(q.bearing=l.initBearing-90,q.centerPoint=w.getDestinationPoint(l.chordMidPoint,q.bearing,l.centerAndChordDistance),q.startAngle=w.getAngleBetweenPoints(q.centerPoint,l.chordEndPoint),q.endAngle=w.getAngleBetweenPoints(q.centerPoint,l.chordStartPoint));return q},removeNegativeExponents:function(l){return 1<l.toString().toLowerCase().split("e-").length?0:l},getChordLengthFromArcLength:function(l,q){l=Math.abs(l);var K=Math.PI*Math.abs(q);q=Math.abs(q)*Math.sin(Math.abs(l)/Math.abs(q)/
2);return l<=K?2*q:-2*q},getArcLengthFromChordLength:function(l,q){var K=Math.abs(l);q=Math.abs(q);K=2*Math.asin(K/(2*q))*q;0>l&&(K=2*Math.PI*q-K);return K},chordBearingToTangentBearing:function(l,q,K){var A=180/Math.PI*Math.acos(Math.abs(K)/2/Math.abs(q));q/=Math.abs(q);l=l+90*q-K/Math.abs(K)*q*A;return w.removeNegativeExponents(0>l?l+360:360<=l?l%360:l)},tangentBearingToChordBearing:function(l,q,K){var A=180/Math.PI*Math.acos(Math.abs(K)/2/Math.abs(q));q/=Math.abs(q);l=l+90*q-K/Math.abs(K)*q*A;
return w.removeNegativeExponents(0>l?l+360:360<=l?l%360:l)},getUnitValueForSR:function(l){switch(C.getUnitValueForSR(l)){case 1:return"meters";case 111194.87428468118:return"meters";case .3048:return"feet";case .3048006096:case .3048006096012192:return"uSSurveyFeet"}},getRotationAngleBetweenPoints:function(l,q){l=m.project(l,new v(102100));q=m.project(q,new v(102100));var K=q.x-l.x;l=q.y-l.y;q=180*Math.atan2(Math.abs(K),Math.abs(l))/Math.PI;var A=180*Math.atan2(Math.abs(l),Math.abs(K))/Math.PI;K=
w.removeNegativeExponents(K);l=w.removeNegativeExponents(l);q=w.removeNegativeExponents(q);A=w.removeNegativeExponents(A);if(0===l){if(0===K)return 0;if(0<K)return 90;if(0>K)return 270}else if(0<l){if(0===K)return 0;if(0<K)return q;if(0>K)return 270+A}else if(0>l){if(0===K)return 180;if(0<K)return 90+A;if(0>K)return 180+q}},getScaleDistanceBetweenPoints:function(l,q){l=m.project(l,new v(102100));q=m.project(q,new v(102100));l=d.distance(l,q,9001);return w.removeNegativeExponents(l)}};return w})},
"widgets/ParcelDrafter/MapTooltipHandler":function(){define("dojo/_base/declare dijit/_WidgetBase dojo/_base/lang dojo/Evented dojo/dom-style dojo/dom-construct dojo/on".split(" "),function(F,c,k,m,n,f,p){return F([c,m],{baseClass:"jimu-widget-ParcelDrafter-MapTooltipHandler",map:null,handleClickFor:null,_mapTooltip:null,_mapMoveHandler:null,_mapClickHandler:null,_mouseDragHandler:null,constructor:function(d){k.mixin(this,d)},startup:function(){this.handleClickFor||(this.handleClickFor=this.map);
this._createTooltip()},connectEventHandler:function(d){d&&this.updateTooltip(d);this._disableWebMapPopup();this._mapClickHandler=this.own(p(this.handleClickFor,"click",k.hitch(this,function(v){this._clicked(v)})))[0];"ontouchstart"in document.documentElement?n.set(this._mapTooltip,"display","none"):(this._mapMoveHandler=this.own(this.map.on("mouse-move",k.hitch(this,this._onMapMouseMove)))[0],this.own(this.map.on("mouse-out",k.hitch(this,function(){n.set(this._mapTooltip,"display","none")}))))},disconnectEventHandler:function(){this._enableWebMapPopup();
this._mapClickHandler&&this._mapClickHandler.remove();this._mapMoveHandler&&(this._mapMoveHandler.remove(),this._mapTooltip.style.display="none");this.disconnectMouseDragHandler()},connectMouseDragHandler:function(d){d&&this.updateTooltip(d);this._disableWebMapPopup();this._mapClickHandler&&this._mapClickHandler.remove();this.map.disableMapNavigation();this._mouseDragHandler=this.own(this.map.on("mouse-drag",k.hitch(this,function(v){this._onDragging(v)})))[0]},disconnectMouseDragHandler:function(){this._mouseDragHandler&&
(this._mouseDragHandler.remove(),this._mapTooltip.style.display="none");this.map.enableMapNavigation()},_createTooltip:function(){this._mapTooltip=f.create("div",{"class":"esriCTMapTooltip",innerHTML:this.toolTipText},this.map.container);n.set(this._mapTooltip,"position","fixed");n.set(this._mapTooltip,"display","none")},_enableWebMapPopup:function(){this.map&&(this.map.infoWindow.hide(),this.map.setInfoWindowOnClick(!0))},_disableWebMapPopup:function(){this.map&&(this.map.infoWindow.hide(),this.map.setInfoWindowOnClick(!1))},
_onMapMouseMove:function(d){if(d.clientX||d.pageY){var v=d.clientX;var C=d.clientY}else v=d.clientX+document.body.scrollLeft-document.body.clientLeft,C=d.clientY+document.body.scrollTop-document.body.clientTop;n.set(this._mapTooltip,"display","none");n.set(this._mapTooltip,{left:v+15+"px",top:C+"px"});n.set(this._mapTooltip,"display","");this._onMoving(d)},_clicked:function(d){this.emit("clicked",d)},_onDragging:function(d){this.emit("dragging",d)},_onMoving:function(d){this.emit("moving",d)},updateTooltip:function(d){this.toolTipText=
d;this._mapTooltip.innerHTML=this.toolTipText}})})},"widgets/ParcelDrafter/layerUtils":function(){define(["dojo/_base/declare","dijit/_WidgetBase","dojo/_base/array","dojo/_base/lang"],function(F,c,k,m){return F([c],{map:null,getPopupInfo:!0,getRenderer:!0,postCreate:function(){},getLayerDetailsFromMap:function(n,f,p){var d={},v;this.map&&this.map.webMapResponse&&this.map.webMapResponse.itemInfo&&this.map.webMapResponse.itemInfo.itemData&&this.map.webMapResponse.itemInfo.itemData.operationalLayers&&
k.forEach(this.map.webMapResponse.itemInfo.itemData.operationalLayers,m.hitch(this,function(C){C.layerObject&&("ArcGISMapServiceLayer"===C.layerType||"ArcGISTiledMapServiceLayer"===C.layerType?(v=p&&p.substring(0,p.lastIndexOf("_")),v&&C.id!==v||(d.isMapServer=!0,n.substring(0,n.length-1)===C.url&&(k.forEach(C.resourceInfo.layers,m.hitch(this,function(w){w.id===parseInt(f,10)&&(d.title=w.name)})),k.forEach(C.layers,m.hitch(this,function(w){w.id===parseInt(f,10)&&(w.name&&(d.title=w.name),this.getPopupInfo&&
(d.popupInfo=w.popupInfo),w.layerDefinition&&(w.layerDefinition.definitionExpression&&(d.definitionExpression=w.layerDefinition.definitionExpression),this.getRenderer&&w.layerDefinition.drawingInfo&&w.layerDefinition.drawingInfo.renderer&&(d.renderer=w.layerDefinition.drawingInfo.renderer)))}))))):p&&C.id!==p||C.url.replace(/.*?:\/\//g,"").toLowerCase()!==(n+f).replace(/.*?:\/\//g,"").toLowerCase()||C.id!==p||(d.isMapServer=!1,d.title=C.title,this.getPopupInfo&&(d.popupInfo=C.popupInfo),C.layerDefinition&&
(C.layerDefinition.definitionExpression&&(d.definitionExpression=C.layerDefinition.definitionExpression),this.getRenderer&&C.layerDefinition.drawingInfo&&C.layerDefinition.drawingInfo.renderer&&(d.renderer=C.layerDefinition.drawingInfo.renderer))))}));return d}})})},"widgets/ParcelDrafter/_build-generate_module":function(){define(["dojo/text!./Widget.html","dojo/text!./css/style.css","dojo/i18n!./nls/strings"],function(){})},"url:widgets/ParcelDrafter/PlanSettings.html":'\x3cdiv\x3e\r\n    \x3c!-- Direction or Angle Type Selector --\x3e\r\n    \x3cdiv class\x3d"esriCTFullWidth esriCTPlanSettingRow"\x3e\r\n        \x3cdiv class\x3d"esriCTDropdownLabel esriCTEllipsis" title\x3d"${nls.planSettings.directionOrAngleTypeLabel}"\r\n        data-a11y-label-id\x3d"directionOrAngleTypeLabel"\x3e\r\n            ${nls.planSettings.directionOrAngleTypeLabel}\x3c/div\x3e\r\n        \x3cselect data-dojo-attach-point\x3d"directionOrAngleType" style\x3d"width: 100%" data-dojo-type\x3d"jimu/dijit/formSelect"\r\n        data-a11y-label-by\x3d"directionOrAngleTypeLabel"\x3e\r\n        \x3c/select\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- Direction or Angle Units Selector --\x3e\r\n    \x3cdiv class\x3d"esriCTFullWidth esriCTPlanSettingRow"\x3e\r\n        \x3cdiv class\x3d"esriCTDropdownLabel esriCTEllipsis" title\x3d"${nls.planSettings.directionOrAngleUnitsLabel}"\r\n        data-a11y-label-id\x3d"directionOrAngleUnitsLabel"\x3e\r\n            ${nls.planSettings.directionOrAngleUnitsLabel}\x3c/div\x3e\r\n        \x3cselect data-dojo-attach-point\x3d"directionOrAngleUnits" style\x3d"width: 100%" data-dojo-type\x3d"jimu/dijit/formSelect"\r\n        data-a11y-label-by\x3d"directionOrAngleUnitsLabel"\x3e\r\n        \x3c/select\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- Distance and Length Units Selector --\x3e\r\n    \x3cdiv class\x3d"esriCTFullWidth esriCTPlanSettingRow"\x3e\r\n        \x3cdiv class\x3d"esriCTDropdownLabel esriCTEllipsis" title\x3d"${nls.planSettings.distanceAndLengthUnitsLabel}"\r\n        data-a11y-label-id\x3d"distanceAndLengthUnitsLabel"\x3e\r\n            ${nls.planSettings.distanceAndLengthUnitsLabel}\x3c/div\x3e\r\n        \x3cselect data-dojo-attach-point\x3d"distanceAndLengthUnits" style\x3d"width: 100%" data-dojo-type\x3d"jimu/dijit/formSelect"\r\n        data-a11y-label-by\x3d"distanceAndLengthUnitsLabel"\x3e\r\n        \x3c/select\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- Area Units Selector--\x3e\r\n    \x3cdiv class\x3d"esriCTFullWidth esriCTPlanSettingRow"\x3e\r\n        \x3cdiv class\x3d"esriCTDropdownLabel esriCTEllipsis" title\x3d"${nls.planSettings.areaUnitsLabel}"\r\n        data-a11y-label-id\x3d"areaUnitsLabel"\x3e\r\n            ${nls.planSettings.areaUnitsLabel}\x3c/div\x3e\r\n        \x3cselect data-dojo-attach-point\x3d"areaUnits" style\x3d"width: 100%" data-dojo-type\x3d"jimu/dijit/formSelect"\r\n        data-a11y-label-by\x3d"areaUnitsLabel"\x3e\r\n        \x3c/select\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- Circular Curve Parameters Selector --\x3e\r\n    \x3cdiv class\x3d"esriCTFullWidth esriCTPlanSettingRow"\x3e\r\n        \x3cdiv class\x3d"esriCTDropdownLabel esriCTEllipsis " title\x3d"${nls.planSettings.circularCurveParameters}"\r\n        data-a11y-label-id\x3d"circularCurveParameters"\x3e\r\n            ${nls.planSettings.circularCurveParameters}\x3c/div\x3e\r\n        \x3cselect data-dojo-attach-point\x3d"circularCurveParameters" style\x3d"width: 100%" data-dojo-type\x3d"jimu/dijit/formSelect"\r\n        data-a11y-label-by\x3d"circularCurveParameters"\x3e\r\n        \x3c/select\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"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',
"url:widgets/ParcelDrafter/NewTraverse.html":'\x3cdiv\x3e\r\n    \x3c!-- Traverse grid container--\x3e\r\n    \x3cdiv class\x3d"esriCTNewTraverseContainer"\x3e\r\n        \x3c!-- Traverse grid title--\x3e\r\n        \x3cdiv class\x3d"esriCTNewTraverseLabelDiv"\x3e\r\n            \x3cdiv class\x3d"esriCTGridEmptyLabel"\x3e\r\n                \x26nbsp\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTGridLabels esriCTEllipsis esriCTGridBearingLabel" title\x3d"${nls.traverseSettings.bearingLabel}"\x3e\r\n                ${nls.traverseSettings.bearingLabel}\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTGridLabels esriCTEllipsis" title\x3d"${nls.traverseSettings.lengthLabel}"\x3e\r\n                ${nls.traverseSettings.lengthLabel}\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTGridLabels esriCTEllipsis" title\x3d"${nls.traverseSettings.radiusLabel}"\x3e\r\n                ${nls.traverseSettings.radiusLabel}\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Traverse grid items--\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"traverseGrid" class\x3d"esriCTTraverseGrid"\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Traverse grid initial entry row--\x3e\r\n        \x3cdiv data-dojo-attach-point\x3d"traverseEntryNode" class\x3d"esriCTEntrtyNodeContent esriCTRow"\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"lineSymbolNode" class\x3d"esriCTSymbolContainer"\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"bearingNode" class\x3d"esriCTBearingRow" data-dojo-type\x3d"dijit/form/ValidationTextBox" aria-label\x3d"${nls.traverseSettings.bearingLabel}"\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"lengthNode" data-dojo-type\x3d"dijit/form/ValidationTextBox" aria-label\x3d"${nls.traverseSettings.lengthLabel}"\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"radiusNode" data-dojo-type\x3d"dijit/form/ValidationTextBox" aria-label\x3d"${nls.traverseSettings.radiusLabel}"\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTAddRow"\x3e\r\n                \x3cdiv data-dojo-attach-point\x3d"addButton" class\x3d"esriCTAddIcon"\r\n                title\x3d"${nls.traverseSettings.addButtonTitle}" tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.traverseSettings.addButtonTitle}"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Traverse grid tools container--\x3e\r\n        \x3cdiv class\x3d"esriCTTraverseTool"\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseToolContainer"\x3e\r\n                \x3c!-- Update rotation point tool--\x3e\r\n                \x3cdiv class\x3d"esriCTTraverseToolIcons ecriCTUpdateRotationPointIcon esriCTCursorPointer" title\x3d"${nls.planSettings.updateRotationPointTooltipText}"\r\n                    data-dojo-attach-point\x3d"updateRotationPointNode" tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.planSettings.updateRotationPointTooltipText}" aria-pressed\x3d"false"\x3e\r\n                \x3c/div\x3e\r\n                \x3c!-- Screen digitization tool--\x3e\r\n                \x3cdiv class\x3d"esriCTTraverseToolIcons ecriCTLocationIcon esriCTCursorPointer" title\x3d"${nls.planSettings.onScreenDigitizationTooltipText}"\r\n                    data-dojo-attach-point\x3d"screenDigitizationNode" tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.planSettings.onScreenDigitizationTooltipText}" aria-pressed\x3d"false"\x3e\r\n                \x3c/div\x3e\r\n                \x3c!-- Zoom tool--\x3e\r\n                \x3cdiv class\x3d"esriCTHidden esriCTTraverseToolIcons ecriCTZoomToIcon esriCTCursorPointer" title\x3d"${nls.planSettings.zoomToLocationTooltipText}"\r\n                    data-dojo-attach-point\x3d"zoomToNode" tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.planSettings.zoomToLocationTooltipText}"\x3e\r\n                \x3c/div\x3e\r\n                \x3c!-- Expand/Collapse grid tool--\x3e\r\n                \x3cdiv class\x3d"esriCTHidden  esriCTTraverseToolIcons esriCTCollapse esriCTCursorPointer" title\x3d"${nls.planSettings.collapseGridTooltipText}"\r\n                    data-dojo-attach-point\x3d"expandCollapseNode" tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.planSettings.collapseGridTooltipText}"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- Misclose details container--\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"misCloseDetailsNode"\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- Parcel tools (rotation/scale) container--\x3e\r\n    \x3cdiv data-dojo-attach-point\x3d"parcelToolsNode"\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- Parcel info (polygon layer fields) \x26 save/cancle button container--\x3e\r\n    \x3cdiv class\x3d"esriCTPlanInfoNode" data-dojo-attach-point\x3d"planInfoNode"\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/ParcelDrafter/MiscloseDetails.html":'\x3cdiv class\x3d"esriCTTraverseDetailContainer esriCTFullWidth" data-dojo-attach-point\x3d"traverseDetailsContainer"\x3e\r\n    \x3c!-- Message div shown when misclose is not calculated --\x3e\r\n    \x3cdiv class\x3d"esriCTTraverseResultContainer esriCTEllipsis"\r\n    data-dojo-attach-point\x3d"noMiscloseCalculated"\x3e\r\n        ${nls.traverseSettings.noMiscloseCalculated}\r\n    \x3c/div\x3e\r\n    \x3c!-- Misclose details container --\x3e\r\n    \x3cdiv class\x3d"esriCTFullWidth esriCTHidden" data-dojo-attach-point\x3d"miscloseDetailsContainer"\x3e\r\n        \x3c!-- Misclose Bearing Container --\x3e\r\n        \x3cdiv class\x3d"esriCTTraverseResultContainer" data-dojo-attach-point\x3d"traverseMiscloseBearingNode"\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis" title\x3d"${nls.traverseSettings.traverseMiscloseBearing}"\x3e\r\n                ${nls.traverseSettings.traverseMiscloseBearing}:\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv  esriCTEllipsis esriCTTraversedValueDiv" data-dojo-attach-point\x3d"miscloseBearingNode"\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Misclose Distance Container --\x3e\r\n        \x3cdiv class\x3d"esriCTTraverseResultContainer" data-dojo-attach-point\x3d"traverseDistanceNode"\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis" title\x3d"${nls.traverseSettings.traverseDistance}"\x3e\r\n                ${nls.traverseSettings.traverseDistance}:\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis esriCTTraversedValueDiv" data-dojo-attach-point\x3d"miscloseDistanceNode"\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Misclose Ratio Container --\x3e\r\n        \x3cdiv class\x3d"esriCTTraverseResultContainer" data-dojo-attach-point\x3d"traverseMiscloseRatioNode"\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis" title\x3d"${nls.traverseSettings.traverseMiscloseRatio}"\x3e\r\n                ${nls.traverseSettings.traverseMiscloseRatio}:\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis esriCTTraversedValueDiv" data-dojo-attach-point\x3d"miscloseRatioNode"\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Accuracy Container --\x3e\r\n        \x3cdiv class\x3d"esriCTTraverseResultContainer" data-dojo-attach-point\x3d"traverseAccuracyNode"\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis" title\x3d"${nls.traverseSettings.traverseAccuracy}"\x3e\r\n                ${nls.traverseSettings.traverseAccuracy}:\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis esriCTTraversedValueDiv" data-dojo-attach-point\x3d"accuracyNode"\x3e\r\n                ${nls.traverseSettings.accuracyHigh}\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Stated Area Container --\x3e\r\n        \x3cdiv class\x3d"esriCTTraverseResultContainer esriCTHidden" data-dojo-attach-point\x3d"traverseStatedAreaNode"\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis" title\x3d"${nls.traverseSettings.traverseStatedArea}"\x3e\r\n                ${nls.traverseSettings.traverseStatedArea}:\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis esriCTTraversedValueDiv"\x3e\r\n                \x3cdiv data-dojo-attach-point\x3d"traverseStatedArea" style\x3d"font-weight:normal; width: 100px; height: 25px;" data-dojo-type\x3d"dijit/form/ValidationTextBox" aria-label\x3d"${nls.traverseSettings.traverseStatedArea}"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Calculated Area Container --\x3e\r\n        \x3cdiv class\x3d"esriCTTraverseResultContainer" data-dojo-attach-point\x3d"traverseCalculatedAreaNode"\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis" title\x3d"${nls.traverseSettings.traverseCalculatedArea}"\x3e\r\n                ${nls.traverseSettings.traverseCalculatedArea}:\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseResultsDiv esriCTEllipsis esriCTTraversedValueDiv" data-dojo-attach-point\x3d"calculatedAreaNode"\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/ParcelDrafter/ParcelTools.html":'\x3cdiv class\x3d"esriCTFullWidth"\x3e\r\n    \x3c!-- Rotation tool container--\x3e\r\n    \x3cdiv class\x3d"esriCTMainPageRow"\x3e\r\n        \x3cdiv class\x3d"esriCTRotationButton esriCTButtonIcon esriCTParcelToolButtonIcon esriCTCursorPointer" title\x3d"${nls.parcelTools.rotationToolLabel}"\r\n            data-dojo-attach-point\x3d"rotateButton" tabindex\x3d"0" role\x3d"button"  aria-pressed\x3d"false" aria-label\x3d"${nls.parcelTools.rotationToolLabel}"\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTParcelToolButtonLabel esriCTEllipsis" title\x3d"${nls.parcelTools.rotationToolLabel}"\x3e\r\n            ${nls.parcelTools.rotationToolLabel}\x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTParcelToolInputNode" data-dojo-type\x3d"dijit/form/NumberTextBox" trim\x3d"true" required\x3d"true" data-dojo-attach-point\x3d"rotationTxt" aria-label\x3d"${nls.parcelTools.rotationToolLabel}"\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3c!-- Scale tool container--\x3e\r\n    \x3cdiv class\x3d"esriCTMainPageRow"\x3e\r\n        \x3cdiv class\x3d"esriCTScaleButton esriCTButtonIcon esriCTParcelToolButtonIcon esriCTCursorPointer" title\x3d"${nls.parcelTools.scaleToolLabel}"\r\n            data-dojo-attach-point\x3d"scaleButton" tabindex\x3d"0" role\x3d"button" aria-pressed\x3d"false" aria-label\x3d"${nls.parcelTools.scaleToolLabel}"\x3e\r\n        \x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTParcelToolButtonLabel esriCTEllipsis" title\x3d"${nls.parcelTools.scaleToolLabel}"\x3e\r\n            ${nls.parcelTools.scaleToolLabel}\x3c/div\x3e\r\n        \x3cdiv class\x3d"esriCTParcelToolInputNode" data-dojo-type\x3d"dijit/form/NumberTextBox" trim\x3d"true" required\x3d"true" data-dojo-attach-point\x3d"scaleTxt" aria-label\x3d"${nls.parcelTools.scaleToolLabel}"\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:widgets/ParcelDrafter/PlanInfo.html":'\x3cdiv class\x3d"esriCTFullWidth"\x3e\r\n    \x3c!-- Parcel Layer Attribute list Parent--\x3e\r\n    \x3cdiv class\x3d"esriCTFullWidth" data-dojo-attach-point\x3d"parcelLayerRowNode"\x3e\r\n        \x3c!-- Parcel layer attribute list toggle node --\x3e\r\n        \x3cdiv class\x3d"esriCTParcelLayerParent" data-dojo-attach-point\x3d"expandCollapseParentNode"\x3e\r\n            \x3cdiv class\x3d"esriCTParcelLayerContainer esriCTEllipsis" data-dojo-attach-point\x3d"attributeListTitle"\x3e\x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTExpandCollapseParceLayer" data-dojo-attach-point\x3d"expandCollapseNode" tabindex\x3d"0"\r\n                role\x3d"button" aria-label\x3d"${nls.planInfo.showAttributeList}" title\x3d"${nls.planInfo.showAttributeList}"\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Parcel Layer Attribute List Section--\x3e\r\n        \x3cdiv class\x3d"esriCTParcelAttributeList esriCTHidden" data-dojo-attach-point\x3d"attributeListNode"\x3e\r\n            \x3c!-- Attribute Inspector --\x3e\r\n            \x3cdiv class\x3d"esriCTAttributeInspectorContainer" data-dojo-attach-point\x3d"attributeInspectorContainer"\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Parcel name input container --\x3e\r\n            \x3cdiv class\x3d"esriCTFullWidth esriCTPlanSettingRow esriCTHidden" data-dojo-attach-point\x3d"parcelNameRow"\x3e\r\n                \x3cdiv class\x3d"esriCTFullWidth" data-dojo-attach-point\x3d"parcelName"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- DocumentType input container --\x3e\r\n            \x3cdiv class\x3d"esriCTFullWidth esriCTPlanSettingRow esriCTHidden" data-dojo-attach-point\x3d"documentTypeRow"\x3e\r\n                \x3cdiv class\x3d"esriCTFullWidth" data-dojo-attach-point\x3d"documentType"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3c!-- Plan name input container --\x3e\r\n            \x3cdiv class\x3d"esriCTFullWidth esriCTPlanSettingRow esriCTHidden" data-dojo-attach-point\x3d"planNameRow"\x3e\r\n                \x3cdiv class\x3d"esriCTFullWidth" data-dojo-attach-point\x3d"planName"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!-- Save/Cancle button container --\x3e\r\n        \x3cdiv class\x3d"esriCTPlanInfoNode"\x3e\r\n            \x3cdiv class\x3d"esriCTPlanInfoButton jimu-btn jimu-trailing-margin1" title\x3d"${nls.common.save}"\r\n                data-dojo-attach-point\x3d"planInfoSaveButton" tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.common.save}"\x3e\r\n                ${nls.common.save}\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTPlanInfoButton jimu-btn jimu-trailing-margin1 esriCTHidden"\r\n                title\x3d"${nls.common.deleteText}" data-dojo-attach-point\x3d"planInfoDeleteButton" tabindex\x3d"0"\r\n                role\x3d"button" aria-label\x3d"${nls.common.deleteText}"\x3e\r\n                ${nls.common.deleteText}\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTPlanInfoButton jimu-btn" title\x3d"${nls.common.cancel}"\r\n                data-dojo-attach-point\x3d"planInfoCancelButton" tabindex\x3d"0" role\x3d"button"\r\n                aria-label\x3d"${nls.common.cancel}"\x3e\r\n                ${nls.common.cancel}\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e',
"url:dijit/templates/ProgressBar.html":'\x3cdiv class\x3d"dijitProgressBar dijitProgressBarEmpty" role\x3d"progressbar"\r\n\t\x3e\x3cdiv  data-dojo-attach-point\x3d"internalProgress" class\x3d"dijitProgressBarFull"\r\n\t\t\x3e\x3cdiv class\x3d"dijitProgressBarTile" role\x3d"presentation"\x3e\x3c/div\r\n\t\t\x3e\x3cspan style\x3d"visibility:hidden"\x3e\x26#160;\x3c/span\r\n\t\x3e\x3c/div\r\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"labelNode" class\x3d"dijitProgressBarLabel" id\x3d"${id}_label"\x3e\x3c/div\r\n\t\x3e\x3cspan data-dojo-attach-point\x3d"indeterminateHighContrastImage"\r\n\t\t   class\x3d"dijitInline dijitProgressBarIndeterminateHighContrastImage"\x3e\x3c/span\r\n\x3e\x3c/div\x3e\r\n',
"url:esri/dijit/editing/templates/AttachmentEditor.html":"\x3cdiv class\x3d\"attachmentEditor\"\x3e\r\n    \x3cbr /\x3e\r\n    \x3cdiv\x3e\r\n        \x3cb\x3e${NLS_attachments}\x3c/b\x3e\r\n        \x3chr /\x3e\r\n        \x3cdiv dojoAttachPoint\x3d\"_attachmentError\" style\x3d'color:red;display:none'\x3e\x3c/div\x3e\r\n        \x3cbr /\x3e\r\n        \x3cspan dojoAttachPoint\x3d'_attachmentList' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e\r\n        \x3cbr\x3e\x3cbr\x3e\r\n        \x3cdiv data-dojo-type\x3d\"dijit/ProgressBar\" dojoAttachPoint\x3d\"_attachmentProgress\" indeterminate\x3d\"true\" style\x3d'display:none'\x3e\x3c/div\x3e\r\n        \x3cbr /\x3e        \r\n        \x3cform dojoAttachPoint\x3d'_uploadForm'\x3e ${NLS_add}:\x26nbsp;\x26nbsp;\x3cinput type\x3d'file' name\x3d'attachment' dojoAttachPoint\x3d'_uploadField' /\x3e \x3c/form\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e",
"url:esri/dijit/templates/AttributeInspector.html":'\x3cdiv class\x3d"esriAttributeInspector"\x3e\r\n    \x3cdiv class\x3d"atiLayerName" dojoAttachPoint\x3d"layerName"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"atiAttributes" dojoAttachPoint\x3d"attributeTable"\x3e\x3c/div\x3e\r\n    \x3cdiv dojoAttachPoint\x3d"attachmentEditor"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"atiEditorTrackingInfo" dojoAttachPoint\x3d"editorTrackingInfoDiv"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"atiButtons" dojoAttachPoint\x3d"editButtons"\x3e\r\n        \x3cbutton  dojoType\x3d"dijit.form.Button" class\x3d"atiButton atiDeleteButton"  dojoAttachPoint\x3d"deleteBtn" dojoAttachEvent\x3d"onClick: onDeleteBtn" showLabel\x3d"true" type\x3d"button"\x3e${NLS_deleteFeature}\x3c/button\x3e\r\n        \x3cdiv class\x3d"atiNavButtons" dojoAttachPoint\x3d"navButtons"\x3e\r\n            \x3cdiv class\x3d"atiNavMessage" dojoAttachPoint\x3d"navMessage"\x3e\x3c/div\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiFirstIcon" dojoAttachPoint\x3d"firstFeatureButton" dojoAttachEvent\x3d"onClick: onFirstFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_first}\x3c/button\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiPrevIcon" dojoAttachPoint\x3d"prevFeatureButton" dojoAttachEvent\x3d"onClick: onPreviousFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_previous}\x3c/button\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiNextIcon" dojoAttachPoint\x3d"nextFeatureButton" dojoAttachEvent\x3d"onClick: onNextFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_next}\x3c/button\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiLastIcon" dojoAttachPoint\x3d"lastFeatureButton" dojoAttachEvent\x3d"onClick: onLastFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_last}\x3c/button\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/ParcelDrafter/Widget.html":'\x3cdiv style\x3d"height: calc(100% - 10px);" class\x3d"esriCTFullHeight" data-dojo-attach-point\x3d"mainNode"\x3e\r\n    \x3cdiv class\x3d"esriCTFullHeight esriCTFullWidth" data-dojo-attach-point\x3d"widgetMainNode"\x3e\r\n        \x3c!--Main Page Node--\x3e\r\n        \x3cdiv class\x3d"esirCTMainPage" data-dojo-attach-point\x3d"mainPageNode"\x3e\r\n            \x3cdiv class\x3d"esriCTMainPageRow"\x3e\r\n                \x3cdiv class\x3d"esriCTButtonLabel esriCTEllipsis" title\x3d"${nls.newTraverseButtonLabel}"\x3e\r\n                    ${nls.newTraverseButtonLabel}\x3c/div\x3e\r\n                    \x3c!-- code for accessibility --\x3e\r\n                \x3cdiv class\x3d"esriCTNewTraverseButton esriCTButtonIcon esriCTCursorPointer" title\x3d"${nls.newTraverseButtonLabel}" data-dojo-attach-point\x3d"newTraverseButton"\r\n                tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.newTraverseButtonLabel}" aria-pressed\x3d"false"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTMainPageRow"\x3e\r\n                \x3cdiv class\x3d"esriCTButtonLabel esriCTEllipsis" title\x3d"${nls.editTraverseButtonLabel}"\x3e\r\n                    ${nls.editTraverseButtonLabel}\x3c/div\x3e\r\n                    \x3c!-- code for accessibility --\x3e\r\n                \x3cdiv class\x3d"esriCTEditTraverseButton esriCTButtonIcon esriCTCursorPointer" title\x3d"${nls.editTraverseButtonLabel}" data-dojo-attach-point\x3d"editTraverseButton"\r\n                tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.editTraverseButtonLabel}" aria-pressed\x3d"false"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv data-dojo-attach-point\x3d"newTraverseSelectMessageNodeWrapper" class\x3d"esriCTHidden"\x3e\r\n              \x3cdiv class\x3d"esriCTMainPageRow esriCTAlignCenter" data-dojo-attach-point\x3d"newTraverseSelectMessageNode"\x3e\r\n              \x3c/div\x3e\r\n              \x3c!-- XYInput Widget get inserted here --\x3e\r\n            \x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!--Traverse Page Node--\x3e\r\n        \x3cdiv class\x3d"esriCTFullHeight esriCTHidden" data-dojo-attach-point\x3d"traversePageNode"\x3e\r\n            \x3cdiv class\x3d"esriCTFullWidth esriCTNewTraverseHeader"\x3e\r\n                \x3cdiv class\x3d"esriCTBackButton esriCTCursorPointer"\x3e\r\n                    \x3cdiv class\x3d"esriCTItemLeftArrow" title\x3d"${nls.common.back}" tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.common.back}" data-dojo-attach-point\x3d"traversePanelBackButton"\x3e\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTTitleDiv esriCTEllipsis" title\x3d"${nls.newTraverseTitle}"  data-dojo-attach-point\x3d"traverseTitleNode"\x3e\r\n                    ${nls.newTraverseTitle}\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTPlanSettingsIcon esriCTCursorPointer" title\x3d"${nls.planSettings.planSettingsTitle}" data-dojo-attach-point\x3d"planSettingsButton" tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.planSettings.planSettingsTitle}"\x3e\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTTraverseNode" data-dojo-attach-point\x3d"traverseNode"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n        \x3c!--Plan Settings Node--\x3e\r\n        \x3cdiv class\x3d"esriCTHidden esriCTFullHeight" data-dojo-attach-point\x3d"planSettingsPageNode"\x3e\r\n            \x3cdiv class\x3d"esriCTFullWidth esriCTPlanSettingHeader"\x3e\r\n                \x3cdiv class\x3d"esriCTBackButton esriCTCursorPointer"\x3e\r\n                    \x3cdiv class\x3d"esriCTItemLeftArrow" title\x3d"${nls.common.back}" tabindex\x3d"0" role\x3d"button" aria-label\x3d"${nls.common.back}" data-dojo-attach-point\x3d"planSettingsPanelBackButton"\x3e\r\n                    \x3c/div\x3e\r\n                \x3c/div\x3e\r\n                \x3cdiv class\x3d"esriCTTitleDiv esriCTEllipsis" title\x3d"${nls.planSettings.planSettingsTitle}"\x3e\r\n                    ${nls.planSettings.planSettingsTitle}\r\n                \x3c/div\x3e\r\n            \x3c/div\x3e\r\n            \x3cdiv class\x3d"esriCTPlanSettingsNode" data-dojo-attach-point\x3d"planSettingsNode"\x3e\x3c/div\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n    \x3cdiv class\x3d"esriCTWidgetErrorNode esriCTHidden" data-dojo-attach-point\x3d"widgetErrorNode"\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:widgets/ParcelDrafter/css/style.css":".esriCTMainContainer{min-width: 222px; height: 100%; -webkit-overflow-scrolling: touch; overflow: hidden;}.esriCTOverridePanelStyle{padding: 15px 0 0 0 !important;}.esriCTMapTooltip{width: 100px; word-wrap: break-word; border: 1px solid #7EABCD; background-color: white; padding: 5px; font-size: 9pt; z-index: 9999; -o-border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;}.jimu-widget-ParcelDrafter .esriCTWidgetErrorNode{padding: 0px 20px;}.jimu-widget-ParcelDrafter .esriCTFullHeight{height: 100%;}.jimu-widget-ParcelDrafter .esriCTFullWidth{width: 100%;}.jimu-widget-ParcelDrafter .esriCTEllipsis{overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}.jimu-widget-ParcelDrafter .esriCTCursorPointer{cursor: pointer;}.jimu-widget-ParcelDrafter .esriCTCursorDefault{cursor: pointer;}.jimu-widget-ParcelDrafter .esriCTAlignCenter{text-align: center;}.jimu-widget-ParcelDrafter .esriCTMainPageRow{width: calc(100% - 40px); margin: 20px 20px 20px 20px; display: inline-block;}.jimu-widget-ParcelDrafter .esriCTButtonLabel{float: left; width: calc(100% - 45px); line-height: 35px; padding: 5px 5px 5px 0;}.jimu-widget-ParcelDrafter .esriCTEditTraverseButton{background: url(\"../images/edit-traverse.png\") no-repeat;}.jimu-widget-ParcelDrafter .esriCTNewTraverseButton{background: url(\"../images/new-traverse.png\") no-repeat;}.jimu-widget-ParcelDrafter .esriCTNewTraverseActive{background: url(\"../images/new-traverse-selected.png\") no-repeat; background-color: #8e8e8e;}.jimu-widget-ParcelDrafter .esriCTEditTraverseActive{background: url(\"../images/edit-traverse-selected.png\") no-repeat; background-color: #8e8e8e;}.jimu-widget-ParcelDrafter .esriCTButtonIcon{height: 45px; width: 45px; float: right; background-size: 45px;}.jimu-widget-ParcelDrafter .esriCTParcelToolButtonIcon{height: 45px; width: 45px; float: left; background-size: 45px 45px; background-color: #8e8e8e;}.jimu-widget-ParcelDrafter .esriCTDisabledParcelToolButton{background-color: #e8e8e8 !important; cursor: not-allowed;}.esriRtl .jimu-widget-ParcelDrafter .esriCTButtonIcon{float: left;}.jimu-widget-ParcelDrafter .esriCTTraverseTool{float: left; padding: 5px 5px 0 0; width: calc(100% - 20px);}.esriRtl .jimu-widget-ParcelDrafter .esriCTTraverseTool{float: right; padding: 5px 0 0 5px;}.jimu-widget-ParcelDrafter .esriCTTraverseToolContainer{float: right;}.esriRtl .jimu-widget-ParcelDrafter .esriCTTraverseToolContainer {float: left;}.jimu-widget-ParcelDrafter .esriCTTraverseToolIcons{height: 24px; width: 24px; background-size: 24px; float: left; background-repeat: no-repeat; margin: 5px 0px 5px 20px;}.esriRtl .jimu-widget-ParcelDrafter .esriCTTraverseToolIcons{float: right; margin: 5px 20px 5px 0px;}.jimu-widget-ParcelDrafter .ecriCTLocationIcon{background-image: url('../images/digitization.png');}.jimu-widget-ParcelDrafter .ecriCTUpdateRotationPointIcon{background-image: url('../images/update-rotation.png');}.jimu-widget-ParcelDrafter .ecriCTLocationIcon.esriCTEnableButton{background-image: url('../images/digitization-selected.png'); background-color: #8e8e8e;}.jimu-widget-ParcelDrafter .ecriCTUpdateRotationPointIcon.esriCTEnableButton{background-image: url('../images/update-rotation-selected.png'); background-color: #8e8e8e;}.jimu-widget-ParcelDrafter .ecriCTZoomToIcon{background-image: url('../images/zoom.png');}.jimu-widget-ParcelDrafter .esriCTCollapse{background-image: url('../images/collapse.png');}.jimu-widget-ParcelDrafter .esriCTExpand{background-image: url('../images/expand.png');}.jimu-widget-ParcelDrafter .esriCTNewTraverseHeader{float: left; height: 30px; border-bottom: 1px solid #464646; padding: 0px 10px;}.jimu-widget-ParcelDrafter .esriCTPlanSettingsIcon{background-image: url('../images/settings.png'); height: 20px; width: 20px; background-size: 20px; float: right; background-repeat: no-repeat;}.jimu-widget-ParcelDrafter .esriCTTraverseDetailContainer{float: left; border-top: 1px solid #464646; border-bottom: 1px solid #464646; margin-top: 20px; background-color: #E4E4ED;}.jimu-widget-ParcelDrafter .esriCTMiscloseHeaderDiv{background-color: rgba(0,0,0,0.5);}.jimu-widget-ParcelDrafter .esriCTTraverseResultContainer{width: 100%; height: 25px; line-height: 25px; padding: 0 10px; float: left; text-align: left;}.esriRtl .jimu-widget-ParcelDrafter .esriCTTraverseResultContainer{text-align: right;}.jimu-widget-ParcelDrafter .esriCTParcelLayerContainer {width: calc(100% - 40px); height: 40px; line-height: 40px; padding: 0 10px; float: left; text-align: left;}.esriRtl .jimu-widget-ParcelDrafter .esriCTParcelLayerContainer {text-align: right; float: right;}.jimu-widget-ParcelDrafter .esriCTExpandCollapseParceLayer {background-image: url(../images/right-arrow.png); height: 40px; width: 40px; line-height: 40px; float: right; background-repeat: no-repeat; transform: rotate(90deg); background-position: center center; cursor: pointer;}.jimu-widget-ParcelDrafter .esriCTCollapsedParceLayer {transform: rotate(-90deg);}.jimu-widget-ParcelDrafter .esriCTParcelLayerParent {width: 100%; height: 40px; border-top: 1px solid #464646; border-bottom: 1px solid #464646;}.jimu-widget-ParcelDrafter .esriCTParcelAttributeList {margin: 5px;}.jimu-widget-ParcelDrafter .esriCTGridEmptyLabel {width: 50px; float: left; text-align: left;}.jimu-widget-ParcelDrafter .esriCTGridLabels{width: 70px; float: left; text-align: left; padding-left: 4px;}.jimu-widget-ParcelDrafter .esriCTGridBearingLabel{width: calc(100% - 210px);}.esriRtl .jimu-widget-ParcelDrafter .esriCTGridEmptyLabel{float: right; text-align: right;}.esriRtl .jimu-widget-ParcelDrafter .esriCTGridLabels{float: right; text-align: right; padding-right: 4px; padding-left: 0px;}.jimu-widget-ParcelDrafter .dijitTextBox .dijitInputInner{height: 21px;}.jimu-widget-ParcelDrafter .dijitTextBoxFocused .dijitInputContainer{background: transparent;}.jimu-widget-ParcelDrafter .esriCTTraverseResultsDiv{max-width: 49%; float: left; padding-right: 5px;}.jimu-widget-ParcelDrafter .esriCTTraversedValueDiv{font-weight: bold;}.jimu-widget-ParcelDrafter .esriCTNewTraverseGrid{height: calc(100% - 40px); overflow: auto;}.jimu-widget-ParcelDrafter .esriCTNewTraverseContainer{padding: 10px; width: 100%; display: inline-block;}.jimu-widget-ParcelDrafter .esriCTNewTraverseLabelDiv{display: inline-block; width: 100%;}.jimu-widget-ParcelDrafter .esriCTTraverseGrid{width: 100%; display: table; border-collapse: collapse;}.jimu-widget-ParcelDrafter .esriCTHidden{display: none;}::-ms-clear{display: none;}.jimu-widget-ParcelDrafter .esriCTRotationButton{background-image: url('../images/scale-rotation-active.png');}.jimu-widget-ParcelDrafter .esriCTScaleButton{background-image: url('../images/scale-active.png');}.jimu-widget-ParcelDrafter .esriCTDisableButton .esriCTParcelToolButtonIcon{background-color: inherit;}.jimu-widget-ParcelDrafter .esriCTDisableButton .esriCTRotationButton{background-image: url('../images/scale-rotation.png');}.jimu-widget-ParcelDrafter .esriCTDisableButton .esriCTScaleButton{background-image: url('../images/scale.png');}.jimu-widget-ParcelDrafter .esriCTParcelToolButtonLabel{float: left; max-width: calc(100% - 145px); line-height: 35px; padding: 5px 20px;}.jimu-widget-ParcelDrafter .esriCTParcelToolInputNode{width: 100px; height: 25px; margin-top: 10px; float: right;}.esriRtl .jimu-widget-ParcelDrafter .esriCTParcelToolButtonIcon{float: right;}.esriRtl .jimu-widget-ParcelDrafter .esriCTParcelToolInputNode{float: left;}.esriRtl .jimu-widget-ParcelDrafter .esriCTParcelToolButtonLabel{float: right;}.jimu-widget-ParcelDrafter .esriCTPlanInfoNode{margin: 0 4px; display: inline-block; width: calc(100% - 8px)}.jimu-widget-ParcelDrafter .esriCTPlanInfoButton{width: 80px; margin-top: 10px;}.jimu-widget-ParcelDrafter .esriCTPlanSettingsNode{width: 100%; height: calc(100% - 30px); display: inline-block; overflow-y: auto;}.jimu-widget-ParcelDrafter .esriCTPlanSettingsContainer{margin: 20px; display: inline-block; width: calc(100% - 40px);}.jimu-widget-ParcelDrafter .esriCTPlanSettingRow{padding-bottom: 20px;}.jimu-widget-ParcelDrafter .esriCTDropdownLabel{padding-bottom: 5px;}.jimu-widget-ParcelDrafter .esriCTPlanSettingHeader{float: left; height: 30px; border-bottom: 1px solid #464646; padding: 0px 10px;}.jimu-widget-ParcelDrafter .esriCTBackButton{width: 25%;}.jimu-widget-ParcelDrafter .esriCTTitleDiv{line-height: 10px; font-weight: bold; text-align: center; width: calc(100% - 50px); padding: 5px; display: inline-block;}.jimu-widget-ParcelDrafter .esriCTItemLeftArrow{background-image: url('../images/left-arrow.png'); float: left; margin: 0px 5px 0px 0px; width: 15px; height: 20px; background-repeat: no-repeat; background-position: center center;}.jimu-widget-ParcelDrafter .dijitSelect .dijitButtonContents{border-style: none none none none; background-color: #fafafc;}.jimu-widget-ParcelDrafter .dijitSelect .dijitButtonContentsDartTheme {background-color: inherit;}.jimu-widget-ParcelDrafter .dijitSelect .dijitArrowButton{background-color: #fafafc; background-image: none; border-color: #fafafc;}.jimu-widget-ParcelDrafter .dijitSelect .dijitArrowButtonDartTheme {background-color: rgba(0, 0, 0, 0.5) !important;}.jimu-widget-ParcelDrafter .dijitMenuItem{color: #7989a0;}.jimu-widget-ParcelDrafter .dijitSelect .dijitInputField{margin-right: 8px;}input[type\x3dtext]::-ms-clear{display: none;}.jimu-widget-ParcelDrafter .esriCTRow {clear: both; display: table-row; width: 100%;}.jimu-widget-ParcelDrafter .esriCTNewTraverseGrid{float: left; width: 100%; position: relative; text-align: center; margin: 10px 0px;}.jimu-widget-ParcelDrafter .dijitTextBox .dijitPlaceHolder{font-size: 12px;}.jimu-widget-ParcelDrafter .esriCTRow .dijitTextBox{margin: 0; width: 70px; display: table-cell;}.jimu-widget-ParcelDrafter .dijitTextBoxError {border-color: #d9dde0 !important; box-shadow: inset 0 0 0 2px #d46464;}.jimu-widget-ParcelDrafter .esriCTRow .dijitTextBoxHover{border-color: #d9dde0;}.jimu-widget-ParcelDrafter .esriCTRow .dijitTextBoxFocused{border-color: #d9dde0 !important; box-shadow: none; outline: none;}.jimu-widget-ParcelDrafter .esriCTBearingRow{width: calc(100% - 210px) !important;}.jimu-widget-ParcelDrafter .dojoDndItemAfter .esriCTSymbolContainer, .jimu-widget-ParcelDrafter .dojoDndItemBefore .esriCTSymbolContainer{background: #E4E4ED !important;}.jimu-widget-ParcelDrafter .dojoDndItem, .jimu-widget-demo .dojoDndItemAnchor, .jimu-widget-demo .dojoDndItemSelected, .dojoDndContainerOver, .dojoDndItemOver{background: none; border: none; padding: 0; cursor: move;}.jimu-widget-ParcelDrafter .esriCTDeleteRow, .jimu-widget-ParcelDrafter .esriCTAddRow{color: #CCC; display: table-cell; vertical-align: middle; font-size: 18px; width: 15px;}.jimu-widget-ParcelDrafter .esriCTDeleteIcon, .jimu-widget-ParcelDrafter .esriCTAddIcon{cursor: pointer; height: 30px; width: 15px; margin-left: 5px;}.esriRtl .jimu-widget-ParcelDrafter .esriCTDeleteIcon,.esriRtl .jimu-widget-ParcelDrafter .esriCTAddIcon{margin-right: 5px; margin-left: 0;}.jimu-widget-ParcelDrafter .esriCTDeleteIcon{background: url('../images/delete.png') no-repeat center center;}.jimu-widget-ParcelDrafter .esriCTAddIcon{background: url('../images/add.png') no-repeat center center;}.jimu-widget-ParcelDrafter .esriCTEntryNodeContainer{float: left; width: 100%;}.jimu-widget-ParcelDrafter .esriCTEntrtyNodeContent{width: 100%; display: table; border-collapse: collapse;}.esriCTSymbolContainer{border: 1px solid #dedede; width: 50px; height: 30px; padding: 0px 5px; vertical-align: middle; display: table-cell;}.esriCTSymbolPopup .dijitTooltipContainer{padding: 0px;}.esriCTSymbolListContainer{max-height: 150px; overflow: auto; margin: 6px 0px; width: 170px;}.esriCTSymbolListContent{margin: 0px 6px;}.esriCTSelectedSymbol{width: 30px; height: 25px; overflow: hidden; margin-top: 4px; cursor: pointer;}.esriCTSymbolIcon{width: 35px; vertical-align: middle; margin: 2px 3px 0px 3px; overflow: hidden; display: inline-block;}.esriCTSymbolOption{height: 25px; width: 100%; cursor: pointer; margin-top: 1px; margin-bottom: 1px;}.esriCTSymbolOption:hover{background-color: #edf2f5;}.esriCTSymbolName{display: inline-block; white-space: nowrap; margin-left: 5px; overflow: hidden; text-overflow: ellipsis; width: 95px; color: #7989a0; vertical-align: middle;}.esriRtl .jimu-widget-ParcelDrafter .esriCTButtonLabel{float: right; padding: 5px 0px 5px 5px;}.esriRtl .jimu-widget-ParcelDrafter .esriCTItemLeftArrow{float: right; margin: 0px 0px 00px 10px;}.esriRtl .jimu-widget-ParcelDrafter .esriCTPlanSettingsIcon{float: left;}.esriRtl .jimu-widget-ParcelDrafter .esriCTItemLeftArrow{background-image: url('../images/right-arrow.png');}.esriRtl .jimu-widget-ParcelDrafter .esriCTTraverseResultsDiv{float: right;}.esriRtl .jimu-widget-ParcelDrafter .dijitSelect .dijitInputField{margin-left: 8px; margin-right: 0;}.jimu-widget-ParcelDrafter .esriCTEditParcelDialog{position: absolute; width: 250px; z-index:100;}.jimu-widget-ParcelDrafter .esriCTParcelInfoPopup{display: table; border-collapse: collapse; width: 100%;}.jimu-widget-ParcelDrafter .esriCTParcelInfoLabels{height: 20px; display: table-cell; text-align: center; text-overflow: ellipsis; overflow: hidden; word-wrap: nowrap; margin-right: 5px;}.jimu-widget-ParcelDrafter .esriCTLabelRows{display: table-row;}.jimu-widget-ParcelDrafter .esriCTParcelInfoPopup .esriCTRowContainer{display: table-row;}.jimu-widget-ParcelDrafter .jimu-widget-ParcelDrafter-XYInput .xyRowWrapper {margin: 5px;}.jimu-widget-ParcelDrafter .atiButton, .jimu-widget-ParcelDrafter .esriCTAttributeInspectorContainer .atiLayerName {display: none;}.jimu-widget-ParcelDrafter .esriCTAttributeInspectorContainer .atiButtons {display: none;}.jimu-widget-ParcelDrafter .esriCTAttributeInspectorContainer td {display: block; clear: both; height: auto; width: 100%; float: left;}.jimu-widget-ParcelDrafter .esriCTAttributeInspectorContainer table {width: 100%;}.jimu-widget-ParcelDrafter .esriCTAttributeInspectorContainer .atiField {width: 100%;}.jimu-widget-ParcelDrafter .esriCTAttributeInspectorContainer .atiLabel {margin-top: 6px !important; margin-bottom: 3px !important; text-align: left;}.jimu-rtl .jimu-widget-ParcelDrafter .esriCTAttributeInspectorContainer .atiLabel {text-align: right;}.jimu-widget-ParcelDrafter .esriCTAttributeInspectorContainer .dijitTextBox {width: 100% !important;}.jimu-widget-ParcelDrafter .esriCTAttributeInspectorContainer .dijitTextArea {width: 100% !important; min-height: 70px; resize: vertical; overflow: auto; font-family: inherit; line-height: 20px !important; font-size: 14px;}.jimu-widget-ParcelDrafter .atiAttributes {height: 100%; padding-right: 2px;}.jimu-rtl .jimu-widget-ParcelDrafter .atiAttributes {padding-right: 0px; padding-left: 2px;}",
"*now":function(F){F(['dojo/i18n!*preload*widgets/ParcelDrafter/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 jimu/BaseWidget dojo/_base/array dojo/_base/lang dojo/dom-class dojo/dom-attr dojo/dom-construct dojo/dom-style dojo/on ./PlanSettings ./XYInput ./NewTraverse ./MapTooltipHandler ./layerUtils esri/tasks/GeometryService jimu/dijit/Message jimu/dijit/LoadingIndicator esri/tasks/query esri/geometry/Extent esri/request jimu/utils dijit/focus dojo/keys".split(" "),function(F,c,k,m,n,f,p,d,v,C,w,l,q,K,A,r,t,B,M,I,O,R,P){return F([c],{baseClass:"jimu-widget-ParcelDrafter",_prevOpenPanel:"mainPage",
_newTraverseInstance:null,_planSettingsInstance:null,_mapTooltipHandler:null,_startPoint:null,geometryService:null,_lineLayerSpatialReference:null,_polygonLayerSpatialReference:null,_isUpdateStartPoint:null,_featureReductionEnabledLayers:[],postMixInProperties:function(){this.nls.common={};m.mixin(this.nls.common,window.jimuNls.common)},postCreate:function(){this.inherited(arguments);this.openAtStartAysn=!0;if(this.appConfig.geometryService){this.geometryService=new A(this.appConfig.geometryService);
if(!this._isValidConfig())return this._showErrorInWidgetPanel(this.nls.invalidConfigMsg),!1;this._layerUtils=new K({map:this.map,getPopupInfo:!0,getRenderer:!1});m.mixin(this.config.polylineLayer,this._layerUtils.getLayerDetailsFromMap(this.config.polylineLayer.baseURL,this.config.polylineLayer.layerId,this.config.polylineLayer.id));m.mixin(this.config.polygonLayer,this._layerUtils.getLayerDetailsFromMap(this.config.polygonLayer.baseURL,this.config.polygonLayer.layerId,this.config.polygonLayer.id));
this._initLoading();this._getSpatialReferenceOfParcelLayers();this._setFirstLastNodeInWidget()}else this._showErrorInWidgetPanel(this.nls.geometryServiceURLNotFoundMSG)},startup:function(){this.inherited(arguments);n.add(this.domNode.parentElement,"esriCTOverridePanelStyle");this._featureReductionEnabledLayers=[];k.forEach(this.config.snappingLayers,function(G){G=this.map.getLayer(G.id);G.isFeatureReductionEnabled&&G.isFeatureReductionEnabled()&&this._featureReductionEnabledLayers.push(G)},this)},
onOpen:function(){this._mapTooltipHandler&&"mainPage"!==this._prevOpenPanel&&(this._isUpdateStartPoint=!0,this._mapTooltipHandler.connectEventHandler(this.nls.mapTooltipForUpdateStartPoint),this._toggleSnapping(!0));O.isAutoFocusFirstNodeWidget(this)&&O.focusFirstFocusNode(this.domNode)},onActive:function(){k.forEach(this._featureReductionEnabledLayers,function(G){G.disableFeatureReduction()})},onDeActive:function(){k.forEach(this._featureReductionEnabledLayers,function(G){G.enableFeatureReduction()})},
onClose:function(){if("planSettingsPage"===this._prevOpenPanel)this._planSettingsInstance.onClose();this._mapTooltipHandler&&(this._toggleSnapping(!1),this._mapTooltipHandler.disconnectEventHandler(),n.replace(this.newTraverseButton,"esriCTNewTraverseButton","esriCTNewTraverseActive"),n.replace(this.editTraverseButton,"esriCTEditTraverseButton","esriCTEditTraverseActive"),f.set(this.newTraverseButton,"aria-pressed","false"),f.set(this.editTraverseButton,"aria-pressed","false"),this.newTraverseSelectMessageNode.innerHTML=
"",n.add(this.newTraverseSelectMessageNodeWrapper,"esriCTHidden"),this._newTraverseInstance.deActivateDigitizationTool(),this._newTraverseInstance.deactivateParcelTools(),this._newTraverseInstance.closePopup())},destroy:function(){k.forEach(this._featureReductionEnabledLayers,function(G){G.enableFeatureReduction()});this.inherited(arguments)},_initWidgetWorkFlow:function(){this._handleClickEvents();this._createMapTooltipHandler();this._createNewTraverse();this._createPlanSettings();this._createXYInput()},
_isValidConfig:function(){var G=!0;this.config?(this.config.polygonLayer&&this.map.getLayer(this.config.polygonLayer.id)||(G=!1),this.config.polylineLayer&&this.map.getLayer(this.config.polylineLayer.id)||(G=!1)):G=!1;return G},_initLoading:function(){this.loading=new t({hidden:!0});this.loading.placeAt(this.domNode);this.loading.startup()},_getSpatialReferenceOfParcelLayers:function(){var G;this.loading.show();I({url:this.config.polylineLayer.url,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(m.hitch(this,
function(U){this._lineLayerSpatialReference=U.extent.spatialReference;G=I({url:this.config.polygonLayer.url,content:{f:"json"},handleAs:"json",callbackParamName:"callback"});G.then(m.hitch(this,function(Q){this.loading.hide();this._polygonLayerSpatialReference=Q.extent.spatialReference;this._initWidgetWorkFlow()}))}))},_newTraverseButtonClicked:function(){this._mapTooltipHandler.disconnectEventHandler();this._newTraverseInstance.clearAll();n.contains(this.newTraverseButton,"esriCTNewTraverseActive")?
(this._toggleSnapping(!1),n.replace(this.newTraverseButton,"esriCTNewTraverseButton","esriCTNewTraverseActive"),f.set(this.newTraverseButton,"aria-pressed","false"),this.newTraverseSelectMessageNode.innerHTML="",n.add(this.newTraverseSelectMessageNodeWrapper,"esriCTHidden")):(n.replace(this.editTraverseButton,"esriCTEditTraverseButton","esriCTEditTraverseActive"),n.replace(this.newTraverseButton,"esriCTNewTraverseActive","esriCTNewTraverseButton"),f.set(this.newTraverseButton,"aria-pressed","true"),
f.set(this.editTraverseButton,"aria-pressed","false"),this._mapTooltipHandler.connectEventHandler(this.nls.mapTooltipForStartNewTraverse),this._isUpdateStartPoint=!0,this._toggleSnapping(!0),this.newTraverseSelectMessageNode.innerHTML=this.nls.mapTooltipForStartNewTraverse,n.remove(this.newTraverseSelectMessageNodeWrapper,"esriCTHidden"),this._xyInputInstance.resetXYTextBoxes());this._setFirstLastNodeInWidget()},_editTraverseButtonClicked:function(){this._mapTooltipHandler.disconnectEventHandler();
this._newTraverseInstance.clearAll();n.contains(this.editTraverseButton,"esriCTEditTraverseActive")?(n.replace(this.editTraverseButton,"esriCTEditTraverseButton","esriCTEditTraverseActive"),f.set(this.editTraverseButton,"aria-pressed","false"),this.newTraverseSelectMessageNode.innerHTML="",n.add(this.newTraverseSelectMessageNodeWrapper,"esriCTHidden")):(n.replace(this.newTraverseButton,"esriCTNewTraverseButton","esriCTNewTraverseActive"),n.replace(this.editTraverseButton,"esriCTEditTraverseActive",
"esriCTEditTraverseButton"),f.set(this.editTraverseButton,"aria-pressed","true"),f.set(this.newTraverseButton,"aria-pressed","false"),this._mapTooltipHandler.connectEventHandler(this.nls.mapTooltipForEditNewTraverse),this.newTraverseSelectMessageNode.innerHTML=this.nls.mapTooltipForEditNewTraverse);this._setFirstLastNodeInWidget()},_handleClickEvents:function(){this.own(v(this.planSettingsButton,"click",m.hitch(this,function(){this._showPanel("planSettingsPage")})));this.own(v(this.planSettingsButton,
"keydown",m.hitch(this,function(G){G.keyCode!==P.ENTER&&G.keyCode!==P.SPACE||this._showPanel("planSettingsPage")})));this.own(v(this.newTraverseButton,"click",m.hitch(this,this._newTraverseButtonClicked)));this.own(v(this.newTraverseButton,"keydown",m.hitch(this,function(G){G.keyCode!==P.ENTER&&G.keyCode!==P.SPACE||this._newTraverseButtonClicked()})));this.own(v(this.editTraverseButton,"click",m.hitch(this,this._editTraverseButtonClicked)));this.own(v(this.editTraverseButton,"keydown",m.hitch(this,
function(G){G.keyCode!==P.ENTER&&G.keyCode!==P.SPACE||this._editTraverseButtonClicked()})));this.own(v(this.planSettingsPanelBackButton,"click",m.hitch(this,function(){this._planSettingsInstance.onClose();this._showPanel("traversePage")})));this.own(v(this.planSettingsPanelBackButton,"keydown",m.hitch(this,function(G){if(G.keyCode===P.ENTER||G.keyCode===P.SPACE)this._planSettingsInstance.onClose(),this._showPanel("traversePage"),R.focus(this.planSettingsButton)})));this.own(v(this.traversePanelBackButton,
"click",m.hitch(this,this._confirmCancelTraverse)));this.own(v(this.traversePanelBackButton,"keydown",m.hitch(this,function(G){G.keyCode!==P.ENTER&&G.keyCode!==P.SPACE||this._confirmCancelTraverse()})))},_setSnappingLayers:function(){var G=[],U,Q;if(this.config.snappingLayers&&this.config.snappingLayers.length)for(Q=0;Q<this.config.snappingLayers.length;Q++)(U=this.map.getLayer(this.config.snappingLayers[Q].id))&&G.push({layer:U});this._isUpdateStartPoint||this._newTraverseInstance.parcelPointsGraphicsLayer&&
G.push({layer:this._newTraverseInstance.parcelPointsGraphicsLayer});this.map.snappingManager&&this.map.snappingManager.setLayerInfos(G)},_toggleSnapping:function(G){this.map.snappingManager&&(this.map.snappingManager._deactivateSnapping(),this.map.disableSnapping());G&&!this.map.snappingManager&&(this.map.enableSnapping({tolerance:this.config.snappingTolerance,snapToEdge:!0,snapToPoint:!0,snapToVertex:!0,alwaysSnap:!0}),this._setSnappingLayers(),this.map.snappingManager._setUpSnapping())},_confirmCancelTraverse:function(){this._newTraverseInstance.closePopup();
var G=new r({message:this.nls.clearingDataConfirmationMessage,type:"question",buttons:[{label:this.nls.common.yes,onClick:m.hitch(this,function(){G.close();this._resetOnBackToMainPage(!0)})},{label:this.nls.common.no}]})},_resetOnBackToMainPage:function(G){this._startPoint=null;n.replace(this.newTraverseButton,"esriCTNewTraverseButton","esriCTNewTraverseActive");n.replace(this.editTraverseButton,"esriCTEditTraverseButton","esriCTEditTraverseActive");f.set(this.newTraverseButton,"aria-pressed","false");
f.set(this.editTraverseButton,"aria-pressed","false");this.newTraverseSelectMessageNode.innerHTML="";n.add(this.newTraverseSelectMessageNodeWrapper,"esriCTHidden");this._toggleSnapping(!1);this._mapTooltipHandler.disconnectEventHandler();this._newTraverseInstance.clearAll();this._showPanel("mainPage");G&&R.focus(this.newTraverseButton)},_createMapTooltipHandler:function(){this._mapTooltipHandler=new q({toolTipText:this.nls.mapTooltipForStartNewTraverse,map:this.map});this._isUpdateStartPoint=!0;this.own(this._mapTooltipHandler.on("clicked",
m.hitch(this,function(G){if(this.map&&this.map.snappingManager){var U=this.map.snappingManager.getSnappingPoint(G.screenPoint);U.then(m.hitch(this,function(Q){this._onMapPointSelected(Q?Q:G.mapPoint)}))}else this._onMapPointSelected(G.mapPoint)})));this.own(this._mapTooltipHandler.on("dragging",m.hitch(this,function(G){this._startPoint&&(this._mapTooltipHandler.toolTipText===this.nls.mapTooltipForRotate?this._newTraverseInstance.setRotation(G.mapPoint):this._mapTooltipHandler.toolTipText===this.nls.mapTooltipForScale&&
this._newTraverseInstance.setScaling(G.mapPoint))})));this.own(this._mapTooltipHandler.on("moving",m.hitch(this,function(G){this._mapTooltipHandler.toolTipText===this.nls.mapTooltipForUpdateStartPoint&&this._startPoint&&this._newTraverseInstance._showParcelPopup(G).then(m.hitch(this,function(U){U&&d.set(this._mapTooltipHandler._mapTooltip,"display","none")}))})));this._mapTooltipHandler.startup()},_onMapPointSelected:function(G,U){this._mapTooltipHandler.toolTipText!==this.nls.mapTooltipForUpdatingRotaionPoint&&
(this._mapTooltipHandler.toolTipText===this.nls.mapTooltipForScreenDigitization?this._newTraverseInstance.pointAddedFromDigitization(G):(this._startPoint||(this._mapTooltipHandler.toolTipText===this.nls.mapTooltipForEditNewTraverse?(this._startPoint=G,this._getPolygonForEdits(G)):(f.set(this.traverseTitleNode,"innerHTML",this.nls.newTraverseTitle),f.set(this.traverseTitleNode,"title",this.nls.newTraverseTitle),this._showPanel("traversePage"),R.focus(this.traversePanelBackButton),this._mapTooltipHandler.updateTooltip(this.nls.mapTooltipForUpdateStartPoint))),
this._startPoint=G,this._newTraverseInstance.setStartPoint(this._startPoint,!0,!0,U),R.focus(this.traversePanelBackButton)))},_getPolygonForEdits:function(G,U){this.loading.show();var Q=(new Date).getTime();var W=new B;var J=this.map.getLayer(this.config.polygonLayer.id);W.geometry=G;W.outSpatialReference=this.map.spatialReference;W.returnGeometry=!1;W.outFields=["*"];W.where=Q+"\x3d"+Q;J?J.queryFeatures(U?U:W,m.hitch(this,function(V){this.loading.hide();if(V&&0<V.features.length)for(this._newTraverseInstance.polygonDeleteArr=
V.features;0<V.features.length;){this._getLinesForEdits(V.features[0]);break}else U?(this._startPoint=null,this._showMessage(this.nls.unableToFetchParcelMessage)):this._getPolygonFromLinesForEdits(G)}),m.hitch(this,function(){this.loading.hide();this._startPoint=null;this._showMessage(this.nls.unableToFetchParcelMessage)})):(this.loading.hide(),this._startPoint=null,this._showMessage(this.nls.unableToFetchParcelMessage))},pointToExtent:function(G,U,Q){if(0===Q)return U;var W=G.extent.getWidth()/G.width;
Q*=W;return new M(U.x-Q,U.y-Q,U.x+Q,U.y+Q,G.spatialReference)},_getPolygonFromLinesForEdits:function(G){this.loading.show();var U=(new Date).getTime();var Q=new B;var W=this.map.getLayer(this.config.polylineLayer.id);Q.geometry=this.pointToExtent(this.map,G,5);Q.outSpatialReference=this.map.spatialReference;Q.returnGeometry=!1;Q.outFields=["*"];Q.where=U+"\x3d"+U;W?W.queryFeatures(Q,m.hitch(this,function(J){this.loading.hide();if(J&&0<J.features.length&&J.features[0].attributes&&J.features[0].attributes[this.config.polylineLayer.relatedGUID.name]){var V=
new B,y=(new Date).getTime();V.where=y+"\x3d"+y+" and "+this.config.polygonLayer.relatedGUID.name+"\x3d'"+J.features[0].attributes[this.config.polylineLayer.relatedGUID.name]+"'";this._getPolygonForEdits(G,V)}else this._startPoint=null,this._showMessage(this.nls.unableToFetchParcelMessage)}),m.hitch(this,function(){this.loading.hide();this._startPoint=null;this._showMessage(this.nls.unableToFetchParcelMessage)})):(this.loading.hide(),this._startPoint=null,this._showMessage(this.nls.unableToFetchParcelMessage))},
_sortFeatureAccToSequenceID:function(G){var U=this.config.polylineLayer.sequenceId.name;G.sort(function(Q,W){return Q.attributes[U]-W.attributes[U]});return G},_getLinesForEdits:function(G){this.loading.show();var U=G.attributes[this.config.polygonLayer.relatedGUID.name];G=new B;G.outSpatialReference=this.map.spatialReference;G.returnGeometry=!0;G.outFields=["*"];G.where=this.config.polylineLayer.relatedGUID.name+"\x3d'"+U+"'";(U=this.map.getLayer(this.config.polylineLayer.id))?U.queryFeatures(G,
m.hitch(this,function(Q){this.loading.hide();Q&&0<Q.features.length?(Q.features=this._sortFeatureAccToSequenceID(Q.features),this._newTraverseInstance.polylineDeleteArr=Q.features,this._startPoint=Q.features[0].geometry.getPoint(0,0),f.set(this.traverseTitleNode,"innerHTML",this.nls.editTraverseTitle),f.set(this.traverseTitleNode,"title",this.nls.editTraverseTitle),this._newTraverseInstance.initEditing(this._startPoint,Q,this._lineLayerSpatialReference),this._toggleSnapping(!0),this._showPanel("traversePage"),
R.focus(this.traversePanelBackButton),this._mapTooltipHandler.updateTooltip(this.nls.mapTooltipForUpdateStartPoint)):(this._startPoint=null,this._showMessage(this.nls.unableToFetchParcelLinesMessage))}),m.hitch(this,function(){this.loading.hide();this._startPoint=null;this._showMessage(this.nls.unableToFetchParcelLinesMessage)})):(this.loading.hide(),this._startPoint=null,this._showMessage(this.nls.unableToFetchParcelLinesMessage))},_createNewTraverse:function(){this._newTraverseInstance=new l({nls:this.nls,
config:this.config,map:this.map,loading:this.loading,geometryService:this.geometryService,appConfig:this.appConfig,lineLayerSpatialReference:this._lineLayerSpatialReference,polygonLayerSpatialReference:this._polygonLayerSpatialReference,widgetDomNode:this.domNode},this.traverseNode);this.own(this._newTraverseInstance.on("showMessage",m.hitch(this,this._showMessage)));this.own(this._newTraverseInstance.on("showParcelSavedAndDeleteMsg",m.hitch(this,this._showParcelSavedAndDeleteMsg)));this.own(this._newTraverseInstance.on("activateDigitizationTool",
m.hitch(this,function(){this._onActivateDigitization()})));this.own(this._newTraverseInstance.on("deActivateDigitizationTool",m.hitch(this,function(){this._onDeactivateDigitization()})));this.own(this._newTraverseInstance.on("activateUpdateRotationPointTool",m.hitch(this,function(){this._onActivateUpdateRotationPoint()})));this.own(this._newTraverseInstance.on("deActivateUpdateRotationPointTool",m.hitch(this,function(){this._onDeactivateUpdateRotationPoint()})));this.own(this._newTraverseInstance.on("cancelTraverse",
m.hitch(this,function(){this._confirmCancelTraverse()})));this.own(this._newTraverseInstance.on("displayMainPageAfterSave",m.hitch(this,function(G){this._resetOnBackToMainPage(G)})));this.own(this._newTraverseInstance.on("toggleRotating",m.hitch(this,function(G){this._toggleRotating(G)})));this.own(this._newTraverseInstance.on("toggleScaling",m.hitch(this,function(G){this._toggleScaling(G)})))},_toggleRotating:function(G){G?(this._mapTooltipHandler.connectMouseDragHandler(this.nls.mapTooltipForRotate),
this._newTraverseInstance.deActivateDigitizationTool(),this._newTraverseInstance.deActivateUpdateRotationPointTool()):(this._isUpdateStartPoint=!0,this._mapTooltipHandler.disconnectEventHandler(),this._mapTooltipHandler.connectEventHandler(this.nls.mapTooltipForUpdateStartPoint));this._toggleSnapping(!G)},_toggleScaling:function(G){G?(this._mapTooltipHandler.connectMouseDragHandler(this.nls.mapTooltipForScale),this._newTraverseInstance.deActivateDigitizationTool(),this._newTraverseInstance.deActivateUpdateRotationPointTool()):
(this._newTraverseInstance.distance=null,this._isUpdateStartPoint=!0,this._mapTooltipHandler.disconnectEventHandler(),this._mapTooltipHandler.connectEventHandler(this.nls.mapTooltipForUpdateStartPoint));this._toggleSnapping(!G)},_onActivateDigitization:function(){this._mapTooltipHandler.disconnectEventHandler();this._mapTooltipHandler.connectEventHandler(this.nls.mapTooltipForScreenDigitization);this._newTraverseInstance.deactivateParcelTools();this._isUpdateStartPoint=!1;this._toggleSnapping(!0)},
_onDeactivateDigitization:function(){this._mapTooltipHandler.updateTooltip(this.nls.mapTooltipForUpdateStartPoint);this._isUpdateStartPoint=!0;this._toggleSnapping(!0)},_onActivateUpdateRotationPoint:function(){this._mapTooltipHandler.disconnectEventHandler();this._mapTooltipHandler.connectEventHandler(this.nls.mapTooltipForUpdatingRotaionPoint);this._newTraverseInstance.deactivateParcelTools();this._isUpdateStartPoint=!1;this._toggleSnapping(!0)},_onDeactivateUpdateRotationPoint:function(){this._mapTooltipHandler.updateTooltip(this.nls.mapTooltipForUpdateStartPoint);
this._isUpdateStartPoint=!0;this._toggleSnapping(!0)},_createPlanSettings:function(){this._planSettingsInstance=new C({nls:this.nls,config:this.config,appConfig:this.appConfig,widgetId:this.id,widgetDomNode:this.domNode},p.create("div",{},this.planSettingsNode));this.own(this._planSettingsInstance.on("planSettingsChanged",m.hitch(this,function(G){this._newTraverseInstance.updateAccordingToPlanSettings(G)})));this._planSettingsInstance.startup()},_createXYInput:function(){this._xyInputInstance=(new w({nls:this.nls,
config:this.config,appConfig:this.appConfig,map:this.map,widgetDomNode:this.domNode})).placeAt(this.newTraverseSelectMessageNodeWrapper,"last");this.own(this._xyInputInstance.on("newPoint",m.hitch(this,function(G){this._onMapPointSelected(G,!0)})));this._xyInputInstance.startup()},_showPanel:function(G){if(this._prevOpenPanel){var U=this._getNodeByName(this._prevOpenPanel);n.add(U,"esriCTHidden")}U=this._getNodeByName(G);n.remove(U,"esriCTHidden");this._prevOpenPanel=G;setTimeout(m.hitch(this,function(){this._setFirstLastNodeInWidget()}),
100)},_showMessage:function(G){(new r({message:G,buttons:[{label:this.nls.common.ok}]})).message=G},_showErrorInWidgetPanel:function(G){f.set(this.widgetErrorNode,"innerHTML",G);n.add(this.widgetMainNode,"esriCTHidden");n.remove(this.widgetErrorNode,"esriCTHidden")},_getNodeByName:function(G){switch(G){case "mainPage":var U=this.mainPageNode;break;case "traversePage":U=this.traversePageNode;break;case "planSettingsPage":U=this.planSettingsPageNode}return U},_setFirstLastNodeInWidget:function(){!n.contains(this.mainPageNode,
"esriCTHidden")&&n.contains(this.newTraverseSelectMessageNodeWrapper,"esriCTHidden")?(O.initFirstFocusNode(this.domNode,this.newTraverseButton),O.initLastFocusNode(this.domNode,this.editTraverseButton)):n.contains(this.mainPageNode,"esriCTHidden")||n.contains(this.newTraverseSelectMessageNodeWrapper,"esriCTHidden")?n.contains(this.traversePageNode,"esriCTHidden")?n.contains(this.planSettingsPageNode,"esriCTHidden")||(O.initFirstFocusNode(this.domNode,this.planSettingsPanelBackButton),R.focus(this.planSettingsPanelBackButton),
this._planSettingsInstance.updateLastNodeInPlanSetting()):(O.initFirstFocusNode(this.domNode,this.traversePanelBackButton),this._newTraverseInstance.updateLastNodeInTraversePanel()):(O.initFirstFocusNode(this.domNode,this.newTraverseButton),this._xyInputInstance._updateLastFocusNode())},_showParcelSavedAndDeleteMsg:function(G){var U=new r({message:G,buttons:[{label:this.nls.common.ok,onClick:m.hitch(this,function(){U.close();setTimeout(m.hitch(this,function(){R.focus(this.newTraverseButton)}),100)})}]});
U.message=G}})});