/*
 COPYRIGHT 2009 ESRI

 TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
 Unpublished material - all rights reserved under the
 Copyright Laws of the United States and applicable international
 laws, treaties, and conventions.

 For additional information, contact:
 Environmental Systems Research Institute, Inc.
 Attn: Contracts and Legal Services Department
 380 New York Street
 Redlands, California, 92373
 USA

 email: contracts@esri.com
 */
//>>built
require({cache:{"url:dijit/templates/CheckedMenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&#160;</td>\n</tr>\n","esri/layers/FeatureEditResult":function(){define("esri/layers/FeatureEditResult",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel"],function(_1,_2,_3,_4){var _5=_1(null,{declaredClass:"esri.layers.FeatureEditResult",constructor:function(_6){if(_6&&_2.isObject(_6)){this.objectId=_6.objectId;this.success=_6.success;if(!_6.success){var _7=_6.error;this.error=new Error();this.error.code=_7.code;this.error.message=_7.description;}}}});if(_3("extend-esri")){_2.setObject("layers.FeatureEditResult",_5,_4);}return _5;});},"dijit/form/TextBox":function(){require({cache:{"url:dijit/form/templates/TextBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\" id=\"widget_${id}\" role=\"presentation\"\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class=\"dijitReset dijitInputInner\" data-dojo-attach-point='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${!nameAttrSetting} type='${type}'\n\t/></div\n></div>\n"}});define("dijit/form/TextBox",["dojo/_base/declare","dojo/dom-construct","dojo/dom-style","dojo/_base/kernel","dojo/_base/lang","dojo/sniff","./_FormValueWidget","./_TextBoxMixin","dojo/text!./templates/TextBox.html","../main"],function(_8,_9,_a,_b,_c,_d,_e,_f,_10,_11){var _12=_8("dijit.form.TextBox",[_e,_f],{templateString:_10,_singleNodeTemplate:"<input class=\"dijit dijitReset dijitLeft dijitInputField\" data-dojo-attach-point=\"textbox,focusNode\" autocomplete=\"off\" type=\"${type}\" ${!nameAttrSetting} />",_buttonInputDisabled:_d("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var _13=this.type.toLowerCase();if(this.templateString&&this.templateString.toLowerCase()=="input"||((_13=="hidden"||_13=="file")&&this.templateString==this.constructor.prototype.templateString)){this.templateString=this._singleNodeTemplate;}this.inherited(arguments);},postCreate:function(){this.inherited(arguments);if(_d("ie")<9){this.defer(function(){try{var s=_a.getComputedStyle(this.domNode);if(s){var ff=s.fontFamily;if(ff){var _14=this.domNode.getElementsByTagName("INPUT");if(_14){for(var i=0;i<_14.length;i++){_14[i].style.fontFamily=ff;}}}}}catch(e){}});}},_onInput:function(e){this.inherited(arguments);if(this.intermediateChanges){this.defer(function(){this._handleOnChange(this.get("value"),false);});}},_setPlaceHolderAttr:function(v){this._set("placeHolder",v);if(!this._phspan){this._attachPoints.push("_phspan");this._phspan=_9.create("span",{onmousedown:function(e){e.preventDefault();},className:"dijitPlaceHolder dijitInputField"},this.textbox,"after");}this._phspan.innerHTML="";this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(v));this._updatePlaceHolder();},_updatePlaceHolder:function(){if(this._phspan){this._phspan.style.display=(this.placeHolder&&!this.focused&&!this.textbox.value)?"":"none";}},_setValueAttr:function(_15,_16,_17){this.inherited(arguments);this._updatePlaceHolder();},getDisplayedValue:function(){_b.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use get('displayedValue') instead.","","2.0");return this.get("displayedValue");},setDisplayedValue:function(_18){_b.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",_18);},_onBlur:function(e){if(this.disabled){return;}this.inherited(arguments);this._updatePlaceHolder();if(_d("mozilla")){if(this.selectOnClick){this.textbox.selectionStart=this.textbox.selectionEnd=undefined;}}},_onFocus:function(by){if(this.disabled||this.readOnly){return;}this.inherited(arguments);this._updatePlaceHolder();}});if(_d("ie")){_12.prototype._isTextSelected=function(){var _19=this.ownerDocument.selection.createRange();var _1a=_19.parentElement();return _1a==this.textbox&&_19.text.length>0;};_11._setSelectionRange=_f._setSelectionRange=function(_1b,_1c,_1d){if(_1b.createTextRange){var r=_1b.createTextRange();r.collapse(true);r.moveStart("character",-99999);r.moveStart("character",_1c);r.moveEnd("character",_1d-_1c);r.select();}};}return _12;});},"esri/tasks/QueryTask":function(){define("esri/tasks/QueryTask",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/Deferred","dojo/_base/json","dojo/has","esri/kernel","esri/request","esri/deferredUtils","esri/geometry/normalizeUtils","esri/tasks/Task","esri/tasks/FeatureSet"],function(_1e,_1f,_20,_21,_22,has,_23,_24,_25,_26,_27,_28){var _29=_1e(_27,{declaredClass:"esri.tasks.QueryTask",_eventMap:{"complete":["featureSet"],"execute-for-count-complete":["count"],"execute-for-ids-complete":["objectIds"],"execute-relationship-query-complete":["featureSets"]},constructor:function(url,_2a){this._handler=_1f.hitch(this,this._handler);this._relationshipQueryHandler=_1f.hitch(this,this._relationshipQueryHandler);this._executeForIdsHandler=_1f.hitch(this,this._executeForIdsHandler);this._countHandler=_1f.hitch(this,this._countHandler);this.source=_2a&&_2a.source;this.gdbVersion=_2a&&_2a.gdbVersion;this.registerConnectEvents();},__msigns:[{n:"execute",c:4,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForIds",c:3,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForCount",c:3,a:[{i:0,p:["geometry"]}],e:2}],onComplete:function(){},onExecuteRelationshipQueryComplete:function(){},onExecuteForIdsComplete:function(){},onExecuteForCountComplete:function(){},execute:function(_2b,_2c,_2d,_2e,_2f){var _30=_2f.assembly,_31=this._encode(_1f.mixin({},this._url.query,{f:"json"},_2b.toJson(_30&&_30[0]))),_32=this._handler,_33=this._errorHandler;if(this.source){var _34={source:this.source.toJson()};_31.layer=_22.toJson(_34);}if(this.gdbVersion){_31.gdbVersion=this.gdbVersion;}return _24({url:this._url.path+"/query",content:_31,callbackParamName:"callback",load:function(r,i){_32(r,i,_2c,_2d,_2f.dfd);},error:function(r){_33(r,_2d,_2f.dfd);},callbackSuffix:_2e});},executeRelationshipQuery:function(_35,_36,_37){var _38=this._encode(_1f.mixin({},this._url.query,{f:"json"},_35.toJson())),_39=this._relationshipQueryHandler,_3a=this._errorHandler;if(this.gdbVersion){_38.gdbVersion=this.gdbVersion;}var dfd=new _21(_25._dfdCanceller);dfd._pendingDfd=_24({url:this._url.path+"/queryRelatedRecords",content:_38,callbackParamName:"callback",load:function(r,i){_39(r,i,_36,_37,dfd);},error:function(r){_3a(r,_37,dfd);}});return dfd;},executeForIds:function(_3b,_3c,_3d,_3e){var _3f=_3e.assembly,_40=this._encode(_1f.mixin({},this._url.query,{f:"json",returnIdsOnly:true},_3b.toJson(_3f&&_3f[0]))),_41=this._executeForIdsHandler,_42=this._errorHandler;if(this.source){var _43={source:this.source.toJson()};_40.layer=_22.toJson(_43);}if(this.gdbVersion){_40.gdbVersion=this.gdbVersion;}return _24({url:this._url.path+"/query",content:_40,callbackParamName:"callback",load:function(r,i){_41(r,i,_3c,_3d,_3e.dfd);},error:function(r){_42(r,_3d,_3e.dfd);}});},executeForCount:function(_44,_45,_46,_47){var _48=_47.assembly,_49=this._encode(_1f.mixin({},this._url.query,{f:"json",returnIdsOnly:true,returnCountOnly:true},_44.toJson(_48&&_48[0]))),_4a=this._countHandler,_4b=this._errorHandler;if(this.source){var _4c={source:this.source.toJson()};_49.layer=_22.toJson(_4c);}if(this.gdbVersion){_49.gdbVersion=this.gdbVersion;}return _24({url:this._url.path+"/query",content:_49,callbackParamName:"callback",load:function(r,i){_4a(r,i,_45,_46,_47.dfd);},error:function(r){_4b(r,_46,_47.dfd);}});},_handler:function(_4d,io,_4e,_4f,dfd){try{var _50=new _28(_4d);this._successHandler([_50],"onComplete",_4e,dfd);}catch(err){this._errorHandler(err,_4f,dfd);}},_relationshipQueryHandler:function(_51,io,_52,_53,dfd){try{var gt=_51.geometryType,sr=_51.spatialReference,_54={};_20.forEach(_51.relatedRecordGroups,function(gr){var _55={};_55.geometryType=gt;_55.spatialReference=sr;_55.features=gr.relatedRecords;var _56=new _28(_55);_54[gr.objectId]=_56;});this._successHandler([_54],"onExecuteRelationshipQueryComplete",_52,dfd);}catch(err){this._errorHandler(err,_53,dfd);}},_executeForIdsHandler:function(_57,io,_58,_59,dfd){try{this._successHandler([_57.objectIds],"onExecuteForIdsComplete",_58,dfd);}catch(err){this._errorHandler(err,_59,dfd);}},_countHandler:function(_5a,io,_5b,_5c,dfd){try{var _5d,_5e=_5a.features,ids=_5a.objectIds;if(ids){_5d=ids.length;}else{if(_5e){throw new Error("Unable to perform query. Please check your parameters.");}else{_5d=_5a.count;}}this._successHandler([_5d],"onExecuteForCountComplete",_5b,dfd);}catch(err){this._errorHandler(err,_5c,dfd);}}});_26._createWrappers(_29);if(has("extend-esri")){_1f.setObject("tasks.QueryTask",_29,_23);}return _29;});},"esri/dijit/editing/tools/ToolBase":function(){define("esri/dijit/editing/tools/ToolBase",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","dojo/i18n!esri/nls/jsapi"],function(_5f,_60,has,_61,_62){var _63=_5f(null,{declaredClass:"esri.dijit.editing.tools.ToolBase",_enabled:true,showLabel:false,constructor:function(_64,_65){_64=_64||{};_60.mixin(this,_64);this.label=this._label?_62.widgets.editor.tools[this._label]:"";this._settings=_64.settings;this._toolbar=_64.settings.drawToolbar;this._editToolbar=_64.settings.editToolbar;this._initializeTool();},onFinished:function(){},onDrawEnd:function(){},onApplyEdits:function(){},postCreate:function(){this.deactivate();this.inherited(arguments);},destroy:function(){},activate:function(_66){if(this._toolbar){this._toolbar.deactivate();}if(this._editToolbar){this._editToolbar.deactivate();}if(!this._enabled){return;}this._checked=true;this._layer=_66;if(this._toolbar&&this._drawType){this._toolbar.activate(this._drawType);}},deactivate:function(){if(this._toolbar){this._toolbar.deactivate();}if(this._editToolbar){this._editToolbar.deactivate();}this.setChecked(false);this._updateUI();},setEnabled:function(_67){this._enabled=_67;this._updateUI();},setChecked:function(_68){this._checked=_68;},enable:function(_69){this._updateUI();},isEnabled:function(){return this._enabled;},getToolName:function(){return this._toolName;},_initializeTool:function(){},_updateUI:function(){this.disabled=!this._enabled;this.attr("iconClass",this._enabled?this._enabledIcon:this._disabledIcon);}});if(has("extend-esri")){_60.setObject("dijit.editing.tools.ToolBase",_63,_61);}return _63;});},"esri/dijit/editing/SelectionHelper":function(){define("esri/dijit/editing/SelectionHelper",["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/has","dojo/DeferredList","esri/geometry/Extent","esri/geometry/Point","esri/geometry/ScreenPoint","esri/layers/FeatureLayer","esri/tasks/query","esri/kernel"],function(_6a,_6b,_6c,_6d,has,_6e,_6f,_70,_71,_72,_73,_74){var SH=_6a(null,{declaredClass:"esri.dijit.editing.SelectionHelper",constructor:function(_75){this._settings=_75||{};this._sConnects=[];this._mapServiceCount=0;this._map=this._settings.map;this._tolerance=this._settings.singleSelectionTolerance;this._initMapServiceInfos(this._settings.layers);},destroy:function(){var _76;for(_76 in this._sConnects){if(this._sConnects.hasOwnProperty(_76)){_76.disconnect(this._sConnects[_76]);}}},selectFeatures:function(_77,_78,_79,_7a){if(_79===_72.SELECTION_NEW){this._resetMapServiceInfos();this.getSelection(_77);}var _7b=[];_6d.forEach(_77,function(_7c){if(_7c.visible===true&&_7c._isMapAtVisibleScale()===true){var _7d=_79;if(_7c._isSelOnly&&_7d===_72.SELECTION_NEW){_7d=_72.SELECTION_ADD;}_7b.push(_7c.selectFeatures(_78,_7d));}});var _7e=new _6e(_7b);_7e.addCallback(_6b.hitch(this,function(_7f){var _80=[];_6d.forEach(_7f,function(set,idx){_6d.forEach(set[1],function(_81){var _82=_81.attributes[_77[idx].objectIdField];_81=_77[idx]._mode._getFeature(_82)||null;if(_81){_80.push(_81);}},this);},this);if(!this._mapServiceCount){_7a(_80);return;}var _83=_79===_72.SELECTION_SUBTRACT;if(_83){this._resetMapServiceInfos();this._createLayerDefs(this._getLayerInfosFromSelection(_77));}else{this._createLayerDefs(this._getLayerInfosFromFeatures(_80));}this._updateLayerDefs(this._mapServiceInfos,false,!((_80&&_80.length)||_83),_6b.hitch(this,_7a,_80));}));},selectFeaturesByGeometry:function(_84,_85,_86,_87){var _88=_85;if(_85.declaredClass.indexOf("Extent")!==-1){if(_85.xmax===_85.xmin&&_85.ymax===_85.ymin){_88=new _70(_85.xmax,_85.ymax,_85.spatialReference);}}_88=(_88.declaredClass.indexOf("Point")!==-1)?this._extentFromPoint(_88):_88;var _89=new _73();_89.geometry=_88;this.selectFeatures(_84,_89,_86,_87);},clearSelection:function(_8a){var _8b=this._nonSelOnlyLayers;_6d.forEach(_8b,function(_8c){if(_8c.clearSelection){_8c.clearSelection();}});if(!this._mapServiceCount){return;}this._resetMapServiceInfos();var _8d=this._getLayerInfosFromSelection(this._settings.layers);var _8e=_6d.some(_8d,function(_8f){return _8f.oids&&_8f.oids.length;});if(_8e){this._createLayerDefs(_8d);this._updateLayerDefs(this._mapServiceInfos,true,_8a||false);}},findMapService:function(_90){var map=this._map,_91=map.layerIds,_92=(_90&&_90._url)?_90._url.path.toLowerCase():"",_93,_94,_95;for(_94 in _91){if(_91.hasOwnProperty(_94)){_93=map.getLayer(_91[_94]);_95=_93._url?_93._url.path.toLowerCase().replace("mapserver","featureserver"):"";if(_92.substr(0,_95.length)===_95&&_93.declaredClass==="esri.layers.ArcGISDynamicMapServiceLayer"){return _93;}}}},getSelection:function(_96){var _97=[];_6d.forEach(_96,function(_98){if(_98._isSelOnly){_97.push(this._createLayerInfo(_98));}},this);_6d.forEach(_97,function(_99){var _9a=this._createMapServiceInfo(this.findMapService(_99.layer));if(_9a){_9a.layerInfos[_99.layer.layerId]=_99;}},this);},_initMapServiceInfos:function(_9b){this._nonSelOnlyLayers=[];this._mapServiceInfos=[];_6d.forEach(_9b,function(_9c){var _9d=this.findMapService(_9c);if(_9d){this._mapServiceCount++;this._createMapServiceInfo(_9d);if(_9d){_9d.setDisableClientCaching(true);}}else{this._nonSelOnlyLayers.push(_9c);}},this);},_createMapServiceInfo:function(_9e){if(!_9e){return null;}var _9f=this._mapServiceInfos;var _a0=_9f[_9e.id];if(!_a0){_a0=_9f[_9e.id]={mapService:_9e,layerInfos:[],layerDefs:_6b.mixin([],_9e.layerDefinitions||[]),origLayerDefs:_6b.mixin([],_9e.layerDefinitions||[])};}return _a0;},_resetMapServiceInfo:function(_a1){_6d.forEach(_a1.layerInfos,this._resetLayerInfo);_a1.layerDefs=_6b.mixin([],_a1.origLayerDefs||[]);},_resetMapServiceInfos:function(){var _a2=this._mapServiceInfos,_a3;for(_a3 in _a2){if(_a2.hasOwnProperty(_a3)){this._resetMapServiceInfo(_a2[_a3]);}}},_createLayerInfo:function(_a4,_a5){var _a6=_a4.objectIdField;var _a7=_a5?[]:_a4.getSelectedFeatures();return {layer:_a4,selectedFeatures:_a7||[],oids:_6d.map(_a7,function(_a8){return _a8.attributes[_a6];})};},_resetLayerInfo:function(_a9){if(!_a9){return;}_a9.selectedFeatures=[];_a9.oids=[];},_updateLayerDefs:function(_aa,_ab,_ac,_ad){var _ae;for(_ae in _aa){if(_aa.hasOwnProperty(_ae)){var _af=_aa[_ae];var _b0=_af.mapService;var _b1=_af.layerDefs=(_ab?_6b.mixin([],_af.origLayerDefs||[]):_af.layerDefs);if(_b1){if(!_ac){this._sConnects[_b0.id]=(_6c.connect(_b0,"onUpdateEnd",_6b.hitch(this,"_onMapServiceUpdate",_af,_ab,_ad)));}else{if(_ad){_ad();}}_b0.setLayerDefinitions(_b1,_ac||false);}else{if(_ad){_ad();}}}}},_onMapServiceUpdate:function(_b2,_b3,_b4){_6c.disconnect(this._sConnects[_b2.mapService.id]);_6d.forEach(_b2.layerInfos,function(_b5){if(_b3){if(_b5){_b5.layer.clearSelection();}}else{var _b6=new _73();_b6.objectIds=_b5?_b5.oids:[];if(_b6.objectIds.length){_b5.layer.selectFeatures(_b6,_72.SELECTION_SUBTRACT);}}},this);if(_b3){this._resetMapServiceInfo(_b2);}if(_b4){_b4();}},_createLayerDefs:function(_b7){_6d.forEach(_b7,function(_b8){var _b9=_b8.layer;var _ba=this._createMapServiceInfo(this.findMapService(_b8.layer));if(!_ba){return;}var _bb=_ba.mapService;var _bc=_ba.layerDefs;var _bd=_b9.objectIdField;var _be=_b9.layerId;var _bf="(\""+_bd+"\" NOT IN (";var _c0=_b8.oids;if(_c0&&_c0.length){_6d.forEach(_b8.oids,function(oid,idx){_c0=true;if(idx){_bf+=",";}_bf+="'"+oid+"'";});_bf+="))";if(_bc.length&&(_bc[_be]&&_bc[_be].length)){_bc[_be]+=" AND"+_bf;}else{_bc[_be]=_bf;}}},this);},_getLayerInfosFromFeatures:function(_c1){var _c2=[];_6d.forEach(_c1,function(_c3){var _c4=_c3.getLayer();if(_c4&&_c4._isSelOnly){if(!_c2[_c4.id]){_c2[_c4.id]=this._createLayerInfo(_c4,true);}_c2[_c4.id].selectedFeatures.push(_c3);_c2[_c4.id].oids.push(_c3.attributes[_c4.objectIdField]);}},this);var _c5=[],_c6;for(_c6 in _c2){if(_c2.hasOwnProperty(_c6)){_c5.push(_c2[_c6]);}}return _c5;},_getLayerInfosFromSelection:function(_c7){var _c8=[];_6d.forEach(_c7,function(_c9){if(_c9._isSelOnly){_c8.push(this._createLayerInfo(_c9,false));}},this);return _c8;},_extentFromPoint:function(_ca){var _cb=this._tolerance;var map=this._map;var _cc=map.toScreen(_ca);var _cd=new _71(_cc.x-_cb,_cc.y+_cb);var _ce=new _71(_cc.x+_cb,_cc.y-_cb);var _cf=map.toMap(_cd);var _d0=map.toMap(_ce);return new _6f(_cf.x,_cf.y,_d0.x,_d0.y,map.spatialReference);}});if(has("extend-esri")){_6b.setObject("dijit.editing.SelectionHelper",SH,_74);}return SH;});},"dojox/grid/DataGrid":function(){define("dojox/grid/DataGrid",["../main","dojo/_base/array","dojo/_base/lang","dojo/_base/json","dojo/_base/sniff","dojo/_base/declare","./_Grid","./DataSelection","dojo/_base/html"],function(_d1,_d2,_d3,_d4,has,_d5,_d6,_d7,_d8){var _d9=_d5("dojox.grid.DataGrid",_d6,{store:null,query:null,queryOptions:null,fetchText:"...",sortFields:null,updateDelay:1,items:null,_store_connects:null,_by_idty:null,_by_idx:null,_cache:null,_pages:null,_pending_requests:null,_bop:-1,_eop:-1,_requests:0,rowCount:0,_isLoaded:false,_isLoading:false,keepSelection:false,postCreate:function(){this._pages=[];this._store_connects=[];this._by_idty={};this._by_idx=[];this._cache=[];this._pending_requests={};this._setStore(this.store);this.inherited(arguments);},destroy:function(){this.selection.destroy();this.inherited(arguments);},createSelection:function(){this.selection=new _d7(this);},get:function(_da,_db){if(_db&&this.field=="_item"&&!this.fields){return _db;}else{if(_db&&this.fields){var ret=[];var s=this.grid.store;_d2.forEach(this.fields,function(f){ret=ret.concat(s.getValues(_db,f));});return ret;}else{if(!_db&&typeof _da==="string"){return this.inherited(arguments);}}}return (!_db?this.defaultValue:(!this.field?this.value:(this.field=="_item"?_db:this.grid.store.getValue(_db,this.field))));},_checkUpdateStatus:function(){if(this.updateDelay>0){var _dc=false;if(this._endUpdateDelay){clearTimeout(this._endUpdateDelay);delete this._endUpdateDelay;_dc=true;}if(!this.updating){this.beginUpdate();_dc=true;}if(_dc){var _dd=this;this._endUpdateDelay=setTimeout(function(){delete _dd._endUpdateDelay;_dd.endUpdate();},this.updateDelay);}}},_onSet:function(_de,_df,_e0,_e1){this._checkUpdateStatus();var idx=this.getItemIndex(_de);if(idx>-1){this.updateRow(idx);}},_createItem:function(_e2,_e3){var _e4=this._hasIdentity?this.store.getIdentity(_e2):_d4.toJson(this.query)+":idx:"+_e3+":sort:"+_d4.toJson(this.getSortProps());var o=this._by_idty[_e4]={idty:_e4,item:_e2};return o;},_addItem:function(_e5,_e6,_e7){this._by_idx[_e6]=this._createItem(_e5,_e6);if(!_e7){this.updateRow(_e6);}},_onNew:function(_e8,_e9){this._checkUpdateStatus();var _ea=this.get("rowCount");this._addingItem=true;this.updateRowCount(_ea+1);this._addingItem=false;this._addItem(_e8,_ea);this.showMessage();},_onDelete:function(_eb){this._checkUpdateStatus();var idx=this._getItemIndex(_eb,true);if(idx>=0){this._pages=[];this._bop=-1;this._eop=-1;var o=this._by_idx[idx];this._by_idx.splice(idx,1);delete this._by_idty[o.idty];this.updateRowCount(this.get("rowCount")-1);if(this.get("rowCount")===0){this.showMessage(this.noDataMessage);}}if(this.selection.isSelected(idx)){this.selection.deselect(idx);this.selection.selected.splice(idx,1);}},_onRevert:function(){this._refresh();},setStore:function(_ec,_ed,_ee){if(this._requestsPending(0)){return;}this._setQuery(_ed,_ee);this._setStore(_ec);this._refresh(true);},setQuery:function(_ef,_f0){if(this._requestsPending(0)){return;}this._setQuery(_ef,_f0);this._refresh(true);},setItems:function(_f1){this.items=_f1;this._setStore(this.store);this._refresh(true);},_setQuery:function(_f2,_f3){this.query=_f2;this.queryOptions=_f3||this.queryOptions;},_setStore:function(_f4){if(this.store&&this._store_connects){_d2.forEach(this._store_connects,this.disconnect,this);}this.store=_f4;if(this.store){var f=this.store.getFeatures();var h=[];this._canEdit=!!f["dojo.data.api.Write"]&&!!f["dojo.data.api.Identity"];this._hasIdentity=!!f["dojo.data.api.Identity"];if(!!f["dojo.data.api.Notification"]&&!this.items){h.push(this.connect(this.store,"onSet","_onSet"));h.push(this.connect(this.store,"onNew","_onNew"));h.push(this.connect(this.store,"onDelete","_onDelete"));}if(this._canEdit){h.push(this.connect(this.store,"revert","_onRevert"));}this._store_connects=h;}},_onFetchBegin:function(_f5,req){if(!this.scroller){return;}if(this.rowCount!=_f5){if(req.isRender){this.scroller.init(_f5,this.keepRows,this.rowsPerPage);this.rowCount=_f5;this._setAutoHeightAttr(this.autoHeight,true);this._skipRowRenormalize=true;this.prerender();this._skipRowRenormalize=false;}else{this.updateRowCount(_f5);}}if(!_f5){this.views.render();this._resize();this.showMessage(this.noDataMessage);this.focus.initFocusView();}else{this.showMessage();}},_onFetchComplete:function(_f6,req){if(!this.scroller){return;}if(_f6&&_f6.length>0){_d2.forEach(_f6,function(_f7,idx){this._addItem(_f7,req.start+idx,true);},this);this.updateRows(req.start,_f6.length);if(req.isRender){this.setScrollTop(0);this.postrender();}else{if(this._lastScrollTop){this.setScrollTop(this._lastScrollTop);}}if(has("ie")){_d8.setSelectable(this.domNode,this.selectable);}}delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;}this._pending_requests[req.start]=false;},_onFetchError:function(err,req){console.log(err);delete this._lastScrollTop;if(!this._isLoaded){this._isLoading=false;this._isLoaded=true;this.showMessage(this.errorMessage);}this._pending_requests[req.start]=false;this.onFetchError(err,req);},onFetchError:function(err,req){},_fetch:function(_f8,_f9){_f8=_f8||0;if(this.store&&!this._pending_requests[_f8]){if(!this._isLoaded&&!this._isLoading){this._isLoading=true;this.showMessage(this.loadingMessage);}this._pending_requests[_f8]=true;try{if(this.items){var _fa=this.items;var _fb=this.store;this.rowsPerPage=_fa.length;var req={start:_f8,count:this.rowsPerPage,isRender:_f9};this._onFetchBegin(_fa.length,req);var _fc=0;_d2.forEach(_fa,function(i){if(!_fb.isItemLoaded(i)){_fc++;}});if(_fc===0){this._onFetchComplete(_fa,req);}else{var _fd=function(_fe){_fc--;if(_fc===0){this._onFetchComplete(_fa,req);}};_d2.forEach(_fa,function(i){if(!_fb.isItemLoaded(i)){_fb.loadItem({item:i,onItem:_fd,scope:this});}},this);}}else{this.store.fetch({start:_f8,count:this.rowsPerPage,query:this.query,sort:this.getSortProps(),queryOptions:this.queryOptions,isRender:_f9,onBegin:_d3.hitch(this,"_onFetchBegin"),onComplete:_d3.hitch(this,"_onFetchComplete"),onError:_d3.hitch(this,"_onFetchError")});}}catch(e){this._onFetchError(e,{start:_f8,count:this.rowsPerPage});}}},_clearData:function(){this.updateRowCount(0);this._by_idty={};this._by_idx=[];this._pages=[];this._bop=this._eop=-1;this._isLoaded=false;this._isLoading=false;},getItem:function(idx){var _ff=this._by_idx[idx];if(!_ff||(_ff&&!_ff.item)){this._preparePage(idx);return null;}return _ff.item;},getItemIndex:function(item){return this._getItemIndex(item,false);},_getItemIndex:function(item,_100){if(!_100&&!this.store.isItem(item)){return -1;}var idty=this._hasIdentity?this.store.getIdentity(item):null;for(var i=0,l=this._by_idx.length;i<l;i++){var d=this._by_idx[i];if(d&&((idty&&d.idty==idty)||(d.item===item))){return i;}}return -1;},filter:function(_101,_102){this.query=_101;if(_102){this._clearData();}this._fetch();},_getItemAttr:function(idx,attr){var item=this.getItem(idx);return (!item?this.fetchText:this.store.getValue(item,attr));},_render:function(){if(this.domNode.parentNode){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this._fetch(0,true);}},_requestsPending:function(_103){return this._pending_requests[_103];},_rowToPage:function(_104){return (this.rowsPerPage?Math.floor(_104/this.rowsPerPage):_104);},_pageToRow:function(_105){return (this.rowsPerPage?this.rowsPerPage*_105:_105);},_preparePage:function(_106){if((_106<this._bop||_106>=this._eop)&&!this._addingItem){var _107=this._rowToPage(_106);this._needPage(_107);this._bop=_107*this.rowsPerPage;this._eop=this._bop+(this.rowsPerPage||this.get("rowCount"));}},_needPage:function(_108){if(!this._pages[_108]){this._pages[_108]=true;this._requestPage(_108);}},_requestPage:function(_109){var row=this._pageToRow(_109);var _10a=Math.min(this.rowsPerPage,this.get("rowCount")-row);if(_10a>0){this._requests++;if(!this._requestsPending(row)){setTimeout(_d3.hitch(this,"_fetch",row,false),1);}}},getCellName:function(_10b){return _10b.field;},_refresh:function(_10c){this._clearData();this._fetch(0,_10c);},sort:function(){this.edit.apply();this._lastScrollTop=this.scrollTop;this._refresh();},canSort:function(){return (!this._isLoading);},getSortProps:function(){var c=this.getCell(this.getSortIndex());if(!c){if(this.sortFields){return this.sortFields;}return null;}else{var desc=c["sortDesc"];var si=!(this.sortInfo>0);if(typeof desc=="undefined"){desc=si;}else{desc=si?!desc:desc;}return [{attribute:c.field,descending:desc}];}},styleRowState:function(_10d){if(this.store&&this.store.getState){var _10e=this.store.getState(_10d.index),c="";for(var i=0,ss=["inflight","error","inserting"],s;s=ss[i];i++){if(_10e[s]){c=" dojoxGridRow-"+s;break;}}_10d.customClasses+=c;}},onStyleRow:function(_10f){this.styleRowState(_10f);this.inherited(arguments);},canEdit:function(_110,_111){return this._canEdit;},_copyAttr:function(idx,attr){var row={};var _112={};var src=this.getItem(idx);return this.store.getValue(src,attr);},doStartEdit:function(_113,_114){if(!this._cache[_114]){this._cache[_114]=this._copyAttr(_114,_113.field);}this.onStartEdit(_113,_114);},doApplyCellEdit:function(_115,_116,_117){this.store.fetchItemByIdentity({identity:this._by_idx[_116].idty,onItem:_d3.hitch(this,function(item){var _118=this.store.getValue(item,_117);if(typeof _118=="number"){_115=isNaN(_115)?_115:parseFloat(_115);}else{if(typeof _118=="boolean"){_115=_115=="true"?true:_115=="false"?false:_115;}else{if(_118 instanceof Date){var _119=new Date(_115);_115=isNaN(_119.getTime())?_115:_119;}}}this.store.setValue(item,_117,_115);this.onApplyCellEdit(_115,_116,_117);})});},doCancelEdit:function(_11a){var _11b=this._cache[_11a];if(_11b){this.updateRow(_11a);delete this._cache[_11a];}this.onCancelEdit.apply(this,arguments);},doApplyEdit:function(_11c,_11d){var _11e=this._cache[_11c];this.onApplyEdit(_11c);},removeSelectedRows:function(){if(this._canEdit){this.edit.apply();var fx=_d3.hitch(this,function(_11f){if(_11f.length){_d2.forEach(_11f,this.store.deleteItem,this.store);this.selection.clear();}});if(this.allItemsSelected){this.store.fetch({query:this.query,queryOptions:this.queryOptions,onComplete:fx});}else{fx(this.selection.getSelected());}}}});_d9.cell_markupFactory=function(_120,node,_121){var _122=_d3.trim(_d8.attr(node,"field")||"");if(_122){_121.field=_122;}_121.field=_121.field||_121.name;var _123=_d3.trim(_d8.attr(node,"fields")||"");if(_123){_121.fields=_123.split(",");}if(_120){_120(node,_121);}};_d9.markupFactory=function(_124,node,ctor,_125){return _d6.markupFactory(_124,node,ctor,_d3.partial(_d9.cell_markupFactory,_125));};return _d9;});},"dijit/_TemplatedMixin":function(){define("dijit/_TemplatedMixin",["dojo/_base/lang","dojo/touch","./_WidgetBase","dojo/string","dojo/cache","dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/sniff","dojo/_base/unload"],function(lang,_126,_127,_128,_129,_12a,_12b,_12c,has,_12d){var _12e=_12b("dijit._TemplatedMixin",null,{templateString:null,templatePath:null,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[];},_stringRepl:function(tmpl){var _12f=this.declaredClass,_130=this;return _128.substitute(tmpl,this,function(_131,key){if(key.charAt(0)=="!"){_131=lang.getObject(key.substr(1),false,_130);}if(typeof _131=="undefined"){throw new Error(_12f+" template:"+key);}if(_131==null){return "";}return key.charAt(0)=="!"?_131:_131.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){if(!this.templateString){this.templateString=_129(this.templatePath,{sanitize:true});}var _132=_12e.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument);var node;if(lang.isString(_132)){node=_12c.toDom(this._stringRepl(_132),this.ownerDocument);if(node.nodeType!=1){throw new Error("Invalid template: "+_132);}}else{node=_132.cloneNode(true);}this.domNode=node;this.inherited(arguments);this._attachTemplateNodes(node,function(n,p){return n.getAttribute(p);});this._beforeFillContent();this._fillContent(this.srcNodeRef);},_beforeFillContent:function(){},_fillContent:function(_133){var dest=this.containerNode;if(_133&&dest){while(_133.hasChildNodes()){dest.appendChild(_133.firstChild);}}},_attachTemplateNodes:function(_134,_135){var _136=lang.isArray(_134)?_134:(_134.all||_134.getElementsByTagName("*"));var x=lang.isArray(_134)?0:-1;for(;x<0||_136[x];x++){var _137=(x==-1)?_134:_136[x];if(this.widgetsInTemplate&&(_135(_137,"dojoType")||_135(_137,"data-dojo-type"))){continue;}var _138=_135(_137,"dojoAttachPoint")||_135(_137,"data-dojo-attach-point");if(_138){var _139,_13a=_138.split(/\s*,\s*/);while((_139=_13a.shift())){if(lang.isArray(this[_139])){this[_139].push(_137);}else{this[_139]=_137;}this._attachPoints.push(_139);}}var _13b=_135(_137,"dojoAttachEvent")||_135(_137,"data-dojo-attach-event");if(_13b){var _13c,_13d=_13b.split(/\s*,\s*/);var trim=lang.trim;while((_13c=_13d.shift())){if(_13c){var _13e=null;if(_13c.indexOf(":")!=-1){var _13f=_13c.split(":");_13c=trim(_13f[0]);_13e=trim(_13f[1]);}else{_13c=trim(_13c);}if(!_13e){_13e=_13c;}this._attachEvents.push(this.connect(_137,_126[_13c]||_13c,_13e));}}}}},destroyRendering:function(){_12a.forEach(this._attachPoints,function(_140){delete this[_140];},this);this._attachPoints=[];_12a.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments);}});_12e._templateCache={};_12e.getCachedTemplate=function(_141,_142,doc){var _143=_12e._templateCache;var key=_141;var _144=_143[key];if(_144){try{if(!_144.ownerDocument||_144.ownerDocument==(doc||document)){return _144;}}catch(e){}_12c.destroy(_144);}_141=_128.trim(_141);if(_142||_141.match(/\$\{([^\}]+)\}/g)){return (_143[key]=_141);}else{var node=_12c.toDom(_141,doc);if(node.nodeType!=1){throw new Error("Invalid template: "+_141);}return (_143[key]=node);}};if(has("ie")){_12d.addOnWindowUnload(function(){var _145=_12e._templateCache;for(var key in _145){var _146=_145[key];if(typeof _146=="object"){_12c.destroy(_146);}delete _145[key];}});}lang.extend(_127,{dojoAttachEvent:"",dojoAttachPoint:""});return _12e;});},"dojox/grid/_FocusManager":function(){define("dojox/grid/_FocusManager",["dojo/_base/array","dojo/_base/lang","dojo/_base/declare","dojo/_base/connect","dojo/_base/event","dojo/_base/sniff","dojo/query","./util","dojo/_base/html"],function(_147,lang,_148,_149,_14a,has,_14b,util,html){return _148("dojox.grid._FocusManager",null,{constructor:function(_14c){this.grid=_14c;this.cell=null;this.rowIndex=-1;this._connects=[];this._headerConnects=[];this.headerMenu=this.grid.headerMenu;this._connects.push(_149.connect(this.grid.domNode,"onfocus",this,"doFocus"));this._connects.push(_149.connect(this.grid.domNode,"onblur",this,"doBlur"));this._connects.push(_149.connect(this.grid.domNode,"mousedown",this,"_mouseDown"));this._connects.push(_149.connect(this.grid.domNode,"mouseup",this,"_mouseUp"));this._connects.push(_149.connect(this.grid.domNode,"oncontextmenu",this,"doContextMenu"));this._connects.push(_149.connect(this.grid.lastFocusNode,"onfocus",this,"doLastNodeFocus"));this._connects.push(_149.connect(this.grid.lastFocusNode,"onblur",this,"doLastNodeBlur"));this._connects.push(_149.connect(this.grid,"_onFetchComplete",this,"_delayedCellFocus"));this._connects.push(_149.connect(this.grid,"postrender",this,"_delayedHeaderFocus"));},destroy:function(){_147.forEach(this._connects,_149.disconnect);_147.forEach(this._headerConnects,_149.disconnect);delete this.grid;delete this.cell;},_colHeadNode:null,_colHeadFocusIdx:null,_contextMenuBindNode:null,tabbingOut:false,focusClass:"dojoxGridCellFocus",focusView:null,initFocusView:function(){this.focusView=this.grid.views.getFirstScrollingView()||this.focusView||this.grid.views.views[0];this._initColumnHeaders();},isFocusCell:function(_14d,_14e){return (this.cell==_14d)&&(this.rowIndex==_14e);},isLastFocusCell:function(){if(this.cell){return (this.rowIndex==this.grid.rowCount-1)&&(this.cell.index==this.grid.layout.cellCount-1);}return false;},isFirstFocusCell:function(){if(this.cell){return (this.rowIndex===0)&&(this.cell.index===0);}return false;},isNoFocusCell:function(){return (this.rowIndex<0)||!this.cell;},isNavHeader:function(){return (!!this._colHeadNode);},getHeaderIndex:function(){if(this._colHeadNode){return _147.indexOf(this._findHeaderCells(),this._colHeadNode);}else{return -1;}},_focusifyCellNode:function(_14f){var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){html.toggleClass(n,this.focusClass,_14f);if(_14f){var sl=this.scrollIntoView();try{if(has("webkit")||!this.grid.edit.isEditing()){util.fire(n,"focus");if(sl){this.cell.view.scrollboxNode.scrollLeft=sl;}}}catch(e){}}}},_delayedCellFocus:function(){if(this.isNavHeader()||!this.grid.focused){return;}var n=this.cell&&this.cell.getNode(this.rowIndex);if(n){try{if(!this.grid.edit.isEditing()){html.toggleClass(n,this.focusClass,true);if(this._colHeadNode){this.blurHeader();}util.fire(n,"focus");}}catch(e){}}},_delayedHeaderFocus:function(){if(this.isNavHeader()){this.focusHeader();}},_initColumnHeaders:function(){_147.forEach(this._headerConnects,_149.disconnect);this._headerConnects=[];var _150=this._findHeaderCells();for(var i=0;i<_150.length;i++){this._headerConnects.push(_149.connect(_150[i],"onfocus",this,"doColHeaderFocus"));this._headerConnects.push(_149.connect(_150[i],"onblur",this,"doColHeaderBlur"));}},_findHeaderCells:function(){var _151=_14b("th",this.grid.viewsHeaderNode);var _152=[];for(var i=0;i<_151.length;i++){var _153=_151[i];var _154=html.hasAttr(_153,"tabIndex");var _155=html.attr(_153,"tabIndex");if(_154&&_155<0){_152.push(_153);}}return _152;},_setActiveColHeader:function(_156,_157,_158){this.grid.domNode.setAttribute("aria-activedescendant",_156.id);if(_158!=null&&_158>=0&&_158!=_157){html.toggleClass(this._findHeaderCells()[_158],this.focusClass,false);}html.toggleClass(_156,this.focusClass,true);this._colHeadNode=_156;this._colHeadFocusIdx=_157;this._scrollHeader(this._colHeadFocusIdx);},scrollIntoView:function(){var info=(this.cell?this._scrollInfo(this.cell):null);if(!info||!info.s){return null;}var rt=this.grid.scroller.findScrollTop(this.rowIndex);if(info.n&&info.sr){if(info.n.offsetLeft+info.n.offsetWidth>info.sr.l+info.sr.w){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}}}if(info.r&&info.sr){if(rt+info.r.offsetHeight>info.sr.t+info.sr.h){this.grid.setScrollTop(rt+info.r.offsetHeight-info.sr.h);}else{if(rt<info.sr.t){this.grid.setScrollTop(rt);}}}return info.s.scrollLeft;},_scrollInfo:function(cell,_159){if(cell){var cl=cell,sbn=cl.view.scrollboxNode,sbnr={w:sbn.clientWidth,l:sbn.scrollLeft,t:sbn.scrollTop,h:sbn.clientHeight},rn=cl.view.getRowNode(this.rowIndex);return {c:cl,s:sbn,sr:sbnr,n:(_159?_159:cell.getNode(this.rowIndex)),r:rn};}return null;},_scrollHeader:function(_15a){var info=null;if(this._colHeadNode){var cell=this.grid.getCell(_15a);if(!cell){return;}info=this._scrollInfo(cell,cell.getNode(0));}if(info&&info.s&&info.sr&&info.n){var _15b=info.sr.l+info.sr.w;if(info.n.offsetLeft+info.n.offsetWidth>_15b){info.s.scrollLeft=info.n.offsetLeft+info.n.offsetWidth-info.sr.w;}else{if(info.n.offsetLeft<info.sr.l){info.s.scrollLeft=info.n.offsetLeft;}else{if(has("ie")<=7&&cell&&cell.view.headerNode){cell.view.headerNode.scrollLeft=info.s.scrollLeft;}}}}},_isHeaderHidden:function(){var _15c=this.focusView;if(!_15c){for(var i=0,_15d;(_15d=this.grid.views.views[i]);i++){if(_15d.headerNode){_15c=_15d;break;}}}return (_15c&&html.getComputedStyle(_15c.headerNode).display=="none");},colSizeAdjust:function(e,_15e,_15f){var _160=this._findHeaderCells();var view=this.focusView;if(!view||!view.header.tableMap.map){for(var i=0,_161;(_161=this.grid.views.views[i]);i++){if(_161.header.tableMap.map){view=_161;break;}}}var _162=_160[_15e];if(!view||(_15e==_160.length-1&&_15e===0)){return;}view.content.baseDecorateEvent(e);e.cellNode=_162;e.cellIndex=view.content.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);if(view.header.canResize(e)){var _163={l:_15f};var drag=view.header.colResizeSetup(e,false);view.header.doResizeColumn(drag,null,_163);view.update();}},styleRow:function(_164){return;},setFocusIndex:function(_165,_166){this.setFocusCell(this.grid.getCell(_166),_165);},setFocusCell:function(_167,_168){if(_167&&!this.isFocusCell(_167,_168)){this.tabbingOut=false;if(this._colHeadNode){this.blurHeader();}this._colHeadNode=this._colHeadFocusIdx=null;this.focusGridView();this._focusifyCellNode(false);this.cell=_167;this.rowIndex=_168;this._focusifyCellNode(true);}if(has("opera")){setTimeout(lang.hitch(this.grid,"onCellFocus",this.cell,this.rowIndex),1);}else{this.grid.onCellFocus(this.cell,this.rowIndex);}},next:function(){if(this.cell){var row=this.rowIndex,col=this.cell.index+1,cc=this.grid.layout.cellCount-1,rc=this.grid.rowCount-1;if(col>cc){col=0;row++;}if(row>rc){col=cc;row=rc;}if(this.grid.edit.isEditing()){var _169=this.grid.getCell(col);if(!this.isLastFocusCell()&&(!_169.editable||this.grid.canEdit&&!this.grid.canEdit(_169,row))){this.cell=_169;this.rowIndex=row;this.next();return;}}this.setFocusIndex(row,col);}},previous:function(){if(this.cell){var row=(this.rowIndex||0),col=(this.cell.index||0)-1;if(col<0){col=this.grid.layout.cellCount-1;row--;}if(row<0){row=0;col=0;}if(this.grid.edit.isEditing()){var _16a=this.grid.getCell(col);if(!this.isFirstFocusCell()&&!_16a.editable){this.cell=_16a;this.rowIndex=row;this.previous();return;}}this.setFocusIndex(row,col);}},move:function(_16b,_16c){var _16d=_16c<0?-1:1;if(this.isNavHeader()){var _16e=this._findHeaderCells();var _16f=currentIdx=_147.indexOf(_16e,this._colHeadNode);currentIdx+=_16c;while(currentIdx>=0&&currentIdx<_16e.length&&_16e[currentIdx].style.display=="none"){currentIdx+=_16d;}if((currentIdx>=0)&&(currentIdx<_16e.length)){this._setActiveColHeader(_16e[currentIdx],currentIdx,_16f);}}else{if(this.cell){var sc=this.grid.scroller,r=this.rowIndex,rc=this.grid.rowCount-1,row=Math.min(rc,Math.max(0,r+_16b));if(_16b){if(_16b>0){if(row>sc.getLastPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop+sc.findScrollTop(row)-sc.findScrollTop(r));}}else{if(_16b<0){if(row<=sc.getPageRow(sc.page)){this.grid.setScrollTop(this.grid.scrollTop-sc.findScrollTop(r)-sc.findScrollTop(row));}}}}var cc=this.grid.layout.cellCount-1,i=this.cell.index,col=Math.min(cc,Math.max(0,i+_16c));var cell=this.grid.getCell(col);while(col>=0&&col<cc&&cell&&cell.hidden===true){col+=_16d;cell=this.grid.getCell(col);}if(!cell||cell.hidden===true){col=i;}var n=cell.getNode(row);if(!n&&_16b){if((row+_16b)>=0&&(row+_16b)<=rc){this.move(_16b>0?++_16b:--_16b,_16c);}return;}else{if((!n||html.style(n,"display")==="none")&&_16c){if((col+_16c)>=0&&(col+_16c)<=cc){this.move(_16b,_16c>0?++_16c:--_16c);}return;}}this.setFocusIndex(row,col);if(_16b){this.grid.updateRow(r);}}}},previousKey:function(e){if(this.grid.edit.isEditing()){_14a.stop(e);this.previous();}else{if(!this.isNavHeader()&&!this._isHeaderHidden()){this.grid.domNode.focus();_14a.stop(e);}else{this.tabOut(this.grid.domNode);if(this._colHeadFocusIdx!=null){html.toggleClass(this._findHeaderCells()[this._colHeadFocusIdx],this.focusClass,false);this._colHeadFocusIdx=null;}this._focusifyCellNode(false);}}},nextKey:function(e){var _170=(this.grid.rowCount===0);if(e.target===this.grid.domNode&&this._colHeadFocusIdx==null){this.focusHeader();_14a.stop(e);}else{if(this.isNavHeader()){this.blurHeader();if(!this.findAndFocusGridCell()){this.tabOut(this.grid.lastFocusNode);}this._colHeadNode=this._colHeadFocusIdx=null;}else{if(this.grid.edit.isEditing()){_14a.stop(e);this.next();}else{this.tabOut(this.grid.lastFocusNode);}}}},tabOut:function(_171){this.tabbingOut=true;_171.focus();},focusGridView:function(){util.fire(this.focusView,"focus");},focusGrid:function(_172){this.focusGridView();this._focusifyCellNode(true);},findAndFocusGridCell:function(){var _173=true;var _174=(this.grid.rowCount===0);if(this.isNoFocusCell()&&!_174){var _175=0;var cell=this.grid.getCell(_175);if(cell.hidden){_175=this.isNavHeader()?this._colHeadFocusIdx:0;}this.setFocusIndex(0,_175);}else{if(this.cell&&!_174){if(this.focusView&&!this.focusView.rowNodes[this.rowIndex]){this.grid.scrollToRow(this.rowIndex);}this.focusGrid();}else{_173=false;}}this._colHeadNode=this._colHeadFocusIdx=null;return _173;},focusHeader:function(){var _176=this._findHeaderCells();var _177=this._colHeadFocusIdx;if(this._isHeaderHidden()){this.findAndFocusGridCell();}else{if(!this._colHeadFocusIdx){if(this.isNoFocusCell()){this._colHeadFocusIdx=0;}else{this._colHeadFocusIdx=this.cell.index;}}}this._colHeadNode=_176[this._colHeadFocusIdx];while(this._colHeadNode&&this._colHeadFocusIdx>=0&&this._colHeadFocusIdx<_176.length&&this._colHeadNode.style.display=="none"){this._colHeadFocusIdx++;this._colHeadNode=_176[this._colHeadFocusIdx];}if(this._colHeadNode&&this._colHeadNode.style.display!="none"){if(this.headerMenu&&this._contextMenuBindNode!=this.grid.domNode){this.headerMenu.unBindDomNode(this.grid.viewsHeaderNode);this.headerMenu.bindDomNode(this.grid.domNode);this._contextMenuBindNode=this.grid.domNode;}this._setActiveColHeader(this._colHeadNode,this._colHeadFocusIdx,_177);this._scrollHeader(this._colHeadFocusIdx);this._focusifyCellNode(false);}else{this.findAndFocusGridCell();}},blurHeader:function(){html.removeClass(this._colHeadNode,this.focusClass);html.removeAttr(this.grid.domNode,"aria-activedescendant");if(this.headerMenu&&this._contextMenuBindNode==this.grid.domNode){var _178=this.grid.viewsHeaderNode;this.headerMenu.unBindDomNode(this.grid.domNode);this.headerMenu.bindDomNode(_178);this._contextMenuBindNode=_178;}},doFocus:function(e){if(e&&e.target!=e.currentTarget){_14a.stop(e);return;}if(this._clickFocus){return;}if(!this.tabbingOut){this.focusHeader();}this.tabbingOut=false;_14a.stop(e);},doBlur:function(e){_14a.stop(e);},doContextMenu:function(e){if(!this.headerMenu){_14a.stop(e);}},doLastNodeFocus:function(e){if(this.tabbingOut){this._focusifyCellNode(false);}else{if(this.grid.rowCount>0){if(this.isNoFocusCell()){this.setFocusIndex(0,0);}this._focusifyCellNode(true);}else{this.focusHeader();}}this.tabbingOut=false;_14a.stop(e);},doLastNodeBlur:function(e){_14a.stop(e);},doColHeaderFocus:function(e){this._setActiveColHeader(e.target,html.attr(e.target,"idx"),this._colHeadFocusIdx);this._scrollHeader(this.getHeaderIndex());_14a.stop(e);},doColHeaderBlur:function(e){html.toggleClass(e.target,this.focusClass,false);},_mouseDown:function(e){this._clickFocus=dojo.some(this.grid.views.views,function(v){return v.scrollboxNode===e.target;});},_mouseUp:function(e){this._clickFocus=false;}});});},"esri/toolbars/_VertexEditor":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/has","dijit/Menu","dijit/MenuItem","esri/kernel","esri/toolbars/_VertexMover","esri/geometry/Point","esri/geometry/jsonUtils","dojo/i18n!esri/nls/jsapi"],function(_179,lang,_17a,_17b,has,Menu,_17c,_17d,_17e,_17f,_180,_181){var GVE=_179(null,{declaredClass:"esri.toolbars._GraphicVertexEditor",constructor:function(_182,map,_183){this.graphic=_182;this.map=map;this.toolbar=_183;var _184=_183._options;this._symbol1=_184.vertexSymbol;this._symbol2=_184.ghostVertexSymbol;var _185=_184.ghostLineSymbol;this._lineStroke={style:_185.style,width:_185.width,color:_185.color};this._canDel=_184.allowDeleteVertices;this._canAdd=_184.allowAddVertices;this._addControllers();},destroy:function(){this._removeControllers();},refresh:function(_186){if(_186){this._removeControllers();this._addControllers();}else{this._refresh(this._vertexMovers);this._refresh(this._mpVertexMovers);}},suspend:function(){if(!this._suspended){this._removeControllers();}this._suspended=true;},resume:function(){if(this._suspended){this._addControllers();}this._suspended=false;},_addControllers:function(){this._firstMoveHandle=_17a.connect(_17e,"onFirstMove",this,this._firstMoveHandler);this._moveStopHandle=_17a.connect(_17e,"onMoveStop",this,this._moveStopHandler);this._vertexMovers=this._add(this._getSegments(this.graphic.geometry),this._symbol1);if(this._canAdd){this._mpVertexMovers=this._add(this._getMidpointSegments(this.graphic.geometry),this._symbol2,true);}var _187=this._getGraphicsLayer();this._mouseOverHandle=_17a.connect(_187,"onMouseOver",this,this._mouseOverHandler);this._mouseOutHandle=_17a.connect(_187,"onMouseOut",this,this._mouseOutHandler);if(this._canDel){this._ctxMenu=new Menu({style:"font-size: 12px; margin-left: 5px; margin-top: 5px;"});var _188=(this._ctxDelete=new _17c({label:_181.toolbars.edit.deleteLabel,iconClass:"vertexDeleteIcon",style:"outline: none;"}));this._deleteHandle=_17a.connect(_188,"onClick",this,this._deleteHandler);this._ctxMenu.addChild(_188);this._ctxMenu.startup();}},_removeControllers:function(){_17a.disconnect(this._firstMoveHandle);_17a.disconnect(this._moveStopHandle);_17a.disconnect(this._mouseOverHandle);_17a.disconnect(this._mouseOutHandle);_17a.disconnect(this._deleteHandle);if(this._ctxMenu){this._ctxDelete=null;this._unbindCtxNode();this._ctxMenu.destroyRecursive();}this._remove(this._vertexMovers);this._remove(this._mpVertexMovers);this._vertexMovers=this._mpVertexMovers=null;},_add:function(_189,_18a,_18b){var i,j,_18c=this.graphic,_18d=[];for(i=0;i<_189.length;i++){var _18e=_189[i],_18f=[];for(j=0;j<_18e.length;j++){_18f.push(new _17e(_18e[j],_18a,_18c,i,j,_18e.length,this,_18b));}_18d.push(_18f);}return _18d;},_remove:function(_190){if(_190){_17b.forEach(_190,function(_191){_17b.forEach(_191,function(_192){_192.destroy();});});}},_refresh:function(_193){if(_193){_17b.forEach(_193,function(_194){_17b.forEach(_194,function(_195){_195.refresh();});});}},_isNew:function(_196){return (_17b.indexOf(this._vertexMovers[_196.segIndex],_196)===-1)?true:false;},_getGraphicsLayer:function(){return this.toolbar._scratchGL;},_deleteHandler:function(evt){var _197=this._selectedMover,_198=_197.ptIndex;this._updateRelatedGraphic(_197,_197.relatedGraphic,_197.graphic.geometry,_197.segIndex,_197.ptIndex,_197.segLength,false,true);if(this._canAdd){this._deleteMidpoints(_197);}this._deleteVertex(_197);this.toolbar._endOperation("VERTICES");},_mouseOverHandler:function(evt){var _199=evt.graphic,_19a=this._findMover(_199);if(_19a){this.toolbar.onVertexMouseOver(this.graphic,_19a._getInfo());if(!_19a._placeholder){this._selectedMover=_19a;if(this._canDel){this._bindCtxNode(_199.getDojoShape().getNode());}}}},_mouseOutHandler:function(evt){var _19b=evt.graphic,_19c=this._findMover(_19b);if(_19c){this.toolbar.onVertexMouseOut(this.graphic,_19c._getInfo());}},_bindCtxNode:function(node){this._unbindCtxNode();this._ctxDelete.set("disabled",(this._selectedMover.segLength<=this.minLength)?true:false);this._ctxMenu.bindDomNode(node);this._bindNode=node;},_unbindCtxNode:function(){var node=this._bindNode;if(node){this._ctxMenu.unBindDomNode(node);}},_findMover:function(_19d){var i,_19e=[],_19f=this._mpVertexMovers;_17b.forEach(this._vertexMovers,function(_1a0){_19e=_19e.concat(_1a0);});if(_19f){_17b.forEach(_19f,function(_1a1){_19e=_19e.concat(_1a1);});}for(i=0;i<_19e.length;i++){var _1a2=_19e[i];if(_1a2.graphic===_19d){return _1a2;}}},_firstMoveHandler:function(_1a3){if(!this._isNew(_1a3)&&this._canAdd){this._hideRelatedMidpoints(_1a3);}this.toolbar._beginOperation("VERTICES");},_moveStopHandler:function(_1a4,tx){var add=this._isNew(_1a4);if(!tx||!tx.dx&&!tx.dy){if(!add&&this._canAdd){this._showRelatedMidpoints(_1a4);}return;}this._updateRelatedGraphic(_1a4,_1a4.relatedGraphic,_1a4.graphic.geometry,_1a4.segIndex,_1a4.ptIndex,_1a4.segLength,add);if(this._canAdd){if(add){this._addMidpoints(_1a4);}else{this._repositionRelatedMidpoints(_1a4);this._showRelatedMidpoints(_1a4);}}this.toolbar._endOperation("VERTICES");},_showRelatedMidpoints:function(_1a5){var i,_1a6=this._getAdjacentMidpoints(_1a5.ptIndex,_1a5.segLength),_1a7=this._mpVertexMovers[_1a5.segIndex];for(i=0;i<_1a6.length;i++){var mvr=_1a7[_1a6[i]];mvr.graphic.show();mvr.refresh();}},_hideRelatedMidpoints:function(_1a8){var i,_1a9=this._getAdjacentMidpoints(_1a8.ptIndex,_1a8.segLength),_1aa=this._mpVertexMovers[_1a8.segIndex];for(i=0;i<_1a9.length;i++){_1aa[_1a9[i]].graphic.hide();}},_repositionRelatedMidpoints:function(_1ab){var i,_1ac=this._getAdjacentMidpoints(_1ab.ptIndex,_1ab.segLength),_1ad=this._mpVertexMovers[_1ab.segIndex];for(i=0;i<_1ac.length;i++){var _1ae=this._getAdjacentVertices(_1ac[i],_1ab.segLength);var _1af=_1ab.relatedGraphic.geometry.getPoint(_1ab.segIndex,_1ae[0]),_1b0=_1ab.relatedGraphic.geometry.getPoint(_1ab.segIndex,_1ae[1]);var _1b1=new _17f({x:(_1af.x+_1b0.x)/2,y:(_1af.y+_1b0.y)/2,spatialReference:_1af.spatialReference.toJson()});_1ad[_1ac[i]].graphic.setGeometry(_1b1);}},_addMidpoints:function(_1b2){var _1b3=_1b2.segIndex,_1b4=_1b2.ptIndex,_1b5=_1b2.segLength;var _1b6=_1b4+1;var i,_1b7=_1b5+1;this._mpVertexMovers[_1b3].splice(_1b4,1);var _1b8=this._vertexMovers[_1b3];for(i=0;i<_1b6;i++){_1b8[i].segLength+=1;}for(i=_1b6;i<_1b8.length;i++){_1b8[i].ptIndex+=1;_1b8[i].segLength+=1;}_1b2.ptIndex=_1b6;_1b2.segLength=_1b8.length+1;_1b8.splice(_1b6,0,_1b2);_1b2.graphic.setSymbol(this._symbol1);_1b8=this._mpVertexMovers[_1b3];for(i=0;i<_1b4;i++){_1b8[i].segLength+=1;}for(i=_1b4;i<_1b5-1;i++){_1b8[i].ptIndex+=1;_1b8[i].segLength+=1;}var _1b9=this._getAdjacentVertices(_1b4,_1b7);var _1ba=this._getAdjacentVertices(_1b4+1,_1b7);var _1bb,_1bc;_1bb=_1b2.relatedGraphic.geometry.getPoint(_1b2.segIndex,_1b9[0]);_1bc=_1b2.relatedGraphic.geometry.getPoint(_1b2.segIndex,_1b9[1]);var _1bd=new _17f({x:(_1bb.x+_1bc.x)/2,y:(_1bb.y+_1bc.y)/2,spatialReference:_1bb.spatialReference.toJson()});_1bb=_1b2.relatedGraphic.geometry.getPoint(_1b2.segIndex,_1ba[0]);_1bc=_1b2.relatedGraphic.geometry.getPoint(_1b2.segIndex,_1ba[1]);var _1be=new _17f({x:(_1bb.x+_1bc.x)/2,y:(_1bb.y+_1bc.y)/2,spatialReference:_1bb.spatialReference.toJson()});var mvr1=new _17e(_1bd,this._symbol2,this.graphic,_1b2.segIndex,_1b4,_1b7,this,true);var mvr2=new _17e(_1be,this._symbol2,this.graphic,_1b2.segIndex,_1b4+1,_1b7,this,true);_1b8.splice(_1b4,0,mvr1,mvr2);},_deleteVertex:function(_1bf){var i,_1c0=_1bf.segIndex,_1c1=_1bf.ptIndex;var _1c2=this._vertexMovers[_1c0];for(i=0;i<_1c1;i++){_1c2[i].segLength-=1;}for(i=_1c1+1;i<_1c2.length;i++){var mvr=_1c2[i];mvr.ptIndex-=1;mvr.segLength-=1;}_1c2.splice(_1c1,1);var info=_1bf._getInfo();_1bf.destroy();this.toolbar.onVertexDelete(this.graphic,info);}});lang.mixin(GVE,{create:function(_1c3,map,_1c4){var type=_1c3.geometry.type;switch(type){case "multipoint":return new GVE.MultipointVertexEditor(_1c3,map,_1c4);break;case "polyline":return new GVE.PolylineVertexEditor(_1c3,map,_1c4);break;case "polygon":return new GVE.PolygonVertexEditor(_1c3,map,_1c4);break;}}});GVE.MultipointVertexEditor=_179(GVE,{declaredClass:"esri.toolbars._MultipointVertexEditor",minLength:1,constructor:function(){this._moveStartHandle=_17a.connect(_17e,"onMoveStart",this,this._moveStartHandler);_17a.disconnect(this._firstMoveHandle);},destroy:function(){this.inherited(arguments);_17a.disconnect(this._moveStartHandle);},_getSegments:function(_1c5){var i,_1c6=_1c5.points,_1c7=[],sr=_1c5.spatialReference;for(i=0;i<_1c6.length;i++){var _1c8=_1c6[i];_1c7.push(new _17f({x:_1c8[0],y:_1c8[1],spatialReference:sr.toJson()}));}return [_1c7];},_getMidpointSegments:function(_1c9){return [];},_getControlPoints:function(_1ca,_1cb,_1cc,_1cd,_1ce){return [];},_getGraphicsLayer:function(){return this.graphic._graphicsLayer;},_mouseOverHandler:function(evt){var _1cf=evt.graphic,_1d0=this._findMover(evt);if(_1d0){this.toolbar.onVertexMouseOver(_1cf,_1d0._getInfo());this._selectedMover=_1d0;if(this._canDel){this._bindCtxNode(_1d0.graphic.getDojoShape().getNode());}}},_mouseOutHandler:function(evt){var _1d1=evt.graphic,_1d2=this._findMover(evt);if(_1d2){this.toolbar.onVertexMouseOut(_1d1,_1d2._getInfo());}},_findMover:function(evt){var i,_1d3=[].concat(this._vertexMovers[0]),_1d4=evt.target;for(i=0;i<_1d3.length;i++){var _1d5=_1d3[i];if(_1d5.graphic.getDojoShape().getNode()===_1d4){return _1d5;}}},_moveStartHandler:function(_1d6){var geom=_1d6.relatedGraphic.geometry,_1d7=_1d6.ptIndex;var _1d8=_1d6.segLength-1;var _1d9=geom.points;var _1da=_1d9.splice(_1d7,1);_1d9.push(_1da[0]);var j,_1db=this._vertexMovers[0];for(j=_1d8;j>_1d7;j--){_1db[j].ptIndex-=1;}_1da=_1db.splice(_1d7,1);_1db.push(_1da[0]);_1da[0].ptIndex=_1d8;},_moveStopHandler:function(_1dc){this._updateRelatedGraphic(_1dc,_1dc.relatedGraphic,_1dc.graphic.geometry,_1dc.segIndex,_1dc.ptIndex,_1dc.segLength);this.toolbar._endOperation("VERTICES");},_updateRelatedGraphic:function(_1dd,_1de,_1df,_1e0,_1e1,_1e2,add,del){var geom=_1de.geometry;if(del){geom.removePoint(_1e1);}else{geom.setPoint(_1e1,_1df);}_1de.setGeometry(geom);},_deleteMidpoints:function(_1e3){}});GVE.PolylineVertexEditor=_179(GVE,{declaredClass:"esri.toolbars._PolylineVertexEditor",minLength:2,_getSegments:function(_1e4){var i,j,_1e5=_1e4.paths,_1e6=[];for(i=0;i<_1e5.length;i++){var path=_1e5[i],_1e7=[];for(j=0;j<path.length;j++){_1e7.push(_1e4.getPoint(i,j));}_1e6.push(_1e7);}return _1e6;},_getMidpointSegments:function(_1e8){var i,j,_1e9=_1e8.paths,_1ea=[],sr=_1e8.spatialReference;for(i=0;i<_1e9.length;i++){var path=_1e9[i],_1eb=[];for(j=0;j<path.length-1;j++){var _1ec=_1e8.getPoint(i,j),_1ed=_1e8.getPoint(i,j+1);var midX=(_1ec.x+_1ed.x)/2,midY=(_1ec.y+_1ed.y)/2;var _1ee=new _17f({x:midX,y:midY,spatialReference:sr.toJson()});_1eb.push(_1ee);}_1ea.push(_1eb);}return _1ea;},_getControlPoints:function(_1ef,_1f0,_1f1,_1f2,_1f3){var map=this.map,idx1,idx2,pt1,pt2;if(this._isNew(_1ef)){idx1=_1f2;idx2=_1f2+1;if(idx1>=0){pt1=map.toScreen(_1f0.getPoint(_1f1,idx1));}if(idx2<=_1f3){pt2=map.toScreen(_1f0.getPoint(_1f1,idx2));}}else{idx1=_1f2-1;idx2=_1f2+1;if(idx1>=0){pt1=map.toScreen(_1f0.getPoint(_1f1,idx1));}if(idx2<_1f3){pt2=map.toScreen(_1f0.getPoint(_1f1,idx2));}}return [pt1,pt2];},_getAdjacentMidpoints:function(_1f4,_1f5){var _1f6=[];var idx1=_1f4-1;if(idx1>=0){_1f6.push(idx1);}var idx2=_1f4;if(idx2<_1f5-1){_1f6.push(idx2);}return _1f6;},_getAdjacentVertices:function(_1f7,_1f8){return [_1f7,_1f7+1];},_deleteMidpoints:function(_1f9){var _1fa=_1f9.segIndex,_1fb=_1f9.ptIndex,_1fc=_1f9.segLength;var _1fd=this._mpVertexMovers[_1fa],_1fe=_1fd.length-1;var _1ff=this._getAdjacentMidpoints(_1fb,_1fc).sort();var i,min=_1ff[0];for(i=0;i<min;i++){_1fd[i].segLength-=1;}for(i=min+1;i<_1fd.length;i++){var mvr=_1fd[i];mvr.ptIndex-=1;mvr.segLength-=1;}if(_1ff.length===1){_1fd.splice(min,1)[0].destroy();}else{var _200=this._getAdjacentVertices(min,_1fe);var _201=_1f9.relatedGraphic.geometry.getPoint(_1f9.segIndex,_200[0]);var _202=_1f9.relatedGraphic.geometry.getPoint(_1f9.segIndex,_200[1]);var _203=new _17f({x:(_201.x+_202.x)/2,y:(_201.y+_202.y)/2,spatialReference:_201.spatialReference.toJson()});var mvr1=new _17e(_203,this._symbol2,this.graphic,_1f9.segIndex,min,_1fe,this,true);var _204=_1fd.splice(min,_1ff.length,mvr1);for(i=0;i<_204.length;i++){_204[i].destroy();}}},_updateRelatedGraphic:function(_205,_206,_207,_208,_209,_20a,add,del){var geom=_206.geometry;if(add){geom.insertPoint(_208,_209+1,_180.fromJson(_207.toJson()));}else{if(del){geom.removePoint(_208,_209);}else{geom.setPoint(_208,_209,_180.fromJson(_207.toJson()));}}_206.setGeometry(geom);}});GVE.PolygonVertexEditor=_179(GVE,{declaredClass:"esri.toolbars._PolygonVertexEditor",minLength:3,_getSegments:function(_20b){var i,j,_20c=_20b.rings,_20d=[];for(i=0;i<_20c.length;i++){var ring=_20c[i],_20e=[];for(j=0;j<ring.length-1;j++){_20e.push(_20b.getPoint(i,j));}_20d.push(_20e);}return _20d;},_getMidpointSegments:function(_20f){var i,j,_210=_20f.rings,_211=[],sr=_20f.spatialReference;for(i=0;i<_210.length;i++){var ring=_210[i],_212=[];for(j=0;j<ring.length-1;j++){var _213=_20f.getPoint(i,j),_214=_20f.getPoint(i,j+1);var midX=(_213.x+_214.x)/2,midY=(_213.y+_214.y)/2;var _215=new _17f({x:midX,y:midY,spatialReference:sr.toJson()});_212.push(_215);}_211.push(_212);}return _211;},_getControlPoints:function(_216,_217,_218,_219,_21a){var map=this.map,idx1,idx2,pt1,pt2;if(this._isNew(_216)){idx1=_219;idx2=(_219+1)%_21a;}else{idx1=_219-1;idx1=idx1<0?(_21a+idx1)%_21a:idx1;idx2=(_219+1)%_21a;}pt1=map.toScreen(_217.getPoint(_218,idx1));pt2=map.toScreen(_217.getPoint(_218,idx2));return [pt1,pt2];},_getAdjacentMidpoints:function(_21b,_21c){var idx1=_21b-1;idx1=idx1<0?(_21c+idx1)%_21c:idx1;var idx2=_21b;return [idx1,idx2];},_getAdjacentVertices:function(_21d,_21e){return [_21d,(_21d+1)%_21e];},_deleteMidpoints:function(_21f){var _220=_21f.segIndex,_221=_21f.ptIndex,_222=_21f.segLength;var _223=this._mpVertexMovers[_220],_224=_223.length-1,_225=this._getAdjacentMidpoints(_221,_222).sort(),_226,_227,_228,_229,i,mvr1,mvr,min=_225[0],max=_225[_225.length-1];if(_221===0){_226=this._getAdjacentVertices(_224-1,_224);_227=_21f.relatedGraphic.geometry.getPoint(_21f.segIndex,_226[0]);_228=_21f.relatedGraphic.geometry.getPoint(_21f.segIndex,_226[1]);_229=new _17f({x:(_227.x+_228.x)/2,y:(_227.y+_228.y)/2,spatialReference:_227.spatialReference.toJson()});mvr1=new _17e(_229,this._symbol2,this.graphic,_21f.segIndex,_224-1,_224,this,true);_223.splice(max,1,mvr1)[0].destroy();_223.splice(min,1)[0].destroy();for(i=0;i<_223.length-1;i++){mvr=_223[i];mvr.ptIndex-=1;mvr.segLength-=1;}}else{_226=this._getAdjacentVertices(min,_224);_227=_21f.relatedGraphic.geometry.getPoint(_21f.segIndex,_226[0]);_228=_21f.relatedGraphic.geometry.getPoint(_21f.segIndex,_226[1]);_229=new _17f({x:(_227.x+_228.x)/2,y:(_227.y+_228.y)/2,spatialReference:_227.spatialReference.toJson()});mvr1=new _17e(_229,this._symbol2,this.graphic,_21f.segIndex,min,_224,this,true);var _22a=_223.splice(min,_225.length,mvr1);for(i=0;i<_22a.length;i++){_22a[i].destroy();}for(i=0;i<min;i++){_223[i].segLength-=1;}for(i=min+1;i<_223.length;i++){mvr=_223[i];mvr.ptIndex-=1;mvr.segLength-=1;}}},_updateRelatedGraphic:function(_22b,_22c,_22d,_22e,_22f,_230,add,del){var geom=_22c.geometry;if(add){geom.insertPoint(_22e,_22f+1,_180.fromJson(_22d.toJson()));}else{if(del){geom.removePoint(_22e,_22f);if(_22f===0){geom.setPoint(_22e,_230-1,_180.fromJson(geom.getPoint(_22e,0).toJson()));}}else{geom.setPoint(_22e,_22f,_180.fromJson(_22d.toJson()));if(_22f===0){geom.setPoint(_22e,_230,_180.fromJson(_22d.toJson()));}}}_22c.setGeometry(geom);}});if(has("extend-esri")){lang.setObject("toolbars._GraphicVertexEditor",GVE,_17d);lang.setObject("toolbars._MultipointVertexEditor",GVE.MultipointVertexEditor,_17d);lang.setObject("toolbars._PolylineVertexEditor",GVE.PolylineVertexEditor,_17d);lang.setObject("toolbars._PolygonVertexEditor",GVE.PolygonVertexEditor,_17d);}return GVE;});},"dijit/_Templated":function(){define("dijit/_Templated",["./_WidgetBase","./_TemplatedMixin","./_WidgetsInTemplateMixin","dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojo/_base/kernel"],function(_231,_232,_233,_234,_235,lang,_236){lang.extend(_231,{waiRole:"",waiState:""});return _235("dijit._Templated",[_232,_233],{widgetsInTemplate:false,constructor:function(){_236.deprecated(this.declaredClass+": dijit._Templated deprecated, use dijit._TemplatedMixin and if necessary dijit._WidgetsInTemplateMixin","","2.0");},_attachTemplateNodes:function(_237,_238){this.inherited(arguments);var _239=lang.isArray(_237)?_237:(_237.all||_237.getElementsByTagName("*"));var x=lang.isArray(_237)?0:-1;for(;x<_239.length;x++){var _23a=(x==-1)?_237:_239[x];var role=_238(_23a,"waiRole");if(role){_23a.setAttribute("role",role);}var _23b=_238(_23a,"waiState");if(_23b){_234.forEach(_23b.split(/\s*,\s*/),function(_23c){if(_23c.indexOf("-")!=-1){var pair=_23c.split("-");_23a.setAttribute("aria-"+pair[0],pair[1]);}});}}}});});},"dijit/_CssStateMixin":function(){define("dijit/_CssStateMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom","dojo/dom-class","dojo/has","dojo/_base/lang","dojo/on","dojo/ready","dojo/_base/window","./registry"],function(_23d,_23e,dom,_23f,has,lang,on,_240,win,_241){var _242=_23e("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:false,active:false,_applyAttributes:function(){this.inherited(arguments);_23d.forEach(["disabled","readOnly","checked","selected","focused","state","hovering","active","_opened"],function(attr){this.watch(attr,lang.hitch(this,"_setStateClass"));},this);for(var ap in this.cssStateNodes){this._trackMouseState(this[ap],this.cssStateNodes[ap]);}this._trackMouseState(this.domNode,this.baseClass);this._setStateClass();},_cssMouseEvent:function(_243){if(!this.disabled){switch(_243.type){case "mouseover":this._set("hovering",true);this._set("active",this._mouseDown);break;case "mouseout":this._set("hovering",false);this._set("active",false);break;case "mousedown":case "touchstart":this._set("active",true);break;case "mouseup":case "touchend":this._set("active",false);break;}}},_setStateClass:function(){var _244=this.baseClass.split(" ");function _245(_246){_244=_244.concat(_23d.map(_244,function(c){return c+_246;}),"dijit"+_246);};if(!this.isLeftToRight()){_245("Rtl");}var _247=this.checked=="mixed"?"Mixed":(this.checked?"Checked":"");if(this.checked){_245(_247);}if(this.state){_245(this.state);}if(this.selected){_245("Selected");}if(this._opened){_245("Opened");}if(this.disabled){_245("Disabled");}else{if(this.readOnly){_245("ReadOnly");}else{if(this.active){_245("Active");}else{if(this.hovering){_245("Hover");}}}}if(this.focused){_245("Focused");}var tn=this.stateNode||this.domNode,_248={};_23d.forEach(tn.className.split(" "),function(c){_248[c]=true;});if("_stateClasses" in this){_23d.forEach(this._stateClasses,function(c){delete _248[c];});}_23d.forEach(_244,function(c){_248[c]=true;});var _249=[];for(var c in _248){_249.push(c);}tn.className=_249.join(" ");this._stateClasses=_244;},_subnodeCssMouseEvent:function(node,_24a,evt){if(this.disabled||this.readOnly){return;}function _24b(_24c){_23f.toggle(node,_24a+"Hover",_24c);};function _24d(_24e){_23f.toggle(node,_24a+"Active",_24e);};function _24f(_250){_23f.toggle(node,_24a+"Focused",_250);};switch(evt.type){case "mouseover":_24b(true);break;case "mouseout":_24b(false);_24d(false);break;case "mousedown":case "touchstart":_24d(true);break;case "mouseup":case "touchend":_24d(false);break;case "focus":case "focusin":_24f(true);break;case "blur":case "focusout":_24f(false);break;}},_trackMouseState:function(node,_251){node._cssState=_251;}});_240(function(){function _252(evt){if(!dom.isDescendant(evt.relatedTarget,evt.target)){for(var node=evt.target;node&&node!=evt.relatedTarget;node=node.parentNode){if(node._cssState){var _253=_241.getEnclosingWidget(node);if(_253){if(node==_253.domNode){_253._cssMouseEvent(evt);}else{_253._subnodeCssMouseEvent(node,node._cssState,evt);}}}}}};function _254(evt){evt.target=evt.srcElement;_252(evt);};var body=win.body(),_255=(has("touch")?[]:["mouseover","mouseout"]).concat(["mousedown","touchstart","mouseup","touchend"]);_23d.forEach(_255,function(type){if(body.addEventListener){body.addEventListener(type,_252,true);}else{body.attachEvent("on"+type,_254);}});on(body,"focusin, focusout",function(evt){var node=evt.target;if(node._cssState&&!node.getAttribute("widgetId")){var _256=_241.getEnclosingWidget(node);_256._subnodeCssMouseEvent(node,node._cssState,evt);}});});return _242;});},"url:dijit/form/templates/ComboButton.html":"<table class=\"dijit dijitReset dijitInline dijitLeft\"\n\tcellspacing='0' cellpadding='0' role=\"presentation\"\n\t><tbody role=\"presentation\"><tr role=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\" data-dojo-attach-point=\"buttonNode\" data-dojo-attach-event=\"ondijitclick:_onClick,onkeypress:_onButtonKeyPress\"\n\t\t><div id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\n\t\t\tdata-dojo-attach-point=\"titleNode\"\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\n\t\t\t><div class=\"dijitReset dijitInline dijitIcon\" data-dojo-attach-point=\"iconNode\" role=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" data-dojo-attach-point=\"containerNode\" role=\"presentation\"></div\n\t\t></div\n\t\t></td\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\n\t\t\tdata-dojo-attach-point=\"_popupStateNode,focusNode,_buttonNode\"\n\t\t\tdata-dojo-attach-event=\"onkeypress:_onArrowKeyPress\"\n\t\t\ttitle=\"${optionsTitle}\"\n\t\t\trole=\"button\" aria-haspopup=\"true\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" role=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" role=\"presentation\">&#9660;</div\n\t\t></td\n\t\t><td style=\"display:none !important;\"\n\t\t\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" data-dojo-attach-point=\"valueNode\" role=\"presentation\"\n\t\t/></td></tr></tbody\n></table>\n","dijit/_editor/html":function(){define("dijit/_editor/html",["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(_257,lang,has){var _258={};lang.setObject("dijit._editor.html",_258);var _259=_258.escapeXml=function(str,_25a){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_25a){str=str.replace(/'/gm,"&#39;");}return str;};_258.getNodeHtml=function(node){var _25b=[];_258.getNodeHtmlHelper(node,_25b);return _25b.join("");};_258.getNodeHtmlHelper=function(node,_25c){switch(node.nodeType){case 1:var _25d=node.nodeName.toLowerCase();if(!_25d||_25d.charAt(0)=="/"){return "";}_25c.push("<",_25d);var _25e=[],_25f={};var attr;if(has("dom-attributes-explicit")||has("dom-attributes-specified-flag")){var i=0;while((attr=node.attributes[i++])){var n=attr.name;if(n.substr(0,3)!=="_dj"&&(!has("dom-attributes-specified-flag")||attr.specified)&&!(n in _25f)){var v=attr.value;if(n=="src"||n=="href"){if(node.getAttribute("_djrealurl")){v=node.getAttribute("_djrealurl");}}if(has("ie")===8&&n==="style"){v=v.replace("HEIGHT:","height:").replace("WIDTH:","width:");}_25e.push([n,v]);_25f[n]=v;}}}else{var _260=/^input$|^img$/i.test(node.nodeName)?node:node.cloneNode(false);var s=_260.outerHTML;var _261=/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi;var _262=s.match(_261);s=s.substr(0,s.indexOf(">"));_257.forEach(_262,function(attr){if(attr){var idx=attr.indexOf("=");if(idx>0){var key=attr.substring(0,idx);if(key.substr(0,3)!="_dj"){if(key=="src"||key=="href"){if(node.getAttribute("_djrealurl")){_25e.push([key,node.getAttribute("_djrealurl")]);return;}}var val,_263;switch(key){case "style":val=node.style.cssText.toLowerCase();break;case "class":val=node.className;break;case "width":if(_25d==="img"){_263=/width=(\S+)/i.exec(s);if(_263){val=_263[1];}break;}case "height":if(_25d==="img"){_263=/height=(\S+)/i.exec(s);if(_263){val=_263[1];}break;}default:val=node.getAttribute(key);}if(val!=null){_25e.push([key,val.toString()]);}}}}},this);}_25e.sort(function(a,b){return a[0]<b[0]?-1:(a[0]==b[0]?0:1);});var j=0;while((attr=_25e[j++])){_25c.push(" ",attr[0],"=\"",(typeof attr[1]==="string"?_259(attr[1],true):attr[1]),"\"");}switch(_25d){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":_25c.push(" />");break;case "script":_25c.push(">",node.innerHTML,"</",_25d,">");break;default:_25c.push(">");if(node.hasChildNodes()){_258.getChildrenHtmlHelper(node,_25c);}_25c.push("</",_25d,">");}break;case 4:case 3:_25c.push(_259(node.nodeValue,true));break;case 8:_25c.push("<!--",_259(node.nodeValue,true),"-->");break;default:_25c.push("<!-- Element not recognized - Type: ",node.nodeType," Name: ",node.nodeName,"-->");}};_258.getChildrenHtml=function(node){var _264=[];_258.getChildrenHtmlHelper(node,_264);return _264.join("");};_258.getChildrenHtmlHelper=function(dom,_265){if(!dom){return;}var _266=dom["childNodes"]||dom;var _267=!has("ie")||_266!==dom;var node,i=0;while((node=_266[i++])){if(!_267||node.parentNode==dom){_258.getNodeHtmlHelper(node,_265);}}};return _258;});},"dijit/place":function(){define("dijit/place",["dojo/_base/array","dojo/dom-geometry","dojo/dom-style","dojo/_base/kernel","dojo/_base/window","dojo/window","./main"],function(_268,_269,_26a,_26b,win,_26c,_26d){function _26e(node,_26f,_270,_271){var view=_26c.getBox(node.ownerDocument);if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){win.body(node.ownerDocument).appendChild(node);}var best=null;_268.some(_26f,function(_272){var _273=_272.corner;var pos=_272.pos;var _274=0;var _275={w:{"L":view.l+view.w-pos.x,"R":pos.x-view.l,"M":view.w}[_273.charAt(1)],h:{"T":view.t+view.h-pos.y,"B":pos.y-view.t,"M":view.h}[_273.charAt(0)]};var s=node.style;s.left=s.right="auto";if(_270){var res=_270(node,_272.aroundCorner,_273,_275,_271);_274=typeof res=="undefined"?0:res;}var _276=node.style;var _277=_276.display;var _278=_276.visibility;if(_276.display=="none"){_276.visibility="hidden";_276.display="";}var bb=_269.position(node);_276.display=_277;_276.visibility=_278;var _279={"L":pos.x,"R":pos.x-bb.w,"M":Math.max(view.l,Math.min(view.l+view.w,pos.x+(bb.w>>1))-bb.w)}[_273.charAt(1)],_27a={"T":pos.y,"B":pos.y-bb.h,"M":Math.max(view.t,Math.min(view.t+view.h,pos.y+(bb.h>>1))-bb.h)}[_273.charAt(0)],_27b=Math.max(view.l,_279),_27c=Math.max(view.t,_27a),endX=Math.min(view.l+view.w,_279+bb.w),endY=Math.min(view.t+view.h,_27a+bb.h),_27d=endX-_27b,_27e=endY-_27c;_274+=(bb.w-_27d)+(bb.h-_27e);if(best==null||_274<best.overflow){best={corner:_273,aroundCorner:_272.aroundCorner,x:_27b,y:_27c,w:_27d,h:_27e,overflow:_274,spaceAvailable:_275};}return !_274;});if(best.overflow&&_270){_270(node,best.aroundCorner,best.corner,best.spaceAvailable,_271);}var l=_269.isBodyLtr(node.ownerDocument),s=node.style;s.top=best.y+"px";s[l?"left":"right"]=(l?best.x:view.w-best.x-best.w)+"px";s[l?"right":"left"]="auto";return best;};var _27f={at:function(node,pos,_280,_281){var _282=_268.map(_280,function(_283){var c={corner:_283,pos:{x:pos.x,y:pos.y}};if(_281){c.pos.x+=_283.charAt(1)=="L"?_281.x:-_281.x;c.pos.y+=_283.charAt(0)=="T"?_281.y:-_281.y;}return c;});return _26e(node,_282);},around:function(node,_284,_285,_286,_287){var _288=(typeof _284=="string"||"offsetWidth" in _284)?_269.position(_284,true):_284;if(_284.parentNode){var _289=_26a.getComputedStyle(_284).position=="absolute";var _28a=_284.parentNode;while(_28a&&_28a.nodeType==1&&_28a.nodeName!="BODY"){var _28b=_269.position(_28a,true),pcs=_26a.getComputedStyle(_28a);if(/relative|absolute/.test(pcs.position)){_289=false;}if(!_289&&/hidden|auto|scroll/.test(pcs.overflow)){var _28c=Math.min(_288.y+_288.h,_28b.y+_28b.h);var _28d=Math.min(_288.x+_288.w,_28b.x+_28b.w);_288.x=Math.max(_288.x,_28b.x);_288.y=Math.max(_288.y,_28b.y);_288.h=_28c-_288.y;_288.w=_28d-_288.x;}if(pcs.position=="absolute"){_289=true;}_28a=_28a.parentNode;}}var x=_288.x,y=_288.y,_28e="w" in _288?_288.w:(_288.w=_288.width),_28f="h" in _288?_288.h:(_26b.deprecated("place.around: dijit/place.__Rectangle: { x:"+x+", y:"+y+", height:"+_288.height+", width:"+_28e+" } has been deprecated.  Please use { x:"+x+", y:"+y+", h:"+_288.height+", w:"+_28e+" }","","2.0"),_288.h=_288.height);var _290=[];function push(_291,_292){_290.push({aroundCorner:_291,corner:_292,pos:{x:{"L":x,"R":x+_28e,"M":x+(_28e>>1)}[_291.charAt(1)],y:{"T":y,"B":y+_28f,"M":y+(_28f>>1)}[_291.charAt(0)]}});};_268.forEach(_285,function(pos){var ltr=_286;switch(pos){case "above-centered":push("TM","BM");break;case "below-centered":push("BM","TM");break;case "after-centered":ltr=!ltr;case "before-centered":push(ltr?"ML":"MR",ltr?"MR":"ML");break;case "after":ltr=!ltr;case "before":push(ltr?"TL":"TR",ltr?"TR":"TL");push(ltr?"BL":"BR",ltr?"BR":"BL");break;case "below-alt":ltr=!ltr;case "below":push(ltr?"BL":"BR",ltr?"TL":"TR");push(ltr?"BR":"BL",ltr?"TR":"TL");break;case "above-alt":ltr=!ltr;case "above":push(ltr?"TL":"TR",ltr?"BL":"BR");push(ltr?"TR":"TL",ltr?"BR":"BL");break;default:push(pos.aroundCorner,pos.corner);}});var _293=_26e(node,_290,_287,{w:_28e,h:_28f});_293.aroundNodePos=_288;return _293;}};return _26d.place=_27f;});},"dijit/_HasDropDown":function(){define("dijit/_HasDropDown",["dojo/_base/declare","dojo/_base/Deferred","dojo/_base/event","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/has","dojo/keys","dojo/_base/lang","dojo/on","dojo/window","./registry","./focus","./popup","./_FocusMixin"],function(_294,_295,_296,dom,_297,_298,_299,_29a,has,keys,lang,on,_29b,_29c,_29d,_29e,_29f){return _294("dijit._HasDropDown",_29f,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:true,forceWidth:false,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:true,_onDropDownMouseDown:function(e){if(this.disabled||this.readOnly){return;}e.preventDefault();this._docHandler=this.connect(this.ownerDocument,"mouseup","_onDropDownMouseUp");this.toggleDropDown();},_onDropDownMouseUp:function(e){if(e&&this._docHandler){this.disconnect(this._docHandler);}var _2a0=this.dropDown,_2a1=false;if(e&&this._opened){var c=_299.position(this._buttonNode,true);if(!(e.pageX>=c.x&&e.pageX<=c.x+c.w)||!(e.pageY>=c.y&&e.pageY<=c.y+c.h)){var t=e.target;while(t&&!_2a1){if(_298.contains(t,"dijitPopup")){_2a1=true;}else{t=t.parentNode;}}if(_2a1){t=e.target;if(_2a0.onItemClick){var _2a2;while(t&&!(_2a2=_29c.byNode(t))){t=t.parentNode;}if(_2a2&&_2a2.onClick&&_2a2.getParent){_2a2.getParent().onItemClick(_2a2,e);}}return;}}}if(this._opened){if(_2a0.focus&&_2a0.autoFocus!==false){this._focusDropDownTimer=this.defer(function(){_2a0.focus();delete this._focusDropDownTimer;});}}else{this.defer("focus");}if(has("touch")){this._justGotMouseUp=true;this.defer(function(){this._justGotMouseUp=false;});}},_onDropDownClick:function(e){if(has("touch")&&!this._justGotMouseUp){this._onDropDownMouseDown(e);this._onDropDownMouseUp(e);}if(this._stopClickEvents){_296.stop(e);}},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var _2a3={"after":this.isLeftToRight()?"Right":"Left","before":this.isLeftToRight()?"Left":"Right","above":"Up","below":"Down","left":"Left","right":"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";_298.add(this._arrowWrapperNode||this._buttonNode,"dijit"+_2a3+"ArrowButton");},postCreate:function(){this.inherited(arguments);var _2a4=this.focusNode||this.domNode;this.own(on(this._buttonNode,"mousedown",lang.hitch(this,"_onDropDownMouseDown")),on(this._buttonNode,"click",lang.hitch(this,"_onDropDownClick")),on(_2a4,"keydown",lang.hitch(this,"_onKey")),on(_2a4,"keyup",lang.hitch(this,"_onKeyUp")));},destroy:function(){if(this.dropDown){if(!this.dropDown._destroyed){this.dropDown.destroyRecursive();}delete this.dropDown;}this.inherited(arguments);},_onKey:function(e){if(this.disabled||this.readOnly){return;}var d=this.dropDown,_2a5=e.target;if(d&&this._opened&&d.handleKey){if(d.handleKey(e)===false){_296.stop(e);return;}}if(d&&this._opened&&e.keyCode==keys.ESCAPE){this.closeDropDown();_296.stop(e);}else{if(!this._opened&&(e.keyCode==keys.DOWN_ARROW||((e.keyCode==keys.ENTER||e.keyCode==keys.SPACE)&&((_2a5.tagName||"").toLowerCase()!=="input"||(_2a5.type&&_2a5.type.toLowerCase()!=="text"))))){this._toggleOnKeyUp=true;_296.stop(e);}}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;this.toggleDropDown();var d=this.dropDown;if(d&&d.focus){this.defer(lang.hitch(d,"focus"),1);}}},_onBlur:function(){var _2a6=_29d.curNode&&this.dropDown&&dom.isDescendant(_29d.curNode,this.dropDown.domNode);this.closeDropDown(_2a6);this.inherited(arguments);},isLoaded:function(){return true;},loadDropDown:function(_2a7){_2a7();},loadAndOpenDropDown:function(){var d=new _295(),_2a8=lang.hitch(this,function(){this.openDropDown();d.resolve(this.dropDown);});if(!this.isLoaded()){this.loadDropDown(_2a8);}else{_2a8();}return d;},toggleDropDown:function(){if(this.disabled||this.readOnly){return;}if(!this._opened){this.loadAndOpenDropDown();}else{this.closeDropDown();}},openDropDown:function(){var _2a9=this.dropDown,_2aa=_2a9.domNode,_2ab=this._aroundNode||this.domNode,self=this;if(!this._preparedNode){this._preparedNode=true;if(_2aa.style.width){this._explicitDDWidth=true;}if(_2aa.style.height){this._explicitDDHeight=true;}}if(this.maxHeight||this.forceWidth||this.autoWidth){var _2ac={display:"",visibility:"hidden"};if(!this._explicitDDWidth){_2ac.width="";}if(!this._explicitDDHeight){_2ac.height="";}_29a.set(_2aa,_2ac);var _2ad=this.maxHeight;if(_2ad==-1){var _2ae=_29b.getBox(this.ownerDocument),_2af=_299.position(_2ab,false);_2ad=Math.floor(Math.max(_2af.y,_2ae.h-(_2af.y+_2af.h)));}_29e.moveOffScreen(_2a9);if(_2a9.startup&&!_2a9._started){_2a9.startup();}var mb=_299.getMarginSize(_2aa);var _2b0=(_2ad&&mb.h>_2ad);_29a.set(_2aa,{overflowX:"visible",overflowY:_2b0?"auto":"visible"});if(_2b0){mb.h=_2ad;if("w" in mb){mb.w+=16;}}else{delete mb.h;}if(this.forceWidth){mb.w=_2ab.offsetWidth;}else{if(this.autoWidth){mb.w=Math.max(mb.w,_2ab.offsetWidth);}else{delete mb.w;}}if(lang.isFunction(_2a9.resize)){_2a9.resize(mb);}else{_299.setMarginBox(_2aa,mb);}}var _2b1=_29e.open({parent:this,popup:_2a9,around:_2ab,orient:this.dropDownPosition,onExecute:function(){self.closeDropDown(true);},onCancel:function(){self.closeDropDown(true);},onClose:function(){_297.set(self._popupStateNode,"popupActive",false);_298.remove(self._popupStateNode,"dijitHasDropDownOpen");self._set("_opened",false);}});_297.set(this._popupStateNode,"popupActive","true");_298.add(this._popupStateNode,"dijitHasDropDownOpen");this._set("_opened",true);this.domNode.setAttribute("aria-expanded","true");return _2b1;},closeDropDown:function(_2b2){if(this._focusDropDownTimer){this._focusDropDownTimer.remove();delete this._focusDropDownTimer;}if(this._opened){this.domNode.setAttribute("aria-expanded","false");if(_2b2){this.focus();}_29e.close(this.dropDown);this._opened=false;}}});});},"dijit/_editor/plugins/EnterKeyHandling":function(){define("dijit/_editor/plugins/EnterKeyHandling",["dojo/_base/declare","dojo/dom-construct","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/_base/window","dojo/window","../_Plugin","../RichText","../range","../../_base/focus"],function(_2b3,_2b4,_2b5,keys,lang,has,win,_2b6,_2b7,_2b8,_2b9,_2ba){return _2b3("dijit._editor.plugins.EnterKeyHandling",_2b7,{blockNodeForEnter:"BR",constructor:function(args){if(args){if("blockNodeForEnter" in args){args.blockNodeForEnter=args.blockNodeForEnter.toUpperCase();}lang.mixin(this,args);}},setEditor:function(_2bb){if(this.editor===_2bb){return;}this.editor=_2bb;if(this.blockNodeForEnter=="BR"){this.editor.customUndo=true;_2bb.onLoadDeferred.then(lang.hitch(this,function(d){this.connect(_2bb.document,"onkeypress",function(e){if(e.charOrCode==keys.ENTER){var ne=lang.mixin({},e);ne.shiftKey=true;if(!this.handleEnterKey(ne)){_2b5.stop(e);}}});if(has("ie")>=9){this.connect(_2bb.document,"onpaste",function(e){setTimeout(dojo.hitch(this,function(){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();r.move("character",1);r.select();}),0);});}return d;}));}else{if(this.blockNodeForEnter){var h=lang.hitch(this,this.handleEnterKey);_2bb.addKeyHandler(13,0,0,h);_2bb.addKeyHandler(13,0,1,h);this.connect(this.editor,"onKeyPressed","onKeyPressed");}}},onKeyPressed:function(){if(this._checkListLater){if(win.withGlobal(this.editor.window,"isCollapsed",_2ba)){var _2bc=this.editor._sCall("getAncestorElement",["LI"]);if(!_2bc){_2b8.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);var _2bd=this.editor._sCall("getAncestorElement",[this.blockNodeForEnter]);if(_2bd){_2bd.innerHTML=this.bogusHtmlContent;if(has("ie")<=9){var r=this.editor.document.selection.createRange();r.move("character",-1);r.select();}}else{console.error("onKeyPressed: Cannot find the new block node");}}else{if(has("mozilla")){if(_2bc.parentNode.parentNode.nodeName=="LI"){_2bc=_2bc.parentNode.parentNode;}}var fc=_2bc.firstChild;if(fc&&fc.nodeType==1&&(fc.nodeName=="UL"||fc.nodeName=="OL")){_2bc.insertBefore(fc.ownerDocument.createTextNode(" "),fc);var _2be=_2b9.create(this.editor.window);_2be.setStart(_2bc.firstChild,0);var _2bf=_2b9.getSelection(this.editor.window,true);_2bf.removeAllRanges();_2bf.addRange(_2be);}}}this._checkListLater=false;}if(this._pressedEnterInBlock){if(this._pressedEnterInBlock.previousSibling){this.removeTrailingBr(this._pressedEnterInBlock.previousSibling);}delete this._pressedEnterInBlock;}},bogusHtmlContent:"&#160;",blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(e){var _2c0,_2c1,_2c2,_2c3,_2c4,_2c5,doc=this.editor.document,br,rs,txt;if(e.shiftKey){var _2c6=this.editor._sCall("getParentElement",[]);var _2c7=_2b9.getAncestor(_2c6,this.blockNodes);if(_2c7){if(_2c7.tagName=="LI"){return true;}_2c0=_2b9.getSelection(this.editor.window);_2c1=_2c0.getRangeAt(0);if(!_2c1.collapsed){_2c1.deleteContents();_2c0=_2b9.getSelection(this.editor.window);_2c1=_2c0.getRangeAt(0);}if(_2b9.atBeginningOfContainer(_2c7,_2c1.startContainer,_2c1.startOffset)){br=doc.createElement("br");_2c2=_2b9.create(this.editor.window);_2c7.insertBefore(br,_2c7.firstChild);_2c2.setStartAfter(br);_2c0.removeAllRanges();_2c0.addRange(_2c2);}else{if(_2b9.atEndOfContainer(_2c7,_2c1.startContainer,_2c1.startOffset)){_2c2=_2b9.create(this.editor.window);br=doc.createElement("br");_2c7.appendChild(br);_2c7.appendChild(doc.createTextNode(" "));_2c2.setStart(_2c7.lastChild,0);_2c0.removeAllRanges();_2c0.addRange(_2c2);}else{rs=_2c1.startContainer;if(rs&&rs.nodeType==3){txt=rs.nodeValue;_2c3=doc.createTextNode(txt.substring(0,_2c1.startOffset));_2c4=doc.createTextNode(txt.substring(_2c1.startOffset));_2c5=doc.createElement("br");if(_2c4.nodeValue==""&&has("webkit")){_2c4=doc.createTextNode(" ");}_2b4.place(_2c3,rs,"after");_2b4.place(_2c5,_2c3,"after");_2b4.place(_2c4,_2c5,"after");_2b4.destroy(rs);_2c2=_2b9.create(this.editor.window);_2c2.setStart(_2c4,0);_2c0.removeAllRanges();_2c0.addRange(_2c2);return false;}return true;}}}else{_2c0=_2b9.getSelection(this.editor.window);if(_2c0.rangeCount){_2c1=_2c0.getRangeAt(0);if(_2c1&&_2c1.startContainer){if(!_2c1.collapsed){_2c1.deleteContents();_2c0=_2b9.getSelection(this.editor.window);_2c1=_2c0.getRangeAt(0);}rs=_2c1.startContainer;if(rs&&rs.nodeType==3){var _2c8=false;var _2c9=_2c1.startOffset;if(rs.length<_2c9){ret=this._adjustNodeAndOffset(rs,_2c9);rs=ret.node;_2c9=ret.offset;}txt=rs.nodeValue;_2c3=doc.createTextNode(txt.substring(0,_2c9));_2c4=doc.createTextNode(txt.substring(_2c9));_2c5=doc.createElement("br");if(!_2c4.length){_2c4=doc.createTextNode(" ");_2c8=true;}if(_2c3.length){_2b4.place(_2c3,rs,"after");}else{_2c3=rs;}_2b4.place(_2c5,_2c3,"after");_2b4.place(_2c4,_2c5,"after");_2b4.destroy(rs);_2c2=_2b9.create(this.editor.window);_2c2.setStart(_2c4,0);_2c2.setEnd(_2c4,_2c4.length);_2c0.removeAllRanges();_2c0.addRange(_2c2);if(_2c8&&!has("webkit")){this.editor._sCall("remove",[]);}else{this.editor._sCall("collapse",[true]);}}else{var _2ca;if(_2c1.startOffset>=0){_2ca=rs.childNodes[_2c1.startOffset];}var _2c5=doc.createElement("br");var _2c4=doc.createTextNode(" ");if(!_2ca){rs.appendChild(_2c5);rs.appendChild(_2c4);}else{_2b4.place(_2c5,_2ca,"before");_2b4.place(_2c4,_2c5,"after");}_2c2=_2b9.create(this.editor.window);_2c2.setStart(_2c4,0);_2c2.setEnd(_2c4,_2c4.length);_2c0.removeAllRanges();_2c0.addRange(_2c2);this.editor._sCall("collapse",[true]);}}}else{_2b8.prototype.execCommand.call(this.editor,"inserthtml","<br>");}}return false;}var _2cb=true;_2c0=_2b9.getSelection(this.editor.window);_2c1=_2c0.getRangeAt(0);if(!_2c1.collapsed){_2c1.deleteContents();_2c0=_2b9.getSelection(this.editor.window);_2c1=_2c0.getRangeAt(0);}var _2cc=_2b9.getBlockAncestor(_2c1.endContainer,null,this.editor.editNode);var _2cd=_2cc.blockNode;if((this._checkListLater=(_2cd&&(_2cd.nodeName=="LI"||_2cd.parentNode.nodeName=="LI")))){if(has("mozilla")){this._pressedEnterInBlock=_2cd;}if(/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(_2cd.innerHTML)){_2cd.innerHTML="";if(has("webkit")){_2c2=_2b9.create(this.editor.window);_2c2.setStart(_2cd,0);_2c0.removeAllRanges();_2c0.addRange(_2c2);}this._checkListLater=false;}return true;}if(!_2cc.blockNode||_2cc.blockNode===this.editor.editNode){try{_2b8.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter);}catch(e2){}_2cc={blockNode:this.editor._sCall("getAncestorElement",[this.blockNodeForEnter]),blockContainer:this.editor.editNode};if(_2cc.blockNode){if(_2cc.blockNode!=this.editor.editNode&&(!(_2cc.blockNode.textContent||_2cc.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)){this.removeTrailingBr(_2cc.blockNode);return false;}}else{_2cc.blockNode=this.editor.editNode;}_2c0=_2b9.getSelection(this.editor.window);_2c1=_2c0.getRangeAt(0);}var _2ce=doc.createElement(this.blockNodeForEnter);_2ce.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(_2cc.blockNode);var _2cf=_2c1.endOffset;var node=_2c1.endContainer;if(node.length<_2cf){var ret=this._adjustNodeAndOffset(node,_2cf);node=ret.node;_2cf=ret.offset;}if(_2b9.atEndOfContainer(_2cc.blockNode,node,_2cf)){if(_2cc.blockNode===_2cc.blockContainer){_2cc.blockNode.appendChild(_2ce);}else{_2b4.place(_2ce,_2cc.blockNode,"after");}_2cb=false;_2c2=_2b9.create(this.editor.window);_2c2.setStart(_2ce,0);_2c0.removeAllRanges();_2c0.addRange(_2c2);if(this.editor.height){_2b6.scrollIntoView(_2ce);}}else{if(_2b9.atBeginningOfContainer(_2cc.blockNode,_2c1.startContainer,_2c1.startOffset)){_2b4.place(_2ce,_2cc.blockNode,_2cc.blockNode===_2cc.blockContainer?"first":"before");if(_2ce.nextSibling&&this.editor.height){_2c2=_2b9.create(this.editor.window);_2c2.setStart(_2ce.nextSibling,0);_2c0.removeAllRanges();_2c0.addRange(_2c2);_2b6.scrollIntoView(_2ce.nextSibling);}_2cb=false;}else{if(_2cc.blockNode===_2cc.blockContainer){_2cc.blockNode.appendChild(_2ce);}else{_2b4.place(_2ce,_2cc.blockNode,"after");}_2cb=false;if(_2cc.blockNode.style){if(_2ce.style){if(_2cc.blockNode.style.cssText){_2ce.style.cssText=_2cc.blockNode.style.cssText;}}}rs=_2c1.startContainer;var _2d0;if(rs&&rs.nodeType==3){var _2d1,_2d2;_2cf=_2c1.endOffset;if(rs.length<_2cf){ret=this._adjustNodeAndOffset(rs,_2cf);rs=ret.node;_2cf=ret.offset;}txt=rs.nodeValue;_2c3=doc.createTextNode(txt.substring(0,_2cf));_2c4=doc.createTextNode(txt.substring(_2cf,txt.length));_2b4.place(_2c3,rs,"before");_2b4.place(_2c4,rs,"after");_2b4.destroy(rs);var _2d3=_2c3.parentNode;while(_2d3!==_2cc.blockNode){var tg=_2d3.tagName;var _2d4=doc.createElement(tg);if(_2d3.style){if(_2d4.style){if(_2d3.style.cssText){_2d4.style.cssText=_2d3.style.cssText;}}}if(_2d3.tagName==="FONT"){if(_2d3.color){_2d4.color=_2d3.color;}if(_2d3.face){_2d4.face=_2d3.face;}if(_2d3.size){_2d4.size=_2d3.size;}}_2d1=_2c4;while(_2d1){_2d2=_2d1.nextSibling;_2d4.appendChild(_2d1);_2d1=_2d2;}_2b4.place(_2d4,_2d3,"after");_2c3=_2d3;_2c4=_2d4;_2d3=_2d3.parentNode;}_2d1=_2c4;if(_2d1.nodeType==1||(_2d1.nodeType==3&&_2d1.nodeValue)){_2ce.innerHTML="";}_2d0=_2d1;while(_2d1){_2d2=_2d1.nextSibling;_2ce.appendChild(_2d1);_2d1=_2d2;}}_2c2=_2b9.create(this.editor.window);var _2d5;var _2d6=_2d0;if(this.blockNodeForEnter!=="BR"){while(_2d6){_2d5=_2d6;_2d2=_2d6.firstChild;_2d6=_2d2;}if(_2d5&&_2d5.parentNode){_2ce=_2d5.parentNode;_2c2.setStart(_2ce,0);_2c0.removeAllRanges();_2c0.addRange(_2c2);if(this.editor.height){_2b6.scrollIntoView(_2ce);}if(has("mozilla")){this._pressedEnterInBlock=_2cc.blockNode;}}else{_2cb=true;}}else{_2c2.setStart(_2ce,0);_2c0.removeAllRanges();_2c0.addRange(_2c2);if(this.editor.height){_2b6.scrollIntoView(_2ce);}if(has("mozilla")){this._pressedEnterInBlock=_2cc.blockNode;}}}}return _2cb;},_adjustNodeAndOffset:function(node,_2d7){while(node.length<_2d7&&node.nextSibling&&node.nextSibling.nodeType==3){_2d7=_2d7-node.length;node=node.nextSibling;}return {"node":node,"offset":_2d7};},removeTrailingBr:function(_2d8){var para=/P|DIV|LI/i.test(_2d8.tagName)?_2d8:this.editor._sCall("getParentOfType",[_2d8,["P","DIV","LI"]]);if(!para){return;}if(para.lastChild){if((para.childNodes.length>1&&para.lastChild.nodeType==3&&/^[\s\xAD]*$/.test(para.lastChild.nodeValue))||para.lastChild.tagName=="BR"){_2b4.destroy(para.lastChild);}}if(!para.childNodes.length){para.innerHTML=this.bogusHtmlContent;}}});});},"dojo/dnd/Selector":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/kernel","../_base/lang","../dom","../dom-construct","../mouse","../_base/NodeList","../on","../touch","./common","./Container"],function(_2d9,_2da,_2db,_2dc,lang,dom,_2dd,_2de,_2df,on,_2e0,dnd,_2e1){var _2e2=_2da("dojo.dnd.Selector",_2e1,{constructor:function(node,_2e3){if(!_2e3){_2e3={};}this.singular=_2e3.singular;this.autoSync=_2e3.autoSync;this.selection={};this.anchor=null;this.simpleSelection=false;this.events.push(on(this.node,_2e0.press,lang.hitch(this,"onMouseDown")),on(this.node,_2e0.release,lang.hitch(this,"onMouseUp")));},singular:false,getSelectedNodes:function(){var t=new _2df();var e=dnd._empty;for(var i in this.selection){if(i in e){continue;}t.push(dom.byId(i));}return t;},selectNone:function(){return this._removeSelection()._removeAnchor();},selectAll:function(){this.forInItems(function(data,id){this._addItemClass(dom.byId(id),"Selected");this.selection[id]=1;},this);return this._removeAnchor();},deleteSelectedNodes:function(){var e=dnd._empty;for(var i in this.selection){if(i in e){continue;}var n=dom.byId(i);this.delItem(i);_2dd.destroy(n);}this.anchor=null;this.selection={};return this;},forInSelectedItems:function(f,o){o=o||_2dc.global;var s=this.selection,e=dnd._empty;for(var i in s){if(i in e){continue;}f.call(o,this.getItem(i),i,this);}},sync:function(){_2e2.superclass.sync.call(this);if(this.anchor){if(!this.getItem(this.anchor.id)){this.anchor=null;}}var t=[],e=dnd._empty;for(var i in this.selection){if(i in e){continue;}if(!this.getItem(i)){t.push(i);}}_2d9.forEach(t,function(i){delete this.selection[i];},this);return this;},insertNodes:function(_2e4,data,_2e5,_2e6){var _2e7=this._normalizedCreator;this._normalizedCreator=function(item,hint){var t=_2e7.call(this,item,hint);if(_2e4){if(!this.anchor){this.anchor=t.node;this._removeItemClass(t.node,"Selected");this._addItemClass(this.anchor,"Anchor");}else{if(this.anchor!=t.node){this._removeItemClass(t.node,"Anchor");this._addItemClass(t.node,"Selected");}}this.selection[t.node.id]=1;}else{this._removeItemClass(t.node,"Selected");this._removeItemClass(t.node,"Anchor");}return t;};_2e2.superclass.insertNodes.call(this,data,_2e5,_2e6);this._normalizedCreator=_2e7;return this;},destroy:function(){_2e2.superclass.destroy.call(this);this.selection=this.anchor=null;},onMouseDown:function(e){if(this.autoSync){this.sync();}if(!this.current){return;}if(!this.singular&&!dnd.getCopyKeyState(e)&&!e.shiftKey&&(this.current.id in this.selection)){this.simpleSelection=true;if(_2de.isLeft(e)){_2db.stop(e);}return;}if(!this.singular&&e.shiftKey){if(!dnd.getCopyKeyState(e)){this._removeSelection();}var c=this.getAllNodes();if(c.length){if(!this.anchor){this.anchor=c[0];this._addItemClass(this.anchor,"Anchor");}this.selection[this.anchor.id]=1;if(this.anchor!=this.current){var i=0,node;for(;i<c.length;++i){node=c[i];if(node==this.anchor||node==this.current){break;}}for(++i;i<c.length;++i){node=c[i];if(node==this.anchor||node==this.current){break;}this._addItemClass(node,"Selected");this.selection[node.id]=1;}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1;}}}else{if(this.singular){if(this.anchor==this.current){if(dnd.getCopyKeyState(e)){this.selectNone();}}else{this.selectNone();this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}}else{if(dnd.getCopyKeyState(e)){if(this.anchor==this.current){delete this.selection[this.anchor.id];this._removeAnchor();}else{if(this.current.id in this.selection){this._removeItemClass(this.current,"Selected");delete this.selection[this.current.id];}else{if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this._addItemClass(this.anchor,"Selected");}this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}else{if(!(this.current.id in this.selection)){this.selectNone();this.anchor=this.current;this._addItemClass(this.current,"Anchor");this.selection[this.current.id]=1;}}}}_2db.stop(e);},onMouseUp:function(){if(!this.simpleSelection){return;}this.simpleSelection=false;this.selectNone();if(this.current){this.anchor=this.current;this._addItemClass(this.anchor,"Anchor");this.selection[this.current.id]=1;}},onMouseMove:function(){this.simpleSelection=false;},onOverEvent:function(){this.onmousemoveEvent=on(this.node,_2e0.move,lang.hitch(this,"onMouseMove"));},onOutEvent:function(){if(this.onmousemoveEvent){this.onmousemoveEvent.remove();delete this.onmousemoveEvent;}},_removeSelection:function(){var e=dnd._empty;for(var i in this.selection){if(i in e){continue;}var node=dom.byId(i);if(node){this._removeItemClass(node,"Selected");}}this.selection={};return this;},_removeAnchor:function(){if(this.anchor){this._removeItemClass(this.anchor,"Anchor");this.anchor=null;}return this;}});return _2e2;});},"esri/layers/OnDemandMode":function(){define(["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/geometry/Point","esri/tasks/query","esri/layers/RenderMode","esri/layers/GridLayout"],function(_2e8,_2e9,lang,_2ea,has,_2eb,_2ec,_2ed,_2ee,_2ef){var _2f0=_2e8([_2ee],{declaredClass:"esri.layers._OnDemandMode",constructor:function(_2f1){this.featureLayer=_2f1;this._featureMap={};this._queryErrorHandler=lang.hitch(this,this._queryErrorHandler);},initialize:function(map){this.inherited(arguments);var _2f2=this.featureLayer,_2f3=_2f2._srInfo;this._gridLayer=new _2ef(new _2ec(_2f3?_2f3.valid[0]:map.extent.xmin,map.extent.ymax,map.spatialReference),{width:_2f2._tileWidth,height:_2f2._tileHeight},{width:map.width,height:map.height},_2f3);this._cellMap={};this._gridLayer.setResolution(map.extent);},startup:function(){this._ioQueue=[];if(!this.featureLayer.suspended){this._zoomHandler();this._enableConnectors();}},propertyChangeHandler:function(type){if(this._init){if(type<2){this._zoomHandler();}else{console.log("FeatureLayer: layer in on-demand mode does not support time definitions. Layer id = "+this.featureLayer.id+", Layer URL = "+this.featureLayer.url);}}},destroy:function(){this._disableConnectors();this.inherited(arguments);},drawFeature:function(_2f4){var _2f5=this._gridLayer,geom=_2f4.geometry,_2f6=[];if(!geom){return;}_2f6=_2f5.getCellsInExtent((geom.type==="point")?{xmin:geom.x,ymin:geom.y,xmax:geom.x,ymax:geom.y}:geom.getExtent(),false).cells;var _2f7=this._cellMap,i,cell,oid=_2f4.attributes[this.featureLayer.objectIdField],_2f8,row,col;for(i=0;i<_2f6.length;i++){cell=_2f6[i];_2f8=cell.latticeID;row=cell.row;col=cell.col;if(_2f8){cell=(_2f7[_2f8]=(_2f7[_2f8]||cell));}else{_2f7[row]=_2f7[row]||{};cell=(_2f7[row][col]=(_2f7[row][col]||cell));}cell.features=cell.features||[];cell.features.push(_2f4);this._addFeatureIIf(oid,_2f4);this._incRefCount(oid);}},suspend:function(){if(!this._init){return;}this._disableConnectors();},resume:function(){if(!this._init){return;}this._enableConnectors();this._zoomHandler();},refresh:function(){this._zoomHandler();},_enableConnectors:function(){var map=this.map;this._zoomConnect=_2e9.connect(map,"onZoomEnd",this,this._zoomHandler);this._panConnect=_2e9.connect(map,"onPanEnd",this,this._panHandler);this._resizeConnect=_2e9.connect(map,"onResize",this,this._panHandler);},_disableConnectors:function(){_2e9.disconnect(this._zoomConnect);_2e9.disconnect(this._panConnect);_2e9.disconnect(this._resizeConnect);},_zoomHandler:function(){this._processIOQueue(true);var _2f9=this.featureLayer,map=this.map;if(_2f9.suspended){return;}_2f9._fireUpdateStart();this._clearIIf();var _2fa=_2f9._trackManager;if(_2fa){_2fa.clearTracks();}this._cellMap={};this._gridLayer.setResolution(map.extent);this._sendRequest();},_panHandler:function(){this.featureLayer._fireUpdateStart();this._sendRequest(this.featureLayer._resized&&arguments[0]);},_getRequestId:function(_2fb,cell){var id="_"+_2fb.name+_2fb.layerId+_2fb._ulid+"_"+cell.resolution+"_"+(cell.latticeID||(cell.row+"_"+cell.col));return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_sendRequest:function(_2fc){this._exceeds=false;var _2fd=this.featureLayer,map=this.map,_2fe=_2fc||map.extent,_2ff=this._gridLayer.getCellsInExtent(_2fe,_2fd.latticeTiling),_300=_2ff.cells;if(!_2fd.isEditable()){var _301=this._cellMap;_300=_2ea.filter(_300,function(cell){if(cell.lattice){if(_301[cell.latticeID]){return false;}}else{if(_301[cell.row]&&_301[cell.row][cell.col]){return false;}}return true;});}var _302=_2fd.getOutFields(),_303=_2fd.getDefinitionExpression(),time=_2fd._getOffsettedTE(_2fd._mapTimeExtent),_304=_2fd._usePatch,_305=this._ioQueue,i,self=this,func=this._drawFeatures,cell,_306,_307;this._pending=this._pending||0;for(i=0;i<_300.length;i++){cell=_300[i];_306=new _2ed();_306.geometry=cell.extent||cell.lattice;_306.outFields=_302;_306.where=_303;if(_2fd.latticeTiling&&cell.extent){_306.spatialRelationship=_2ed.SPATIAL_REL_CONTAINS;}_306.returnGeometry=true;_306.timeExtent=time;_306.maxAllowableOffset=_2fd._maxOffset;if(_2fd._ts){_306._ts=(new Date()).getTime();}_307=null;if(_304){_307=this._getRequestId(_2fd,cell);if(this._isPending(_307)){continue;}}this._pending++;_305.push(_2fd._task.execute(_306,function(){var _308=cell;return function(_309){func.apply(self,[_309,_308]);};}.call(this),this._queryErrorHandler,_307));}this._removeOldCells(_2fe);this._endCheck();},_drawFeatures:function(_30a,cell){this._exceeds=this._exceeds||_30a.exceededTransferLimit;this._finalizeIO();var _30b=this.featureLayer,map=this.map,_30c=map.extent,_30d=cell.extent,row=cell.row,col=cell.col,_30e=_30b.objectIdField,_30f=_30a.features,_310=this._gridLayer,_311=this._cellMap,i,len,_312=cell.latticeID,_313=_312?_311[_312]:(_311[row]&&_311[row][col]);if((cell.resolution!=_310._resolution)||(_312?(_312!==_310.getLatticeID(_30c)):(!_310.intersects(_30d,_30c)))){if(_313){this._removeCell(row,col,_312);}}else{if(_313){this._updateCell(_313,_30f);}else{cell.features=_30f;if(_312){_311[_312]=cell;}else{_311[row]=_311[row]||{};_311[row][col]=cell;}len=_30f.length;for(i=0;i<len;i++){var _314=_30f[i];var oid=_314.attributes[_30e];this._addFeatureIIf(oid,_314);this._incRefCount(oid);}}}this._endCheck();},_queryErrorHandler:function(err){this._finalizeIO();this.featureLayer._errorHandler(err);this._endCheck(true);},_finalizeIO:function(){this._purgeRequests();this._pending--;},_endCheck:function(_315){if(this._pending===0){this._processIOQueue();var _316=this.featureLayer,_317=_316._trackManager;if(_317){_317.clearTracks();_317.addFeatures(_316.graphics);if(_316._ager){_2ea.forEach(_316.graphics,function(_318){if(_318._shape){_316._repaint(_318);}});}_317.moveLatestToFront();_317.drawTracks();}this.featureLayer._fireUpdateEnd(_315&&new Error("FeatureLayer: an error occurred while updating the layer"),this._exceeds?{queryLimitExceeded:true}:null);if(this._exceeds){_316.onQueryLimitExceeded();}}},_processIOQueue:function(_319){this._ioQueue=_2ea.filter(this._ioQueue,function(dfd){var keep=dfd.fired>-1?false:true;return keep;});if(_319){_2ea.forEach(this._ioQueue,this._cancelPendingRequest);}},_removeOldCells:function(_31a){var _31b=this._cellMap,_31c=this._gridLayer,_31d,_31e;for(_31d in _31b){if(_31b[_31d]){var row=_31b[_31d],_31f=row.latticeID,_320=0,_321=0;if(_31f){_320++;if(_31f!==_31c.getLatticeID(_31a)){this._removeCell(null,null,_31f);_321++;}}else{for(_31e in row){if(row[_31e]){_320++;var _322=row[_31e].extent;if(!_31c.intersects(_322,_31a)){this._removeCell(_31d,_31e);_321++;}}}}if(_321===_320){delete _31b[_31d];}}}},_updateCell:function(cell,_323){var _324=this.featureLayer,_325=_324.objectIdField,_326=_324._selectedFeatures,i,len=_323.length;cell.features=cell.features||[];for(i=0;i<len;i++){var _327=_323[i];var oid=_327.attributes[_325];var _328=this._addFeatureIIf(oid,_327);if(_328===_327){this._incRefCount(oid);cell.features.push(_328);}else{if(!(oid in _326)){_328.setGeometry(_327.geometry);_328.setAttributes(_327.attributes);}}}},_removeCell:function(row,col,_329){var _32a=this._cellMap,_32b=this.featureLayer,_32c=_32b.objectIdField;var cell=_329?_32a[_329]:(_32a[row]&&_32a[row][col]);if(cell){if(_329){delete _32a[_329];}else{delete _32a[row][col];}var _32d=cell.features,i;for(i=0;i<_32d.length;i++){var _32e=_32d[i];var oid=_32e.attributes[_32c];this._decRefCount(oid);if(oid in _32b._selectedFeatures){continue;}this._removeFeatureIIf(oid);}}}});if(has("extend-esri")){lang.setObject("layers._OnDemandMode",_2f0,_2eb);}return _2f0;});},"dijit/_MenuBase":function(){define("dijit/_MenuBase",["dojo/_base/array","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/_base/lang","dojo/mouse","dojo/on","dojo/window","./a11yclick","./popup","./registry","./_Widget","./_KeyNavContainer","./_TemplatedMixin"],function(_32f,_330,dom,_331,_332,lang,_333,on,_334,_335,pm,_336,_337,_338,_339){return _330("dijit._MenuBase",[_337,_339,_338],{parentMenu:null,popupDelay:500,autoFocus:false,childSelector:function(node){var _33a=_336.byNode(node);return node.parentNode==this.containerNode&&_33a&&_33a.focus;},postCreate:function(){var self=this,_33b=typeof this.childSelector=="string"?this.childSelector:lang.hitch(this,"childSelector");this.own(on(this.containerNode,on.selector(_33b,_333.enter),function(){self.onItemHover(_336.byNode(this));}),on(this.containerNode,on.selector(_33b,_333.leave),function(){self.onItemUnhover(_336.byNode(this));}),on(this.containerNode,on.selector(_33b,_335),function(evt){self.onItemClick(_336.byNode(this),evt);evt.stopPropagation();evt.preventDefault();}));this.inherited(arguments);},onExecute:function(){},onCancel:function(){},_moveToPopup:function(evt){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){this.onItemClick(this.focusedChild,evt);}else{var _33c=this._getTopMenu();if(_33c&&_33c._isMenuBar){_33c.focusNext();}}},_onPopupHover:function(){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var _33d=this.currentPopup.parentMenu;if(_33d.focusedChild){_33d.focusedChild._setSelected(false);}_33d.focusedChild=this.currentPopup.from_item;_33d.focusedChild._setSelected(true);this._stopPendingCloseTimer(this.currentPopup);}},onItemHover:function(item){if(this.isActive){this.focusChild(item);if(this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer){this.hover_timer=this.defer("_openPopup",this.popupDelay);}}if(this.focusedChild){this.focusChild(item);}this._hoveredChild=item;item._set("hovering",true);},_onChildBlur:function(item){this._stopPopupTimer();item._setSelected(false);var _33e=item.popup;if(_33e){this._stopPendingCloseTimer(_33e);_33e._pendingClose_timer=this.defer(function(){_33e._pendingClose_timer=null;if(_33e.parentMenu){_33e.parentMenu.currentPopup=null;}pm.close(_33e);},this.popupDelay);}},onItemUnhover:function(item){if(this.isActive){this._stopPopupTimer();}if(this._hoveredChild==item){this._hoveredChild=null;}item._set("hovering",false);},_stopPopupTimer:function(){if(this.hover_timer){this.hover_timer=this.hover_timer.remove();}},_stopPendingCloseTimer:function(_33f){if(_33f._pendingClose_timer){_33f._pendingClose_timer=_33f._pendingClose_timer.remove();}},_stopFocusTimer:function(){if(this._focus_timer){this._focus_timer=this._focus_timer.remove();}},_getTopMenu:function(){for(var top=this;top.parentMenu;top=top.parentMenu){}return top;},onItemClick:function(item,evt){if(typeof this.isShowingNow=="undefined"){this._markActive();}this.focusChild(item);if(item.disabled){return false;}if(item.popup){this._openPopup(evt.type=="keypress");}else{this.onExecute();item._onClick?item._onClick(evt):item.onClick(evt);}},_openPopup:function(_340){this._stopPopupTimer();var _341=this.focusedChild;if(!_341){return;}var _342=_341.popup;if(!_342.isShowingNow){if(this.currentPopup){this._stopPendingCloseTimer(this.currentPopup);pm.close(this.currentPopup);}_342.parentMenu=this;_342.from_item=_341;var self=this;pm.open({parent:this,popup:_342,around:_341.domNode,orient:this._orient||["after","before"],onCancel:function(){self.focusChild(_341);self._cleanUp();_341._setSelected(true);self.focusedChild=_341;},onExecute:lang.hitch(this,"_cleanUp")});this.currentPopup=_342;_342.connect(_342.domNode,"onmouseenter",lang.hitch(self,"_onPopupHover"));}if(_340&&_342.focus){_342._focus_timer=this.defer(lang.hitch(_342,function(){this._focus_timer=null;this.focus();}));}},_markActive:function(){this.isActive=true;_332.replace(this.domNode,"dijitMenuActive","dijitMenuPassive");},onOpen:function(){this.isShowingNow=true;this._markActive();},_markInactive:function(){this.isActive=false;_332.replace(this.domNode,"dijitMenuPassive","dijitMenuActive");},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=false;this.parentMenu=null;},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup){if(_32f.indexOf(this._focusManager.activeStack,this.id)>=0){_331.set(this.focusedChild.focusNode,"tabIndex",this.tabIndex);this.focusedChild.focusNode.focus();}pm.close(this.currentPopup);this.currentPopup=null;}if(this.focusedChild){this.focusedChild._setSelected(false);this.onItemUnhover(this.focusedChild);this.focusedChild=null;}},_onItemFocus:function(item){if(this._hoveredChild&&this._hoveredChild!=item){this.onItemUnhover(this._hoveredChild);}},_onBlur:function(){this._cleanUp();this.inherited(arguments);},_cleanUp:function(){this._closeChild();if(typeof this.isShowingNow=="undefined"){this._markInactive();}}});});},"esri/layers/SelectionMode":function(){define("esri/layers/SelectionMode",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/layers/RenderMode"],function(_343,lang,has,_344,_345){var _346=_343([_345],{declaredClass:"esri.layers._SelectionMode",constructor:function(_347){this.featureLayer=_347;this._featureMap={};},propertyChangeHandler:function(type){if(this._init&&type===0){this._applyTimeFilter();}},resume:function(){this.propertyChangeHandler(0);}});if(has("extend-esri")){lang.setObject("layers._SelectionMode",_346,_344);}return _346;});},"esri/dijit/_EventedWidget":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/on","esri/Evented","dijit/_WidgetBase"],function(_348,lang,_349,on,_34a,_34b){var EWM=_348([_34a,_34b],{_onMap:function(_34c){var _34d=this.constructor._onMap,_34e,_34f;if(!_34d){_34d=this.registerConnectEvents();}_34c=_34c.toLowerCase();if(_34d[_34c]){_34e=this[_34d[_34c].name];}else{_34f=this._onCamelCase(_34c);if(this[_34f]){_34e=_34f;}}return _34e;},on:function(type,_350){_34a.prototype.on.apply(this,arguments);return this.inherited(arguments);},emit:function(type,_351,_352){var _353,_354,_355,_356=type.toLowerCase(),_357=this.constructor._onMap||this.registerConnectEvents();_354=this[this._onMap(_356)];_351=_351||{};if(!_351.target){_351.target=this;}if(_354&&_357&&_357[_356]){this._onObj2Arr(function(){_353=Array.prototype.slice.call(arguments);},_357[_356].argKeys)(_351);_355=lang.mixin({},arguments);_355[2]=_353;_355[0]=_357[_356].name.replace(/^on/,"");}return this.inherited(_355||arguments);}});return EWM;});},"dijit/focus":function(){define("dijit/focus",["dojo/aspect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-construct","dojo/Evented","dojo/_base/lang","dojo/on","dojo/ready","dojo/sniff","dojo/Stateful","dojo/_base/unload","dojo/_base/window","dojo/window","./a11y","./registry","./main"],function(_358,_359,dom,_35a,_35b,_35c,lang,on,_35d,has,_35e,_35f,win,_360,a11y,_361,_362){var _363=_359([_35e,_35c],{curNode:null,activeStack:[],constructor:function(){var _364=lang.hitch(this,function(node){if(dom.isDescendant(this.curNode,node)){this.set("curNode",null);}if(dom.isDescendant(this.prevNode,node)){this.set("prevNode",null);}});_358.before(_35b,"empty",_364);_358.before(_35b,"destroy",_364);},registerIframe:function(_365){return this.registerWin(_365.contentWindow,_365);},registerWin:function(_366,_367){var _368=this;var _369=function(evt){_368._justMouseDowned=true;setTimeout(function(){_368._justMouseDowned=false;},0);if(has("ie")&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){return;}_368._onTouchNode(_367||evt.target||evt.srcElement,"mouse");};var doc=has("ie")?_366.document.documentElement:_366.document;if(doc){if(has("ie")){_366.document.body.attachEvent("onmousedown",_369);var _36a=function(evt){var tag=evt.srcElement.tagName.toLowerCase();if(tag=="#document"||tag=="body"){return;}if(a11y.isTabNavigable(evt.srcElement)){_368._onFocusNode(_367||evt.srcElement);}else{_368._onTouchNode(_367||evt.srcElement);}};doc.attachEvent("onfocusin",_36a);var _36b=function(evt){_368._onBlurNode(_367||evt.srcElement);};doc.attachEvent("onfocusout",_36b);return {remove:function(){_366.document.detachEvent("onmousedown",_369);doc.detachEvent("onfocusin",_36a);doc.detachEvent("onfocusout",_36b);doc=null;}};}else{doc.body.addEventListener("mousedown",_369,true);doc.body.addEventListener("touchstart",_369,true);var _36c=function(evt){_368._onFocusNode(_367||evt.target);};doc.addEventListener("focus",_36c,true);var _36d=function(evt){_368._onBlurNode(_367||evt.target);};doc.addEventListener("blur",_36d,true);return {remove:function(){doc.body.removeEventListener("mousedown",_369,true);doc.body.removeEventListener("touchstart",_369,true);doc.removeEventListener("focus",_36c,true);doc.removeEventListener("blur",_36d,true);doc=null;}};}}},_onBlurNode:function(node){if(this._clearFocusTimer){clearTimeout(this._clearFocusTimer);}this._clearFocusTimer=setTimeout(lang.hitch(this,function(){this.set("prevNode",this.curNode);this.set("curNode",null);}),0);if(this._justMouseDowned){return;}if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);}this._clearActiveWidgetsTimer=setTimeout(lang.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([]);}),0);},_onTouchNode:function(node,by){if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);delete this._clearActiveWidgetsTimer;}var _36e=[];try{while(node){var _36f=_35a.get(node,"dijitPopupParent");if(_36f){node=_361.byId(_36f).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===win.body()){break;}node=_360.get(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId"),_370=id&&_361.byId(id);if(_370&&!(by=="mouse"&&_370.get("disabled"))){_36e.unshift(id);}node=node.parentNode;}}}}catch(e){}this._setStack(_36e,by);},_onFocusNode:function(node){if(!node){return;}if(node.nodeType==9){return;}if(this._clearFocusTimer){clearTimeout(this._clearFocusTimer);delete this._clearFocusTimer;}this._onTouchNode(node);if(node==this.curNode){return;}this.set("prevNode",this.curNode);this.set("curNode",node);},_setStack:function(_371,by){var _372=this.activeStack;this.set("activeStack",_371);for(var _373=0;_373<Math.min(_372.length,_371.length);_373++){if(_372[_373]!=_371[_373]){break;}}var _374;for(var i=_372.length-1;i>=_373;i--){_374=_361.byId(_372[i]);if(_374){_374._hasBeenBlurred=true;_374.set("focused",false);if(_374._focusManager==this){_374._onBlur(by);}this.emit("widget-blur",_374,by);}}for(i=_373;i<_371.length;i++){_374=_361.byId(_371[i]);if(_374){_374.set("focused",true);if(_374._focusManager==this){_374._onFocus(by);}this.emit("widget-focus",_374,by);}}},focus:function(node){if(node){try{node.focus();}catch(e){}}}});var _375=new _363();_35d(function(){var _376=_375.registerWin(_360.get(win.doc));if(has("ie")){_35f.addOnWindowUnload(function(){if(_376){_376.remove();_376=null;}});}});_362.focus=function(node){_375.focus(node);};for(var attr in _375){if(!/^_/.test(attr)){_362.focus[attr]=typeof _375[attr]=="function"?lang.hitch(_375,attr):_375[attr];}}_375.watch(function(attr,_377,_378){_362.focus[attr]=_378;});return _375;});},"dijit/hccss":function(){define("dijit/hccss",["dojo/dom-class","dojo/hccss","dojo/ready","dojo/_base/window"],function(_379,has,_37a,win){_37a(90,function(){if(has("highcontrast")){_379.add(win.body(),"dijit_a11y");}});return has;});},"dojox/html/metrics":function(){define("dojox/html/metrics",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/sniff","dojo/ready","dojo/_base/unload","dojo/_base/window","dojo/dom-geometry"],function(_37b,lang,has,_37c,_37d,_37e,_37f){var dhm=lang.getObject("dojox.html.metrics",true);var _380=lang.getObject("dojox");dhm.getFontMeasurements=function(){var _381={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};if(has("ie")){_37e.doc.documentElement.style.fontSize="100%";}var div=_37e.doc.createElement("div");var ds=div.style;ds.position="absolute";ds.left="-100px";ds.top="0";ds.width="30px";ds.height="1000em";ds.borderWidth="0";ds.margin="0";ds.padding="0";ds.outline="0";ds.lineHeight="1";ds.overflow="hidden";_37e.body().appendChild(div);for(var p in _381){ds.fontSize=p;_381[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}_37e.body().removeChild(div);div=null;return _381;};var _382=null;dhm.getCachedFontMeasurements=function(_383){if(_383||!_382){_382=dhm.getFontMeasurements();}return _382;};var _384=null,_385={};dhm.getTextBox=function(text,_386,_387){var m,s;if(!_384){m=_384=_37e.doc.createElement("div");var c=_37e.doc.createElement("div");c.appendChild(m);s=c.style;s.overflow="scroll";s.position="absolute";s.left="0px";s.top="-10000px";s.width="1px";s.height="1px";s.visibility="hidden";s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";_37e.body().appendChild(c);}else{m=_384;}m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(arguments.length>1&&_386){for(var i in _386){if(i in _385){continue;}s[i]=_386[i];}}if(arguments.length>2&&_387){m.className=_387;}m.innerHTML=text;var box=_37f.position(m);box.w=m.parentNode.scrollWidth;return box;};var _388={w:16,h:16};dhm.getScrollbar=function(){return {w:_388.w,h:_388.h};};dhm._fontResizeNode=null;dhm.initOnFontResize=function(_389){var f=dhm._fontResizeNode=_37e.doc.createElement("iframe");var fs=f.style;fs.position="absolute";fs.width="5em";fs.height="10em";fs.top="-10000px";fs.display="none";if(has("ie")){f.onreadystatechange=function(){if(f.contentWindow.document.readyState=="complete"){f.onresize=f.contentWindow.parent[_380._scopeName].html.metrics._fontresize;}};}else{f.onload=function(){f.contentWindow.onresize=f.contentWindow.parent[_380._scopeName].html.metrics._fontresize;};}f.setAttribute("src","javascript:'<html><head><script>if(\"loadFirebugConsole\" in window){window.loadFirebugConsole();}</script></head><body></body></html>'");_37e.body().appendChild(f);dhm.initOnFontResize=function(){};};dhm.onFontResize=function(){};dhm._fontresize=function(){dhm.onFontResize();};_37d.addOnUnload(function(){var f=dhm._fontResizeNode;if(f){if(has("ie")&&f.onresize){f.onresize=null;}else{if(f.contentWindow&&f.contentWindow.onresize){f.contentWindow.onresize=null;}}dhm._fontResizeNode=null;}});_37c(function(){try{var n=_37e.doc.createElement("div");n.style.cssText="top:0;left:0;width:100px;height:100px;overflow:scroll;position:absolute;visibility:hidden;";_37e.body().appendChild(n);_388.w=n.offsetWidth-n.clientWidth;_388.h=n.offsetHeight-n.clientHeight;_37e.body().removeChild(n);delete n;}catch(e){}if("fontSizeWatch" in _37b.config&&!!_37b.config.fontSizeWatch){dhm.initOnFontResize();}});return dhm;});},"esri/dijit/editing/tools/MenuItemBase":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","dijit/MenuItem","esri/dijit/editing/tools/ToolBase","esri/kernel"],function(_38a,lang,has,_38b,_38c,_38d){var MIB=_38a([_38b,_38c],{declaredClass:"esri.dijit.editing.tools.MenuItemBase",destroy:function(){_38b.prototype.destroy.apply(this,arguments);_38c.prototype.destroy.apply(this,arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.MenuItemBase",MIB,_38d);}return MIB;});},"esri/dijit/editing/tools/Union":function(){define("esri/dijit/editing/tools/Union",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/graphicsUtils","esri/graphic","esri/toolbars/draw","esri/dijit/editing/Union","esri/dijit/editing/tools/ButtonToolBase","esri/kernel"],function(_38e,lang,_38f,has,_390,_391,Draw,_392,_393,_394){var _395=_38e([_393],{declaredClass:"esri.dijit.editing.tools.Union",id:"btnFeatureUnion",_enabledIcon:"toolbarIcon unionIcon",_disabledIcon:"toolbarIcon unionIcon",_drawType:Draw.POLYLINE,_enabled:true,_label:"NLS_unionLbl",_onClick:function(evt){this._settings.editor._activeTool="UNION";var _396=this._settings.layers;var _397=_38f.filter(_396,function(item){return (item.geometryType==="esriGeometryPolygon")&&(item.visible&&item._isMapAtVisibleScale());});var _398=[];var _399=0;_38f.forEach(_397,function(_39a,idx){var _39b=_39a.getSelectedFeatures();if(_39b.length>=2){_399++;var _39c=_38f.map(_39b,function(item){return new _391(lang.clone(item.toJson()));});this._settings.geometryService.union(_390.getGeometries(_39b),lang.hitch(this,function(_39d){var _39e=[_39b.pop().setGeometry(_39d)];_398.push({layer:_39a,updates:_39e,deletes:_39b,preUpdates:_39c});_399--;if(_399<=0){this.onApplyEdits(_398,lang.hitch(this,function(){if(this._settings.undoRedoManager){var _39f=this._settings.undoRedoManager;_38f.forEach(this._edits,lang.hitch(this,function(edit){_39f.add(new _392({featureLayer:edit.layer,addedGraphics:edit.deletes,preUpdatedGraphics:edit.preUpdates,postUpdatedGraphics:edit.updates}));}),this);}this._settings.editor._selectionHelper.clearSelection(false);this.onFinished();}));}}));}},this);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Union",_395,_394);}return _395;});},"esri/tasks/query":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel","esri/geometry/jsonUtils","esri/tasks/SpatialRelationship","dojo/has!extend-esri?esri/tasks/QueryTask","dojo/has!extend-esri?esri/tasks/RelationshipQuery","dojo/has!extend-esri?esri/tasks/StatisticDefinition"],function(_3a0,lang,_3a1,_3a2,has,_3a3,_3a4,_3a5){var _3a6=_3a0(null,{declaredClass:"esri.tasks.Query",constructor:function(){this.spatialRelationship=_3a6.SPATIAL_REL_INTERSECTS;},text:null,where:"",geometry:null,groupByFieldsForStatistics:null,objectIds:null,returnGeometry:false,orderByFields:null,outSpatialReference:null,outFields:null,outStatistics:null,timeExtent:null,relationParam:null,pixelSize:null,toJson:function(_3a7){var json={text:this.text,where:this.where,returnGeometry:this.returnGeometry,spatialRel:this.spatialRelationship,maxAllowableOffset:this.maxAllowableOffset,geometryPrecision:this.geometryPrecision},g=_3a7&&_3a7["geometry"]||this.geometry,ids=this.objectIds,_3a8=this.outFields,_3a9=this.outSpatialReference,_3aa=this.groupByFieldsForStatistics,_3ab=this.orderByFields,_3ac=this.outStatistics;if(g){json.geometry=g;json.geometryType=_3a4.getJsonType(g);json.inSR=g.spatialReference.wkid||_3a2.toJson(g.spatialReference.toJson());}if(ids){json.objectIds=ids.join(",");}if(_3a8){json.outFields=_3a8.join(",");}if(_3aa){json.groupByFieldsForStatistics=_3aa.join(",");}if(_3ab){json.orderByFields=_3ab.join(",");}if(_3ac){var _3ad=[];_3a1.forEach(_3ac,function(item,idx){_3ad.push(item.toJson());});json.outStatistics=_3a2.toJson(_3ad);}if(_3a9!==null){json.outSR=_3a9.wkid||_3a2.toJson(_3a9.toJson());}else{if(g){json.outSR=g.spatialReference.wkid||_3a2.toJson(g.spatialReference.toJson());}}var _3ae=this.timeExtent;json.time=_3ae?_3ae.toJson().join(","):null;var _3af=this.relationParam;if(_3af&&this.spatialRelationship===_3a6.SPATIAL_REL_RELATION){json.relationParam=_3af;}json.pixelSize=this.pixelSize?_3a2.toJson(this.pixelSize.toJson()):null;json._ts=this._ts;return json;}});lang.mixin(_3a6,_3a5);if(has("extend-esri")){lang.setObject("tasks.Query",_3a6,_3a3);}return _3a6;});},"dijit/form/_ComboBoxMenuMixin":function(){define("dijit/form/_ComboBoxMenuMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom-attr","dojo/i18n","dojo/i18n!./nls/ComboBox"],function(_3b0,_3b1,_3b2,i18n){return _3b1("dijit.form._ComboBoxMenuMixin",null,{_messages:null,postMixInProperties:function(){this.inherited(arguments);this._messages=i18n.getLocalization("dijit.form","ComboBox",this.lang);},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages["previousMessage"];this.nextButton.innerHTML=this._messages["nextMessage"];},_setValueAttr:function(_3b3){this.value=_3b3;this.onChange(_3b3);},onClick:function(node){if(node==this.previousButton){this._setSelectedAttr(null);this.onPage(-1);}else{if(node==this.nextButton){this._setSelectedAttr(null);this.onPage(1);}else{this.onChange(node);}}},onChange:function(){},onPage:function(){},onClose:function(){this._setSelectedAttr(null);},_createOption:function(item,_3b4){var _3b5=this._createMenuItem();var _3b6=_3b4(item);if(_3b6.html){_3b5.innerHTML=_3b6.label;}else{_3b5.appendChild(_3b5.ownerDocument.createTextNode(_3b6.label));}if(_3b5.innerHTML==""){_3b5.innerHTML="&#160;";}this.applyTextDir(_3b5,(_3b5.innerText||_3b5.textContent||""));return _3b5;},createOptions:function(_3b7,_3b8,_3b9){this.items=_3b7;this.previousButton.style.display=(_3b8.start==0)?"none":"";_3b2.set(this.previousButton,"id",this.id+"_prev");_3b0.forEach(_3b7,function(item,i){var _3ba=this._createOption(item,_3b9);_3ba.setAttribute("item",i);_3b2.set(_3ba,"id",this.id+i);this.nextButton.parentNode.insertBefore(_3ba,this.nextButton);},this);var _3bb=false;if(_3b7.total&&!_3b7.total.then&&_3b7.total!=-1){if((_3b8.start+_3b8.count)<_3b7.total){_3bb=true;}else{if((_3b8.start+_3b8.count)>_3b7.total&&_3b8.count==_3b7.length){_3bb=true;}}}else{if(_3b8.count==_3b7.length){_3bb=true;}}this.nextButton.style.display=_3bb?"":"none";_3b2.set(this.nextButton,"id",this.id+"_next");},clearResultList:function(){var _3bc=this.containerNode;while(_3bc.childNodes.length>2){_3bc.removeChild(_3bc.childNodes[_3bc.childNodes.length-2]);}this._setSelectedAttr(null);},highlightFirstOption:function(){this.selectFirstNode();},highlightLastOption:function(){this.selectLastNode();},selectFirstNode:function(){this.inherited(arguments);if(this.getHighlightedOption()==this.previousButton){this.selectNextNode();}},selectLastNode:function(){this.inherited(arguments);if(this.getHighlightedOption()==this.nextButton){this.selectPreviousNode();}},getHighlightedOption:function(){return this.selected;}});});},"dijit/form/_SearchMixin":function(){define("dijit/form/_SearchMixin",["dojo/data/util/filter","dojo/_base/declare","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/query","dojo/sniff","dojo/string","dojo/when","../registry"],function(_3bd,_3be,_3bf,keys,lang,_3c0,has,_3c1,when,_3c2){return _3be("dijit.form._SearchMixin",null,{pageSize:Infinity,store:null,fetchProperties:{},query:{},searchDelay:200,searchAttr:"name",queryExpr:"${0}*",ignoreCase:true,_abortQuery:function(){if(this.searchTimer){this.searchTimer=this.searchTimer.remove();}if(this._queryDeferHandle){this._queryDeferHandle=this._queryDeferHandle.remove();}if(this._fetchHandle){if(this._fetchHandle.abort){this._cancelingQuery=true;this._fetchHandle.abort();this._cancelingQuery=false;}if(this._fetchHandle.cancel){this._cancelingQuery=true;this._fetchHandle.cancel();this._cancelingQuery=false;}this._fetchHandle=null;}},_processInput:function(evt){if(this.disabled||this.readOnly){return;}var key=evt.charOrCode;if(evt.altKey||((evt.ctrlKey||evt.metaKey)&&(key!="x"&&key!="v"))||key==keys.SHIFT){return;}var _3c3=false;this._prev_key_backspace=false;switch(key){case keys.DELETE:case keys.BACKSPACE:this._prev_key_backspace=true;this._maskValidSubsetError=true;_3c3=true;break;default:_3c3=typeof key=="string"||key==229;}if(_3c3){if(!this.store){this.onSearch();}else{this.searchTimer=this.defer("_startSearchFromInput",1);}}},onSearch:function(){},_startSearchFromInput:function(){this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"));},_startSearch:function(text){this._abortQuery();var _3c4=this,_3c0=lang.clone(this.query),_3c5={start:0,count:this.pageSize,queryOptions:{ignoreCase:this.ignoreCase,deep:true}},qs=_3c1.substitute(this.queryExpr,[text]),q,_3c6=function(){var _3c7=_3c4._fetchHandle=_3c4.store.query(_3c0,_3c5);if(_3c4.disabled||_3c4.readOnly||(q!==_3c4._lastQuery)){return;}when(_3c7,function(res){_3c4._fetchHandle=null;if(!_3c4.disabled&&!_3c4.readOnly&&(q===_3c4._lastQuery)){when(_3c7.total,function(_3c8){res.total=_3c8;var _3c9=_3c4.pageSize;if(isNaN(_3c9)||_3c9>res.total){_3c9=res.total;}res.nextPage=function(_3ca){_3c5.direction=_3ca=_3ca!==false;_3c5.count=_3c9;if(_3ca){_3c5.start+=res.length;if(_3c5.start>=res.total){_3c5.count=0;}}else{_3c5.start-=_3c9;if(_3c5.start<0){_3c5.count=Math.max(_3c9+_3c5.start,0);_3c5.start=0;}}if(_3c5.count<=0){res.length=0;_3c4.onSearch(res,_3c0,_3c5);}else{_3c6();}};_3c4.onSearch(res,_3c0,_3c5);});}},function(err){_3c4._fetchHandle=null;if(!_3c4._cancelingQuery){console.error(_3c4.declaredClass+" "+err.toString());}});};lang.mixin(_3c5,this.fetchProperties);if(this.store._oldAPI){q=qs;}else{q=_3bd.patternToRegExp(qs,this.ignoreCase);q.toString=function(){return qs;};}this._lastQuery=_3c0[this.searchAttr]=q;this._queryDeferHandle=this.defer(_3c6,this.searchDelay);},constructor:function(){this.query={};this.fetchProperties={};},postMixInProperties:function(){if(!this.store){var list=this.list;if(list){this.store=_3c2.byId(list);}}this.inherited(arguments);}});});},"dojox/grid/_RowSelector":function(){define("dojox/grid/_RowSelector",["dojo/_base/declare","./_View"],function(_3cb,_3cc){return _3cb("dojox.grid._RowSelector",_3cc,{defaultWidth:"2em",noscroll:true,padBorderWidth:2,buildRendering:function(){this.inherited("buildRendering",arguments);this.scrollboxNode.style.overflow="hidden";this.headerNode.style.visibility="hidden";},getWidth:function(){return this.viewWidth||this.defaultWidth;},buildRowContent:function(_3cd,_3ce){var w=this.contentWidth||0;_3ce.innerHTML="<table class=\"dojoxGridRowbarTable\" style=\"width:"+w+"px;height:1px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"><tr><td class=\"dojoxGridRowbarInner\">&nbsp;</td></tr></table>";},renderHeader:function(){},updateRow:function(){},resize:function(){this.adaptHeight();},adaptWidth:function(){if(!("contentWidth" in this)&&this.contentNode&&this.contentNode.offsetWidth>0){this.contentWidth=this.contentNode.offsetWidth-this.padBorderWidth;}},doStyleRowNode:function(_3cf,_3d0){var n=["dojoxGridRowbar dojoxGridNonNormalizedCell"];if(this.grid.rows.isOver(_3cf)){n.push("dojoxGridRowbarOver");}if(this.grid.selection.isSelected(_3cf)){n.push("dojoxGridRowbarSelected");}_3d0.className=n.join(" ");},domouseover:function(e){this.grid.onMouseOverRow(e);},domouseout:function(e){if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}});});},"dojo/parser":function(){define(["require","./_base/kernel","./_base/lang","./_base/array","./_base/config","./_base/html","./_base/window","./_base/url","./_base/json","./aspect","./date/stamp","./Deferred","./has","./query","./on","./ready"],function(_3d1,dojo,_3d2,_3d3,_3d4,_3d5,_3d6,_3d7,_3d8,_3d9,_3da,_3db,has,_3dc,don,_3dd){new Date("X");var _3de=0;_3d9.after(_3d2,"extend",function(){_3de++;},true);function _3df(ctor){var map=ctor._nameCaseMap,_3e0=ctor.prototype;if(!map||map._extendCnt<_3de){map=ctor._nameCaseMap={};for(var name in _3e0){if(name.charAt(0)==="_"){continue;}map[name.toLowerCase()]=name;}map._extendCnt=_3de;}return map;};var _3e1={};function _3e2(_3e3){var ts=_3e3.join();if(!_3e1[ts]){var _3e4=[];for(var i=0,l=_3e3.length;i<l;i++){var t=_3e3[i];_3e4[_3e4.length]=(_3e1[t]=_3e1[t]||(_3d2.getObject(t)||(~t.indexOf("/")&&_3d1(t))));}var ctor=_3e4.shift();_3e1[ts]=_3e4.length?(ctor.createSubclass?ctor.createSubclass(_3e4):ctor.extend.apply(ctor,_3e4)):ctor;}return _3e1[ts];};var _3e5={_clearCache:function(){_3de++;_3e1={};},_functionFromScript:function(_3e6,_3e7){var _3e8="",_3e9="",_3ea=(_3e6.getAttribute(_3e7+"args")||_3e6.getAttribute("args")),_3eb=_3e6.getAttribute("with");var _3ec=(_3ea||"").split(/\s*,\s*/);if(_3eb&&_3eb.length){_3d3.forEach(_3eb.split(/\s*,\s*/),function(part){_3e8+="with("+part+"){";_3e9+="}";});}return new Function(_3ec,_3e8+_3e6.innerHTML+_3e9);},instantiate:function(_3ed,_3ee,_3ef){_3ee=_3ee||{};_3ef=_3ef||{};var _3f0=(_3ef.scope||dojo._scopeName)+"Type",_3f1="data-"+(_3ef.scope||dojo._scopeName)+"-",_3f2=_3f1+"type",_3f3=_3f1+"mixins";var list=[];_3d3.forEach(_3ed,function(node){var type=_3f0 in _3ee?_3ee[_3f0]:node.getAttribute(_3f2)||node.getAttribute(_3f0);if(type){var _3f4=node.getAttribute(_3f3),_3f5=_3f4?[type].concat(_3f4.split(/\s*,\s*/)):[type];list.push({node:node,types:_3f5});}});return this._instantiate(list,_3ee,_3ef);},_instantiate:function(_3f6,_3f7,_3f8){var _3f9=_3d3.map(_3f6,function(obj){var ctor=obj.ctor||_3e2(obj.types);if(!ctor){throw new Error("Unable to resolve constructor for: '"+obj.types.join()+"'");}return this.construct(ctor,obj.node,_3f7,_3f8,obj.scripts,obj.inherited);},this);if(!_3f7._started&&!_3f8.noStart){_3d3.forEach(_3f9,function(_3fa){if(typeof _3fa.startup==="function"&&!_3fa._started){_3fa.startup();}});}return _3f9;},construct:function(ctor,node,_3fb,_3fc,_3fd,_3fe){var _3ff=ctor&&ctor.prototype;_3fc=_3fc||{};var _400={};if(_3fc.defaults){_3d2.mixin(_400,_3fc.defaults);}if(_3fe){_3d2.mixin(_400,_3fe);}var _401;if(has("dom-attributes-explicit")){_401=node.attributes;}else{if(has("dom-attributes-specified-flag")){_401=_3d3.filter(node.attributes,function(a){return a.specified;});}else{var _402=/^input$|^img$/i.test(node.nodeName)?node:node.cloneNode(false),_403=_402.outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,"");_401=_3d3.map(_403.split(/\s+/),function(name){var _404=name.toLowerCase();return {name:name,value:(node.nodeName=="LI"&&name=="value")||_404=="enctype"?node.getAttribute(_404):node.getAttributeNode(_404).value};});}}var _405=_3fc.scope||dojo._scopeName,_406="data-"+_405+"-",hash={};if(_405!=="dojo"){hash[_406+"props"]="data-dojo-props";hash[_406+"type"]="data-dojo-type";hash[_406+"mixins"]="data-dojo-mixins";hash[_405+"type"]="dojoType";hash[_406+"id"]="data-dojo-id";}var i=0,item,_407=[],_408,_409;while(item=_401[i++]){var name=item.name,_40a=name.toLowerCase(),_40b=item.value;switch(hash[_40a]||_40a){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":_409=_40b;break;case "data-dojo-id":case "jsid":_408=_40b;break;case "data-dojo-attach-point":case "dojoattachpoint":_400.dojoAttachPoint=_40b;break;case "data-dojo-attach-event":case "dojoattachevent":_400.dojoAttachEvent=_40b;break;case "class":_400["class"]=node.className;break;case "style":_400["style"]=node.style&&node.style.cssText;break;default:if(!(name in _3ff)){var map=_3df(ctor);name=map[_40a]||name;}if(name in _3ff){switch(typeof _3ff[name]){case "string":_400[name]=_40b;break;case "number":_400[name]=_40b.length?Number(_40b):NaN;break;case "boolean":_400[name]=_40b.toLowerCase()!="false";break;case "function":if(_40b===""||_40b.search(/[^\w\.]+/i)!=-1){_400[name]=new Function(_40b);}else{_400[name]=_3d2.getObject(_40b,false)||new Function(_40b);}_407.push(name);break;default:var pVal=_3ff[name];_400[name]=(pVal&&"length" in pVal)?(_40b?_40b.split(/\s*,\s*/):[]):(pVal instanceof Date)?(_40b==""?new Date(""):_40b=="now"?new Date():_3da.fromISOString(_40b)):(pVal instanceof _3d7)?(dojo.baseUrl+_40b):_3d8.fromJson(_40b);}}else{_400[name]=_40b;}}}for(var j=0;j<_407.length;j++){var _40c=_407[j].toLowerCase();node.removeAttribute(_40c);node[_40c]=null;}if(_409){try{_409=_3d8.fromJson.call(_3fc.propsThis,"{"+_409+"}");_3d2.mixin(_400,_409);}catch(e){throw new Error(e.toString()+" in data-dojo-props='"+_409+"'");}}_3d2.mixin(_400,_3fb);if(!_3fd){_3fd=(ctor&&(ctor._noScript||_3ff._noScript)?[]:_3dc("> script[type^='dojo/']",node));}var _40d=[],_40e=[],_40f=[],ons=[];if(_3fd){for(i=0;i<_3fd.length;i++){var _410=_3fd[i];node.removeChild(_410);var _411=(_410.getAttribute(_406+"event")||_410.getAttribute("event")),prop=_410.getAttribute(_406+"prop"),_412=_410.getAttribute(_406+"method"),_413=_410.getAttribute(_406+"advice"),_414=_410.getAttribute("type"),nf=this._functionFromScript(_410,_406);if(_411){if(_414=="dojo/connect"){_40d.push({method:_411,func:nf});}else{if(_414=="dojo/on"){ons.push({event:_411,func:nf});}else{_400[_411]=nf;}}}else{if(_414=="dojo/aspect"){_40d.push({method:_412,advice:_413,func:nf});}else{if(_414=="dojo/watch"){_40f.push({prop:prop,func:nf});}else{_40e.push(nf);}}}}}var _415=ctor.markupFactory||_3ff.markupFactory;var _416=_415?_415(_400,node,ctor):new ctor(_400,node);if(_408){_3d2.setObject(_408,_416);}for(i=0;i<_40d.length;i++){_3d9[_40d[i].advice||"after"](_416,_40d[i].method,_3d2.hitch(_416,_40d[i].func),true);}for(i=0;i<_40e.length;i++){_40e[i].call(_416);}for(i=0;i<_40f.length;i++){_416.watch(_40f[i].prop,_40f[i].func);}for(i=0;i<ons.length;i++){don(_416,ons[i].event,ons[i].func);}return _416;},scan:function(root,_417){var list=[],mids=[],_418={};var _419=(_417.scope||dojo._scopeName)+"Type",_41a="data-"+(_417.scope||dojo._scopeName)+"-",_41b=_41a+"type",_41c=_41a+"textdir",_41d=_41a+"mixins";var node=root.firstChild;var _41e=_417.inherited;if(!_41e){function _41f(node,attr){return (node.getAttribute&&node.getAttribute(attr))||(node.parentNode&&_41f(node.parentNode,attr));};_41e={dir:_41f(root,"dir"),lang:_41f(root,"lang"),textDir:_41f(root,_41c)};for(var key in _41e){if(!_41e[key]){delete _41e[key];}}}var _420={inherited:_41e};var _421;var _422;function _423(_424){if(!_424.inherited){_424.inherited={};var node=_424.node,_425=_423(_424.parent);var _426={dir:node.getAttribute("dir")||_425.dir,lang:node.getAttribute("lang")||_425.lang,textDir:node.getAttribute(_41c)||_425.textDir};for(var key in _426){if(_426[key]){_424.inherited[key]=_426[key];}}}return _424.inherited;};while(true){if(!node){if(!_420||!_420.node){break;}node=_420.node.nextSibling;_422=false;_420=_420.parent;_421=_420.scripts;continue;}if(node.nodeType!=1){node=node.nextSibling;continue;}if(_421&&node.nodeName.toLowerCase()=="script"){type=node.getAttribute("type");if(type&&/^dojo\/\w/i.test(type)){_421.push(node);}node=node.nextSibling;continue;}if(_422){node=node.nextSibling;continue;}var type=node.getAttribute(_41b)||node.getAttribute(_419);var _427=node.firstChild;if(!type&&(!_427||(_427.nodeType==3&&!_427.nextSibling))){node=node.nextSibling;continue;}var _428;var ctor=null;if(type){var _429=node.getAttribute(_41d),_42a=_429?[type].concat(_429.split(/\s*,\s*/)):[type];try{ctor=_3e2(_42a);}catch(e){}if(!ctor){_3d3.forEach(_42a,function(t){if(~t.indexOf("/")&&!_418[t]){_418[t]=true;mids[mids.length]=t;}});}var _42b=ctor&&!ctor.prototype._noScript?[]:null;_428={types:_42a,ctor:ctor,parent:_420,node:node,scripts:_42b};_428.inherited=_423(_428);list.push(_428);}else{_428={node:node,scripts:_421,parent:_420};}node=_427;_421=_42b;_422=ctor&&ctor.prototype.stopParser&&!(_417.template);_420=_428;}var d=new _3db();if(mids.length){if(has("dojo-debug-messages")){console.warn("WARNING: Modules being Auto-Required: "+mids.join(", "));}_3d1(mids,function(){d.resolve(_3d3.filter(list,function(_42c){if(!_42c.ctor){try{_42c.ctor=_3e2(_42c.types);}catch(e){}}var _42d=_42c.parent;while(_42d&&!_42d.types){_42d=_42d.parent;}var _42e=_42c.ctor&&_42c.ctor.prototype;_42c.instantiateChildren=!(_42e&&_42e.stopParser&&!(_417.template));_42c.instantiate=!_42d||(_42d.instantiate&&_42d.instantiateChildren);return _42c.instantiate;}));});}else{d.resolve(list);}return d.promise;},_require:function(_42f){var hash=_3d8.fromJson("{"+_42f.innerHTML+"}"),vars=[],mids=[],d=new _3db();for(var name in hash){vars.push(name);mids.push(hash[name]);}_3d1(mids,function(){for(var i=0;i<vars.length;i++){_3d2.setObject(vars[i],arguments[i]);}d.resolve(arguments);});return d.promise;},_scanAmd:function(root){var _430=new _3db(),_431=_430.promise;_430.resolve(true);var self=this;_3dc("script[type='dojo/require']",root).forEach(function(node){_431=_431.then(function(){return self._require(node);});node.parentNode.removeChild(node);});return _431;},parse:function(_432,_433){var root;if(!_433&&_432&&_432.rootNode){_433=_432;root=_433.rootNode;}else{if(_432&&_3d2.isObject(_432)&&!("nodeType" in _432)){_433=_432;}else{root=_432;}}root=root?_3d5.byId(root):_3d6.body();_433=_433||{};var _434=_433.template?{template:true}:{},_435=[],self=this;var p=this._scanAmd(root,_433).then(function(){return self.scan(root,_433);}).then(function(_436){return _435=_435.concat(self._instantiate(_436,_434,_433));}).otherwise(function(e){console.error("dojo/parser::parse() error",e);throw e;});_3d2.mixin(_435,p);return _435;}};if(1){dojo.parser=_3e5;}if(_3d4.parseOnLoad){_3dd(100,_3e5,"parse");}return _3e5;});},"url:dijit/form/templates/DropDownButton.html":"<span class=\"dijit dijitReset dijitInline\"\n\t><span class='dijitReset dijitInline dijitButtonNode'\n\t\tdata-dojo-attach-event=\"ondijitclick:_onClick\" data-dojo-attach-point=\"_buttonNode\"\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\tdata-dojo-attach-point=\"focusNode,titleNode,_arrowWrapperNode\"\n\t\t\trole=\"button\" aria-haspopup=\"true\" aria-labelledby=\"${id}_label\"\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\"\n\t\t\t\tdata-dojo-attach-point=\"iconNode\"\n\t\t\t></span\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\tdata-dojo-attach-point=\"containerNode,_popupStateNode\"\n\t\t\t\tid=\"${id}_label\"\n\t\t\t></span\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\"></span\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\" tabIndex=\"-1\"\n\t\tdata-dojo-attach-point=\"valueNode\" role=\"presentation\"\n/></span>\n","dojo/dnd/Manager":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/lang","../_base/window","../dom-class","../Evented","../has","../keys","../on","../topic","../touch","./common","./autoscroll","./Avatar"],function(_437,_438,_439,lang,win,_43a,_43b,has,keys,on,_43c,_43d,dnd,_43e,_43f){var _440=_438("dojo.dnd.Manager",[_43b],{constructor:function(){this.avatar=null;this.source=null;this.nodes=[];this.copy=true;this.target=null;this.canDropFlag=false;this.events=[];},OFFSET_X:has("touch")?0:16,OFFSET_Y:has("touch")?-64:16,overSource:function(_441){if(this.avatar){this.target=(_441&&_441.targetState!="Disabled")?_441:null;this.canDropFlag=Boolean(this.target);this.avatar.update();}_43c.publish("/dnd/source/over",_441);},outSource:function(_442){if(this.avatar){if(this.target==_442){this.target=null;this.canDropFlag=false;this.avatar.update();_43c.publish("/dnd/source/over",null);}}else{_43c.publish("/dnd/source/over",null);}},startDrag:function(_443,_444,copy){_43e.autoScrollStart(win.doc);this.source=_443;this.nodes=_444;this.copy=Boolean(copy);this.avatar=this.makeAvatar();win.body().appendChild(this.avatar.node);_43c.publish("/dnd/start",_443,_444,this.copy);this.events=[on(win.doc,_43d.move,lang.hitch(this,"onMouseMove")),on(win.doc,_43d.release,lang.hitch(this,"onMouseUp")),on(win.doc,"keydown",lang.hitch(this,"onKeyDown")),on(win.doc,"keyup",lang.hitch(this,"onKeyUp")),on(win.doc,"dragstart",_439.stop),on(win.body(),"selectstart",_439.stop)];var c="dojoDnd"+(copy?"Copy":"Move");_43a.add(win.body(),c);},canDrop:function(flag){var _445=Boolean(this.target&&flag);if(this.canDropFlag!=_445){this.canDropFlag=_445;this.avatar.update();}},stopDrag:function(){_43a.remove(win.body(),["dojoDndCopy","dojoDndMove"]);_437.forEach(this.events,function(_446){_446.remove();});this.events=[];this.avatar.destroy();this.avatar=null;this.source=this.target=null;this.nodes=[];},makeAvatar:function(){return new _43f(this);},updateAvatar:function(){this.avatar.update();},onMouseMove:function(e){var a=this.avatar;if(a){_43e.autoScrollNodes(e);var s=a.node.style;s.left=(e.pageX+this.OFFSET_X)+"px";s.top=(e.pageY+this.OFFSET_Y)+"px";var copy=Boolean(this.source.copyState(dnd.getCopyKeyState(e)));if(this.copy!=copy){this._setCopyStatus(copy);}}if(has("touch")){e.preventDefault();}},onMouseUp:function(e){if(this.avatar){if(this.target&&this.canDropFlag){var copy=Boolean(this.source.copyState(dnd.getCopyKeyState(e)));_43c.publish("/dnd/drop/before",this.source,this.nodes,copy,this.target,e);_43c.publish("/dnd/drop",this.source,this.nodes,copy,this.target,e);}else{_43c.publish("/dnd/cancel");}this.stopDrag();}},onKeyDown:function(e){if(this.avatar){switch(e.keyCode){case keys.CTRL:var copy=Boolean(this.source.copyState(true));if(this.copy!=copy){this._setCopyStatus(copy);}break;case keys.ESCAPE:_43c.publish("/dnd/cancel");this.stopDrag();break;}}},onKeyUp:function(e){if(this.avatar&&e.keyCode==keys.CTRL){var copy=Boolean(this.source.copyState(false));if(this.copy!=copy){this._setCopyStatus(copy);}}},_setCopyStatus:function(copy){this.copy=copy;this.source._markDndStatus(this.copy);this.updateAvatar();_43a.replace(win.body(),"dojoDnd"+(this.copy?"Copy":"Move"),"dojoDnd"+(this.copy?"Move":"Copy"));}});dnd._manager=null;_440.manager=dnd.manager=function(){if(!dnd._manager){dnd._manager=new _440();}return dnd._manager;};return _440;});},"dijit/form/ToggleButton":function(){define("dijit/form/ToggleButton",["dojo/_base/declare","dojo/_base/kernel","./Button","./_ToggleButtonMixin"],function(_447,_448,_449,_44a){return _447("dijit.form.ToggleButton",[_449,_44a],{baseClass:"dijitToggleButton",setChecked:function(_44b){_448.deprecated("setChecked("+_44b+") is deprecated. Use set('checked',"+_44b+") instead.","","2.0");this.set("checked",_44b);}});});},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(lang,_44c){var _44d={};lang.setObject("dojo.date.stamp",_44d);_44d.fromISOString=function(_44e,_44f){if(!_44d._isoRegExp){_44d._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _450=_44d._isoRegExp.exec(_44e),_451=null;if(_450){_450.shift();if(_450[1]){_450[1]--;}if(_450[6]){_450[6]*=1000;}if(_44f){_44f=new Date(_44f);_44c.forEach(_44c.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _44f["get"+prop]();}),function(_452,_453){_450[_453]=_450[_453]||_452;});}_451=new Date(_450[0]||1970,_450[1]||0,_450[2]||1,_450[3]||0,_450[4]||0,_450[5]||0,_450[6]||0);if(_450[0]<100){_451.setFullYear(_450[0]||1970);}var _454=0,_455=_450[7]&&_450[7].charAt(0);if(_455!="Z"){_454=((_450[8]||0)*60)+(Number(_450[9])||0);if(_455!="-"){_454*=-1;}}if(_455){_454-=_451.getTimezoneOffset();}if(_454){_451.setTime(_451.getTime()+_454*60000);}}return _451;};_44d.toISOString=function(_456,_457){var _458=function(n){return (n<10)?"0"+n:n;};_457=_457||{};var _459=[],_45a=_457.zulu?"getUTC":"get",date="";if(_457.selector!="time"){var year=_456[_45a+"FullYear"]();date=["0000".substr((year+"").length)+year,_458(_456[_45a+"Month"]()+1),_458(_456[_45a+"Date"]())].join("-");}_459.push(date);if(_457.selector!="date"){var time=[_458(_456[_45a+"Hours"]()),_458(_456[_45a+"Minutes"]()),_458(_456[_45a+"Seconds"]())].join(":");var _45b=_456[_45a+"Milliseconds"]();if(_457.milliseconds){time+="."+(_45b<100?"0":"")+_458(_45b);}if(_457.zulu){time+="Z";}else{if(_457.selector!="time"){var _45c=_456.getTimezoneOffset();var _45d=Math.abs(_45c);time+=(_45c>0?"-":"+")+_458(Math.floor(_45d/60))+":"+_458(_45d%60);}}_459.push(time);}return _459.join("T");};return _44d;});},"esri/layers/GridLayout":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/SpatialReference","esri/geometry/Extent","esri/geometry/Polyline"],function(_45e,lang,_45f,has,_460,_461,_462,_463){var _464=_45e(null,{declaredClass:"esri.layers._GridLayout",constructor:function(_465,_466,_467,_468){this.origin=_465;this.cellWidth=_466.width;this.cellHeight=_466.height;this.mapWidth=_467.width;this.mapHeight=_467.height;this.srInfo=_468;},setResolution:function(_469){this._resolution=(_469.xmax-_469.xmin)/this.mapWidth;if(this.srInfo){var _46a=Math.round((2*this.srInfo.valid[1])/this._resolution),_46b=Math.round(_46a/this.cellWidth);this._frameStats=[_46b,0,_46b-1];}},getCellCoordinates:function(_46c){var res=this._resolution,_46d=this.origin;return {row:Math.floor((_46d.y-_46c.y)/(this.cellHeight*res)),col:Math.floor((_46c.x-_46d.x)/(this.cellWidth*res))};},normalize:function(col){var _46e=this._frameStats;if(_46e){var _46f=_46e[0],m180=_46e[1],p180=_46e[2];if(col<m180){col=col%_46f;col=col<m180?col+_46f:col;}else{if(col>p180){col=col%_46f;}}}return col;},intersects:function(_470,_471){var _472=this.srInfo;if(_472){return _45f.some(_471._getParts(_472),function(_473){return _470.intersects(_473.extent);});}else{return _470.intersects(_471);}},getCellExtent:function(row,col){var res=this._resolution,_474=this.origin,_475=this.cellWidth,_476=this.cellHeight;return new _462((col*_475*res)+_474.x,_474.y-((row+1)*_476*res),((col+1)*_475*res)+_474.x,_474.y-(row*_476*res),new _461(_474.spatialReference.toJson()));},getLatticeID:function(_477){var _478=this.getCellCoordinates({x:_477.xmin,y:_477.ymax}),_479=this.getCellCoordinates({x:_477.xmax,y:_477.ymin}),_47a=_478.row,_47b=_479.row,_47c=this.normalize(_478.col),_47d=this.normalize(_479.col);return _47a+"_"+_47b+"_"+_47c+"_"+_47d;},sorter:function(a,b){return (a<b)?-1:1;},getCellsInExtent:function(_47e,_47f){var _480=this.getCellCoordinates({x:_47e.xmin,y:_47e.ymax}),_481=this.getCellCoordinates({x:_47e.xmax,y:_47e.ymin}),_482=_480.row,_483=_481.row,_484=_480.col,_485=_481.col,_486=[],i,j,nj,_487=[],_488=[],len,xmin,xmax,ymin,ymax,_489=[],_48a,_48b;for(i=_482;i<=_483;i++){for(j=_484;j<=_485;j++){nj=this.normalize(j);_47e=this.getCellExtent(i,nj);_486.push({row:i,col:nj,extent:_47e,resolution:this._resolution});if(_47f){_487.push(_47e.xmin,_47e.xmax);_488.push(_47e.ymin,_47e.ymax);}}}_484=this.normalize(_484);_485=this.normalize(_485);_487.sort(this.sorter);_488.sort(this.sorter);len=_487.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_487[i]===_487[i+1]){_487.splice(i,1);}}}len=_488.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_488[i]===_488[i+1]){_488.splice(i,1);}}}if(_487.length&&_488.length){xmin=_487[0];xmax=_487[_487.length-1];ymin=_488[0];ymax=_488[_488.length-1];len=_487.length;for(i=0;i<len;i++){_489.push([[_487[i],ymax],[_487[i],ymin]]);}len=_488.length;for(i=0;i<len;i++){_489.push([[xmin,_488[i]],[xmax,_488[i]]]);}_48a=new _463({paths:_489,spatialReference:this.origin.spatialReference.toJson()});_48b=_482+"_"+_483+"_"+_484+"_"+_485;_486.push({latticeID:_48b,lattice:_48a,resolution:this._resolution});}return {minRow:_482,maxRow:_483,minCol:_484,maxCol:_485,cells:_486};}});if(has("extend-esri")){lang.setObject("layers._GridLayout",_464,_460);}return _464;});},"esri/layers/FeatureTemplate":function(){define("esri/layers/FeatureTemplate",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/lang","esri/graphic"],function(_48c,lang,has,_48d,_48e,_48f){var _490=_48c(null,{declaredClass:"esri.layers.FeatureTemplate",constructor:function(json){if(json&&lang.isObject(json)){this.name=json.name;this.description=json.description;this.drawingTool=json.drawingTool;var _491=json.prototype;this.prototype=new _48f(_491.geometry,null,_491.attributes);}},toJson:function(){return _48e.fixJson({name:this.name,description:this.description,drawingTool:this.drawingTool,prototype:this.prototype&&this.prototype.toJson()});}});lang.mixin(_490,{TOOL_AUTO_COMPLETE_POLYGON:"esriFeatureEditToolAutoCompletePolygon",TOOL_CIRCLE:"esriFeatureEditToolCircle",TOOL_ELLIPSE:"esriFeatureEditToolEllipse",TOOL_FREEHAND:"esriFeatureEditToolFreehand",TOOL_LINE:"esriFeatureEditToolLine",TOOL_NONE:"esriFeatureEditToolNone",TOOL_POINT:"esriFeatureEditToolPoint",TOOL_POLYGON:"esriFeatureEditToolPolygon",TOOL_RECTANGLE:"esriFeatureEditToolRectangle",TOOL_ARROW:"esriFeatureEditToolArrow",TOOL_TRIANGLE:"esriFeatureEditToolTriangle",TOOL_LEFT_ARROW:"esriFeatureEditToolLeftArrow",TOOL_RIGHT_ARROW:"esriFeatureEditToolRightArrow",TOOL_UP_ARROW:"esriFeatureEditToolUpArrow",TOOL_DOWN_ARROW:"esriFeatureEditToolDownArrow"});if(has("extend-esri")){lang.setObject("layers.FeatureTemplate",_490,_48d);}return _490;});},"dijit/form/NumberSpinner":function(){define("dijit/form/NumberSpinner",["dojo/_base/declare","dojo/_base/event","dojo/keys","./_Spinner","./NumberTextBox"],function(_492,_493,keys,_494,_495){return _492("dijit.form.NumberSpinner",[_494,_495.Mixin],{baseClass:"dijitTextBox dijitSpinner dijitNumberTextBox",adjust:function(val,_496){var tc=this.constraints,v=isNaN(val),_497=!isNaN(tc.max),_498=!isNaN(tc.min);if(v&&_496!=0){val=(_496>0)?_498?tc.min:_497?tc.max:0:_497?this.constraints.max:_498?tc.min:0;}var _499=val+_496;if(v||isNaN(_499)){return val;}if(_497&&(_499>tc.max)){_499=tc.max;}if(_498&&(_499<tc.min)){_499=tc.min;}return _499;},_onKeyPress:function(e){if((e.charOrCode==keys.HOME||e.charOrCode==keys.END)&&!(e.ctrlKey||e.altKey||e.metaKey)&&typeof this.get("value")!="undefined"){var _49a=this.constraints[(e.charOrCode==keys.HOME?"min":"max")];if(typeof _49a=="number"){this._setValueAttr(_49a,false);}_493.stop(e);}}});});},"esri/dijit/editing/tools/Selection":function(){define("esri/dijit/editing/tools/Selection",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/Color","dojo/has","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleFillSymbol","esri/dijit/editing/tools/Edit","esri/dijit/editing/tools/SelectionTools","esri/dijit/editing/tools/DropDownToolBase","esri/kernel"],function(_49b,lang,_49c,_49d,_49e,has,_49f,_4a0,_4a1,Edit,_4a2,_4a3,_4a4){var _4a5=_49b([_4a3],{declaredClass:"esri.dijit.editing.tools.Selection",_enabled:true,activate:function(){this.inherited(arguments);this._sConnect=_49d.connect(this._toolbar,"onDrawEnd",this,"_onDrawEnd");},deactivate:function(){this.inherited(arguments);_49d.disconnect(this._sConnect);delete this._sConnect;},_initializeTool:function(){this._createSymbols();this._initializeLayers();this._toolTypes=["select","selectadd","selectremove"];},_onDrawEnd:function(_4a6){this.inherited(arguments);this._settings.editor._hideAttributeInspector();var _4a7=this._settings.layers;this._selectMethod=this._activeTool._selectMethod;this._settings.editor._selectionHelper.selectFeaturesByGeometry(_4a7,_4a6,this._selectMethod,lang.hitch(this,"onFinished"));},_createSymbols:function(){this._pointSelectionSymbol=new _49f(_49f.STYLE_CIRCLE,10,new _4a0(_4a0.STYLE_SOLID,new _49e([0,0,0]),1),new _49e([255,0,0,0.5]));this._polylineSelectionSymbol=new _4a0(_4a0.STYLE_SOLID,new _49e([0,200,255]),2);this._polygonSelectionSymbol=new _4a1(_4a1.STYLE_SOLID,new _4a0(_4a0.STYLE_SOLID,new _49e([0,0,0]),1),new _49e([0,200,255,0.5]));},_initializeLayers:function(){var _4a8=this._settings.layers;_49c.forEach(_4a8,this._setSelectionSymbol,this);},_setSelectionSymbol:function(_4a9){var _4aa=null;switch(_4a9.geometryType){case "esriGeometryPoint":_4aa=this._pointSelectionSymbol;break;case "esriGeometryPolyline":_4aa=this._polylineSelectionSymbol;break;case "esriGeometryPolygon":_4aa=this._polygonSelectionSymbol;break;}_4a9.setSelectionSymbol(_4a9._selectionSymbol||_4aa);},_createTools:function(){_49c.forEach(this._toolTypes,this._createTool,this);this.inherited(arguments);},_createTool:function(_4ab){var _4ac=lang.mixin(_4a2[_4ab],{settings:this._settings,onClick:lang.hitch(this,"onItemClicked",_4a2[_4ab].id)});this._tools[_4ab.toUpperCase()]=new Edit(_4ac);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Selection",_4a5,_4a4);}return _4a5;});},"dijit/form/DateTextBox":function(){define("dijit/form/DateTextBox",["dojo/_base/declare","../Calendar","./_DateTimeTextBox"],function(_4ad,_4ae,_4af){return _4ad("dijit.form.DateTextBox",_4af,{baseClass:"dijitTextBox dijitComboBox dijitDateTextBox",popupClass:_4ae,_selector:"date",value:new Date("")});});},"dijit/form/ComboButton":function(){require({cache:{"url:dijit/form/templates/ComboButton.html":"<table class=\"dijit dijitReset dijitInline dijitLeft\"\n\tcellspacing='0' cellpadding='0' role=\"presentation\"\n\t><tbody role=\"presentation\"><tr role=\"presentation\"\n\t\t><td class=\"dijitReset dijitStretch dijitButtonNode\" data-dojo-attach-point=\"buttonNode\" data-dojo-attach-event=\"ondijitclick:_onClick,onkeypress:_onButtonKeyPress\"\n\t\t><div id=\"${id}_button\" class=\"dijitReset dijitButtonContents\"\n\t\t\tdata-dojo-attach-point=\"titleNode\"\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\n\t\t\t><div class=\"dijitReset dijitInline dijitIcon\" data-dojo-attach-point=\"iconNode\" role=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitInline dijitButtonText\" id=\"${id}_label\" data-dojo-attach-point=\"containerNode\" role=\"presentation\"></div\n\t\t></div\n\t\t></td\n\t\t><td id=\"${id}_arrow\" class='dijitReset dijitRight dijitButtonNode dijitArrowButton'\n\t\t\tdata-dojo-attach-point=\"_popupStateNode,focusNode,_buttonNode\"\n\t\t\tdata-dojo-attach-event=\"onkeypress:_onArrowKeyPress\"\n\t\t\ttitle=\"${optionsTitle}\"\n\t\t\trole=\"button\" aria-haspopup=\"true\"\n\t\t\t><div class=\"dijitReset dijitArrowButtonInner\" role=\"presentation\"></div\n\t\t\t><div class=\"dijitReset dijitArrowButtonChar\" role=\"presentation\">&#9660;</div\n\t\t></td\n\t\t><td style=\"display:none !important;\"\n\t\t\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" data-dojo-attach-point=\"valueNode\" role=\"presentation\"\n\t\t/></td></tr></tbody\n></table>\n"}});define("dijit/form/ComboButton",["dojo/_base/declare","dojo/_base/event","dojo/keys","../focus","./DropDownButton","dojo/text!./templates/ComboButton.html"],function(_4b0,_4b1,keys,_4b2,_4b3,_4b4){return _4b0("dijit.form.ComboButton",_4b3,{templateString:_4b4,_setIdAttr:"",_setTabIndexAttr:["focusNode","titleNode"],_setTitleAttr:"titleNode",optionsTitle:"",baseClass:"dijitComboButton",cssStateNodes:{"buttonNode":"dijitButtonNode","titleNode":"dijitButtonContents","_popupStateNode":"dijitDownArrowButton"},_focusedNode:null,_onButtonKeyPress:function(evt){if(evt.charOrCode==keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"]){_4b2.focus(this._popupStateNode);_4b1.stop(evt);}},_onArrowKeyPress:function(evt){if(evt.charOrCode==keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"]){_4b2.focus(this.titleNode);_4b1.stop(evt);}},focus:function(_4b5){if(!this.disabled){_4b2.focus(_4b5=="start"?this.titleNode:this._popupStateNode);}}});});},"esri/undoManager":function(){define(["dojo/_base/declare","dojo/has","esri/kernel","dojo/has!extend-esri?esri/OperationBase"],function(_4b6,has,_4b7){var _4b8=_4b6(null,{declaredClass:"esri.UndoManager",maxOperations:10,canUndo:false,canRedo:false,position:0,length:0,onUndo:function(){},onRedo:function(){},onAdd:function(){},onChange:function(){},constructor:function(_4b9){_4b9=_4b9||{};if(_4b9.maxOperations){this.maxOperations=_4b9.maxOperations;}this._historyStack=[];},add:function(_4ba){if(this.maxOperations>0){while(this._historyStack.length>=this.maxOperations){this._historyStack.shift();}}this._historyStack.splice(this.position,0,_4ba);this.position++;this.clearRedo();this.onAdd();this._checkAvailability();},undo:function(){if(this.position===0){return null;}var _4bb=this.peekUndo();this.position--;if(_4bb){_4bb.performUndo();}this.onUndo();this._checkAvailability();},redo:function(){if(this.position===this._historyStack.length){return null;}var _4bc=this.peekRedo();this.position++;if(_4bc){_4bc.performRedo();}this.onRedo();this._checkAvailability();},_checkAvailability:function(){this.length=this._historyStack.length;if(this.length===0){this.canRedo=false;this.canUndo=false;}else{if(this.position===0){this.canRedo=true;this.canUndo=false;}else{if(this.position===this.length){this.canUndo=true;this.canRedo=false;}else{this.canUndo=true;this.canRedo=true;}}}this.onChange();},clearUndo:function(){this._historyStack.splice(0,this.position);this.position=0;this._checkAvailability();},clearRedo:function(){this._historyStack.splice(this.position,this._historyStack.length-this.position);this.position=this._historyStack.length;this._checkAvailability();},peekUndo:function(){if(this._historyStack.length>0&&this.position>0){return this.get(this.position-1);}},peekRedo:function(){if(this._historyStack.length>0&&this.position<this._historyStack.length){return this.get(this.position);}},get:function(idx){return this._historyStack[idx];},remove:function(idx){if(this._historyStack.length>0){this._historyStack.splice(idx,1);if(this.position>0){if(idx<this.position){this.position--;}}this._checkAvailability();}},destroy:function(){this._historyStack=null;}});if(has("extend-esri")){_4b7.UndoManager=_4b8;}return _4b8;});},"url:dijit/templates/Calendar.html":"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" aria-labelledby=\"${id}_mddb ${id}_year\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div data-dojo-attach-point=\"monthNode\">\n\t\t\t\t</div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr role=\"row\">\n\t\t\t${!dayCellsHtml}\n\t\t</tr>\n\t</thead>\n\t<tbody data-dojo-attach-point=\"dateRowsNode\" data-dojo-attach-event=\"onclick: _onDayClick\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t\t${!dateRowsHtml}\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\" role=\"presentation\">\n\t\t\t\t<div class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span data-dojo-attach-point=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\" role=\"button\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\" role=\"button\" id=\"${id}_year\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\" role=\"button\"></span>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n","dijit/form/_AutoCompleterMixin":function(){define("dijit/form/_AutoCompleterMixin",["dojo/data/util/filter","dojo/_base/declare","dojo/dom-attr","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/query","dojo/regexp","dojo/sniff","dojo/string","./DataList","../registry","./_TextBoxMixin","./_SearchMixin"],function(_4bd,_4be,_4bf,_4c0,keys,lang,_4c1,_4c2,has,_4c3,_4c4,_4c5,_4c6,_4c7){return _4be("dijit.form._AutoCompleterMixin",_4c7,{item:null,autoComplete:true,highlightMatch:"first",labelAttr:"",labelType:"text",maxHeight:-1,_stopClickEvents:false,_getCaretPos:function(_4c8){var pos=0;if(typeof (_4c8.selectionStart)=="number"){pos=_4c8.selectionStart;}else{if(has("ie")){var tr=_4c8.ownerDocument.selection.createRange().duplicate();var ntr=_4c8.createTextRange();tr.move("character",0);ntr.move("character",0);try{ntr.setEndPoint("EndToEnd",tr);pos=String(ntr.text).replace(/\r/g,"").length;}catch(e){}}}return pos;},_setCaretPos:function(_4c9,_4ca){_4ca=parseInt(_4ca);_4c6.selectInputText(_4c9,_4ca,_4ca);},_setDisabledAttr:function(_4cb){this.inherited(arguments);this.domNode.setAttribute("aria-disabled",_4cb?"true":"false");},_onKey:function(evt){if(evt.charCode>=32){return;}var key=evt.charCode||evt.keyCode;if(key==keys.ALT||key==keys.CTRL||key==keys.META||key==keys.SHIFT){return;}var pw=this.dropDown;var _4cc=null;this._abortQuery();this.inherited(arguments);if(evt.altKey||evt.ctrlKey||evt.metaKey){return;}if(this._opened){_4cc=pw.getHighlightedOption();}switch(key){case keys.PAGE_DOWN:case keys.DOWN_ARROW:case keys.PAGE_UP:case keys.UP_ARROW:if(this._opened){this._announceOption(_4cc);}_4c0.stop(evt);break;case keys.ENTER:if(_4cc){if(_4cc==pw.nextButton){this._nextSearch(1);_4c0.stop(evt);break;}else{if(_4cc==pw.previousButton){this._nextSearch(-1);_4c0.stop(evt);break;}}_4c0.stop(evt);}else{this._setBlurValue();this._setCaretPos(this.focusNode,this.focusNode.value.length);}case keys.TAB:var _4cd=this.get("displayedValue");if(pw&&(_4cd==pw._messages["previousMessage"]||_4cd==pw._messages["nextMessage"])){break;}if(_4cc){this._selectOption(_4cc);}case keys.ESCAPE:if(this._opened){this._lastQuery=null;this.closeDropDown();}break;}},_autoCompleteText:function(text){var fn=this.focusNode;_4c6.selectInputText(fn,fn.value.length);var _4ce=this.ignoreCase?"toLowerCase":"substr";if(text[_4ce](0).indexOf(this.focusNode.value[_4ce](0))==0){var cpos=this.autoComplete?this._getCaretPos(fn):fn.value.length;if((cpos+1)>fn.value.length){fn.value=text;_4c6.selectInputText(fn,cpos);}}else{fn.value=text;_4c6.selectInputText(fn);}},_openResultList:function(_4cf,_4d0,_4d1){var _4d2=this.dropDown.getHighlightedOption();this.dropDown.clearResultList();if(!_4cf.length&&_4d1.start==0){this.closeDropDown();return;}this._nextSearch=this.dropDown.onPage=lang.hitch(this,function(_4d3){_4cf.nextPage(_4d3!==-1);this.focus();});this.dropDown.createOptions(_4cf,_4d1,lang.hitch(this,"_getMenuLabelFromItem"));this._showResultList();if("direction" in _4d1){if(_4d1.direction){this.dropDown.highlightFirstOption();}else{if(!_4d1.direction){this.dropDown.highlightLastOption();}}if(_4d2){this._announceOption(this.dropDown.getHighlightedOption());}}else{if(this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(_4d0[this.searchAttr].toString())){this._announceOption(this.dropDown.containerNode.firstChild.nextSibling);}}},_showResultList:function(){this.closeDropDown(true);this.openDropDown();this.domNode.setAttribute("aria-expanded","true");},loadDropDown:function(){this._startSearchAll();},isLoaded:function(){return false;},closeDropDown:function(){this._abortQuery();if(this._opened){this.inherited(arguments);this.domNode.setAttribute("aria-expanded","false");this.focusNode.removeAttribute("aria-activedescendant");}},_setBlurValue:function(){var _4d4=this.get("displayedValue");var pw=this.dropDown;if(pw&&(_4d4==pw._messages["previousMessage"]||_4d4==pw._messages["nextMessage"])){this._setValueAttr(this._lastValueReported,true);}else{if(typeof this.item=="undefined"){this.item=null;this.set("displayedValue",_4d4);}else{if(this.value!=this._lastValueReported){this._handleOnChange(this.value,true);}this._refreshState();}}},_setItemAttr:function(item,_4d5,_4d6){var _4d7="";if(item){if(!_4d6){_4d6=this.store._oldAPI?this.store.getValue(item,this.searchAttr):item[this.searchAttr];}_4d7=this._getValueField()!=this.searchAttr?this.store.getIdentity(item):_4d6;}this.set("value",_4d7,_4d5,_4d6,item);},_announceOption:function(node){if(!node){return;}var _4d8;if(node==this.dropDown.nextButton||node==this.dropDown.previousButton){_4d8=node.innerHTML;this.item=undefined;this.value="";}else{var item=this.dropDown.items[node.getAttribute("item")];_4d8=(this.store._oldAPI?this.store.getValue(item,this.searchAttr):item[this.searchAttr]).toString();this.set("item",item,false,_4d8);}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);this.focusNode.setAttribute("aria-activedescendant",_4bf.get(node,"id"));this._autoCompleteText(_4d8);},_selectOption:function(_4d9){this.closeDropDown();if(_4d9){this._announceOption(_4d9);}this._setCaretPos(this.focusNode,this.focusNode.value.length);this._handleOnChange(this.value,true);},_startSearchAll:function(){this._startSearch("");},_startSearchFromInput:function(){this.item=undefined;this.inherited(arguments);},_startSearch:function(key){if(!this.dropDown){var _4da=this.id+"_popup",_4db=lang.isString(this.dropDownClass)?lang.getObject(this.dropDownClass,false):this.dropDownClass;this.dropDown=new _4db({onChange:lang.hitch(this,this._selectOption),id:_4da,dir:this.dir,textDir:this.textDir});this.focusNode.removeAttribute("aria-activedescendant");this.textbox.setAttribute("aria-owns",_4da);}this._lastInput=key;this.inherited(arguments);},_getValueField:function(){return this.searchAttr;},postMixInProperties:function(){this.inherited(arguments);if(!this.store){var _4dc=this.srcNodeRef;this.store=new _4c4({},_4dc);if(!("value" in this.params)){var item=(this.item=this.store.fetchSelectedItem());if(item){var _4dd=this._getValueField();this.value=this.store._oldAPI?this.store.getValue(item,_4dd):item[_4dd];}}}},postCreate:function(){var _4de=_4c1("label[for=\""+this.id+"\"]");if(_4de.length){if(!_4de[0].id){_4de[0].id=this.id+"_label";}this.domNode.setAttribute("aria-labelledby",_4de[0].id);}this.inherited(arguments);this.connect(this,"onSearch","_openResultList");},_getMenuLabelFromItem:function(item){var _4df=this.labelFunc(item,this.store),_4e0=this.labelType;if(this.highlightMatch!="none"&&this.labelType=="text"&&this._lastInput){_4df=this.doHighlight(_4df,this._lastInput);_4e0="html";}return {html:_4e0=="html",label:_4df};},doHighlight:function(_4e1,find){var _4e2=(this.ignoreCase?"i":"")+(this.highlightMatch=="all"?"g":""),i=this.queryExpr.indexOf("${0}");find=_4c2.escapeString(find);return this._escapeHtml(_4e1.replace(new RegExp((i==0?"^":"")+"("+find+")"+(i==(this.queryExpr.length-4)?"$":""),_4e2),"\uffff$1\uffff")).replace(/\uFFFF([^\uFFFF]+)\uFFFF/g,"<span class=\"dijitComboBoxHighlightMatch\">$1</span>");},_escapeHtml:function(str){str=String(str).replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");return str;},reset:function(){this.item=null;this.inherited(arguments);},labelFunc:function(item,_4e3){return (_4e3._oldAPI?_4e3.getValue(item,this.labelAttr||this.searchAttr):item[this.labelAttr||this.searchAttr]).toString();},_setValueAttr:function(_4e4,_4e5,_4e6,item){this._set("item",item||null);if(_4e4==null){_4e4="";}this.inherited(arguments);},_setTextDirAttr:function(_4e7){this.inherited(arguments);if(this.dropDown){this.dropDown._set("textDir",_4e7);}}});});},"dojox/grid/Selection":function(){define("dojox/grid/Selection",["dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/dom-attr"],function(_4e8,_4e9,lang,_4ea){return _4e8("dojox.grid.Selection",null,{constructor:function(_4eb){this.grid=_4eb;this.selected=[];this.setMode(_4eb.selectionMode);},mode:"extended",selected:null,updating:0,selectedIndex:-1,rangeStartIndex:-1,setMode:function(mode){if(this.selected.length){this.deselectAll();}if(mode!="extended"&&mode!="multiple"&&mode!="single"&&mode!="none"){this.mode="extended";}else{this.mode=mode;}},onCanSelect:function(_4ec){return this.grid.onCanSelect(_4ec);},onCanDeselect:function(_4ed){return this.grid.onCanDeselect(_4ed);},onSelected:function(_4ee){},onDeselected:function(_4ef){},onChanging:function(){},onChanged:function(){},isSelected:function(_4f0){if(this.mode=="none"){return false;}return this.selected[_4f0];},getFirstSelected:function(){if(!this.selected.length||this.mode=="none"){return -1;}for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getNextSelected:function(_4f1){if(this.mode=="none"){return -1;}for(var i=_4f1+1,l=this.selected.length;i<l;i++){if(this.selected[i]){return i;}}return -1;},getSelected:function(){var _4f2=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_4f2.push(i);}}return _4f2;},getSelectedCount:function(){var c=0;for(var i=0;i<this.selected.length;i++){if(this.selected[i]){c++;}}return c;},_beginUpdate:function(){if(this.updating===0){this.onChanging();}this.updating++;},_endUpdate:function(){this.updating--;if(this.updating===0){this.onChanged();}},select:function(_4f3){if(this.mode=="none"){return;}if(this.mode!="multiple"){this.deselectAll(_4f3);this.addToSelection(_4f3);}else{this.toggleSelect(_4f3);}},addToSelection:function(_4f4){if(this.mode=="none"){return;}if(lang.isArray(_4f4)){_4e9.forEach(_4f4,this.addToSelection,this);return;}_4f4=Number(_4f4);if(this.selected[_4f4]){this.selectedIndex=_4f4;}else{if(this.onCanSelect(_4f4)!==false){this.selectedIndex=_4f4;var _4f5=this.grid.getRowNode(_4f4);if(_4f5){_4ea.set(_4f5,"aria-selected","true");}this._beginUpdate();this.selected[_4f4]=true;this.onSelected(_4f4);this._endUpdate();}}},deselect:function(_4f6){if(this.mode=="none"){return;}if(lang.isArray(_4f6)){_4e9.forEach(_4f6,this.deselect,this);return;}_4f6=Number(_4f6);if(this.selectedIndex==_4f6){this.selectedIndex=-1;}if(this.selected[_4f6]){if(this.onCanDeselect(_4f6)===false){return;}var _4f7=this.grid.getRowNode(_4f6);if(_4f7){_4ea.set(_4f7,"aria-selected","false");}this._beginUpdate();delete this.selected[_4f6];this.onDeselected(_4f6);this._endUpdate();}},setSelected:function(_4f8,_4f9){this[(_4f9?"addToSelection":"deselect")](_4f8);},toggleSelect:function(_4fa){if(lang.isArray(_4fa)){_4e9.forEach(_4fa,this.toggleSelect,this);return;}this.setSelected(_4fa,!this.selected[_4fa]);},_range:function(_4fb,inTo,func){var s=(_4fb>=0?_4fb:inTo),e=inTo;if(s>e){e=s;s=inTo;}for(var i=s;i<=e;i++){func(i);}},selectRange:function(_4fc,inTo){this._range(_4fc,inTo,lang.hitch(this,"addToSelection"));},deselectRange:function(_4fd,inTo){this._range(_4fd,inTo,lang.hitch(this,"deselect"));},insert:function(_4fe){this.selected.splice(_4fe,0,false);if(this.selectedIndex>=_4fe){this.selectedIndex++;}},remove:function(_4ff){this.selected.splice(_4ff,1);if(this.selectedIndex>=_4ff){this.selectedIndex--;}},deselectAll:function(_500){for(var i in this.selected){if((i!=_500)&&(this.selected[i]===true)){this.deselect(i);}}},clickSelect:function(_501,_502,_503){if(this.mode=="none"){return;}this._beginUpdate();if(this.mode!="extended"){this.select(_501);}else{if(!_503||this.rangeStartIndex<0){this.rangeStartIndex=_501;}if(!_502){this.deselectAll(_501);}if(_503){this.selectRange(this.rangeStartIndex,_501);}else{if(_502){this.toggleSelect(_501);}else{this.addToSelection(_501);}}}this._endUpdate();},clickSelectEvent:function(e){this.clickSelect(e.rowIndex,dojo.isCopyKey(e),e.shiftKey);},clear:function(){this._beginUpdate();this.deselectAll();this._endUpdate();}});});},"dijit/form/MappedTextBox":function(){define("dijit/form/MappedTextBox",["dojo/_base/declare","dojo/dom-construct","./ValidationTextBox"],function(_504,_505,_506){return _504("dijit.form.MappedTextBox",_506,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting="";},_setNameAttr:null,serialize:function(val){return val.toString?val.toString():"";},toString:function(){var val=this.filter(this.get("value"));return val!=null?(typeof val=="string"?val:this.serialize(val,this.constraints)):"";},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);this.valueNode=_505.place("<input type='hidden'"+(this.name?" name=\""+this.name.replace(/"/g,"&quot;")+"\"":"")+"/>",this.textbox,"after");},reset:function(){this.valueNode.value="";this.inherited(arguments);}});});},"dijit/form/ComboBoxMixin":function(){require({cache:{"url:dijit/form/templates/DropDownBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_buttonNode, _popupStateNode\" role=\"presentation\"\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"button presentation\" aria-hidden=\"true\"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\n\t\t\tdata-dojo-attach-point=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\n\t/></div\n></div>\n"}});define("dijit/form/ComboBoxMixin",["dojo/_base/declare","dojo/_base/Deferred","dojo/_base/kernel","dojo/_base/lang","dojo/store/util/QueryResults","./_AutoCompleterMixin","./_ComboBoxMenu","../_HasDropDown","dojo/text!./templates/DropDownBox.html"],function(_507,_508,_509,lang,_50a,_50b,_50c,_50d,_50e){return _507("dijit.form.ComboBoxMixin",[_50d,_50b],{dropDownClass:_50c,hasDownArrow:true,templateString:_50e,baseClass:"dijitTextBox dijitComboBox",cssStateNodes:{"_buttonNode":"dijitDownArrowButton"},_setHasDownArrowAttr:function(val){this._set("hasDownArrow",val);this._buttonNode.style.display=val?"":"none";},_showResultList:function(){this.displayMessage("");this.inherited(arguments);},_setStoreAttr:function(_50f){if(!_50f.get){lang.mixin(_50f,{_oldAPI:true,get:function(id){var _510=new _508();this.fetchItemByIdentity({identity:id,onItem:function(_511){_510.resolve(_511);},onError:function(_512){_510.reject(_512);}});return _510.promise;},query:function(_513,_514){var _515=new _508(function(){_516.abort&&_516.abort();});_515.total=new _508();var _516=this.fetch(lang.mixin({query:_513,onBegin:function(_517){_515.total.resolve(_517);},onComplete:function(_518){_515.resolve(_518);},onError:function(_519){_515.reject(_519);}},_514));return _50a(_515);}});}this._set("store",_50f);},postMixInProperties:function(){var _51a=this.params.store||this.store;if(_51a){this._setStoreAttr(_51a);}this.inherited(arguments);if(!this.params.store&&!this.store._oldAPI){var _51b=this.declaredClass;lang.mixin(this.store,{getValue:function(item,attr){_509.deprecated(_51b+".store.getValue(item, attr) is deprecated for builtin store.  Use item.attr directly","","2.0");return item[attr];},getLabel:function(item){_509.deprecated(_51b+".store.getLabel(item) is deprecated for builtin store.  Use item.label directly","","2.0");return item.name;},fetch:function(args){_509.deprecated(_51b+".store.fetch() is deprecated for builtin store.","Use store.query()","2.0");var shim=["dojo/data/ObjectStore"];require(shim,lang.hitch(this,function(_51c){new _51c({objectStore:this}).fetch(args);}));}});}}});});},"dojo/_base/query":function(){define(["../query","./NodeList"],function(_51d){return _51d;});},"dijit/form/_TextBoxMixin":function(){define("dijit/form/_TextBoxMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/on","../main"],function(_51e,_51f,dom,_520,keys,lang,on,_521){var _522=_51f("dijit.form._TextBoxMixin",null,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",selectOnClick:false,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints);},_setValueAttr:function(_523,_524,_525){var _526;if(_523!==undefined){_526=this.filter(_523);if(typeof _525!="string"){if(_526!==null&&((typeof _526!="number")||!isNaN(_526))){_525=this.filter(this.format(_526,this.constraints));}else{_525="";}}}if(_525!=null&&((typeof _525)!="number"||!isNaN(_525))&&this.textbox.value!=_525){this.textbox.value=_525;this._set("displayedValue",this.get("displayedValue"));}if(this.textDir=="auto"){this.applyTextDir(this.focusNode,_525);}this.inherited(arguments,[_526,_524]);},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value);},_setDisplayedValueAttr:function(_527){if(_527==null){_527="";}else{if(typeof _527!="string"){_527=String(_527);}}this.textbox.value=_527;this._setValueAttr(this.get("value"),undefined);this._set("displayedValue",this.get("displayedValue"));if(this.textDir=="auto"){this.applyTextDir(this.focusNode,_527);}},format:function(_528){return _528==null?"":(_528.toString?_528.toString():_528);},parse:function(_529){return _529;},_refreshState:function(){},onInput:function(){},__skipInputEvent:false,_onInput:function(evt){if(this.textDir=="auto"){this.applyTextDir(this.focusNode,this.focusNode.value);}this._processInput(evt);},_processInput:function(evt){this._refreshState();this._set("displayedValue",this.get("displayedValue"));},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);var _52a=function(e){var _52b;if(e.type=="keydown"){_52b=e.keyCode;switch(_52b){case keys.SHIFT:case keys.ALT:case keys.CTRL:case keys.META:case keys.CAPS_LOCK:case keys.NUM_LOCK:case keys.SCROLL_LOCK:return;}if(!e.ctrlKey&&!e.metaKey&&!e.altKey){switch(_52b){case keys.NUMPAD_0:case keys.NUMPAD_1:case keys.NUMPAD_2:case keys.NUMPAD_3:case keys.NUMPAD_4:case keys.NUMPAD_5:case keys.NUMPAD_6:case keys.NUMPAD_7:case keys.NUMPAD_8:case keys.NUMPAD_9:case keys.NUMPAD_MULTIPLY:case keys.NUMPAD_PLUS:case keys.NUMPAD_ENTER:case keys.NUMPAD_MINUS:case keys.NUMPAD_PERIOD:case keys.NUMPAD_DIVIDE:return;}if((_52b>=65&&_52b<=90)||(_52b>=48&&_52b<=57)||_52b==keys.SPACE){return;}var _52c=false;for(var i in keys){if(keys[i]===e.keyCode){_52c=true;break;}}if(!_52c){return;}}}_52b=e.charCode>=32?String.fromCharCode(e.charCode):e.charCode;if(!_52b){_52b=(e.keyCode>=65&&e.keyCode<=90)||(e.keyCode>=48&&e.keyCode<=57)||e.keyCode==keys.SPACE?String.fromCharCode(e.keyCode):e.keyCode;}if(!_52b){_52b=229;}if(e.type=="keypress"){if(typeof _52b!="string"){return;}if((_52b>="a"&&_52b<="z")||(_52b>="A"&&_52b<="Z")||(_52b>="0"&&_52b<="9")||(_52b===" ")){if(e.ctrlKey||e.metaKey||e.altKey){return;}}}if(e.type=="input"){if(this.__skipInputEvent){this.__skipInputEvent=false;return;}}else{this.__skipInputEvent=true;}var faux={faux:true},attr;for(attr in e){if(attr!="layerX"&&attr!="layerY"){var v=e[attr];if(typeof v!="function"&&typeof v!="undefined"){faux[attr]=v;}}}lang.mixin(faux,{charOrCode:_52b,_wasConsumed:false,preventDefault:function(){faux._wasConsumed=true;e.preventDefault();},stopPropagation:function(){e.stopPropagation();}});if(this.onInput(faux)===false){faux.preventDefault();faux.stopPropagation();}if(faux._wasConsumed){return;}this.defer(function(){this._onInput(faux);});};this.own(on(this.textbox,"keydown, keypress, paste, cut, input, compositionend",lang.hitch(this,_52a)));},_blankValue:"",filter:function(val){if(val===null){return this._blankValue;}if(typeof val!="string"){return val;}if(this.trim){val=lang.trim(val);}if(this.uppercase){val=val.toUpperCase();}if(this.lowercase){val=val.toLowerCase();}if(this.propercase){val=val.replace(/[^\s]+/g,function(word){return word.substring(0,1).toUpperCase()+word.substring(1);});}return val;},_setBlurValue:function(){this._setValueAttr(this.get("value"),true);},_onBlur:function(e){if(this.disabled){return;}this._setBlurValue();this.inherited(arguments);},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd;},_onFocus:function(by){if(this.disabled||this.readOnly){return;}if(this.selectOnClick&&by=="mouse"){this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);this._selectOnClickHandle=null;if(!this._isTextSelected()){_522.selectInputText(this.textbox);}});this.defer(function(){if(this._selectOnClickHandle){this.disconnect(this._selectOnClickHandle);this._selectOnClickHandle=null;}},500);}this.inherited(arguments);this._refreshState();},reset:function(){this.textbox.value="";this.inherited(arguments);},_setTextDirAttr:function(_52d){if(!this._created||this.textDir!=_52d){this._set("textDir",_52d);this.applyTextDir(this.focusNode,this.focusNode.value);}}});_522._setSelectionRange=_521._setSelectionRange=function(_52e,_52f,stop){if(_52e.setSelectionRange){_52e.setSelectionRange(_52f,stop);}};_522.selectInputText=_521.selectInputText=function(_530,_531,stop){_530=dom.byId(_530);if(isNaN(_531)){_531=0;}if(isNaN(stop)){stop=_530.value?_530.value.length:0;}try{_530.focus();_522._setSelectionRange(_530,_531,stop);}catch(e){}};return _522;});},"dijit/form/SimpleTextarea":function(){define("dijit/form/SimpleTextarea",["dojo/_base/declare","dojo/dom-class","dojo/sniff","./TextBox"],function(_532,_533,has,_534){return _532("dijit.form.SimpleTextarea",_534,{baseClass:"dijitTextBox dijitTextArea",rows:"3",cols:"20",templateString:"<textarea ${!nameAttrSetting} data-dojo-attach-point='focusNode,containerNode,textbox' autocomplete='off'></textarea>",postMixInProperties:function(){if(!this.value&&this.srcNodeRef){this.value=this.srcNodeRef.value;}this.inherited(arguments);},buildRendering:function(){this.inherited(arguments);if(has("ie")&&this.cols){_533.add(this.textbox,"dijitTextAreaCols");}},filter:function(_535){if(_535){_535=_535.replace(/\r/g,"");}return this.inherited(arguments);},_onInput:function(e){if(this.maxLength){var _536=parseInt(this.maxLength);var _537=this.textbox.value.replace(/\r/g,"");var _538=_537.length-_536;if(_538>0){var _539=this.textbox;if(_539.selectionStart){var pos=_539.selectionStart;var cr=0;if(has("opera")){cr=(this.textbox.value.substring(0,pos).match(/\r/g)||[]).length;}this.textbox.value=_537.substring(0,pos-_538-cr)+_537.substring(pos-cr);_539.setSelectionRange(pos-_538,pos-_538);}else{if(this.ownerDocument.selection){_539.focus();var _53a=this.ownerDocument.selection.createRange();_53a.moveStart("character",-_538);_53a.text="";_53a.select();}}}}this.inherited(arguments);}});});},"url:esri/dijit/editing/templates/TemplatePicker.html":"<div class=\"templatePicker\">\r\n\r\n  <table dojoType=\"dojox.grid.DataGrid\" noDataMessage=\"${emptyMessage}\" selectionMode=\"none\" autoHeight=\"${_rows}\" autoWidth=\"${_autoWidth}\"\r\n         query=\"{ query: '*' }\" dojoAttachPoint=\"grid\" class=\"grid\">\r\n  </table>\r\n  \r\n</div>","esri/toolbars/_Box":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","dojo/dom-style","dojox/gfx/Moveable","dojox/gfx/matrix","esri/kernel","esri/lang","esri/geometry/Point","esri/geometry/Polyline","esri/geometry/webMercatorUtils","esri/geometry/jsonUtils","esri/graphic"],function(_53b,lang,_53c,_53d,has,_53e,_53f,_540,_541,_542,_543,_544,_545,_546,_547){var BOX=_53b(null,{declaredClass:"esri.toolbars._Box",constructor:function(_548,map,_549,_54a,_54b,_54c){this._graphic=_548;this._map=map;this._toolbar=_549;this._scale=_54a;this._rotate=_54b;this._defaultEventArgs={};this._scaleEvent="Scale";this._rotateEvent="Rotate";this._uniformScaling=_54c;var _54d=_549._options;this._markerSymbol=_54d.boxHandleSymbol;this._lineSymbol=_54d.boxLineSymbol;this._moveStartHandler=lang.hitch(this,this._moveStartHandler);this._firstMoveHandler=lang.hitch(this,this._firstMoveHandler);this._moveStopHandler=lang.hitch(this,this._moveStopHandler);this._moveHandler=lang.hitch(this,this._moveHandler);this._init();},destroy:function(){this._cleanUp();this._graphic=this._map=this._toolbar=this._markerSymbol=this._lineSymbol=null;},refresh:function(){this._draw();},suspend:function(){_53c.forEach(this._getAllGraphics(),function(g){g.hide();});},resume:function(){_53c.forEach(this._getAllGraphics(),function(g){g.show();});this._draw();},_init:function(){this._draw();},_cleanUp:function(){if(this._connects){_53c.forEach(this._connects,_53d.disconnect);}var _54e=this._toolbar._scratchGL;if(this._anchors){_53c.forEach(this._anchors,function(info){_54e.remove(info.graphic);var mov=info.moveable;if(mov){mov.destroy();}});}if(this._box){_54e.remove(this._box);}this._box=this._anchors=this._connects=null;},_draw:function(){if(!this._graphic.getDojoShape()){this._cleanUp();return;}var map=this._map,_54f=this._toolbar._scratchGL;var _550=this._getBoxCoords();var _551=new _544(map.spatialReference);var path=lang.clone(_53c.filter(_550,function(pt,_552){return (_552!==8&&_552%2===0);}));if(path[0]){path.push([path[0][0],path[0][1]]);}_551.addPath(path);if(this._rotate){_551.addPath([_550[1],_550[8]]);}if(this._box){this._box.setGeometry(_551);}else{this._box=new _547(_551,this._lineSymbol);_54f.add(this._box);}if(this._anchors){_53c.forEach(this._anchors,function(info,_553){if(!this._scale){_553=8;}var _554=new _543(_550[_553],map.spatialReference);info.graphic.setGeometry(_554);var mov=info.moveable,_555=info.graphic.getDojoShape();if(_555){if(!mov){info.moveable=this._getMoveable(info.graphic,_553);}else{if(_555!==mov.shape){mov.destroy();info.moveable=this._getMoveable(info.graphic,_553);}}}},this);}else{this._anchors=[];this._connects=[];_53c.forEach(_550,function(_556,_557){if(!this._scale&&_557<8){return;}_556=new _543(_556,map.spatialReference);var _558=new _547(_556,this._markerSymbol);_54f.add(_558);this._anchors.push({graphic:_558,moveable:this._getMoveable(_558,_557)});},this);}},_getBoxCoords:function(_559){var _55a=this._graphic,map=this._map,bbox=this._getTransformedBoundingBox(_55a),_55b=[],pt,next,_55c;_53c.forEach(bbox,function(_55d,_55e,arr){pt=_55d;next=arr[_55e+1];if(!next){next=arr[0];}_55c={x:(pt.x+next.x)/2,y:(pt.y+next.y)/2};if(!_559){pt=map.toMap(pt);_55c=map.toMap(_55c);}_55b.push([pt.x,pt.y]);_55b.push([_55c.x,_55c.y]);});if(this._rotate){var _55f=lang.clone(_55b[1]);_55f=_559?{x:_55f[0],y:_55f[1]}:map.toScreen({x:_55f[0],y:_55f[1],spatialReference:map.spatialReference});_55f.y-=this._toolbar._options.rotateHandleOffset;if(!_559){_55f=map.toMap(_55f);}_55b.push([_55f.x,_55f.y]);}return _55b;},_getTransformedBoundingBox:function(_560){var map=this._map,_561=_560.geometry.getExtent(),_562=_560.geometry.spatialReference,_563=new _543(_561.xmin,_561.ymax,_562),_564=new _543(_561.xmax,_561.ymin,_562);_563=map.toScreen(_563);_564=map.toScreen(_564);return [{x:_563.x,y:_563.y},{x:_564.x,y:_563.y},{x:_564.x,y:_564.y},{x:_563.x,y:_564.y}];},_getAllGraphics:function(){var _565=[this._box];if(this._anchors){_53c.forEach(this._anchors,function(_566){_565.push(_566.graphic);});}_565=_53c.filter(_565,_542.isDefined);return _565;},_getMoveable:function(_567,_568){var _569=_567.getDojoShape();if(!_569){return;}var _56a=new _53f(_569);_56a._index=_568;this._connects.push(_53d.connect(_56a,"onMoveStart",this._moveStartHandler));this._connects.push(_53d.connect(_56a,"onFirstMove",this._firstMoveHandler));this._connects.push(_53d.connect(_56a,"onMoveStop",this._moveStopHandler));_56a.onMove=this._moveHandler;var node=_569.getEventSource();if(node){_53e.set(node,"cursor",this._toolbar._cursors["box"+_568]);}return _56a;},_moveStartHandler:function(_56b){this._toolbar["on"+(_56b.host._index===8?this._rotateEvent:this._scaleEvent)+"Start"](this._graphic);},_firstMoveHandler:function(_56c){var _56d=_56c.host._index,_56e=(this._wrapOffset=_56c.host.shape._wrapOffsets[0]||0),_56f=this._graphic.getLayer()._div.getTransform(),mx=_540,_570,_571,_572,_573=_53c.map(this._getBoxCoords(true),function(arr){return {x:arr[0]+_56e,y:arr[1]};});_572={x:_573[1].x,y:_573[3].y};this._centerCoord=mx.multiplyPoint(mx.invert(_56f),_572);if(_56d===8){_570=mx.multiplyPoint(mx.invert(_56f),_573[1]);this._startLine=[this._centerCoord,_570];this._moveLine=lang.clone(this._startLine);}else{_570=mx.multiplyPoint(mx.invert(_56f),_573[_56d]);_571=mx.multiplyPoint(mx.invert(_56f),_573[(_56d+4)%8]);this._firstMoverToCenter=Math.sqrt((_570.x-this._centerCoord.x)*(_570.x-this._centerCoord.x)+(_570.y-this._centerCoord.y)*(_570.y-this._centerCoord.y));this._startBox=_571;this._startBox.width=(_573[4].x-_573[0].x);this._startBox.height=(_573[4].y-_573[0].y);this._moveBox=lang.clone(this._startBox);this._xfactor=_570.x>_571.x?1:-1;this._yfactor=_570.y>_571.y?1:-1;if(_56d===1||_56d===5){this._xfactor=0;}else{if(_56d===3||_56d===7){this._yfactor=0;}}}this._toolbar._beginOperation("BOX");this._toolbar["on"+(_56d===8?this._rotateEvent:this._scaleEvent)+"FirstMove"](this._graphic);},_moveHandler:function(_574,_575){var _576=_574.host._index,args=this._defaultEventArgs,_577,move,tx,pt,_578,_579,_57a,_57b=0,_57c=0,_57d,_57e,_57f;args.angle=0;args.scaleX=1;args.scaleY=1;if(_576===8){_577=this._startLine;move=this._moveLine;pt=move[1];pt.x+=_575.dx;pt.y+=_575.dy;_578=this._getAngle(_577,move);tx=_540.rotategAt(_578,_577[0]);this._graphic.getDojoShape().setTransform(tx);args.transform=tx;args.angle=_578;args.around=_577[0];}else{_577=this._startBox;move=this._moveBox;move.width+=(_575.dx*this._xfactor);move.height+=(_575.dy*this._yfactor);if(this._uniformScaling){_57d=move.x+this._xfactor*move.width;_57e=move.y+this._yfactor*move.height;_57f=Math.sqrt((_57d-this._centerCoord.x)*(_57d-this._centerCoord.x)+(_57e-this._centerCoord.y)*(_57e-this._centerCoord.y));_579=_57a=_57f/this._firstMoverToCenter;_57b=this._xfactor*_577.width/2;_57c=this._yfactor*_577.height/2;}else{_579=move.width/_577.width;_57a=move.height/_577.height;}if(isNaN(_579)||_579===Infinity||_579===-Infinity){_579=1;}if(isNaN(_57a)||_57a===Infinity||_57a===-Infinity){_57a=1;}tx=_540.scaleAt(_579,_57a,_577.x+_57b,_577.y+_57c);this._graphic.getDojoShape().setTransform(tx);args.transform=tx;args.scaleX=_579;args.scaleY=_57a;args.around={x:_577.x+_57b,y:_577.y+_57c};}this._toolbar["on"+(_576===8?this._rotateEvent:this._scaleEvent)](this._graphic,args);},_moveStopHandler:function(_580){var _581=this._graphic,_582=this._toolbar,_583=_582._geo?_545.geographicToWebMercator(_581.geometry):_581.geometry,_584=_583.spatialReference,_585=_581.getDojoShape(),_586=_585.getTransform(),_587=_581.getLayer()._div.getTransform();_583=_583.toJson();this._updateSegments(_583.paths||_583.rings,_586,_587,_584);_585.setTransform(null);_583=_546.fromJson(_583);_581.setGeometry(_582._geo?_545.webMercatorToGeographic(_583,true):_583);this._draw();this._startBox=this._moveBox=this._xfactor=this._yfactor=null;this._startLine=this._moveLine=null;_582._endOperation("BOX");this._defaultEventArgs.transform=_586;_582["on"+(_580.host._index===8?this._rotateEvent:this._scaleEvent)+"Stop"](this._graphic,this._defaultEventArgs);},_updateSegments:function(_588,_589,_58a,_58b){var mx=_540,map=this._map,_58c=this._wrapOffset||0;_53c.forEach(_588,function(_58d){_53c.forEach(_58d,function(_58e){var _58f=map.toScreen({x:_58e[0],y:_58e[1],spatialReference:_58b},true);_58f.x+=_58c;_58f=mx.multiplyPoint([_58a,_589,mx.invert(_58a)],_58f);_58f.x-=_58c;var _590=map.toMap(_58f);_58e[0]=_590.x;_58e[1]=_590.y;});});},_getAngle:function(_591,_592){var _593=Math.atan2(_591[0].y-_591[1].y,_591[0].x-_591[1].x)*180/Math.PI,_594=Math.atan2(_592[0].y-_592[1].y,_592[0].x-_592[1].x)*180/Math.PI;return _594-_593;}});if(has("extend-esri")){lang.setObject("toolbars._Box",BOX,_541);}return BOX;});},"dijit/_editor/plugins/TextColor":function(){define("dijit/_editor/plugins/TextColor",["require","dojo/colors","dojo/_base/declare","dojo/_base/lang","../_Plugin","../../form/DropDownButton"],function(_595,_596,_597,lang,_598,_599){var _59a=_597("dijit._editor.plugins.TextColor",_598,{buttonClass:_599,useDefaultCommand:false,_initButton:function(){this.inherited(arguments);var self=this;this.button.loadDropDown=function(_59b){_595(["../../ColorPalette"],lang.hitch(this,function(_59c){this.dropDown=new _59c({dir:self.editor.dir,ownerDocument:self.editor.ownerDocument,value:self.value,onChange:function(_59d){self.editor.execCommand(self.command,_59d);}});_59b();}));};},updateState:function(){var _59e=this.editor;var _59f=this.command;if(!_59e||!_59e.isLoaded||!_59f.length){return;}if(this.button){var _5a0=this.get("disabled");this.button.set("disabled",_5a0);if(_5a0){return;}var _5a1;try{_5a1=_59e.queryCommandValue(_59f)||"";}catch(e){_5a1="";}}if(_5a1==""){_5a1="#000000";}if(_5a1=="transparent"){_5a1="#ffffff";}if(typeof _5a1=="string"){if(_5a1.indexOf("rgb")>-1){_5a1=_596.fromRgb(_5a1).toHex();}}else{_5a1=((_5a1&255)<<16)|(_5a1&65280)|((_5a1&16711680)>>>16);_5a1=_5a1.toString(16);_5a1="#000000".slice(0,7-_5a1.length)+_5a1;}this.value=_5a1;var _5a2=this.button.dropDown;if(_5a2&&_5a1!==_5a2.get("value")){_5a2.set("value",_5a1,false);}}});_598.registry["foreColor"]=function(){return new _59a({command:"foreColor"});};_598.registry["hiliteColor"]=function(){return new _59a({command:"hiliteColor"});};return _59a;});},"esri/dijit/editing/tools/ButtonToolBase":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","dijit/form/Button","esri/dijit/editing/tools/ToolBase","esri/kernel"],function(_5a3,lang,has,_5a4,_5a5,_5a6){var BTB=_5a3([_5a4,_5a5],{declaredClass:"esri.dijit.editing.tools.ButtonToolBase",postCreate:function(){this.inherited(arguments);if(this._setShowLabelAttr){this._setShowLabelAttr(false);}},destroy:function(){_5a4.prototype.destroy.apply(this,arguments);_5a5.prototype.destroy.apply(this,arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.ButtonToolBase",BTB,_5a6);}return BTB;});},"dojo/hccss":function(){define(["require","./_base/config","./dom-class","./dom-style","./has","./ready","./_base/window"],function(_5a7,_5a8,_5a9,_5aa,has,_5ab,win){has.add("highcontrast",function(){var div=win.doc.createElement("div");div.style.cssText="border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;"+"background-image: url("+(_5a8.blankGif||_5a7.toUrl("./resources/blank.gif"))+");";win.body().appendChild(div);var cs=_5aa.getComputedStyle(div),_5ac=cs.backgroundImage,hc=(cs.borderTopColor==cs.borderRightColor)||(_5ac&&(_5ac=="none"||_5ac=="url(invalid-url:)"));if(has("ie")<=8){div.outerHTML="";}else{win.body().removeChild(div);}return hc;});_5ab(90,function(){if(has("highcontrast")){_5a9.add(win.body(),"dj_a11y");}});return has;});},"esri/dijit/editing/tools/Editing":function(){define("esri/dijit/editing/tools/Editing",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/layers/FeatureTemplate","esri/dijit/editing/tools/Edit","esri/dijit/editing/tools/EditingTools","esri/dijit/editing/tools/DropDownToolBase","esri/kernel","esri/lang"],function(_5ad,lang,_5ae,has,_5af,Edit,_5b0,_5b1,_5b2,_5b3){var _5b4=_5ad([_5b1],{declaredClass:"esri.dijit.editing.tools.Editing",_enabled:false,deactivate:function(){if(!this._enabled){return;}this._enabled=false;this.inherited(arguments);this._settings.templatePicker.clearSelection();},onItemClicked:function(_5b5,evt){this.inherited(arguments);if(this._activeTool===this._tools.AUTOCOMPLETE){this._settings.editor._drawingTool=_5af.TOOL_AUTO_COMPLETE_POLYGON;}},_activateTool:function(_5b6,_5b7){var i;this.enable(_5b7);for(i in this._tools){if(this._tools.hasOwnProperty(i)){this.dropDown.removeChild(this._tools[i]);if(this._tools[i]._enabled===true){this.dropDown.addChild(this._tools[i]);}}}if(this._geometryType!==_5b7||this._activeTool._enabled===false){this._activeTool=this._tools[_5b6.toUpperCase()];}this._geometryType=_5b7;this._activeTool.activate();this._activeTool.setChecked(true);this._updateUI();},_initializeTool:function(_5b8){this.inherited(arguments);this._initializeTools();},_initializeTools:function(){var _5b9=this._settings.layers;var _5ba=this._settings.editor;var _5bb=false,line=false,poly=false;var _5bc=this._toolTypes=[];var _5bd;_5ae.forEach(_5b9,function(_5be){_5bd=_5be.geometryType;_5bb=_5bb||_5bd==="esriGeometryPoint";line=line||_5bd==="esriGeometryPolyline";poly=poly||_5bd==="esriGeometryPolygon";_5bc=_5bc.concat(_5ae.map(this._getTemplatesFromLayer(_5be),lang.hitch(this,function(_5bf){return _5ba._toDrawTool(_5bf.drawingTool,_5be);})));},this);var _5c0=this._settings.createOptions;if(_5bb){this._toolTypes.push("point");}if(line){this._toolTypes=this._toolTypes.concat(_5c0.polylineDrawTools);}if(poly){this._toolTypes=this._toolTypes.concat(_5c0.polygonDrawTools);}this._toolTypes=this._toUnique(this._toolTypes.concat(_5bc));},_toUnique:function(arr){var test={};return _5ae.filter(arr,function(val){return test[val]?false:(test[val]=true);});},_getTemplatesFromLayer:function(_5c1){var _5c2=_5c1.templates||[];var _5c3=_5c1.types;_5ae.forEach(_5c3,function(type){_5c2=_5c2.concat(type.templates);});return _5ae.filter(_5c2,_5b3.isDefined);},_createTools:function(){_5ae.forEach(this._toolTypes,this._createTool,this);this.inherited(arguments);},_createTool:function(_5c4){var _5c5=lang.mixin(_5b0[_5c4],{settings:this._settings,onClick:lang.hitch(this,"onItemClicked",_5b0[_5c4].id)});this._tools[_5c4.toUpperCase()]=new Edit(_5c5);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Editing",_5b4,_5b2);}return _5b4;});},"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","esri/kernel","esri/lang","esri/domUtils","esri/layers/InheritedDomain","esri/layers/FeatureLayer","dojo/i18n!esri/nls/jsapi","dojo/fx","dojox/gfx","dijit/_Widget","dijit/_Templated","dijit/Editor","dijit/_editor/plugins/LinkDialog","dijit/_editor/plugins/TextColor","esri/dijit/_EventedWidget","esri/dijit/editing/AttachmentEditor","esri/dijit/editing/Util","esri/tasks/query","dijit/form/DateTextBox","dijit/form/TextBox","dijit/form/NumberTextBox","dijit/form/FilteringSelect","dijit/form/NumberSpinner","dijit/form/Button","dijit/form/SimpleTextarea","dijit/Tooltip","dojo/data/ItemFileReadStore","dojox/date/islamic","dojox/date/islamic/Date","dojox/date/islamic/locale","dojo/text!esri/dijit/templates/AttributeInspector.html"],function(_5c6,lang,_5c7,_5c8,_5c9,_5ca,has,_5cb,_5cc,_5cd,_5ce,_5cf,_5d0,_5d1,_5d2,fx,gfx,_5d3,_5d4,_5d5,_5d6,_5d7,_5d8,_5d9,Util,_5da,_5db,_5dc,_5dd,_5de,_5df,_5e0,_5e1,_5e2,_5e3,_5e4,_5e5,_5e6,_5e7){var ATI=_5c6([_5d8,_5d3,_5d4],{declaredClass:"esri.dijit.AttributeInspector",widgetsInTemplate:true,templateString:_5e7,_navMessage:"( ${idx} ${of} ${numFeatures} )",onUpdate:function(){},onDelete:function(){},onAttributeChange:function(){},onNext:function(){},onReset:function(){},onCancel:function(){},_eventMap:{"update":true,"delete":["feature"],"attribute-change":["feature","fieldName","fieldValue"],"next":["feature"],"reset":true,"cancel":true},constructor:function(_5e8,_5e9){lang.mixin(this,_5d2.widgets.attributeInspector);_5e8=_5e8||{};if(!_5e8.featureLayer&&!_5e8.layerInfos){console.error("esri.AttributeInspector: please provide correct parameter in the constructor");}this._datePackage=this._getDatePackage(_5e8);this._layerInfos=_5e8.layerInfos||[{featureLayer:_5e8.featureLayer,options:_5e8.options||[]}];this._aiConnects=[];this._selection=[];this._toolTips=[];this._numFeatures=0;this._featureIdx=0;this._currentLInfo=null;this._currentFeature=null;this._hideNavButtons=_5e8.hideNavButtons||false;},postCreate:function(){if(_5c7.every(this._layerInfos,function(_5ea){return _5ea.featureLayer.loaded;})){this._initLayerInfos();this._createAttachmentEditor();this.onFirstFeature();}else{var _5eb=this._layerInfos.length;_5c7.forEach(this._layerInfos,function(_5ec){var _5ed=_5ec.featureLayer;if(_5ed.loaded){_5eb--;}else{var _5ee=_5c8.connect(_5ed,"onLoad",this,function(_5ef){_5c8.disconnect(_5ee);_5ee=null;_5eb--;if(!_5eb){this._initLayerInfos();this._createAttachmentEditor();this.onFirstFeature();}});}},this);}},destroy:function(){this._destroyAttributeTable();_5c7.forEach(this._aiConnects,_5c8.disconnect);delete this._aiConnects;if(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(_5f0,_5f1){if(_5f1){this._createOnlyFirstTime=true;}this._updateSelection([_5f0],_5f1);this._updateUI();},onLayerSelectionChange:function(_5f2,_5f3,_5f4){this._createOnlyFirstTime=false;this._featureIdx=(_5f4===_5d1.SELECTION_NEW)?0:this._featureIdx;this._updateSelection();this._updateUI();},onLayerSelectionClear:function(){if(!this._selection||this._selection.length<=0){return;}this._numFeatures=0;this._featureIdx=0;this._selection=[];this._currentFeature=null;this._currentLInfo=null;this._updateUI();},onLayerEditsComplete:function(_5f5,adds,_5f6,_5f7){_5f7=_5f7||[];if(_5f7.length){var _5f8=this._selection;var _5f9=_5f5.featureLayer.objectIdField;_5c7.forEach(_5f7,lang.hitch(this,function(del){_5c7.some(_5f8,lang.hitch(this,function(item,idx){if(item.attributes[_5f9]!==del.objectId){return false;}this._selection.splice(idx,1);return true;}));}));}adds=adds||[];if(adds.length){this._selection=Util.findFeatures(adds,_5f5.featureLayer);this._featureIdx=0;}var _5fa=this._numFeatures=this._selection?this._selection.length:0;if(adds.length){var _5fb=_5fa?this._selection[this._featureIdx]:null;if(_5fb){var _5fc=_5fb.getLayer();var _5fd=_5fc.getEditCapabilities();if(!(_5fd.canCreate&&!_5fd.canUpdate)){this._showFeature(_5fb);}}}this._updateUI();},onFieldValueChange:function(_5fe,_5ff){_5ff=(typeof _5ff==="undefined")?null:_5ff;var _600=_5fe.field;if(_600.type==="esriFieldTypeDate"){_5ff=(_5ff&&_5ff.getTime)?_5ff.getTime():(_5ff&&_5ff.toGregorian?_5ff.toGregorian().getTime():_5ff);}if(this._currentFeature.attributes[_600.name]===_5ff){return;}var _601=this._currentLInfo;var _602=this._currentFeature;var _603=_600.name;if(_603===_601.typeIdField){var type=this._findFirst(_601.types,"id",_5ff);var _604=_601.fieldInfos;_5c7.forEach(_604,function(_605){_600=_605.field;if(!_600||_600.name===_601.typeIdField){return;}var node=_605.dijit;var _606=this._setFieldDomain(node,type,_600);if(_606&&node){this._setValue(node,_602.attributes[_600.name]+"");if(node.isValid()===false){this._setValue(node,null);}}},this);}this.onAttributeChange(_602,_603,_5ff);},onDeleteBtn:function(evt){this._deleteFeature();},onNextFeature:function(evt){this._onNextFeature(1);},onPreviousFeature:function(evt){this._onNextFeature(-1);},onFirstFeature:function(evt){this._onNextFeature(this._featureIdx*-1);},onLastFeature:function(evt){this._onNextFeature((this._numFeatures-1)-this._featureIdx);},_initLayerInfos:function(){var _607=this._layerInfos;this._editorTrackingInfos={};_5c7.forEach(_607,this._initLayerInfo,this);},_initLayerInfo:function(_608){var _609=_608.featureLayer,_60a,_60b;this._userIds={};var _60c=_609.id;if(_609.credential){this._userIds[_60c]=_609.credential.userId;}if(_608.userId){this._userIds[_60c]=_608.userId;}this._connect(_609,"onSelectionComplete",lang.hitch(this,"onLayerSelectionChange",_608));this._connect(_609,"onSelectionClear",lang.hitch(this,"onLayerSelectionClear",_608));this._connect(_609,"onEditsComplete",lang.hitch(this,"onLayerEditsComplete",_608));_608.showAttachments=_609.hasAttachments?(_5ce.isDefined(_608.showAttachments)?_608.showAttachments:true):false;_608.hideFields=_608.hideFields||[];_608.htmlFields=_608.htmlFields||[];_608.isEditable=_609.isEditable()?(_5ce.isDefined(_608.isEditable)?_608.isEditable:true):false;_608.typeIdField=_609.typeIdField;_608.layerId=_609.id;_608.types=_609.types;if(_609.globalIdField){_60a=this._findFirst(_608.fieldInfos,"fieldName",_609.globalIdField);if(!_60a&&!_608.showGlobalID){_608.hideFields.push(_609.globalIdField);}}_60b=this._findFirst(_608.fieldInfos,"fieldName",_609.objectIdField);if(!_60b&&!_608.showObjectID){_608.hideFields.push(_609.objectIdField);}var _60d=this._getFields(_608.featureLayer);if(!_60d){return;}var _60e=_608.fieldInfos||[];_60e=_5c7.map(_60e,function(_60f){return lang.mixin({},_60f);});if(!_60e.length){_60d=_5c7.filter(_60d,lang.hitch(this,function(_610){return !this._isInFields(_610.name,_608.hideFields);}));_608.fieldInfos=_5c7.map(_60d,lang.hitch(this,function(_611){var _612=(this._isInFields(_611.name,_608.htmlFields)?ATI.STRING_FIELD_OPTION_RICHTEXT:ATI.STRING_FIELD_OPTION_TEXTBOX);return {"fieldName":_611.name,"field":_611,"stringFieldOption":_612};}));}else{_608.fieldInfos=_5c7.filter(_5c7.map(_60e,lang.hitch(this,function(_613){var _614=_613.stringFieldOption||(this._isInFields(_613.fieldName,_608.htmlFields)?ATI.STRING_FIELD_OPTION_RICHTEXT:ATI.STRING_FIELD_OPTION_TEXTBOX);return lang.mixin(_613,{"field":this._findFirst(_60d,"name",_613.fieldName),"stringFieldOption":_614});})),"return item.field;");}if(_608.showGlobalID&&!_60a){_60e.push(this._findFirst(_60d,"name",_609.globalIdField));}if(_608.showObjectID&&!_60b){_60e.push(this._findFirst(_60d,"name",_609.objectIdField));}var _615=[];if(_609.editFieldsInfo){if(_609.editFieldsInfo.creatorField){_615.push(_609.editFieldsInfo.creatorField);}if(_609.editFieldsInfo.creationDateField){_615.push(_609.editFieldsInfo.creationDateField);}if(_609.editFieldsInfo.editorField){_615.push(_609.editFieldsInfo.editorField);}if(_609.editFieldsInfo.editDateField){_615.push(_609.editFieldsInfo.editDateField);}}this._editorTrackingInfos[_609.id]=_615;},_createAttachmentEditor:function(){this._attachmentEditor=null;var _616=this._layerInfos;var _617=_5c7.filter(_616,function(item){return item.showAttachments;});if(!_617||!_617.length){return;}this._attachmentEditor=new _5d9({"class":"atiAttachmentEditor"},this.attachmentEditor);this._attachmentEditor.startup();},_setCurrentLInfo:function(_618){var _619=this._currentLInfo?this._currentLInfo.featureLayer:null;var _61a=_618.featureLayer;if(_619&&_619.id===_61a.id&&!_619.ownershipBasedAccessControlForFeatures){var _61b=_61a.getEditCapabilities();if(!(_61b.canCreate&&!_61b.canUpdate)){return;}}this._currentLInfo=_618;this._createTable();},_updateSelection:function(_61c,_61d){this._selection=_61c||[];var _61e=this._layerInfos;_5c7.forEach(_61e,this._getSelection,this);var _61f=this._numFeatures=this._selection.length;var _620=_61f?this._selection[this._featureIdx]:null;this._showFeature(_620,_61d);},_getSelection:function(_621){var _622=_621.featureLayer.getSelectedFeatures();this._selection=this._selection.concat(_622);},_updateUI:function(){var _623=this._numFeatures;var _624=this._currentLInfo;this.layerName.innerHTML=(!_624||_623===0)?this.NLS_noFeaturesSelected:(_624.featureLayer?_624.featureLayer.name:"");_5cb.set(this.attributeTable,"display",_623?"":"none");_5cb.set(this.editButtons,"display",_623?"":"none");_5cb.set(this.navButtons,"display",(!this._hideNavButtons&&(_623>1)?"":"none"));this.navMessage.innerHTML=_5ce.substitute({idx:this._featureIdx+1,of:this.NLS_of,numFeatures:this._numFeatures},this._navMessage);if(this._attachmentEditor){_5cb.set(this._attachmentEditor.domNode,"display",((_624&&_624.showAttachments)&&_623)?"":"none");}var _625=((_624&&_624.showDeleteButton===false)||!this._canDelete)?false:true;_5cb.set(this.deleteBtn.domNode,"display",_625?"":"none");if(this.domNode.parentNode&&this.domNode.parentNode.scrollTop>0){this.domNode.parentNode.scrollTop=0;}},_onNextFeature:function(_626){this._featureIdx+=_626;if(this._featureIdx<0){this._featureIdx=this._numFeatures-1;}else{if(this._featureIdx>=this._numFeatures){this._featureIdx=0;}}var _627=this._selection.length?this._selection[this._featureIdx]:null;this._showFeature(_627);this._updateUI();this.onNext(_627);},_deleteFeature:function(){this.onDelete(this._currentFeature);},_showFeature:function(_628,_629){if(!_628){return;}this._currentFeature=_628;var _62a=_629?_629:_628.getLayer();var _62b=_62a.getEditCapabilities({feature:_628,userId:this._userIds[_62a.id]});this._canUpdate=_62b.canUpdate;this._canDelete=_62b.canDelete;var _62c=this._getLInfoFromFeatureLayer(_62a);if(!_62c){return;}this._setCurrentLInfo(_62c);var _62d=_628.attributes;var type=this._findFirst(_62c.types,"id",_62d[_62c.typeIdField]);var node,_62e=null;var _62f=_62c.fieldInfos;_5c7.forEach(_62f,function(_630){_62e=_630.field;node=_630.dijit||null;if(!node){return;}var _631=this._setFieldDomain(node,type,_62e);var _632=_62d[_62e.name];_632=(_632&&_631&&_631.codedValues&&_631.codedValues.length)?(_631.codedValues[_632]?_631.codedValues[_632].name:_632):_632;if(!_5ce.isDefined(_632)){_632="";}if(node.declaredClass==="dijit.form.DateTextBox"){_632=(_632==="")?null:new Date(_632);}else{if(node.declaredClass==="dijit.form.FilteringSelect"){node._lastValueReported=null;_632=_62d[_62e.name]+"";}}try{this._setValue(node,_632);if(node.declaredClass==="dijit.form.FilteringSelect"&&node.isValid()===false){this._setValue(node,null);}}catch(error){node.set("displayedValue",this.NLS_errorInvalid,false);}},this);if(this._attachmentEditor&&_62c.showAttachments){this._attachmentEditor.showAttachments(this._currentFeature);}var _633=_62a.getEditSummary(_628);if(_633){this.editorTrackingInfoDiv.innerHTML=_633;_5cf.show(this.editorTrackingInfoDiv);}else{_5cf.hide(this.editorTrackingInfoDiv);}},_setFieldDomain:function(node,type,_634){if(!node){return null;}var _635=_634.domain;if(type&&type.domains){if(type.domains[_634.name]&&type.domains[_634.name] instanceof _5d0===false){_635=type.domains[_634.name];}}if(!_635){return null;}if(_635.codedValues&&_635.codedValues.length>0){node.set("store",this._toStore(_5c7.map(_635.codedValues,function(item){return {id:item.code+="",name:item.name};})));this._setValue(node,_635.codedValues[0].code);}else{node.constraints={min:_5ce.isDefined(_635.minValue)?_635.minValue:Number.MIN_VALUE,max:_5ce.isDefined(_635.maxValue)?_635.maxValue:Number.MAX_VALUE};this._setValue(node,node.constraints.min);}return _635;},_setValue:function(node,_636){if(!node.set){return;}node._onChangeActive=false;node.set("value",_636,true);node._onChangeActive=true;},_getFields:function(_637){var _638=_637._getOutFields();if(!_638){return null;}var _639=_637.fields;return (_638=="*")?_639:_5c7.filter(_5c7.map(_638,lang.hitch(this,"_findFirst",_639,"name")),_5ce.isDefined);},_isInFields:function(_63a,_63b){if(!_63a||!_63b&&!_63b.length){return false;}return _5c7.some(_63b,function(name){return name.toLowerCase()===_63a.toLowerCase();});},_findFirst:function(_63c,_63d,_63e){var _63f=_5c7.filter(_63c,function(item){return item.hasOwnProperty(_63d)&&item[_63d]===_63e;});return (_63f&&_63f.length)?_63f[0]:null;},_getLInfoFromFeatureLayer:function(_640){var _641=_640?_640.id:null;return this._findFirst(this._layerInfos,"layerId",_641);},_createTable:function(){this._destroyAttributeTable();this.attributeTable.innerHTML="";this._attributes=_5cc.create("table",{cellspacing:"0",cellpadding:"0"},this.attributeTable);var _642=_5cc.create("tbody",null,this._attributes);var _643=this._currentFeature;var _644=this._currentLInfo;var type=this._findFirst(_644.types,"id",_643.attributes[_644.typeIdField]);var _645=_644.fieldInfos;_5c7.forEach(_645,lang.hitch(this,"_createField",type,_642),this);this._createOnlyFirstTime=false;},_createField:function(type,_646,_647){var _648=this._currentLInfo;var _649=_647.field;if(this._isInFields(_649.name,_648.hideFields)){return;}if(this._isInFields(_649.name,this._editorTrackingInfos[_648.featureLayer.id])){return;}var node=_5cc.create("tr",null,_646);var td=_5cc.create("td",{innerHTML:_647.label||_649.alias||_649.name,"class":"atiLabel"},node);td=_5cc.create("td",null,node);var _64a=null;var _64b=false;if(_647.customField){_5cc.place(_647.customField.domNode||_647.customField,_5cc.create("div",null,td),"first");_64a=_647.customField;}else{if(_648.isEditable===false||_649.editable===false||_647.isEditable===false||_649.type==="esriFieldTypeOID"||_649.type==="esriFieldTypeGlobalID"||(!this._canUpdate&&!this._createOnlyFirstTime)){_64b=true;}}if(!_64a&&(_648.typeIdField&&_649.name.toLowerCase()==_648.typeIdField.toLowerCase())){_64a=this._createTypeField(_649,_647,td);}else{if(!_64a){_64a=this._createDomainField(_649,_647,type,td);}}if(!_64a){switch(_649.type){case "esriFieldTypeString":_64a=this._createStringField(_649,_647,td);break;case "esriFieldTypeDate":_64a=this._createDateField(_649,_647,td);break;case "esriFieldTypeInteger":case "esriFieldTypeSmallInteger":_64a=this._createIntField(_649,_647,td);break;case "esriFieldTypeSingle":case "esriFieldTypeDouble":_64a=this._createFltField(_649,_647,td);break;default:_64a=this._createStringField(_649,_647,td);break;}}if(_647.tooltip&&_647.tooltip.length){this._toolTips.push(new _5e2({connectId:[_64a.id],label:_647.tooltip}));}_64a.onChange=lang.hitch(this,"onFieldValueChange",_647);_64a.set("disabled",_64b);_647.dijit=_64a;},_createTypeField:function(_64c,_64d,node){return new _5de({"class":"atiField",name:_64c.alias||_64c.name,store:this._toStore(_5c7.map(this._currentLInfo.types,function(item){return {id:item.id,name:item.name};})),searchAttr:"name"},_5cc.create("div",null,node));},_createDomainField:function(_64e,_64f,type,node){var _650=_64e.domain;if(type&&type.domains){if(type.domains[_64e.name]&&type.domains[_64e.name] instanceof _5d0===false){_650=type.domains[_64e.name];}}if(!_650){return null;}if(_650.codedValues){return new _5de({"class":"atiField",name:_64e.alias||_64e.name,searchAttr:"name",required:_64e.nullable||false},_5cc.create("div",null,node));}else{return new _5df({"class":"atiField"},_5cc.create("div",null,node));}},_createStringField:function(_651,_652,node){var _653={"class":"atiField",trim:true,maxLength:_651.length};if(_652.stringFieldOption===ATI.STRING_FIELD_OPTION_TEXTAREA){_653["class"]+=" atiTextAreaField";return new _5e1(_653,_5cc.create("div",null,node));}else{if(_652.stringFieldOption===ATI.STRING_FIELD_OPTION_RICHTEXT){_653["class"]+=" atiRichTextField";_653.height="100%";_653.width="100%";_653.plugins=_652.richTextPlugins||["bold","italic","underline","foreColor","hiliteColor","|","justifyLeft","justifyCenter","justifyRight","justifyFull","|","insertOrderedList","insertUnorderedList","indent","outdent","|","createLink"];return new _5d5(_653,_5cc.create("div",null,node));}else{return new _5dc(_653,_5cc.create("div",null,node));}}},_createDateField:function(_654,_655,node){var _656={"class":"atiField","trim":true};if(this._datePackage){_656.datePackage=this._datePackage;}return new _5db(_656,_5cc.create("div",null,node));},_createIntField:function(_657,_658,node){return new _5dd({"class":"atiField",constraints:{places:0},invalidMessage:this.NLS_validationInt,trim:true},_5cc.create("div",null,node));},_createFltField:function(_659,_65a,node){return new _5dd({"class":"atiField",trim:true,invalidMessage:this.NLS_validationFlt},_5cc.create("div",null,node));},_toStore:function(_65b){return new _5e3({data:{identifier:"id",label:"name",items:_65b}});},_connect:function(node,evt,func){this._aiConnects.push(_5c8.connect(node,evt,func));},_getDatePackage:function(_65c){if(_65c.datePackage===null){return null;}else{if(_65c.datePackage){return _65c.datePackage;}else{if(_5ca.locale==="ar"){return "dojox.date.islamic";}}}return null;},_destroyAttributeTable:function(){var _65d=this._layerInfos;_5c7.forEach(_65d,function(_65e){var _65f=_65e.fieldInfos;_5c7.forEach(_65f,function(_660){var _661=_660.dijit;if(_661){_661._onChangeHandle=null;if(_660.customField){return;}if(_661.destroyRecursive){_661.destroyRecursive();}else{if(_661.destroy){_661.destroy();}}}_660.dijit=null;},this);},this);var _662=this._toolTips;_5c7.forEach(_662,function(item){item.destroy();delete item;});this._toolTips=[];if(this._attributes){_5cc.destroy(this._attributes);}}});lang.mixin(ATI,{STRING_FIELD_OPTION_RICHTEXT:"richtext",STRING_FIELD_OPTION_TEXTAREA:"textarea",STRING_FIELD_OPTION_TEXTBOX:"textbox"});if(has("extend-esri")){lang.setObject("dijit.AttributeInspector",ATI,_5cd);}return ATI;});},"esri/dijit/editing/tools/Cut":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","dojo/DeferredList","esri/graphicsUtils","esri/graphic","esri/tasks/query","esri/layers/FeatureLayer","esri/toolbars/draw","esri/dijit/editing/Cut","esri/dijit/editing/tools/ToggleToolBase","esri/kernel"],function(_663,lang,_664,_665,has,_666,_667,_668,_669,_66a,Draw,Cut,_66b,_66c){var _66d=_663([_66b],{declaredClass:"esri.dijit.editing.tools.Cut",id:"btnFeatureCut",_enabledIcon:"toolbarIcon cutIcon",_disabledIcon:"toolbarIcon cutIcon",_drawType:Draw.POLYLINE,_enabled:true,_label:"NLS_cutLbl",_cutConnects:[],activate:function(){this._cutConnects.push(_665.connect(this._toolbar,"onDrawEnd",this,"_onDrawEnd"));this.inherited(arguments);},deactivate:function(){this.inherited(arguments);_664.forEach(this._cutConnects,_665.disconnect);this._cutConnects=[];this._edits=[];},_onDrawEnd:function(_66e){var _66f=this._settings.layers;var _670=this._cutLayers=_664.filter(_66f,function(_671){return ((_671.geometryType==="esriGeometryPolygon")||(_671.geometryType==="esriGeometryPolyline")&&_671.visible&&_671._isMapAtVisibleScale());});this._cutConnects=this._cutConnects.concat(_664.map(_670,lang.hitch(this,function(_672){return _665.connect(_672,"onEditsComplete",lang.hitch(this,function(adds,_673,_674){if(this._settings.undoRedoManager){var _675=this._settings.undoRedoManager;_664.forEach(this._edits,lang.hitch(this,function(edit){_675.add(new Cut({featureLayer:edit.layer,addedGraphics:edit.adds,preUpdatedGraphics:edit.preUpdates,postUpdatedGraphics:edit.updates}));}),this);}this.onFinished();}));})));var _676=new _669();_676.geometry=_66e;_664.forEach(_670,function(_677,idx){this._settings.editor._selectionHelper.selectFeatures([_677],_676,_66a.SELECTION_NEW,lang.hitch(this,"_cutFeatures",_677,_676));},this);},_cutFeatures:function(_678,_679,_67a){if(!_67a||!_67a.length){return;}this._edits=[];var _67b=[];_67b.push(this._settings.geometryService.cut(_667.getGeometries(_67a),_679.geometry,lang.hitch(this,"_cutHandler",_678,_67a)));var _67c=new _666(_67b).addCallback(lang.hitch(this,function(){this.onApplyEdits(this._edits);}));},_cutHandler:function(_67d,_67e,_67f){var _680=[];var _681=[];var _682=_664.map(_67e,function(item){return new _668(lang.clone(item.toJson()));});var _683;var _684;_664.forEach(_67f.cutIndexes,function(_685,i){if(_683!=_685){_683=_685;_681.push(_67e[_685].setGeometry(_67f.geometries[i]));}else{_684=new _668(_67f.geometries[i],null,lang.mixin({},_67e[_685].attributes),null);_684.attributes[_67e[0].getLayer().objectIdField]=null;_680.push(_684);}},this);this._edits.push({layer:_67d,adds:_680,updates:_681,preUpdates:_682});}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Cut",_66d,_66c);}return _66d;});},"esri/dijit/editing/tools/Edit":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/dijit/editing/tools/MenuItemBase","esri/kernel"],function(_686,lang,has,_687,_688){var Edit=_686([_687],{declaredClass:"esri.dijit.editing.tools.Edit",enable:function(_689){this._enabled=_689===this._geomType;this.inherited(arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Edit",Edit,_688);}return Edit;});},"dijit/_OnDijitClickMixin":function(){define("dijit/_OnDijitClickMixin",["dojo/on","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/has","dojo/_base/unload","dojo/_base/window","./a11yclick"],function(on,_68a,keys,_68b,has,_68c,win,_68d){var ret=_68b("dijit._OnDijitClickMixin",null,{connect:function(obj,_68e,_68f){return this.inherited(arguments,[obj,_68e=="ondijitclick"?_68d:_68e,_68f]);}});ret.a11yclick=_68d;return ret;});},"dojo/dnd/autoscroll":function(){define(["../_base/lang","../sniff","../_base/window","../dom-geometry","../dom-style","../window"],function(lang,has,win,_690,_691,_692){var _693={};lang.setObject("dojo.dnd.autoscroll",_693);_693.getViewport=_692.getBox;_693.V_TRIGGER_AUTOSCROLL=32;_693.H_TRIGGER_AUTOSCROLL=32;_693.V_AUTOSCROLL_VALUE=16;_693.H_AUTOSCROLL_VALUE=16;var _694,doc=win.doc,_695=Infinity,_696=Infinity;_693.autoScrollStart=function(d){doc=d;_694=_692.getBox(doc);var html=win.body(doc).parentNode;_695=Math.max(html.scrollHeight-_694.h,0);_696=Math.max(html.scrollWidth-_694.w,0);};_693.autoScroll=function(e){var v=_694||_692.getBox(doc),html=win.body(doc).parentNode,dx=0,dy=0;if(e.clientX<_693.H_TRIGGER_AUTOSCROLL){dx=-_693.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-_693.H_TRIGGER_AUTOSCROLL){dx=Math.min(_693.H_AUTOSCROLL_VALUE,_696-html.scrollLeft);}}if(e.clientY<_693.V_TRIGGER_AUTOSCROLL){dy=-_693.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-_693.V_TRIGGER_AUTOSCROLL){dy=Math.min(_693.V_AUTOSCROLL_VALUE,_695-html.scrollTop);}}window.scrollBy(dx,dy);};_693._validNodes={"div":1,"p":1,"td":1};_693._validOverflow={"auto":1,"scroll":1};_693.autoScrollNodes=function(e){var b,t,w,h,rx,ry,dx=0,dy=0,_697,_698;for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in _693._validNodes)){var s=_691.getComputedStyle(n),_699=(s.overflow.toLowerCase() in _693._validOverflow),_69a=(s.overflowX.toLowerCase() in _693._validOverflow),_69b=(s.overflowY.toLowerCase() in _693._validOverflow);if(_699||_69a||_69b){b=_690.getContentBox(n,s);t=_690.position(n,true);}if(_699||_69a){w=Math.min(_693.H_TRIGGER_AUTOSCROLL,b.w/2);rx=e.pageX-t.x;if(has("webkit")||has("opera")){rx+=win.body().scrollLeft;}dx=0;if(rx>0&&rx<b.w){if(rx<w){dx=-w;}else{if(rx>b.w-w){dx=w;}}_697=n.scrollLeft;n.scrollLeft=n.scrollLeft+dx;}}if(_699||_69b){h=Math.min(_693.V_TRIGGER_AUTOSCROLL,b.h/2);ry=e.pageY-t.y;if(has("webkit")||has("opera")){ry+=win.body().scrollTop;}dy=0;if(ry>0&&ry<b.h){if(ry<h){dy=-h;}else{if(ry>b.h-h){dy=h;}}_698=n.scrollTop;n.scrollTop=n.scrollTop+dy;}}if(dx||dy){return;}}try{n=n.parentNode;}catch(x){n=null;}}_693.autoScroll(e);};return _693;});},"esri/tasks/TrimExtendParameters":function(){define("esri/tasks/TrimExtendParameters",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel"],function(_69c,lang,_69d,_69e,has,_69f){var _6a0=_69c(null,{declaredClass:"esri.tasks.TrimExtendParameters",polylines:null,trimExtendTo:null,extendHow:null,toJson:function(){var _6a1=_69d.map(this.polylines,function(geom){return geom.toJson();});var json={};json.polylines=_69e.toJson(_6a1);json.trimExtendTo=_69e.toJson(this.trimExtendTo.toJson());json.sr=_69e.toJson(this.polylines[0].spatialReference.toJson());json.extendHow=this.extendHow||0;return json;}});lang.mixin(_6a0,{DEFAULT_CURVE_EXTENSION:0,RELOCATE_ENDS:1,KEEP_END_ATTRIBUTES:2,NO_END_ATTRIBUTES:4,NO_EXTEND_AT_FROM:8,NO_EXTEND_AT_TO:16});if(has("extend-esri")){lang.setObject("tasks.TrimExtendParameters",_6a0,_69f);}return _6a0;});},"esri/dijit/editing/Editor":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/kernel","dojo/has","dojo/query","dojo/DeferredList","dojo/dom-class","dojo/dom-construct","dijit/_Widget","dijit/_Templated","esri/domUtils","esri/graphicsUtils","esri/geometry/Polyline","esri/geometry/Polygon","esri/graphic","esri/undoManager","esri/tasks/query","esri/layers/FeatureLayer","esri/layers/FeatureTemplate","esri/toolbars/draw","esri/toolbars/edit","esri/dijit/AttributeInspector","esri/dijit/editing/Util","esri/dijit/editing/Add","esri/dijit/editing/Update","esri/dijit/editing/Delete","esri/dijit/editing/toolbars/Drawing","esri/dijit/editing/SelectionHelper","esri/dijit/editing/TemplatePicker","esri/kernel","esri/config","dojo/i18n!esri/nls/jsapi","dojo/text!esri/dijit/editing/templates/Editor.html","dijit/ProgressBar","dojo/NodeList-dom"],function(_6a2,lang,_6a3,_6a4,_6a5,has,_6a6,_6a7,_6a8,_6a9,_6aa,_6ab,_6ac,_6ad,_6ae,_6af,_6b0,_6b1,_6b2,_6b3,_6b4,Draw,_6b5,_6b6,_6b7,Add,_6b8,_6b9,_6ba,_6bb,_6bc,_6bd,_6be,_6bf,_6c0){var _6c1=_6a2([_6aa,_6ab],{declaredClass:"esri.dijit.editing.Editor",widgetsInTemplate:true,templateString:_6c0,constructor:function(_6c2,_6c3){_6c2=_6c2||{};if(!_6c2.settings){console.error("Editor: please provide 'settings' parameter in the constructor");}if(!_6c2.settings.layerInfos){console.error("Editor: please provide 'layerInfos' parameter in the constructor");}this._settings=_6c2.settings;this._eConnects=[];},postCreate:function(){this._setDefaultOptions();var _6c4=this._settings.layerInfos;if(_6a3.every(_6c4,function(_6c5){return _6c5.featureLayer.loaded;})){this._initLayers();this._connectEvents();this._createWidgets();}else{var _6c6=_6c4.length;_6a3.forEach(_6c4,function(_6c7){var _6c8=_6c7.featureLayer;if(_6c8.loaded){_6c6--;}else{var _6c9=_6a4.connect(_6c8,"onLoad",this,function(_6ca){_6a4.disconnect(_6c9);_6c9=null;_6c6--;if(!_6c6){this._initLayers();this._connectEvents();this._createWidgets();}});}},this);}this._reset();this._enableMapClickHandler();},stopEditing:function(_6cb){this._updateCurrentFeature(lang.hitch(this,function(){this._clearSelection(false);_6cb&&_6cb();}));},destroy:function(){if(this.drawingToolbar){this.drawingToolbar.destroy();}if(this.attributeInspector){this.attributeInspector.destroy();}if(this.templatePicker){this.templatePicker.destroy();}if(this._selectionHelper){this._selectionHelper.destroy();}if(this._drawToolbar){this._drawToolbar.deactivate();}this._reset();this._disableMapClickHandler();_6a3.forEach(this._eConnects,_6a4.disconnect);_6a4.disconnect(this._dtConnect);_6a4.disconnect(this._templatePickerOnSelectionChangeEvent);this._layer=this._currentGraphic=this._activeType=this._activeTemplate=this._drawingTool=this._drawToolbar=this._editToolbar=this.drawingToolbar=this.attributeInspector=this.templatePicker=this.undoManager=null;if(this._settings.map.infoWindow&&this._settings.map.infoWindow.clearFeatures){this._settings.map.infoWindow.clearFeatures();}this.inherited(arguments);},_setDefaultOptions:function(){this._drawToolbar=this._settings.drawToolbar||new Draw(this._settings.map);this._settings.drawToolbar=this._drawToolbar;this._editToolbar=this._settings.editToolbar||new _6b5(this._settings.map);this._settings.editToolbar=this._editToolbar;this._settings.toolbarVisible=this._settings.toolbarVisible||false;this._settings.toolbarOptions=lang.mixin({reshapeVisible:false,cutVisible:false,mergeVisible:false},this._settings.toolbarOptions);this._settings.createOptions=lang.mixin({polylineDrawTools:[_6c1.CREATE_TOOL_POLYLINE],polygonDrawTools:[_6c1.CREATE_TOOL_POLYGON],editAttributesImmediately:true},this._settings.createOptions);this._settings.singleSelectionTolerance=this._settings.singleSelectionTolerance||3;this._settings.maxUndoRedoOperations=this._settings.maxUndoRedoOperations||10;this._settings.editor=this;this._usePopup=this._settings.usePopup=this._settings.map.infoWindow._setPagerCallbacks?true:false;this._datePackage=this._settings.datePackage;var _6cc=_6be.defaults;this._settings.geometryService=this._settings.geometryService||_6cc.geometryService;_6cc.geometryService=_6cc.geometryService||this._settings.geometryService;},_initLayers:function(){this._settings.layers=[];this._settings.userIds={};this._settings.createOnlyLayer={};var _6cd=this._settings.layerInfos;_6a3.forEach(_6cd,function(_6ce){if(_6ce.featureLayer&&_6ce.featureLayer.loaded){this._settings.layers.push(_6ce.featureLayer);var _6cf=_6ce.featureLayer.id;if(_6ce.featureLayer.credential){this._settings.userIds[_6cf]=_6ce.featureLayer.credential.userId;}if(_6ce.userId){this._settings.userIds[_6cf]=_6ce.userId;}var _6d0=_6ce.featureLayer.getEditCapabilities();if(_6d0.canCreate&&!_6d0.canUpdate){this._settings.createOnlyLayer[_6cf]=true;}else{this._settings.createOnlyLayer[_6cf]=false;}}},this);},_reset:function(){this._hideAttributeInspector();this._editToolbar.deactivate();this._editVertices=true;this._layer=null;this._currentGraphic=null;this._activeType=null;this._activeTemplate=null;this._drawingTool=null;this._attributeChanged=false;},_saveFeatureOnClient:function(_6d1){var _6d2=this.templatePicker.getSelected();var _6d3;if(_6d2.template){_6d3=_6d2.featureLayer.renderer.getSymbol(_6d2.template.prototype);}else{_6d3=_6d2.symbolInfo.symbol;}var _6d4=_6d2.featureLayer.fields;var att={};_6a3.forEach(_6d4,function(_6d5,idx){att[_6d5.name]=null;});this._tempGraphic=new _6b0(_6d1,_6d3,att,null);var map=this._settings.map;map.graphics.add(this._tempGraphic);var _6d6=this._findCenterPoint(_6d1);this._createAttributeInspector(true);map.infoWindow.setTitle(_6d2.featureLayer?_6d2.featureLayer.name:_6bf.widgets.attributeInspector.NLS_title);this.attributeInspector.showFeature(this._tempGraphic,_6d2.featureLayer);this._showInfoWindow(_6d6,map.getInfoWindowAnchor(_6d6));if(this._settings.createOnlyLayer[_6d2.featureLayer.id]){this._infoWindowHideEvent=_6a4.connect(map.infoWindow,"onHide",this,"_infoWindowHide");}_6a4.disconnect(this._templatePickerOnSelectionChangeEvent);this.templatePicker.clearSelection();this._drawToolbar.deactivate();this._enableMapClickHandler();if(this.drawingToolbar){this.drawingToolbar.deactivate();}this._templatePickerOnSelectionChangeEvent=_6a4.connect(this.templatePicker,"onSelectionChange",lang.hitch(this,"_onCreateFeature"));},_saveAttributesOnClient:function(_6d7,_6d8,_6d9){this._tempGraphic.attributes[_6d8]=(typeof (_6d9)==="number"&&isNaN(_6d9))?null:_6d9;},_infoWindowHide:function(){this._createFeature(this._tempGraphic.geometry,this._tempGraphic.attributes);_6a4.disconnect(this._infoWindowHideEvent);},_createFeature:function(_6da,_6db){this._editClickPoint=this._findCenterPoint(_6da);if(!_6da.rings){this._applyEdits([{layer:this._layer,adds:[this._createGraphic(_6da,_6db)]}]);return;}this._simplify(_6da,lang.hitch(this,function(_6dc){if(this._drawingTool!==_6b4.TOOL_AUTO_COMPLETE_POLYGON){this._applyEdits([{layer:this._layer,adds:[this._createGraphic(_6dc,_6db)]}]);}else{this._autoComplete(_6dc,lang.hitch(this,function(_6dd){if(_6dd&&_6dd.length){this._applyEdits([{layer:this._layer,adds:_6a3.map(_6dd,lang.hitch(this,function(_6de){return this._createGraphic(_6de,_6db);}))}]);}}));}}));},_updateCurrentFeature:function(_6df){var _6e0=this._isModified();if(_6e0){this._updateFeature(_6e0,_6df);}else{if(_6df){_6df(false);}}},_updateFeature:function(_6e1,_6e2){var geom=_6e1.geometry;if(!geom.rings){this._applyEdits([{layer:_6e1.getLayer(),updates:[_6e1]}],_6e2);}else{this._simplify(geom,lang.hitch(this,function(_6e3){this._applyEdits([{layer:_6e1.getLayer(),updates:[lang.mixin(_6e1,{geometry:_6e3})]}],_6e2);}));}},_deleteFeature:function(_6e4,_6e5){var _6e6=[];if(!_6e4){var _6e7=this._settings.layers;_6e6=_6a3.map(_6a3.filter(_6e7,function(_6e8){return _6e8.getSelectedFeatures().length>0;}),function(item){return {layer:item,deletes:item.getSelectedFeatures()};});if((!_6e6||!_6e6.length)&&this._currentGraphic){_6e6.push({layer:this._layer,deletes:[this._currentGraphic]});}}else{_6e6.push({layer:_6e4.getLayer(),deletes:[_6e4]});}this._applyEdits(_6e6,(_6e5));},_stopEditing:function(_6e9,adds,_6ea,_6eb){_6ac.hide(this.progressBar.domNode);this._undoRedoAdd();var _6ec;if(_6e9._isSelOnly===true){if(adds&&adds.length){this.templatePicker.clearSelection();var _6ed=new _6b2();_6ed.objectIds=[adds[0].objectId];if(!this._settings.createOnlyLayer[_6e9.id]){this._selectFeatures([_6e9],_6ed,lang.hitch(this,"_onEditFeature"));}else{this._settings.map.graphics.remove(this._tempGraphic);}}}else{_6ec=this._selectionHelper.findMapService(this._settings.map,_6e9);if(_6ec){_6ec.refresh();}if(adds&&adds.length){this.templatePicker.clearSelection();if(!this._settings.createOnlyLayer[_6e9.id]){_6b7.findFeatures(adds,_6e9,lang.hitch(this,"_onEditFeature"));}else{this._settings.map.graphics.remove(this._tempGraphic);}}}if(_6eb&&_6eb.length){this._clearSelection(true);if(this._undoRedo){_6ec=this._selectionHelper.findMapService(_6e9,this._settings.map);if(_6ec){_6ec.refresh();}}}if(this._undoRedo&&_6ea&&_6ea.length){_6ec=this._selectionHelper.findMapService(_6e9,this._settings.map);if(_6ec){_6ec.refresh();}this.attributeInspector.refresh();this._undoRedo=false;}if(this.drawingToolbar){this.drawingToolbar._updateUI();}this._undoRedo=false;},_undoRedoAdd:function(){this._settings._isApplyEditsCall=false;if(!this._settings.undoManager){return;}if(this._activeTool==="CUT"||this._activeTool==="UNION"){return;}var edit=(this._edits&&this._edits.length)?this._edits[0]:null;if(!edit){return;}var adds=edit.adds||[];var _6ee=edit.updates||[];var _6ef=edit.deletes||[];var _6f0={featureLayer:edit.layer};if(adds.length){this.undoManager.add(new Add(lang.mixin(_6f0,{addedGraphics:adds})));}else{if(_6ef.length){this.undoManager.add(new _6b9(lang.mixin(_6f0,{deletedGraphics:_6ef})));}else{if(_6ee.length){this.undoManager.add(new _6b8(lang.mixin(_6f0,{preUpdatedGraphics:[this._preUpdates],postUpdatedGraphics:_6ee})));}}}this._edits=null;this._preUpdates=null;},_activateDrawToolbar:function(_6f1){this._layer=_6f1.featureLayer;this._activeType=_6f1.type;this._activeTemplate=_6f1.template;this._drawingTool=this._activeTemplate?this._activeTemplate.drawingTool:null;this._drawTool=this._toDrawTool(this._drawingTool,_6f1.featureLayer);_6a4.disconnect(this._dtConnect);if(this._settings.createOnlyLayer[_6f1.featureLayer.id]){this._dtConnect=_6a4.connect(this._drawToolbar,"onDrawEnd",this,"_saveFeatureOnClient");}else{this._dtConnect=_6a4.connect(this._drawToolbar,"onDrawEnd",this,"_createFeature");}this._editToolbar.deactivate();this._disableMapClickHandler();if(!this.drawingToolbar){this._drawToolbar.activate(this._drawTool);}else{this.drawingToolbar.activateEditing(this._drawTool,this._layer);}},_activateEditToolbar:function(_6f2,info){var _6f3=_6f2.getLayer();var _6f4=_6f3?_6f3.geometryType:null;var _6f5=_6b5.MOVE;if(_6f4!=="esriGeometryPoint"&&this._isNotesFeature(_6f2)===true){_6f5=_6f5|_6b5.ROTATE|_6b5.SCALE;this._editVertices=false;}else{if(_6f4!=="esriGeometryPoint"&&this._editVertices===true){_6f5=_6f5|_6b5.ROTATE|_6b5.SCALE;this._editVertices=false;}else{_6f5=_6f5|_6b5.EDIT_VERTICES;this._editVertices=true;}}this._attributeChanged=this._isModified();this._preUpdates=new _6b0(lang.clone(_6f2.toJson()));var _6f6=_6f3.getEditCapabilities({feature:_6f2,userId:this._settings.userIds[_6f3.id]});var _6f7=_6a3.filter(this._settings.layerInfos,function(item){return item.featureLayer["layerId"]===_6f3.layerId;})[0];if(_6f6.canUpdate&&!_6f7.disableGeometryUpdate&&_6f3.allowGeometryUpdates){this._editToolbar.activate(_6f5,_6f2);}if(!this._settings.map.infoWindow.isShowing){var _6f8=(info&&info.screenPoint)||this._findCenterPoint(_6f2);this._showInfoWindow(_6f8,this._settings.map.getInfoWindowAnchor(_6f8));}},_createGraphic:function(_6f9,_6fa){var _6fb=(this._activeType&&this._activeType.symbol)||this._layer.defaultSymbol;var _6fc=new _6b0(_6f9,_6fb,_6fa);if(this._activeTemplate||_6fa){_6fc.attributes=_6fa||lang.mixin({},this._activeTemplate.prototype.attributes);}else{_6fc.attributes=_6fc.attributes||[];_6a3.forEach(this._layer.fields,function(_6fd){_6fc.attributes[_6fd.name]=null;},this);}return _6fc;},_connectEvents:function(){var _6fe=this._settings.layers;_6a3.forEach(_6fe,function(item){this._connect(item,"onEditsComplete",lang.hitch(this,"_stopEditing",item));},this);_6a3.forEach(_6fe,function(item){this._connect(item,"onBeforeApplyEdits",lang.hitch(this,function(){_6ac.show(this.progressBar.domNode);this._settings._isApplyEditsCall=true;}));},this);this._connect(this._editToolbar,"onGraphicClick",lang.hitch(this,"_activateEditToolbar"));this._connect(this._editToolbar,"onGraphicFirstMove",lang.hitch(this,"_hideAttributeInspector"));this._connect(this._editToolbar,"onVertexFirstMove",lang.hitch(this,"_hideAttributeInspector"));this._connect(this._editToolbar,"onScaleStart",lang.hitch(this,"_hideAttributeInspector"));this._connect(this._editToolbar,"onRotateStart",lang.hitch(this,"_hideAttributeInspector"));},_connect:function(node,evt,func){this._eConnects.push(_6a4.connect(node,evt,func));},_createWidgets:function(){this._selectionHelper=new _6bb(this._settings);this._createTemplatePicker();this._createAttributeInspector();this._createDrawingToolbar();this._createUndoRedoManager();},_createTemplatePicker:function(){if(!this._settings.templatePicker){var _6ff=_6a3.filter(this._settings.layers,function(item){return item.getEditCapabilities().canCreate;});this.templatePicker=new _6bc({"class":"esriTemplatePicker",featureLayers:_6ff,showTooltip:true,maxLabelLength:this._settings.typesCharacterLimit,columns:"auto",rows:"auto"},this.templatePickerDiv);this.templatePicker.startup();this._settings.templatePicker=this.templatePicker;}else{this.templatePicker=this._settings.templatePicker;_6ac.hide(this.templatePickerDiv);}this._templatePickerOnSelectionChangeEvent=_6a4.connect(this.templatePicker,"onSelectionChange",lang.hitch(this,"_onCreateFeature"));},_createAttributeInspector:function(_700){if(!this._settings.attributeInspector){this._customAttributeInspector=false;var map=this._settings.map;this.attributeInspector=new _6b6({layerInfos:this._settings.layerInfos,hideNavButtons:this._usePopup,datePackage:this._datePackage},_6a9.create("div"));this.attributeInspector.startup();map.infoWindow.setContent(this.attributeInspector.domNode);map.infoWindow.setTitle(_6bf.widgets.attributeInspector.NLS_title);map.infoWindow.resize(350,375);_6a5.query(".esriAttributeInspector .atiLayerName").style({display:"none"});}else{this._customAttributeInspector=true;this.attributeInspector=this._settings.attributeInspector;}this._connect(this.attributeInspector,"onDelete",lang.hitch(this,"_deleteFeature"));this._connect(this.attributeInspector,"onNext",lang.hitch(this,function(_701){this._updateCurrentFeature(lang.hitch(this,function(){this._attributeChanged=false;this._onEditFeature(_701);}));}));if(this._usePopup){this._settings.map.infoWindow._setPagerCallbacks(this.attributeInspector,lang.hitch(this.attributeInspector,"next"),lang.hitch(this.attributeInspector,"previous"));}if(_700){this._connect(this.attributeInspector,"onAttributeChange",lang.hitch(this,"_saveAttributesOnClient"));}else{this._connect(this.attributeInspector,"onAttributeChange",lang.hitch(this,function(_702,_703,_704){this._preUpdates=new _6b0(lang.clone(_702.toJson()));this._currentGraphic.attributes[_703]=(typeof (_704)==="number"&&isNaN(_704))?null:_704;this._updateFeature(this._currentGraphic,null);this._attributeChanged=false;}));}},_createDrawingToolbar:function(){if(this._settings.toolbarVisible===true){this.drawingToolbar=new _6ba({"class":"esriDrawingToolbar",drawToolbar:this._drawToolbar,editToolbar:this._editToolbar,settings:this._settings,onDelete:lang.hitch(this,"_deleteFeature"),onApplyEdits:lang.hitch(this,"_applyEdits"),onShowAttributeInspector:lang.hitch(this,"_onEditFeature")},this.drawingToolbarDiv);}},_createUndoRedoManager:function(){if(!this._settings.enableUndoRedo&&!this._settings.undoManager){return;}this._settings.enableUndoRedo=true;this.undoManager=this._settings.undoManager;if(!this.undoManager){this.undoManager=this._settings.undoManager=new _6b1({maxOperations:this._settings.maxUndoRedoOperations});}this._connect(document,"onkeypress",lang.hitch(this,function(evt){if(evt.metaKey||evt.ctrlKey){if(evt.charOrCode==="z"){this._undo();}if(evt.charOrCode==="y"){this._redo();}}}));},_enableMapClickHandler:function(){this._mapClickHandler=_6a4.connect(this._settings.map,"onClick",lang.hitch(this,function(evt){if(this._drawToolbar._geometryType){return;}if(this._activeTool==="SELECT"){this._activeTool="";return;}this._updateCurrentFeature(lang.hitch(this,function(){this._reset();this._updateSelection(evt);}));}));},_disableMapClickHandler:function(){_6a4.disconnect(this._mapClickHandler);},_onCreateFeature:function(){var _705=this.templatePicker.getSelected();if(_705){this._updateCurrentFeature(lang.hitch(this,function(){if(this._currentGraphic){this._clearSelection(false);}this._reset();this._activateDrawToolbar(_705);}));}else{this._reset();_6a4.disconnect(this._dtConnect);this._drawToolbar.deactivate();this._enableMapClickHandler();if(this.drawingToolbar){this.drawingToolbar.deactivate();}}},_onEditFeature:function(_706,_707){_706=(lang.isArray(_706)?_706[0]:_706)||null;if(!_706){return;}if(!this._customAttributeInspector){_707=_707||this._editClickPoint||this._findCenterPoint(_706);var _708=_706.getLayer();this._settings.map.infoWindow.setTitle(_708?_708.name:_6bf.widgets.attributeInspector.NLS_title);if(this.drawingToolbar||!this._settings.map.infoWindow.isShowing){this._showInfoWindow(_707,this._settings.map.getInfoWindowAnchor(_707));}this._editClickPoint=null;}if(_706===this._currentGraphic){return;}this._editVertices=true;this._layer=_706.getLayer();this._currentGraphic=_706;if(_706.getDojoShape()){_706.getDojoShape().moveToFront();}this._activateEditToolbar(_706);},_applyEdits:function(_709,_70a){_709=_709||[];if(_709.length<=0){return;}this._edits=_709;var _70b=_6a3.map(_709,function(edit){return edit.layer.applyEdits(edit.adds,edit.updates,edit.deletes);});this._deferredsList=new _6a7(_70b).addCallback(lang.hitch(this,function(){_6ac.hide(this.progressBar.domNode);if(_70a){_70a();}var map=this._settings.map;if(map&&map.infoWindow.reposition&&map.infoWindow.isShowing){map.infoWindow.reposition();}}));},_undo:function(){if(this._settings.undoManager&&!this._settings._isApplyEditsCall){this._editToolbar.deactivate();this._undoRedo=true;this._settings.undoManager.undo();}},_redo:function(){if(this._settings.undoManager&&!this._settings._isApplyEditsCall){this._editToolbar.deactivate();this._undoRedo=true;this._settings.undoManager.redo();}},_simplify:function(_70c,_70d){if(_6af.prototype.isSelfIntersecting(_70c)){this._settings.geometryService.simplify([_70c],function(_70e){var _70f=(_70e&&_70e.length)?_70e[0]:_70f;if(_70d){_70d(_70f);}});}else{if(_70d){_70d(_70c);}}},_autoComplete:function(_710,_711){var _712=this._getLayers("esriGeometryPolygon");var _713=new _6b2();_713.geometry=_710;_713.returnGeometry=true;this._selectFeatures(_712,_713,lang.hitch(this,function(_714){if(!_714||_714.length<=0){if(_711){_711([_710]);}}else{this._settings.geometryService.autoComplete(_6ad.getGeometries(_714),this._toPolylines([_713.geometry]),function(_715){if(_711){_711(_715);}});}}));},_getLayers:function(_716){var _717=this._settings.layers;return _6a3.filter(_717,function(_718){return _718.geometryType===_716;});},_selectFeatures:function(_719,_71a,_71b,mode){this._selectionHelper.selectFeatures(_719,_71a,mode||_6b3.SELECTION_NEW,_71b);},_updateSelection:function(evt){var _71c=evt.mapPoint;var _71d=evt.graphic;this._selectionHelper.selectFeaturesByGeometry(this._settings.layers,_71c,_6b3.SELECTION_NEW,lang.hitch(this,function(_71e){var _71f=_6a3.some(_71e,lang.hitch(this,function(item){return item==_71d;}));if(_71d&&!_71f){var _720=_71d.getLayer();if(this._isValidLayer(_720)){var _721=new _6b2();_721.objectIds=[_71d.attributes[_720.objectIdField]];this._selectionHelper.selectFeatures([_720],_721,_6b3.SELECTION_ADD,lang.hitch(this,function(_722){this._updatePopupButtons(_722);this._onEditFeature(_722,_71c);}));}else{this._clearSelection();}}else{if(_71e&&_71e.length){this._updatePopupButtons(_71e);this._onEditFeature(_71e,_71c);}else{this._clearSelection();}}}));},_updatePopupButtons:function(_723){if(!this._usePopup||!_723){return;}var _724=_723.length;var _725=[this._settings.map.infoWindow._prevFeatureButton,this._settings.map.infoWindow._nextFeatureButton];_6a3.forEach(_725,lang.hitch(this,function(item){(_724>1)?_6a8.remove(item,"hidden"):_6a8.add(item,"hidden");}));},_clearSelection:function(_726){this._selectionHelper.clearSelection(_726||false);this._reset();},_findCenterPoint:function(_727){var _728=_727.geometry||_727;var _729;switch(_728.type){case "point":_729=_728;break;case "polyline":var _72a=_728.paths[0].length;_729=_728.getPoint(0,Math.ceil(_72a/2));break;case "polygon":var _72b=_728.rings.length-1;var _72c=_728.rings[_72b].length-1;_729=_728.getPoint(_72b,_72c);break;}return this._settings.map.toScreen(_729);},_hideAttributeInspector:function(){if(!this._customAttributeInspector&&this._settings.map.infoWindow){this._settings.map.infoWindow.hide();}},_toPolylines:function(_72d){var _72e=_6a3.map(_72d,function(_72f){var _730=new _6ae(_72f.spatialReference);_6a3.forEach(_72f.rings,function(ring){_730.addPath(ring);});return _730;});return _72e;},_isNotesFeature:function(_731){var _732=_731.getLayer();var _733=_732?_732.types||null:null;if(!_733){return false;}var _734=_731.attributes[_732.typeIdField];var _735;_6a3.some(_733,function(type){if(type.id===_734){_735=type.templates;return true;}return false;});if(!_735){return false;}var _736=_735[0]||null;if(!_736){return false;}var _737=this._isShapeTool(_736.drawingTool)||null;return _737?true:false;},_isValidLayer:function(_738){var i;var _739=this._settings.layerInfos;for(i=0;i<_739.length;i++){var _73a=_739[i];if(_738.id==_73a.layerId){return true;}}return false;},_isShapeTool:function(_73b){switch(_73b){case _6b4.TOOL_ARROW:return Draw.ARROW;case _6b4.TOOL_LEFT_ARROW:return Draw.LEFT_ARROW;case _6b4.TOOL_RIGHT_ARROW:return Draw.RIGHT_ARROW;case _6b4.TOOL_UP_ARROW:return Draw.UP_ARROW;case _6b4.TOOL_DOWN_ARROW:return Draw.DOWN_ARROW;case _6b4.TOOL_CIRCLE:return Draw.CIRCLE;case _6b4.TOOL_ELLIPSE:return Draw.ELLIPSE;case _6b4.TOOL_TRIANGLE:return Draw.TRIANGLE;case _6b4.TOOL_RECTANGLE:return Draw.RECTANGLE;default:return null;}},_toDrawTool:function(_73c,_73d){var _73e=_73d.geometryType;switch(_73c){case _6b4.TOOL_POINT:return Draw.POINT;case _6b4.TOOL_ARROW:return Draw.ARROW;case _6b4.TOOL_LEFT_ARROW:return Draw.LEFT_ARROW;case _6b4.TOOL_RIGHT_ARROW:return Draw.RIGHT_ARROW;case _6b4.TOOL_UP_ARROW:return Draw.UP_ARROW;case _6b4.TOOL_DOWN_ARROW:return Draw.DOWN_ARROW;case _6b4.TOOL_CIRCLE:return Draw.CIRCLE;case _6b4.TOOL_ELLIPSE:return Draw.ELLIPSE;case _6b4.TOOL_TRIANGLE:return Draw.TRIANGLE;case _6b4.TOOL_RECTANGLE:return Draw.RECTANGLE;case _6b4.TOOL_LINE:return Draw.POLYLINE;case _6b4.TOOL_POLYGON:return Draw.POLYGON;case _6b4.TOOL_FREEHAND:if(_73e==="esriGeometryPolyline"){return Draw.FREEHAND_POLYLINE;}else{return Draw.FREEHAND_POLYGON;}break;default:var _73f=Draw.POINT;if(_73e==="esriGeometryPolyline"){_73f=Draw.POLYLINE;if(this._settings.createOptions.polylineDrawTools[0]===_6c1.CREATE_TOOL_FREEHAND_POLYLINE){_73f=Draw.FREEHAND_POLYLINE;}}else{if(_73e==="esriGeometryPolygon"){_73f=Draw.POLYGON;if(this._settings.createOptions.polygonDrawTools[0]===_6c1.CREATE_TOOL_FREEHAND_POLYGON){_73f=Draw.FREEHAND_POLYGON;}}}return _73f;}},_isModified:function(){var _740=this._editToolbar.getCurrentState();return ((_740.isModified||this._attributeChanged)&&_740.graphic)?_740.graphic:null;},_showInfoWindow:function(_741,_742){if(!this._customAttributeInspector){this._settings.map.infoWindow.show(_741,_742);}}});lang.mixin(_6c1,{CREATE_TOOL_POLYLINE:"polyline",CREATE_TOOL_FREEHAND_POLYLINE:"freehandpolyline",CREATE_TOOL_POLYGON:"polygon",CREATE_TOOL_FREEHAND_POLYGON:"freehandpolygon",CREATE_TOOL_AUTOCOMPLETE:"autocomplete",CREATE_TOOL_RECTANGLE:"rectangle",CREATE_TOOL_TRIANGLE:"triangle",CREATE_TOOL_CIRCLE:"circle",CREATE_TOOL_ELLIPSE:"ellipse",CREATE_TOOL_ARROW:"arrow",CREATE_TOOL_UP_ARROW:"uparrow",CREATE_TOOL_DOWN_ARROW:"downarrow",CREATE_TOOL_RIGHT_ARROW:"rightarrow",CREATE_TOOL_LEFT_ARROW:"leftarrow"});if(has("extend-esri")){lang.setObject("dijit.editing.Editor",_6c1,_6bd);}return _6c1;});},"esri/dijit/editing/tools/DropDownToolBase":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","dojo/dom-style","dijit/registry","dijit/Menu","dijit/form/ComboButton","esri/dijit/editing/tools/ToolBase","esri/kernel","esri/lang"],function(_743,lang,has,_744,_745,Menu,_746,_747,_748,_749){var DDTB=_743([_746,_747],{declaredClass:"esri.dijit.editing.tools.DropDownToolBase",_enabled:false,_checked:false,postCreate:function(){this._tools=[];this._createTools();this.inherited(arguments);if(this._setShowLabelAttr){this._setShowLabelAttr(false);}},destroy:function(){var tool;var _74a=this._tools;for(tool in _74a){if(_74a.hasOwnProperty(tool)&&_749.isDefined(_74a[tool])){_74a[tool].destroy();}}this.inherited(arguments);},_createTools:function(){var i;var mnu=new Menu();this.dropDown=mnu;for(i in this._tools){if(this._tools.hasOwnProperty(i)){mnu.addChild(this._tools[i]);}}this._activeTool=mnu.getChildren()[0];this._updateUI();},activate:function(_74b){this.inherited(arguments);if(!this._activeTool){this._activateDefaultTool();}else{this._activeTool.activate();}},deactivate:function(){this.inherited(arguments);if(this._activeTool){this._activeTool.deactivate();}},enable:function(_74c){var tool;for(tool in this._tools){if(this._tools.hasOwnProperty(tool)){this._tools[tool].enable(_74c);}}this.setEnabled(true);this.inherited(arguments);},setChecked:function(_74d){this._checked=_74d;this._updateUI();},_onDrawEnd:function(_74e){},onLayerChange:function(_74f,type,_750){this._activeTool=null;this._activeType=type;this._activeTemplate=_750;this._activeLayer=_74f;},onItemClicked:function(_751,evt){if(this._activeTool){this._activeTool.deactivate();}this._activeTool=_745.byId(_751);if(this._checked===false){this._onClick();}else{this._updateUI();if(this._activeTool){this._activeTool.activate();this._activeTool.setChecked(true);}}},_onClick:function(evt){if(this._enabled===false){return;}this._checked=!this._checked;this.inherited(arguments);},_updateUI:function(){this.attr("disabled",!this._enabled);_744.set(this.focusNode,{outline:"none"});_744.set(this.titleNode,{padding:"0px",border:"none"});if(this._checked){_744.set(this.titleNode,{backgroundColor:"#D4DFF2",border:"1px solid #316AC5"});}else{_744.set(this.titleNode,{backgroundColor:"",border:""});}if(this._activeTool){this.attr("iconClass",this._checked?this._activeTool._enabledIcon:this._activeTool._disabledIcon);this.attr("label",this._activeTool.label);}}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.DropDownToolBase",DDTB,_748);}return DDTB;});},"dijit/form/_ListMouseMixin":function(){define("dijit/form/_ListMouseMixin",["dojo/_base/declare","dojo/mouse","dojo/on","dojo/touch","./_ListBase"],function(_752,_753,on,_754,_755){return _752("dijit.form._ListMouseMixin",_755,{postCreate:function(){this.inherited(arguments);this.own(on(this.domNode,_754.press,function(evt){evt.preventDefault();}));this._listConnect(_754.press,"_onMouseDown");this._listConnect(_754.release,"_onMouseUp");this._listConnect(_753.enter,"_onMouseOver");this._listConnect(_753.leave,"_onMouseOut");},_onMouseDown:function(evt,_756){if(this._hoveredNode){this.onUnhover(this._hoveredNode);this._hoveredNode=null;}this._isDragging=true;this._setSelectedAttr(_756);},_onMouseUp:function(evt,_757){this._isDragging=false;var _758=this.selected;var _759=this._hoveredNode;if(_758&&_757==_758){this.onClick(_758);}else{if(_759&&_757==_759){this._setSelectedAttr(_759);this.onClick(_759);}}},_onMouseOut:function(evt,_75a){if(this._hoveredNode){this.onUnhover(this._hoveredNode);this._hoveredNode=null;}if(this._isDragging){this._cancelDrag=(new Date()).getTime()+1000;}},_onMouseOver:function(evt,_75b){if(this._cancelDrag){var time=(new Date()).getTime();if(time>this._cancelDrag){this._isDragging=false;}this._cancelDrag=null;}this._hoveredNode=_75b;this.onHover(_75b);if(this._isDragging){this._setSelectedAttr(_75b);}}});});},"esri/dijit/editing/Update":function(){define("esri/dijit/editing/Update",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/geometry/jsonUtils","esri/OperationBase"],function(_75c,lang,has,_75d,_75e,_75f){var _760=_75c(_75f,{declaredClass:"esri.dijit.editing.Update",type:"edit",label:"Update Features",constructor:function(_761){var i;_761=_761||{};if(!_761.featureLayer){console.error("In constructor of 'esri.dijit.editing.Update', featureLayer not provided");return;}this._featureLayer=_761.featureLayer;if(!_761.preUpdatedGraphics){console.error("In constructor of 'esri.dijit.editing.Update', preUpdatedGraphics not provided");return;}this._preUpdatedGraphicsGeometries=[];this._preUpdatedGraphicsAttributes=[];for(i=0;i<_761.preUpdatedGraphics.length;i++){this._preUpdatedGraphicsGeometries.push(_761.preUpdatedGraphics[i].geometry.toJson());this._preUpdatedGraphicsAttributes.push(_761.preUpdatedGraphics[i].attributes);}if(!_761.postUpdatedGraphics){console.error("In constructor of 'esri.dijit.editing.Update', postUpdatedGraphics not provided");return;}this._postUpdatedGraphics=_761.postUpdatedGraphics;this._postUpdatedGraphicsGeometries=[];this._postUpdatedGraphicsAttributes=[];for(i=0;i<_761.postUpdatedGraphics.length;i++){this._postUpdatedGraphicsGeometries.push(_761.postUpdatedGraphics[i].geometry.toJson());this._postUpdatedGraphicsAttributes.push(lang.clone(_761.postUpdatedGraphics[i].attributes));}},performUndo:function(){var i;for(i=0;i<this._postUpdatedGraphics.length;i++){this._postUpdatedGraphics[i].setGeometry(_75e.fromJson(this._preUpdatedGraphicsGeometries[i]));this._postUpdatedGraphics[i].setAttributes(this._preUpdatedGraphicsAttributes[i]);}this._featureLayer.applyEdits(null,this._postUpdatedGraphics,null);},performRedo:function(){var i;for(i=0;i<this._postUpdatedGraphics.length;i++){this._postUpdatedGraphics[i].setGeometry(_75e.fromJson(this._postUpdatedGraphicsGeometries[i]));this._postUpdatedGraphics[i].setAttributes(this._postUpdatedGraphicsAttributes[i]);}this._featureLayer.applyEdits(null,this._postUpdatedGraphics,null);}});if(has("extend-esri")){lang.setObject("dijit.editing.Update",_760,_75d);}return _760;});},"dojo/cache":function(){define(["./_base/kernel","./text"],function(dojo){return dojo.cache;});},"url:dijit/form/templates/DropDownBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_buttonNode, _popupStateNode\" role=\"presentation\"\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"button presentation\" aria-hidden=\"true\"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\n\t\t\tdata-dojo-attach-point=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\n\t/></div\n></div>\n","dijit/ProgressBar":function(){require({cache:{"url:dijit/templates/ProgressBar.html":"<div class=\"dijitProgressBar dijitProgressBarEmpty\" role=\"progressbar\"\n\t><div  data-dojo-attach-point=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\" role=\"presentation\"></div\n\t\t><span style=\"visibility:hidden\">&#160;</span\n\t></div\n\t><div data-dojo-attach-point=\"labelNode\" class=\"dijitProgressBarLabel\" id=\"${id}_label\"></div\n\t><img data-dojo-attach-point=\"indeterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\" alt=\"\"\n/></div>\n"}});define("dijit/ProgressBar",["require","dojo/_base/declare","dojo/dom-class","dojo/_base/lang","dojo/number","./_Widget","./_TemplatedMixin","dojo/text!./templates/ProgressBar.html"],function(_762,_763,_764,lang,_765,_766,_767,_768){return _763("dijit.ProgressBar",[_766,_767],{progress:"0",value:"",maximum:100,places:0,indeterminate:false,label:"",name:"",templateString:_768,_indeterminateHighContrastImagePath:_762.toUrl("./themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);if(!(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();},update:function(_769){lang.mixin(this,_769||{});var tip=this.internalProgress,ap=this.domNode;var _76a=1;if(this.indeterminate){ap.removeAttribute("aria-valuenow");}else{if(String(this.progress).indexOf("%")!=-1){_76a=Math.min(parseFloat(this.progress)/100,1);this.progress=_76a*this.maximum;}else{this.progress=Math.min(this.progress,this.maximum);_76a=this.maximum?this.progress/this.maximum:0;}ap.setAttribute("aria-valuenow",this.progress);}ap.setAttribute("aria-describedby",this.labelNode.id);ap.setAttribute("aria-valuemin",0);ap.setAttribute("aria-valuemax",this.maximum);this.labelNode.innerHTML=this.report(_76a);_764.toggle(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);tip.style.width=(_76a*100)+"%";this.onChange();},_setValueAttr:function(v){this._set("value",v);if(v==Infinity){this.update({indeterminate:true});}else{this.update({indeterminate:false,progress:v});}},_setLabelAttr:function(_76b){this._set("label",_76b);this.update();},_setIndeterminateAttr:function(_76c){this.indeterminate=_76c;this.update();},report:function(_76d){return this.label?this.label:(this.indeterminate?"&#160;":_765.format(_76d,{type:"percent",places:this.places,locale:this.lang}));},onChange:function(){}});});},"esri/layers/RenderMode":function(){define("esri/layers/RenderMode",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","dojo/io/script","esri/kernel"],function(_76e,_76f,lang,_770,has,_771,_772){var _773=_76f(null,{declaredClass:"esri.layers._RenderMode",constructor:function(){this._prefix="jsonp_"+(_76e._scopeName||"dojo")+"IoScript";},initialize:function(map){this.map=map;this._init=true;},startup:function(){},propertyChangeHandler:function(type){},destroy:function(){this._init=false;},drawFeature:function(_774){},suspend:function(){},resume:function(){},refresh:function(){},_incRefCount:function(oid){var _775=this._featureMap[oid];if(_775){_775._count++;}},_decRefCount:function(oid){var _776=this._featureMap[oid];if(_776){_776._count--;}},_getFeature:function(oid){return this._featureMap[oid];},_addFeatureIIf:function(oid,_777){var fmap=this._featureMap,_778=fmap[oid],_779=this.featureLayer;if(!_778){fmap[oid]=_777;_779._add(_777);_777._count=0;}return _778||_777;},_removeFeatureIIf:function(oid){var _77a=this._featureMap[oid],_77b=this.featureLayer;if(_77a){if(_77a._count){return;}delete this._featureMap[oid];_77b._remove(_77a);}return _77a;},_clearIIf:function(){var i,_77c=this.featureLayer,_77d=_77c.graphics,_77e=_77c._selectedFeatures,_77f=_77c.objectIdField;for(i=_77d.length-1;i>=0;i--){var _780=_77d[i];var oid=_780.attributes[_77f];if(oid in _77e){_780._count=1;continue;}_780._count=0;this._removeFeatureIIf(oid);}},_isPending:function(id){var dfd=_771[this._prefix+id];return dfd?true:false;},_cancelPendingRequest:function(dfd,id){dfd=dfd||_771[this._prefix+id];if(dfd){try{dfd.cancel();_771._validCheck(dfd);}catch(e){}}},_purgeRequests:function(){_771._validCheck(null);},_toggleVisibility:function(show){var _781=this.featureLayer,_782=_781.graphics,_783=show?"show":"hide",i,len=_782.length;show=show&&_781._ager;for(i=0;i<len;i++){var _784=_782[i];_784[_783]();if(show){_781._repaint(_784);}}},_applyTimeFilter:function(_785){var _786=this.featureLayer;if(!_786.timeInfo||_786.suspended){return;}if(!_785){_786._fireUpdateStart();}var _787=_786._trackManager;if(_787){_787.clearTracks();}var defn=_786.getTimeDefinition(),_788=_786._getOffsettedTE(_786._mapTimeExtent);if(_788){_788=_786._getTimeOverlap(defn,_788);if(_788){var _789=_786._filterByTime(_786.graphics,_788.startTime,_788.endTime);if(_787){_787.addFeatures(_789.match);}_770.forEach(_789.match,function(_78a){var _78b=_78a._shape;if(!_78a.visible){_78a.show();_78b=_78a._shape;_78b&&_78b._moveToFront();}if(_786._ager&&_78b){_786._repaint(_78a);}});_770.forEach(_789.noMatch,function(_78c){if(_78c.visible){_78c.hide();}});}else{this._toggleVisibility(false);}}else{if(_787){_787.addFeatures(_786.graphics);}this._toggleVisibility(true);}if(_787){_787.moveLatestToFront();_787.drawTracks();}if(!_785){_786._fireUpdateEnd();}}});if(has("extend-esri")){lang.setObject("layers._RenderMode",_773,_772);}return _773;});},"dojox/grid/_ViewManager":function(){define("dojox/grid/_ViewManager",["dojo/_base/declare","dojo/_base/sniff","dojo/dom-class"],function(_78d,has,_78e){return _78d("dojox.grid._ViewManager",null,{constructor:function(_78f){this.grid=_78f;},defaultWidth:200,views:[],resize:function(){this.onEach("resize");},render:function(){this.onEach("render");},addView:function(_790){_790.idx=this.views.length;this.views.push(_790);},destroyViews:function(){for(var i=0,v;v=this.views[i];i++){v.destroy();}this.views=[];},getContentNodes:function(){var _791=[];for(var i=0,v;v=this.views[i];i++){_791.push(v.contentNode);}return _791;},forEach:function(_792){for(var i=0,v;v=this.views[i];i++){_792(v,i);}},onEach:function(_793,_794){_794=_794||[];for(var i=0,v;v=this.views[i];i++){if(_793 in v){v[_793].apply(v,_794);}}},normalizeHeaderNodeHeight:function(){var _795=[];for(var i=0,v;(v=this.views[i]);i++){if(v.headerContentNode.firstChild){_795.push(v.headerContentNode);}}this.normalizeRowNodeHeights(_795);},normalizeRowNodeHeights:function(_796){var h=0;var _797=[];if(this.grid.rowHeight){h=this.grid.rowHeight;}else{if(_796.length<=1){return;}for(var i=0,n;(n=_796[i]);i++){if(!_78e.contains(n,"dojoxGridNonNormalizedCell")){_797[i]=n.firstChild.offsetHeight;h=Math.max(h,_797[i]);}}h=(h>=0?h:0);if((has("mozilla")||has("ie")>8)&&h){h++;}}for(i=0;(n=_796[i]);i++){if(_797[i]!=h){n.firstChild.style.height=h+"px";}}},resetHeaderNodeHeight:function(){for(var i=0,v,n;(v=this.views[i]);i++){n=v.headerContentNode.firstChild;if(n){n.style.height="";}}},renormalizeRow:function(_798){var _799=[];for(var i=0,v,n;(v=this.views[i])&&(n=v.getRowNode(_798));i++){n.firstChild.style.height="";_799.push(n);}this.normalizeRowNodeHeights(_799);},getViewWidth:function(_79a){return this.views[_79a].getWidth()||this.defaultWidth;},measureHeader:function(){this.resetHeaderNodeHeight();this.forEach(function(_79b){_79b.headerContentNode.style.height="";});var h=0;this.forEach(function(_79c){h=Math.max(_79c.headerNode.offsetHeight,h);});return h;},measureContent:function(){var h=0;this.forEach(function(_79d){h=Math.max(_79d.domNode.offsetHeight,h);});return h;},findClient:function(_79e){var c=this.grid.elasticView||-1;if(c<0){for(var i=1,v;(v=this.views[i]);i++){if(v.viewWidth){for(i=1;(v=this.views[i]);i++){if(!v.viewWidth){c=i;break;}}break;}}}if(c<0){c=Math.floor(this.views.length/2);}return c;},arrange:function(l,w){var i,v,vw,len=this.views.length,self=this;var c=(w<=0?len:this.findClient());var _79f=function(v,l){var ds=v.domNode.style;var hs=v.headerNode.style;if(!self.grid.isLeftToRight()){ds.right=l+"px";if(has("ff")<4){hs.right=l+v.getScrollbarWidth()+"px";}else{hs.right=l+"px";}if(!has("webkit")){hs.width=parseInt(hs.width,10)-v.getScrollbarWidth()+"px";}}else{ds.left=l+"px";hs.left=l+"px";}ds.top=0+"px";hs.top=0;};for(i=0;(v=this.views[i])&&(i<c);i++){vw=this.getViewWidth(i);v.setSize(vw,0);_79f(v,l);if(v.headerContentNode&&v.headerContentNode.firstChild){vw=v.getColumnsWidth()+v.getScrollbarWidth();}else{vw=v.domNode.offsetWidth;}l+=vw;}i++;var r=w;for(var j=len-1;(v=this.views[j])&&(i<=j);j--){vw=this.getViewWidth(j);v.setSize(vw,0);vw=v.domNode.offsetWidth;r-=vw;_79f(v,r);}if(c<len){v=this.views[c];vw=Math.max(1,r-l);v.setSize(vw+"px",0);_79f(v,l);}return l;},renderRow:function(_7a0,_7a1,_7a2){var _7a3=[];for(var i=0,v,n,_7a4;(v=this.views[i])&&(n=_7a1[i]);i++){_7a4=v.renderRow(_7a0);n.appendChild(_7a4);_7a3.push(_7a4);}if(!_7a2){this.normalizeRowNodeHeights(_7a3);}},rowRemoved:function(_7a5){this.onEach("rowRemoved",[_7a5]);},updateRow:function(_7a6,_7a7){for(var i=0,v;v=this.views[i];i++){v.updateRow(_7a6);}if(!_7a7){this.renormalizeRow(_7a6);}},updateRowStyles:function(_7a8){this.onEach("updateRowStyles",[_7a8]);},setScrollTop:function(_7a9){var top=_7a9;for(var i=0,v;v=this.views[i];i++){top=v.setScrollTop(_7a9);if(has("ie")&&v.headerNode&&v.scrollboxNode){v.headerNode.scrollLeft=v.scrollboxNode.scrollLeft;}}return top;},getFirstScrollingView:function(){for(var i=0,v;(v=this.views[i]);i++){if(v.hasHScrollbar()||v.hasVScrollbar()){return v;}}return null;}});});},"esri/dijit/editing/tools/SelectionTools":function(){define(["dojo/_base/lang","dojo/has","esri/layers/FeatureLayer","esri/toolbars/draw","esri/kernel"],function(lang,has,_7aa,Draw,_7ab){var _7ac={select:{id:"btnNewSelection",_enabledIcon:"toolbarIcon newSelectionIcon",_disabledIcon:"toolbarIcon newSelectionIcon",_drawType:Draw.EXTENT,_selectMethod:_7aa.SELECTION_NEW,_label:"NLS_selectionNewLbl"},selectadd:{id:"btnAddToSelection",_enabledIcon:"toolbarIcon addToSelectionIcon",_disabledIcon:"toolbarIcon addToSelectionIcon",_drawType:Draw.EXTENT,_selectMethod:_7aa.SELECTION_ADD,_label:"NLS_selectionAddLbl"},selectremove:{id:"btnSubtractFromSelection",_enabledIcon:"toolbarIcon removeFromSelectionIcon",_disabledIcon:"toolbarIcon removeFromSelectionIcon",_drawType:Draw.EXTENT,_selectMethod:_7aa.SELECTION_SUBTRACT,_label:"NLS_selectionRemoveLbl"},selectClear:{id:"btnClearSelection",_enabledIcon:"toolbarIcon clearSelectionIcon",_disabledIcon:"toolbarIcon clearSelectionIcon",_enabled:false,_label:"NLS_selectionClearLbl"}};if(has("extend-esri")){lang.setObject("dijit.editing.tools.SelectionTools",_7ac,_7ab);}return _7ac;});},"dijit/form/NumberTextBox":function(){define("dijit/form/NumberTextBox",["dojo/_base/declare","dojo/_base/lang","dojo/number","./RangeBoundTextBox"],function(_7ad,lang,_7ae,_7af){var _7b0=_7ad("dijit.form.NumberTextBoxMixin",null,{pattern:_7ae.regexp,value:NaN,editOptions:{pattern:"#.######"},_formatter:_7ae.format,postMixInProperties:function(){this.inherited(arguments);this._set("type","text");},_setConstraintsAttr:function(_7b1){var _7b2=typeof _7b1.places=="number"?_7b1.places:0;if(_7b2){_7b2++;}if(typeof _7b1.max!="number"){_7b1.max=9*Math.pow(10,15-_7b2);}if(typeof _7b1.min!="number"){_7b1.min=-9*Math.pow(10,15-_7b2);}this.inherited(arguments,[_7b1]);if(this.focusNode&&this.focusNode.value&&!isNaN(this.value)){this.set("value",this.value);}},_onFocus:function(){if(this.disabled){return;}var val=this.get("value");if(typeof val=="number"&&!isNaN(val)){var _7b3=this.format(val,this.constraints);if(_7b3!==undefined){this.textbox.value=_7b3;}}this.inherited(arguments);},format:function(_7b4,_7b5){var _7b6=String(_7b4);if(typeof _7b4!="number"){return _7b6;}if(isNaN(_7b4)){return "";}if(!("rangeCheck" in this&&this.rangeCheck(_7b4,_7b5))&&_7b5.exponent!==false&&/\de[-+]?\d/i.test(_7b6)){return _7b6;}if(this.editOptions&&this.focused){_7b5=lang.mixin({},_7b5,this.editOptions);}return this._formatter(_7b4,_7b5);},_parser:_7ae.parse,parse:function(_7b7,_7b8){var v=this._parser(_7b7,lang.mixin({},_7b8,(this.editOptions&&this.focused)?this.editOptions:{}));if(this.editOptions&&this.focused&&isNaN(v)){v=this._parser(_7b7,_7b8);}return v;},_getDisplayedValueAttr:function(){var v=this.inherited(arguments);return isNaN(v)?this.textbox.value:v;},filter:function(_7b9){return (_7b9==null||_7b9==="")?NaN:this.inherited(arguments);},serialize:function(_7ba,_7bb){return (typeof _7ba!="number"||isNaN(_7ba))?"":this.inherited(arguments);},_setBlurValue:function(){var val=lang.hitch(lang.mixin({},this,{focused:true}),"get")("value");this._setValueAttr(val,true);},_setValueAttr:function(_7bc,_7bd,_7be){if(_7bc!==undefined&&_7be===undefined){_7be=String(_7bc);if(typeof _7bc=="number"){if(isNaN(_7bc)){_7be="";}else{if(("rangeCheck" in this&&this.rangeCheck(_7bc,this.constraints))||this.constraints.exponent===false||!/\de[-+]?\d/i.test(_7be)){_7be=undefined;}}}else{if(!_7bc){_7be="";_7bc=NaN;}else{_7bc=undefined;}}}this.inherited(arguments,[_7bc,_7bd,_7be]);},_getValueAttr:function(){var v=this.inherited(arguments);if(isNaN(v)&&this.textbox.value!==""){if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)&&(new RegExp("^"+_7ae._realNumberRegexp(lang.mixin({},this.constraints))+"$").test(this.textbox.value))){var n=Number(this.textbox.value);return isNaN(n)?undefined:n;}else{return undefined;}}else{return v;}},isValid:function(_7bf){if(!this.focused||this._isEmpty(this.textbox.value)){return this.inherited(arguments);}else{var v=this.get("value");if(!isNaN(v)&&this.rangeCheck(v,this.constraints)){if(this.constraints.exponent!==false&&/\de[-+]?\d/i.test(this.textbox.value)){return true;}else{return this.inherited(arguments);}}else{return false;}}}});var _7c0=_7ad("dijit.form.NumberTextBox",[_7af,_7b0],{baseClass:"dijitTextBox dijitNumberTextBox"});_7c0.Mixin=_7b0;return _7c0;});},"esri/tasks/BufferParameters":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel","esri/geometry/Polygon","esri/geometry/jsonUtils"],function(_7c1,lang,_7c2,_7c3,has,_7c4,_7c5,_7c6){var _7c7=_7c1(null,{declaredClass:"esri.tasks.BufferParameters",geometries:null,outSpatialReference:null,bufferSpatialReference:null,distances:null,unit:null,unionResults:false,geodesic:false,toJson:function(){var json={unit:this.unit,unionResults:this.unionResults,geodesic:this.geodesic},dt=this.distances,_7c8=this.outSpatialReference,_7c9=this.bufferSpatialReference;var _7ca=_7c2.map(this.geometries,function(geom){geom=(geom.type==="extent")?this._extentToPolygon(geom):geom;return geom.toJson();},this);var _7cb=this.geometries;if(_7cb&&_7cb.length>0){var _7cc=_7cb[0].type==="extent"?"esriGeometryPolygon":_7c6.getJsonType(_7cb[0]);json.geometries=_7c3.toJson({geometryType:_7cc,geometries:_7ca});json.inSR=_7cb[0].spatialReference.wkid?_7cb[0].spatialReference.wkid:_7c3.toJson(_7cb[0].spatialReference.toJson());}if(dt){json.distances=dt.join(",");}if(_7c8){json.outSR=_7c8.wkid?_7c8.wkid:_7c3.toJson(_7c8.toJson());}if(_7c9){json.bufferSR=_7c9.wkid?_7c9.wkid:_7c3.toJson(_7c9.toJson());}return json;},_extentToPolygon:function(_7cd){var xmin=_7cd.xmin,ymin=_7cd.ymin,xmax=_7cd.xmax,ymax=_7cd.ymax;return new _7c5({"rings":[[[xmin,ymin],[xmin,ymax],[xmax,ymax],[xmax,ymin],[xmin,ymin]]],"spatialReference":_7cd.spatialReference.toJson()});}});if(has("extend-esri")){lang.setObject("tasks.BufferParameters",_7c7,_7c4);}return _7c7;});},"url:dijit/form/templates/Button.html":"<span class=\"dijit dijitReset dijitInline\" role=\"presentation\"\n\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\tdata-dojo-attach-event=\"ondijitclick:_onClick\" role=\"presentation\"\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\tdata-dojo-attach-point=\"titleNode,focusNode\"\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\" data-dojo-attach-point=\"iconNode\"></span\n\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#x25CF;</span\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\tid=\"${id}_label\"\n\t\t\t\tdata-dojo-attach-point=\"containerNode\"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\"\n\t\ttabIndex=\"-1\" role=\"presentation\" data-dojo-attach-point=\"valueNode\"\n/></span>\n","esri/toolbars/_GraphicMover":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/json","dojo/has","dojo/dom-style","dojox/gfx/Moveable","dojox/gfx/Mover","dojox/gfx/matrix","esri/kernel","esri/geometry/webMercatorUtils","esri/geometry/ScreenPoint"],function(_7ce,lang,_7cf,_7d0,has,_7d1,_7d2,_7d3,_7d4,_7d5,_7d6,_7d7){var GM=_7ce(null,{declaredClass:"esri.toolbars._GraphicMover",constructor:function(_7d8,map,_7d9){this.graphic=_7d8;this.map=map;this.toolbar=_7d9;this._enableGraphicMover();this._moved=false;},refresh:function(_7da){var _7db=this.graphic.getDojoShape();if(_7db&&(_7da||!_7db._hostGraphic)){this._disableGraphicMover();this._enableGraphicMover();}},destroy:function(){this._disableGraphicMover();},hasMoved:function(){return this._moved;},_enableGraphicMover:function(){var _7dc=this.graphic,_7dd=_7dc.getDojoShape();if(_7dd){_7dd._hostGraphic=_7dc;this._moveable=new _7d2(_7dd,{mover:GM.Mover});this._moveStartHandle=_7cf.connect(this._moveable,"onMoveStart",this,this._moveStartHandler);this._firstMoveHandle=_7cf.connect(this._moveable,"onFirstMove",this,this._firstMoveHandler);this._movingHandle=_7cf.connect(this._moveable,"onMoving",this,this._movingHandler);this._moveStopHandle=_7cf.connect(this._moveable,"onMoveStop",this,this._moveStopHandler);var node=_7dd.getEventSource();if(node){_7d1.set(node,"cursor",this.toolbar._cursors.move);}}},_disableGraphicMover:function(){var _7de=this._moveable;if(_7de){_7cf.disconnect(this._moveStartHandle);_7cf.disconnect(this._firstMoveHandle);_7cf.disconnect(this._movingHandle);_7cf.disconnect(this._moveStopHandle);var _7df=_7de.shape;if(_7df){_7df._hostGraphic=null;var node=_7df.getEventSource();if(node){_7d1.set(node,"cursor",null);}}_7de.destroy();}this._moveable=null;},_moveStartHandler:function(){var _7e0=this.graphic,map=this.map;this._startTx=_7e0.getDojoShape().getTransform();if(this.graphic.geometry.type==="point"){if(map.snappingManager){map.snappingManager._setUpSnapping();}}this.toolbar.onGraphicMoveStart(_7e0);},_firstMoveHandler:function(){this.toolbar._beginOperation("MOVE");this.toolbar.onGraphicFirstMove(this.graphic);},_movingHandler:function(_7e1){this.toolbar.onGraphicMove(this.graphic,_7e1.shape.getTransform());},_moveStopHandler:function(_7e2){var _7e3=this.graphic,_7e4=this.toolbar,map=this.map,mx=_7d4,_7e5=_7e4._geo?_7d6.geographicToWebMercator(_7e3.geometry):_7e3.geometry,type=_7e5.type,_7e6=_7e3.getDojoShape(),tx=_7e6.getTransform();if(_7d0.toJson(tx)!==_7d0.toJson(this._startTx)){this._moved=true;switch(type){case "point":var _7e7=[tx,mx.invert(this._startTx)],_7e8;if(map.snappingManager){_7e8=map.snappingManager._snappingPoint;}_7e5=_7e8||map.toMap(mx.multiplyPoint(_7e7,map.toScreen(_7e5,true)));if(map.snappingManager){map.snappingManager._killOffSnapping();}break;case "polyline":_7e5=this._updatePolyGeometry(_7e5,_7e5.paths,tx);break;case "polygon":_7e5=this._updatePolyGeometry(_7e5,_7e5.rings,tx);break;}_7e6.setTransform(null);_7e3.setGeometry(_7e4._geo?_7d6.webMercatorToGeographic(_7e5,true):_7e5);}else{this._moved=false;}_7e4._endOperation("MOVE");_7e4.onGraphicMoveStop(_7e3,tx);if(!this._moved){var e=_7e2.__e,_7e9=this.map.position,pt=new _7d7(e.pageX-_7e9.x,e.pageY-_7e9.y);_7e4.onGraphicClick(_7e3,{screenPoint:pt,mapPoint:this.map.toMap(pt)});}},_updatePolyGeometry:function(_7ea,_7eb,_7ec){var map=this.map,_7ed=_7ea.getPoint(0,0),_7ee=map.toMap(map.toScreen(_7ed).offset(_7ec.dx,_7ec.dy)),_7ef=_7ee.x-_7ed.x,_7f0=_7ee.y-_7ed.y,i,j,seg,_7f1;for(i=0;i<_7eb.length;i++){seg=_7eb[i];for(j=0;j<seg.length;j++){_7f1=_7ea.getPoint(i,j);_7ea.setPoint(i,j,_7f1.offset(_7ef,_7f0));}}return _7ea;}});GM.Mover=_7ce(_7d3,{declaredClass:"esri.toolbars._Mover",constructor:function(_7f2,e,host){this.__e=e;}});if(has("extend-esri")){lang.setObject("toolbars._GraphicMover",GM,_7d5);lang.setObject("toolbars._Mover",GM.Mover,_7d5);}return GM;});},"dojox/main":function(){define("dojox/main",["dojo/_base/kernel"],function(dojo){return dojo.dojox;});},"url:dijit/templates/MenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitem\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">\n\t\t<div data-dojo-attach-point=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n","esri/dijit/editing/Util":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel"],function(lang,_7f3,has,_7f4){var util={};util={findFeatures:function(ids,_7f5,_7f6){var _7f7=_7f5.objectIdField;var _7f8=_7f5.graphics;var _7f9=_7f3.filter(_7f8,function(_7fa){return _7f3.some(ids,function(id){return _7fa.attributes[_7f7]===id.objectId;});});if(_7f6){_7f6(_7f9);}else{return _7f9;}},getSelection:function(_7fb){var _7fc=[];_7f3.forEach(_7fb,function(_7fd){var _7fe=_7fd.getSelectedFeatures();_7f3.forEach(_7fe,function(_7ff){_7fc.push(_7ff);});});return _7fc;}};if(has("extend-esri")){lang.setObject("dijit.editing.Util.LayerHelper",util,_7f4);}return util;});},"esri/tasks/FeatureSet":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/lang","esri/graphic","esri/SpatialReference","esri/graphicsUtils","esri/geometry/jsonUtils","esri/symbols/jsonUtils"],function(_800,lang,_801,has,_802,_803,_804,_805,_806,_807,_808){var _809=_800(null,{declaredClass:"esri.tasks.FeatureSet",constructor:function(json){if(json){lang.mixin(this,json);var _80a=this.features,sr=json.spatialReference,_80b=_807.getGeometryType(json.geometryType);sr=(this.spatialReference=new _805(sr));this.geometryType=json.geometryType;if(json.fields){this.fields=json.fields;}_801.forEach(_80a,function(_80c,i){var _80d=_80c.geometry&&_80c.geometry.spatialReference;_80a[i]=new _804((_80b&&_80c.geometry)?new _80b(_80c.geometry):null,_80c.symbol&&_808.fromJson(_80c.symbol),_80c.attributes);if(_80a[i].geometry&&!_80d){_80a[i].geometry.setSpatialReference(sr);}});}else{this.features=[];}},displayFieldName:null,geometryType:null,spatialReference:null,fieldAliases:null,toJson:function(_80e){var json={};if(this.displayFieldName){json.displayFieldName=this.displayFieldName;}if(this.fields){json.fields=this.fields;}if(this.spatialReference){json.spatialReference=this.spatialReference.toJson();}else{if(this.features[0]&&this.features[0].geometry){json.spatialReference=this.features[0].geometry.spatialReference.toJson();}}if(this.features[0]){if(this.features[0].geometry){json.geometryType=_807.getJsonType(this.features[0].geometry);}json.features=_806._encodeGraphics(this.features,_80e);}json.exceededTransferLimit=this.exceededTransferLimit;return _803.fixJson(json);}});if(has("extend-esri")){lang.setObject("tasks.FeatureSet",_809,_802);}return _809;});},"esri/tasks/LengthsParameters":function(){define("esri/tasks/LengthsParameters",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel"],function(_80f,lang,_810,_811,has,_812){var _813=_80f(null,{declaredClass:"esri.tasks.LengthsParameters",polylines:null,lengthUnit:null,geodesic:null,calculationType:null,toJson:function(){var _814=_810.map(this.polylines,function(geom){return geom.toJson();});var json={};json.polylines=_811.toJson(_814);var _815=this.polylines[0].spatialReference;json.sr=_815.wkid?_815.wkid:_811.toJson(_815.toJson());if(this.lengthUnit){json.lengthUnit=this.lengthUnit;}if(this.geodesic){json.geodesic=this.geodesic;}if(this.calculationType){json.calculationType=this.calculationType;}return json;}});if(has("extend-esri")){lang.setObject("tasks.LengthsParameters",_813,_812);}return _813;});},"esri/dijit/editing/TemplatePickerItem":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","dojo/sniff","dojo/dom-style","dijit/_Widget","dijit/_Templated","dojox/gfx","esri/symbols/jsonUtils","esri/kernel"],function(_816,lang,_817,has,_818,_819,_81a,_81b,gfx,_81c,_81d){var TPI=_816([_81a,_81b],{declaredClass:"esri.dijit.editing.TemplatePickerItem",templateString:"<div class='item' style='text-align: center;'>"+"<div class='itemSymbol' dojoAttachPoint='_surfaceNode'></div>"+"<div class='itemLabel'>${label}</div>"+"</div>",startup:function(){if(this._started){return;}this.inherited(arguments);this._surface=this._draw(this._surfaceNode,this.symbol,this.surfaceWidth,this.surfaceHeight,this.template);},_draw:function(node,_81e,_81f,_820,_821){if(!_81e){return;}var _822=gfx.createSurface(node,_81f,_820);if(has("ie")<9){var _823=_822.getEventSource();_819.set(_823,"position","relative");_819.set(_823.parentNode,"position","relative");}var _824=(!this.legendOverride&&this._getDrawingToolShape(_81e,_821))||_81c.getShapeDescriptors(_81e);var _825;try{_825=_822.createShape(_824.defaultShape).setFill(_824.fill).setStroke(_824.stroke);}catch(e){_822.clear();_822.destroy();return;}var bbox=_825.getBoundingBox(),_826=bbox.width,_827=bbox.height,_828=-(bbox.x+(_826/2)),_829=-(bbox.y+(_827/2)),dim=_822.getDimensions(),_82a={dx:_828+dim.width/2,dy:_829+dim.height/2};if(_826>_81f||_827>_820){var _82b=_826>_827?_826:_827;var _82c=_81f<_820?_81f:_820;var _82d=(_82c-5)/_82b;lang.mixin(_82a,{xx:_82d,yy:_82d});}_825.applyTransform(_82a);return _822;},_getDrawingToolShape:function(_82e,_82f){var _830,_831=_82f?_82f.drawingTool||null:null;switch(_831){case "esriFeatureEditToolArrow":_830={type:"path",path:"M 10,1 L 3,8 L 3,5 L -15,5 L -15,-2 L 3,-2 L 3,-5 L 10,1 E"};break;case "esriFeatureEditToolLeftArrow":_830={type:"path",path:"M -15,1 L -8,8 L -8,5 L 10,5 L 10,-2 L -8,-2 L -8,-5 L -15,1 E"};break;case "esriFeatureEditToolRightArrow":_830={type:"path",path:"M 10,1 L 3,8 L 3,5 L -15,5 L -15,-2 L 3,-2 L 3,-5 L 10,1 E"};break;case "esriFeatureEditToolUpArrow":_830={type:"path",path:"M 1,-10 L 8,-3 L 5,-3 L 5,15 L -2,15 L -2,-3 L -5,-3 L 1,-10 E"};break;case "esriFeatureEditToolDownArrow":_830={type:"path",path:"M 1,15 L 8,8 L 5,8 L 5,-10 L -2,-10 L -2,8 L -5,8 L 1,15 E"};break;case "esriFeatureEditToolTriangle":_830={type:"path",path:"M -10,14 L 2,-10 L 14,14 L -10,14 E"};break;case "esriFeatureEditToolRectangle":_830={type:"path",path:"M -10,-10 L 10,-10 L 10,10 L -10,10 L -10,-10 E"};break;case "esriFeatureEditToolCircle":_830={type:"circle",cx:0,cy:0,r:10};break;case "esriFeatureEditToolEllipse":_830={type:"ellipse",cx:0,cy:0,rx:10,ry:5};break;case "esriFeatureEditToolFreehand":if(_82e.type==="simplelinesymbol"||_82e.type==="cartographiclinesymbol"){_830={type:"path",path:"m -11, -7c-1.5,-3.75 7.25,-9.25 12.5,-7c5.25,2.25 6.75,9.75 3.75,12.75c-3,3 -3.25,2.5 -9.75,5.25c-6.5,2.75 -7.25,14.25 2,15.25c9.25,1 11.75,-4 13.25,-6.75c1.5,-2.75 3.5,-11.75 12,-6.5"};}else{_830={type:"path",path:"M 10,-13 c3.1,0.16667 4.42564,2.09743 2.76923,3.69231c-2.61025,2.87179 -5.61025,5.6718 -6.14358,6.20513c-0.66667,0.93333 -0.46667,1.2 -0.53333,1.93333c-0.00001,0.86666 0.6,1.66667 1.13334,2c1.03077,0.38462 2.8,0.93333 3.38974,1.70769c0.47693,0.42564 0.87693,0.75897 1.41026,1.75897c0.13333,1.06667 -0.46667,2.86667 -1.8,3.8c-0.73333,0.73333 -3.86667,2.66666 -4.86667,3.13333c-0.93333,0.8 -7.4,3.2 -7.6,3.06667c-1.06667,0.46667 -4.73333,1.13334 -5.2,1.26667c-1.6,0.33334 -4.6,0.4 -6.25128,0.05128c-1.41539,-0.18462 -2.34872,-2.31796 -1.41539,-4.45129c0.93333,-1.73333 1.86667,-3.13333 2.64615,-3.85641c1.28718,-1.47692 2.57437,-2.68204 3.88718,-3.54359c0.88718,-1.13845 1.8,-1.33333 2.26666,-2.45641c0.33334,-0.74359 0.37949,-1.7641 0.06667,-2.87692c-0.66666,-1.46666 -1.66666,-1.86666 -2.98975,-2.2c-1.27692,-0.26666 -2.12307,-0.64102 -3.27692,-1.46666c-0.66667,-1.00001 -1.01538,-3.01539 0.73333,-4.06667c1.73333,-1.2 3.6,-1.93333 4.93333,-2.2c1.33333,-0.46667 4.84104,-1.09743 5.84103,-1.23076c1.60001,-0.46667 6.02564,-0.50257 7.29231,-0.56924z"};}break;default:return null;}return {defaultShape:_830,fill:_82e.getFill(),stroke:_82e.getStroke()};},_repaint:function(_832){if(!_832){this._surface=this._draw(this._surfaceNode,this.symbol,this.surfaceWidth,this.surfaceHeight,this.template);return;}if(_832.getStroke&&_832.setStroke){_832.setStroke(_832.getStroke());}if(_832.getFill&&_832.setFill){_832.setFill(_832.getFill());}if(_832.children&&lang.isArray(_832.children)){_817.forEach(_832.children,this._repaint,this);}},destroy:function(){if(this._surface){this._surface.destroy();delete this._surface;}this.inherited(arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.TemplatePickerItem",TPI,_81d);}return TPI;});},"esri/dijit/editing/Add":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/OperationBase"],function(_833,lang,has,_834,_835){var Add=_833(_835,{declaredClass:"esri.dijit.editing.Add",type:"edit",label:"Add Features",constructor:function(_836){_836=_836||{};if(!_836.featureLayer){console.error("In constructor of 'esri.dijit.editing.Add', featureLayer is not provided");return;}this._featureLayer=_836.featureLayer;if(!_836.addedGraphics){console.error("In constructor of 'esri.dijit.editing.Add', no graphics provided");return;}this._addedGraphics=_836.addedGraphics;},performUndo:function(){this._featureLayer.applyEdits(null,null,this._addedGraphics);},performRedo:function(){this._featureLayer.applyEdits(this._addedGraphics,null,null);}});if(has("extend-esri")){lang.setObject("dijit.editing.Add",Add,_834);}return Add;});},"dijit/Tooltip":function(){require({cache:{"url:dijit/templates/Tooltip.html":"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\"\n\t><div class=\"dijitTooltipContainer dijitTooltipContents\" data-dojo-attach-point=\"containerNode\" role='alert'></div\n\t><div class=\"dijitTooltipConnector\" data-dojo-attach-point=\"connectorNode\"></div\n></div>\n"}});define("dijit/Tooltip",["dojo/_base/array","dojo/_base/declare","dojo/_base/fx","dojo/dom","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang","dojo/mouse","dojo/on","dojo/sniff","./_base/manager","./place","./_Widget","./_TemplatedMixin","./BackgroundIframe","dojo/text!./templates/Tooltip.html","./main"],function(_837,_838,fx,dom,_839,_83a,_83b,lang,_83c,on,has,_83d,_83e,_83f,_840,_841,_842,_843){var _844=_838("dijit._MasterTooltip",[_83f,_840],{duration:_83d.defaultDuration,templateString:_842,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.bgIframe=new _841(this.domNode);this.fadeIn=fx.fadeIn({node:this.domNode,duration:this.duration,onEnd:lang.hitch(this,"_onShow")});this.fadeOut=fx.fadeOut({node:this.domNode,duration:this.duration,onEnd:lang.hitch(this,"_onHide")});},show:function(_845,_846,_847,rtl,_848){if(this.aroundNode&&this.aroundNode===_846&&this.containerNode.innerHTML==_845){return;}if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_845;if(_848){this.set("textDir",_848);}this.containerNode.align=rtl?"right":"left";var pos=_83e.around(this.domNode,_846,_847&&_847.length?_847:_849.defaultPosition,!rtl,lang.hitch(this,"orient"));var _84a=pos.aroundNodePos;if(pos.corner.charAt(0)=="M"&&pos.aroundCorner.charAt(0)=="M"){this.connectorNode.style.top=_84a.y+((_84a.h-this.connectorNode.offsetHeight)>>1)-pos.y+"px";this.connectorNode.style.left="";}else{if(pos.corner.charAt(1)=="M"&&pos.aroundCorner.charAt(1)=="M"){this.connectorNode.style.left=_84a.x+((_84a.w-this.connectorNode.offsetWidth)>>1)-pos.x+"px";}else{this.connectorNode.style.left="";this.connectorNode.style.top="";}}_83b.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_846;},orient:function(node,_84b,_84c,_84d,_84e){this.connectorNode.style.top="";var _84f=_84d.h,_850=_84d.w;node.className="dijitTooltip "+{"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove","BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_84b+"-"+_84c];this.domNode.style.width="auto";var size=_83a.position(this.domNode);if(has("ie")==9){size.w+=2;}var _851=Math.min((Math.max(_850,1)),size.w);_83a.setMarginBox(this.domNode,{w:_851});if(_84c.charAt(0)=="B"&&_84b.charAt(0)=="B"){var bb=_83a.position(node);var _852=this.connectorNode.offsetHeight;if(bb.h>_84f){var _853=_84f-((_84e.h+_852)>>1);this.connectorNode.style.top=_853+"px";this.connectorNode.style.bottom="";}else{this.connectorNode.style.bottom=Math.min(Math.max(_84e.h/2-_852/2,0),bb.h-_852)+"px";this.connectorNode.style.top="";}}else{this.connectorNode.style.top="";this.connectorNode.style.bottom="";}return Math.max(0,size.w-_850);},_onShow:function(){if(has("ie")){this.domNode.style.filter="";}},hide:function(_854){if(this._onDeck&&this._onDeck[1]==_854){this._onDeck=null;}else{if(this.aroundNode===_854){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}},_setAutoTextDir:function(node){this.applyTextDir(node,has("ie")?node.outerText:node.textContent);_837.forEach(node.children,function(_855){this._setAutoTextDir(_855);},this);},_setTextDirAttr:function(_856){this._set("textDir",_856);if(_856=="auto"){this._setAutoTextDir(this.containerNode);}else{this.containerNode.dir=this.textDir;}}});_843.showTooltip=function(_857,_858,_859,rtl,_85a){if(_859){_859=_837.map(_859,function(val){return {after:"after-centered",before:"before-centered"}[val]||val;});}if(!_849._masterTT){_843._masterTT=_849._masterTT=new _844();}return _849._masterTT.show(_857,_858,_859,rtl,_85a);};_843.hideTooltip=function(_85b){return _849._masterTT&&_849._masterTT.hide(_85b);};var _849=_838("dijit.Tooltip",_83f,{label:"",showDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(_85c){_837.forEach(this._connections||[],function(_85d){_837.forEach(_85d,function(_85e){_85e.remove();});},this);this._connectIds=_837.filter(lang.isArrayLike(_85c)?_85c:(_85c?[_85c]:[]),function(id){return dom.byId(id,this.ownerDocument);},this);this._connections=_837.map(this._connectIds,function(id){var node=dom.byId(id,this.ownerDocument),_85f=this.selector,_860=_85f?function(_861){return on.selector(_85f,_861);}:function(_862){return _862;},self=this;return [on(node,_860(_83c.enter),function(){self._onHover(this);}),on(node,_860("focusin"),function(){self._onHover(this);}),on(node,_860(_83c.leave),lang.hitch(self,"_onUnHover")),on(node,_860("focusout"),lang.hitch(self,"_onUnHover"))];},this);this._set("connectId",_85c);},addTarget:function(node){var id=node.id||node;if(_837.indexOf(this._connectIds,id)==-1){this.set("connectId",this._connectIds.concat(id));}},removeTarget:function(node){var id=node.id||node,idx=_837.indexOf(this._connectIds,id);if(idx>=0){this._connectIds.splice(idx,1);this.set("connectId",this._connectIds);}},buildRendering:function(){this.inherited(arguments);_839.add(this.domNode,"dijitTooltipData");},startup:function(){this.inherited(arguments);var ids=this.connectId;_837.forEach(lang.isArrayLike(ids)?ids:[ids],this.addTarget,this);},getContent:function(node){return this.label||this.domNode.innerHTML;},_onHover:function(_863){if(!this._showTimer){this._showTimer=this.defer(function(){this.open(_863);},this.showDelay);}},_onUnHover:function(){if(this._showTimer){this._showTimer.remove();delete this._showTimer;}this.close();},open:function(_864){if(this._showTimer){this._showTimer.remove();delete this._showTimer;}var _865=this.getContent(_864);if(!_865){return;}_849.show(_865,_864,this.position,!this.isLeftToRight(),this.textDir);this._connectNode=_864;this.onShow(_864,this.position);},close:function(){if(this._connectNode){_849.hide(this._connectNode);delete this._connectNode;this.onHide();}if(this._showTimer){this._showTimer.remove();delete this._showTimer;}},onShow:function(){},onHide:function(){},destroy:function(){this.close();_837.forEach(this._connections||[],function(_866){_837.forEach(_866,function(_867){_867.remove();});},this);this.inherited(arguments);}});_849._MasterTooltip=_844;_849.show=_843.showTooltip;_849.hide=_843.hideTooltip;_849.defaultPosition=["after-centered","before-centered"];return _849;});},"dijit/form/DropDownButton":function(){require({cache:{"url:dijit/form/templates/DropDownButton.html":"<span class=\"dijit dijitReset dijitInline\"\n\t><span class='dijitReset dijitInline dijitButtonNode'\n\t\tdata-dojo-attach-event=\"ondijitclick:_onClick\" data-dojo-attach-point=\"_buttonNode\"\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\tdata-dojo-attach-point=\"focusNode,titleNode,_arrowWrapperNode\"\n\t\t\trole=\"button\" aria-haspopup=\"true\" aria-labelledby=\"${id}_label\"\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\"\n\t\t\t\tdata-dojo-attach-point=\"iconNode\"\n\t\t\t></span\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\tdata-dojo-attach-point=\"containerNode,_popupStateNode\"\n\t\t\t\tid=\"${id}_label\"\n\t\t\t></span\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonInner\"></span\n\t\t\t><span class=\"dijitReset dijitInline dijitArrowButtonChar\">&#9660;</span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\" tabIndex=\"-1\"\n\t\tdata-dojo-attach-point=\"valueNode\" role=\"presentation\"\n/></span>\n"}});define("dijit/form/DropDownButton",["dojo/_base/declare","dojo/_base/lang","dojo/query","../registry","../popup","./Button","../_Container","../_HasDropDown","dojo/text!./templates/DropDownButton.html"],function(_868,lang,_869,_86a,_86b,_86c,_86d,_86e,_86f){return _868("dijit.form.DropDownButton",[_86c,_86d,_86e],{baseClass:"dijitDropDownButton",templateString:_86f,_fillContent:function(){if(this.srcNodeRef){var _870=_869("*",this.srcNodeRef);this.inherited(arguments,[_870[0]]);this.dropDownContainer=this.srcNodeRef;}},startup:function(){if(this._started){return;}if(!this.dropDown&&this.dropDownContainer){var _871=_869("[widgetId]",this.dropDownContainer)[0];this.dropDown=_86a.byNode(_871);delete this.dropDownContainer;}if(this.dropDown){_86b.hide(this.dropDown);}this.inherited(arguments);},isLoaded:function(){var _872=this.dropDown;return (!!_872&&(!_872.href||_872.isLoaded));},loadDropDown:function(_873){var _874=this.dropDown;var _875=_874.on("load",lang.hitch(this,function(){_875.remove();_873();}));_874.refresh();},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown;}});});},"dijit/form/_FormValueMixin":function(){define("dijit/form/_FormValueMixin",["dojo/_base/declare","dojo/dom-attr","dojo/keys","dojo/sniff","./_FormWidgetMixin"],function(_876,_877,keys,has,_878){return _876("dijit.form._FormValueMixin",_878,{readOnly:false,_setReadOnlyAttr:function(_879){_877.set(this.focusNode,"readOnly",_879);this._set("readOnly",_879);},postCreate:function(){this.inherited(arguments);if(has("ie")){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);}if(this._resetValue===undefined){this._lastValueReported=this._resetValue=this.value;}},_setValueAttr:function(_87a,_87b){this._handleOnChange(_87a,_87b);},_handleOnChange:function(_87c,_87d){this._set("value",_87c);this.inherited(arguments);},undo:function(){this._setValueAttr(this._lastValueReported,false);},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true);},_onKeyDown:function(e){if(e.keyCode==keys.ESCAPE&&!(e.ctrlKey||e.altKey||e.metaKey)){if(has("ie")<9||(has("ie")&&has("quirks"))){e.preventDefault();var node=e.srcElement,te=node.ownerDocument.createEventObject();te.keyCode=keys.ESCAPE;te.shiftKey=e.shiftKey;node.fireEvent("onkeypress",te);}}}});});},"dojox/date/islamic/locale":function(){define("dojox/date/islamic/locale",["../..","dojo/_base/lang","dojo/_base/array","dojo/date","dojo/i18n","dojo/regexp","dojo/string","./Date","dojo/i18n!dojo/cldr/nls/islamic"],function(_87e,lang,arr,dd,i18n,_87f,_880,_881,_882){var _883=lang.getObject("date.islamic.locale",true,_87e);function _884(_885,_886,_887,_888,_889){return _889.replace(/([a-z])\1*/ig,function(_88a){var s,pad;var c=_88a.charAt(0);var l=_88a.length;var _88b=["abbr","wide","narrow"];switch(c){case "G":s=_886["eraAbbr"][0];break;case "y":s=String(_885.getFullYear());break;case "M":var m=_885.getMonth();if(l<3){s=m+1;pad=true;}else{var _88c=["months","format",_88b[l-3]].join("-");s=_886[_88c][m];}break;case "d":s=_885.getDate(true);pad=true;break;case "E":var d=_885.getDay();if(l<3){s=d+1;pad=true;}else{var _88d=["days","format",_88b[l-3]].join("-");s=_886[_88d][d];}break;case "a":var _88e=(_885.getHours()<12)?"am":"pm";s=_886["dayPeriods-format-wide-"+_88e];break;case "h":case "H":case "K":case "k":var h=_885.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_885.getMinutes();pad=true;break;case "s":s=_885.getSeconds();pad=true;break;case "S":s=Math.round(_885.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "z":s=dd.getTimezoneName(_885.toGregorian());if(s){break;}l=4;case "Z":var _88f=_885.toGregorian().getTimezoneOffset();var tz=[(_88f<=0?"+":"-"),_880.pad(Math.floor(Math.abs(_88f)/60),2),_880.pad(Math.abs(_88f)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojox.date.islamic.locale.formatPattern: invalid pattern char: "+_889);}if(pad){s=_880.pad(s,l);}return s;});};_883.format=function(_890,_891){_891=_891||{};var _892=i18n.normalizeLocale(_891.locale);var _893=_891.formatLength||"short";var _894=_883._getIslamicBundle(_892);var str=[];var _895=lang.hitch(this,_884,_890,_894,_892,_891.fullYear);if(_891.selector=="year"){var year=_890.getFullYear();return year;}if(_891.selector!="time"){var _896=_891.datePattern||_894["dateFormat-"+_893];if(_896){str.push(_897(_896,_895));}}if(_891.selector!="date"){var _898=_891.timePattern||_894["timeFormat-"+_893];if(_898){str.push(_897(_898,_895));}}var _899=str.join(" ");return _899;};_883.regexp=function(_89a){return _883._parseInfo(_89a).regexp;};_883._parseInfo=function(_89b){_89b=_89b||{};var _89c=i18n.normalizeLocale(_89b.locale);var _89d=_883._getIslamicBundle(_89c);var _89e=_89b.formatLength||"short";var _89f=_89b.datePattern||_89d["dateFormat-"+_89e];var _8a0=_89b.timePattern||_89d["timeFormat-"+_89e];var _8a1;if(_89b.selector=="date"){_8a1=_89f;}else{if(_89b.selector=="time"){_8a1=_8a0;}else{_8a1=(typeof (_8a0)=="undefined")?_89f:_89f+" "+_8a0;}}var _8a2=[];var re=_897(_8a1,lang.hitch(this,_8a3,_8a2,_89d,_89b));return {regexp:re,tokens:_8a2,bundle:_89d};};_883.parse=function(_8a4,_8a5){_8a4=_8a4.replace(/[\u200E\u200F\u202A\u202E]/g,"");if(!_8a5){_8a5={};}var info=_883._parseInfo(_8a5);var _8a6=info.tokens,_882=info.bundle;var _8a7=info.regexp.replace(/[\u200E\u200F\u202A\u202E]/g,"");var re=new RegExp("^"+_8a7+"$");var _8a8=re.exec(_8a4);var _8a9=i18n.normalizeLocale(_8a5.locale);if(!_8a8){return null;}var date,_8aa;var _8ab=[1389,0,1,0,0,0,0];var amPm="";var _8ac=0;var _8ad=["abbr","wide","narrow"];var _8ae=arr.every(_8a8,function(v,i){if(!i){return true;}var _8af=_8a6[i-1];var l=_8af.length;switch(_8af.charAt(0)){case "y":_8ab[0]=Number(v);break;case "M":if(l>2){var _8b0=_882["months-format-"+_8ad[l-3]].concat();if(!_8a5.strict){v=v.replace(".","").toLowerCase();_8b0=arr.map(_8b0,function(s){return s?s.replace(".","").toLowerCase():s;});}v=arr.indexOf(_8b0,v);if(v==-1){return false;}_8ac=l;}else{v--;}_8ab[1]=Number(v);break;case "D":_8ab[1]=0;case "d":_8ab[2]=Number(v);break;case "a":var am=_8a5.am||_882["dayPeriods-format-wide-am"],pm=_8a5.pm||_882["dayPeriods-format-wide-pm"];if(!_8a5.strict){var _8b1=/\./g;v=v.replace(_8b1,"").toLowerCase();am=am.replace(_8b1,"").toLowerCase();pm=pm.replace(_8b1,"").toLowerCase();}if(_8a5.strict&&v!=am&&v!=pm){return false;}amPm=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":_8ab[3]=Number(v);break;case "m":_8ab[4]=Number(v);break;case "s":_8ab[5]=Number(v);break;case "S":_8ab[6]=Number(v);}return true;});var _8b2=+_8ab[3];if(amPm==="p"&&_8b2<12){_8ab[3]=_8b2+12;}else{if(amPm==="a"&&_8b2==12){_8ab[3]=0;}}var _8b3=new _881(_8ab[0],_8ab[1],_8ab[2],_8ab[3],_8ab[4],_8ab[5],_8ab[6]);return _8b3;};function _897(_8b4,_8b5,_8b6,_8b7){var _8b8=function(x){return x;};_8b5=_8b5||_8b8;_8b6=_8b6||_8b8;_8b7=_8b7||_8b8;var _8b9=_8b4.match(/(''|[^'])+/g);var _8ba=_8b4.charAt(0)=="'";arr.forEach(_8b9,function(_8bb,i){if(!_8bb){_8b9[i]="";}else{_8b9[i]=(_8ba?_8b6:_8b5)(_8bb);_8ba=!_8ba;}});return _8b7(_8b9.join(""));};function _8a3(_8bc,_8bd,_8be,_8bf){_8bf=_87f.escapeString(_8bf);var _8c0=i18n.normalizeLocale(_8be.locale);return _8bf.replace(/([a-z])\1*/ig,function(_8c1){var s;var c=_8c1.charAt(0);var l=_8c1.length;var p2="",p3="";if(_8be.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d+";break;case "M":s=(l>2)?"\\S+ ?\\S+":p2+"[1-9]|1[0-2]";break;case "d":s="[12]\\d|"+p2+"[1-9]|3[01]";break;case "E":s="\\S+";break;case "h":s=p2+"[1-9]|1[0-2]";break;case "k":s=p2+"\\d|1[01]";break;case "H":s=p2+"\\d|1\\d|2[0-3]";break;case "K":s=p2+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":s=p2+"\\d|[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_8be.am||_8bd["dayPeriods-format-wide-am"],pm=_8be.pm||_8bd["dayPeriods-format-wide-pm"];if(_8be.strict){s=am+"|"+pm;}else{s=am+"|"+pm;if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}}break;default:s=".*";}if(_8bc){_8bc.push(_8c1);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};var _8c2=[];_883.addCustomFormats=function(_8c3,_8c4){_8c2.push({pkg:_8c3,name:_8c4});};_883._getIslamicBundle=function(_8c5){var _8c6={};arr.forEach(_8c2,function(desc){var _8c7=i18n.getLocalization(desc.pkg,desc.name,_8c5);_8c6=lang.mixin(_8c6,_8c7);},this);return _8c6;};_883.addCustomFormats("dojo.cldr","islamic");_883.getNames=function(item,type,_8c8,_8c9,date){var _8ca;var _8cb=_883._getIslamicBundle(_8c9);var _8cc=[item,_8c8,type];if(_8c8=="standAlone"){var key=_8cc.join("-");_8ca=_8cb[key];if(_8ca[0]==1){_8ca=undefined;}}_8cc[1]="format";return (_8ca||_8cb[_8cc.join("-")]).concat();};_883.weekDays=_883.getNames("days","wide","format");_883.months=_883.getNames("months","wide","format");return _883;});},"dijit/form/_FormWidgetMixin":function(){define("dijit/form/_FormWidgetMixin",["dojo/_base/array","dojo/_base/declare","dojo/dom-attr","dojo/dom-style","dojo/_base/lang","dojo/mouse","dojo/sniff","dojo/window","../a11y"],function(_8cd,_8ce,_8cf,_8d0,lang,_8d1,has,_8d2,a11y){return _8ce("dijit.form._FormWidgetMixin",null,{name:"",alt:"",value:"",type:"text","aria-label":"focusNode",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:false,intermediateChanges:false,scrollOnFocus:true,_setIdAttr:"focusNode",_setDisabledAttr:function(_8d3){this._set("disabled",_8d3);_8cf.set(this.focusNode,"disabled",_8d3);if(this.valueNode){_8cf.set(this.valueNode,"disabled",_8d3);}this.focusNode.setAttribute("aria-disabled",_8d3?"true":"false");if(_8d3){this._set("hovering",false);this._set("active",false);var _8d4="tabIndex" in this.attributeMap?this.attributeMap.tabIndex:("_setTabIndexAttr" in this)?this._setTabIndexAttr:"focusNode";_8cd.forEach(lang.isArray(_8d4)?_8d4:[_8d4],function(_8d5){var node=this[_8d5];if(has("webkit")||a11y.hasDefaultTabStop(node)){node.setAttribute("tabIndex","-1");}else{node.removeAttribute("tabIndex");}},this);}else{if(this.tabIndex!=""){this.set("tabIndex",this.tabIndex);}}},_onFocus:function(by){if(by=="mouse"&&this.isFocusable()){var _8d6=this.connect(this.focusNode,"onfocus",function(){this.disconnect(_8d7);this.disconnect(_8d6);});var _8d7=this.connect(this.ownerDocumentBody,"onmouseup",function(){this.disconnect(_8d7);this.disconnect(_8d6);if(this.focused){this.focus();}});}if(this.scrollOnFocus){this.defer(function(){_8d2.scrollIntoView(this.domNode);});}this.inherited(arguments);},isFocusable:function(){return !this.disabled&&this.focusNode&&(_8d0.get(this.domNode,"display")!="none");},focus:function(){if(!this.disabled&&this.focusNode.focus){try{this.focusNode.focus();}catch(e){}}},compare:function(val1,val2){if(typeof val1=="number"&&typeof val2=="number"){return (isNaN(val1)&&isNaN(val2))?0:val1-val2;}else{if(val1>val2){return 1;}else{if(val1<val2){return -1;}else{return 0;}}}},onChange:function(){},_onChangeActive:false,_handleOnChange:function(_8d8,_8d9){if(this._lastValueReported==undefined&&(_8d9===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=_8d8;}this._pendingOnChange=this._pendingOnChange||(typeof _8d8!=typeof this._lastValueReported)||(this.compare(_8d8,this._lastValueReported)!=0);if((this.intermediateChanges||_8d9||_8d9===undefined)&&this._pendingOnChange){this._lastValueReported=_8d8;this._pendingOnChange=false;if(this._onChangeActive){if(this._onChangeHandle){this._onChangeHandle.remove();}this._onChangeHandle=this.defer(function(){this._onChangeHandle=null;this.onChange(_8d8);});}}},create:function(){this.inherited(arguments);this._onChangeActive=true;},destroy:function(){if(this._onChangeHandle){this._onChangeHandle.remove();this.onChange(this._lastValueReported);}this.inherited(arguments);}});});},"dijit/a11yclick":function(){define("dijit/a11yclick",["dojo/on","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/has","dojo/_base/unload","dojo/_base/window"],function(on,_8da,keys,_8db,has,_8dc,win){var _8dd=null;if(has("dom-addeventlistener")){win.doc.addEventListener("keydown",function(evt){_8dd=evt.target;},true);}else{(function(){var _8de=function(evt){_8dd=evt.srcElement;};win.doc.attachEvent("onkeydown",_8de);_8dc.addOnWindowUnload(function(){win.doc.detachEvent("onkeydown",_8de);});})();}function _8df(e){return (e.keyCode===keys.ENTER||e.keyCode===keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey;};return function(node,_8e0){if(/input|button/i.test(node.nodeName)){return on(node,"click",_8e0);}else{var _8e1=[on(node,"keydown",function(e){if(_8df(e)){_8dd=e.target;e.preventDefault();}}),on(node,"keyup",function(e){if(_8df(e)&&e.target==_8dd){_8dd=null;on.emit(e.target,"click",{cancelable:true,bubbles:true});}}),on(node,"click",function(e){_8e0.call(this,e);})];if(has("touch")){var _8e2;_8e1.push(on(node,"touchend",function(e){var _8e3=e.target;_8e2=setTimeout(function(){_8e2=null;on.emit(_8e3,"click",{cancelable:true,bubbles:true});},600);}),on(node,"click",function(e){if(_8e2){clearTimeout(_8e2);}}));}return {remove:function(){_8da.forEach(_8e1,function(h){h.remove();});if(_8e2){clearTimeout(_8e2);_8e2=null;}}};}};return ret;});},"url:dijit/templates/ProgressBar.html":"<div class=\"dijitProgressBar dijitProgressBarEmpty\" role=\"progressbar\"\n\t><div  data-dojo-attach-point=\"internalProgress\" class=\"dijitProgressBarFull\"\n\t\t><div class=\"dijitProgressBarTile\" role=\"presentation\"></div\n\t\t><span style=\"visibility:hidden\">&#160;</span\n\t></div\n\t><div data-dojo-attach-point=\"labelNode\" class=\"dijitProgressBarLabel\" id=\"${id}_label\"></div\n\t><img data-dojo-attach-point=\"indeterminateHighContrastImage\" class=\"dijitProgressBarIndeterminateHighContrastImage\" alt=\"\"\n/></div>\n","esri/toolbars/draw":function(){define("esri/toolbars/draw",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/Color","dojo/_base/window","dojo/has","dojo/keys","dojo/dom-construct","dojo/dom-style","esri/kernel","esri/sniff","esri/toolbars/_toolbar","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleFillSymbol","esri/graphic","esri/geometry/jsonUtils","esri/geometry/webMercatorUtils","esri/geometry/Polyline","esri/geometry/Polygon","esri/geometry/Multipoint","esri/geometry/Rect","dojo/i18n!esri/nls/jsapi"],function(_8e4,lang,_8e5,_8e6,_8e7,win,has,keys,_8e8,_8e9,_8ea,_8eb,_8ec,_8ed,_8ee,_8ef,_8f0,_8f1,_8f2,_8f3,_8f4,_8f5,Rect,_8f6){var DRAW=_8e4(_8ec,{declaredClass:"esri.toolbars.Draw",_eventMap:{"draw-complete":true,"draw-end":["geometry"]},constructor:function(map,_8f7){this.markerSymbol=new _8ed(_8ed.STYLE_SOLID,10,new _8ee(_8ee.STYLE_SOLID,new _8e7([255,0,0]),2),new _8e7([0,0,0,0.25]));this.lineSymbol=new _8ee(_8ee.STYLE_SOLID,new _8e7([255,0,0]),2);this.fillSymbol=new _8ef(_8ef.STYLE_SOLID,new _8ee(_8ee.STYLE_SOLID,new _8e7([255,0,0]),2),new _8e7([0,0,0,0.25]));this._points=[];this._defaultOptions={showTooltips:true,drawTime:75,tolerance:8,tooltipOffset:15};this._options=lang.mixin(lang.mixin({},this._defaultOptions),_8f7||{});this._mouse=!has("esri-touch")&&!has("esri-pointer");if(!this._mouse){this._options.showTooltips=false;}this._onKeyDownHandler=lang.hitch(this,this._onKeyDownHandler);this._onMouseDownHandler=lang.hitch(this,this._onMouseDownHandler);this._onMouseUpHandler=lang.hitch(this,this._onMouseUpHandler);this._onClickHandler=lang.hitch(this,this._onClickHandler);this._onMouseMoveHandler=lang.hitch(this,this._onMouseMoveHandler);this._onMouseDragHandler=lang.hitch(this,this._onMouseDragHandler);this._onDblClickHandler=lang.hitch(this,this._onDblClickHandler);this._updateTooltip=lang.hitch(this,this._updateTooltip);this._hideTooltip=lang.hitch(this,this._hideTooltip);this._redrawGraphic=lang.hitch(this,this._redrawGraphic);},_geometryType:null,respectDrawingVertexOrder:false,setRespectDrawingVertexOrder:function(set){this.respectDrawingVertexOrder=set;},setMarkerSymbol:function(_8f8){this.markerSymbol=_8f8;},setLineSymbol:function(_8f9){this.lineSymbol=_8f9;},setFillSymbol:function(_8fa){this.fillSymbol=_8fa;},activate:function(_8fb,_8fc){if(this._geometryType){this.deactivate();}var map=this.map,dc=_8e6.connect,Draw=DRAW;this._options=lang.mixin(lang.mixin({},this._options),_8fc||{});map.navigationManager.setImmediateClick(false);switch(_8fb){case Draw.ARROW:case Draw.LEFT_ARROW:case Draw.RIGHT_ARROW:case Draw.UP_ARROW:case Draw.DOWN_ARROW:case Draw.TRIANGLE:case Draw.CIRCLE:case Draw.ELLIPSE:case Draw.RECTANGLE:this._deactivateMapTools(true,false,false,true);this._onClickHandler_connect=dc(map,"onClick",this._onClickHandler);this._onMouseDownHandler_connect=dc(map,!this._mouse?"onSwipeStart":"onMouseDown",this._onMouseDownHandler);this._onMouseDragHandler_connect=dc(map,!this._mouse?"onSwipeMove":"onMouseDrag",this._onMouseDragHandler);this._onMouseUpHandler_connect=dc(map,!this._mouse?"onSwipeEnd":"onMouseUp",this._onMouseUpHandler);if(has("esri-touch")&&!has("esri-pointer")){this._onMouseDownHandler2_connect=dc(map,"onMouseDown",this._onMouseDownHandler);this._onMouseDragHandler2_connect=dc(map,"onMouseDrag",this._onMouseDragHandler);this._onMouseUpHandler2_connect=dc(map,"onMouseUp",this._onMouseUpHandler);}break;case Draw.POINT:this._onClickHandler_connect=dc(map,"onClick",this._onClickHandler);break;case Draw.LINE:case Draw.EXTENT:case Draw.FREEHAND_POLYLINE:case Draw.FREEHAND_POLYGON:this._deactivateMapTools(true,false,false,true);this._onMouseDownHandler_connect=dc(map,!this._mouse?"onSwipeStart":"onMouseDown",this._onMouseDownHandler);this._onMouseDragHandler_connect=dc(map,!this._mouse?"onSwipeMove":"onMouseDrag",this._onMouseDragHandler);this._onMouseUpHandler_connect=dc(map,!this._mouse?"onSwipeEnd":"onMouseUp",this._onMouseUpHandler);if(has("esri-touch")&&!has("esri-pointer")){this._onMouseDownHandler2_connect=dc(map,"onMouseDown",this._onMouseDownHandler);this._onMouseDragHandler2_connect=dc(map,"onMouseDrag",this._onMouseDragHandler);this._onMouseUpHandler2_connect=dc(map,"onMouseUp",this._onMouseUpHandler);}break;case Draw.POLYLINE:case Draw.POLYGON:case Draw.MULTI_POINT:map.navigationManager.setImmediateClick(true);this._onClickHandler_connect=dc(map,"onClick",this._onClickHandler);this._onDblClickHandler_connect=dc(map,"onDblClick",this._onDblClickHandler);map.disableDoubleClickZoom();break;default:console.error("Unsupported geometry type: "+_8fb);return;}this._onKeyDown_connect=dc(map,"onKeyDown",this._onKeyDownHandler);this._redrawConnect=dc(map,"onExtentChange",this._redrawGraphic);this._geometryType=_8fb;this._toggleTooltip(true);if(map.snappingManager&&this._geometryType!=="freehandpolyline"&&this._geometryType!=="freehandpolygon"&&this._mouse){map.snappingManager._startSelectionLayerQuery();map.snappingManager._setUpSnapping();}this.onActivate(this._geometryType);},deactivate:function(){var map=this.map;this._clear();var ddc=_8e6.disconnect;ddc(this._onMouseMoveHandler_connect);ddc(this._onMouseDownHandler_connect);ddc(this._onMouseDragHandler_connect);ddc(this._onMouseUpHandler_connect);ddc(this._onMouseDownHandler2_connect);ddc(this._onMouseDragHandler2_connect);ddc(this._onMouseUpHandler2_connect);ddc(this._onClickHandler_connect);ddc(this._onDblClickHandler_connect);ddc(this._onKeyDown_connect);ddc(this._redrawConnect);this._onMouseDownHandler_connect=this._onMouseMoveHandler_connect=this._onMouseDragHandler_connect=this._onMouseUpHandler_connect=this._onMouseDownHandler2_connect=this._onMouseDragHandler2_connect=this._onMouseUpHandler2_connect=this._onClickHandler_connect=this._onDblClickHandler_connect=this._onKeyDown_connect=this._redrawConnect=null;if(map.snappingManager){map.snappingManager._stopSelectionLayerQuery();map.snappingManager._killOffSnapping();}switch(this._geometryType){case DRAW.CIRCLE:case DRAW.ELLIPSE:case DRAW.TRIANGLE:case DRAW.ARROW:case DRAW.LEFT_ARROW:case DRAW.RIGHT_ARROW:case DRAW.UP_ARROW:case DRAW.DOWN_ARROW:case DRAW.RECTANGLE:case DRAW.LINE:case DRAW.EXTENT:case DRAW.FREEHAND_POLYLINE:case DRAW.FREEHAND_POLYGON:this._activateMapTools(true,false,false,true);break;case this.POLYLINE:case this.POLYGON:case this.MULTI_POINT:map.enableDoubleClickZoom();break;}var _8fd=this._geometryType;this._geometryType=null;map.navigationManager.setImmediateClick(false);this._toggleTooltip(false);this.onDeactivate(_8fd);},_clear:function(){if(this._graphic){this.map.graphics.remove(this._graphic,true);}if(this._tGraphic){this.map.graphics.remove(this._tGraphic,true);}this._graphic=this._tGraphic=null;if(this.map.snappingManager){this.map.snappingManager._setGraphic(null);}this._points=[];},finishDrawing:function(){var _8fe,_8ff=this._points,map=this.map,_900=map.spatialReference,Draw=DRAW;_8ff=_8ff.slice(0,_8ff.length);switch(this._geometryType){case Draw.POLYLINE:if(!this._graphic||_8ff.length<2){return;}_8fe=new _8f3(_900);_8fe.addPath([].concat(_8ff));break;case Draw.POLYGON:if(!this._graphic||_8ff.length<3){return;}_8fe=new _8f4(_900);var ring=[].concat(_8ff,[_8ff[0].offset(0,0)]);if(!_8f4.prototype.isClockwise(ring)&&!this.respectDrawingVertexOrder){console.debug(this.declaredClass+" :  Polygons drawn in anti-clockwise direction will be reversed to be clockwise.");ring.reverse();}_8fe.addRing(ring);break;case Draw.MULTI_POINT:_8fe=new _8f5(_900);_8e5.forEach(_8ff,function(pt){_8fe.addPoint(pt);});break;}_8e6.disconnect(this._onMouseMoveHandler_connect);this._clear();this._setTooltipMessage(0);this._drawEnd(_8fe);},_drawEnd:function(_901){if(_901){var _902=this.map.spatialReference,geo;this.onDrawEnd(_901);if(_902){if(_902.isWebMercator()){geo=_8f2.webMercatorToGeographic(_901,true);}else{if(_902.wkid===4326){geo=_8f1.fromJson(_901.toJson());}}}this.onDrawComplete({geometry:_901,geographicGeometry:geo});}},_normalizeRect:function(_903,end,_904){var sx=_903.x,sy=_903.y,ex=end.x,ey=end.y,_905=Math.abs(sx-ex),_906=Math.abs(sy-ey);return {x:Math.min(sx,ex),y:Math.max(sy,ey),width:_905,height:_906,spatialReference:_904};},_onMouseDownHandler:function(evt){this._dragged=false;var _907;if(this.map.snappingManager){_907=this.map.snappingManager._snappingPoint;}var _908=_907||evt.mapPoint,Draw=DRAW,map=this.map,_909=map.spatialReference;this._points.push(_908.offset(0,0));switch(this._geometryType){case Draw.LINE:this._graphic=map.graphics.add(new _8f0(new _8f3({paths:[[[_908.x,_908.y],[_908.x,_908.y]]],spatialReference:_909}),this.lineSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}break;case Draw.EXTENT:break;case Draw.FREEHAND_POLYLINE:this._oldPoint=evt.screenPoint;var _90a=new _8f3(_909);_90a.addPath(this._points);this._graphic=map.graphics.add(new _8f0(_90a,this.lineSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}break;case Draw.CIRCLE:case Draw.ELLIPSE:case Draw.TRIANGLE:case Draw.ARROW:case Draw.LEFT_ARROW:case Draw.RIGHT_ARROW:case Draw.UP_ARROW:case Draw.DOWN_ARROW:case Draw.RECTANGLE:case Draw.FREEHAND_POLYGON:this._oldPoint=evt.screenPoint;var _90b=new _8f4(_909);_90b.addRing(this._points);this._graphic=map.graphics.add(new _8f0(_90b,this.fillSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}break;}if(has("esri-touch")){evt.preventDefault();}},_onMouseMoveHandler:function(evt){var _90c;if(this.map.snappingManager){_90c=this.map.snappingManager._snappingPoint;}var _90d=this._points[this._points.length-1],end=_90c||evt.mapPoint,_90e=this._tGraphic,geom=_90e.geometry;switch(this._geometryType){case DRAW.POLYLINE:case DRAW.POLYGON:geom.setPoint(0,0,{x:_90d.x,y:_90d.y});geom.setPoint(0,1,{x:end.x,y:end.y});_90e.setGeometry(geom);break;}},_onMouseDragHandler:function(evt){if(has("esri-touch")&&!this._points.length){evt.preventDefault();return;}this._dragged=true;var _90f;if(this.map.snappingManager){_90f=this.map.snappingManager._snappingPoint;}var _910=this._points[0],end=_90f||evt.mapPoint,map=this.map,_911=map.spatialReference,_912=this._graphic,Draw=DRAW,_913=map.toScreen(_910),_914=map.toScreen(end),pts=[],a=_914.x-_913.x,b=_914.y-_913.y,_915=60,d=Math.sqrt(a*a+b*b);switch(this._geometryType){case Draw.CIRCLE:this._hideTooltip();_912.geometry=_8f4.createCircle({center:_913,r:d,numberOfPoints:_915,map:map});_912.setGeometry(_912.geometry);break;case Draw.ELLIPSE:this._hideTooltip();_912.geometry=_8f4.createEllipse({center:_913,longAxis:a,shortAxis:b,numberOfPoints:_915,map:map});_912.setGeometry(_912.geometry);break;case Draw.TRIANGLE:this._hideTooltip();pts=[[0,-d],[0.8660254037844386*d,0.5*d],[-0.8660254037844386*d,0.5*d],[0,-d]];_912.geometry=this._toPolygon(pts,_913.x,_913.y);_912.setGeometry(_912.geometry);break;case Draw.ARROW:this._hideTooltip();var sina=b/d,cosa=a/d,tana=b/a;var f=cosa*0.25*d,e=0.25*d/tana,g=sina*0.25*d;pts=[[a,b],[a-f*(1+24/e),b+24*cosa-g],[a-f*(1+12/e),b+12*cosa-g],[-12*sina,12*cosa],[12*sina,-12*cosa],[a-f*(1-12/e),b-12*cosa-g],[a-f*(1-24/e),b-24*cosa-g],[a,b]];_912.geometry=this._toPolygon(pts,_913.x,_913.y);_912.setGeometry(_912.geometry);break;case Draw.LEFT_ARROW:this._hideTooltip();if(a<=0){pts=[[a,0],[0.75*a,b],[0.75*a,0.5*b],[0,0.5*b],[0,-0.5*b],[0.75*a,-0.5*b],[0.75*a,-b],[a,0]];}else{pts=[[0,0],[0.25*a,b],[0.25*a,0.5*b],[a,0.5*b],[a,-0.5*b],[0.25*a,-0.5*b],[0.25*a,-b],[0,0]];}_912.geometry=this._toPolygon(pts,_913.x,_913.y);_912.setGeometry(_912.geometry);break;case Draw.RIGHT_ARROW:this._hideTooltip();if(a>=0){pts=[[a,0],[0.75*a,b],[0.75*a,0.5*b],[0,0.5*b],[0,-0.5*b],[0.75*a,-0.5*b],[0.75*a,-b],[a,0]];}else{pts=[[0,0],[0.25*a,b],[0.25*a,0.5*b],[a,0.5*b],[a,-0.5*b],[0.25*a,-0.5*b],[0.25*a,-b],[0,0]];}_912.geometry=this._toPolygon(pts,_913.x,_913.y);_912.setGeometry(_912.geometry);break;case Draw.UP_ARROW:this._hideTooltip();if(b<=0){pts=[[0,b],[-a,0.75*b],[-0.5*a,0.75*b],[-0.5*a,0],[0.5*a,0],[0.5*a,0.75*b],[a,0.75*b],[0,b]];}else{pts=[[0,0],[-a,0.25*b],[-0.5*a,0.25*b],[-0.5*a,b],[0.5*a,b],[0.5*a,0.25*b],[a,0.25*b],[0,0]];}_912.geometry=this._toPolygon(pts,_913.x,_913.y);_912.setGeometry(_912.geometry);break;case Draw.DOWN_ARROW:this._hideTooltip();if(b>=0){pts=[[0,b],[-a,0.75*b],[-0.5*a,0.75*b],[-0.5*a,0],[0.5*a,0],[0.5*a,0.75*b],[a,0.75*b],[0,b]];}else{pts=[[0,0],[-a,0.25*b],[-0.5*a,0.25*b],[-0.5*a,b],[0.5*a,b],[0.5*a,0.25*b],[a,0.25*b],[0,0]];}_912.geometry=this._toPolygon(pts,_913.x,_913.y);_912.setGeometry(_912.geometry);break;case Draw.RECTANGLE:this._hideTooltip();pts=[[0,0],[a,0],[a,b],[0,b],[0,0]];_912.geometry=this._toPolygon(pts,_913.x,_913.y);_912.setGeometry(_912.geometry);break;case Draw.LINE:_912.setGeometry(lang.mixin(_912.geometry,{paths:[[[_910.x,_910.y],[end.x,end.y]]]}));break;case Draw.EXTENT:if(_912){map.graphics.remove(_912,true);}var rect=new Rect(this._normalizeRect(_910,end,_911));rect._originOnly=true;this._graphic=map.graphics.add(new _8f0(rect,this.fillSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}break;case Draw.FREEHAND_POLYLINE:this._hideTooltip();if(this._canDrawFreehandPoint(evt)===false){if(has("esri-touch")){evt.preventDefault();}return;}this._points.push(evt.mapPoint.offset(0,0));_912.geometry._insertPoints([end.offset(0,0)],0);_912.setGeometry(_912.geometry);break;case Draw.FREEHAND_POLYGON:this._hideTooltip();if(this._canDrawFreehandPoint(evt)===false){if(has("esri-touch")){evt.preventDefault();}return;}this._points.push(evt.mapPoint.offset(0,0));_912.geometry._insertPoints([end.offset(0,0)],0);_912.setGeometry(_912.geometry);break;}if(has("esri-touch")){evt.preventDefault();}},_canDrawFreehandPoint:function(evt){if(!this._oldPoint){return false;}var dx=this._oldPoint.x-evt.screenPoint.x;dx=(dx<0)?dx*-1:dx;var dy=this._oldPoint.y-evt.screenPoint.y;dy=(dy<0)?dy*-1:dy;var _916=this._options.tolerance;if(dx<_916&&dy<_916){return false;}var now=new Date();var _917=now-this._startTime;if(_917<this._options.drawTime){return false;}this._startTime=now;this._oldPoint=evt.screenPoint;return true;},_onMouseUpHandler:function(evt){if(!this._dragged){this._clear();return;}if(this._points.length===0){this._points.push(evt.mapPoint.offset(0,0));}var _918;if(this.map.snappingManager){_918=this.map.snappingManager._snappingPoint;}var _919=this._points[0],end=_918||evt.mapPoint,map=this.map,_91a=map.spatialReference,Draw=DRAW,_91b;switch(this._geometryType){case Draw.CIRCLE:case Draw.ELLIPSE:case Draw.TRIANGLE:case Draw.ARROW:case Draw.LEFT_ARROW:case Draw.RIGHT_ARROW:case Draw.UP_ARROW:case Draw.DOWN_ARROW:case Draw.RECTANGLE:_91b=this._graphic.geometry;break;case Draw.LINE:_91b=new _8f3({paths:[[[_919.x,_919.y],[end.x,end.y]]],spatialReference:_91a});break;case Draw.EXTENT:_91b=(new Rect(this._normalizeRect(_919,end,_91a))).getExtent();break;case Draw.FREEHAND_POLYLINE:_91b=new _8f3(_91a);_91b.addPath([].concat(this._points,[end.offset(0,0)]));break;case Draw.FREEHAND_POLYGON:_91b=new _8f4(_91a);var ring=[].concat(this._points,[end.offset(0,0),this._points[0].offset(0,0)]);if(!_8f4.prototype.isClockwise(ring)&&!this.respectDrawingVertexOrder){console.debug(this.declaredClass+" :  Polygons drawn in anti-clockwise direction will be reversed to be clockwise.");ring.reverse();}_91b.addRing(ring);break;}if(has("esri-touch")){evt.preventDefault();}this._clear();this._drawEnd(_91b);},_onClickHandler:function(evt){var _91c;if(this.map.snappingManager){_91c=this.map.snappingManager._snappingPoint;}var _91d=_91c||evt.mapPoint,map=this.map,_91e=map.toScreen(_91d),Draw=DRAW,pts,dx,dy,_91f,geom,_920;this._points.push(_91d.offset(0,0));switch(this._geometryType){case Draw.POINT:this._drawEnd(_91d.offset(0,0));this._setTooltipMessage(0);break;case Draw.POLYLINE:if(this._points.length===1){var _921=new _8f3(map.spatialReference);_921.addPath(this._points);this._graphic=map.graphics.add(new _8f0(_921,this.lineSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}this._onMouseMoveHandler_connect=_8e6.connect(map,"onMouseMove",this._onMouseMoveHandler);this._tGraphic=map.graphics.add(new _8f0(new _8f3({paths:[[[_91d.x,_91d.y],[_91d.x,_91d.y]]],spatialReference:map.spatialReference}),this.lineSymbol),true);}else{this._graphic.geometry._insertPoints([_91d.offset(0,0)],0);this._graphic.setGeometry(this._graphic.geometry).setSymbol(this.lineSymbol);_91f=this._tGraphic;geom=_91f.geometry;geom.setPoint(0,0,_91d.offset(0,0));geom.setPoint(0,1,_91d.offset(0,0));_91f.setGeometry(geom);}break;case Draw.POLYGON:if(this._points.length===1){_920=new _8f4(map.spatialReference);_920.addRing(this._points);this._graphic=map.graphics.add(new _8f0(_920,this.fillSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}this._onMouseMoveHandler_connect=_8e6.connect(map,"onMouseMove",this._onMouseMoveHandler);this._tGraphic=map.graphics.add(new _8f0(new _8f3({paths:[[[_91d.x,_91d.y],[_91d.x,_91d.y]]],spatialReference:map.spatialReference}),this.fillSymbol),true);}else{this._graphic.geometry._insertPoints([_91d.offset(0,0)],0);this._graphic.setGeometry(this._graphic.geometry).setSymbol(this.fillSymbol);_91f=this._tGraphic;geom=_91f.geometry;geom.setPoint(0,0,_91d.offset(0,0));geom.setPoint(0,1,_91d.offset(0,0));_91f.setGeometry(geom);}break;case Draw.MULTI_POINT:var tps=this._points;if(tps.length===1){var _922=new _8f5(map.spatialReference);_922.addPoint(tps[tps.length-1]);this._graphic=map.graphics.add(new _8f0(_922,this.markerSymbol),true);if(map.snappingManager){map.snappingManager._setGraphic(this._graphic);}}else{this._graphic.geometry.addPoint(tps[tps.length-1]);this._graphic.setGeometry(this._graphic.geometry).setSymbol(this.markerSymbol);}break;case Draw.ARROW:pts=[[0,0],[-24,24],[-24,12],[-96,12],[-96,-12],[-24,-12],[-24,-24],[0,0]];dx=_91e.x;dy=_91e.y;this._addShape(pts,dx,dy);break;case Draw.LEFT_ARROW:pts=[[0,0],[24,24],[24,12],[96,12],[96,-12],[24,-12],[24,-24],[0,0]];dx=_91e.x;dy=_91e.y;this._addShape(pts,dx,dy);break;case Draw.RIGHT_ARROW:pts=[[0,0],[-24,24],[-24,12],[-96,12],[-96,-12],[-24,-12],[-24,-24],[0,0]];dx=_91e.x;dy=_91e.y;this._addShape(pts,dx,dy);break;case Draw.UP_ARROW:pts=[[0,0],[-24,24],[-12,24],[-12,96],[12,96],[12,24],[24,24],[0,0]];dx=_91e.x;dy=_91e.y;this._addShape(pts,dx,dy);break;case Draw.DOWN_ARROW:pts=[[0,0],[-24,-24],[-12,-24],[-12,-96],[12,-96],[12,-24],[24,-24],[0,0]];dx=_91e.x;dy=_91e.y;this._addShape(pts,dx,dy);break;case Draw.TRIANGLE:pts=[[0,-48],[41.56921938165306,24],[-41.56921938165306,24],[0,-48]];dx=_91e.x;dy=_91e.y;this._addShape(pts,dx,dy);break;case Draw.RECTANGLE:pts=[[0,-96],[96,-96],[96,0],[0,0],[0,-96]];dx=_91e.x-48;dy=_91e.y+48;this._addShape(pts,dx,dy);break;case Draw.CIRCLE:_920=new _8f4(map.spatialReference);this._graphic=map.graphics.add(new _8f0(_920,this.fillSymbol),true);this._graphic.geometry=_8f4.createCircle({center:_91e,r:48,numberOfPoints:60,map:map});this._graphic.setGeometry(this._graphic.geometry);this._drawEnd(this._graphic.geometry);break;case Draw.ELLIPSE:_920=new _8f4(map.spatialReference);this._graphic=map.graphics.add(new _8f0(_920,this.fillSymbol),true);this._graphic.geometry=_8f4.createEllipse({center:_91e,longAxis:48,shortAxis:24,numberOfPoints:60,map:map});this._graphic.setGeometry(this._graphic.geometry);this._drawEnd(this._graphic.geometry);break;}this._setTooltipMessage(this._points.length);},_addShape:function(path,dx,dy){var _923=this.map.graphics.add(new _8f0(this._toPolygon(path,dx,dy),this.fillSymbol),true);this._setTooltipMessage(0);var geom;if(_923){geom=_8f1.fromJson(_923.geometry.toJson());this.map.graphics.remove(_923,true);}this._drawEnd(geom);_923=geom=null;},_toPolygon:function(path,dx,dy){var map=this.map;var _924=new _8f4(map.spatialReference);_924.addRing(_8e5.map(path,function(pt){return map.toMap({x:pt[0]+dx,y:pt[1]+dy});}));return _924;},_onDblClickHandler:function(evt){var _925,_926=this._points,map=this.map,_927=map.spatialReference,Draw=DRAW;if(has("esri-touch")){_926.push(evt.mapPoint);}_926=_926.slice(0,_926.length);switch(this._geometryType){case Draw.POLYLINE:if(!this._graphic||_926.length<2){_8e6.disconnect(this._onMouseMoveHandler_connect);this._clear();this._onClickHandler(evt);return;}_925=new _8f3(_927);_925.addPath([].concat(_926));break;case Draw.POLYGON:if(!this._graphic||_926.length<2){_8e6.disconnect(this._onMouseMoveHandler_connect);this._clear();this._onClickHandler(evt);return;}_925=new _8f4(_927);var ring=[].concat(_926,[_926[0].offset(0,0)]);if(!_8f4.prototype.isClockwise(ring)&&!this.respectDrawingVertexOrder){console.debug(this.declaredClass+" :  Polygons drawn in anti-clockwise direction will be reversed to be clockwise.");ring.reverse();}_925.addRing(ring);break;case Draw.MULTI_POINT:_925=new _8f5(_927);_8e5.forEach(_926,function(pt){_925.addPoint(pt);});break;}_8e6.disconnect(this._onMouseMoveHandler_connect);this._clear();this._setTooltipMessage(0);this._drawEnd(_925);},_onKeyDownHandler:function(evt){if(evt.keyCode===keys.ESCAPE){_8e6.disconnect(this._onMouseMoveHandler_connect);this._clear();this._setTooltipMessage(0);}},_toggleTooltip:function(show){if(!this._options.showTooltips){return;}if(show){if(this._tooltip){return;}var _928=this.map.container;this._tooltip=_8e8.create("div",{"class":"tooltip"},_928);this._tooltip.style.display="none";this._tooltip.style.position="fixed";this._setTooltipMessage(0);this._onTooltipMouseEnterHandler_connect=_8e6.connect(this.map,"onMouseOver",this._updateTooltip);this._onTooltipMouseLeaveHandler_connect=_8e6.connect(this.map,"onMouseOut",this._hideTooltip);this._onTooltipMouseMoveHandler_connect=_8e6.connect(this.map,"onMouseMove",this._updateTooltip);}else{if(this._tooltip){_8e6.disconnect(this._onTooltipMouseEnterHandler_connect);_8e6.disconnect(this._onTooltipMouseLeaveHandler_connect);_8e6.disconnect(this._onTooltipMouseMoveHandler_connect);_8e8.destroy(this._tooltip);this._tooltip=null;}}},_hideTooltip:function(){var _929=this._tooltip;if(!_929){return;}_929.style.display="none";},_setTooltipMessage:function(_92a){var _92b=this._tooltip;if(!_92b){return;}var _92c=_92a;var _92d="";switch(this._geometryType){case DRAW.POINT:_92d=_8f6.toolbars.draw.addPoint;break;case DRAW.ARROW:case DRAW.LEFT_ARROW:case DRAW.RIGHT_ARROW:case DRAW.UP_ARROW:case DRAW.DOWN_ARROW:case DRAW.TRIANGLE:case DRAW.RECTANGLE:case DRAW.CIRCLE:case DRAW.ELLIPSE:_92d=_8f6.toolbars.draw.addShape;break;case DRAW.LINE:case DRAW.EXTENT:case DRAW.FREEHAND_POLYLINE:case DRAW.FREEHAND_POLYGON:_92d=_8f6.toolbars.draw.freehand;break;case DRAW.POLYLINE:case DRAW.POLYGON:_92d=_8f6.toolbars.draw.start;if(_92c===1){_92d=_8f6.toolbars.draw.resume;}else{if(_92c>=2){_92d=_8f6.toolbars.draw.complete;}}break;case DRAW.MULTI_POINT:_92d=_8f6.toolbars.draw.addMultipoint;if(_92c>=1){_92d=_8f6.toolbars.draw.finish;}break;}_92b.innerHTML=_92d;},_updateTooltip:function(evt){var _92e=this._tooltip;if(!_92e){return;}var px,py;if(evt.clientX||evt.pageY){px=evt.clientX;py=evt.clientY;}else{px=evt.clientX+win.body().scrollLeft-win.body().clientLeft;py=evt.clientY+win.body().scrollTop-win.body().clientTop;}_92e.style.display="none";_8e9.set(_92e,{left:(px+this._options.tooltipOffset)+"px",top:py+"px"});_92e.style.display="";},_redrawGraphic:function(_92f,_930,_931,lod){if(_931||this.map.wrapAround180){var g=this._graphic;if(g){g.setGeometry(g.geometry);}g=this._tGraphic;if(g){g.setGeometry(g.geometry);}}},onActivate:function(){},onDeactivate:function(){},onDrawComplete:function(){},onDrawEnd:function(){}});lang.mixin(DRAW,{POINT:"point",MULTI_POINT:"multipoint",LINE:"line",EXTENT:"extent",POLYLINE:"polyline",POLYGON:"polygon",FREEHAND_POLYLINE:"freehandpolyline",FREEHAND_POLYGON:"freehandpolygon",ARROW:"arrow",LEFT_ARROW:"leftarrow",RIGHT_ARROW:"rightarrow",UP_ARROW:"uparrow",DOWN_ARROW:"downarrow",TRIANGLE:"triangle",CIRCLE:"circle",ELLIPSE:"ellipse",RECTANGLE:"rectangle"});if(has("extend-esri")){lang.setObject("toolbars.Draw",DRAW,_8ea);}return DRAW;});},"dojox/grid/cells":function(){define("dojox/grid/cells",["../main","./cells/_base"],function(_932){return _932.grid.cells;});},"esri/dijit/editing/Union":function(){define("esri/dijit/editing/Union",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/OperationBase","esri/dijit/editing/Cut"],function(_933,lang,has,_934,_935,Cut){var _936=_933(_935,{declaredClass:"esri.dijit.editing.Union",type:"edit",label:"Union Features",constructor:function(_937){_937=_937||{};this._cut=new Cut({featureLayer:_937.featureLayer,addedGraphics:_937.deletedGraphics,preUpdatedGraphics:_937.preUpdatedGraphics,postUpdatedGraphics:_937.postUpdatedGraphics});},performUndo:function(){this._cut.performRedo();},performRedo:function(){this._cut.performUndo();}});if(has("extend-esri")){lang.setObject("dijit.editing.Union",_936,_934);}return _936;});},"dijit/Destroyable":function(){define("dijit/Destroyable",["dojo/_base/array","dojo/aspect","dojo/_base/declare"],function(_938,_939,_93a){return _93a("dijit.Destroyable",null,{destroy:function(_93b){this._destroyed=true;},own:function(){_938.forEach(arguments,function(_93c){var _93d="destroyRecursive" in _93c?"destroyRecursive":"destroy" in _93c?"destroy":"remove";var odh=_939.before(this,"destroy",function(_93e){_93c[_93d](_93e);});var hdh=_939.after(_93c,_93d,function(){odh.remove();hdh.remove();},true);},this);return arguments;}});});},"dojox/grid/_Layout":function(){define("dojox/grid/_Layout",["dojo/_base/kernel","../main","dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/dom-geometry","./cells","./_RowSelector"],function(dojo,_93f,_940,_941,lang,_942){return _940("dojox.grid._Layout",null,{constructor:function(_943){this.grid=_943;},cells:[],structure:null,defaultWidth:"6em",moveColumn:function(_944,_945,_946,_947,_948){var _949=this.structure[_944].cells[0];var _94a=this.structure[_945].cells[0];var cell=null;var _94b=0;var _94c=0;for(var i=0,c;c=_949[i];i++){if(c.index==_946){_94b=i;break;}}cell=_949.splice(_94b,1)[0];cell.view=this.grid.views.views[_945];for(i=0,c=null;c=_94a[i];i++){if(c.index==_947){_94c=i;break;}}if(!_948){_94c+=1;}_94a.splice(_94c,0,cell);var _94d=this.grid.getCell(this.grid.getSortIndex());if(_94d){_94d._currentlySorted=this.grid.getSortAsc();}this.cells=[];_946=0;var v;for(i=0;v=this.structure[i];i++){for(var j=0,cs;cs=v.cells[j];j++){for(var k=0;c=cs[k];k++){c.index=_946;this.cells.push(c);if("_currentlySorted" in c){var si=_946+1;si*=c._currentlySorted?1:-1;this.grid.sortInfo=si;delete c._currentlySorted;}_946++;}}}_941.forEach(this.cells,function(c){var _94e=c.markup[2].split(" ");var _94f=parseInt(_94e[1].substring(5));if(_94f!=c.index){_94e[1]="idx=\""+c.index+"\"";c.markup[2]=_94e.join(" ");}});this.grid.setupHeaderMenu();},setColumnVisibility:function(_950,_951){var cell=this.cells[_950];if(cell.hidden==_951){cell.hidden=!_951;var v=cell.view,w=v.viewWidth;if(w&&w!="auto"){v._togglingColumn=_942.getMarginBox(cell.getHeaderNode()).w||0;}v.update();return true;}else{return false;}},addCellDef:function(_952,_953,_954){var self=this;var _955=function(_956){var w=0;if(_956.colSpan>1){w=0;}else{w=_956.width||self._defaultCellProps.width||self.defaultWidth;if(!isNaN(w)){w=w+"em";}}return w;};var _957={grid:this.grid,subrow:_952,layoutIndex:_953,index:this.cells.length};if(_954&&_954 instanceof _93f.grid.cells._Base){var _958=lang.clone(_954);_957.unitWidth=_955(_958._props);_958=lang.mixin(_958,this._defaultCellProps,_954._props,_957);return _958;}var _959=_954.type||_954.cellType||this._defaultCellProps.type||this._defaultCellProps.cellType||_93f.grid.cells.Cell;if(lang.isString(_959)){_959=lang.getObject(_959);}_957.unitWidth=_955(_954);return new _959(lang.mixin({},this._defaultCellProps,_954,_957));},addRowDef:function(_95a,_95b){var _95c=[];var _95d=0,_95e=0,_95f=true;for(var i=0,def,cell;(def=_95b[i]);i++){cell=this.addCellDef(_95a,i,def);_95c.push(cell);this.cells.push(cell);if(_95f&&cell.relWidth){_95d+=cell.relWidth;}else{if(cell.width){var w=cell.width;if(typeof w=="string"&&w.slice(-1)=="%"){_95e+=window.parseInt(w,10);}else{if(w=="auto"){_95f=false;}}}}}if(_95d&&_95f){_941.forEach(_95c,function(cell){if(cell.relWidth){cell.width=cell.unitWidth=((cell.relWidth/_95d)*(100-_95e))+"%";}});}return _95c;},addRowsDef:function(_960){var _961=[];if(lang.isArray(_960)){if(lang.isArray(_960[0])){for(var i=0,row;_960&&(row=_960[i]);i++){_961.push(this.addRowDef(i,row));}}else{_961.push(this.addRowDef(0,_960));}}return _961;},addViewDef:function(_962){this._defaultCellProps=_962.defaultCell||{};if(_962.width&&_962.width=="auto"){delete _962.width;}return lang.mixin({},_962,{cells:this.addRowsDef(_962.rows||_962.cells)});},setStructure:function(_963){this.fieldIndex=0;this.cells=[];var s=this.structure=[];if(this.grid.rowSelector){var sel={type:_93f._scopeName+".grid._RowSelector"};if(lang.isString(this.grid.rowSelector)){var _964=this.grid.rowSelector;if(_964=="false"){sel=null;}else{if(_964!="true"){sel["width"]=_964;}}}else{if(!this.grid.rowSelector){sel=null;}}if(sel){s.push(this.addViewDef(sel));}}var _965=function(def){return ("name" in def||"field" in def||"get" in def);};var _966=function(def){if(lang.isArray(def)){if(lang.isArray(def[0])||_965(def[0])){return true;}}return false;};var _967=function(def){return (def!==null&&lang.isObject(def)&&("cells" in def||"rows" in def||("type" in def&&!_965(def))));};if(lang.isArray(_963)){var _968=false;for(var i=0,st;(st=_963[i]);i++){if(_967(st)){_968=true;break;}}if(!_968){s.push(this.addViewDef({cells:_963}));}else{for(i=0;(st=_963[i]);i++){if(_966(st)){s.push(this.addViewDef({cells:st}));}else{if(_967(st)){s.push(this.addViewDef(st));}}}}}else{if(_967(_963)){s.push(this.addViewDef(_963));}}this.cellCount=this.cells.length;this.grid.setupHeaderMenu();}});});},"dijit/form/RangeBoundTextBox":function(){define("dijit/form/RangeBoundTextBox",["dojo/_base/declare","dojo/i18n","./MappedTextBox"],function(_969,i18n,_96a){var _96b=_969("dijit.form.RangeBoundTextBox",_96a,{rangeMessage:"",rangeCheck:function(_96c,_96d){return ("min" in _96d?(this.compare(_96c,_96d.min)>=0):true)&&("max" in _96d?(this.compare(_96c,_96d.max)<=0):true);},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints);},_isDefinitelyOutOfRange:function(){var val=this.get("value");if(val==null){return false;}var _96e=false;if("min" in this.constraints){var min=this.constraints.min;_96e=this.compare(val,((typeof min=="number")&&min>=0&&val!=0)?0:min)<0;}if(!_96e&&("max" in this.constraints)){var max=this.constraints.max;_96e=this.compare(val,((typeof max!="number")||max>0)?max:0)>0;}return _96e;},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange();},isValid:function(_96f){return this.inherited(arguments)&&((this._isEmpty(this.textbox.value)&&!this.required)||this.isInRange(_96f));},getErrorMessage:function(_970){var v=this.get("value");if(v!=null&&v!==""&&(typeof v!="number"||!isNaN(v))&&!this.isInRange(_970)){return this.rangeMessage;}return this.inherited(arguments);},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage){this.messages=i18n.getLocalization("dijit.form","validate",this.lang);this.rangeMessage=this.messages.rangeMessage;}},applyTextDir:function(){}});return _96b;});},"dijit/_editor/RichText":function(){define("dijit/_editor/RichText",["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/event","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/on","dojo/query","dojo/ready","dojo/sniff","dojo/topic","dojo/_base/unload","dojo/_base/url","dojo/_base/window","../_Widget","../_CssStateMixin","./selection","./range","./html","../focus","../main"],function(_971,_972,_973,_974,dom,_975,_976,_977,_978,_979,_97a,_97b,keys,lang,on,_97c,_97d,has,_97e,_97f,_980,win,_981,_982,_983,_984,_985,_986,_987){var _988=_973("dijit._editor.RichText",[_981,_982],{constructor:function(_989){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};if(_989&&lang.isString(_989.value)){this.value=_989.value;}this.onLoadDeferred=new _974();},baseClass:"dijitEditor",inheritWidth:false,focusOnLoad:false,name:"",styleSheets:"",height:"300px",minHeight:"1em",isClosed:true,isLoaded:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:false,disableSpellCheck:false,postCreate:function(){if("textarea"===this.domNode.tagName.toLowerCase()){console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");}this.contentPreFilters=[lang.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);if(has("mozilla")){this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters);this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters);}if(has("webkit")){this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters);this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters);}if(has("ie")){this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters);this.contentDomPostFilters=[lang.hitch(this,this._stripBreakerNodes)].concat(this.contentDomPostFilters);}this.inherited(arguments);_97e.publish(_987._scopeName+"._editor.RichText::init",this);this.open();this.setupDefaultShortcuts();},setupDefaultShortcuts:function(){var exec=lang.hitch(this,function(cmd,arg){return function(){return !this.execCommand(cmd,arg);};});var _98a={b:exec("bold"),i:exec("italic"),u:exec("underline"),a:exec("selectall"),s:function(){this.save(true);},m:function(){this.isTabIndent=!this.isTabIndent;},"1":exec("formatblock","h1"),"2":exec("formatblock","h2"),"3":exec("formatblock","h3"),"4":exec("formatblock","h4"),"\\":exec("insertunorderedlist")};if(!has("ie")){_98a.Z=exec("redo");}var key;for(key in _98a){this.addKeyHandler(key,true,false,_98a[key]);}},events:["onKeyPress","onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:false,_localizeEditorCommands:function(){if(_988._editorCommandsLocalized){this._local2NativeFormatNames=_988._local2NativeFormatNames;this._native2LocalFormatNames=_988._native2LocalFormatNames;return;}_988._editorCommandsLocalized=true;_988._local2NativeFormatNames={};_988._native2LocalFormatNames={};this._local2NativeFormatNames=_988._local2NativeFormatNames;this._native2LocalFormatNames=_988._native2LocalFormatNames;var _98b=["div","p","pre","h1","h2","h3","h4","h5","h6","ol","ul","address"];var _98c="",_98d,i=0;while((_98d=_98b[i++])){if(_98d.charAt(1)!=="l"){_98c+="<"+_98d+"><span>content</span></"+_98d+"><br/>";}else{_98c+="<"+_98d+"><li>content</li></"+_98d+"><br/>";}}var _98e={position:"absolute",top:"0px",zIndex:10,opacity:0.01};var div=_977.create("div",{style:_98e,innerHTML:_98c});this.ownerDocumentBody.appendChild(div);var _98f=lang.hitch(this,function(){var node=div.firstChild;while(node){try{this._sCall("selectElement",[node.firstChild]);var _990=node.tagName.toLowerCase();this._local2NativeFormatNames[_990]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[_990]]=_990;node=node.nextSibling.nextSibling;}catch(e){}}_977.destroy(div);});this.defer(_98f);},open:function(_991){if(!this.onLoadDeferred||this.onLoadDeferred.fired>=0){this.onLoadDeferred=new _974();}if(!this.isClosed){this.close();}_97e.publish(_987._scopeName+"._editor.RichText::open",this);if(arguments.length===1&&_991.nodeName){this.domNode=_991;}var dn=this.domNode;var html;if(lang.isString(this.value)){html=this.value;delete this.value;dn.innerHTML="";}else{if(dn.nodeName&&dn.nodeName.toLowerCase()=="textarea"){var ta=(this.textarea=dn);this.name=ta.name;html=ta.value;dn=this.domNode=this.ownerDocument.createElement("div");dn.setAttribute("widgetId",this.id);ta.removeAttribute("widgetId");dn.cssText=ta.cssText;dn.className+=" "+ta.className;_977.place(dn,ta,"before");var _992=lang.hitch(this,function(){_979.set(ta,{display:"block",position:"absolute",top:"-1000px"});if(has("ie")){var s=ta.style;this.__overflow=s.overflow;s.overflow="hidden";}});if(has("ie")){this.defer(_992,10);}else{_992();}if(ta.form){var _993=ta.value;this.reset=function(){var _994=this.getValue();if(_994!==_993){this.replaceValue(_993);}};on(ta.form,"submit",lang.hitch(this,function(){_975.set(ta,"disabled",this.disabled);ta.value=this.getValue();}));}}else{html=_985.getChildrenHtml(dn);dn.innerHTML="";}}this.value=html;if(dn.nodeName&&dn.nodeName==="LI"){dn.innerHTML=" <br>";}this.header=dn.ownerDocument.createElement("div");dn.appendChild(this.header);this.editingArea=dn.ownerDocument.createElement("div");dn.appendChild(this.editingArea);this.footer=dn.ownerDocument.createElement("div");dn.appendChild(this.footer);if(!this.name){this.name=this.id+"_AUTOGEN";}if(this.name!==""&&(!_972["useXDomain"]||_972["allowXdRichTextSave"])){var _995=dom.byId(_987._scopeName+"._editor.RichText.value");if(_995&&_995.value!==""){var _996=_995.value.split(this._SEPARATOR),i=0,dat;while((dat=_996[i++])){var data=dat.split(this._NAME_CONTENT_SEP);if(data[0]===this.name){html=data[1];_996=_996.splice(i,1);_995.value=_996.join(this._SEPARATOR);break;}}}if(!_988._globalSaveHandler){_988._globalSaveHandler={};_97f.addOnUnload(function(){var id;for(id in _988._globalSaveHandler){var f=_988._globalSaveHandler[id];if(lang.isFunction(f)){f();}}});}_988._globalSaveHandler[this.id]=lang.hitch(this,"_saveContent");}this.isClosed=false;var ifr=(this.editorObject=this.iframe=this.ownerDocument.createElement("iframe"));ifr.id=this.id+"_iframe";ifr.style.border="none";ifr.style.width="100%";if(this._layoutMode){ifr.style.height="100%";}else{if(has("ie")>=7){if(this.height){ifr.style.height=this.height;}if(this.minHeight){ifr.style.minHeight=this.minHeight;}}else{ifr.style.height=this.height?this.height:this.minHeight;}}ifr.frameBorder=0;ifr._loadFunc=lang.hitch(this,function(w){this.window=w;this.document=this.window.document;if(has("ie")){this._localizeEditorCommands();}this.onLoad(html);});var src=this._getIframeDocTxt(),s="javascript: '"+src.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"'";ifr.setAttribute("src",s);this.editingArea.appendChild(ifr);if(has("safari")<=4){src=ifr.getAttribute("src");if(!src||src.indexOf("javascript")===-1){this.defer(function(){ifr.setAttribute("src",s);});}}if(dn.nodeName==="LI"){dn.lastChild.style.marginTop="-1.2em";}_976.add(this.domNode,this.baseClass);},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var _997=_979.getComputedStyle(this.domNode);var html="";var _998=true;if(has("ie")||has("webkit")||(!this.height&&!has("mozilla"))){html="<div id='dijitEditorBody'></div>";_998=false;}else{if(has("mozilla")){this._cursorToStart=true;html="&#160;";}}var font=[_997.fontWeight,_997.fontSize,_997.fontFamily].join(" ");var _999=_997.lineHeight;if(_999.indexOf("px")>=0){_999=parseFloat(_999)/parseFloat(_997.fontSize);}else{if(_999.indexOf("em")>=0){_999=parseFloat(_999);}else{_999="normal";}}var _99a="";var self=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(_99b){_99b=_99b.replace(/^;/ig,"")+";";var s=_99b.split(":")[0];if(s){s=lang.trim(s);s=s.toLowerCase();var i;var sC="";for(i=0;i<s.length;i++){var c=s.charAt(i);switch(c){case "-":i++;c=s.charAt(i).toUpperCase();default:sC+=c;}}_979.set(self.domNode,sC,"");}_99a+=_99b+";";});var _99c=_97c("label[for=\""+this.id+"\"]");return [this.isLeftToRight()?"<html>\n<head>\n":"<html dir='rtl'>\n<head>\n",(has("mozilla")&&_99c.length?"<title>"+_99c[0].innerHTML+"</title>\n":""),"<meta http-equiv='Content-Type' content='text/html'>\n","<style>\n","\tbody,html {\n","\t\tbackground:transparent;\n","\t\tpadding: 1px 0 0 0;\n","\t\tmargin: -1px 0 0 0;\n",((has("webkit"))?"\t\twidth: 100%;\n":""),((has("webkit"))?"\t\theight: 100%;\n":""),"\t}\n","\tbody{\n","\t\ttop:0px;\n","\t\tleft:0px;\n","\t\tright:0px;\n","\t\tfont:",font,";\n",((this.height||has("opera"))?"":"\t\tposition: fixed;\n"),"\t\tmin-height:",this.minHeight,";\n","\t\tline-height:",_999,";\n","\t}\n","\tp{ margin: 1em 0; }\n",(!_998&&!this.height?"\tbody,html {overflow-y: hidden;}\n":""),"\t#dijitEditorBody{overflow-x: auto; overflow-y:"+(this.height?"auto;":"hidden;")+" outline: 0px;}\n","\tli > ul:-moz-first-node, li > ol:-moz-first-node{ padding-top: 1.2em; }\n",(!has("ie")?"\tli{ min-height:1.2em; }\n":""),"</style>\n",this._applyEditingAreaStyleSheets(),"\n","</head>\n<body ",(_998?"id='dijitEditorBody' ":""),"onload='frameElement && frameElement._loadFunc(window,document)' ","style='"+_99a+"'>",html,"</body>\n</html>"].join("");},_applyEditingAreaStyleSheets:function(){var _99d=[];if(this.styleSheets){_99d=this.styleSheets.split(";");this.styleSheets="";}_99d=_99d.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];var text="",i=0,url;while((url=_99d[i++])){var _99e=(new _980(win.global.location,url)).toString();this.editingAreaStyleSheets.push(_99e);text+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_99e+"\"/>";}return text;},addStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)==="."||(url.charAt(0)!=="/"&&!uri.host)){url=(new _980(win.global.location,url)).toString();}if(_971.indexOf(this.editingAreaStyleSheets,url)>-1){return;}this.editingAreaStyleSheets.push(url);this.onLoadDeferred.then(lang.hitch(this,function(){if(this.document.createStyleSheet){this.document.createStyleSheet(url);}else{var head=this.document.getElementsByTagName("head")[0];var _99f=this.document.createElement("link");_99f.rel="stylesheet";_99f.type="text/css";_99f.href=url;head.appendChild(_99f);}}));},removeStyleSheet:function(uri){var url=uri.toString();if(url.charAt(0)==="."||(url.charAt(0)!=="/"&&!uri.host)){url=(new _980(win.global.location,url)).toString();}var _9a0=_971.indexOf(this.editingAreaStyleSheets,url);if(_9a0===-1){return;}delete this.editingAreaStyleSheets[_9a0];_97c("link:[href=\""+url+"\"]",this.window.document).orphan();},disabled:false,_mozSettingProps:{"styleWithCSS":false},_setDisabledAttr:function(_9a1){_9a1=!!_9a1;this._set("disabled",_9a1);if(!this.isLoaded){return;}if(has("ie")||has("webkit")||has("opera")){var _9a2=has("ie")&&(this.isLoaded||!this.focusOnLoad);if(_9a2){this.editNode.unselectable="on";}this.editNode.contentEditable=!_9a1;if(_9a2){this.defer(function(){if(this.editNode){this.editNode.unselectable="off";}});}}else{try{this.document.designMode=(_9a1?"off":"on");}catch(e){return;}if(!_9a1&&this._mozSettingProps){var ps=this._mozSettingProps;var n;for(n in ps){if(ps.hasOwnProperty(n)){try{this.document.execCommand(n,false,ps[n]);}catch(e2){}}}}}this._disabledOK=true;},onLoad:function(html){if(!this.window.__registeredWindow){this.window.__registeredWindow=true;this._iframeRegHandle=_986.registerIframe(this.iframe);}if(!has("ie")&&!has("webkit")&&(this.height||has("mozilla"))){this.editNode=this.document.body;}else{this.editNode=this.document.body.firstChild;var _9a3=this;if(has("ie")){this.tabStop=_977.create("div",{tabIndex:-1},this.editingArea);this.iframe.onfocus=function(){_9a3.editNode.setActive();};}}this.focusNode=this.editNode;var _9a4=this.events.concat(this.captureEvents);var ap=this.iframe?this.document:this.editNode;_971.forEach(_9a4,function(item){this.connect(ap,item.toLowerCase(),item);},this);this.connect(ap,"onmouseup","onClick");if(has("ie")){this.connect(this.document,"onmousedown","_onIEMouseDown");this.editNode.style.zoom=1;}else{this.connect(this.document,"onmousedown",function(){delete this._cursorToStart;});}if(has("webkit")){this._webkitListener=this.connect(this.document,"onmouseup","onDisplayChanged");this.connect(this.document,"onmousedown",function(e){var t=e.target;if(t&&(t===this.document.body||t===this.document)){this.defer("placeCursorAtEnd");}});}if(has("ie")){try{this.document.execCommand("RespectVisibilityInDesign",true,null);}catch(e){}}this.isLoaded=true;this.set("disabled",this.disabled);var _9a5=lang.hitch(this,function(){this.setValue(html);if(this.onLoadDeferred){this.onLoadDeferred.resolve(true);}this.onDisplayChanged();if(this.focusOnLoad){_97d(lang.hitch(this,"defer","focus",this.updateInterval));}this.value=this.getValue(true);});if(this.setValueDeferred){this.setValueDeferred.then(_9a5);}else{_9a5();}},onKeyDown:function(e){if(e.keyCode===keys.TAB&&this.isTabIndent){_97a.stop(e);if(this.queryCommandEnabled((e.shiftKey?"outdent":"indent"))){this.execCommand((e.shiftKey?"outdent":"indent"));}}if(has("ie")){if(e.keyCode==keys.TAB&&!this.isTabIndent){if(e.shiftKey&&!e.ctrlKey&&!e.altKey){this.iframe.focus();}else{if(!e.shiftKey&&!e.ctrlKey&&!e.altKey){this.tabStop.focus();}}}else{if(e.keyCode===keys.BACKSPACE&&this.document.selection.type==="Control"){_97a.stop(e);this.execCommand("delete");}else{if((65<=e.keyCode&&e.keyCode<=90)||(e.keyCode>=37&&e.keyCode<=40)){e.charCode=e.keyCode;this.onKeyPress(e);}}}}if(has("ff")){if(e.keyCode===keys.PAGE_UP||e.keyCode===keys.PAGE_DOWN){if(this.editNode.clientHeight>=this.editNode.scrollHeight){e.preventDefault();}}}return true;},onKeyUp:function(){},setDisabled:function(_9a6){_97b.deprecated("dijit.Editor::setDisabled is deprecated","use dijit.Editor::attr(\"disabled\",boolean) instead",2);this.set("disabled",_9a6);},_setValueAttr:function(_9a7){this.setValue(_9a7);},_setDisableSpellCheckAttr:function(_9a8){if(this.document){_975.set(this.document.body,"spellcheck",!_9a8);}else{this.onLoadDeferred.then(lang.hitch(this,function(){_975.set(this.document.body,"spellcheck",!_9a8);}));}this._set("disableSpellCheck",_9a8);},onKeyPress:function(e){var c=(e.keyChar&&e.keyChar.toLowerCase())||e.keyCode,_9a9=this._keyHandlers[c],args=arguments;if(_9a9&&!e.altKey){_971.some(_9a9,function(h){if(!(h.shift^e.shiftKey)&&!(h.ctrl^(e.ctrlKey||e.metaKey))){if(!h.handler.apply(this,args)){e.preventDefault();}return true;}},this);}if(!this._onKeyHitch){this._onKeyHitch=lang.hitch(this,"onKeyPressed");}this.defer("_onKeyHitch",1);return true;},addKeyHandler:function(key,ctrl,_9aa,_9ab){if(!lang.isArray(this._keyHandlers[key])){this._keyHandlers[key]=[];}this._keyHandlers[key].push({shift:_9aa||false,ctrl:ctrl||false,handler:_9ab});},onKeyPressed:function(){this.onDisplayChanged();},onClick:function(e){this.onDisplayChanged(e);},_onIEMouseDown:function(){if(!this.focused&&!this.disabled){this.focus();}},_onBlur:function(e){this.inherited(arguments);var _9ac=this.getValue(true);if(_9ac!==this.value){this.onChange(_9ac);}this._set("value",_9ac);},_onFocus:function(e){if(!this.disabled){if(!this._disabledOK){this.set("disabled",false);}this.inherited(arguments);}},blur:function(){if(!has("ie")&&this.window.document.documentElement&&this.window.document.documentElement.focus){this.window.document.documentElement.focus();}else{if(this.ownerDocumentBody.focus){this.ownerDocumentBody.focus();}}},focus:function(){if(!this.isLoaded){this.focusOnLoad=true;return;}if(this._cursorToStart){delete this._cursorToStart;if(this.editNode.childNodes){this.placeCursorAtStart();return;}}if(!has("ie")){_986.focus(this.iframe);}else{if(this.editNode&&this.editNode.focus){this.iframe.fireEvent("onfocus",document.createEventObject());}}},updateInterval:200,_updateTimer:null,onDisplayChanged:function(){if(this._updateTimer){this._updateTimer.remove();}this._updateTimer=this.defer("onNormalizedDisplayChanged",this.updateInterval);},onNormalizedDisplayChanged:function(){delete this._updateTimer;},onChange:function(){},_normalizeCommand:function(cmd,_9ad){var _9ae=cmd.toLowerCase();if(_9ae==="formatblock"){if(has("safari")&&_9ad===undefined){_9ae="heading";}}else{if(_9ae==="hilitecolor"&&!has("mozilla")){_9ae="backcolor";}}return _9ae;},_qcaCache:{},queryCommandAvailable:function(_9af){var ca=this._qcaCache[_9af];if(ca!==undefined){return ca;}return (this._qcaCache[_9af]=this._queryCommandAvailable(_9af));},_queryCommandAvailable:function(_9b0){var ie=1;var _9b1=1<<1;var _9b2=1<<2;var _9b3=1<<3;function _9b4(_9b5){return {ie:Boolean(_9b5&ie),mozilla:Boolean(_9b5&_9b1),webkit:Boolean(_9b5&_9b2),opera:Boolean(_9b5&_9b3)};};var _9b6=null;switch(_9b0.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":_9b6=_9b4(_9b1|ie|_9b2|_9b3);break;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":_9b6=_9b4(_9b1|ie|_9b3|_9b2);break;case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":_9b6=_9b4(ie);break;case "cut":case "copy":case "paste":_9b6=_9b4(ie|_9b1|_9b2|_9b3);break;case "inserttable":_9b6=_9b4(_9b1|ie);break;case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":_9b6=_9b4(ie|_9b1);break;default:return false;}return (has("ie")&&_9b6.ie)||(has("mozilla")&&_9b6.mozilla)||(has("webkit")&&_9b6.webkit)||(has("opera")&&_9b6.opera);},execCommand:function(_9b7,_9b8){var _9b9;this.focus();_9b7=this._normalizeCommand(_9b7,_9b8);if(_9b8!==undefined){if(_9b7==="heading"){throw new Error("unimplemented");}else{if((_9b7==="formatblock")&&has("ie")){_9b8="<"+_9b8+">";}}}var _9ba="_"+_9b7+"Impl";if(this[_9ba]){_9b9=this[_9ba](_9b8);}else{_9b8=arguments.length>1?_9b8:null;if(_9b8||_9b7!=="createlink"){_9b9=this.document.execCommand(_9b7,false,_9b8);}}this.onDisplayChanged();return _9b9;},queryCommandEnabled:function(_9bb){if(this.disabled||!this._disabledOK){return false;}_9bb=this._normalizeCommand(_9bb);var _9bc="_"+_9bb+"EnabledImpl";if(this[_9bc]){return this[_9bc](_9bb);}else{return this._browserQueryCommandEnabled(_9bb);}},queryCommandState:function(_9bd){if(this.disabled||!this._disabledOK){return false;}_9bd=this._normalizeCommand(_9bd);try{return this.document.queryCommandState(_9bd);}catch(e){return false;}},queryCommandValue:function(_9be){if(this.disabled||!this._disabledOK){return false;}var r;_9be=this._normalizeCommand(_9be);if(has("ie")&&_9be==="formatblock"){r=this._native2LocalFormatNames[this.document.queryCommandValue(_9be)];}else{if(has("mozilla")&&_9be==="hilitecolor"){var _9bf;try{_9bf=this.document.queryCommandValue("styleWithCSS");}catch(e){_9bf=false;}this.document.execCommand("styleWithCSS",false,true);r=this.document.queryCommandValue(_9be);this.document.execCommand("styleWithCSS",false,_9bf);}else{r=this.document.queryCommandValue(_9be);}}return r;},_sCall:function(name,args){return win.withGlobal(this.window,name,_983,args);},placeCursorAtStart:function(){this.focus();var _9c0=false;if(has("mozilla")){var _9c1=this.editNode.firstChild;while(_9c1){if(_9c1.nodeType===3){if(_9c1.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_9c0=true;this._sCall("selectElement",[_9c1]);break;}}else{if(_9c1.nodeType===1){_9c0=true;var tg=_9c1.tagName?_9c1.tagName.toLowerCase():"";if(/br|input|img|base|meta|area|basefont|hr|link/.test(tg)){this._sCall("selectElement",[_9c1]);}else{this._sCall("selectElementChildren",[_9c1]);}break;}}_9c1=_9c1.nextSibling;}}else{_9c0=true;this._sCall("selectElementChildren",[this.editNode]);}if(_9c0){this._sCall("collapse",[true]);}},placeCursorAtEnd:function(){this.focus();var _9c2=false;if(has("mozilla")){var last=this.editNode.lastChild;while(last){if(last.nodeType===3){if(last.nodeValue.replace(/^\s+|\s+$/g,"").length>0){_9c2=true;this._sCall("selectElement",[last]);break;}}else{if(last.nodeType===1){_9c2=true;this._sCall("selectElement",[last.lastChild||last]);break;}}last=last.previousSibling;}}else{_9c2=true;this._sCall("selectElementChildren",[this.editNode]);}if(_9c2){this._sCall("collapse",[false]);}},getValue:function(_9c3){if(this.textarea){if(this.isClosed||!this.isLoaded){return this.textarea.value;}}return this._postFilterContent(null,_9c3);},_getValueAttr:function(){return this.getValue(true);},setValue:function(html){if(!this.isLoaded){this.onLoadDeferred.then(lang.hitch(this,function(){this.setValue(html);}));return;}this._cursorToStart=true;if(this.textarea&&(this.isClosed||!this.isLoaded)){this.textarea.value=html;}else{html=this._preFilterContent(html);var node=this.isClosed?this.domNode:this.editNode;if(html&&has("mozilla")&&html.toLowerCase()==="<p></p>"){html="<p>&#160;</p>";}if(!html&&has("webkit")){html="&#160;";}node.innerHTML=html;this._preDomFilterContent(node);}this.onDisplayChanged();this._set("value",this.getValue(true));},replaceValue:function(html){if(this.isClosed){this.setValue(html);}else{if(this.window&&this.window.getSelection&&!has("mozilla")){this.setValue(html);}else{if(this.window&&this.window.getSelection){html=this._preFilterContent(html);this.execCommand("selectall");if(!html){this._cursorToStart=true;html="&#160;";}this.execCommand("inserthtml",html);this._preDomFilterContent(this.editNode);}else{if(this.document&&this.document.selection){this.setValue(html);}}}}this._set("value",this.getValue(true));},_preFilterContent:function(html){var ec=html;_971.forEach(this.contentPreFilters,function(ef){if(ef){ec=ef(ec);}});return ec;},_preDomFilterContent:function(dom){dom=dom||this.editNode;_971.forEach(this.contentDomPreFilters,function(ef){if(ef&&lang.isFunction(ef)){ef(dom);}},this);},_postFilterContent:function(dom,_9c4){var ec;if(!lang.isString(dom)){dom=dom||this.editNode;if(this.contentDomPostFilters.length){if(_9c4){dom=lang.clone(dom);}_971.forEach(this.contentDomPostFilters,function(ef){dom=ef(dom);});}ec=_985.getChildrenHtml(dom);}else{ec=dom;}if(!lang.trim(ec.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length){ec="";}_971.forEach(this.contentPostFilters,function(ef){ec=ef(ec);});return ec;},_saveContent:function(){var _9c5=dom.byId(_987._scopeName+"._editor.RichText.value");if(_9c5){if(_9c5.value){_9c5.value+=this._SEPARATOR;}_9c5.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(true);}},escapeXml:function(str,_9c6){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_9c6){str=str.replace(/'/gm,"&#39;");}return str;},getNodeHtml:function(node){_97b.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",2);return _985.getNodeHtml(node);},getNodeChildrenHtml:function(dom){_97b.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return _985.getChildrenHtml(dom);},close:function(save){if(this.isClosed){return;}if(!arguments.length){save=true;}if(save){this._set("value",this.getValue(true));}if(this.interval){clearInterval(this.interval);}if(this._webkitListener){this.disconnect(this._webkitListener);delete this._webkitListener;}if(has("ie")){this.iframe.onfocus=null;}this.iframe._loadFunc=null;if(this._iframeRegHandle){this._iframeRegHandle.remove();delete this._iframeRegHandle;}if(this.textarea){var s=this.textarea.style;s.position="";s.left=s.top="";if(has("ie")){s.overflow=this.__overflow;this.__overflow=null;}this.textarea.value=this.value;_977.destroy(this.domNode);this.domNode=this.textarea;}else{this.domNode.innerHTML=this.value;}delete this.iframe;_976.remove(this.domNode,this.baseClass);this.isClosed=true;this.isLoaded=false;delete this.editNode;delete this.focusNode;if(this.window&&this.window._frameElement){this.window._frameElement=null;}this.window=null;this.document=null;this.editingArea=null;this.editorObject=null;},destroy:function(){if(!this.isClosed){this.close(false);}if(this._updateTimer){this._updateTimer.remove();}this.inherited(arguments);if(_988._globalSaveHandler){delete _988._globalSaveHandler[this.id];}},_removeMozBogus:function(html){return html.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"");},_removeWebkitBogus:function(html){html=html.replace(/\sclass="webkit-block-placeholder"/gi,"");html=html.replace(/\sclass="apple-style-span"/gi,"");html=html.replace(/<meta charset=\"utf-8\" \/>/gi,"");return html;},_normalizeFontStyle:function(html){return html.replace(/<(\/)?strong([ \>])/gi,"<$1b$2").replace(/<(\/)?em([ \>])/gi,"<$1i$2");},_preFixUrlAttributes:function(html){return html.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl=$2$3$5$2");},_browserQueryCommandEnabled:function(_9c7){if(!_9c7){return false;}var elem=has("ie")?this.document.selection.createRange():this.document;try{return elem.queryCommandEnabled(_9c7);}catch(e){return false;}},_createlinkEnabledImpl:function(){var _9c8=true;if(has("opera")){var sel=this.window.getSelection();if(sel.isCollapsed){_9c8=true;}else{_9c8=this.document.queryCommandEnabled("createlink");}}else{_9c8=this._browserQueryCommandEnabled("createlink");}return _9c8;},_unlinkEnabledImpl:function(){var _9c9=true;if(has("mozilla")||has("webkit")){_9c9=this._sCall("hasAncestorElement",["a"]);}else{_9c9=this._browserQueryCommandEnabled("unlink");}return _9c9;},_inserttableEnabledImpl:function(){var _9ca=true;if(has("mozilla")||has("webkit")){_9ca=true;}else{_9ca=this._browserQueryCommandEnabled("inserttable");}return _9ca;},_cutEnabledImpl:function(){var _9cb=true;if(has("webkit")){var sel=this.window.getSelection();if(sel){sel=sel.toString();}_9cb=!!sel;}else{_9cb=this._browserQueryCommandEnabled("cut");}return _9cb;},_copyEnabledImpl:function(){var _9cc=true;if(has("webkit")){var sel=this.window.getSelection();if(sel){sel=sel.toString();}_9cc=!!sel;}else{_9cc=this._browserQueryCommandEnabled("copy");}return _9cc;},_pasteEnabledImpl:function(){var _9cd=true;if(has("webkit")){return true;}else{_9cd=this._browserQueryCommandEnabled("paste");}return _9cd;},_inserthorizontalruleImpl:function(_9ce){if(has("ie")){return this._inserthtmlImpl("<hr>");}return this.document.execCommand("inserthorizontalrule",false,_9ce);},_unlinkImpl:function(_9cf){if((this.queryCommandEnabled("unlink"))&&(has("mozilla")||has("webkit"))){var a=this._sCall("getAncestorElement",["a"]);this._sCall("selectElement",[a]);return this.document.execCommand("unlink",false,null);}return this.document.execCommand("unlink",false,_9cf);},_hilitecolorImpl:function(_9d0){var _9d1;var _9d2=this._handleTextColorOrProperties("hilitecolor",_9d0);if(!_9d2){if(has("mozilla")){this.document.execCommand("styleWithCSS",false,true);console.log("Executing color command.");_9d1=this.document.execCommand("hilitecolor",false,_9d0);this.document.execCommand("styleWithCSS",false,false);}else{_9d1=this.document.execCommand("hilitecolor",false,_9d0);}}return _9d1;},_backcolorImpl:function(_9d3){if(has("ie")){_9d3=_9d3?_9d3:null;}var _9d4=this._handleTextColorOrProperties("backcolor",_9d3);if(!_9d4){_9d4=this.document.execCommand("backcolor",false,_9d3);}return _9d4;},_forecolorImpl:function(_9d5){if(has("ie")){_9d5=_9d5?_9d5:null;}var _9d6=false;_9d6=this._handleTextColorOrProperties("forecolor",_9d5);if(!_9d6){_9d6=this.document.execCommand("forecolor",false,_9d5);}return _9d6;},_inserthtmlImpl:function(_9d7){_9d7=this._preFilterContent(_9d7);var rv=true;if(has("ie")){var _9d8=this.document.selection.createRange();if(this.document.selection.type.toUpperCase()==="CONTROL"){var n=_9d8.item(0);while(_9d8.length){_9d8.remove(_9d8.item(0));}n.outerHTML=_9d7;}else{_9d8.pasteHTML(_9d7);}_9d8.select();}else{if(has("mozilla")&&!_9d7.length){this._sCall("remove");}else{rv=this.document.execCommand("inserthtml",false,_9d7);}}return rv;},_boldImpl:function(_9d9){var _9da=false;if(has("ie")){this._adaptIESelection();_9da=this._adaptIEFormatAreaAndExec("bold");}if(!_9da){_9da=this.document.execCommand("bold",false,_9d9);}return _9da;},_italicImpl:function(_9db){var _9dc=false;if(has("ie")){this._adaptIESelection();_9dc=this._adaptIEFormatAreaAndExec("italic");}if(!_9dc){_9dc=this.document.execCommand("italic",false,_9db);}return _9dc;},_underlineImpl:function(_9dd){var _9de=false;if(has("ie")){this._adaptIESelection();_9de=this._adaptIEFormatAreaAndExec("underline");}if(!_9de){_9de=this.document.execCommand("underline",false,_9dd);}return _9de;},_strikethroughImpl:function(_9df){var _9e0=false;if(has("ie")){this._adaptIESelection();_9e0=this._adaptIEFormatAreaAndExec("strikethrough");}if(!_9e0){_9e0=this.document.execCommand("strikethrough",false,_9df);}return _9e0;},_superscriptImpl:function(_9e1){var _9e2=false;if(has("ie")){this._adaptIESelection();_9e2=this._adaptIEFormatAreaAndExec("superscript");}if(!_9e2){_9e2=this.document.execCommand("superscript",false,_9e1);}return _9e2;},_subscriptImpl:function(_9e3){var _9e4=false;if(has("ie")){this._adaptIESelection();_9e4=this._adaptIEFormatAreaAndExec("subscript");}if(!_9e4){_9e4=this.document.execCommand("subscript",false,_9e3);}return _9e4;},_fontnameImpl:function(_9e5){var _9e6;if(has("ie")){_9e6=this._handleTextColorOrProperties("fontname",_9e5);}if(!_9e6){_9e6=this.document.execCommand("fontname",false,_9e5);}return _9e6;},_fontsizeImpl:function(_9e7){var _9e8;if(has("ie")){_9e8=this._handleTextColorOrProperties("fontsize",_9e7);}if(!_9e8){_9e8=this.document.execCommand("fontsize",false,_9e7);}return _9e8;},_insertorderedlistImpl:function(_9e9){var _9ea=false;if(has("ie")){_9ea=this._adaptIEList("insertorderedlist",_9e9);}if(!_9ea){_9ea=this.document.execCommand("insertorderedlist",false,_9e9);}return _9ea;},_insertunorderedlistImpl:function(_9eb){var _9ec=false;if(has("ie")){_9ec=this._adaptIEList("insertunorderedlist",_9eb);}if(!_9ec){_9ec=this.document.execCommand("insertunorderedlist",false,_9eb);}return _9ec;},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header);},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer);},_getNodeChildrenHeight:function(node){var h=0;if(node&&node.childNodes){var i;for(i=0;i<node.childNodes.length;i++){var size=_978.position(node.childNodes[i]);h+=size.h;}}return h;},_isNodeEmpty:function(node,_9ed){if(node.nodeType===1){if(node.childNodes.length>0){return this._isNodeEmpty(node.childNodes[0],_9ed);}return true;}else{if(node.nodeType===3){return (node.nodeValue.substring(_9ed)==="");}}return false;},_removeStartingRangeFromRange:function(node,_9ee){if(node.nextSibling){_9ee.setStart(node.nextSibling,0);}else{var _9ef=node.parentNode;while(_9ef&&_9ef.nextSibling==null){_9ef=_9ef.parentNode;}if(_9ef){_9ee.setStart(_9ef.nextSibling,0);}}return _9ee;},_adaptIESelection:function(){var _9f0=_984.getSelection(this.window);if(_9f0&&_9f0.rangeCount&&!_9f0.isCollapsed){var _9f1=_9f0.getRangeAt(0);var _9f2=_9f1.startContainer;var _9f3=_9f1.startOffset;while(_9f2.nodeType===3&&_9f3>=_9f2.length&&_9f2.nextSibling){_9f3=_9f3-_9f2.length;_9f2=_9f2.nextSibling;}var _9f4=null;while(this._isNodeEmpty(_9f2,_9f3)&&_9f2!==_9f4){_9f4=_9f2;_9f1=this._removeStartingRangeFromRange(_9f2,_9f1);_9f2=_9f1.startContainer;_9f3=0;}_9f0.removeAllRanges();_9f0.addRange(_9f1);}},_adaptIEFormatAreaAndExec:function(_9f5){var _9f6=_984.getSelection(this.window);var doc=this.document;var rs,ret,_9f7,txt,_9f8,_9f9,_9fa,_9fb;if(_9f5&&_9f6&&_9f6.isCollapsed){var _9fc=this.queryCommandValue(_9f5);if(_9fc){var _9fd=this._tagNamesForCommand(_9f5);_9f7=_9f6.getRangeAt(0);var fs=_9f7.startContainer;if(fs.nodeType===3){var _9fe=_9f7.endOffset;if(fs.length<_9fe){ret=this._adjustNodeAndOffset(rs,_9fe);fs=ret.node;_9fe=ret.offset;}}var _9ff;while(fs&&fs!==this.editNode){var _a00=fs.tagName?fs.tagName.toLowerCase():"";if(_971.indexOf(_9fd,_a00)>-1){_9ff=fs;break;}fs=fs.parentNode;}if(_9ff){rs=_9f7.startContainer;var _a01=doc.createElement(_9ff.tagName);_977.place(_a01,_9ff,"after");if(rs&&rs.nodeType===3){var _a02,_a03;var _a04=_9f7.endOffset;if(rs.length<_a04){ret=this._adjustNodeAndOffset(rs,_a04);rs=ret.node;_a04=ret.offset;}txt=rs.nodeValue;_9f8=doc.createTextNode(txt.substring(0,_a04));var _a05=txt.substring(_a04,txt.length);if(_a05){_9f9=doc.createTextNode(_a05);}_977.place(_9f8,rs,"before");if(_9f9){_9fa=doc.createElement("span");_9fa.className="ieFormatBreakerSpan";_977.place(_9fa,rs,"after");_977.place(_9f9,_9fa,"after");_9f9=_9fa;}_977.destroy(rs);var _a06=_9f8.parentNode;var _a07=[];var _a08;while(_a06!==_9ff){var tg=_a06.tagName;_a08={tagName:tg};_a07.push(_a08);var _a09=doc.createElement(tg);if(_a06.style){if(_a09.style){if(_a06.style.cssText){_a09.style.cssText=_a06.style.cssText;_a08.cssText=_a06.style.cssText;}}}if(_a06.tagName==="FONT"){if(_a06.color){_a09.color=_a06.color;_a08.color=_a06.color;}if(_a06.face){_a09.face=_a06.face;_a08.face=_a06.face;}if(_a06.size){_a09.size=_a06.size;_a08.size=_a06.size;}}if(_a06.className){_a09.className=_a06.className;_a08.className=_a06.className;}if(_9f9){_a02=_9f9;while(_a02){_a03=_a02.nextSibling;_a09.appendChild(_a02);_a02=_a03;}}if(_a09.tagName==_a06.tagName){_9fa=doc.createElement("span");_9fa.className="ieFormatBreakerSpan";_977.place(_9fa,_a06,"after");_977.place(_a09,_9fa,"after");}else{_977.place(_a09,_a06,"after");}_9f8=_a06;_9f9=_a09;_a06=_a06.parentNode;}if(_9f9){_a02=_9f9;if(_a02.nodeType===1||(_a02.nodeType===3&&_a02.nodeValue)){_a01.innerHTML="";}while(_a02){_a03=_a02.nextSibling;_a01.appendChild(_a02);_a02=_a03;}}var _a0a;if(_a07.length){_a08=_a07.pop();var _a0b=doc.createElement(_a08.tagName);if(_a08.cssText&&_a0b.style){_a0b.style.cssText=_a08.cssText;}if(_a08.className){_a0b.className=_a08.className;}if(_a08.tagName==="FONT"){if(_a08.color){_a0b.color=_a08.color;}if(_a08.face){_a0b.face=_a08.face;}if(_a08.size){_a0b.size=_a08.size;}}_977.place(_a0b,_a01,"before");while(_a07.length){_a08=_a07.pop();var _a0c=doc.createElement(_a08.tagName);if(_a08.cssText&&_a0c.style){_a0c.style.cssText=_a08.cssText;}if(_a08.className){_a0c.className=_a08.className;}if(_a08.tagName==="FONT"){if(_a08.color){_a0c.color=_a08.color;}if(_a08.face){_a0c.face=_a08.face;}if(_a08.size){_a0c.size=_a08.size;}}_a0b.appendChild(_a0c);_a0b=_a0c;}_9fb=doc.createTextNode(".");_9fa.appendChild(_9fb);_a0b.appendChild(_9fb);_a0a=_984.create(this.window);_a0a.setStart(_9fb,0);_a0a.setEnd(_9fb,_9fb.length);_9f6.removeAllRanges();_9f6.addRange(_a0a);this._sCall("collapse",[false]);_9fb.parentNode.innerHTML="";}else{_9fa=doc.createElement("span");_9fa.className="ieFormatBreakerSpan";_9fb=doc.createTextNode(".");_9fa.appendChild(_9fb);_977.place(_9fa,_a01,"before");_a0a=_984.create(this.window);_a0a.setStart(_9fb,0);_a0a.setEnd(_9fb,_9fb.length);_9f6.removeAllRanges();_9f6.addRange(_a0a);this._sCall("collapse",[false]);_9fb.parentNode.innerHTML="";}if(!_a01.firstChild){_977.destroy(_a01);}return true;}}return false;}else{_9f7=_9f6.getRangeAt(0);rs=_9f7.startContainer;if(rs&&rs.nodeType===3){var _9fe=_9f7.startOffset;if(rs.length<_9fe){ret=this._adjustNodeAndOffset(rs,_9fe);rs=ret.node;_9fe=ret.offset;}txt=rs.nodeValue;_9f8=doc.createTextNode(txt.substring(0,_9fe));var _a05=txt.substring(_9fe);if(_a05!==""){_9f9=doc.createTextNode(txt.substring(_9fe));}_9fa=doc.createElement("span");_9fb=doc.createTextNode(".");_9fa.appendChild(_9fb);if(_9f8.length){_977.place(_9f8,rs,"after");}else{_9f8=rs;}_977.place(_9fa,_9f8,"after");if(_9f9){_977.place(_9f9,_9fa,"after");}_977.destroy(rs);var _a0a=_984.create(this.window);_a0a.setStart(_9fb,0);_a0a.setEnd(_9fb,_9fb.length);_9f6.removeAllRanges();_9f6.addRange(_a0a);doc.execCommand(_9f5);_977.place(_9fa.firstChild,_9fa,"before");_977.destroy(_9fa);_a0a.setStart(_9fb,0);_a0a.setEnd(_9fb,_9fb.length);_9f6.removeAllRanges();_9f6.addRange(_a0a);this._sCall("collapse",[false]);_9fb.parentNode.innerHTML="";return true;}}}else{return false;}},_adaptIEList:function(_a0d){var _a0e=_984.getSelection(this.window);if(_a0e.isCollapsed){if(_a0e.rangeCount&&!this.queryCommandValue(_a0d)){var _a0f=_a0e.getRangeAt(0);var sc=_a0f.startContainer;if(sc&&sc.nodeType==3){if(!_a0f.startOffset){var _a10="ul";if(_a0d==="insertorderedlist"){_a10="ol";}var list=this.document.createElement(_a10);var li=_977.create("li",null,list);_977.place(list,sc,"before");li.appendChild(sc);_977.create("br",null,list,"after");var _a11=_984.create(this.window);_a11.setStart(sc,0);_a11.setEnd(sc,sc.length);_a0e.removeAllRanges();_a0e.addRange(_a11);this._sCall("collapse",[true]);return true;}}}}return false;},_handleTextColorOrProperties:function(_a12,_a13){var _a14=_984.getSelection(this.window);var doc=this.document;var rs,ret,_a15,txt,_a16,_a17,_a18,_a19;_a13=_a13||null;if(_a12&&_a14&&_a14.isCollapsed){if(_a14.rangeCount){_a15=_a14.getRangeAt(0);rs=_a15.startContainer;if(rs&&rs.nodeType===3){var _a1a=_a15.startOffset;if(rs.length<_a1a){ret=this._adjustNodeAndOffset(rs,_a1a);rs=ret.node;_a1a=ret.offset;}txt=rs.nodeValue;_a16=doc.createTextNode(txt.substring(0,_a1a));var _a1b=txt.substring(_a1a);if(_a1b!==""){_a17=doc.createTextNode(txt.substring(_a1a));}_a18=doc.createElement("span");_a19=doc.createTextNode(".");_a18.appendChild(_a19);var _a1c=doc.createElement("span");_a18.appendChild(_a1c);if(_a16.length){_977.place(_a16,rs,"after");}else{_a16=rs;}_977.place(_a18,_a16,"after");if(_a17){_977.place(_a17,_a18,"after");}_977.destroy(rs);var _a1d=_984.create(this.window);_a1d.setStart(_a19,0);_a1d.setEnd(_a19,_a19.length);_a14.removeAllRanges();_a14.addRange(_a1d);if(has("webkit")){var _a1e="color";if(_a12==="hilitecolor"||_a12==="backcolor"){_a1e="backgroundColor";}_979.set(_a18,_a1e,_a13);this._sCall("remove",[]);_977.destroy(_a1c);_a18.innerHTML="&#160;";this._sCall("selectElement",[_a18]);this.focus();}else{this.execCommand(_a12,_a13);_977.place(_a18.firstChild,_a18,"before");_977.destroy(_a18);_a1d.setStart(_a19,0);_a1d.setEnd(_a19,_a19.length);_a14.removeAllRanges();_a14.addRange(_a1d);this._sCall("collapse",[false]);_a19.parentNode.removeChild(_a19);}return true;}}}return false;},_adjustNodeAndOffset:function(node,_a1f){while(node.length<_a1f&&node.nextSibling&&node.nextSibling.nodeType===3){_a1f=_a1f-node.length;node=node.nextSibling;}return {"node":node,"offset":_a1f};},_tagNamesForCommand:function(_a20){if(_a20==="bold"){return ["b","strong"];}else{if(_a20==="italic"){return ["i","em"];}else{if(_a20==="strikethrough"){return ["s","strike"];}else{if(_a20==="superscript"){return ["sup"];}else{if(_a20==="subscript"){return ["sub"];}else{if(_a20==="underline"){return ["u"];}}}}}}return [];},_stripBreakerNodes:function(node){if(!this.isLoaded){return;}_97c(".ieFormatBreakerSpan",node).forEach(function(b){while(b.firstChild){_977.place(b.firstChild,b,"before");}_977.destroy(b);});return node;}});return _988;});},"esri/tasks/AreasAndLengthsParameters":function(){define("esri/tasks/AreasAndLengthsParameters",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel"],function(_a21,lang,_a22,_a23,has,_a24){var _a25=_a21(null,{declaredClass:"esri.tasks.AreasAndLengthsParameters",polygons:null,lengthUnit:null,areaUnit:null,calculationType:null,toJson:function(){var _a26=_a22.map(this.polygons,function(geom){return geom.toJson();});var json={};json.polygons=_a23.toJson(_a26);var _a27=this.polygons[0].spatialReference;json.sr=_a27.wkid?_a27.wkid:_a23.toJson(_a27.toJson());if(this.lengthUnit){json.lengthUnit=this.lengthUnit;}if(this.areaUnit){if(lang.isString(this.areaUnit)){json.areaUnit=_a23.toJson({"areaUnit":this.areaUnit});}else{json.areaUnit=this.areaUnit;}}if(this.calculationType){json.calculationType=this.calculationType;}return json;}});if(has("extend-esri")){lang.setObject("tasks.AreasAndLengthsParameters",_a25,_a24);}return _a25;});},"dojo/dnd/Moveable":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/lang","../dom","../dom-class","../Evented","../on","../topic","../touch","./common","./Mover","../_base/window"],function(_a28,_a29,_a2a,lang,dom,_a2b,_a2c,on,_a2d,_a2e,dnd,_a2f,win){var _a30=_a29("dojo.dnd.Moveable",[_a2c],{handle:"",delay:0,skip:false,constructor:function(node,_a31){this.node=dom.byId(node);if(!_a31){_a31={};}this.handle=_a31.handle?dom.byId(_a31.handle):null;if(!this.handle){this.handle=this.node;}this.delay=_a31.delay>0?_a31.delay:0;this.skip=_a31.skip;this.mover=_a31.mover?_a31.mover:_a2f;this.events=[on(this.handle,_a2e.press,lang.hitch(this,"onMouseDown")),on(this.handle,"dragstart",lang.hitch(this,"onSelectStart")),on(this.handle,"selectstart",lang.hitch(this,"onSelectStart"))];},markupFactory:function(_a32,node,Ctor){return new Ctor(node,_a32);},destroy:function(){_a28.forEach(this.events,function(_a33){_a33.remove();});this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&dnd.isFormElement(e)){return;}if(this.delay){this.events.push(on(this.handle,_a2e.move,lang.hitch(this,"onMouseMove")),on(this.handle,_a2e.release,lang.hitch(this,"onMouseUp")));this._lastX=e.pageX;this._lastY=e.pageY;}else{this.onDragDetected(e);}_a2a.stop(e);},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);this.onDragDetected(e);}_a2a.stop(e);},onMouseUp:function(e){for(var i=0;i<2;++i){this.events.pop().remove();}_a2a.stop(e);},onSelectStart:function(e){if(!this.skip||!dnd.isFormElement(e)){_a2a.stop(e);}},onDragDetected:function(e){new this.mover(this.node,e,this);},onMoveStart:function(_a34){_a2d.publish("/dnd/move/start",_a34);_a2b.add(win.body(),"dojoMove");_a2b.add(this.node,"dojoMoveItem");},onMoveStop:function(_a35){_a2d.publish("/dnd/move/stop",_a35);_a2b.remove(win.body(),"dojoMove");_a2b.remove(this.node,"dojoMoveItem");},onFirstMove:function(){},onMove:function(_a36,_a37){this.onMoving(_a36,_a37);var s=_a36.node.style;s.left=_a37.l+"px";s.top=_a37.t+"px";this.onMoved(_a36,_a37);},onMoving:function(){},onMoved:function(){}});return _a30;});},"dojo/store/util/SimpleQueryEngine":function(){define(["../../_base/array"],function(_a38){return function(_a39,_a3a){switch(typeof _a39){default:throw new Error("Can not query with a "+typeof _a39);case "object":case "undefined":var _a3b=_a39;_a39=function(_a3c){for(var key in _a3b){var _a3d=_a3b[key];if(_a3d&&_a3d.test){if(!_a3d.test(_a3c[key],_a3c)){return false;}}else{if(_a3d!=_a3c[key]){return false;}}}return true;};break;case "string":if(!this[_a39]){throw new Error("No filter function "+_a39+" was found in store");}_a39=this[_a39];case "function":}function _a3e(_a3f){var _a40=_a38.filter(_a3f,_a39);var _a41=_a3a&&_a3a.sort;if(_a41){_a40.sort(typeof _a41=="function"?_a41:function(a,b){for(var sort,i=0;sort=_a41[i];i++){var _a42=a[sort.attribute];var _a43=b[sort.attribute];if(_a42!=_a43){return !!sort.descending==(_a42==null||_a42>_a43)?-1:1;}}return 0;});}if(_a3a&&(_a3a.start||_a3a.count)){var _a44=_a40.length;_a40=_a40.slice(_a3a.start||0,(_a3a.start||0)+(_a3a.count||Infinity));_a40.total=_a44;}return _a40;};_a3e.matches=_a39;return _a3e;};});},"dojox/grid/_View":function(){require({cache:{"url:dojox/grid/resources/View.html":"<div class=\"dojoxGridView\" role=\"presentation\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" role=\"presentation\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" role=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" role=\"row\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" role=\"presentation\" />\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" role=\"presentation\" />\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" role=\"presentation\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" role=\"presentation\"></div>\n\t</div>\n</div>\n"}});define("dojox/grid/_View",["dojo","dijit/registry","../main","dojo/_base/declare","dojo/_base/array","dojo/_base/lang","dojo/_base/connect","dojo/_base/sniff","dojo/query","dojo/_base/window","dojo/text!./resources/View.html","dojo/dnd/Source","dijit/_Widget","dijit/_TemplatedMixin","dojox/html/metrics","./util","dojo/_base/html","./_Builder","dojo/dnd/Avatar","dojo/dnd/Manager"],function(dojo,_a45,_a46,_a47,_a48,lang,_a49,has,_a4a,win,_a4b,_a4c,_a4d,_a4e,_a4f,util,html,_a50,_a51,_a52){var _a53=function(_a54,_a55){return _a54.style.cssText==undefined?_a54.getAttribute("style"):_a54.style.cssText;};var _a56=_a47("dojox.grid._View",[_a4d,_a4e],{defaultWidth:"18em",viewWidth:"",templateString:_a4b,classTag:"dojoxGrid",marginBottom:0,rowPad:2,_togglingColumn:-1,_headerBuilderClass:_a50._HeaderBuilder,_contentBuilderClass:_a50._ContentBuilder,postMixInProperties:function(){this.rowNodes={};},postCreate:function(){this.connect(this.scrollboxNode,"onscroll","doscroll");util.funnelEvents(this.contentNode,this,"doContentEvent",["mouseover","mouseout","click","dblclick","contextmenu","mousedown"]);util.funnelEvents(this.headerNode,this,"doHeaderEvent",["dblclick","mouseover","mouseout","mousemove","mousedown","click","contextmenu"]);this.content=new this._contentBuilderClass(this);this.header=new this._headerBuilderClass(this);if(!this.grid.isLeftToRight()){this.headerNodeContainer.style.width="";}},destroy:function(){html.destroy(this.headerNode);delete this.headerNode;for(var i in this.rowNodes){this._cleanupRowWidgets(this.rowNodes[i]);html.destroy(this.rowNodes[i]);}this.rowNodes={};if(this.source){this.source.destroy();}this.inherited(arguments);},focus:function(){if(has("ie")||has("webkit")||has("opera")){this.hiddenFocusNode.focus();}else{this.scrollboxNode.focus();}},setStructure:function(_a57){var vs=(this.structure=_a57);if(vs.width&&!isNaN(vs.width)){this.viewWidth=vs.width+"em";}else{this.viewWidth=vs.width||(vs.noscroll?"auto":this.viewWidth);}this._onBeforeRow=vs.onBeforeRow||function(){};this._onAfterRow=vs.onAfterRow||function(){};this.noscroll=vs.noscroll;if(this.noscroll){this.scrollboxNode.style.overflow="hidden";}this.simpleStructure=Boolean(vs.cells.length==1);this.testFlexCells();this.updateStructure();},_cleanupRowWidgets:function(_a58){if(_a58){_a48.forEach(_a4a("[widgetId]",_a58).map(_a45.byNode),function(w){if(w._destroyOnRemove){w.destroy();delete w;}else{if(w.domNode&&w.domNode.parentNode){w.domNode.parentNode.removeChild(w.domNode);}}});}},onBeforeRow:function(_a59,_a5a){this._onBeforeRow(_a59,_a5a);if(_a59>=0){this._cleanupRowWidgets(this.getRowNode(_a59));}},onAfterRow:function(_a5b,_a5c,_a5d){this._onAfterRow(_a5b,_a5c,_a5d);var g=this.grid;_a48.forEach(_a4a(".dojoxGridStubNode",_a5d),function(n){if(n&&n.parentNode){var lw=n.getAttribute("linkWidget");var _a5e=window.parseInt(html.attr(n,"cellIdx"),10);var _a5f=g.getCell(_a5e);var w=_a45.byId(lw);if(w){n.parentNode.replaceChild(w.domNode,n);if(!w._started){w.startup();}dojo.destroy(n);}else{n.innerHTML="";}}},this);},testFlexCells:function(){this.flexCells=false;for(var j=0,row;(row=this.structure.cells[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.view=this;this.flexCells=this.flexCells||cell.isFlex();}}return this.flexCells;},updateStructure:function(){this.header.update();this.content.update();},getScrollbarWidth:function(){var _a60=this.hasVScrollbar();var _a61=html.style(this.scrollboxNode,"overflow");if(this.noscroll||!_a61||_a61=="hidden"){_a60=false;}else{if(_a61=="scroll"){_a60=true;}}return (_a60?_a4f.getScrollbar().w:0);},getColumnsWidth:function(){var h=this.headerContentNode;return h&&h.firstChild?(h.firstChild.offsetWidth||html.style(h.firstChild,"width")):0;},setColumnsWidth:function(_a62){this.headerContentNode.firstChild.style.width=_a62+"px";if(this.viewWidth){this.viewWidth=_a62+"px";}},getWidth:function(){return this.viewWidth||(this.getColumnsWidth()+this.getScrollbarWidth())+"px";},getContentWidth:function(){return Math.max(0,html._getContentBox(this.domNode).w-this.getScrollbarWidth())+"px";},render:function(){this.scrollboxNode.style.height="";this.renderHeader();if(this._togglingColumn>=0){this.setColumnsWidth(this.getColumnsWidth()-this._togglingColumn);this._togglingColumn=-1;}var _a63=this.grid.layout.cells;var _a64=lang.hitch(this,function(node,_a65){!this.grid.isLeftToRight()&&(_a65=!_a65);var inc=_a65?-1:1;var idx=this.header.getCellNodeIndex(node)+inc;var cell=_a63[idx];while(cell&&cell.getHeaderNode()&&cell.getHeaderNode().style.display=="none"){idx+=inc;cell=_a63[idx];}if(cell){return cell.getHeaderNode();}return null;});if(this.grid.columnReordering&&this.simpleStructure){if(this.source){this.source.destroy();}var _a66="dojoxGrid_bottomMarker";var _a67="dojoxGrid_topMarker";if(this.bottomMarker){html.destroy(this.bottomMarker);}this.bottomMarker=html.byId(_a66);if(this.topMarker){html.destroy(this.topMarker);}this.topMarker=html.byId(_a67);if(!this.bottomMarker){this.bottomMarker=html.create("div",{"id":_a66,"class":"dojoxGridColPlaceBottom"},win.body());this._hide(this.bottomMarker);this.topMarker=html.create("div",{"id":_a67,"class":"dojoxGridColPlaceTop"},win.body());this._hide(this.topMarker);}this.arrowDim=html.contentBox(this.bottomMarker);var _a68=html.contentBox(this.headerContentNode.firstChild.rows[0]).h;this.source=new _a4c(this.headerContentNode.firstChild.rows[0],{horizontal:true,accept:["gridColumn_"+this.grid.id],viewIndex:this.index,generateText:false,onMouseDown:lang.hitch(this,function(e){this.header.decorateEvent(e);if((this.header.overRightResizeArea(e)||this.header.overLeftResizeArea(e))&&this.header.canResize(e)&&!this.header.moveable){this.header.beginColumnResize(e);}else{if(this.grid.headerMenu){this.grid.headerMenu.onCancel(true);}if(e.button===(has("ie")<9?1:0)){_a4c.prototype.onMouseDown.call(this.source,e);}}}),onMouseOver:lang.hitch(this,function(e){var src=this.source;if(src._getChildByEvent(e)){_a4c.prototype.onMouseOver.apply(src,arguments);}}),_markTargetAnchor:lang.hitch(this,function(_a69){var src=this.source;if(src.current==src.targetAnchor&&src.before==_a69){return;}if(src.targetAnchor&&_a64(src.targetAnchor,src.before)){src._removeItemClass(_a64(src.targetAnchor,src.before),src.before?"After":"Before");}_a4c.prototype._markTargetAnchor.call(src,_a69);var _a6a=_a69?src.targetAnchor:_a64(src.targetAnchor,src.before);var _a6b=0;if(!_a6a){_a6a=src.targetAnchor;_a6b=html.contentBox(_a6a).w+this.arrowDim.w/2+2;}var pos=html.position(_a6a,true);var left=Math.floor(pos.x-this.arrowDim.w/2+_a6b);html.style(this.bottomMarker,"visibility","visible");html.style(this.topMarker,"visibility","visible");html.style(this.bottomMarker,{"left":left+"px","top":(_a68+pos.y)+"px"});html.style(this.topMarker,{"left":left+"px","top":(pos.y-this.arrowDim.h)+"px"});if(src.targetAnchor&&_a64(src.targetAnchor,src.before)){src._addItemClass(_a64(src.targetAnchor,src.before),src.before?"After":"Before");}}),_unmarkTargetAnchor:lang.hitch(this,function(){var src=this.source;if(!src.targetAnchor){return;}if(src.targetAnchor&&_a64(src.targetAnchor,src.before)){src._removeItemClass(_a64(src.targetAnchor,src.before),src.before?"After":"Before");}this._hide(this.bottomMarker);this._hide(this.topMarker);_a4c.prototype._unmarkTargetAnchor.call(src);}),destroy:lang.hitch(this,function(){_a49.disconnect(this._source_conn);_a49.unsubscribe(this._source_sub);_a4c.prototype.destroy.call(this.source);if(this.bottomMarker){html.destroy(this.bottomMarker);delete this.bottomMarker;}if(this.topMarker){html.destroy(this.topMarker);delete this.topMarker;}}),onDndCancel:lang.hitch(this,function(){_a4c.prototype.onDndCancel.call(this.source);this._hide(this.bottomMarker);this._hide(this.topMarker);})});this._source_conn=_a49.connect(this.source,"onDndDrop",this,"_onDndDrop");this._source_sub=_a49.subscribe("/dnd/drop/before",this,"_onDndDropBefore");this.source.startup();}},_hide:function(node){html.style(node,{top:"-10000px","visibility":"hidden"});},_onDndDropBefore:function(_a6c,_a6d,copy){if(_a52.manager().target!==this.source){return;}this.source._targetNode=this.source.targetAnchor;this.source._beforeTarget=this.source.before;var _a6e=this.grid.views.views;var _a6f=_a6e[_a6c.viewIndex];var _a70=_a6e[this.index];if(_a70!=_a6f){_a6f.convertColPctToFixed();_a70.convertColPctToFixed();}},_onDndDrop:function(_a71,_a72,copy){if(_a52.manager().target!==this.source){if(_a52.manager().source===this.source){this._removingColumn=true;}return;}this._hide(this.bottomMarker);this._hide(this.topMarker);var _a73=function(n){return n?html.attr(n,"idx"):null;};var w=html.marginBox(_a72[0]).w;if(_a71.viewIndex!==this.index){var _a74=this.grid.views.views;var _a75=_a74[_a71.viewIndex];var _a76=_a74[this.index];if(_a75.viewWidth&&_a75.viewWidth!="auto"){_a75.setColumnsWidth(_a75.getColumnsWidth()-w);}if(_a76.viewWidth&&_a76.viewWidth!="auto"){_a76.setColumnsWidth(_a76.getColumnsWidth());}}var stn=this.source._targetNode;var stb=this.source._beforeTarget;!this.grid.isLeftToRight()&&(stb=!stb);var _a77=this.grid.layout;var idx=this.index;delete this.source._targetNode;delete this.source._beforeTarget;_a77.moveColumn(_a71.viewIndex,idx,_a73(_a72[0]),_a73(stn),stb);},renderHeader:function(){this.headerContentNode.innerHTML=this.header.generateHtml(this._getHeaderContent);if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}util.fire(this,"onAfterRow",[-1,this.structure.cells,this.headerContentNode]);},_getHeaderContent:function(_a78){var n=_a78.name||_a78.grid.getCellName(_a78);if(/^\s+$/.test(n)){n="&nbsp;";}var ret=["<div class=\"dojoxGridSortNode"];if(_a78.index!=_a78.grid.getSortIndex()){ret.push("\">");}else{ret=ret.concat([" ",_a78.grid.sortInfo>0?"dojoxGridSortUp":"dojoxGridSortDown","\"><div class=\"dojoxGridArrowButtonChar\">",_a78.grid.sortInfo>0?"&#9650;":"&#9660;","</div><div class=\"dojoxGridArrowButtonNode\" role=\"presentation\"></div>","<div class=\"dojoxGridColCaption\">"]);}ret=ret.concat([n,"</div></div>"]);return ret.join("");},resize:function(){this.adaptHeight();this.adaptWidth();},hasHScrollbar:function(_a79){var _a7a=this._hasHScroll||false;if(this._hasHScroll==undefined||_a79){if(this.noscroll){this._hasHScroll=false;}else{var _a7b=html.style(this.scrollboxNode,"overflow");if(_a7b=="hidden"){this._hasHScroll=false;}else{if(_a7b=="scroll"){this._hasHScroll=true;}else{this._hasHScroll=(this.scrollboxNode.offsetWidth-this.getScrollbarWidth()<this.contentNode.offsetWidth);}}}}if(_a7a!==this._hasHScroll){this.grid.update();}return this._hasHScroll;},hasVScrollbar:function(_a7c){var _a7d=this._hasVScroll||false;if(this._hasVScroll==undefined||_a7c){if(this.noscroll){this._hasVScroll=false;}else{var _a7e=html.style(this.scrollboxNode,"overflow");if(_a7e=="hidden"){this._hasVScroll=false;}else{if(_a7e=="scroll"){this._hasVScroll=true;}else{this._hasVScroll=(this.scrollboxNode.scrollHeight>this.scrollboxNode.clientHeight);}}}}if(_a7d!==this._hasVScroll){this.grid.update();}return this._hasVScroll;},convertColPctToFixed:function(){var _a7f=false;this.grid.initialWidth="";var _a80=_a4a("th",this.headerContentNode);var _a81=_a48.map(_a80,function(c,vIdx){var w=c.style.width;html.attr(c,"vIdx",vIdx);if(w&&w.slice(-1)=="%"){_a7f=true;}else{if(w&&w.slice(-2)=="px"){return window.parseInt(w,10);}}return html.contentBox(c).w;});if(_a7f){_a48.forEach(this.grid.layout.cells,function(cell,idx){if(cell.view==this){var _a82=cell.view.getHeaderCellNode(cell.index);if(_a82&&html.hasAttr(_a82,"vIdx")){var vIdx=window.parseInt(html.attr(_a82,"vIdx"));this.setColWidth(idx,_a81[vIdx]);html.removeAttr(_a82,"vIdx");}}},this);return true;}return false;},adaptHeight:function(_a83){if(!this.grid._autoHeight){var h=(this.domNode.style.height&&parseInt(this.domNode.style.height.replace(/px/,""),10))||this.domNode.clientHeight;var self=this;var _a84=function(){var v;for(var i in self.grid.views.views){v=self.grid.views.views[i];if(v!==self&&v.hasHScrollbar()){return true;}}return false;};if(_a83||(this.noscroll&&_a84())){h-=_a4f.getScrollbar().h;}util.setStyleHeightPx(this.scrollboxNode,h);}this.hasVScrollbar(true);},adaptWidth:function(){if(this.flexCells){this.contentWidth=this.getContentWidth();this.headerContentNode.firstChild.style.width=this.contentWidth;}var w=this.scrollboxNode.offsetWidth-this.getScrollbarWidth();if(!this._removingColumn){w=Math.max(w,this.getColumnsWidth())+"px";}else{w=Math.min(w,this.getColumnsWidth())+"px";this._removingColumn=false;}var cn=this.contentNode;cn.style.width=w;this.hasHScrollbar(true);},setSize:function(w,h){var ds=this.domNode.style;var hs=this.headerNode.style;if(w){ds.width=w;hs.width=w;}ds.height=(h>=0?h+"px":"");},renderRow:function(_a85){var _a86=this.createRowNode(_a85);this.buildRow(_a85,_a86);return _a86;},createRowNode:function(_a87){var node=document.createElement("div");node.className=this.classTag+"Row";if(this instanceof _a46.grid._RowSelector){html.attr(node,"role","presentation");}else{html.attr(node,"role","row");if(this.grid.selectionMode!="none"){node.setAttribute("aria-selected","false");}}node[util.gridViewTag]=this.id;node[util.rowIndexTag]=_a87;this.rowNodes[_a87]=node;return node;},buildRow:function(_a88,_a89){this.buildRowContent(_a88,_a89);this.styleRow(_a88,_a89);},buildRowContent:function(_a8a,_a8b){_a8b.innerHTML=this.content.generateHtml(_a8a,_a8a);if(this.flexCells&&this.contentWidth){_a8b.firstChild.style.width=this.contentWidth;}util.fire(this,"onAfterRow",[_a8a,this.structure.cells,_a8b]);},rowRemoved:function(_a8c){if(_a8c>=0){this._cleanupRowWidgets(this.getRowNode(_a8c));}this.grid.edit.save(this,_a8c);delete this.rowNodes[_a8c];},getRowNode:function(_a8d){return this.rowNodes[_a8d];},getCellNode:function(_a8e,_a8f){var row=this.getRowNode(_a8e);if(row){return this.content.getCellNode(row,_a8f);}},getHeaderCellNode:function(_a90){if(this.headerContentNode){return this.header.getCellNode(this.headerContentNode,_a90);}},styleRow:function(_a91,_a92){_a92._style=_a53(_a92);this.styleRowNode(_a91,_a92);},styleRowNode:function(_a93,_a94){if(_a94){this.doStyleRowNode(_a93,_a94);}},doStyleRowNode:function(_a95,_a96){this.grid.styleRowNode(_a95,_a96);},updateRow:function(_a97){var _a98=this.getRowNode(_a97);if(_a98){_a98.style.height="";this.buildRow(_a97,_a98);}return _a98;},updateRowStyles:function(_a99){this.styleRowNode(_a99,this.getRowNode(_a99));},lastTop:0,firstScroll:0,_nativeScroll:false,doscroll:function(_a9a){if(has("ff")>=13){this._nativeScroll=true;}var _a9b=this.grid.isLeftToRight();if(this.firstScroll<2){if((!_a9b&&this.firstScroll==1)||(_a9b&&this.firstScroll===0)){var s=html.marginBox(this.headerNodeContainer);if(has("ie")){this.headerNodeContainer.style.width=s.w+this.getScrollbarWidth()+"px";}else{if(has("mozilla")){this.headerNodeContainer.style.width=s.w-this.getScrollbarWidth()+"px";this.scrollboxNode.scrollLeft=_a9b?this.scrollboxNode.clientWidth-this.scrollboxNode.scrollWidth:this.scrollboxNode.scrollWidth-this.scrollboxNode.clientWidth;}}}this.firstScroll++;}this.headerNode.scrollLeft=this.scrollboxNode.scrollLeft;var top=this.scrollboxNode.scrollTop;if(top!==this.lastTop){this.grid.scrollTo(top);}this._nativeScroll=false;},setScrollTop:function(_a9c){this.lastTop=_a9c;if(!this._nativeScroll){this.scrollboxNode.scrollTop=_a9c;}return this.scrollboxNode.scrollTop;},doContentEvent:function(e){if(this.content.decorateEvent(e)){this.grid.onContentEvent(e);}},doHeaderEvent:function(e){if(this.header.decorateEvent(e)){this.grid.onHeaderEvent(e);}},dispatchContentEvent:function(e){return this.content.dispatchEvent(e);},dispatchHeaderEvent:function(e){return this.header.dispatchEvent(e);},setColWidth:function(_a9d,_a9e){this.grid.setCellWidth(_a9d,_a9e+"px");},update:function(){if(!this.domNode){return;}this.content.update();this.grid.update();var left=this.scrollboxNode.scrollLeft;this.scrollboxNode.scrollLeft=left;this.headerNode.scrollLeft=left;}});var _a9f=_a47("dojox.grid._GridAvatar",_a51,{construct:function(){var dd=win.doc;var a=dd.createElement("table");a.cellPadding=a.cellSpacing="0";a.className="dojoxGridDndAvatar";a.style.position="absolute";a.style.zIndex=1999;a.style.margin="0px";var b=dd.createElement("tbody");var tr=dd.createElement("tr");var td=dd.createElement("td");var img=dd.createElement("td");tr.className="dojoxGridDndAvatarItem";img.className="dojoxGridDndAvatarItemImage";img.style.width="16px";var _aa0=this.manager.source,node;if(_aa0.creator){node=_aa0._normalizedCreator(_aa0.getItem(this.manager.nodes[0].id).data,"avatar").node;}else{node=this.manager.nodes[0].cloneNode(true);var _aa1,_aa2;if(node.tagName.toLowerCase()=="tr"){_aa1=dd.createElement("table");_aa2=dd.createElement("tbody");_aa2.appendChild(node);_aa1.appendChild(_aa2);node=_aa1;}else{if(node.tagName.toLowerCase()=="th"){_aa1=dd.createElement("table");_aa2=dd.createElement("tbody");var r=dd.createElement("tr");_aa1.cellPadding=_aa1.cellSpacing="0";r.appendChild(node);_aa2.appendChild(r);_aa1.appendChild(_aa2);node=_aa1;}}}node.id="";td.appendChild(node);tr.appendChild(img);tr.appendChild(td);html.style(tr,"opacity",0.9);b.appendChild(tr);a.appendChild(b);this.node=a;var m=_a52.manager();this.oldOffsetY=m.OFFSET_Y;m.OFFSET_Y=1;},destroy:function(){_a52.manager().OFFSET_Y=this.oldOffsetY;this.inherited(arguments);}});var _aa3=_a52.manager().makeAvatar;_a52.manager().makeAvatar=function(){var src=this.source;if(src.viewIndex!==undefined&&!html.hasClass(win.body(),"dijit_a11y")){return new _a9f(this);}return _aa3.call(_a52.manager());};return _a56;});},"dijit/typematic":function(){define("dijit/typematic",["dojo/_base/array","dojo/_base/connect","dojo/_base/event","dojo/_base/kernel","dojo/_base/lang","dojo/on","dojo/sniff","./main"],function(_aa4,_aa5,_aa6,_aa7,lang,on,has,_aa8){var _aa9=(_aa8.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),this._minDelay);this._timer=setTimeout(lang.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_aaa,node,_aab,obj,_aac,_aad,_aae){if(obj!=this._obj){this.stop();this._initialDelay=_aad||500;this._subsequentDelay=_aac||0.9;this._minDelay=_aae||10;this._obj=obj;this._node=node;this._currentTimeout=-1;this._count=-1;this._callback=lang.hitch(_aaa,_aab);this._evt={faux:true};for(var attr in evt){if(attr!="layerX"&&attr!="layerY"){var v=evt[attr];if(typeof v!="function"&&typeof v!="undefined"){this._evt[attr]=v;}}}this._fireEventAndReload();}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(node,_aaf,_ab0,_ab1,_ab2,_ab3,_ab4){if(_aaf.keyCode){_aaf.charOrCode=_aaf.keyCode;_aa7.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_aaf.charCode){_aaf.charOrCode=String.fromCharCode(_aaf.charCode);_aa7.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}var _ab5=[on(node,_aa5._keypress,lang.hitch(this,function(evt){if(evt.charOrCode==_aaf.charOrCode&&(_aaf.ctrlKey===undefined||_aaf.ctrlKey==evt.ctrlKey)&&(_aaf.altKey===undefined||_aaf.altKey==evt.altKey)&&(_aaf.metaKey===undefined||_aaf.metaKey==(evt.metaKey||false))&&(_aaf.shiftKey===undefined||_aaf.shiftKey==evt.shiftKey)){_aa6.stop(evt);_aa9.trigger(evt,_ab0,node,_ab1,_aaf,_ab2,_ab3,_ab4);}else{if(_aa9._obj==_aaf){_aa9.stop();}}})),on(node,"keyup",lang.hitch(this,function(){if(_aa9._obj==_aaf){_aa9.stop();}}))];return {remove:function(){_aa4.forEach(_ab5,function(h){h.remove();});}};},addMouseListener:function(node,_ab6,_ab7,_ab8,_ab9,_aba){var _abb=[on(node,"mousedown",lang.hitch(this,function(evt){evt.preventDefault();_aa9.trigger(evt,_ab6,node,_ab7,node,_ab8,_ab9,_aba);})),on(node,"mouseup",lang.hitch(this,function(evt){if(this._obj){evt.preventDefault();}_aa9.stop();})),on(node,"mouseout",lang.hitch(this,function(evt){if(this._obj){evt.preventDefault();}_aa9.stop();})),on(node,"dblclick",lang.hitch(this,function(evt){evt.preventDefault();if(has("ie")<9){_aa9.trigger(evt,_ab6,node,_ab7,node,_ab8,_ab9,_aba);setTimeout(lang.hitch(this,_aa9.stop),50);}}))];return {remove:function(){_aa4.forEach(_abb,function(h){h.remove();});}};},addListener:function(_abc,_abd,_abe,_abf,_ac0,_ac1,_ac2,_ac3){var _ac4=[this.addKeyListener(_abd,_abe,_abf,_ac0,_ac1,_ac2,_ac3),this.addMouseListener(_abc,_abf,_ac0,_ac1,_ac2,_ac3)];return {remove:function(){_aa4.forEach(_ac4,function(h){h.remove();});}};}});return _aa9;});},"dijit/MenuItem":function(){require({cache:{"url:dijit/templates/MenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitem\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitIcon dijitMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">\n\t\t<div data-dojo-attach-point=\"arrowWrapper\" style=\"visibility: hidden\">\n\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuExpand\"/>\n\t\t\t<span class=\"dijitMenuExpandA11y\">+</span>\n\t\t</div>\n\t</td>\n</tr>\n"}});define("dijit/MenuItem",["dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/_base/kernel","dojo/sniff","./_Widget","./_TemplatedMixin","./_Contained","./_CssStateMixin","dojo/text!./templates/MenuItem.html"],function(_ac5,dom,_ac6,_ac7,_ac8,has,_ac9,_aca,_acb,_acc,_acd){return _ac5("dijit.MenuItem",[_ac9,_aca,_acb,_acc],{templateString:_acd,baseClass:"dijitMenuItem",label:"",_setLabelAttr:function(val){this.containerNode.innerHTML=val;this._set("label",val);if(this.textDir==="auto"){this.applyTextDir(this.focusNode,this.label);}},iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},accelKey:"",disabled:false,_fillContent:function(_ace){if(_ace&&!("label" in this.params)){this.set("label",_ace.innerHTML);}},buildRendering:function(){this.inherited(arguments);var _acf=this.id+"_text";_ac6.set(this.containerNode,"id",_acf);if(this.accelKeyNode){_ac6.set(this.accelKeyNode,"id",this.id+"_accel");_acf+=" "+this.id+"_accel";}this.domNode.setAttribute("aria-labelledby",_acf);dom.setSelectable(this.domNode,false);},onClick:function(){},focus:function(){try{if(has("ie")==8){this.containerNode.focus();}this.focusNode.focus();}catch(e){}},_onFocus:function(){this._setSelected(true);this.getParent()._onItemFocus(this);this.inherited(arguments);},_setSelected:function(_ad0){_ac7.toggle(this.domNode,"dijitMenuItemSelected",_ad0);},setLabel:function(_ad1){_ac8.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",_ad1);},setDisabled:function(_ad2){_ac8.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",_ad2);},_setDisabledAttr:function(_ad3){this.focusNode.setAttribute("aria-disabled",_ad3?"true":"false");this._set("disabled",_ad3);},_setAccelKeyAttr:function(_ad4){this.accelKeyNode.style.display=_ad4?"":"none";this.accelKeyNode.innerHTML=_ad4;_ac6.set(this.containerNode,"colSpan",_ad4?"1":"2");this._set("accelKey",_ad4);},_setTextDirAttr:function(_ad5){if(!this._created||this.textDir!=_ad5){this._set("textDir",_ad5);this.applyTextDir(this.focusNode,this.label);}}});});},"esri/dijit/editing/AttachmentEditor":function(){define(["require","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","esri/kernel","esri/lang","esri/domUtils","dojo/text!esri/dijit/editing/templates/AttachmentEditor.html","dojo/i18n!esri/nls/jsapi","dojo/NodeList-dom"],function(_ad6,_ad7,lang,_ad8,_ad9,_ada,has,_adb,_adc,_add,_ade,_adf,_ae0,_ae1,_ae2,_ae3,_ae4){var AE=_ad7([_ade,_adf],{declaredClass:"esri.dijit.editing.AttachmentEditor",widgetsInTemplate:true,templateString:_ae3,basePath:_ad6.toUrl("esri/dijit/editing")+"/",_listHtml:"<span id='node_${oid}_${attid}'><a href='${href}' target='_blank'>${name}</a>",_deleteBtnHtml:"(<span style='cursor:pointer;color:red;font-weight:bold;' class='deleteAttachment' id='${attid}');'>X</span>)",_endHtml:"<br/></span>",_aeConnects:[],_layerEditingCapChecked:{},_layerEditingCap:{},constructor:function(_ae5,_ae6){lang.mixin(this,_ae4.widgets.attachmentEditor);},startup:function(){this.inherited(arguments);this._uploadField_connect=_ad8.connect(this._uploadField,"onchange",this,"_addAttachment");this._uploadFieldFocus_connect=_ad8.connect(this._uploadField,"onfocus",lang.hitch(this,function(e){_ae2.hide(this._attachmentError);}));},destroy:function(){_ad9.forEach(this._aeConnects,_ad8.disconnect);_ad8.disconnect(this._uploadField_connect);_ad8.disconnect(this._uploadFieldFocus_connect);this.inherited(arguments);},showAttachments:function(_ae7,_ae8){var list=this._attachmentList;list.innerHTML=this.NLS_none;this._uploadField.value="";_ad9.forEach(this.domNode.children,function(_ae9,idx){_ae2.show(_ae9);});_ae2.hide(this._attachmentError);if(!_ae7){return;}this._featureLayer=_ae7.getLayer()||_ae8;if(!this._featureLayer){return;}if(this._featureLayer.declaredClass!=="esri.layers.FeatureLayer"||!this._featureLayer.getEditCapabilities){_ae2.hide(this._uploadForm);_ad9.forEach(this.domNode.children,function(_aea,idx){_ae2.hide(_aea);});return;}this._currentLayerId=this._featureLayer.id;if(!this._layerEditingCapChecked[this._currentLayerId]){this._layerEditingCap[this._currentLayerId]=this._featureLayer.getEditCapabilities();this._layerEditingCapChecked[this._currentLayerId]=true;}this._featureCanUpdate=this._featureLayer.getEditCapabilities({feature:_ae7}).canUpdate;this._oid=_ae7.attributes[this._featureLayer.objectIdField];this._getAttachments(_ae7);},_getAttachments:function(_aeb){if(!this._featureLayer||!this._featureLayer.queryAttachmentInfos){return;}this._featureLayer.queryAttachmentInfos(this._oid,lang.hitch(this,"_onQueryAttachmentInfosComplete"));},_addAttachment:function(){_ae2.hide(this._attachmentError);if(!this._featureLayer||!this._featureLayer.addAttachment){return;}this._featureLayer.addAttachment(this._oid,this._uploadForm,lang.hitch(this,"_onAddAttachmentComplete"),lang.hitch(this,"_onAddAttachmentError"));},_deleteAttachment:function(oid,_aec){this._featureLayer.deleteAttachments(oid,[_aec],lang.hitch(this,"_onDeleteAttachmentComplete"));},_onQueryAttachmentInfosComplete:function(_aed){var _aee=this._listHtml+this._deleteBtnHtml+this._endHtml;this._uploadForm.style.display="block";if((!this._featureCanUpdate&&this._layerEditingCap[this._currentLayerId].canUpdate)||(!this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate)){_aee=this._listHtml+this._endHtml;this._uploadForm.style.display="none";}else{if(this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate){_aee=this._listHtml+this._endHtml;}}var list=this._attachmentList,_aef=_ad9.map(_aed,lang.hitch(this,function(info){return _ae1.substitute({href:info.url,name:info.name,oid:info.objectId,attid:info.id},_aee);}));list.innerHTML=_aef.join("")||this.NLS_none;this._updateConnects();},_onAddAttachmentComplete:function(_af0){var _af1=this._uploadField;var _af2=_af1.value;var pos=_af2.lastIndexOf("\\");if(pos>-1){_af2=_af2.substring(pos+1,_af2.length);}_af2=_af2.replace(/\ /g,"_");var list=this._attachmentList,_af3=_adc.objectToQuery({gdbVersion:this._featureLayer.gdbVersion,token:this._featureLayer._getToken()});var _af4=this._listHtml+this._deleteBtnHtml+this._endHtml;if(this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate){_af4=this._listHtml+this._endHtml;}var link=_ae1.substitute({href:this._featureLayer._url.path+"/"+_af0.objectId+"/attachments/"+_af0.attachmentId+(_af3?("?"+_af3):""),name:_af2,oid:_af0.objectId,attid:_af0.attachmentId},_af4);list.innerHTML=list.innerHTML==this.NLS_none?link:(list.innerHTML+link);this._updateConnects();_af1.value="";},_onAddAttachmentError:function(_af5){if(_af5&&_ae1.isDefined(_af5.code)){var _af6,_af7=this._attachmentError;if(_af5.code===400){_af6=this.NLS_fileNotSupported;}else{_af6=_af5.message||(_af5.details&&_af5.details.length&&_af5.details[0]);}_add.set(_af7,"innerHTML",(_af6||this.NLS_error));_ae2.show(_af7);}},_onDeleteAttachmentComplete:function(_af8){var _af9=_ad9.every(_af8,function(_afa){return _afa.success;}),list=this._attachmentList;if(_af9){_ada.query("#node_"+_af8[0].objectId+"_"+_af8[0].attachmentId).orphan();if(!list.children||!list.children.length){list.innerHTML=this.NLS_none;}}},_updateConnects:function(){_ad9.forEach(this._aeConnects,_ad8.disconnect);_ada.query(".deleteAttachment").forEach(function(item){this._aeConnects.push(_ad8.connect(item,"onclick",lang.hitch(this,"_deleteAttachment",this._oid,item.id)));},this);}});if(has("extend-esri")){lang.setObject("dijit.editing.AttachmentEditor",AE,_ae0);}return AE;});},"dijit/ToolbarSeparator":function(){define("dijit/ToolbarSeparator",["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],function(_afb,dom,_afc,_afd){return _afb("dijit.ToolbarSeparator",[_afc,_afd],{templateString:"<div class=\"dijitToolbarSeparator dijitInline\" role=\"presentation\"></div>",buildRendering:function(){this.inherited(arguments);dom.setSelectable(this.domNode,false);},isFocusable:function(){return false;}});});},"dijit/layout/_LayoutWidget":function(){define("dijit/layout/_LayoutWidget",["dojo/_base/lang","../_Widget","../_Container","../_Contained","../Viewport","dojo/_base/declare","dojo/dom-class","dojo/dom-geometry","dojo/dom-style"],function(lang,_afe,_aff,_b00,_b01,_b02,_b03,_b04,_b05){return _b02("dijit.layout._LayoutWidget",[_afe,_aff,_b00],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,buildRendering:function(){this.inherited(arguments);_b03.add(this.domNode,"dijitContainer");},startup:function(){if(this._started){return;}this.inherited(arguments);var _b06=this.getParent&&this.getParent();if(!(_b06&&_b06.isLayoutContainer)){this.resize();this.own(_b01.on("resize",lang.hitch(this,"resize")));}},resize:function(_b07,_b08){var node=this.domNode;if(_b07){_b04.setMarginBox(node,_b07);}var mb=_b08||{};lang.mixin(mb,_b07||{});if(!("h" in mb)||!("w" in mb)){mb=lang.mixin(_b04.getMarginBox(node),mb);}var cs=_b05.getComputedStyle(node);var me=_b04.getMarginExtents(node,cs);var be=_b04.getBorderExtents(node,cs);var bb=(this._borderBox={w:mb.w-(me.w+be.w),h:mb.h-(me.h+be.h)});var pe=_b04.getPadExtents(node,cs);this._contentBox={l:_b05.toPixelValue(node,cs.paddingLeft),t:_b05.toPixelValue(node,cs.paddingTop),w:bb.w-pe.w,h:bb.h-pe.h};this.layout();},layout:function(){},_setupChild:function(_b09){var cls=this.baseClass+"-child "+(_b09.baseClass?this.baseClass+"-"+_b09.baseClass:"");_b03.add(_b09.domNode,cls);},addChild:function(_b0a,_b0b){this.inherited(arguments);if(this._started){this._setupChild(_b0a);}},removeChild:function(_b0c){var cls=this.baseClass+"-child"+(_b0c.baseClass?" "+this.baseClass+"-"+_b0c.baseClass:"");_b03.remove(_b0c.domNode,cls);this.inherited(arguments);}});});},"dijit/popup":function(){define("dijit/popup",["dojo/_base/array","dojo/aspect","dojo/_base/connect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/on","dojo/sniff","./place","./BackgroundIframe","./main"],function(_b0d,_b0e,_b0f,_b10,dom,_b11,_b12,_b13,_b14,_b15,keys,lang,on,has,_b16,_b17,_b18){function _b19(){if(this._popupWrapper){_b12.destroy(this._popupWrapper);delete this._popupWrapper;}};var _b1a=_b10(null,{_stack:[],_beginZIndex:1000,_idGen:1,_createWrapper:function(_b1b){var _b1c=_b1b._popupWrapper,node=_b1b.domNode;if(!_b1c){_b1c=_b12.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},_b1b.ownerDocumentBody);_b1c.appendChild(node);var s=node.style;s.display="";s.visibility="";s.position="";s.top="0px";_b1b._popupWrapper=_b1c;_b0e.after(_b1b,"destroy",_b19,true);}return _b1c;},moveOffScreen:function(_b1d){var _b1e=this._createWrapper(_b1d);_b14.set(_b1e,{visibility:"hidden",top:"-9999px",display:""});},hide:function(_b1f){var _b20=this._createWrapper(_b1f);_b14.set(_b20,"display","none");},getTopPopup:function(){var _b21=this._stack;for(var pi=_b21.length-1;pi>0&&_b21[pi].parent===_b21[pi-1].widget;pi--){}return _b21[pi];},open:function(args){var _b22=this._stack,_b23=args.popup,_b24=args.orient||["below","below-alt","above","above-alt"],ltr=args.parent?args.parent.isLeftToRight():_b13.isBodyLtr(_b23.ownerDocument),_b25=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+this._idGen++);while(_b22.length&&(!args.parent||!dom.isDescendant(args.parent.domNode,_b22[_b22.length-1].widget.domNode))){this.close(_b22[_b22.length-1].widget);}var _b26=this._createWrapper(_b23);_b11.set(_b26,{id:id,style:{zIndex:this._beginZIndex+_b22.length},"class":"dijitPopup "+(_b23.baseClass||_b23["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:args.parent?args.parent.id:""});if(has("ie")||has("mozilla")){if(!_b23.bgIframe){_b23.bgIframe=new _b17(_b26);}}var best=_b25?_b16.around(_b26,_b25,_b24,ltr,_b23.orient?lang.hitch(_b23,"orient"):null):_b16.at(_b26,args,_b24=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_b26.style.display="";_b26.style.visibility="visible";_b23.domNode.style.visibility="visible";var _b27=[];_b27.push(on(_b26,_b0f._keypress,lang.hitch(this,function(evt){if(evt.charOrCode==keys.ESCAPE&&args.onCancel){_b15.stop(evt);args.onCancel();}else{if(evt.charOrCode===keys.TAB){_b15.stop(evt);var _b28=this.getTopPopup();if(_b28&&_b28.onCancel){_b28.onCancel();}}}})));if(_b23.onCancel&&args.onCancel){_b27.push(_b23.on("cancel",args.onCancel));}_b27.push(_b23.on(_b23.onExecute?"execute":"change",lang.hitch(this,function(){var _b29=this.getTopPopup();if(_b29&&_b29.onExecute){_b29.onExecute();}})));_b22.push({widget:_b23,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_b27});if(_b23.onOpen){_b23.onOpen(best);}return best;},close:function(_b2a){var _b2b=this._stack;while((_b2a&&_b0d.some(_b2b,function(elem){return elem.widget==_b2a;}))||(!_b2a&&_b2b.length)){var top=_b2b.pop(),_b2c=top.widget,_b2d=top.onClose;if(_b2c.onClose){_b2c.onClose();}var h;while(h=top.handlers.pop()){h.remove();}if(_b2c&&_b2c.domNode){this.hide(_b2c);}if(_b2d){_b2d();}}}});return (_b18.popup=new _b1a());});},"dojox/grid/_RowManager":function(){define("dojox/grid/_RowManager",["dojo/_base/declare","dojo/_base/lang","dojo/dom-class"],function(_b2e,lang,_b2f){var _b30=function(_b31,_b32){if(_b31.style.cssText==undefined){_b31.setAttribute("style",_b32);}else{_b31.style.cssText=_b32;}};return _b2e("dojox.grid._RowManager",null,{constructor:function(_b33){this.grid=_b33;},linesToEms:2,overRow:-2,prepareStylingRow:function(_b34,_b35){return {index:_b34,node:_b35,odd:Boolean(_b34&1),selected:!!this.grid.selection.isSelected(_b34),over:this.isOver(_b34),customStyles:"",customClasses:"dojoxGridRow"};},styleRowNode:function(_b36,_b37){var row=this.prepareStylingRow(_b36,_b37);this.grid.onStyleRow(row);this.applyStyles(row);},applyStyles:function(_b38){var i=_b38;i.node.className=i.customClasses;var h=i.node.style.height;_b30(i.node,i.customStyles+";"+(i.node._style||""));i.node.style.height=h;},updateStyles:function(_b39){this.grid.updateRowStyles(_b39);},setOverRow:function(_b3a){var last=this.overRow;this.overRow=_b3a;if((last!=this.overRow)&&(lang.isString(last)||last>=0)){this.updateStyles(last);}this.updateStyles(this.overRow);},isOver:function(_b3b){return (this.overRow==_b3b&&!_b2f.contains(this.grid.domNode,"dojoxGridColumnResizing"));}});});},"dojo/dnd/Mover":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/lang","../sniff","../_base/window","../dom","../dom-geometry","../dom-style","../Evented","../on","../touch","./common","./autoscroll"],function(_b3c,_b3d,_b3e,lang,has,win,dom,_b3f,_b40,_b41,on,_b42,dnd,_b43){return _b3d("dojo.dnd.Mover",[_b41],{constructor:function(node,e,host){this.node=dom.byId(node);this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=e.button;var h=(this.host=host),d=node.ownerDocument;this.events=[on(d,_b42.move,lang.hitch(this,"onFirstMove")),on(d,_b42.move,lang.hitch(this,"onMouseMove")),on(d,_b42.release,lang.hitch(this,"onMouseUp")),on(d,"dragstart",_b3e.stop),on(d.body,"selectstart",_b3e.stop)];_b43.autoScrollStart(d);if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){_b43.autoScroll(e);var m=this.marginBox;this.host.onMove(this,{l:m.l+e.pageX,t:m.t+e.pageY},e);_b3e.stop(e);},onMouseUp:function(e){if(has("webkit")&&has("mac")&&this.mouseButton==2?e.button==0:this.mouseButton==e.button){this.destroy();}_b3e.stop(e);},onFirstMove:function(e){var s=this.node.style,l,t,h=this.host;switch(s.position){case "relative":case "absolute":l=Math.round(parseFloat(s.left))||0;t=Math.round(parseFloat(s.top))||0;break;default:s.position="absolute";var m=_b3f.getMarginBox(this.node);var b=win.doc.body;var bs=_b40.getComputedStyle(b);var bm=_b3f.getMarginBox(b,bs);var bc=_b3f.getContentBox(b,bs);l=m.l-(bc.l-bm.l);t=m.t-(bc.t-bm.t);break;}this.marginBox.l=l-this.marginBox.l;this.marginBox.t=t-this.marginBox.t;if(h&&h.onFirstMove){h.onFirstMove(this,e);}this.events.shift().remove();},destroy:function(){_b3c.forEach(this.events,function(_b44){_b44.remove();});var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.node=this.host=null;}});});},"dijit/BackgroundIframe":function(){define("dijit/BackgroundIframe",["require","./main","dojo/_base/config","dojo/dom-construct","dojo/dom-style","dojo/_base/lang","dojo/on","dojo/sniff","dojo/_base/window"],function(_b45,_b46,_b47,_b48,_b49,lang,on,has,win){var _b4a=new function(){var _b4b=[];this.pop=function(){var _b4c;if(_b4b.length){_b4c=_b4b.pop();_b4c.style.display="";}else{if(has("ie")<9){var burl=_b47["dojoBlankHtmlUrl"]||_b45.toUrl("dojo/resources/blank.html")||"javascript:\"\"";var html="<iframe src='"+burl+"' role='presentation'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_b4c=win.doc.createElement(html);}else{_b4c=_b48.create("iframe");_b4c.src="javascript:\"\"";_b4c.className="dijitBackgroundIframe";_b4c.setAttribute("role","presentation");_b49.set(_b4c,"opacity",0.1);}_b4c.tabIndex=-1;}return _b4c;};this.push=function(_b4d){_b4d.style.display="none";_b4b.push(_b4d);};}();_b46.BackgroundIframe=function(node){if(!node.id){throw new Error("no id");}if(has("ie")||has("mozilla")){var _b4e=(this.iframe=_b4a.pop());node.appendChild(_b4e);if(has("ie")<7||has("quirks")){this.resize(node);this._conn=on(node,"resize",lang.hitch(this,function(){this.resize(node);}));}else{_b49.set(_b4e,{width:"100%",height:"100%"});}}};lang.extend(_b46.BackgroundIframe,{resize:function(node){if(this.iframe){_b49.set(this.iframe,{width:node.offsetWidth+"px",height:node.offsetHeight+"px"});}},destroy:function(){if(this._conn){this._conn.remove();this._conn=null;}if(this.iframe){_b4a.push(this.iframe);delete this.iframe;}}});return _b46.BackgroundIframe;});},"url:dijit/templates/Menu.html":"<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" role=\"menu\" tabIndex=\"${tabIndex}\"\n\t   data-dojo-attach-event=\"onkeypress:_onKeyPress\" cellspacing=\"0\">\n\t<tbody class=\"dijitReset\" data-dojo-attach-point=\"containerNode\"></tbody>\n</table>\n","dojo/dnd/Avatar":function(){define(["../_base/declare","../_base/window","../dom","../dom-attr","../dom-class","../dom-construct","../hccss","../query"],function(_b4f,win,dom,_b50,_b51,_b52,has,_b53){return _b4f("dojo.dnd.Avatar",null,{constructor:function(_b54){this.manager=_b54;this.construct();},construct:function(){var a=_b52.create("table",{"class":"dojoDndAvatar",style:{position:"absolute",zIndex:"1999",margin:"0px"}}),_b55=this.manager.source,node,b=_b52.create("tbody",null,a),tr=_b52.create("tr",null,b),td=_b52.create("td",null,tr),k=Math.min(5,this.manager.nodes.length),i=0;if(has("highcontrast")){_b52.create("span",{id:"a11yIcon",innerHTML:this.manager.copy?"+":"<"},td);}_b52.create("span",{innerHTML:_b55.generateText?this._generateText():""},td);_b50.set(tr,{"class":"dojoDndAvatarHeader",style:{opacity:0.9}});for(;i<k;++i){if(_b55.creator){node=_b55._normalizedCreator(_b55.getItem(this.manager.nodes[i].id).data,"avatar").node;}else{node=this.manager.nodes[i].cloneNode(true);if(node.tagName.toLowerCase()=="tr"){var _b56=_b52.create("table"),_b57=_b52.create("tbody",null,_b56);_b57.appendChild(node);node=_b56;}}node.id="";tr=_b52.create("tr",null,b);td=_b52.create("td",null,tr);td.appendChild(node);_b50.set(tr,{"class":"dojoDndAvatarItem",style:{opacity:(9-i)/10}});}this.node=a;},destroy:function(){_b52.destroy(this.node);this.node=false;},update:function(){_b51.toggle(this.node,"dojoDndAvatarCanDrop",this.manager.canDropFlag);if(has("highcontrast")){var icon=dom.byId("a11yIcon");var text="+";if(this.manager.canDropFlag&&!this.manager.copy){text="< ";}else{if(!this.manager.canDropFlag&&!this.manager.copy){text="o";}else{if(!this.manager.canDropFlag){text="x";}}}icon.innerHTML=text;}_b53(("tr.dojoDndAvatarHeader td span"+(has("highcontrast")?" span":"")),this.node).forEach(function(node){node.innerHTML=this.manager.source.generateText?this._generateText():"";},this);},_generateText:function(){return this.manager.nodes.length.toString();}});});},"dijit/form/_Spinner":function(){require({cache:{"url:dijit/form/templates/Spinner.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\" role=\"presentation\"\n\t><div class=\"dijitReset dijitButtonNode dijitSpinnerButtonContainer\"\n\t\t><input class=\"dijitReset dijitInputField dijitSpinnerButtonInner\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t/><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\tdata-dojo-attach-point=\"upArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9650; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\tdata-dojo-attach-point=\"downArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' data-dojo-attach-point=\"textbox,focusNode\" type=\"${type}\" data-dojo-attach-event=\"onkeypress:_onKeyPress\"\n\t\t\trole=\"spinbutton\" autocomplete=\"off\" ${!nameAttrSetting}\n\t/></div\n></div>\n"}});define("dijit/form/_Spinner",["dojo/_base/declare","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/mouse","../typematic","./RangeBoundTextBox","dojo/text!./templates/Spinner.html","./_TextBoxMixin"],function(_b58,_b59,keys,lang,has,_b5a,_b5b,_b5c,_b5d,_b5e){return _b58("dijit.form._Spinner",_b5c,{defaultTimeout:500,minimumTimeout:10,timeoutChangeRate:0.9,smallDelta:1,largeDelta:10,templateString:_b5d,baseClass:"dijitTextBox dijitSpinner",cssStateNodes:{"upArrowNode":"dijitUpArrowButton","downArrowNode":"dijitDownArrowButton"},adjust:function(val){return val;},_arrowPressed:function(_b5f,_b60,_b61){if(this.disabled||this.readOnly){return;}this._setValueAttr(this.adjust(this.get("value"),_b60*_b61),false);_b5e.selectInputText(this.textbox,this.textbox.value.length);},_arrowReleased:function(){this._wheelTimer=null;},_typematicCallback:function(_b62,node,evt){var inc=this.smallDelta;if(node==this.textbox){var key=evt.charOrCode;inc=(key==keys.PAGE_UP||key==keys.PAGE_DOWN)?this.largeDelta:this.smallDelta;node=(key==keys.UP_ARROW||key==keys.PAGE_UP)?this.upArrowNode:this.downArrowNode;}if(_b62==-1){this._arrowReleased(node);}else{this._arrowPressed(node,(node==this.upArrowNode)?1:-1,inc);}},_wheelTimer:null,_mouseWheeled:function(evt){_b59.stop(evt);var _b63=evt.wheelDelta/120;if(Math.floor(_b63)!=_b63){_b63=evt.wheelDelta>0?1:-1;}var _b64=evt.detail?(evt.detail*-1):_b63;if(_b64!==0){var node=this[(_b64>0?"upArrowNode":"downArrowNode")];this._arrowPressed(node,_b64,this.smallDelta);if(this._wheelTimer){this._wheelTimer.remove();}this._wheelTimer=this.defer(function(){this._arrowReleased(node);},50);}},_setConstraintsAttr:function(_b65){this.inherited(arguments);if(this.focusNode){if(this.constraints.min!==undefined){this.focusNode.setAttribute("aria-valuemin",this.constraints.min);}else{this.focusNode.removeAttribute("aria-valuemin");}if(this.constraints.max!==undefined){this.focusNode.setAttribute("aria-valuemax",this.constraints.max);}else{this.focusNode.removeAttribute("aria-valuemax");}}},_setValueAttr:function(_b66,_b67){this.focusNode.setAttribute("aria-valuenow",_b66);this.inherited(arguments);},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,_b5a.wheel,"_mouseWheeled");this.own(_b5b.addListener(this.upArrowNode,this.textbox,{charOrCode:keys.UP_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),_b5b.addListener(this.downArrowNode,this.textbox,{charOrCode:keys.DOWN_ARROW,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),_b5b.addListener(this.upArrowNode,this.textbox,{charOrCode:keys.PAGE_UP,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),_b5b.addListener(this.downArrowNode,this.textbox,{charOrCode:keys.PAGE_DOWN,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout));}});});},"dijit/form/Button":function(){require({cache:{"url:dijit/form/templates/Button.html":"<span class=\"dijit dijitReset dijitInline\" role=\"presentation\"\n\t><span class=\"dijitReset dijitInline dijitButtonNode\"\n\t\tdata-dojo-attach-event=\"ondijitclick:_onClick\" role=\"presentation\"\n\t\t><span class=\"dijitReset dijitStretch dijitButtonContents\"\n\t\t\tdata-dojo-attach-point=\"titleNode,focusNode\"\n\t\t\trole=\"button\" aria-labelledby=\"${id}_label\"\n\t\t\t><span class=\"dijitReset dijitInline dijitIcon\" data-dojo-attach-point=\"iconNode\"></span\n\t\t\t><span class=\"dijitReset dijitToggleButtonIconChar\">&#x25CF;</span\n\t\t\t><span class=\"dijitReset dijitInline dijitButtonText\"\n\t\t\t\tid=\"${id}_label\"\n\t\t\t\tdata-dojo-attach-point=\"containerNode\"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type=\"${type}\" value=\"${value}\" class=\"dijitOffScreen\"\n\t\ttabIndex=\"-1\" role=\"presentation\" data-dojo-attach-point=\"valueNode\"\n/></span>\n"}});define("dijit/form/Button",["require","dojo/_base/declare","dojo/dom-class","dojo/has","dojo/_base/kernel","dojo/_base/lang","dojo/ready","./_FormWidget","./_ButtonMixin","dojo/text!./templates/Button.html"],function(_b68,_b69,_b6a,has,_b6b,lang,_b6c,_b6d,_b6e,_b6f){if(has("dijit-legacy-requires")){_b6c(0,function(){var _b70=["dijit/form/DropDownButton","dijit/form/ComboButton","dijit/form/ToggleButton"];_b68(_b70);});}return _b69("dijit.form.Button",[_b6d,_b6e],{showLabel:true,iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},baseClass:"dijitButton",templateString:_b6f,_setValueAttr:"valueNode",_onClick:function(e){var ok=this.inherited(arguments);if(ok){if(this.valueNode){this.valueNode.click();e.preventDefault();e.stopPropagation();}}return ok;},_fillContent:function(_b71){if(_b71&&(!this.params||!("label" in this.params))){var _b72=lang.trim(_b71.innerHTML);if(_b72){this.label=_b72;}}},_setShowLabelAttr:function(val){if(this.containerNode){_b6a.toggle(this.containerNode,"dijitDisplayNone",!val);}this._set("showLabel",val);},setLabel:function(_b73){_b6b.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",_b73);},_setLabelAttr:function(_b74){this.inherited(arguments);if(!this.showLabel&&!("title" in this.params)){this.titleNode.title=lang.trim(this.containerNode.innerText||this.containerNode.textContent||"");}}});});},"dojox/gfx/Moveable":function(){define("dojox/gfx/Moveable",["dojo/_base/lang","dojo/_base/declare","dojo/_base/array","dojo/_base/event","dojo/topic","dojo/touch","dojo/dom-class","dojo/_base/window","./Mover","dojo/mouse"],function(lang,_b75,arr,_b76,_b77,_b78,_b79,win,_b7a,_b7b){return _b75("dojox.gfx.Moveable",null,{constructor:function(_b7c,_b7d){this.shape=_b7c;this.delay=(_b7d&&_b7d.delay>0)?_b7d.delay:0;this.mover=(_b7d&&_b7d.mover)?_b7d.mover:_b7a;this.leftButtonOnly=_b7d&&_b7d.leftButtonOnly;this.events=[this.shape.connect(_b78.press,lang.hitch(this,"onMouseDown"))];},destroy:function(){arr.forEach(this.events,function(_b7e){_b7e.remove();});this.events=this.shape=null;},onMouseDown:function(e){if(this.delay){this.events.push(this.shape.connect(_b78.move,lang.hitch(this,"onMouseMove")),this.shape.connect(_b78.release,lang.hitch(this,"onMouseUp")));this._lastX=e.clientX;this._lastY=e.clientY;}else{if(!this.leftButtonOnly||_b7b.isLeft(e)){new this.mover(this.shape,e,this);}}_b76.stop(e);},onMouseMove:function(e){var _b7f=e.clientX,_b80=e.clientY;if(Math.abs(_b7f-this._lastX)>this.delay||Math.abs(_b80-this._lastY)>this.delay){this.onMouseUp(e);new this.mover(this.shape,e,this);}_b76.stop(e);},onMouseUp:function(e){this.events.pop().remove();},onMoveStart:function(_b81){_b77.publish("/gfx/move/start",_b81);_b79.add(win.body(),"dojoMove");},onMoveStop:function(_b82){_b77.publish("/gfx/move/stop",_b82);_b79.remove(win.body(),"dojoMove");},onFirstMove:function(_b83){},onMove:function(_b84,_b85){this.onMoving(_b84,_b85);this.shape.applyLeftTransform(_b85);this.onMoved(_b84,_b85);},onMoving:function(_b86,_b87){},onMoved:function(_b88,_b89){}});});},"dijit/_WidgetBase":function(){define("dijit/_WidgetBase",["require","dojo/_base/array","dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/has","dojo/_base/kernel","dojo/_base/lang","dojo/on","dojo/ready","dojo/Stateful","dojo/topic","dojo/_base/window","./Destroyable","./registry"],function(_b8a,_b8b,_b8c,_b8d,_b8e,_b8f,dom,_b90,_b91,_b92,_b93,_b94,has,_b95,lang,on,_b96,_b97,_b98,win,_b99,_b9a){has.add("dijit-legacy-requires",!_b95.isAsync);if(has("dijit-legacy-requires")){_b96(0,function(){var _b9b=["dijit/_base/manager"];_b8a(_b9b);});}var _b9c={};function _b9d(obj){var ret={};for(var attr in obj){ret[attr.toLowerCase()]=true;}return ret;};function _b9e(attr){return function(val){_b90[val?"set":"remove"](this.domNode,attr,val);this._set(attr,val);};};return _b8f("dijit._WidgetBase",[_b97,_b99],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:_b9e("lang"),dir:"",_setDirAttr:_b9e("dir"),textDir:"","class":"",_setClassAttr:{node:"domNode",type:"class"},style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(val){this._set("ownerDocument",val);},attributeMap:{},_blankGif:_b8d.blankGif||_b8a.toUrl("dojo/resources/blank.gif"),postscript:function(_b9f,_ba0){this.create(_b9f,_ba0);},create:function(_ba1,_ba2){this.srcNodeRef=dom.byId(_ba2);this._connects=[];this._supportingWidgets=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_ba1){this.params=_ba1;lang.mixin(this,_ba1);}this.postMixInProperties();if(!this.id){this.id=_b9a.getUniqueId(this.declaredClass.replace(/\./g,"_"));if(this.params){delete this.params.id;}}this.ownerDocument=this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:win.doc);this.ownerDocumentBody=win.body(this.ownerDocument);_b9a.add(this);this.buildRendering();var _ba3;if(this.domNode){this._applyAttributes();var _ba4=this.srcNodeRef;if(_ba4&&_ba4.parentNode&&this.domNode!==_ba4){_ba4.parentNode.replaceChild(this.domNode,_ba4);_ba3=true;}this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(_ba3){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var ctor=this.constructor,list=ctor._setterAttrs;if(!list){list=(ctor._setterAttrs=[]);for(var attr in this.attributeMap){list.push(attr);}var _ba5=ctor.prototype;for(var _ba6 in _ba5){if(_ba6 in this.attributeMap){continue;}var _ba7="_set"+_ba6.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();})+"Attr";if(_ba7 in _ba5){list.push(_ba6);}}}var _ba8={};for(var key in this.params||{}){_ba8[key]=this[key];}_b8b.forEach(list,function(attr){if(attr in _ba8){}else{if(this[attr]){this.set(attr,this[attr]);}}},this);for(key in _ba8){this.set(key,_ba8[key]);}},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div");}if(this.baseClass){var _ba9=this.baseClass.split(" ");if(!this.isLeftToRight()){_ba9=_ba9.concat(_b8b.map(_ba9,function(name){return name+"Rtl";}));}_b91.add(this.domNode,_ba9);}},postCreate:function(){},startup:function(){if(this._started){return;}this._started=true;_b8b.forEach(this.getChildren(),function(obj){if(!obj._started&&!obj._destroyed&&lang.isFunction(obj.startup)){obj.startup();obj._started=true;}});},destroyRecursive:function(_baa){this._beingDestroyed=true;this.destroyDescendants(_baa);this.destroy(_baa);},destroy:function(_bab){this._beingDestroyed=true;this.uninitialize();function _bac(w){if(w.destroyRecursive){w.destroyRecursive(_bab);}else{if(w.destroy){w.destroy(_bab);}}};_b8b.forEach(this._connects,lang.hitch(this,"disconnect"));_b8b.forEach(this._supportingWidgets,_bac);if(this.domNode){_b8b.forEach(_b9a.findWidgets(this.domNode,this.containerNode),_bac);}this.destroyRendering(_bab);_b9a.remove(this.id);this._destroyed=true;},destroyRendering:function(_bad){if(this.bgIframe){this.bgIframe.destroy(_bad);delete this.bgIframe;}if(this.domNode){if(_bad){_b90.remove(this.domNode,"widgetId");}else{_b92.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_bad){_b92.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_bae){_b8b.forEach(this.getChildren(),function(_baf){if(_baf.destroyRecursive){_baf.destroyRecursive(_bae);}});},uninitialize:function(){return false;},_setStyleAttr:function(_bb0){var _bb1=this.domNode;if(lang.isObject(_bb0)){_b94.set(_bb1,_bb0);}else{if(_bb1.style.cssText){_bb1.style.cssText+="; "+_bb0;}else{_bb1.style.cssText=_bb0;}}this._set("style",_bb0);},_attrToDom:function(attr,_bb2,_bb3){_bb3=arguments.length>=3?_bb3:this.attributeMap[attr];_b8b.forEach(lang.isArray(_bb3)?_bb3:[_bb3],function(_bb4){var _bb5=this[_bb4.node||_bb4||"domNode"];var type=_bb4.type||"attribute";switch(type){case "attribute":if(lang.isFunction(_bb2)){_bb2=lang.hitch(this,_bb2);}var _bb6=_bb4.attribute?_bb4.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);if(_bb5.tagName){_b90.set(_bb5,_bb6,_bb2);}else{_bb5.set(_bb6,_bb2);}break;case "innerText":_bb5.innerHTML="";_bb5.appendChild(this.ownerDocument.createTextNode(_bb2));break;case "innerHTML":_bb5.innerHTML=_bb2;break;case "class":_b91.replace(_bb5,_bb2,this[attr]);break;}},this);},get:function(name){var _bb7=this._getAttrNames(name);return this[_bb7.g]?this[_bb7.g]():this[name];},set:function(name,_bb8){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _bb9=this._getAttrNames(name),_bba=this[_bb9.s];if(lang.isFunction(_bba)){var _bbb=_bba.apply(this,Array.prototype.slice.call(arguments,1));}else{var _bbc=this.focusNode&&!lang.isFunction(this.focusNode)?"focusNode":"domNode",_bbd,map,tag;tag=this[_bbc]&&this[_bbc].tagName;if(tag){_bbd=_b9c[tag]||(_b9c[tag]=_b9d(this[_bbc]));}map=name in this.attributeMap?this.attributeMap[name]:_bb9.s in this?this[_bb9.s]:((_bbd&&_bb9.l in _bbd&&typeof _bb8!="function")||/^aria-|^data-|^role$/.test(name))?_bbc:null;if(map!=null){this._attrToDom(name,_bb8,map);}this._set(name,_bb8);}return _bbb||this;},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.replace(/^[a-z]|-[a-zA-Z]/g,function(c){return c.charAt(c.length-1).toUpperCase();});return (apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr",l:uc.toLowerCase()});},_set:function(name,_bbe){var _bbf=this[name];this[name]=_bbe;if(this._created&&_bbe!==_bbf){if(this._watchCallbacks){this._watchCallbacks(name,_bbf,_bbe);}this.emit("attrmodified-"+name,{detail:{prevValue:_bbf,newValue:_bbe}});}},emit:function(type,_bc0,_bc1){_bc0=_bc0||{};if(_bc0.bubbles===undefined){_bc0.bubbles=true;}if(_bc0.cancelable===undefined){_bc0.cancelable=true;}if(!_bc0.detail){_bc0.detail={};}_bc0.detail.widget=this;var ret,_bc2=this["on"+type];if(_bc2){ret=_bc2.apply(this,_bc1?_bc1:[_bc0]);}if(this._started&&!this._beingDestroyed){on.emit(this.domNode,type.toLowerCase(),_bc0);}return ret;},on:function(type,func){var _bc3=this._onMap(type);if(_bc3){return _b8c.after(this,_bc3,func,true);}return this.own(on(this.domNode,type,func))[0];},_onMap:function(type){var ctor=this.constructor,map=ctor._onMap;if(!map){map=(ctor._onMap={});for(var attr in ctor.prototype){if(/^on/.test(attr)){map[attr.replace(/^on/,"").toLowerCase()]=attr;}}}return map[typeof type=="string"&&type.toLowerCase()];},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getChildren:function(){return this.containerNode?_b9a.findWidgets(this.containerNode):[];},getParent:function(){return _b9a.getEnclosingWidget(this.domNode.parentNode);},connect:function(obj,_bc4,_bc5){return this.own(_b8e.connect(obj,_bc4,this,_bc5))[0];},disconnect:function(_bc6){_bc6.remove();},subscribe:function(t,_bc7){return this.own(_b98.subscribe(t,lang.hitch(this,_bc7)))[0];},unsubscribe:function(_bc8){_bc8.remove();},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):_b93.isBodyLtr(this.ownerDocument);},isFocusable:function(){return this.focus&&(_b94.get(this.domNode,"display")!="none");},placeAt:function(_bc9,_bca){var _bcb=!_bc9.tagName&&_b9a.byId(_bc9);if(_bcb&&_bcb.addChild&&(!_bca||typeof _bca==="number")){_bcb.addChild(this,_bca);}else{var ref=_bcb?(_bcb.containerNode&&!/after|before|replace/.test(_bca||"")?_bcb.containerNode:_bcb.domNode):dom.byId(_bc9,this.ownerDocument);_b92.place(this.domNode,ref,_bca);if(!this._started&&(this.getParent()||{})._started){this.startup();}}return this;},getTextDir:function(text,_bcc){return _bcc;},applyTextDir:function(){},defer:function(fcn,_bcd){var _bce=setTimeout(lang.hitch(this,function(){_bce=null;if(!this._destroyed){lang.hitch(this,fcn)();}}),_bcd||0);return {remove:function(){if(_bce){clearTimeout(_bce);_bce=null;}return null;}};}});});},"esri/tasks/RelationParameters":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel","esri/geometry/jsonUtils"],function(_bcf,lang,_bd0,_bd1,has,_bd2,_bd3){var _bd4=_bcf(null,{declaredClass:"esri.tasks.RelationParameters",geometries1:null,geometries2:null,relation:null,relationParam:null,toJson:function(){var _bd5=_bd0.map(this.geometries1,function(geom){return geom.toJson();});var _bd6=_bd0.map(this.geometries2,function(geom){return geom.toJson();});var json={};var _bd7=this.geometries1;if(_bd7&&_bd7.length>0){json.geometries1=_bd1.toJson({geometryType:_bd3.getJsonType(_bd7[0]),geometries:_bd5});var _bd8=this.geometries1[0].spatialReference;json.sr=_bd8.wkid?_bd8.wkid:_bd1.toJson(_bd8.toJson());}var _bd9=this.geometries2;if(_bd9&&_bd9.length>0){json.geometries2=_bd1.toJson({geometryType:_bd3.getJsonType(_bd9[0]),geometries:_bd6});}if(this.relation){json.relation=this.relation;}if(this.relationParam){json.relationParam=_bd1.toJson(this.relationParam);}return json;}});lang.mixin(_bd4,{SPATIAL_REL_CROSS:"esriGeometryRelationCross",SPATIAL_REL_DISJOINT:"esriGeometryRelationDisjoint",SPATIAL_REL_IN:"esriGeometryRelationIn",SPATIAL_REL_INTERIORINTERSECTION:"esriGeometryRelationInteriorIntersection",SPATIAL_REL_INTERSECTION:"esriGeometryRelationIntersection",SPATIAL_REL_COINCIDENCE:"esriGeometryRelationLineCoincidence",SPATIAL_REL_LINETOUCH:"esriGeometryRelationLineTouch",SPATIAL_REL_OVERLAP:"esriGeometryRelationOverlap",SPATIAL_REL_POINTTOUCH:"esriGeometryRelationPointTouch",SPATIAL_REL_TOUCH:"esriGeometryRelationTouch",SPATIAL_REL_WITHIN:"esriGeometryRelationWithin",SPATIAL_REL_RELATION:"esriGeometryRelationRelation"});if(has("extend-esri")){lang.setObject("tasks.RelationParameters",_bd4,_bd2);}return _bd4;});},"esri/layers/TrackManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/graphic","esri/geometry/Polyline","esri/layers/GraphicsLayer"],function(_bda,lang,_bdb,has,_bdc,_bdd,_bde,_bdf){var _be0=_bda(null,{declaredClass:"esri.layers._TrackManager",constructor:function(_be1){this.layer=_be1;this.trackMap={};},initialize:function(map){this.map=map;var _be2=this.layer,_be3=_be2.renderer.trackRenderer;if(_be3&&(_be2.geometryType==="esriGeometryPoint")){var _be4=(this.container=new _bdf._GraphicsLayer({id:_be2.id+"_tracks",_child:true}));_be4.loaded=true;_be4.onLoad(_be4);_be4._setMap(map,_be2._div);_be4.setRenderer(_be3);}},addFeatures:function(_be5){var tkid,_be6=this.trackMap,_be7=this.layer,_be8=_be7._trackIdField;_bdb.forEach(_be5,function(_be9){var _bea=_be9.attributes;tkid=_bea[_be8];var ary=(_be6[tkid]=(_be6[tkid]||[]));ary.push(_be9);});var _beb=_be7._startTimeField,_bec=_be7.objectIdField;var _bed=function(a,b){var _bee=a.attributes[_beb],_bef=b.attributes[_beb];if(_bee===_bef){return (a.attributes[_bec]<b.attributes[_bec])?-1:1;}else{return (_bee<_bef)?-1:1;}};for(tkid in _be6){_be6[tkid].sort(_bed);}},drawTracks:function(){var _bf0=this.container;if(!_bf0){return;}var _bf1=this.trackMap,sr=this.map.spatialReference,tkid,ary,path,i,_bf2,_bf3=this.layer._trackIdField,_bf4;for(tkid in _bf1){ary=_bf1[tkid];path=[];for(i=ary.length-1;i>=0;i--){_bf2=ary[i].geometry;if(_bf2){path.push([_bf2.x,_bf2.y]);}}_bf4={};_bf4[_bf3]=tkid;if(path.length>0){_bf0.add(new _bdd(new _bde({paths:[path],spatialReference:sr}),null,_bf4));}}},moveLatestToFront:function(){_bdb.forEach(this.getLatestObservations(),function(_bf5){var _bf6=_bf5._shape;_bf6&&_bf6._moveToFront();this._repaint(_bf5,null,true);},this.layer);},getLatestObservations:function(){var _bf7=[];if(!this.layer.renderer.latestObservationRenderer){return _bf7;}var _bf8=this.trackMap,tkid;for(tkid in _bf8){var ary=_bf8[tkid];_bf7.push(ary[ary.length-1]);}return _bf7;},clearTracks:function(){var _bf9=this.getLatestObservations();this.trackMap={};var _bfa=this.container;if(_bfa){_bfa.clear();}_bdb.forEach(_bf9,function(_bfb){this._repaint(_bfb,null,true);},this.layer);},isLatestObservation:function(_bfc){var _bfd=this.layer._trackIdField;var _bfe=this.trackMap[_bfc.attributes[_bfd]];if(_bfe){return (_bfe[_bfe.length-1]===_bfc);}return false;},destroy:function(){var _bff=this.container;if(_bff){_bff.clear();_bff._unsetMap(this.map,this.layer._div);this.container=null;}this.map=null;this.layer=null;this.trackMap=null;}});if(has("extend-esri")){lang.setObject("layers._TrackManager",_be0,_bdc);}return _be0;});},"dojo/store/Memory":function(){define(["../_base/declare","./util/QueryResults","./util/SimpleQueryEngine"],function(_c00,_c01,_c02){var base=null;return _c00("dojo.store.Memory",base,{constructor:function(_c03){for(var i in _c03){this[i]=_c03[i];}this.setData(this.data||[]);},data:null,idProperty:"id",index:null,queryEngine:_c02,get:function(id){return this.data[this.index[id]];},getIdentity:function(_c04){return _c04[this.idProperty];},put:function(_c05,_c06){var data=this.data,_c07=this.index,_c08=this.idProperty;var id=_c05[_c08]=(_c06&&"id" in _c06)?_c06.id:_c08 in _c05?_c05[_c08]:Math.random();if(id in _c07){if(_c06&&_c06.overwrite===false){throw new Error("Object already exists");}data[_c07[id]]=_c05;}else{_c07[id]=data.push(_c05)-1;}return id;},add:function(_c09,_c0a){(_c0a=_c0a||{}).overwrite=false;return this.put(_c09,_c0a);},remove:function(id){var _c0b=this.index;var data=this.data;if(id in _c0b){data.splice(_c0b[id],1);this.setData(data);return true;}},query:function(_c0c,_c0d){return _c01(this.queryEngine(_c0c,_c0d)(this.data));},setData:function(data){if(data.items){this.idProperty=data.identifier;data=this.data=data.items;}else{this.data=data;}this.index={};for(var i=0,l=data.length;i<l;i++){this.index[data[i][this.idProperty]]=i;}}});});},"url:dijit/templates/Tooltip.html":"<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\"\n\t><div class=\"dijitTooltipContainer dijitTooltipContents\" data-dojo-attach-point=\"containerNode\" role='alert'></div\n\t><div class=\"dijitTooltipConnector\" data-dojo-attach-point=\"connectorNode\"></div\n></div>\n","dojox/grid/_Grid":function(){require({cache:{"url:dojox/grid/resources/_Grid.html":"<div hidefocus=\"hidefocus\" role=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterMessages\" style=\"display: none;\" dojoAttachPoint=\"messagesNode\"></div>\n\t<span dojoAttachPoint=\"lastFocusNode\" tabindex=\"0\"></span>\n</div>\n"}});define("dojox/grid/_Grid",["dojo/_base/kernel","../main","dojo/_base/declare","./_Events","./_Scroller","./_Layout","./_View","./_ViewManager","./_RowManager","./_FocusManager","./_EditManager","./Selection","./_RowSelector","./util","dijit/_Widget","dijit/_TemplatedMixin","dijit/CheckedMenuItem","dojo/text!./resources/_Grid.html","dojo/string","dojo/_base/array","dojo/_base/lang","dojo/_base/sniff","dojox/html/metrics","dojo/_base/html","dojo/query","dojo/dnd/common","dojo/i18n!dijit/nls/loading"],function(dojo,_c0e,_c0f,_c10,_c11,_c12,_c13,_c14,_c15,_c16,_c17,_c18,_c19,util,_c1a,_c1b,_c1c,_c1d,_c1e,_c1f,lang,has,_c20,html,_c21){if(!dojo.isCopyKey){dojo.isCopyKey=dojo.dnd.getCopyKeyState;}var _c22=_c0f("dojox.grid._Grid",[_c1a,_c1b,_c10],{templateString:_c1d,classTag:"dojoxGrid",rowCount:5,keepRows:75,rowsPerPage:25,autoWidth:false,initialWidth:"",autoHeight:"",rowHeight:0,autoRender:true,defaultHeight:"15em",height:"",structure:null,elasticView:-1,singleClickEdit:false,selectionMode:"extended",rowSelector:"",columnReordering:false,headerMenu:null,placeholderLabel:"GridColumns",selectable:false,_click:null,loadingMessage:"<span class='dojoxGridLoading'>${loadingState}</span>",errorMessage:"<span class='dojoxGridError'>${errorState}</span>",noDataMessage:"",escapeHTMLInData:true,formatterScope:null,editable:false,summary:"",_setSummaryAttr:"domNode",sortInfo:0,_placeholders:null,_layoutClass:_c12,buildRendering:function(){this.inherited(arguments);if(!this.domNode.getAttribute("tabIndex")){this.domNode.tabIndex="0";}this.createScroller();this.createLayout();this.createViews();this.createManagers();this.createSelection();this.connect(this.selection,"onSelected","onSelected");this.connect(this.selection,"onDeselected","onDeselected");this.connect(this.selection,"onChanged","onSelectionChanged");_c20.initOnFontResize();this.connect(_c20,"onFontResize","textSizeChanged");util.funnelEvents(this.domNode,this,"doKeyEvent",util.keyEvents);if(this.selectionMode!="none"){this.domNode.setAttribute("aria-multiselectable",this.selectionMode=="single"?"false":"true");}html.addClass(this.domNode,this.classTag);if(!this.isLeftToRight()){html.addClass(this.domNode,this.classTag+"Rtl");}if(this.rowHeight>0){html.addClass(this.viewsNode,this.classTag+"FixedRowHeight");}},postMixInProperties:function(){this.inherited(arguments);var _c23=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=_c1e.substitute(this.loadingMessage,_c23);this.errorMessage=_c1e.substitute(this.errorMessage,_c23);if(this.srcNodeRef&&this.srcNodeRef.style.height){this.height=this.srcNodeRef.style.height;}this._setAutoHeightAttr(this.autoHeight,true);this.lastScrollTop=this.scrollTop=0;},postCreate:function(){this._placeholders=[];this._setHeaderMenuAttr(this.headerMenu);this._setStructureAttr(this.structure);this._click=[];this.inherited(arguments);if(this.domNode&&this.autoWidth&&this.initialWidth){this.domNode.style.width=this.initialWidth;}if(this.domNode&&!this.editable){html.attr(this.domNode,"aria-readonly","true");}},destroy:function(){this.domNode.onReveal=null;this.domNode.onSizeChange=null;delete this._click;if(this.scroller){this.scroller.destroy();delete this.scroller;}this.edit.destroy();delete this.edit;this.views.destroyViews();if(this.focus){this.focus.destroy();delete this.focus;}if(this.headerMenu&&this._placeholders.length){_c1f.forEach(this._placeholders,function(p){p.unReplace(true);});this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.inherited(arguments);},_setAutoHeightAttr:function(ah,_c24){if(typeof ah=="string"){if(!ah||ah=="false"){ah=false;}else{if(ah=="true"){ah=true;}else{ah=window.parseInt(ah,10);}}}if(typeof ah=="number"){if(isNaN(ah)){ah=false;}if(ah<0){ah=true;}else{if(ah===0){ah=false;}}}this.autoHeight=ah;if(typeof ah=="boolean"){this._autoHeight=ah;}else{if(typeof ah=="number"){this._autoHeight=(ah>=this.get("rowCount"));}else{this._autoHeight=false;}}if(this._started&&!_c24){this.render();}},_getRowCountAttr:function(){return this.updating&&this.invalidated&&this.invalidated.rowCount!=undefined?this.invalidated.rowCount:this.rowCount;},textSizeChanged:function(){this.render();},sizeChange:function(){this.update();},createManagers:function(){this.rows=new _c15(this);this.focus=new _c16(this);this.edit=new _c17(this);},createSelection:function(){this.selection=new _c18(this);},createScroller:function(){this.scroller=new _c11();this.scroller.grid=this;this.scroller.renderRow=lang.hitch(this,"renderRow");this.scroller.removeRow=lang.hitch(this,"rowRemoved");},createLayout:function(){this.layout=new this._layoutClass(this);this.connect(this.layout,"moveColumn","onMoveColumn");},onMoveColumn:function(){this.update();},onResizeColumn:function(_c25){},createViews:function(){this.views=new _c14(this);this.views.createView=lang.hitch(this,"createView");},createView:function(_c26,idx){var c=lang.getObject(_c26);var view=new c({grid:this,index:idx});this.viewsNode.appendChild(view.domNode);this.viewsHeaderNode.appendChild(view.headerNode);this.views.addView(view);html.attr(this.domNode,"align",this.isLeftToRight()?"left":"right");return view;},buildViews:function(){for(var i=0,vs;(vs=this.layout.structure[i]);i++){this.createView(vs.type||_c0e._scopeName+".grid._View",i).setStructure(vs);}this.scroller.setContentNodes(this.views.getContentNodes());},_setStructureAttr:function(_c27){var s=_c27;if(s&&lang.isString(s)){dojo.deprecated("dojox.grid._Grid.set('structure', 'objVar')","use dojox.grid._Grid.set('structure', objVar) instead","2.0");s=lang.getObject(s);}this.structure=s;if(!s){if(this.layout.structure){s=this.layout.structure;}else{return;}}this.views.destroyViews();this.focus.focusView=null;if(s!==this.layout.structure){this.layout.setStructure(s);}this._structureChanged();},setStructure:function(_c28){dojo.deprecated("dojox.grid._Grid.setStructure(obj)","use dojox.grid._Grid.set('structure', obj) instead.","2.0");this._setStructureAttr(_c28);},getColumnTogglingItems:function(){var _c29,_c2a=[];_c29=_c1f.map(this.layout.cells,function(cell){if(!cell.menuItems){cell.menuItems=[];}var self=this;var item=new _c1c({label:cell.name,checked:!cell.hidden,_gridCell:cell,onChange:function(_c2b){if(self.layout.setColumnVisibility(this._gridCell.index,_c2b)){var _c2c=this._gridCell.menuItems;if(_c2c.length>1){_c1f.forEach(_c2c,function(item){if(item!==this){item.setAttribute("checked",_c2b);}},this);}_c2b=_c1f.filter(self.layout.cells,function(c){if(c.menuItems.length>1){_c1f.forEach(c.menuItems,"item.set('disabled', false);");}else{c.menuItems[0].set("disabled",false);}return !c.hidden;});if(_c2b.length==1){_c1f.forEach(_c2b[0].menuItems,"item.set('disabled', true);");}}},destroy:function(){var _c2d=_c1f.indexOf(this._gridCell.menuItems,this);this._gridCell.menuItems.splice(_c2d,1);delete this._gridCell;_c1c.prototype.destroy.apply(this,arguments);}});cell.menuItems.push(item);if(!cell.hidden){_c2a.push(item);}return item;},this);if(_c2a.length==1){_c2a[0].set("disabled",true);}return _c29;},_setHeaderMenuAttr:function(menu){if(this._placeholders&&this._placeholders.length){_c1f.forEach(this._placeholders,function(p){p.unReplace(true);});this._placeholders=[];}if(this.headerMenu){this.headerMenu.unBindDomNode(this.viewsHeaderNode);}this.headerMenu=menu;if(!menu){return;}this.headerMenu.bindDomNode(this.viewsHeaderNode);if(this.headerMenu.getPlaceholders){this._placeholders=this.headerMenu.getPlaceholders(this.placeholderLabel);}},setHeaderMenu:function(menu){dojo.deprecated("dojox.grid._Grid.setHeaderMenu(obj)","use dojox.grid._Grid.set('headerMenu', obj) instead.","2.0");this._setHeaderMenuAttr(menu);},setupHeaderMenu:function(){if(this._placeholders&&this._placeholders.length){_c1f.forEach(this._placeholders,function(p){if(p._replaced){p.unReplace(true);}p.replace(this.getColumnTogglingItems());},this);}},_fetch:function(_c2e){this.setScrollTop(0);},getItem:function(_c2f){return null;},showMessage:function(_c30){if(_c30){this.messagesNode.innerHTML=_c30;this.messagesNode.style.display="";}else{this.messagesNode.innerHTML="";this.messagesNode.style.display="none";}},_structureChanged:function(){this.buildViews();if(this.autoRender&&this._started){this.render();}},hasLayout:function(){return this.layout.cells.length;},resize:function(_c31,_c32){this._pendingChangeSize=_c31;this._pendingResultSize=_c32;this.sizeChange();},_getPadBorder:function(){this._padBorder=this._padBorder||html._getPadBorderExtents(this.domNode);return this._padBorder;},_getHeaderHeight:function(){var vns=this.viewsHeaderNode.style,t=vns.display=="none"?0:this.views.measureHeader();vns.height=t+"px";this.views.normalizeHeaderNodeHeight();return t;},_resize:function(_c33,_c34){_c33=_c33||this._pendingChangeSize;_c34=_c34||this._pendingResultSize;delete this._pendingChangeSize;delete this._pendingResultSize;if(!this.domNode){return;}var pn=this.domNode.parentNode;if(!pn||pn.nodeType!=1||!this.hasLayout()||pn.style.visibility=="hidden"||pn.style.display=="none"){return;}var _c35=this._getPadBorder();var hh=undefined;var h;if(this._autoHeight){this.domNode.style.height="auto";}else{if(typeof this.autoHeight=="number"){h=hh=this._getHeaderHeight();h+=(this.scroller.averageRowHeight*this.autoHeight);this.domNode.style.height=h+"px";}else{if(this.domNode.clientHeight<=_c35.h){if(pn==document.body){this.domNode.style.height=this.defaultHeight;}else{if(this.height){this.domNode.style.height=this.height;}else{this.fitTo="parent";}}}}}if(_c34){_c33=_c34;}if(!this._autoHeight&&_c33){html.marginBox(this.domNode,_c33);this.height=this.domNode.style.height;delete this.fitTo;}else{if(this.fitTo=="parent"){h=this._parentContentBoxHeight=(this._parentContentBoxHeight>0?this._parentContentBoxHeight:html._getContentBox(pn).h);this.domNode.style.height=Math.max(0,h)+"px";}}var _c36=_c1f.some(this.views.views,function(v){return v.flexCells;});if(!this._autoHeight&&(h||html._getContentBox(this.domNode).h)===0){this.viewsHeaderNode.style.display="none";}else{this.viewsHeaderNode.style.display="block";if(!_c36&&hh===undefined){hh=this._getHeaderHeight();}}if(_c36){hh=undefined;}this.adaptWidth();this.adaptHeight(hh);this.postresize();},adaptWidth:function(){var _c37=(!this.initialWidth&&this.autoWidth);var w=_c37?0:this.domNode.clientWidth||(this.domNode.offsetWidth-this._getPadBorder().w),vw=this.views.arrange(1,w);this.views.onEach("adaptWidth");if(_c37){this.domNode.style.width=vw+"px";}},adaptHeight:function(_c38){var t=_c38===undefined?this._getHeaderHeight():_c38;var h=(this._autoHeight?-1:Math.max(this.domNode.clientHeight-t,0)||0);this.views.onEach("setSize",[0,h]);this.views.onEach("adaptHeight");if(!this._autoHeight){var _c39=0,_c3a=0;var _c3b=_c1f.filter(this.views.views,function(v){var has=v.hasHScrollbar();if(has){_c39++;}else{_c3a++;}return (!has);});if(_c39>0&&_c3a>0){_c1f.forEach(_c3b,function(v){v.adaptHeight(true);});}}if(this.autoHeight===true||h!=-1||(typeof this.autoHeight=="number"&&this.autoHeight>=this.get("rowCount"))){this.scroller.windowHeight=h;}else{this.scroller.windowHeight=Math.max(this.domNode.clientHeight-t,0);}},startup:function(){if(this._started){return;}this.inherited(arguments);if(this.autoRender){this.render();}},render:function(){if(!this.domNode){return;}if(!this._started){return;}if(!this.hasLayout()){this.scroller.init(0,this.keepRows,this.rowsPerPage);return;}this.update=this.defaultUpdate;this._render();},_render:function(){this.scroller.init(this.get("rowCount"),this.keepRows,this.rowsPerPage);this.prerender();this.setScrollTop(0);this.postrender();},prerender:function(){this.keepRows=this._autoHeight?0:this.keepRows;this.scroller.setKeepInfo(this.keepRows);this.views.render();this._resize();},postrender:function(){this.postresize();this.focus.initFocusView();html.setSelectable(this.domNode,this.selectable);},postresize:function(){if(this._autoHeight){var size=Math.max(this.views.measureContent())+"px";this.viewsNode.style.height=size;}},renderRow:function(_c3c,_c3d){this.views.renderRow(_c3c,_c3d,this._skipRowRenormalize);},rowRemoved:function(_c3e){this.views.rowRemoved(_c3e);},invalidated:null,updating:false,beginUpdate:function(){this.invalidated=[];this.updating=true;},endUpdate:function(){this.updating=false;var i=this.invalidated,r;if(i.all){this.update();}else{if(i.rowCount!=undefined){this.updateRowCount(i.rowCount);}else{for(r in i){this.updateRow(Number(r));}}}this.invalidated=[];},defaultUpdate:function(){if(!this.domNode){return;}if(this.updating){this.invalidated.all=true;return;}this.lastScrollTop=this.scrollTop;this.prerender();this.scroller.invalidateNodes();this.setScrollTop(this.lastScrollTop);this.postrender();},update:function(){this.render();},updateRow:function(_c3f){_c3f=Number(_c3f);if(this.updating){this.invalidated[_c3f]=true;}else{this.views.updateRow(_c3f);this.scroller.rowHeightChanged(_c3f);}},updateRows:function(_c40,_c41){_c40=Number(_c40);_c41=Number(_c41);var i;if(this.updating){for(i=0;i<_c41;i++){this.invalidated[i+_c40]=true;}}else{for(i=0;i<_c41;i++){this.views.updateRow(i+_c40,this._skipRowRenormalize);}this.scroller.rowHeightChanged(_c40);}},updateRowCount:function(_c42){if(this.updating){this.invalidated.rowCount=_c42;}else{this.rowCount=_c42;this._setAutoHeightAttr(this.autoHeight,true);if(this.layout.cells.length){this.scroller.updateRowCount(_c42);}this._resize();if(this.layout.cells.length){this.setScrollTop(this.scrollTop);}}},updateRowStyles:function(_c43){this.views.updateRowStyles(_c43);},getRowNode:function(_c44){if(this.focus.focusView&&!(this.focus.focusView instanceof _c19)){return this.focus.focusView.rowNodes[_c44];}else{for(var i=0,_c45;(_c45=this.views.views[i]);i++){if(!(_c45 instanceof _c19)){return _c45.rowNodes[_c44];}}}return null;},rowHeightChanged:function(_c46){this.views.renormalizeRow(_c46);this.scroller.rowHeightChanged(_c46);},fastScroll:true,delayScroll:false,scrollRedrawThreshold:(has("ie")?100:50),scrollTo:function(_c47){if(!this.fastScroll){this.setScrollTop(_c47);return;}var _c48=Math.abs(this.lastScrollTop-_c47);this.lastScrollTop=_c47;if(_c48>this.scrollRedrawThreshold||this.delayScroll){this.delayScroll=true;this.scrollTop=_c47;this.views.setScrollTop(_c47);if(this._pendingScroll){window.clearTimeout(this._pendingScroll);}var _c49=this;this._pendingScroll=window.setTimeout(function(){delete _c49._pendingScroll;_c49.finishScrollJob();},200);}else{this.setScrollTop(_c47);}},finishScrollJob:function(){this.delayScroll=false;this.setScrollTop(this.scrollTop);},setScrollTop:function(_c4a){this.scroller.scroll(this.views.setScrollTop(_c4a));},scrollToRow:function(_c4b){this.setScrollTop(this.scroller.findScrollTop(_c4b)+1);},styleRowNode:function(_c4c,_c4d){if(_c4d){this.rows.styleRowNode(_c4c,_c4d);}},_mouseOut:function(e){this.rows.setOverRow(-2);},getCell:function(_c4e){return this.layout.cells[_c4e];},setCellWidth:function(_c4f,_c50){this.getCell(_c4f).unitWidth=_c50;},getCellName:function(_c51){return "Cell "+_c51.index;},canSort:function(_c52){},sort:function(){},getSortAsc:function(_c53){_c53=_c53==undefined?this.sortInfo:_c53;return Boolean(_c53>0);},getSortIndex:function(_c54){_c54=_c54==undefined?this.sortInfo:_c54;return Math.abs(_c54)-1;},setSortIndex:function(_c55,_c56){var si=_c55+1;if(_c56!=undefined){si*=(_c56?1:-1);}else{if(this.getSortIndex()==_c55){si=-this.sortInfo;}}this.setSortInfo(si);},setSortInfo:function(_c57){if(this.canSort(_c57)){this.sortInfo=_c57;this.sort();this.update();}},doKeyEvent:function(e){e.dispatch="do"+e.type;this.onKeyEvent(e);},_dispatch:function(m,e){if(m in this){return this[m](e);}return false;},dispatchKeyEvent:function(e){this._dispatch(e.dispatch,e);},dispatchContentEvent:function(e){this.edit.dispatchEvent(e)||e.sourceView.dispatchContentEvent(e)||this._dispatch(e.dispatch,e);},dispatchHeaderEvent:function(e){e.sourceView.dispatchHeaderEvent(e)||this._dispatch("doheader"+e.type,e);},dokeydown:function(e){this.onKeyDown(e);},doclick:function(e){if(e.cellNode){this.onCellClick(e);}else{this.onRowClick(e);}},dodblclick:function(e){if(e.cellNode){this.onCellDblClick(e);}else{this.onRowDblClick(e);}},docontextmenu:function(e){if(e.cellNode){this.onCellContextMenu(e);}else{this.onRowContextMenu(e);}},doheaderclick:function(e){if(e.cellNode){this.onHeaderCellClick(e);}else{this.onHeaderClick(e);}},doheaderdblclick:function(e){if(e.cellNode){this.onHeaderCellDblClick(e);}else{this.onHeaderDblClick(e);}},doheadercontextmenu:function(e){if(e.cellNode){this.onHeaderCellContextMenu(e);}else{this.onHeaderContextMenu(e);}},doStartEdit:function(_c58,_c59){this.onStartEdit(_c58,_c59);},doApplyCellEdit:function(_c5a,_c5b,_c5c){this.onApplyCellEdit(_c5a,_c5b,_c5c);},doCancelEdit:function(_c5d){this.onCancelEdit(_c5d);},doApplyEdit:function(_c5e){this.onApplyEdit(_c5e);},addRow:function(){this.updateRowCount(this.get("rowCount")+1);},removeSelectedRows:function(){if(this.allItemsSelected){this.updateRowCount(0);}else{this.updateRowCount(Math.max(0,this.get("rowCount")-this.selection.getSelected().length));}this.selection.clear();}});_c22.markupFactory=function(_c5f,node,ctor,_c60){var _c61=function(n){var w=html.attr(n,"width")||"auto";if((w!="auto")&&(w.slice(-2)!="em")&&(w.slice(-1)!="%")){w=parseInt(w,10)+"px";}return w;};if(!_c5f.structure&&node.nodeName.toLowerCase()=="table"){_c5f.structure=_c21("> colgroup",node).map(function(cg){var sv=html.attr(cg,"span");var v={noscroll:(html.attr(cg,"noscroll")=="true")?true:false,__span:(!!sv?parseInt(sv,10):1),cells:[]};if(html.hasAttr(cg,"width")){v.width=_c61(cg);}return v;});if(!_c5f.structure.length){_c5f.structure.push({__span:Infinity,cells:[]});}_c21("thead > tr",node).forEach(function(tr,_c62){var _c63=0;var _c64=0;var _c65;var _c66=null;_c21("> th",tr).map(function(th){if(!_c66){_c65=0;_c66=_c5f.structure[0];}else{if(_c63>=(_c65+_c66.__span)){_c64++;_c65+=_c66.__span;var _c67=_c66;_c66=_c5f.structure[_c64];}}var cell={name:lang.trim(html.attr(th,"name")||th.innerHTML),colSpan:parseInt(html.attr(th,"colspan")||1,10),type:lang.trim(html.attr(th,"cellType")||""),id:lang.trim(html.attr(th,"id")||"")};_c63+=cell.colSpan;var _c68=html.attr(th,"rowspan");if(_c68){cell.rowSpan=_c68;}if(html.hasAttr(th,"width")){cell.width=_c61(th);}if(html.hasAttr(th,"relWidth")){cell.relWidth=window.parseInt(html.attr(th,"relWidth"),10);}if(html.hasAttr(th,"hidden")){cell.hidden=(html.attr(th,"hidden")=="true"||html.attr(th,"hidden")===true);}if(_c60){_c60(th,cell);}cell.type=cell.type?lang.getObject(cell.type):_c0e.grid.cells.Cell;if(cell.type&&cell.type.markupFactory){cell.type.markupFactory(th,cell);}if(!_c66.cells[_c62]){_c66.cells[_c62]=[];}_c66.cells[_c62].push(cell);});});}return new ctor(_c5f,node);};return _c22;});},"dijit/Editor":function(){define("dijit/Editor",["require","dojo/_base/array","dojo/_base/declare","dojo/_base/Deferred","dojo/i18n","dojo/dom-attr","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/event","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/string","dojo/topic","dojo/_base/window","./_base/focus","./_Container","./Toolbar","./ToolbarSeparator","./layout/_LayoutWidget","./form/ToggleButton","./_editor/_Plugin","./_editor/plugins/EnterKeyHandling","./_editor/html","./_editor/range","./_editor/RichText","./main","dojo/i18n!./_editor/nls/commands"],function(_c69,_c6a,_c6b,_c6c,i18n,_c6d,_c6e,_c6f,_c70,_c71,keys,lang,has,_c72,_c73,win,_c74,_c75,_c76,_c77,_c78,_c79,_c7a,_c7b,html,_c7c,_c7d,_c7e){var _c7f=_c6b("dijit.Editor",_c7d,{plugins:null,extraPlugins:null,constructor:function(){if(!lang.isArray(this.plugins)){this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",_c7b];}this._plugins=[];this._editInterval=this.editActionInterval*1000;if(has("ie")){this.events.push("onBeforeDeactivate");this.events.push("onBeforeActivate");}},postMixInProperties:function(){this.setValueDeferred=new _c6c();this.inherited(arguments);},postCreate:function(){this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);if(lang.isArray(this.extraPlugins)){this.plugins=this.plugins.concat(this.extraPlugins);}this.inherited(arguments);this.commands=i18n.getLocalization("dijit._editor","commands",this.lang);if(!this.toolbar){this.toolbar=new _c76({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang});this.header.appendChild(this.toolbar.domNode);}_c6a.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.resolve(true);_c6e.add(this.iframe.parentNode,"dijitEditorIFrameContainer");_c6e.add(this.iframe,"dijitEditorIFrame");_c6d.set(this.iframe,"allowTransparency",true);if(has("webkit")){_c70.set(this.domNode,"KhtmlUserSelect","none");}this.toolbar.startup();this.onNormalizedDisplayChanged();},destroy:function(){_c6a.forEach(this._plugins,function(p){if(p&&p.destroy){p.destroy();}});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments);},addPlugin:function(_c80,_c81){var args=lang.isString(_c80)?{name:_c80}:lang.isFunction(_c80)?{ctor:_c80}:_c80;if(!args.setEditor){var o={"args":args,"plugin":null,"editor":this};if(args.name){if(_c7a.registry[args.name]){o.plugin=_c7a.registry[args.name](args);}else{_c73.publish(_c7e._scopeName+".Editor.getPlugin",o);}}if(!o.plugin){try{var pc=args.ctor||lang.getObject(args.name)||_c69(args.name);if(pc){o.plugin=new pc(args);}}catch(e){throw new Error(this.id+": cannot find plugin ["+args.name+"]");}}if(!o.plugin){throw new Error(this.id+": cannot find plugin ["+args.name+"]");}_c80=o.plugin;}if(arguments.length>1){this._plugins[_c81]=_c80;}else{this._plugins.push(_c80);}_c80.setEditor(this);if(lang.isFunction(_c80.setToolbar)){_c80.setToolbar(this.toolbar);}},resize:function(size){if(size){_c78.prototype.resize.apply(this,arguments);}},layout:function(){var _c82=(this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+_c6f.getPadBorderExtents(this.iframe.parentNode).h+_c6f.getMarginExtents(this.iframe.parentNode).h));this.editingArea.style.height=_c82+"px";if(this.iframe){this.iframe.style.height="100%";}this._layoutMode=true;},_onIEMouseDown:function(e){var _c83;var b=this.document.body;var _c84=b.clientWidth;var _c85=b.clientHeight;var _c86=b.clientLeft;var _c87=b.offsetWidth;var _c88=b.offsetHeight;var _c89=b.offsetLeft;if(/^rtl$/i.test(b.dir||"")){if(_c84<_c87&&e.x>_c84&&e.x<_c87){_c83=true;}}else{if(e.x<_c86&&e.x>_c89){_c83=true;}}if(!_c83){if(_c85<_c88&&e.y>_c85&&e.y<_c88){_c83=true;}}if(!_c83){delete this._cursorToStart;delete this._savedSelection;if(e.target.tagName=="BODY"){this.defer("placeCursorAtEnd");}this.inherited(arguments);}},onBeforeActivate:function(){this._restoreSelection();},onBeforeDeactivate:function(e){if(this.customUndo){this.endEditing(true);}if(e.target.tagName!="BODY"){this._saveSelection();}},customUndo:true,editActionInterval:3,beginEditing:function(cmd){if(!this._inEditing){this._inEditing=true;this._beginEditing(cmd);}if(this.editActionInterval>0){if(this._editTimer){this._editTimer.remove();}this._editTimer=this.defer("endEditing",this._editInterval);}},_steps:[],_undoedSteps:[],execCommand:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return this[cmd]();}else{if(this.customUndo){this.endEditing();this._beginEditing();}var r=this.inherited(arguments);if(this.customUndo){this._endEditing();}return r;}},_pasteImpl:function(){return this._clipboardCommand("paste");},_cutImpl:function(){return this._clipboardCommand("cut");},_copyImpl:function(){return this._clipboardCommand("copy");},_clipboardCommand:function(cmd){var r;try{r=this.document.execCommand(cmd,false,null);if(has("webkit")&&!r){throw {code:1011};}}catch(e){if(e.code==1011||(e.code==9&&has("opera"))){var sub=_c72.substitute,_c8a={cut:"X",copy:"C",paste:"V"};alert(sub(this.commands.systemShortcut,[this.commands[cmd],sub(this.commands[has("mac")?"appleKey":"ctrlKey"],[_c8a[cmd]])]));}r=false;}return r;},queryCommandEnabled:function(cmd){if(this.customUndo&&(cmd=="undo"||cmd=="redo")){return cmd=="undo"?(this._steps.length>1):(this._undoedSteps.length>0);}else{return this.inherited(arguments);}},_moveToBookmark:function(b){var _c8b=b.mark;var mark=b.mark;var col=b.isCollapsed;var r,_c8c,_c8d,sel;if(mark){if(has("ie")<9){if(lang.isArray(mark)){_c8b=[];_c6a.forEach(mark,function(n){_c8b.push(_c7c.getNode(n,this.editNode));},this);win.withGlobal(this.window,"moveToBookmark",_c74,[{mark:_c8b,isCollapsed:col}]);}else{if(mark.startContainer&&mark.endContainer){sel=_c7c.getSelection(this.window);if(sel&&sel.removeAllRanges){sel.removeAllRanges();r=_c7c.create(this.window);_c8c=_c7c.getNode(mark.startContainer,this.editNode);_c8d=_c7c.getNode(mark.endContainer,this.editNode);if(_c8c&&_c8d){r.setStart(_c8c,mark.startOffset);r.setEnd(_c8d,mark.endOffset);sel.addRange(r);}}}}}else{sel=_c7c.getSelection(this.window);if(sel&&sel.removeAllRanges){sel.removeAllRanges();r=_c7c.create(this.window);_c8c=_c7c.getNode(mark.startContainer,this.editNode);_c8d=_c7c.getNode(mark.endContainer,this.editNode);if(_c8c&&_c8d){r.setStart(_c8c,mark.startOffset);r.setEnd(_c8d,mark.endOffset);sel.addRange(r);}}}}},_changeToStep:function(from,to){this.setValue(to.text);var b=to.bookmark;if(!b){return;}this._moveToBookmark(b);},undo:function(){var ret=false;if(!this._undoRedoActive){this._undoRedoActive=true;this.endEditing(true);var s=this._steps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(s,this._steps[this._steps.length-1]);this._undoedSteps.push(s);this.onDisplayChanged();delete this._undoRedoActive;ret=true;}delete this._undoRedoActive;}return ret;},redo:function(){var ret=false;if(!this._undoRedoActive){this._undoRedoActive=true;this.endEditing(true);var s=this._undoedSteps.pop();if(s&&this._steps.length>0){this.focus();this._changeToStep(this._steps[this._steps.length-1],s);this._steps.push(s);this.onDisplayChanged();ret=true;}delete this._undoRedoActive;}return ret;},endEditing:function(_c8e){if(this._editTimer){this._editTimer=this._editTimer.remove();}if(this._inEditing){this._endEditing(_c8e);this._inEditing=false;}},_getBookmark:function(){var b=win.withGlobal(this.window,_c74.getBookmark);var tmp=[];if(b&&b.mark){var mark=b.mark;if(has("ie")<9){var sel=_c7c.getSelection(this.window);if(!lang.isArray(mark)){if(sel){var _c8f;if(sel.rangeCount){_c8f=sel.getRangeAt(0);}if(_c8f){b.mark=_c8f.cloneRange();}else{b.mark=win.withGlobal(this.window,_c74.getBookmark);}}}else{_c6a.forEach(b.mark,function(n){tmp.push(_c7c.getIndex(n,this.editNode).o);},this);b.mark=tmp;}}try{if(b.mark&&b.mark.startContainer){tmp=_c7c.getIndex(b.mark.startContainer,this.editNode).o;b.mark={startContainer:tmp,startOffset:b.mark.startOffset,endContainer:b.mark.endContainer===b.mark.startContainer?tmp:_c7c.getIndex(b.mark.endContainer,this.editNode).o,endOffset:b.mark.endOffset};}}catch(e){b.mark=null;}}return b;},_beginEditing:function(){if(this._steps.length===0){this._steps.push({"text":html.getChildrenHtml(this.editNode),"bookmark":this._getBookmark()});}},_endEditing:function(){var v=html.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:v,bookmark:this._getBookmark()});},onKeyDown:function(e){if(!has("ie")&&!this.iframe&&e.keyCode==keys.TAB&&!this.tabIndent){this._saveSelection();}if(!this.customUndo){this.inherited(arguments);return;}var k=e.keyCode;if(e.ctrlKey&&!e.altKey){if(k==90||k==122){_c71.stop(e);this.undo();return;}else{if(k==89||k==121){_c71.stop(e);this.redo();return;}}}this.inherited(arguments);switch(k){case keys.ENTER:case keys.BACKSPACE:case keys.DELETE:this.beginEditing();break;case 88:case 86:if(e.ctrlKey&&!e.altKey&&!e.metaKey){this.endEditing();if(e.keyCode==88){this.beginEditing("cut");}else{this.beginEditing("paste");}this.defer("endEditing",1);break;}default:if(!e.ctrlKey&&!e.altKey&&!e.metaKey&&(e.keyCode<keys.F1||e.keyCode>keys.F15)){this.beginEditing();break;}case keys.ALT:this.endEditing();break;case keys.UP_ARROW:case keys.DOWN_ARROW:case keys.LEFT_ARROW:case keys.RIGHT_ARROW:case keys.HOME:case keys.END:case keys.PAGE_UP:case keys.PAGE_DOWN:this.endEditing(true);break;case keys.CTRL:case keys.SHIFT:case keys.TAB:break;}},_onBlur:function(){this.inherited(arguments);this.endEditing(true);},_saveSelection:function(){try{this._savedSelection=this._getBookmark();}catch(e){}},_restoreSelection:function(){if(this._savedSelection){delete this._cursorToStart;if(win.withGlobal(this.window,"isCollapsed",_c74)){this._moveToBookmark(this._savedSelection);}delete this._savedSelection;}},onClick:function(){this.endEditing(true);this.inherited(arguments);},replaceValue:function(html){if(!this.customUndo){this.inherited(arguments);}else{if(this.isClosed){this.setValue(html);}else{this.beginEditing();if(!html){html="&#160;";}this.setValue(html);this.endEditing();}}},_setDisabledAttr:function(_c90){this.setValueDeferred.then(lang.hitch(this,function(){if((!this.disabled&&_c90)||(!this._buttonEnabledPlugins&&_c90)){_c6a.forEach(this._plugins,function(p){p.set("disabled",true);});}else{if(this.disabled&&!_c90){_c6a.forEach(this._plugins,function(p){p.set("disabled",false);});}}}));this.inherited(arguments);},_setStateClass:function(){try{this.inherited(arguments);if(this.document&&this.document.body){_c70.set(this.document.body,"color",_c70.get(this.iframe,"color"));}}catch(e){}}});function _c91(args){return new _c7a({command:args.name});};function _c92(args){return new _c7a({buttonClass:_c79,command:args.name});};lang.mixin(_c7a.registry,{"undo":_c91,"redo":_c91,"cut":_c91,"copy":_c91,"paste":_c91,"insertOrderedList":_c91,"insertUnorderedList":_c91,"indent":_c91,"outdent":_c91,"justifyCenter":_c91,"justifyFull":_c91,"justifyLeft":_c91,"justifyRight":_c91,"delete":_c91,"selectAll":_c91,"removeFormat":_c91,"unlink":_c91,"insertHorizontalRule":_c91,"bold":_c92,"italic":_c92,"underline":_c92,"strikethrough":_c92,"subscript":_c92,"superscript":_c92,"|":function(){return new _c7a({setEditor:function(_c93){this.editor=_c93;this.button=new _c77({ownerDocument:_c93.ownerDocument});}});}});return _c7f;});},"esri/tasks/ProjectParameters":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel","esri/lang","esri/geometry/jsonUtils"],function(_c94,lang,_c95,_c96,has,_c97,_c98,_c99){var _c9a=_c94(null,{declaredClass:"esri.tasks.ProjectParameters",geometries:null,outSR:null,transformation:null,transformForward:null,toJson:function(){var _c9b=_c95.map(this.geometries,function(geom){return geom.toJson();});var json={};json.outSR=this.outSR.wkid||_c96.toJson(this.outSR.toJson());json.inSR=this.geometries[0].spatialReference.wkid||_c96.toJson(this.geometries[0].spatialReference.toJson());json.geometries=_c96.toJson({geometryType:_c99.getJsonType(this.geometries[0]),geometries:_c9b});if(this.transformation){json.transformation=this.transformation.wkid||_c96.toJson(this.transformation);}if(_c98.isDefined(this.transformForward)){json.transformForward=this.transformForward;}return json;}});if(has("extend-esri")){lang.setObject("tasks.ProjectParameters",_c9a,_c97);}return _c9a;});},"dijit/Toolbar":function(){define("dijit/Toolbar",["require","dojo/_base/declare","dojo/has","dojo/keys","dojo/ready","./_Widget","./_KeyNavContainer","./_TemplatedMixin"],function(_c9c,_c9d,has,keys,_c9e,_c9f,_ca0,_ca1){if(has("dijit-legacy-requires")){_c9e(0,function(){var _ca2=["dijit/ToolbarSeparator"];_c9c(_ca2);});}return _c9d("dijit.Toolbar",[_c9f,_ca1,_ca0],{templateString:"<div class=\"dijit\" role=\"toolbar\" tabIndex=\"${tabIndex}\" data-dojo-attach-point=\"containerNode\">"+"</div>",baseClass:"dijitToolbar",postCreate:function(){this.inherited(arguments);this.connectKeyNavHandlers(this.isLeftToRight()?[keys.LEFT_ARROW]:[keys.RIGHT_ARROW],this.isLeftToRight()?[keys.RIGHT_ARROW]:[keys.LEFT_ARROW]);}});});},"esri/layers/SnapshotMode":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/SpatialReference","esri/tasks/query","esri/layers/RenderMode"],function(_ca3,lang,has,_ca4,_ca5,_ca6,_ca7){var _ca8=_ca3([_ca7],{declaredClass:"esri.layers._SnapshotMode",constructor:function(_ca9){this.featureLayer=_ca9;this._featureMap={};this._drawFeatures=lang.hitch(this,this._drawFeatures);this._queryErrorHandler=lang.hitch(this,this._queryErrorHandler);},startup:function(){if(this.featureLayer._collection){this._applyTimeFilter();}else{this._fetchAll();}},propertyChangeHandler:function(type){if(this._init){if(type){if(this.featureLayer._collection){console.log("FeatureLayer: layer created by value (from a feature collection) does not support definition expressions and time definitions. Layer id = "+this.featureLayer.id);}else{this._fetchAll();}}else{this._applyTimeFilter();}}},drawFeature:function(_caa){var _cab=this.featureLayer,_cac=_cab.objectIdField,oid=_caa.attributes[_cac];this._addFeatureIIf(oid,_caa);this._incRefCount(oid);},resume:function(){this.propertyChangeHandler(0);},refresh:function(){var _cad=this.featureLayer;if(_cad._collection){_cad._fireUpdateStart();_cad._refresh(true);_cad._fireUpdateEnd();}else{this._fetchAll();}},_getRequestId:function(_cae){var id="_"+_cae.name+_cae.layerId+_cae._ulid;return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_fetchAll:function(){var _caf=this.featureLayer;if(_caf._collection){return;}_caf._fireUpdateStart();this._clearIIf();this._sendRequest();},_sendRequest:function(){var map=this.map,_cb0=this.featureLayer,_cb1=_cb0.getDefinitionExpression();var _cb2=new _ca6();_cb2.outFields=_cb0.getOutFields();_cb2.where=_cb1||"1=1";_cb2.returnGeometry=true;_cb2.outSpatialReference=new _ca5(map.spatialReference.toJson());_cb2.timeExtent=_cb0.getTimeDefinition();_cb2.maxAllowableOffset=_cb0._maxOffset;if(_cb0._ts){_cb2._ts=(new Date()).getTime();}var _cb3;if(_cb0._usePatch){_cb3=this._getRequestId(_cb0);this._cancelPendingRequest(null,_cb3);}_cb0._task.execute(_cb2,this._drawFeatures,this._queryErrorHandler,_cb3);},_drawFeatures:function(_cb4){this._purgeRequests();var _cb5=_cb4.features,_cb6=this.featureLayer,_cb7=_cb6.objectIdField,i,len=_cb5.length,_cb8,oid;for(i=0;i<len;i++){_cb8=_cb5[i];oid=_cb8.attributes[_cb7];this._addFeatureIIf(oid,_cb8);this._incRefCount(oid);}this._applyTimeFilter(true);_cb6._fireUpdateEnd(null,_cb4.exceededTransferLimit?{queryLimitExceeded:true}:null);if(_cb4.exceededTransferLimit){_cb6.onQueryLimitExceeded();}},_queryErrorHandler:function(err){this._purgeRequests();var _cb9=this.featureLayer;_cb9._errorHandler(err);_cb9._fireUpdateEnd(err);}});if(has("extend-esri")){lang.setObject("layers._SnapshotMode",_ca8,_ca4);}return _ca8;});},"url:dojox/grid/resources/_Grid.html":"<div hidefocus=\"hidefocus\" role=\"grid\" dojoAttachEvent=\"onmouseout:_mouseOut\">\n\t<div class=\"dojoxGridMasterHeader\" dojoAttachPoint=\"viewsHeaderNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterView\" dojoAttachPoint=\"viewsNode\" role=\"presentation\"></div>\n\t<div class=\"dojoxGridMasterMessages\" style=\"display: none;\" dojoAttachPoint=\"messagesNode\"></div>\n\t<span dojoAttachPoint=\"lastFocusNode\" tabindex=\"0\"></span>\n</div>\n","dijit/DropDownMenu":function(){require({cache:{"url:dijit/templates/Menu.html":"<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" role=\"menu\" tabIndex=\"${tabIndex}\"\n\t   data-dojo-attach-event=\"onkeypress:_onKeyPress\" cellspacing=\"0\">\n\t<tbody class=\"dijitReset\" data-dojo-attach-point=\"containerNode\"></tbody>\n</table>\n"}});define("dijit/DropDownMenu",["dojo/_base/declare","dojo/_base/event","dojo/keys","dojo/text!./templates/Menu.html","./_OnDijitClickMixin","./_MenuBase"],function(_cba,_cbb,keys,_cbc,_cbd,_cbe){return _cba("dijit.DropDownMenu",[_cbe,_cbd],{templateString:_cbc,baseClass:"dijitMenu",postCreate:function(){this.inherited(arguments);var l=this.isLeftToRight();this._openSubMenuKey=l?keys.RIGHT_ARROW:keys.LEFT_ARROW;this._closeSubMenuKey=l?keys.LEFT_ARROW:keys.RIGHT_ARROW;this.connectKeyNavHandlers([keys.UP_ARROW],[keys.DOWN_ARROW]);},_onKeyPress:function(evt){if(evt.ctrlKey||evt.altKey){return;}switch(evt.charOrCode){case this._openSubMenuKey:this._moveToPopup(evt);_cbb.stop(evt);break;case this._closeSubMenuKey:if(this.parentMenu){if(this.parentMenu._isMenuBar){this.parentMenu.focusPrev();}else{this.onCancel(false);}}else{_cbb.stop(evt);}break;}}});});},"dijit/_editor/plugins/LinkDialog":function(){define("dijit/_editor/plugins/LinkDialog",["require","dojo/_base/declare","dojo/dom-attr","dojo/keys","dojo/_base/lang","dojo/sniff","dojo/_base/query","dojo/string","../../_Widget","../_Plugin","../../form/DropDownButton","../range"],function(_cbf,_cc0,_cc1,keys,lang,has,_cc2,_cc3,_cc4,_cc5,_cc6,_cc7){var _cc8=_cc0("dijit._editor.plugins.LinkDialog",_cc5,{buttonClass:_cc6,useDefaultCommand:false,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:"<?(mailto\\:)([!#-'*+\\-\\/-9=?A-Z^-~]+[.])*[!#-'*+\\-\\/-9=?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_-]*>?",htmlTemplate:"<a href=\"${urlInput}\" _djrealurl=\"${urlInput}\""+" target=\"${targetSelect}\""+">${textInput}</a>",tag:"a",_hostRxp:/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,_userAtRxp:/^([!#-'*+\-\/-9=?A-Z^-~]+[.])*[!#-'*+\-\/-9=?A-Z^-~]+@/i,linkDialogTemplate:["<table role='presentation'><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input data-dojo-type='dijit.form.ValidationTextBox' required='true' "+"id='${id}_urlInput' name='urlInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input data-dojo-type='dijit.form.ValidationTextBox' required='true' id='${id}_textInput' "+"name='textInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","<label for='${id}_targetSelect'>${target}</label>","</td><td>","<select id='${id}_targetSelect' name='targetSelect' data-dojo-type='dijit.form.Select'>","<option selected='selected' value='_self'>${currentWindow}</option>","<option value='_blank'>${newWindow}</option>","<option value='_top'>${topWindow}</option>","<option value='_parent'>${parentWindow}</option>","</select>","</td></tr><tr><td colspan='2'>","<button data-dojo-type='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button data-dojo-type='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),_initButton:function(){this.inherited(arguments);this.button.loadDropDown=lang.hitch(this,"_loadDropDown");this._connectTagEvents();},_loadDropDown:function(_cc9){_cbf(["dojo/i18n","../../TooltipDialog","../../registry","../../form/Button","../../form/Select","../../form/ValidationTextBox","dojo/i18n!../../nls/common","dojo/i18n!../nls/LinkDialog"],lang.hitch(this,function(i18n,_cca,_ccb){var _ccc=this;this.tag=this.command=="insertImage"?"img":"a";var _ccd=lang.delegate(i18n.getLocalization("dijit","common",this.lang),i18n.getLocalization("dijit._editor","LinkDialog",this.lang));var _cce=(this.dropDown=this.button.dropDown=new _cca({title:_ccd[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:lang.hitch(this,"setValue"),onOpen:function(){_ccc._onOpenDialog();_cca.prototype.onOpen.apply(this,arguments);},onCancel:function(){setTimeout(lang.hitch(_ccc,"_onCloseDialog"),0);}}));_ccd.urlRegExp=this.urlRegExp;_ccd.id=_ccb.getUniqueId(this.editor.id);this._uniqueId=_ccd.id;this._setContent(_cce.title+"<div style='border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'></div>"+_cc3.substitute(this.linkDialogTemplate,_ccd));_cce.startup();this._urlInput=_ccb.byId(this._uniqueId+"_urlInput");this._textInput=_ccb.byId(this._uniqueId+"_textInput");this._setButton=_ccb.byId(this._uniqueId+"_setButton");this.connect(_ccb.byId(this._uniqueId+"_cancelButton"),"onClick",function(){this.dropDown.onCancel();});if(this._urlInput){this.connect(this._urlInput,"onChange","_checkAndFixInput");}if(this._textInput){this.connect(this._textInput,"onChange","_checkAndFixInput");}this._urlRegExp=new RegExp("^"+this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=lang.hitch(this,function(){var _ccf=this._urlInput.get("value");return this._urlRegExp.test(_ccf)||this._emailRegExp.test(_ccf);});this.connect(_cce.domNode,"onkeypress",function(e){if(e&&e.charOrCode==keys.ENTER&&!e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey){if(!this._setButton.get("disabled")){_cce.onExecute();_cce.execute(_cce.get("value"));}}});_cc9();}));},_checkAndFixInput:function(){var self=this;var url=this._urlInput.get("value");var _cd0=function(url){var _cd1=false;var _cd2=false;if(url&&url.length>1){url=lang.trim(url);if(url.indexOf("mailto:")!==0){if(url.indexOf("/")>0){if(url.indexOf("://")===-1){if(url.charAt(0)!=="/"&&url.indexOf("./")&&url.indexOf("../")!==0){if(self._hostRxp.test(url)){_cd1=true;}}}}else{if(self._userAtRxp.test(url)){_cd2=true;}}}}if(_cd1){self._urlInput.set("value","http://"+url);}if(_cd2){self._urlInput.set("value","mailto:"+url);}self._setButton.set("disabled",!self._isValid());};if(this._delayedCheck){clearTimeout(this._delayedCheck);this._delayedCheck=null;}this._delayedCheck=setTimeout(function(){_cd0(url);},250);},_connectTagEvents:function(){this.editor.onLoadDeferred.then(lang.hitch(this,function(){this.connect(this.editor.editNode,"ondblclick",this._onDblClick);}));},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid();},_setContent:function(_cd3){this.dropDown.set({parserScope:"dojo",content:_cd3});},_checkValues:function(args){if(args&&args.urlInput){args.urlInput=args.urlInput.replace(/"/g,"&quot;");}return args;},setValue:function(args){this._onCloseDialog();if(has("ie")<9){var sel=_cc7.getSelection(this.editor.window);var _cd4=sel.getRangeAt(0);var a=_cd4.endContainer;if(a.nodeType===3){a=a.parentNode;}if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){a=this.editor._sCall("getSelectedElement",[this.tag]);}if(a&&(a.nodeName&&a.nodeName.toLowerCase()===this.tag)){if(this.editor.queryCommandEnabled("unlink")){this.editor._sCall("selectElementChildren",[a]);this.editor.execCommand("unlink");}}}args=this._checkValues(args);this.editor.execCommand("inserthtml",_cc3.substitute(this.htmlTemplate,args));_cc2("a",this.editor.document).forEach(function(a){if(!a.innerHTML&&!_cc1.has(a,"name")){a.parentNode.removeChild(a);}},this);},_onCloseDialog:function(){this.editor.focus();},_getCurrentValues:function(a){var url,text,_cd5;if(a&&a.tagName.toLowerCase()===this.tag){url=a.getAttribute("_djrealurl")||a.getAttribute("href");_cd5=a.getAttribute("target")||"_self";text=a.textContent||a.innerText;this.editor._sCall("selectElement",[a,true]);}else{text=this.editor._sCall("getSelectedText");}return {urlInput:url||"",textInput:text||"",targetSelect:_cd5||""};},_onOpenDialog:function(){var a,b,fc;if(has("ie")){var sel=_cc7.getSelection(this.editor.window);if(sel.rangeCount){var _cd6=sel.getRangeAt(0);a=_cd6.endContainer;if(a.nodeType===3){a=a.parentNode;}if(a&&(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){a=this.editor._sCall("getSelectedElement",[this.tag]);}if(!a||(a.nodeName&&a.nodeName.toLowerCase()!==this.tag)){b=this.editor._sCall("getAncestorElement",[this.tag]);if(b&&(b.nodeName&&b.nodeName.toLowerCase()==this.tag)){a=b;this.editor._sCall("selectElement",[a]);}else{if(_cd6.startContainer===_cd6.endContainer){fc=_cd6.startContainer.firstChild;if(fc&&(fc.nodeName&&fc.nodeName.toLowerCase()==this.tag)){a=fc;this.editor._sCall("selectElement",[a]);}}}}}}else{a=this.editor._sCall("getAncestorElement",[this.tag]);}this.dropDown.reset();this._setButton.set("disabled",true);this.dropDown.set("value",this._getCurrentValues(a));},_onDblClick:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag&&_cc1.get(t,"href")){var _cd7=this.editor;this.editor._sCall("selectElement",[t]);_cd7.onDisplayChanged();if(_cd7._updateTimer){_cd7._updateTimer.remove();delete _cd7._updateTimer;}_cd7.onNormalizedDisplayChanged();var _cd8=this.button;setTimeout(function(){_cd8.set("disabled",false);_cd8.loadAndOpenDropDown().then(function(){if(_cd8.dropDown.focus){_cd8.dropDown.focus();}});},10);}}}});var _cd9=_cc0("dijit._editor.plugins.ImgLinkDialog",[_cc8],{linkDialogTemplate:["<table role='presentation'><tr><td>","<label for='${id}_urlInput'>${url}</label>","</td><td>","<input dojoType='dijit.form.ValidationTextBox' regExp='${urlRegExp}' "+"required='true' id='${id}_urlInput' name='urlInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","<label for='${id}_textInput'>${text}</label>","</td><td>","<input data-dojo-type='dijit.form.ValidationTextBox' required='false' id='${id}_textInput' "+"name='textInput' data-dojo-props='intermediateChanges:true'/>","</td></tr><tr><td>","</td><td>","</td></tr><tr><td colspan='2'>","<button data-dojo-type='dijit.form.Button' type='submit' id='${id}_setButton'>${set}</button>","<button data-dojo-type='dijit.form.Button' type='button' id='${id}_cancelButton'>${buttonCancel}</button>","</td></tr></table>"].join(""),htmlTemplate:"<img src=\"${urlInput}\" _djrealurl=\"${urlInput}\" alt=\"${textInput}\" />",tag:"img",_getCurrentValues:function(img){var url,text;if(img&&img.tagName.toLowerCase()===this.tag){url=img.getAttribute("_djrealurl")||img.getAttribute("src");text=img.getAttribute("alt");this.editor._sCall("selectElement",[img,true]);}else{text=this.editor._sCall("getSelectedText",[]);}return {urlInput:url||"",textInput:text||""};},_isValid:function(){return this._urlInput.isValid();},_connectTagEvents:function(){this.inherited(arguments);this.editor.onLoadDeferred.then(lang.hitch(this,function(){this.connect(this.editor.editNode,"onmousedown",this._selectTag);}));},_selectTag:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag){this.editor._sCall("selectElement",[t]);}}},_checkValues:function(args){if(args&&args.urlInput){args.urlInput=args.urlInput.replace(/"/g,"&quot;");}if(args&&args.textInput){args.textInput=args.textInput.replace(/"/g,"&quot;");}return args;},_onDblClick:function(e){if(e&&e.target){var t=e.target;var tg=t.tagName?t.tagName.toLowerCase():"";if(tg===this.tag&&_cc1.get(t,"src")){var _cda=this.editor;this.editor._sCall("selectElement",[t]);_cda.onDisplayChanged();if(_cda._updateTimer){_cda._updateTimer.remove();delete _cda._updateTimer;}_cda.onNormalizedDisplayChanged();var _cdb=this.button;setTimeout(function(){_cdb.set("disabled",false);_cdb.loadAndOpenDropDown().then(function(){if(_cdb.dropDown.focus){_cdb.dropDown.focus();}});},10);}}}});_cc5.registry["createLink"]=function(){return new _cc8({command:"createLink"});};_cc5.registry["insertImage"]=function(){return new _cd9({command:"insertImage"});};_cc8.ImgLinkDialog=_cd9;return _cc8;});},"dojo/data/util/simpleFetch":function(){define(["../../_base/lang","../../_base/kernel","./sorter"],function(lang,_cdc,_cdd){var _cde={};lang.setObject("dojo.data.util.simpleFetch",_cde);_cde.errorHandler=function(_cdf,_ce0){if(_ce0.onError){var _ce1=_ce0.scope||_cdc.global;_ce0.onError.call(_ce1,_cdf,_ce0);}};_cde.fetchHandler=function(_ce2,_ce3){var _ce4=_ce3.abort||null,_ce5=false,_ce6=_ce3.start?_ce3.start:0,_ce7=(_ce3.count&&(_ce3.count!==Infinity))?(_ce6+_ce3.count):_ce2.length;_ce3.abort=function(){_ce5=true;if(_ce4){_ce4.call(_ce3);}};var _ce8=_ce3.scope||_cdc.global;if(!_ce3.store){_ce3.store=this;}if(_ce3.onBegin){_ce3.onBegin.call(_ce8,_ce2.length,_ce3);}if(_ce3.sort){_ce2.sort(_cdd.createSortFunction(_ce3.sort,this));}if(_ce3.onItem){for(var i=_ce6;(i<_ce2.length)&&(i<_ce7);++i){var item=_ce2[i];if(!_ce5){_ce3.onItem.call(_ce8,item,_ce3);}}}if(_ce3.onComplete&&!_ce5){var _ce9=null;if(!_ce3.onItem){_ce9=_ce2.slice(_ce6,_ce7);}_ce3.onComplete.call(_ce8,_ce9,_ce3);}};_cde.fetch=function(_cea){_cea=_cea||{};if(!_cea.store){_cea.store=this;}this._fetchItems(_cea,lang.hitch(this,"fetchHandler"),lang.hitch(this,"errorHandler"));return _cea;};return _cde;});},"dijit/Menu":function(){define("dijit/Menu",["require","dojo/_base/array","dojo/_base/declare","dojo/_base/event","dojo/dom","dojo/dom-attr","dojo/dom-geometry","dojo/dom-style","dojo/keys","dojo/_base/lang","dojo/on","dojo/sniff","dojo/_base/window","dojo/window","./popup","./DropDownMenu","dojo/ready"],function(_ceb,_cec,_ced,_cee,dom,_cef,_cf0,_cf1,keys,lang,on,has,win,_cf2,pm,_cf3,_cf4){if(has("dijit-legacy-requires")){_cf4(0,function(){var _cf5=["dijit/MenuItem","dijit/PopupMenuItem","dijit/CheckedMenuItem","dijit/MenuSeparator"];_ceb(_cf5);});}return _ced("dijit.Menu",_cf3,{constructor:function(){this._bindings=[];},targetNodeIds:[],selector:"",contextMenuForWindow:false,leftClickToOpen:false,refocus:true,postCreate:function(){if(this.contextMenuForWindow){this.bindDomNode(this.ownerDocumentBody);}else{_cec.forEach(this.targetNodeIds,this.bindDomNode,this);}this.inherited(arguments);},_iframeContentWindow:function(_cf6){return _cf2.get(this._iframeContentDocument(_cf6))||this._iframeContentDocument(_cf6)["__parent__"]||(_cf6.name&&win.doc.frames[_cf6.name])||null;},_iframeContentDocument:function(_cf7){return _cf7.contentDocument||(_cf7.contentWindow&&_cf7.contentWindow.document)||(_cf7.name&&win.doc.frames[_cf7.name]&&win.doc.frames[_cf7.name].document)||null;},bindDomNode:function(node){node=dom.byId(node,this.ownerDocument);var cn;if(node.tagName.toLowerCase()=="iframe"){var _cf8=node,_cf9=this._iframeContentWindow(_cf8);cn=win.body(_cf9.document);}else{cn=(node==win.body(this.ownerDocument)?this.ownerDocument.documentElement:node);}var _cfa={node:node,iframe:_cf8};_cef.set(node,"_dijitMenu"+this.id,this._bindings.push(_cfa));var _cfb=lang.hitch(this,function(cn){var _cfc=this.selector,_cfd=_cfc?function(_cfe){return on.selector(_cfc,_cfe);}:function(_cff){return _cff;},self=this;return [on(cn,_cfd(this.leftClickToOpen?"click":"contextmenu"),function(evt){_cee.stop(evt);self._scheduleOpen(this,_cf8,{x:evt.pageX,y:evt.pageY});}),on(cn,_cfd("keydown"),function(evt){if(evt.shiftKey&&evt.keyCode==keys.F10){_cee.stop(evt);self._scheduleOpen(this,_cf8);}})];});_cfa.connects=cn?_cfb(cn):[];if(_cf8){_cfa.onloadHandler=lang.hitch(this,function(){var _d00=this._iframeContentWindow(_cf8);cn=win.body(_d00.document);_cfa.connects=_cfb(cn);});if(_cf8.addEventListener){_cf8.addEventListener("load",_cfa.onloadHandler,false);}else{_cf8.attachEvent("onload",_cfa.onloadHandler);}}},unBindDomNode:function(_d01){var node;try{node=dom.byId(_d01,this.ownerDocument);}catch(e){return;}var _d02="_dijitMenu"+this.id;if(node&&_cef.has(node,_d02)){var bid=_cef.get(node,_d02)-1,b=this._bindings[bid],h;while((h=b.connects.pop())){h.remove();}var _d03=b.iframe;if(_d03){if(_d03.removeEventListener){_d03.removeEventListener("load",b.onloadHandler,false);}else{_d03.detachEvent("onload",b.onloadHandler);}}_cef.remove(node,_d02);delete this._bindings[bid];}},_scheduleOpen:function(_d04,_d05,_d06){if(!this._openTimer){this._openTimer=this.defer(function(){delete this._openTimer;this._openMyself({target:_d04,iframe:_d05,coords:_d06});},1);}},_openMyself:function(args){var _d07=args.target,_d08=args.iframe,_d09=args.coords;this.currentTarget=_d07;if(_d09){if(_d08){var ifc=_cf0.position(_d08,true),_d0a=this._iframeContentWindow(_d08),_d0b=_cf0.docScroll(_d0a.document);var cs=_cf1.getComputedStyle(_d08),tp=_cf1.toPixelValue,left=(has("ie")&&has("quirks")?0:tp(_d08,cs.paddingLeft))+(has("ie")&&has("quirks")?tp(_d08,cs.borderLeftWidth):0),top=(has("ie")&&has("quirks")?0:tp(_d08,cs.paddingTop))+(has("ie")&&has("quirks")?tp(_d08,cs.borderTopWidth):0);_d09.x+=ifc.x+left-_d0b.x;_d09.y+=ifc.y+top-_d0b.y;}}else{_d09=_cf0.position(_d07,true);_d09.x+=10;_d09.y+=10;}var self=this;var _d0c=this._focusManager.get("prevNode");var _d0d=this._focusManager.get("curNode");var _d0e=!_d0d||(dom.isDescendant(_d0d,this.domNode))?_d0c:_d0d;function _d0f(){if(self.refocus&&_d0e){_d0e.focus();}pm.close(self);};pm.open({popup:this,x:_d09.x,y:_d09.y,onExecute:_d0f,onCancel:_d0f,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);pm.close(this);};},destroy:function(){_cec.forEach(this._bindings,function(b){if(b){this.unBindDomNode(b.node);}},this);this.inherited(arguments);}});});},"esri/toolbars/_toolbar":function(){define("esri/toolbars/_toolbar",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/Evented"],function(_d10,lang,has,_d11,_d12){var TB=_d10([_d12],{declaredClass:"esri.toolbars._Toolbar",constructor:function(map){this.map=map;},_cursors:{"move":"pointer","move-v":"pointer","move-gv":"pointer","box0":"nw-resize","box1":"n-resize","box2":"ne-resize","box3":"e-resize","box4":"se-resize","box5":"s-resize","box6":"sw-resize","box7":"w-resize","box8":"pointer"},_deactivateMapTools:function(nav,_d13,_d14,_d15){var map=this.map;if(nav){this._mapNavState={isDoubleClickZoom:map.isDoubleClickZoom,isClickRecenter:map.isClickRecenter,isPan:map.isPan,isRubberBandZoom:map.isRubberBandZoom,isKeyboardNavigation:map.isKeyboardNavigation,isScrollWheelZoom:map.isScrollWheelZoom};map.disableDoubleClickZoom();map.disableClickRecenter();map.disablePan();map.disableRubberBandZoom();map.disableKeyboardNavigation();}if(_d13){map.hideZoomSlider();}if(_d14){map.hidePanArrows();}if(_d15){map.graphics.disableMouseEvents();}},_activateMapTools:function(nav,_d16,_d17,_d18){var map=this.map,_d19=this._mapNavState;if(nav&&_d19){if(_d19.isDoubleClickZoom){map.enableDoubleClickZoom();}if(_d19.isClickRecenter){map.enableClickRecenter();}if(_d19.isPan){map.enablePan();}if(_d19.isRubberBandZoom){map.enableRubberBandZoom();}if(_d19.isKeyboardNavigation){map.enableKeyboardNavigation();}if(_d19.isScrollWheelZoom){map.enableScrollWheelZoom();}}if(_d16){map.showZoomSlider();}if(_d17){map.showPanArrows();}if(_d18){map.graphics.enableMouseEvents();}}});if(has("extend-esri")){lang.setObject("toolbars._Toolbar",TB,_d11);}return TB;});},"esri/tasks/GeometryService":function(){define("esri/tasks/GeometryService",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/_base/Deferred","dojo/has","esri/kernel","esri/request","esri/deferredUtils","esri/tasks/Task","esri/geometry/Extent","esri/geometry/Polyline","esri/geometry/Polygon","esri/geometry/Multipoint","esri/geometry/jsonUtils"],function(_d1a,lang,_d1b,_d1c,_d1d,has,_d1e,_d1f,_d20,Task,_d21,_d22,_d23,_d24,_d25){var _d26=_d1a(Task,{declaredClass:"esri.tasks.GeometryService",_eventMap:{"areas-and-lengths-complete":["result"],"auto-complete-complete":["geometries"],"buffer-complete":["geometries"],"convex-hull-complete":["geometry"],"cut-complete":["result"],"difference-complete":["geometries"],"distance-complete":["distance"],"generalize-complete":["geometries"],"intersect-complete":["geometries"],"label-points-complete":["geometries"],"lengths-complete":["result"],"offset-complete":["geometries"],"project-complete":["geometries"],"relation-complete":["relations"],"reshape-complete":["geometry"],"simplify-complete":["geometries"],"trim-extend-complete":["geometries"],"union-complete":["geometry"]},constructor:function(url){var _d27=lang.hitch;this._projectHandler=_d27(this,this._projectHandler);this._simplifyHandler=_d27(this,this._simplifyHandler);this._bufferHandler=_d27(this,this._bufferHandler);this._areasAndLengthsHandler=_d27(this,this._areasAndLengthsHandler);this._lengthsHandler=_d27(this,this._lengthsHandler);this._labelPointsHandler=_d27(this,this._labelPointsHandler);this._relationHandler=_d27(this,this._relationHandler);this._convexHullHandler=_d27(this,this._convexHullHandler);this._unionHandler=_d27(this,this._unionHandler);this._autoCompleteHandler=_d27(this,this._autoCompleteHandler);this._reshapeHandler=_d27(this,this._reshapeHandler);this._cutHandler=_d27(this,this._cutHandler);this._intersectHandler=_d27(this,this._intersectHandler);this._differenceHandler=_d27(this,this._differenceHandler);this._trimExtendHandler=_d27(this,this._trimExtendHandler);this._densifyHandler=_d27(this,this._densifyHandler);this._generalizeHandler=_d27(this,this._densifyHandler);this._offsetHandler=_d27(this,this._offsetHandler);this._distanceHandler=_d27(this,this._distanceHandler);this.registerConnectEvents();},_encodeGeometries:function(_d28){var gs=[],i,il=_d28.length;for(i=0;i<il;i++){gs.push(_d28[i].toJson());}return {geometryType:_d25.getJsonType(_d28[0]),geometries:gs};},_decodeGeometries:function(_d29,_d2a,sr){var _d2b=_d25.getGeometryType(_d2a),_d2c=_d29.geometries,fs=[],_d2d={spatialReference:sr.toJson()},_d2e=lang.mixin;_d1b.forEach(_d2c,function(g,i){fs[i]=new _d2b(_d2e(g,_d2d));});return fs;},_toProjectGeometry:function(_d2f){var sr=_d2f.spatialReference.toJson();if(_d2f instanceof _d21){return new _d23({rings:[[[_d2f.xmin,_d2f.ymin],[_d2f.xmin,_d2f.ymax],[_d2f.xmax,_d2f.ymax],[_d2f.xmax,_d2f.ymin],[_d2f.xmin,_d2f.ymin]]],spatialReference:sr});}else{return new _d22({paths:[[].concat(_d2f.points)],spatialReference:sr});}},_fromProjectedGeometry:function(_d30,_d31,_d32){if(_d31==="esriGeometryEnvelope"){var ring=_d30.rings[0];return new _d21(ring[0][0],ring[0][1],ring[2][0],ring[2][1],_d32);}else{return new _d24({points:_d30.paths[0],spatialReference:_d32.toJson()});}},project:function(_d33,_d34,_d35,_d36){var _d37=lang.mixin({},this._url.query,{f:"json"}),_d38;if(!_d33.geometries){_d38=_d33[0];_d37=lang.mixin(_d37,{outSR:_d34.wkid||_d1c.toJson(_d34.toJson()),inSR:_d38.spatialReference.wkid||_d1c.toJson(_d38.spatialReference.toJson()),geometries:_d1c.toJson(this._encodeGeometries(_d33))});}else{_d36=_d35;_d35=_d34;_d34=_d33.outSR;_d38=_d33.geometries[0];_d37=lang.mixin(_d37,_d33.toJson());}var _d39=_d25.getJsonType(_d38),_d3a=this._projectHandler,_d3b=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/project",content:_d37,callbackParamName:"callback",load:function(r,i){_d3a(r,i,_d39,_d34,_d35,_d36,dfd);},error:function(r){_d3b(r,_d36,dfd);}});return dfd;},_projectHandler:function(_d3c,io,_d3d,_d3e,_d3f,_d40,dfd){try{var fs=this._decodeGeometries(_d3c,_d3d,_d3e);this._successHandler([fs],"onProjectComplete",_d3f,dfd);}catch(err){this._errorHandler(err,_d40,dfd);}},onProjectComplete:function(){},simplify:function(_d41,_d42,_d43){var _d44=_d41[0].spatialReference;var _d45=lang.mixin({},this._url.query,{f:"json",sr:_d44.wkid?_d44.wkid:_d1c.toJson(_d44.toJson()),geometries:_d1c.toJson(this._encodeGeometries(_d41))}),_d46=_d25.getJsonType(_d41[0]),_d47=this._simplifyHandler,_d48=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/simplify",content:_d45,callbackParamName:"callback",load:function(r,i){_d47(r,i,_d46,_d44,_d42,_d43,dfd);},error:function(r){_d48(r,_d43,dfd);}});return dfd;},_simplifyHandler:function(_d49,io,_d4a,sr,_d4b,_d4c,dfd){try{var fs=this._decodeGeometries(_d49,_d4a,sr);this._successHandler([fs],"onSimplifyComplete",_d4b,dfd);}catch(err){this._errorHandler(err,_d4c,dfd);}},onSimplifyComplete:function(){},convexHull:function(_d4d,_d4e,_d4f){var _d50=_d4d[0].spatialReference;var _d51=lang.mixin({},this._url.query,{f:"json",sr:_d1c.toJson(_d50.toJson()),geometries:_d1c.toJson(this._encodeGeometries(_d4d))}),_d52=this._convexHullHandler,_d53=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/convexHull",content:_d51,callbackParamName:"callback",load:function(r,i){_d52(r,i,_d50,_d4e,_d4f,dfd);},error:function(r){_d53(r,_d4f,dfd);}});return dfd;},_convexHullHandler:function(_d54,io,_d55,_d56,_d57,dfd){try{var geom=_d25.fromJson(_d54.geometry).setSpatialReference(_d55);this._successHandler([geom],"onConvexHullComplete",_d56,dfd);}catch(err){this._errorHandler(err,_d57,dfd);}},onConvexHullComplete:function(){},union:function(_d58,_d59,_d5a){var _d5b=_d58[0].spatialReference;var _d5c=lang.mixin({},this._url.query,{f:"json",sr:_d1c.toJson(_d5b.toJson()),geometries:_d1c.toJson(this._encodeGeometries(_d58))}),_d5d=this._unionHandler,_d5e=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/union",content:_d5c,callbackParamName:"callback",load:function(r,i){_d5d(r,i,_d5b,_d59,_d5a,dfd);},error:function(r){_d5e(r,_d5a,dfd);}});return dfd;},_unionHandler:function(_d5f,io,_d60,_d61,_d62,dfd){try{var geom=_d25.fromJson(_d5f.geometry).setSpatialReference(_d60);this._successHandler([geom],"onUnionComplete",_d61,dfd);}catch(err){this._errorHandler(err,_d62,dfd);}},onUnionComplete:function(){},autoComplete:function(_d63,_d64,_d65,_d66){var _d67=_d63[0].spatialReference;var _d68=lang.mixin({},this._url.query,{f:"json",sr:_d1c.toJson(_d67.toJson()),polygons:_d1c.toJson(this._encodeGeometries(_d63).geometries),polylines:_d1c.toJson(this._encodeGeometries(_d64).geometries)}),_d69=this._autoCompleteHandler,_d6a=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/autoComplete",content:_d68,callbackParamName:"callback",load:function(r,i){_d69(r,i,_d67,_d65,_d66,dfd);},error:function(r){_d6a(r,_d66,dfd);}});return dfd;},_autoCompleteHandler:function(_d6b,io,_d6c,_d6d,_d6e,dfd){try{var _d6f=_d6b.geometries,_d70=[],i,il=_d6f.length;for(i=0;i<il;i++){_d70[i]=new _d23({spatialReference:_d6c,rings:_d6f[i].rings});}this._successHandler([_d70],"onAutoCompleteComplete",_d6d,dfd);}catch(err){this._errorHandler(err,_d6e,dfd);}},onAutoCompleteComplete:function(){},reshape:function(_d71,_d72,_d73,_d74){var _d75=_d71.spatialReference;var _d76=lang.mixin({},this._url.query,{f:"json",sr:_d1c.toJson(_d75.toJson()),target:_d1c.toJson({geometryType:_d25.getJsonType(_d71),geometry:_d71.toJson()}),reshaper:_d1c.toJson(_d72.toJson())}),_d77=this._reshapeHandler,_d78=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/reshape",content:_d76,callbackParamName:"callback",load:function(r,i){_d77(r,i,_d75,_d73,_d74,dfd);},error:function(r){_d78(r,_d74,dfd);}});return dfd;},_reshapeHandler:function(_d79,io,_d7a,_d7b,_d7c,dfd){try{var geom=_d25.fromJson(_d79.geometry).setSpatialReference(_d7a);this._successHandler([geom],"onReshapeComplete",_d7b,dfd);}catch(err){this._errorHandler(err,_d7c,dfd);}},onReshapeComplete:function(){},cut:function(_d7d,_d7e,_d7f,_d80){var _d81=_d7d[0].spatialReference;var _d82=_d1b.map(_d7d,function(_d83){return _d83.toJson();});var _d84=lang.mixin({},this._url.query,{f:"json",sr:_d1c.toJson(_d81.toJson()),target:_d1c.toJson({geometryType:_d25.getJsonType(_d7d[0]),geometries:_d82}),cutter:_d1c.toJson(_d7e.toJson())}),_d85=this._cutHandler,_d86=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/cut",content:_d84,callbackParamName:"callback",load:function(r,i){_d85(r,i,_d81,_d7f,_d80,dfd);},error:function(r){_d86(r,_d80,dfd);}});return dfd;},_cutHandler:function(_d87,io,_d88,_d89,_d8a,dfd){try{var _d8b=_d87.geometries;var _d8c={};_d8c.cutIndexes=_d87.cutIndexes;_d8c.geometries=[];_d1b.forEach(_d8b,function(geom){_d8c.geometries.push(_d25.fromJson(geom).setSpatialReference(_d88));});this._successHandler([_d8c],"onCutComplete",_d89,dfd);}catch(err){this._errorHandler(err,_d8a,dfd);}},onCutComplete:function(){},intersect:function(_d8d,_d8e,_d8f,_d90){var _d91=_d8d[0].spatialReference;var _d92=lang.mixin({},this._url.query,{f:"json",sr:_d1c.toJson(_d91.toJson()),geometries:_d1c.toJson(this._encodeGeometries(_d8d)),geometry:_d1c.toJson({geometryType:_d25.getJsonType(_d8e),geometry:_d8e.toJson()})}),_d93=this._intersectHandler,_d94=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/intersect",content:_d92,callbackParamName:"callback",load:function(r,i){_d93(r,i,_d91,_d8f,_d90,dfd);},error:function(r){_d94(r,_d90,dfd);}});return dfd;},_intersectHandler:function(_d95,io,_d96,_d97,_d98,dfd){try{var _d99=_d95.geometries,_d9a=[];_d1b.forEach(_d99,function(geom){_d9a.push(_d25.fromJson(geom).setSpatialReference(_d96));});this._successHandler([_d9a],"onIntersectComplete",_d97,dfd);}catch(err){this._errorHandler(err,_d98,dfd);}},onIntersectComplete:function(){},difference:function(_d9b,_d9c,_d9d,_d9e){var _d9f=_d9b[0].spatialReference;var _da0=lang.mixin({},this._url.query,{f:"json",sr:_d1c.toJson(_d9f.toJson()),geometries:_d1c.toJson(this._encodeGeometries(_d9b)),geometry:_d1c.toJson({geometryType:_d25.getJsonType(_d9c),geometry:_d9c.toJson()})}),_da1=this._differenceHandler,_da2=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/difference",content:_da0,callbackParamName:"callback",load:function(r,i){_da1(r,i,_d9f,_d9d,_d9e,dfd);},error:function(r){_da2(r,_d9e,dfd);}});return dfd;},_differenceHandler:function(_da3,io,_da4,_da5,_da6,dfd){try{var _da7=_da3.geometries,_da8=[];_d1b.forEach(_da7,function(geom){_da8.push(_d25.fromJson(geom).setSpatialReference(_da4));});this._successHandler([_da8],"onDifferenceComplete",_da5,dfd);}catch(err){this._errorHandler(err,_da6,dfd);}},onDifferenceComplete:function(){},buffer:function(_da9,_daa,_dab){var _dac=lang.mixin({},this._url.query,{f:"json"},_da9.toJson()),sr=_da9.outSpatialReference||_da9.geometries[0].spatialReference,_dad=this._bufferHandler,_dae=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/buffer",content:_dac,callbackParamName:"callback",load:function(r,i){_dad(r,i,sr,_daa,_dab,dfd);},error:function(r){_dae(r,_dab,dfd);}});return dfd;},_bufferHandler:function(_daf,io,sr,_db0,_db1,dfd){try{var _db2=_daf.geometries,_db3=[],i,il=_db2.length;for(i=0;i<il;i++){_db3[i]=new _d23({spatialReference:sr,rings:_db2[i].rings});}this._successHandler([_db3],"onBufferComplete",_db0,dfd);}catch(err){this._errorHandler(err,_db1,dfd);}},onBufferComplete:function(){},areasAndLengths:function(_db4,_db5,_db6){var _db7=lang.mixin({},this._url.query,{f:"json"},_db4.toJson()),_db8=this._areasAndLengthsHandler,_db9=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/areasAndLengths",content:_db7,callbackParamName:"callback",load:function(r,i){_db8(r,i,_db5,_db6,dfd);},error:function(r){_db9(r,_db6,dfd);}});return dfd;},_areasAndLengthsHandler:function(_dba,io,_dbb,_dbc,dfd){try{this._successHandler([_dba],"onAreasAndLengthsComplete",_dbb,dfd);}catch(err){this._errorHandler(err,_dbc,dfd);}},onAreasAndLengthsComplete:function(){},lengths:function(_dbd,_dbe,_dbf){var _dc0=lang.mixin({},this._url.query,{f:"json"},_dbd.toJson()),_dc1=this._lengthsHandler,_dc2=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/lengths",content:_dc0,callbackParamName:"callback",load:function(r,i){_dc1(r,i,_dbe,_dbf,dfd);},error:function(r){_dc2(r,_dbf,dfd);}});return dfd;},_lengthsHandler:function(_dc3,io,_dc4,_dc5,dfd){try{this._successHandler([_dc3],"onLengthsComplete",_dc4,dfd);}catch(err){this._errorHandler(err,_dc5,dfd);}},onLengthsComplete:function(){},labelPoints:function(_dc6,_dc7,_dc8){var _dc9=_d1b.map(_dc6,function(geom){return geom.toJson();});var sr=_dc6[0].spatialReference,_dca=lang.mixin({},this._url.query,{f:"json",sr:sr.wkid?sr.wkid:_d1c.toJson(sr.toJson()),polygons:_d1c.toJson(_dc9)}),_dcb=this._labelPointsHandler,_dcc=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/labelPoints",content:_dca,callbackParamName:"callback",load:function(r,i){_dcb(r,i,_dc6,sr,_dc7,_dc8,dfd);},error:function(r){_dcc(r,_dc8,dfd);}});return dfd;},_labelPointsHandler:function(_dcd,io,_dce,sr,_dcf,_dd0,dfd){try{var _dd1=_dcd.labelPoints,_dd2=[];_d1b.forEach(_dd1,function(geom){_dd2.push(_d25.fromJson(geom).setSpatialReference(sr));});this._successHandler([_dd2],"onLabelPointsComplete",_dcf,dfd);}catch(err){this._errorHandler(err,_dd0,dfd);}},onLabelPointsComplete:function(){},relation:function(_dd3,_dd4,_dd5){var _dd6=lang.mixin({},this._url.query,{f:"json"},_dd3.toJson()),_dd7=this._relationHandler,_dd8=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/relation",content:_dd6,callbackParamName:"callback",load:function(r,i){_dd7(r,i,_dd4,_dd5,dfd);},error:function(r){_dd8(r,_dd5,dfd);}});return dfd;},_relationHandler:function(_dd9,io,_dda,_ddb,dfd){try{var _ddc=_dd9.relations;this._successHandler([_ddc],"onRelationComplete",_dda,dfd);}catch(err){this._errorHandler(err,_ddb,dfd);}},onRelationComplete:function(){},trimExtend:function(_ddd,_dde,_ddf){var _de0=lang.mixin({},this._url.query,{f:"json"},_ddd.toJson()),_de1=_ddd.sr,_de2=this._trimExtendHandler,_de3=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/trimExtend",content:_de0,callbackParamName:"callback",load:function(r,i){_de2(r,i,_de1,_dde,_ddf,dfd);},error:function(r){_de3(r,_ddf,dfd);}});return dfd;},_trimExtendHandler:function(_de4,io,_de5,_de6,_de7,dfd){try{var _de8=_de4.geometries,_de9=[],i,il=_de8.length;for(i=0;i<il;i++){_de9[i]=new _d22({spatialReference:_de5,paths:_de8[i].paths});}this._successHandler([_de9],"onTrimExtendComplete",_de6,dfd);}catch(err){this._errorHandler(err,_de7,dfd);}},onTrimExtendComplete:function(){},densify:function(_dea,_deb,_dec){var _ded=lang.mixin({},this._url.query,{f:"json"},_dea.toJson()),_dee=_dea.geometries[0].spatialReference,_def=this._densifyHandler,_df0=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/densify",content:_ded,callbackParamName:"callback",load:function(r,i){_def(r,i,_dee,_deb,_dec,dfd);},error:function(r){_df0(r,_dec,dfd);}});return dfd;},_densifyHandler:function(_df1,io,_df2,_df3,_df4,dfd){try{var _df5=_df1.geometries,_df6=[];_d1b.forEach(_df5,function(geom){_df6.push(_d25.fromJson(geom).setSpatialReference(_df2));});this._successHandler([_df6],"onDensifyComplete",_df3,dfd);}catch(err){this._errorHandler(err,_df4,dfd);}},onDensifyComplete:function(){},generalize:function(_df7,_df8,_df9){var _dfa=lang.mixin({},this._url.query,{f:"json"},_df7.toJson()),_dfb=_df7.geometries[0].spatialReference,_dfc=this._generalizeHandler,_dfd=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/generalize",content:_dfa,callbackParamName:"callback",load:function(r,i){_dfc(r,i,_dfb,_df8,_df9,dfd);},error:function(r){_dfd(r,_df9,dfd);}});return dfd;},_generalizeHandler:function(_dfe,io,_dff,_e00,_e01,dfd){try{var _e02=_dfe.geometries,_e03=[];_d1b.forEach(_e02,function(geom){_e03.push(_d25.fromJson(geom).setSpatialReference(_dff));});this._successHandler([_e03],"onGeneralizeComplete",_e00,dfd);}catch(err){this._errorHandler(err,_e01,dfd);}},onGeneralizeComplete:function(){},offset:function(_e04,_e05,_e06){var _e07=lang.mixin({},this._url.query,{f:"json"},_e04.toJson()),_e08=_e04.geometries[0].spatialReference,_e09=this._offsetHandler,_e0a=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/offset",content:_e07,callbackParamName:"callback",load:function(r,i){_e09(r,i,_e08,_e05,_e06,dfd);},error:function(r){_e0a(r,_e06,dfd);}});return dfd;},_offsetHandler:function(_e0b,io,_e0c,_e0d,_e0e,dfd){try{var _e0f=_e0b.geometries,_e10=[];_d1b.forEach(_e0f,function(geom){_e10.push(_d25.fromJson(geom).setSpatialReference(_e0c));});this._successHandler([_e10],"onOffsetComplete",_e0d,dfd);}catch(err){this._errorHandler(err,_e0e,dfd);}},onOffsetComplete:function(){},distance:function(_e11,_e12,_e13){var _e14=lang.mixin({},this._url.query,{f:"json"},_e11.toJson()),_e15=_e11.geometry1.spatialReference,_e16=this._distanceHandler,_e17=this._errorHandler,dfd=new _d1d(_d20._dfdCanceller);dfd._pendingDfd=_d1f({url:this._url.path+"/distance",content:_e14,callbackParamName:"callback",load:function(r,i){_e16(r,i,_e15,_e12,_e13,dfd);},error:function(r){_e17(r,_e13,dfd);}});return dfd;},_distanceHandler:function(_e18,io,_e19,_e1a,_e1b,dfd){try{_e18=_e18&&_e18.distance;this._successHandler([_e18],"onDistanceComplete",_e1a,dfd);}catch(err){this._errorHandler(err,_e1b,dfd);}},onDistanceComplete:function(){}});lang.mixin(_d26,{UNIT_METER:9001,UNIT_GERMAN_METER:9031,UNIT_FOOT:9002,UNIT_SURVEY_FOOT:9003,UNIT_CLARKE_FOOT:9005,UNIT_FATHOM:9014,UNIT_NAUTICAL_MILE:9030,UNIT_SURVEY_CHAIN:9033,UNIT_SURVEY_LINK:9034,UNIT_SURVEY_MILE:9035,UNIT_KILOMETER:9036,UNIT_CLARKE_YARD:9037,UNIT_CLARKE_CHAIN:9038,UNIT_CLARKE_LINK:9039,UNIT_SEARS_YARD:9040,UNIT_SEARS_FOOT:9041,UNIT_SEARS_CHAIN:9042,UNIT_SEARS_LINK:9043,UNIT_BENOIT_1895A_YARD:9050,UNIT_BENOIT_1895A_FOOT:9051,UNIT_BENOIT_1895A_CHAIN:9052,UNIT_BENOIT_1895A_LINK:9053,UNIT_BENOIT_1895B_YARD:9060,UNIT_BENOIT_1895B_FOOT:9061,UNIT_BENOIT_1895B_CHAIN:9062,UNIT_BENOIT_1895B_LINK:9063,UNIT_INDIAN_FOOT:9080,UNIT_INDIAN_1937_FOOT:9081,UNIT_INDIAN_1962_FOOT:9082,UNIT_INDIAN_1975_FOOT:9083,UNIT_INDIAN_YARD:9084,UNIT_INDIAN_1937_YARD:9085,UNIT_INDIAN_1962_YARD:9086,UNIT_INDIAN_1975_YARD:9087,UNIT_FOOT_1865:9070,UNIT_RADIAN:9101,UNIT_DEGREE:9102,UNIT_ARCMINUTE:9103,UNIT_ARCSECOND:9104,UNIT_GRAD:9105,UNIT_GON:9106,UNIT_MICRORADIAN:9109,UNIT_ARCMINUTE_CENTESIMAL:9112,UNIT_ARCSECOND_CENTESIMAL:9113,UNIT_MIL6400:9114,UNIT_BRITISH_1936_FOOT:9095,UNIT_GOLDCOAST_FOOT:9094,UNIT_INTERNATIONAL_CHAIN:109003,UNIT_INTERNATIONAL_LINK:109004,UNIT_INTERNATIONAL_YARD:109001,UNIT_STATUTE_MILE:9093,UNIT_SURVEY_YARD:109002,UNIT_50KILOMETER_LENGTH:109030,UNIT_150KILOMETER_LENGTH:109031,UNIT_DECIMETER:109005,UNIT_CENTIMETER:109006,UNIT_MILLIMETER:109007,UNIT_INTERNATIONAL_INCH:109008,UNIT_US_SURVEY_INCH:109009,UNIT_INTERNATIONAL_ROD:109010,UNIT_US_SURVEY_ROD:109011,UNIT_US_NAUTICAL_MILE:109012,UNIT_UK_NAUTICAL_MILE:109013,UNIT_SQUARE_INCHES:"esriSquareInches",UNIT_SQUARE_FEET:"esriSquareFeet",UNIT_SQUARE_YARDS:"esriSquareYards",UNIT_ACRES:"esriAcres",UNIT_SQUARE_MILES:"esriSquareMiles",UNIT_SQUARE_MILLIMETERS:"esriSquareMillimeters",UNIT_SQUARE_CENTIMETERS:"esriSquareCentimeters",UNIT_SQUARE_DECIMETERS:"esriSquareDecimeters",UNIT_SQUARE_METERS:"esriSquareMeters",UNIT_ARES:"esriAres",UNIT_HECTARES:"esriHectares",UNIT_SQUARE_KILOMETERS:"esriSquareKilometers"});if(has("extend-esri")){lang.setObject("tasks.GeometryService",_d26,_d1e);}return _d26;});},"url:dijit/form/templates/ValidationTextBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\" role=\"presentation\"\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class=\"dijitReset dijitInputInner\" data-dojo-attach-point='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${!nameAttrSetting} type='${type}'\n\t/></div\n></div>\n","esri/tasks/GeneralizeParameters":function(){define("esri/tasks/GeneralizeParameters",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel","esri/geometry/jsonUtils"],function(_e1c,lang,_e1d,_e1e,has,_e1f,_e20){var _e21=_e1c(null,{declaredClass:"esri.tasks.GeneralizeParameters",geometries:null,deviationUnit:null,maxDeviation:null,toJson:function(){var _e22=_e1d.map(this.geometries,function(geom){return geom.toJson();});var json={};if(this.geometries&&this.geometries.length>0){json.geometries=_e1e.toJson({geometryType:_e20.getJsonType(this.geometries[0]),geometries:_e22});json.sr=_e1e.toJson(this.geometries[0].spatialReference.toJson());}if(this.deviationUnit){json.deviationUnit=this.deviationUnit;}if(this.maxDeviation){json.maxDeviation=this.maxDeviation;}return json;}});if(has("extend-esri")){lang.setObject("tasks.GeneralizeParameters",_e21,_e1f);}return _e21;});},"esri/layers/FeatureType":function(){define("esri/layers/FeatureType",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","esri/kernel","esri/lang","esri/symbols/jsonUtils","esri/layers/RangeDomain","esri/layers/CodedValueDomain","esri/layers/InheritedDomain","esri/layers/FeatureTemplate"],function(_e23,lang,_e24,has,_e25,_e26,_e27,_e28,_e29,_e2a,_e2b){var _e2c=_e23(null,{declaredClass:"esri.layers.FeatureType",constructor:function(json){if(json&&lang.isObject(json)){this.id=json.id;this.name=json.name;var _e2d=json.symbol;if(_e2d){this.symbol=_e27.fromJson(_e2d);}var _e2e=json.domains,_e2f,i;var _e30=this.domains={};for(_e2f in _e2e){if(_e2e.hasOwnProperty(_e2f)){var _e31=_e2e[_e2f];switch(_e31.type){case "range":_e30[_e2f]=new _e28(_e31);break;case "codedValue":_e30[_e2f]=new _e29(_e31);break;case "inherited":_e30[_e2f]=new _e2a(_e31);break;}}}var _e32=json.templates;if(_e32){var _e33=this.templates=[];for(i=0;i<_e32.length;i++){_e33.push(new _e2b(_e32[i]));}}}},toJson:function(){var json={id:this.id,name:this.name,symbol:this.symbol&&this.symbol.toJson()};var _e34,_e35=this.domains,_e36=this.templates,_e37=_e26.fixJson;if(_e35){var _e38=json.domains={};for(_e34 in _e35){if(_e35.hasOwnProperty(_e34)){_e38[_e34]=_e35[_e34]&&_e35[_e34].toJson();}}_e37(_e38);}if(_e36){json.templates=_e24.map(_e36,function(_e39){return _e39.toJson();});}return _e37(json);}});if(has("extend-esri")){lang.setObject("layers.FeatureType",_e2c,_e25);}return _e2c;});},"url:dijit/form/templates/TextBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\" id=\"widget_${id}\" role=\"presentation\"\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class=\"dijitReset dijitInputInner\" data-dojo-attach-point='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${!nameAttrSetting} type='${type}'\n\t/></div\n></div>\n","dijit/_Contained":function(){define("dijit/_Contained",["dojo/_base/declare","./registry"],function(_e3a,_e3b){return _e3a("dijit._Contained",null,{_getSibling:function(_e3c){var node=this.domNode;do{node=node[_e3c+"Sibling"];}while(node&&node.nodeType!=1);return node&&_e3b.byNode(node);},getPreviousSibling:function(){return this._getSibling("previous");},getNextSibling:function(){return this._getSibling("next");},getIndexInParent:function(){var p=this.getParent();if(!p||!p.getIndexOfChild){return -1;}return p.getIndexOfChild(this);}});});},"dijit/_KeyNavContainer":function(){define("dijit/_KeyNavContainer",["dojo/_base/kernel","./_Container","./_FocusMixin","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/_base/event","dojo/dom-attr","dojo/_base/lang"],function(_e3d,_e3e,_e3f,_e40,keys,_e41,_e42,_e43,lang){return _e41("dijit._KeyNavContainer",[_e3f,_e3e],{tabIndex:"0",connectKeyNavHandlers:function(_e44,_e45){var _e46=(this._keyNavCodes={});var prev=lang.hitch(this,"focusPrev");var next=lang.hitch(this,"focusNext");_e40.forEach(_e44,function(code){_e46[code]=prev;});_e40.forEach(_e45,function(code){_e46[code]=next;});_e46[keys.HOME]=lang.hitch(this,"focusFirstChild");_e46[keys.END]=lang.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");this.connect(this.domNode,"onfocus","_onContainerFocus");},startupKeyNavChildren:function(){_e3d.deprecated("startupKeyNavChildren() call no longer needed","","2.0");},startup:function(){this.inherited(arguments);_e40.forEach(this.getChildren(),lang.hitch(this,"_startupChild"));},addChild:function(_e47,_e48){this.inherited(arguments);this._startupChild(_e47);},focus:function(){this.focusFirstChild();},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild());},focusLastChild:function(){this.focusChild(this._getLastFocusableChild());},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,1));},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),true);},focusChild:function(_e49,last){if(!_e49){return;}if(this.focusedChild&&_e49!==this.focusedChild){this._onChildBlur(this.focusedChild);}_e49.set("tabIndex",this.tabIndex);_e49.focus(last?"end":"start");this._set("focusedChild",_e49);},_startupChild:function(_e4a){_e4a.set("tabIndex","-1");this.connect(_e4a,"_onFocus",function(){_e4a.set("tabIndex",this.tabIndex);});this.connect(_e4a,"_onBlur",function(){_e4a.set("tabIndex","-1");});},_onContainerFocus:function(evt){if(evt.target!==this.domNode||this.focusedChild){return;}this.focusFirstChild();_e43.set(this.domNode,"tabIndex","-1");},_onBlur:function(evt){if(this.tabIndex){_e43.set(this.domNode,"tabIndex",this.tabIndex);}this.focusedChild=null;this.inherited(arguments);},_onContainerKeypress:function(evt){if(evt.ctrlKey||evt.altKey){return;}var func=this._keyNavCodes[evt.charOrCode];if(func){func();_e42.stop(evt);}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1);},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1);},_getNextFocusableChild:function(_e4b,dir){if(_e4b){_e4b=this._getSiblingOfChild(_e4b,dir);}var _e4c=this.getChildren();for(var i=0;i<_e4c.length;i++){if(!_e4b){_e4b=_e4c[(dir>0)?0:(_e4c.length-1)];}if(_e4b.isFocusable()){return _e4b;}_e4b=this._getSiblingOfChild(_e4b,dir);}return null;}});});},"esri/tasks/Task":function(){define("esri/tasks/Task",["dojo/_base/declare","dojo/_base/lang","dojo/_base/json","dojo/has","esri/kernel","esri/deferredUtils","esri/urlUtils","esri/Evented"],function(_e4d,lang,_e4e,has,_e4f,_e50,_e51,_e52){var Task=_e4d(_e52,{declaredClass:"esri.tasks._Task",_eventMap:{"error":["error"],"complete":["result"]},constructor:function(url){if(url&&lang.isString(url)){this._url=_e51.urlToObject(this.url=url);}this.normalization=true;this._errorHandler=lang.hitch(this,this._errorHandler);this.registerConnectEvents();},_useSSL:function(){var _e53=this._url,re=/^http:/i,rep="https:";if(this.url){this.url=this.url.replace(re,rep);}if(_e53&&_e53.path){_e53.path=_e53.path.replace(re,rep);}},_encode:function(_e54,_e55,_e56){var _e57,type,_e58={},i,p,pl;for(i in _e54){if(i==="declaredClass"){continue;}_e57=_e54[i];type=typeof _e57;if(_e57!==null&&_e57!==undefined&&type!=="function"){if(lang.isArray(_e57)){_e58[i]=[];pl=_e57.length;for(p=0;p<pl;p++){_e58[i][p]=this._encode(_e57[p]);}}else{if(type==="object"){if(_e57.toJson){var json=_e57.toJson(_e56&&_e56[i]);if(_e57.declaredClass==="esri.tasks.FeatureSet"){if(json.spatialReference){json.sr=json.spatialReference;delete json.spatialReference;}}_e58[i]=_e55?json:_e4e.toJson(json);}}else{_e58[i]=_e57;}}}}return _e58;},_successHandler:function(args,_e59,_e5a,dfd){if(_e59){this[_e59].apply(this,args);}if(_e5a){_e5a.apply(null,args);}if(dfd){_e50._resDfd(dfd,args);}},_errorHandler:function(err,_e5b,dfd){this.onError(err);if(_e5b){_e5b(err);}if(dfd){dfd.errback(err);}},setNormalization:function(_e5c){this.normalization=_e5c;},onError:function(){}});if(has("extend-esri")){_e4f.Task=Task;}return Task;});},"dijit/form/DataList":function(){define("dijit/form/DataList",["dojo/_base/declare","dojo/dom","dojo/_base/lang","dojo/query","dojo/store/Memory","../registry"],function(_e5d,dom,lang,_e5e,_e5f,_e60){function _e61(_e62){return {id:_e62.value,value:_e62.value,name:lang.trim(_e62.innerText||_e62.textContent||"")};};return _e5d("dijit.form.DataList",_e5f,{constructor:function(_e63,_e64){this.domNode=dom.byId(_e64);lang.mixin(this,_e63);if(this.id){_e60.add(this);}this.domNode.style.display="none";this.inherited(arguments,[{data:_e5e("option",this.domNode).map(_e61)}]);},destroy:function(){_e60.remove(this.id);},fetchSelectedItem:function(){var _e65=_e5e("> option[selected]",this.domNode)[0]||_e5e("> option",this.domNode)[0];return _e65&&_e61(_e65);}});});},"dijit/_editor/_Plugin":function(){define("dijit/_editor/_Plugin",["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../form/Button"],function(_e66,_e67,lang,_e68){var _e69=_e67("dijit._editor._Plugin",null,{constructor:function(args){this.params=args||{};lang.mixin(this,this.params);this._connects=[];this._attrPairNames={};},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:true,buttonClass:_e68,disabled:false,getLabel:function(key){return this.editor.commands[key];},_initButton:function(){if(this.command.length){var _e6a=this.getLabel(this.command),_e6b=this.editor,_e6c=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);if(!this.button){var _e6d=lang.mixin({label:_e6a,ownerDocument:_e6b.ownerDocument,dir:_e6b.dir,lang:_e6b.lang,showLabel:false,iconClass:_e6c,dropDown:this.dropDown,tabIndex:"-1"},this.params||{});this.button=new this.buttonClass(_e6d);}}if(this.get("disabled")&&this.button){this.button.set("disabled",this.get("disabled"));}},destroy:function(){var h;while(h=this._connects.pop()){h.remove();}if(this.dropDown){this.dropDown.destroyRecursive();}},connect:function(o,f,tf){this._connects.push(_e66.connect(o,f,this,tf));},updateState:function(){var e=this.editor,c=this.command,_e6e,_e6f;if(!e||!e.isLoaded||!c.length){return;}var _e70=this.get("disabled");if(this.button){try{_e6f=!_e70&&e.queryCommandEnabled(c);if(this.enabled!==_e6f){this.enabled=_e6f;this.button.set("disabled",!_e6f);}if(_e6f){if(typeof this.button.checked=="boolean"){_e6e=e.queryCommandState(c);if(this.checked!==_e6e){this.checked=_e6e;this.button.set("checked",e.queryCommandState(c));}}}}catch(e){console.log(e);}}},setEditor:function(_e71){this.editor=_e71;this._initButton();if(this.button&&this.useDefaultCommand){if(this.editor.queryCommandAvailable(this.command)){this.connect(this.button,"onClick",lang.hitch(this.editor,"execCommand",this.command,this.commandArg));}else{this.button.domNode.style.display="none";}}this.connect(this.editor,"onNormalizedDisplayChanged","updateState");},setToolbar:function(_e72){if(this.button){_e72.addChild(this.button);}},set:function(name,_e73){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _e74=this._getAttrNames(name);if(this[_e74.s]){var _e75=this[_e74.s].apply(this,Array.prototype.slice.call(arguments,1));}else{this._set(name,_e73);}return _e75||this;},get:function(name){var _e76=this._getAttrNames(name);return this[_e76.g]?this[_e76.g]():this[name];},_setDisabledAttr:function(_e77){this.disabled=_e77;this.updateState();},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return (apn[name]={s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},_set:function(name,_e78){this[name]=_e78;}});_e69.registry={};return _e69;});},"esri/tasks/SpatialRelationship":function(){define("esri/tasks/SpatialRelationship",["dojo/_base/lang","dojo/has","esri/kernel"],function(lang,has,_e79){var _e7a={SPATIAL_REL_INTERSECTS:"esriSpatialRelIntersects",SPATIAL_REL_CONTAINS:"esriSpatialRelContains",SPATIAL_REL_CROSSES:"esriSpatialRelCrosses",SPATIAL_REL_ENVELOPEINTERSECTS:"esriSpatialRelEnvelopeIntersects",SPATIAL_REL_INDEXINTERSECTS:"esriSpatialRelIndexIntersects",SPATIAL_REL_OVERLAPS:"esriSpatialRelOverlaps",SPATIAL_REL_TOUCHES:"esriSpatialRelTouches",SPATIAL_REL_WITHIN:"esriSpatialRelWithin",SPATIAL_REL_RELATION:"esriSpatialRelRelation"};if(has("extend-esri")){lang.setObject("tasks._SpatialRelationship",_e7a,_e79);}return _e7a;});},"esri/dijit/editing/tools/EditingTools":function(){define(["dojo/_base/lang","dojo/has","esri/toolbars/draw","esri/kernel"],function(lang,has,Draw,_e7b){var _e7c={point:{id:"esriPointTool",_enabledIcon:"toolbarIcon pointIcon",_disabledIcon:"toolbarIcon pointIconDisabled",_drawType:Draw.POINT,_geomType:"esriGeometryPoint",_label:"NLS_pointLbl"},polyline:{id:"toolDrawFreehandPolyline",_enabledIcon:"toolbarIcon polylineIcon",_disabledIcon:"toolbarIcon polylineIconDisabled",_drawType:Draw.POLYLINE,_geomType:"esriGeometryPolyline",_label:"NLS_polylineLbl"},freehandpolyline:{id:"toolDrawPolyline",_enabledIcon:"toolbarIcon freehandPolylineIcon",_disabledIcon:"toolbarIcon freehandPolylineIcon",_drawType:Draw.FREEHAND_POLYLINE,_geomType:"esriGeometryPolyline",_label:"NLS_freehandPolylineLbl"},polygon:{id:"toolDrawPolygon",_enabledIcon:"toolbarIcon polygonIcon",_disabledIcon:"toolbarIcon polygonIconDisabled",_drawType:Draw.POLYGON,_geomType:"esriGeometryPolygon",_label:"NLS_polygonLbl"},freehandpolygon:{id:"toolDrawFreehandPolygon",_enabledIcon:"toolbarIcon freehandPolygonIcon",_disabledIcon:"toolbarIcon freehandPolygonIconDisabled",_drawType:Draw.FREEHAND_POLYGON,_label:"NLS_freehandPolygonLbl",_geomType:"esriGeometryPolygon"},autocomplete:{id:"btnFeatureAutoComplete",_enabledIcon:"toolbarIcon autoCompleteIcon",_disabledIcon:"toolbarIcon autoCompleteIcon",_drawType:Draw.POLYGON,_label:"NLS_autoCompleteLbl",_geomType:"esriGeometryPolygon"},rectangle:{id:"toolDrawRect",_enabledIcon:"toolbarIcon rectangleIcon",_disabledIcon:"toolbarIcon rectangleIcon",_drawType:Draw.RECTANGLE,_geomType:"esriGeometryPolygon",_label:"NLS_rectangleLbl"},arrow:{id:"toolDrawArrow",_enabledIcon:"toolbarIcon arrowIcon",_disabledIcon:"toolbarIcon arrowIcon",_drawType:Draw.ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowLbl"},uparrow:{id:"toolDrawArrowUp",_enabledIcon:"toolbarIcon arrowUpIcon",_disabledIcon:"toolbarIcon arrowUpIcon",_drawType:Draw.UP_ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowUpLbl"},downarrow:{id:"toolDrawDownArrow",_enabledIcon:"toolbarIcon arrowDownIcon",_disabledIcon:"toolbarIcon arrowDownIcon",_drawType:Draw.DOWN_ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowDownLbl"},leftarrow:{id:"toolDrawLeftArrow",_enabledIcon:"toolbarIcon arrowLeftIcon",_disabledIcon:"toolbarIcon arrowLeftIcon",_drawType:Draw.LEFT_ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowLeftLbl"},rightarrow:{id:"toolDrawRightArrow",_enabledIcon:"toolbarIcon arrowIcon",_disabledIcon:"toolbarIcon arrowIcon",_drawType:Draw.RIGHT_ARROW,_geomType:"esriGeometryPolygon",_label:"NLS_arrowRightLbl"},circle:{id:"toolDrawCircle",_enabledIcon:"toolbarIcon circleIcon",_disabledIcon:"toolbarIcon circleIcon",_drawType:Draw.CIRCLE,_geomType:"esriGeometryPolygon",_label:"NLS_circleLbl"},ellipse:{id:"toolDrawEllipse",_enabledIcon:"toolbarIcon ellipseIcon",_disabledIcon:"toolbarIcon ellipseIcon",_drawType:Draw.ELLIPSE,_geomType:"esriGeometryPolygon",_label:"NLS_ellipseLbl"},triangle:{id:"toolDrawTriangle",_enabledIcon:"toolbarIcon triangleIcon",_disabledIcon:"toolbarIcon triangleIcon",_drawType:Draw.TRIANGLE,_geomType:"esriGeometryPolygon",_label:"NLS_triangleLbl"},attributes:{id:"btnAttributes",_enabledIcon:"toolbarIcon attributesIcon",_disabledIcon:"toolbarIcon attributesIcon",_enabled:false,_label:"NLS_attributesLbl"},del:{id:"btnDelete2",_enabledIcon:"toolbarIcon deleteFeatureIcon",_disabledIcon:"toolbarIcon deleteFeatureIcon",_enabled:false,_label:"NLS_deleteLbl"},undo:{id:"btnUndo",_enabledIcon:"dijitEditorIcon dijitEditorIconUndo",_disabledIcon:"dijitEditorIcon dijitEditorIconUndo",_enabled:false,_label:"NLS_undoLbl"},redo:{id:"btnRedo",_enabledIcon:"dijitEditorIcon dijitEditorIconRedo",_disabledIcon:"dijitEditorIcon dijitEditorIconRedo",_enabled:false,_label:"NLS_redoLbl"}};if(has("extend-esri")){lang.setObject("dijit.editing.tools.EditingTools",_e7c,_e7b);}return _e7c;});},"dijit/_Container":function(){define("dijit/_Container",["dojo/_base/array","dojo/_base/declare","dojo/dom-construct"],function(_e7d,_e7e,_e7f){return _e7e("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}},addChild:function(_e80,_e81){var _e82=this.containerNode;if(_e81&&typeof _e81=="number"){var _e83=this.getChildren();if(_e83&&_e83.length>=_e81){_e82=_e83[_e81-1].domNode;_e81="after";}}_e7f.place(_e80.domNode,_e82,_e81);if(this._started&&!_e80._started){_e80.startup();}},removeChild:function(_e84){if(typeof _e84=="number"){_e84=this.getChildren()[_e84];}if(_e84){var node=_e84.domNode;if(node&&node.parentNode){node.parentNode.removeChild(node);}}},hasChildren:function(){return this.getChildren().length>0;},_getSiblingOfChild:function(_e85,dir){var _e86=this.getChildren(),idx=_e7d.indexOf(this.getChildren(),_e85);return _e86[idx+dir];},getIndexOfChild:function(_e87){return _e7d.indexOf(this.getChildren(),_e87);}});});},"dojo/data/ItemFileReadStore":function(){define(["../_base/kernel","../_base/lang","../_base/declare","../_base/array","../_base/xhr","../Evented","./util/filter","./util/simpleFetch","../date/stamp"],function(_e88,lang,_e89,_e8a,xhr,_e8b,_e8c,_e8d,_e8e){var _e8f=_e89("dojo.data.ItemFileReadStore",[_e8b],{constructor:function(_e90){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._jsonFileUrl=_e90.url;this._ccUrl=_e90.url;this.url=_e90.url;this._jsonData=_e90.data;this.data=null;this._datatypeMap=_e90.typeMap||{};if(!this._datatypeMap["Date"]){this._datatypeMap["Date"]={type:Date,deserialize:function(_e91){return _e8e.fromISOString(_e91);}};}this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=false;this._queuedFetches=[];if(_e90.urlPreventCache!==undefined){this.urlPreventCache=_e90.urlPreventCache?true:false;}if(_e90.hierarchical!==undefined){this.hierarchical=_e90.hierarchical?true:false;}if(_e90.clearOnClose){this.clearOnClose=true;}if("failOk" in _e90){this.failOk=_e90.failOk?true:false;}},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:false,urlPreventCache:false,failOk:false,hierarchical:true,_assertIsItem:function(item){if(!this.isItem(item)){throw new Error(this.declaredClass+": Invalid item argument.");}},_assertIsAttribute:function(_e92){if(typeof _e92!=="string"){throw new Error(this.declaredClass+": Invalid attribute argument.");}},getValue:function(item,_e93,_e94){var _e95=this.getValues(item,_e93);return (_e95.length>0)?_e95[0]:_e94;},getValues:function(item,_e96){this._assertIsItem(item);this._assertIsAttribute(_e96);return (item[_e96]||[]).slice(0);},getAttributes:function(item){this._assertIsItem(item);var _e97=[];for(var key in item){if((key!==this._storeRefPropName)&&(key!==this._itemNumPropName)&&(key!==this._rootItemPropName)&&(key!==this._reverseRefMap)){_e97.push(key);}}return _e97;},hasAttribute:function(item,_e98){this._assertIsItem(item);this._assertIsAttribute(_e98);return (_e98 in item);},containsValue:function(item,_e99,_e9a){var _e9b=undefined;if(typeof _e9a==="string"){_e9b=_e8c.patternToRegExp(_e9a,false);}return this._containsValue(item,_e99,_e9a,_e9b);},_containsValue:function(item,_e9c,_e9d,_e9e){return _e8a.some(this.getValues(item,_e9c),function(_e9f){if(_e9f!==null&&!lang.isObject(_e9f)&&_e9e){if(_e9f.toString().match(_e9e)){return true;}}else{if(_e9d===_e9f){return true;}}});},isItem:function(_ea0){if(_ea0&&_ea0[this._storeRefPropName]===this){if(this._arrayOfAllItems[_ea0[this._itemNumPropName]]===_ea0){return true;}}return false;},isItemLoaded:function(_ea1){return this.isItem(_ea1);},loadItem:function(_ea2){this._assertIsItem(_ea2.item);},getFeatures:function(){return this._features;},getLabel:function(item){if(this._labelAttr&&this.isItem(item)){return this.getValue(item,this._labelAttr);}return undefined;},getLabelAttributes:function(item){if(this._labelAttr){return [this._labelAttr];}return null;},filter:function(_ea3,_ea4,_ea5){var _ea6=[],i,key;if(_ea3.query){var _ea7,_ea8=_ea3.queryOptions?_ea3.queryOptions.ignoreCase:false;var _ea9={};for(key in _ea3.query){_ea7=_ea3.query[key];if(typeof _ea7==="string"){_ea9[key]=_e8c.patternToRegExp(_ea7,_ea8);}else{if(_ea7 instanceof RegExp){_ea9[key]=_ea7;}}}for(i=0;i<_ea4.length;++i){var _eaa=true;var _eab=_ea4[i];if(_eab===null){_eaa=false;}else{for(key in _ea3.query){_ea7=_ea3.query[key];if(!this._containsValue(_eab,key,_ea7,_ea9[key])){_eaa=false;}}}if(_eaa){_ea6.push(_eab);}}_ea5(_ea6,_ea3);}else{for(i=0;i<_ea4.length;++i){var item=_ea4[i];if(item!==null){_ea6.push(item);}}_ea5(_ea6,_ea3);}},_fetchItems:function(_eac,_ead,_eae){var self=this;if(this._loadFinished){this.filter(_eac,this._getItemsArray(_eac.queryOptions),_ead);}else{if(this._jsonFileUrl!==this._ccUrl){_e88.deprecated(this.declaredClass+": ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_eac,filter:lang.hitch(self,"filter"),findCallback:lang.hitch(self,_ead)});}else{this._loadInProgress=true;var _eaf={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _eb0=xhr.get(_eaf);_eb0.addCallback(function(data){try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;self.filter(_eac,self._getItemsArray(_eac.queryOptions),_ead);self._handleQueuedFetches();}catch(e){self._loadFinished=true;self._loadInProgress=false;_eae(e,_eac);}});_eb0.addErrback(function(_eb1){self._loadInProgress=false;_eae(_eb1,_eac);});var _eb2=null;if(_eac.abort){_eb2=_eac.abort;}_eac.abort=function(){var df=_eb0;if(df&&df.fired===-1){df.cancel();df=null;}if(_eb2){_eb2.call(_eac);}};}}else{if(this._jsonData){try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;self.filter(_eac,this._getItemsArray(_eac.queryOptions),_ead);}catch(e){_eae(e,_eac);}}else{_eae(new Error(this.declaredClass+": No JSON source data was provided as either URL or a nested Javascript object."),_eac);}}}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var i=0;i<this._queuedFetches.length;i++){var _eb3=this._queuedFetches[i],_eb4=_eb3.args,_eb5=_eb3.filter,_eb6=_eb3.findCallback;if(_eb5){_eb5(_eb4,this._getItemsArray(_eb4.queryOptions),_eb6);}else{this.fetchItemByIdentity(_eb4);}}this._queuedFetches=[];}},_getItemsArray:function(_eb7){if(_eb7&&_eb7.deep){return this._arrayOfAllItems;}return this._arrayOfTopLevelItems;},close:function(_eb8){if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress){if(((this._jsonFileUrl==""||this._jsonFileUrl==null)&&(this.url==""||this.url==null))&&this.data==null){console.debug(this.declaredClass+": WARNING!  Data reload "+" information has not been provided."+"  Please set 'url' or 'data' to the appropriate value before"+" the next fetch");}this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=false;this._itemsByIdentity=null;this._loadInProgress=false;this._queuedFetches=[];}},_getItemsFromLoadedData:function(_eb9){var _eba=false,self=this;function _ebb(_ebc){return (_ebc!==null)&&(typeof _ebc==="object")&&(!lang.isArray(_ebc)||_eba)&&(!lang.isFunction(_ebc))&&(_ebc.constructor==Object||lang.isArray(_ebc))&&(typeof _ebc._reference==="undefined")&&(typeof _ebc._type==="undefined")&&(typeof _ebc._value==="undefined")&&self.hierarchical;};function _ebd(_ebe){self._arrayOfAllItems.push(_ebe);for(var _ebf in _ebe){var _ec0=_ebe[_ebf];if(_ec0){if(lang.isArray(_ec0)){var _ec1=_ec0;for(var k=0;k<_ec1.length;++k){var _ec2=_ec1[k];if(_ebb(_ec2)){_ebd(_ec2);}}}else{if(_ebb(_ec0)){_ebd(_ec0);}}}}};this._labelAttr=_eb9.label;var i,item;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=_eb9.items;for(i=0;i<this._arrayOfTopLevelItems.length;++i){item=this._arrayOfTopLevelItems[i];if(lang.isArray(item)){_eba=true;}_ebd(item);item[this._rootItemPropName]=true;}var _ec3={},key;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){if(key!==this._rootItemPropName){var _ec4=item[key];if(_ec4!==null){if(!lang.isArray(_ec4)){item[key]=[_ec4];}}else{item[key]=[null];}}_ec3[key]=key;}}while(_ec3[this._storeRefPropName]){this._storeRefPropName+="_";}while(_ec3[this._itemNumPropName]){this._itemNumPropName+="_";}while(_ec3[this._reverseRefMap]){this._reverseRefMap+="_";}var _ec5;var _ec6=_eb9.identifier;if(_ec6){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=_ec6;for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];_ec5=item[_ec6];var _ec7=_ec5[0];if(!Object.hasOwnProperty.call(this._itemsByIdentity,_ec7)){this._itemsByIdentity[_ec7]=item;}else{if(this._jsonFileUrl){throw new Error(this.declaredClass+":  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+_ec6+"].  Value collided: ["+_ec7+"]");}else{if(this._jsonData){throw new Error(this.declaredClass+":  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+_ec6+"].  Value collided: ["+_ec7+"]");}}}}}else{this._features["dojo.data.api.Identity"]=Number;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];item[this._storeRefPropName]=this;item[this._itemNumPropName]=i;}for(i=0;i<this._arrayOfAllItems.length;++i){item=this._arrayOfAllItems[i];for(key in item){_ec5=item[key];for(var j=0;j<_ec5.length;++j){_ec4=_ec5[j];if(_ec4!==null&&typeof _ec4=="object"){if(("_type" in _ec4)&&("_value" in _ec4)){var type=_ec4._type;var _ec8=this._datatypeMap[type];if(!_ec8){throw new Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+type+"'");}else{if(lang.isFunction(_ec8)){_ec5[j]=new _ec8(_ec4._value);}else{if(lang.isFunction(_ec8.deserialize)){_ec5[j]=_ec8.deserialize(_ec4._value);}else{throw new Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");}}}}if(_ec4._reference){var _ec9=_ec4._reference;if(!lang.isObject(_ec9)){_ec5[j]=this._getItemByIdentity(_ec9);}else{for(var k=0;k<this._arrayOfAllItems.length;++k){var _eca=this._arrayOfAllItems[k],_ecb=true;for(var _ecc in _ec9){if(_eca[_ecc]!=_ec9[_ecc]){_ecb=false;}}if(_ecb){_ec5[j]=_eca;}}}if(this.referenceIntegrity){var _ecd=_ec5[j];if(this.isItem(_ecd)){this._addReferenceToMap(_ecd,item,key);}}}else{if(this.isItem(_ec4)){if(this.referenceIntegrity){this._addReferenceToMap(_ec4,item,key);}}}}}}}},_addReferenceToMap:function(_ece,_ecf,_ed0){},getIdentity:function(item){var _ed1=this._features["dojo.data.api.Identity"];if(_ed1===Number){return item[this._itemNumPropName];}else{var _ed2=item[_ed1];if(_ed2){return _ed2[0];}}return null;},fetchItemByIdentity:function(_ed3){var item,_ed4;if(!this._loadFinished){var self=this;if(this._jsonFileUrl!==this._ccUrl){_e88.deprecated(this.declaredClass+": ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null&&this._jsonData==null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_ed3});}else{this._loadInProgress=true;var _ed5={url:self._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk};var _ed6=xhr.get(_ed5);_ed6.addCallback(function(data){var _ed7=_ed3.scope?_ed3.scope:_e88.global;try{self._getItemsFromLoadedData(data);self._loadFinished=true;self._loadInProgress=false;item=self._getItemByIdentity(_ed3.identity);if(_ed3.onItem){_ed3.onItem.call(_ed7,item);}self._handleQueuedFetches();}catch(error){self._loadInProgress=false;if(_ed3.onError){_ed3.onError.call(_ed7,error);}}});_ed6.addErrback(function(_ed8){self._loadInProgress=false;if(_ed3.onError){var _ed9=_ed3.scope?_ed3.scope:_e88.global;_ed3.onError.call(_ed9,_ed8);}});}}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;item=self._getItemByIdentity(_ed3.identity);if(_ed3.onItem){_ed4=_ed3.scope?_ed3.scope:_e88.global;_ed3.onItem.call(_ed4,item);}}}}else{item=this._getItemByIdentity(_ed3.identity);if(_ed3.onItem){_ed4=_ed3.scope?_ed3.scope:_e88.global;_ed3.onItem.call(_ed4,item);}}},_getItemByIdentity:function(_eda){var item=null;if(this._itemsByIdentity){if(Object.hasOwnProperty.call(this._itemsByIdentity,_eda)){item=this._itemsByIdentity[_eda];}}else{if(Object.hasOwnProperty.call(this._arrayOfAllItems,_eda)){item=this._arrayOfAllItems[_eda];}}if(item===undefined){item=null;}return item;},getIdentityAttributes:function(item){var _edb=this._features["dojo.data.api.Identity"];if(_edb===Number){return null;}else{return [_edb];}},_forceLoad:function(){var self=this;if(this._jsonFileUrl!==this._ccUrl){_e88.deprecated(this.declaredClass+": ","To change the url, set the url property of the store,"+" not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0");this._ccUrl=this._jsonFileUrl;this.url=this._jsonFileUrl;}else{if(this.url!==this._ccUrl){this._jsonFileUrl=this.url;this._ccUrl=this.url;}}if(this.data!=null){this._jsonData=this.data;this.data=null;}if(this._jsonFileUrl){var _edc={url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:true};var _edd=xhr.get(_edc);_edd.addCallback(function(data){try{if(self._loadInProgress!==true&&!self._loadFinished){self._getItemsFromLoadedData(data);self._loadFinished=true;}else{if(self._loadInProgress){throw new Error(this.declaredClass+":  Unable to perform a synchronous load, an async load is in progress.");}}}catch(e){console.log(e);throw e;}});_edd.addErrback(function(_ede){throw _ede;});}else{if(this._jsonData){self._getItemsFromLoadedData(self._jsonData);self._jsonData=null;self._loadFinished=true;}}}});lang.extend(_e8f,_e8d);return _e8f;});},"dojo/dnd/Source":function(){define(["../_base/array","../_base/connect","../_base/declare","../_base/kernel","../_base/lang","../dom-class","../dom-geometry","../mouse","../ready","../topic","./common","./Selector","./Manager"],function(_edf,_ee0,_ee1,_ee2,lang,_ee3,_ee4,_ee5,_ee6,_ee7,dnd,_ee8,_ee9){if(!_ee2.isAsync){_ee6(0,function(){var _eea=["dojo/dnd/AutoSource","dojo/dnd/Target"];require(_eea);});}var _eeb=_ee1("dojo.dnd.Source",_ee8,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(node,_eec){lang.mixin(this,lang.mixin({},_eec));var type=this.accept;if(type.length){this.accept={};for(var i=0;i<type.length;++i){this.accept[type[i]]=1;}}this.isDragging=false;this.mouseDown=false;this.targetAnchor=null;this.targetBox=null;this.before=true;this._lastX=0;this._lastY=0;this.sourceState="";if(this.isSource){_ee3.add(this.node,"dojoDndSource");}this.targetState="";if(this.accept){_ee3.add(this.node,"dojoDndTarget");}if(this.horizontal){_ee3.add(this.node,"dojoDndHorizontal");}this.topics=[_ee7.subscribe("/dnd/source/over",lang.hitch(this,"onDndSourceOver")),_ee7.subscribe("/dnd/start",lang.hitch(this,"onDndStart")),_ee7.subscribe("/dnd/drop",lang.hitch(this,"onDndDrop")),_ee7.subscribe("/dnd/cancel",lang.hitch(this,"onDndCancel"))];},checkAcceptance:function(_eed,_eee){if(this==_eed){return !this.copyOnly||this.selfAccept;}for(var i=0;i<_eee.length;++i){var type=_eed.getItem(_eee[i].id).type;var flag=false;for(var j=0;j<type.length;++j){if(type[j] in this.accept){flag=true;break;}}if(!flag){return false;}}return true;},copyState:function(_eef,self){if(_eef){return true;}if(arguments.length<2){self=this==_ee9.manager().target;}if(self){if(this.copyOnly){return this.selfCopy;}}else{return this.copyOnly;}return false;},destroy:function(){_eeb.superclass.destroy.call(this);_edf.forEach(this.topics,function(t){t.remove();});this.targetAnchor=null;},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}_eeb.superclass.onMouseMove.call(this,e);var m=_ee9.manager();if(!this.isDragging){if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){var _ef0=this.getSelectedNodes();if(_ef0.length){m.startDrag(this,_ef0,this.copyState(dnd.getCopyKeyState(e),true));}}}if(this.isDragging){var _ef1=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox=_ee4.position(this.current,true);}if(this.horizontal){_ef1=(e.pageX-this.targetBox.x<this.targetBox.w/2)==_ee4.isBodyLtr(this.current.ownerDocument);}else{_ef1=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);}}if(this.current!=this.targetAnchor||_ef1!=this.before){this._markTargetAnchor(_ef1);m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));}}},onMouseDown:function(e){if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!dnd.isFormElement(e))){this.mouseDown=true;this._lastX=e.pageX;this._lastY=e.pageY;_eeb.superclass.onMouseDown.call(this,e);}},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;_eeb.superclass.onMouseUp.call(this,e);}},onDndSourceOver:function(_ef2){if(this!==_ef2){this.mouseDown=false;if(this.targetAnchor){this._unmarkTargetAnchor();}}else{if(this.isDragging){var m=_ee9.manager();m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));}}},onDndStart:function(_ef3,_ef4,copy){if(this.autoSync){this.sync();}if(this.isSource){this._changeState("Source",this==_ef3?(copy?"Copied":"Moved"):"");}var _ef5=this.accept&&this.checkAcceptance(_ef3,_ef4);this._changeState("Target",_ef5?"":"Disabled");if(this==_ef3){_ee9.manager().overSource(this);}this.isDragging=true;},onDndDrop:function(_ef6,_ef7,copy,_ef8){if(this==_ef8){this.onDrop(_ef6,_ef7,copy);}this.onDndCancel();},onDndCancel:function(){if(this.targetAnchor){this._unmarkTargetAnchor();this.targetAnchor=null;}this.before=true;this.isDragging=false;this.mouseDown=false;this._changeState("Source","");this._changeState("Target","");},onDrop:function(_ef9,_efa,copy){if(this!=_ef9){this.onDropExternal(_ef9,_efa,copy);}else{this.onDropInternal(_efa,copy);}},onDropExternal:function(_efb,_efc,copy){var _efd=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(node,hint){return _efd.call(this,_efb.getItem(node.id).data,hint);};}else{if(copy){this._normalizedCreator=function(node){var t=_efb.getItem(node.id);var n=node.cloneNode(true);n.id=dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}else{this._normalizedCreator=function(node){var t=_efb.getItem(node.id);_efb.delItem(node.id);return {node:node,data:t.data,type:t.type};};}}this.selectNone();if(!copy&&!this.creator){_efb.selectNone();}this.insertNodes(true,_efc,this.before,this.current);if(!copy&&this.creator){_efb.deleteSelectedNodes();}this._normalizedCreator=_efd;},onDropInternal:function(_efe,copy){var _eff=this._normalizedCreator;if(this.current&&this.current.id in this.selection){return;}if(copy){if(this.creator){this._normalizedCreator=function(node,hint){return _eff.call(this,this.getItem(node.id).data,hint);};}else{this._normalizedCreator=function(node){var t=this.getItem(node.id);var n=node.cloneNode(true);n.id=dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}}else{if(!this.current){return;}this._normalizedCreator=function(node){var t=this.getItem(node.id);return {node:node,data:t.data,type:t.type};};}this._removeSelection();this.insertNodes(true,_efe,this.before,this.current);this._normalizedCreator=_eff;},onDraggingOver:function(){},onDraggingOut:function(){},onOverEvent:function(){_eeb.superclass.onOverEvent.call(this);_ee9.manager().overSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOver();}},onOutEvent:function(){_eeb.superclass.onOutEvent.call(this);_ee9.manager().outSource(this);if(this.isDragging&&this.targetState!="Disabled"){this.onDraggingOut();}},_markTargetAnchor:function(_f00){if(this.current==this.targetAnchor&&this.before==_f00){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before?"Before":"After");}this.targetAnchor=this.current;this.targetBox=null;this.before=_f00;if(this.targetAnchor){this._addItemClass(this.targetAnchor,this.before?"Before":"After");}},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor,this.before?"Before":"After");this.targetAnchor=null;this.targetBox=null;this.before=true;},_markDndStatus:function(copy){this._changeState("Source",copy?"Copied":"Moved");},_legalMouseDown:function(e){if(e.type!="touchstart"&&!_ee5.isLeft(e)){return false;}if(!this.withHandles){return true;}for(var node=e.target;node&&node!==this.node;node=node.parentNode){if(_ee3.contains(node,"dojoDndHandle")){return true;}if(_ee3.contains(node,"dojoDndItem")||_ee3.contains(node,"dojoDndIgnore")){break;}}return false;}});return _eeb;});},"dijit/form/ValidationTextBox":function(){require({cache:{"url:dijit/form/templates/ValidationTextBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\" role=\"presentation\"\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class=\"dijitReset dijitInputInner\" data-dojo-attach-point='textbox,focusNode' autocomplete=\"off\"\n\t\t\t${!nameAttrSetting} type='${type}'\n\t/></div\n></div>\n"}});define("dijit/form/ValidationTextBox",["dojo/_base/declare","dojo/_base/kernel","dojo/i18n","./TextBox","../Tooltip","dojo/text!./templates/ValidationTextBox.html","dojo/i18n!./nls/validate"],function(_f01,_f02,i18n,_f03,_f04,_f05){var _f06;return _f06=_f01("dijit.form.ValidationTextBox",_f03,{templateString:_f05,required:false,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",regExpGen:function(){},state:"",tooltipPosition:[],_deprecateRegExp:function(attr,_f07){if(_f07!=_f06.prototype[attr]){_f02.deprecated("ValidationTextBox id="+this.id+", set('"+attr+"', ...) is deprecated.  Use set('pattern', ...) instead.","","2.0");this.set("pattern",_f07);}},_setRegExpGenAttr:function(_f08){this._deprecateRegExp("regExpGen",_f08);this.regExpGen=this._getPatternAttr;},_setRegExpAttr:function(_f09){this._deprecateRegExp("regExp",_f09);},_setValueAttr:function(){this.inherited(arguments);this.validate(this.focused);},validator:function(_f0a,_f0b){return (new RegExp("^(?:"+this._getPatternAttr(_f0b)+")"+(this.required?"":"?")+"$")).test(_f0a)&&(!this.required||!this._isEmpty(_f0a))&&(this._isEmpty(_f0a)||this.parse(_f0a,_f0b)!==undefined);},_isValidSubset:function(){return this.textbox.value.search(this._partialre)==0;},isValid:function(){return this.validator(this.textbox.value,this.constraints);},_isEmpty:function(_f0c){return (this.trim?/^\s*$/:/^$/).test(_f0c);},getErrorMessage:function(){var _f0d=this.invalidMessage=="$_unset_$"?this.messages.invalidMessage:!this.invalidMessage?this.promptMessage:this.invalidMessage;var _f0e=this.missingMessage=="$_unset_$"?this.messages.missingMessage:!this.missingMessage?_f0d:this.missingMessage;return (this.required&&this._isEmpty(this.textbox.value))?_f0e:_f0d;},getPromptMessage:function(){return this.promptMessage;},_maskValidSubsetError:true,validate:function(_f0f){var _f10="";var _f11=this.disabled||this.isValid(_f0f);if(_f11){this._maskValidSubsetError=true;}var _f12=this._isEmpty(this.textbox.value);var _f13=!_f11&&_f0f&&this._isValidSubset();this._set("state",_f11?"":(((((!this._hasBeenBlurred||_f0f)&&_f12)||_f13)&&(this._maskValidSubsetError||(_f13&&!this._hasBeenBlurred&&_f0f)))?"Incomplete":"Error"));this.focusNode.setAttribute("aria-invalid",_f11?"false":"true");if(this.state=="Error"){this._maskValidSubsetError=_f0f&&_f13;_f10=this.getErrorMessage(_f0f);}else{if(this.state=="Incomplete"){_f10=this.getPromptMessage(_f0f);this._maskValidSubsetError=!this._hasBeenBlurred||_f0f;}else{if(_f12){_f10=this.getPromptMessage(_f0f);}}}this.set("message",_f10);return _f11;},displayMessage:function(_f14){if(_f14&&this.focused){_f04.show(_f14,this.domNode,this.tooltipPosition,!this.isLeftToRight());}else{_f04.hide(this.domNode);}},_refreshState:function(){if(this._created){this.validate(this.focused);}this.inherited(arguments);},constructor:function(_f15){this.constraints={};this.baseClass+=" dijitValidationTextBox";},startup:function(){this.inherited(arguments);this._refreshState();},_setConstraintsAttr:function(_f16){if(!_f16.locale&&this.lang){_f16.locale=this.lang;}this._set("constraints",_f16);this._refreshState();},_setPatternAttr:function(_f17){this._set("pattern",_f17);},_getPatternAttr:function(_f18){var p=this.pattern;var type=(typeof p).toLowerCase();if(type=="function"){p=this.pattern(_f18||this.constraints);}if(p!=this._lastRegExp){var _f19="";this._lastRegExp=p;if(p!=".*"){p.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(re){switch(re.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":_f19+=re;break;case ")":_f19+="|$)";break;default:_f19+="(?:"+re+"|$)";break;}});}try{"".search(_f19);}catch(e){_f19=this.pattern;console.warn("RegExp error in "+this.declaredClass+": "+this.pattern);}this._partialre="^(?:"+_f19+")$";}return p;},postMixInProperties:function(){this.inherited(arguments);this.messages=i18n.getLocalization("dijit.form","validate",this.lang);this._setConstraintsAttr(this.constraints);},_setDisabledAttr:function(_f1a){this.inherited(arguments);this._refreshState();},_setRequiredAttr:function(_f1b){this._set("required",_f1b);this.focusNode.setAttribute("aria-required",_f1b);this._refreshState();},_setMessageAttr:function(_f1c){this._set("message",_f1c);this.displayMessage(_f1c);},reset:function(){this._maskValidSubsetError=true;this.inherited(arguments);},_onBlur:function(){this.displayMessage("");this.inherited(arguments);}});});},"esri/toolbars/_VertexMover":function(){define("esri/toolbars/_VertexMover",["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/has","dojo/sniff","dojo/dom-style","dojox/gfx/Moveable","esri/kernel","esri/geometry/Point","esri/graphic","esri/geometry/webMercatorUtils"],function(_f1d,lang,_f1e,has,_f1f,_f20,_f21,_f22,_f23,_f24,_f25){var VM=_f1d(null,{declaredClass:"esri.toolbars.VertexMover",constructor:function(_f26,_f27,_f28,_f29,_f2a,_f2b,_f2c,_f2d){this.point=_f26;this.symbol=_f27;this.relatedGraphic=_f28;this.segIndex=_f29;this.ptIndex=_f2a;this.segLength=_f2b;this.editor=_f2c;this.map=_f2c.map;this._scratchGL=_f2c.toolbar._scratchGL;this._placeholder=_f2d||false;this._type=_f28.geometry.type;this._init();this._enable();},refresh:function(_f2e){if(_f2e||this._needRefresh()){this._disable();this._enable();}},destroy:function(){this._disable();if(this.graphic){this._scratchGL.remove(this.graphic);}this.point=this.symbol=this.graphic=this.relatedGraphic=this.segIndex=this.ptIndex=this.segLength=this.editor=this.map=this._scratchGL=null;},_init:function(){var _f2f=new _f23(this.point.toJson());var _f30=new _f24(_f2f,this.symbol);switch(this._type){case "multipoint":_f30._shape=this.relatedGraphic.getDojoShape().children[this.ptIndex];break;case "polyline":case "polygon":this._scratchGL.add(_f30);break;}this.graphic=_f30;},_enable:function(){var _f31=this.graphic.getDojoShape();if(_f31){_f31._hasMover=true;this._moveable=this._getMoveable(_f31);var node=_f31.getEventSource();if(node){_f20.set(node,"cursor",this.editor.toolbar._cursors[this._placeholder?"move-gv":"move-v"]);}}},_disable:function(){var _f32=this._moveable;if(_f32){_f1e.disconnect(this._startHandle);_f1e.disconnect(this._firstHandle);_f1e.disconnect(this._movingHandle);_f1e.disconnect(this._stopHandle);var _f33=_f32.shape;if(_f33){var node=_f33.getEventSource();if(node){_f20.set(node,"cursor",null);}}_f32.destroy();this._moveable=null;}},_needRefresh:function(){var _f34=this.graphic.getDojoShape(),need=false;if(_f34){switch(this._type){case "multipoint":var _f35=this.relatedGraphic.getDojoShape();if(_f35){var _f36=_f35.children[this.ptIndex];if(_f34!==_f36){_f34=_f36;this.graphic._shape=_f34;need=true;}}break;case "polyline":case "polygon":need=!_f34._hasMover;break;}}return need;},_getMoveable:function(_f37){var _f38=new _f21(_f37,_f1f("mac")&&_f1f("ff")&&!has("esri-touch")&&{leftButtonOnly:true});this._startHandle=_f1e.connect(_f38,"onMoveStart",this,this._moveStartHandler);this._firstHandle=_f1e.connect(_f38,"onFirstMove",this,this._firstMoveHandler);this._movingHandle=_f1e.connect(_f38,"onMoving",this,this._movingHandler);this._stopHandle=_f1e.connect(_f38,"onMoveStop",this,this._moveStopHandler);return _f38;},_getPtIndex:function(){return this.ptIndex+(this._placeholder?1:0);},_getInfo:function(){return {graphic:this.graphic,isGhost:this._placeholder,segmentIndex:this.segIndex,pointIndex:this._getPtIndex()};},_moveStartHandler:function(_f39){var map=this.map;if(map.snappingManager){map.snappingManager._setUpSnapping();}_f39.shape.moveToFront();this.constructor.onMoveStart(this);this.editor.toolbar.onVertexMoveStart(this.relatedGraphic,this._getInfo());},_firstMoveHandler:function(_f3a){var _f3b=_f3a.shape;var _f3c=this._getControlEdges();var _f3d=this._scratchGL._div;var i,_f3e=[],_f3f=_f3a.host.shape._wrapOffsets[0]||0;for(i=0;i<_f3c.length;i++){var edge=_f3c[i];edge.x1+=_f3f;edge.x2+=_f3f;_f3e.push([_f3d.createLine({x1:edge.x1,y1:edge.y1,x2:edge.x2,y2:edge.y2}).setStroke(this.editor._lineStroke),edge.x1,edge.y1,edge.x2,edge.y2]);}_f3b._lines=_f3e;_f3a.shape.moveToFront();this.constructor.onFirstMove(this);this.editor.toolbar.onVertexFirstMove(this.relatedGraphic,this._getInfo());},_movingHandler:function(_f40){var _f41=_f40.shape,tx=_f41.getTransform();var i,_f42=_f41._lines;for(i=0;i<_f42.length;i++){var line=_f42[i];line[0].setShape({x1:line[1]+tx.dx,y1:line[2]+tx.dy,x2:line[3],y2:line[4]});}this.editor.toolbar.onVertexMove(this.relatedGraphic,this._getInfo(),tx);},_moveStopHandler:function(_f43){var _f44=_f43.shape,_f45=this.editor.toolbar,tx=_f44.getTransform(),map=this.map,host=this.graphic,_f46=_f45._geo?_f25.geographicToWebMercator(host.geometry):host.geometry;var i,_f47=_f44._lines;if(_f47){for(i=0;i<_f47.length;i++){_f47[i][0].removeShape();}_f44._lines=null;}var ph=false,_f48=true,info=this._getInfo();if(tx&&(tx.dx||tx.dy)){if(this._placeholder){this._placeholder=false;ph=true;}}else{_f48=false;}var _f49;if(map.snappingManager){_f49=map.snappingManager._snappingPoint;}var _f4a=_f49||map.toMap(map.toScreen(_f46).offset(tx.dx,tx.dy));if(map.snappingManager){map.snappingManager._killOffSnapping();}_f44.setTransform(null);host.setGeometry(_f45._geo?_f25.webMercatorToGeographic(_f4a,true):_f4a);this.constructor.onMoveStop(this,tx);_f45.onVertexMoveStop(this.relatedGraphic,info,tx);if(!_f48){_f45.onVertexClick(this.relatedGraphic,info);}if(ph){_f45.onVertexAdd(this.relatedGraphic,this._getInfo());}},_getControlEdges:function(){var map=this.map;var _f4b=this.relatedGraphic.geometry;var _f4c=this.segIndex,_f4d=this.ptIndex,_f4e=this.segLength;var _f4f=this._scratchGL._div;var _f50=_f4f.getTransform();var sdx=_f50.dx,sdy=_f50.dy;var pt=map.toScreen(this.graphic.geometry);var x=pt.x-sdx,y=pt.y-sdy;var _f51=[];var _f52=this.editor._getControlPoints(this,_f4b,_f4c,_f4d,_f4e);if(_f52[0]){_f51.push({x1:x,y1:y,x2:_f52[0].x-sdx,y2:_f52[0].y-sdy});}if(_f52[1]){_f51.push({x1:x,y1:y,x2:_f52[1].x-sdx,y2:_f52[1].y-sdy});}return _f51;}});if(has("extend-esri")){lang.setObject("toolbars.VertexMover",VM,_f22);}lang.mixin(VM,{onMoveStart:function(){},onFirstMove:function(){},onMoveStop:function(){}});return VM;});},"url:esri/dijit/editing/templates/Editor.html":"<div class=\"esriEditor\">\r\n    <div class=\"esriTemplatePicker\" dojoAttachPoint=\"templatePickerDiv\"></div>\r\n    <div class=\"esriDrawingToolbar\" dojoAttachPoint=\"drawingToolbarDiv\"></div>\r\n    <div class=\"progressBar\" dojoAttachPoint=\"progressBar\" indeterminate=\"true\" dojoType=\"dijit.ProgressBar\" />\r\n</div>","esri/tasks/OffsetParameters":function(){define("esri/tasks/OffsetParameters",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel","esri/geometry/jsonUtils"],function(_f53,lang,_f54,_f55,has,_f56,_f57){var _f58=_f53(null,{declaredClass:"esri.tasks.OffsetParameters",geometries:null,bevelRatio:null,offsetDistance:null,offsetHow:null,offsetUnit:null,toJson:function(){var _f59=_f54.map(this.geometries,function(geom){return geom.toJson();});var json={};if(this.geometries&&this.geometries.length>0){json.geometries=_f55.toJson({geometryType:_f57.getJsonType(this.geometries[0]),geometries:_f59});json.sr=_f55.toJson(this.geometries[0].spatialReference.toJson());}if(this.bevelRatio){json.bevelRatio=this.bevelRatio;}if(this.offsetDistance){json.offsetDistance=this.offsetDistance;}if(this.offsetHow){json.offsetHow=this.offsetHow;}if(this.offsetUnit){json.offsetUnit=this.offsetUnit;}return json;}});lang.mixin(_f58,{OFFSET_BEVELLED:"esriGeometryOffsetBevelled",OFFSET_MITERED:"esriGeometryOffsetMitered",OFFSET_ROUNDED:"esriGeometryOffsetRounded"});if(has("extend-esri")){lang.setObject("tasks.OffsetParameters",_f58,_f56);}return _f58;});},"esri/toolbars/edit":function(){define("esri/toolbars/edit",["dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/array","dojo/_base/Color","dojo/has","esri/kernel","esri/lang","esri/sniff","esri/toolbars/_toolbar","esri/toolbars/_Box","esri/toolbars/_GraphicMover","esri/toolbars/_VertexEditor","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol"],function(_f5a,lang,_f5b,_f5c,_f5d,has,_f5e,_f5f,_f60,_f61,Box,_f62,_f63,_f64,_f65){var EDT=_f5a(_f61,{declaredClass:"esri.toolbars.Edit",constructor:function(map,_f66){this._map=map;this._tool=0;if(this._map.loaded){this._scratchGL=map.graphics;}else{var _f67=_f5b.connect(this._map,"onLoad",this,function(){_f5b.disconnect(_f67);_f67=null;this._scratchGL=this._map.graphics;});}var _f68=has("esri-touch")||has("esri-pointer");this._defaultOptions=lang.mixin({vertexSymbol:new _f64(_f64.STYLE_CIRCLE,_f68?20:12,new _f65(_f65.STYLE_SOLID,new _f5d([0,0,0,0.5]),1),new _f5d([128,128,128])),ghostVertexSymbol:new _f64(_f64.STYLE_CIRCLE,_f68?18:10,new _f65(_f65.STYLE_SOLID,new _f5d([0,0,0,0.5]),1),new _f5d([255,255,255,0.75])),ghostLineSymbol:new _f65(_f65.STYLE_DOT,new _f5d([128,128,128]),2),allowDeleteVertices:true,allowAddVertices:true,rotateHandleOffset:_f68?24:16,boxLineSymbol:new _f65(_f65.STYLE_DASH,new _f5d([64,64,64]),1),boxHandleSymbol:new _f64(_f64.STYLE_SQUARE,_f68?16:9,new _f65(_f65.STYLE_SOLID,new _f5d([0,0,0,0.5]),1),new _f5d([255,255,255,0.75]))},_f66||{});},activate:function(tool,_f69,_f6a){this.deactivate();this._graphic=_f69;this._options=lang.mixin(lang.mixin({},this._defaultOptions),_f6a||{});var MOVE=EDT.MOVE,EDIT=EDT.EDIT_VERTICES,_f6b=EDT.SCALE,_f6c=EDT.ROTATE,move=false,edit=false,box=false,map=this._map,_f6d=map.spatialReference,_f6e=_f69.geometry.spatialReference;this._geo=!!(_f6d&&_f6e&&!_f6d.equals(_f6e)&&_f6d.isWebMercator()&&_f6e.wkid===4326);if((tool&MOVE)===MOVE){move=this._enableMove(_f69);}var _f6f=((tool&_f6b)===_f6b),_f70=((tool&_f6c)===_f6c);if(_f6f||_f70){box=this._enableBoxEditing(_f69,_f6f,_f70);}if((tool&EDIT)===EDIT){edit=this._enableVertexEditing(_f69);}if(!(move||edit||box)){throw new Error("[esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type.");}this._tool=tool;if(this._tool){this._mapPanEndHandle=_f5b.connect(map,"onPanEnd",this,this._mapPanEndHandler);this._mapExtChgHandle=_f5b.connect(map,"onExtentChange",this,this._mapExtentChangeHandler);this.onActivate(this._tool,_f69);}if(map.snappingManager&&(move||edit)){map.snappingManager._startSelectionLayerQuery();}},deactivate:function(){var tool=this._tool,_f71=this._graphic;if(!tool){return;}var _f72=!!this._modified;this._clear();_f5b.disconnect(this._mapPanEndHandle);_f5b.disconnect(this._mapExtChgHandle);this._mapPanEndHandle=this._mapExtChgHandle=null;this._graphic=this._geo=null;this.onDeactivate(tool,_f71,{isModified:_f72});if(this._map.snappingManager){this._map.snappingManager._stopSelectionLayerQuery();}},refresh:function(){this._refreshMoveables(true);},getCurrentState:function(){return {tool:this._tool,graphic:this._graphic,isModified:!!this._modified};},onActivate:function(tool,_f73){},onDeactivate:function(tool,_f74,info){},onGraphicMoveStart:function(_f75){},onGraphicFirstMove:function(_f76){this._modified=true;},onGraphicMove:function(_f77,_f78){},onGraphicMoveStop:function(_f79,_f7a){},onGraphicClick:function(_f7b,info){},onVertexMoveStart:function(_f7c,_f7d){},onVertexFirstMove:function(_f7e,_f7f){this._modified=true;},onVertexMove:function(_f80,_f81,_f82){},onVertexMoveStop:function(_f83,_f84,_f85){},onVertexAdd:function(_f86,_f87){this._modified=true;},onVertexClick:function(_f88,_f89){},onVertexMouseOver:function(_f8a,_f8b){},onVertexMouseOut:function(_f8c,_f8d){},onVertexDelete:function(_f8e,_f8f){this._modified=true;},onScaleStart:function(_f90){},onScaleFirstMove:function(_f91){this._modified=true;},onScale:function(_f92,info){},onScaleStop:function(_f93,info){},onRotateStart:function(_f94){},onRotateFirstMove:function(_f95){this._modified=true;},onRotate:function(_f96,info){},onRotateStop:function(_f97,info){},_eventMap:{activate:["tool","graphic"],deactivate:["tool","graphic","info"],"graphic-move-start":["graphic"],"graphic-first-move":["graphic"],"graphic-move":["graphic","transform"],"graphic-move-stop":["graphic","transform"],"graphic-click":["graphic","info"],"vertex-move-start":["graphic","vertexinfo"],"vertex-first-move":["graphic","vertexinfo"],"vertex-move":["graphic","vertexinfo","transform"],"vertex-move-stop":["graphic","vertexinfo","transform"],"vertex-add":["graphic","vertexinfo"],"vertex-click":["graphic","vertexinfo"],"vertex-mouse-over":["graphic","vertexinfo"],"vertex-mouse-out":["graphic","vertexinfo"],"vertex-delete":["graphic","vertexinfo"],"scale-start":["graphic"],"scale-first-move":["graphic"],scale:["graphic","info"],"scale-stop":["graphic","info"],"rotate-start":["graphic"],"rotate-first-move":["graphic"],rotate:["graphic","info"],"rotate-stop":["graphic","info"]},_enableMove:function(_f98){var map=this._map,type=_f98.geometry.type;switch(type){case "point":case "polyline":case "polygon":this._graphicMover=new _f62(_f98,map,this);return true;case "multipoint":break;}return false;},_enableVertexEditing:function(_f99){var map=this._map,type=_f99.geometry.type;switch(type){case "point":break;case "multipoint":case "polyline":case "polygon":this._vertexEditor=_f63.create(_f99,map,this);return true;}return false;},_enableBoxEditing:function(_f9a,_f9b,_f9c){var map=this._map,type=_f9a.geometry.type;switch(type){case "point":case "multipoint":break;case "polyline":case "polygon":this._boxEditor=new Box(_f9a,map,this,_f9b,_f9c,this._options.uniformScaling);return true;}return false;},_disableMove:function(){var _f9d=this._graphicMover;if(_f9d){_f9d.destroy();this._graphicMover=null;}},_disableVertexEditing:function(){var _f9e=this._vertexEditor;if(_f9e){_f9e.destroy();this._vertexEditor=null;}},_disableBoxEditing:function(){var box=this._boxEditor;if(box){box.destroy();this._boxEditor=null;}},_clear:function(){this._disableMove();this._disableVertexEditing();this._disableBoxEditing();this._tool=0;this._modified=false;},_mapPanEndHandler:function(){this._refreshMoveables();},_mapExtentChangeHandler:function(e,d,_f9f){if(_f9f){this._refreshMoveables();}},_refreshMoveables:function(_fa0){var _fa1=_f5c.filter([this._graphicMover,this._vertexEditor,this._boxEditor],_f5f.isDefined);_f5c.forEach(_fa1,function(mov){mov.refresh(_fa0);});},_beginOperation:function(_fa2){_f5c.forEach(this._getAffectedTools(_fa2),function(tool){tool.suspend();});},_endOperation:function(_fa3){_f5c.forEach(this._getAffectedTools(_fa3),function(tool){tool.resume();});},_getAffectedTools:function(_fa4){var _fa5=[];switch(_fa4){case "MOVE":_fa5=[this._vertexEditor,this._boxEditor];break;case "VERTICES":_fa5=[this._boxEditor];break;case "BOX":_fa5=[this._vertexEditor];break;}_fa5=_f5c.filter(_fa5,_f5f.isDefined);return _fa5;}});lang.mixin(EDT,{MOVE:1,EDIT_VERTICES:2,SCALE:4,ROTATE:8});if(has("extend-esri")){lang.setObject("toolbars.Edit",EDT,_f5e);}return EDT;});},"dojo/data/util/filter":function(){define(["../../_base/lang"],function(lang){var _fa6={};lang.setObject("dojo.data.util.filter",_fa6);_fa6.patternToRegExp=function(_fa7,_fa8){var rxp="^";var c=null;for(var i=0;i<_fa7.length;i++){c=_fa7.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_fa7.charAt(i);break;case "*":rxp+=".*";break;case "?":rxp+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":rxp+="\\";default:rxp+=c;}}rxp+="$";if(_fa8){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};return _fa6;});},"dijit/_WidgetsInTemplateMixin":function(){define("dijit/_WidgetsInTemplateMixin",["dojo/_base/array","dojo/_base/declare","dojo/parser"],function(_fa9,_faa,_fab){return _faa("dijit._WidgetsInTemplateMixin",null,{_earlyTemplatedStartup:false,widgetsInTemplate:true,_beforeFillContent:function(){if(this.widgetsInTemplate){var node=this.domNode;var cw=(this._startupWidgets=_fab.parse(node,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang,textDir:this.textDir},propsThis:this,scope:"dojo"}));if(!cw.isFulfilled()){throw new Error(this.declaredClass+": parser returned unfilled promise (probably waiting for module auto-load), "+"unsupported by _WidgetsInTemplateMixin.   Must pre-load all supporting widgets before instantiation.");}this._attachTemplateNodes(cw,function(n,p){return n[p];});}},startup:function(){_fa9.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);}});});},"esri/dijit/editing/toolbars/Drawing":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","dijit/_CssStateMixin","esri/dijit/editing/Util","esri/dijit/editing/toolbars/ToolbarBase","esri/dijit/editing/tools/ButtonToolBase","esri/dijit/editing/tools/Cut","esri/dijit/editing/tools/Union","esri/dijit/editing/tools/Reshape","esri/dijit/editing/tools/Editing","esri/dijit/editing/tools/EditingTools","esri/dijit/editing/tools/Selection","esri/dijit/editing/tools/SelectionTools","esri/kernel"],function(_fac,lang,_fad,_fae,has,_faf,_fb0,_fb1,_fb2,Cut,_fb3,_fb4,_fb5,_fb6,_fb7,_fb8,_fb9){var _fba=_fac([_fb1,_faf],{declaredClass:"esri.dijit.editing.toolbars.Drawing",onShowAttributeInspector:function(){},_activateTool:function(tool,_fbb){this._settings.editor._activeTool=tool;if(tool!=="EDITING"){this._settings.templatePicker.clearSelection();}if(tool!=="ATTRIBUTES"){this._settings.editor._hideAttributeInspector();}if(tool==="CLEAR"){return;}this.inherited(arguments);},_initializeToolbar:function(){var _fbc=this._settings.layers;_fad.forEach(_fbc,function(_fbd){this._tbConnects.push(_fae.connect(_fbd,"onSelectionComplete",this,"_updateUI"));},this);},activateEditing:function(_fbe,_fbf){this._tools.EDITING._activateTool(_fbe,_fbf.geometryType);this._activeTool=this._tools.EDITING;this._activeTool.setChecked(true);},_updateUI:function(){if(this._settings.undoManager){this._tools.UNDO.set("disabled",this._settings.undoManager.canUndo===false);this._tools.REDO.set("disabled",this._settings.undoManager.canRedo===false);}this._selectedFeatures=_fb0.getSelection(this._settings.layers);var _fc0=this._selectedFeatures.length;if(this._tools.DELETE){this._tools.DELETE.set("disabled",_fc0<=0);}if(this._tools.CLEAR){this._tools.CLEAR.set("disabled",_fc0<=0);}if(this._tools.ATTRIBUTES){this._tools.ATTRIBUTES.set("disabled",_fc0<=0);}if(this._tools.UNION){this._tools.UNION.set("disabled",_fc0<2);}},_toolFinished:function(tool){if(tool==="ATTRIBUTES"&&(this._selectedFeatures&&this._selectedFeatures.length)){this.onShowAttributeInspector(this._selectedFeatures[0]);}if(tool==="SELECT"||tool==="CUT"||tool==="RESHAPING"||tool==="EDITING"){this._activeTool.deactivate();this._activeTool.setChecked(false);this._activeTool=null;}if(tool==="DELETE"){this.onDelete();}this._updateUI();},_createTools:function(){this._tools.SELECT=new _fb7({settings:this._settings,onClick:lang.hitch(this,"_activateTool","SELECT",true),onFinished:lang.hitch(this,"_toolFinished","SELECT")});this.addChild(this._tools.SELECT);this._tools.CLEAR=new _fb2(lang.mixin(_fb8.selectClear,{settings:this._settings,onClick:lang.hitch(this._settings.editor,"_clearSelection",false)}));this.addChild(this._tools.CLEAR);this._createSeparator();this._tools.ATTRIBUTES=new _fb2(lang.mixin(_fb6.attributes,{settings:this._settings,onClick:lang.hitch(this,"_toolFinished","ATTRIBUTES")}));this.addChild(this._tools.ATTRIBUTES);this._createSeparator();this._tools.EDITING=new _fb5({settings:this._settings,onClick:lang.hitch(this,"_activateTool","EDITING",true),onApplyEdits:lang.hitch(this,"onApplyEdits"),onFinished:lang.hitch(this,"_toolFinished","EDITING")});this.addChild(this._tools.EDITING);this._tools.DELETE=new _fb2(lang.mixin(_fb6.del,{settings:this._settings,onClick:lang.hitch(this,"_toolFinished","DELETE")}));this.addChild(this._tools.DELETE);if(this._settings.toolbarOptions){if(this._settings.toolbarOptions.cutVisible||this._settings.toolbarOptions.mergeVisible||this._settings.toolbarOptions.reshapeVisible){this._createSeparator();}if(this._settings.toolbarOptions.cutVisible){this._tools.CUT=new Cut({settings:this._settings,onFinished:lang.hitch(this,"_toolFinished","CUT"),onClick:lang.hitch(this,"_activateTool","CUT",true),onApplyEdits:lang.hitch(this,"onApplyEdits")});this.addChild(this._tools.CUT);}if(this._settings.toolbarOptions.mergeVisible){this._tools.UNION=new _fb3({settings:this._settings,onFinished:lang.hitch(this,"_toolFinished","UNION"),onApplyEdits:lang.hitch(this,"onApplyEdits")});this.addChild(this._tools.UNION);}if(this._settings.toolbarOptions.reshapeVisible){this._tools.RESHAPING=new _fb4({settings:this._settings,onClick:lang.hitch(this,"_activateTool","RESHAPING",true),onFinished:lang.hitch(this,"_toolFinished","RESHAPING"),onApplyEdits:lang.hitch(this,"onApplyEdits")});this.addChild(this._tools.RESHAPING);}}if(this._settings.enableUndoRedo){this._createSeparator();this._tools.UNDO=new _fb2(lang.mixin(_fb6.undo,{settings:this._settings,onClick:lang.hitch(this,function(){this._tools.UNDO.set("disabled",true);this._tools.REDO.set("disabled",true);this._settings.editor._undo();})}));this.addChild(this._tools.UNDO);this._tools.REDO=new _fb2(lang.mixin(_fb6.redo,{settings:this._settings,onClick:lang.hitch(this,function(){this._tools.UNDO.set("disabled",true);this._tools.REDO.set("disabled",true);this._settings.editor._redo();})}));this.addChild(this._tools.REDO);}}});if(has("extend-esri")){lang.setObject("dijit.editing.toolbars.Drawing",_fba,_fb9);}return _fba;});},"dijit/_FocusMixin":function(){define("dijit/_FocusMixin",["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],function(_fc1,_fc2,_fc3,lang){lang.extend(_fc2,{focused:false,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus();},_onBlur:function(){this.onBlur();}});return _fc3("dijit._FocusMixin",null,{_focusManager:_fc1});});},"esri/dijit/editing/tools/Reshape":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","esri/layers/FeatureLayer","esri/tasks/query","esri/toolbars/draw","esri/dijit/editing/tools/ToggleToolBase","esri/kernel"],function(_fc4,lang,_fc5,_fc6,has,_fc7,_fc8,Draw,_fc9,_fca){var _fcb=_fc4([_fc9],{declaredClass:"esri.dijit.editing.tools.Reshape",id:"btnFeatureReshape",_enabledIcon:"toolbarIcon reshapeIcon",_disabledIcon:"toolbarIcon reshapeIcon",_drawType:Draw.POLYLINE,_enabled:true,_label:"NLS_reshapeLbl",activate:function(){_fc6.disconnect(this._rConnect);this._rConnect=_fc6.connect(this._toolbar,"onDrawEnd",this,"_onDrawEnd");this.inherited(arguments);},deactivate:function(){this.inherited(arguments);_fc6.disconnect(this._rConnect);delete this._rConnect;},_onDrawEnd:function(_fcc){var _fcd=this._settings.layers;var _fce=new _fc8();_fce.geometry=_fcc;var _fcf=this._reshapeLayers=_fc5.filter(_fcd,function(_fd0){return (_fd0.geometryType==="esriGeometryPolygon"||"esriGeometryPolyline");});this._settings.editor._selectionHelper.selectFeatures(_fcf,_fce,_fc7.SELECTION_NEW,lang.hitch(this,"_reshape",_fce));},_reshape:function(_fd1,_fd2){var _fd3=[];var _fd4=_fd2;if(_fd4.length!==1){return;}this._settings.geometryService.reshape(_fd4[0].geometry,_fd1.geometry,lang.hitch(this,function(_fd5){var _fd6=[_fd4[0].setGeometry(_fd5)];this.onApplyEdits([{layer:_fd4[0].getLayer(),updates:_fd6}],lang.hitch(this,function(){this._settings.editor._selectionHelper.clearSelection(false);this.onFinished();}));}));}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.Reshape",_fcb,_fca);}return _fcb;});},"esri/dijit/editing/tools/ToggleToolBase":function(){define("esri/dijit/editing/tools/ToggleToolBase",["dojo/_base/declare","dojo/_base/lang","dojo/has","dijit/form/ToggleButton","esri/dijit/editing/tools/ToolBase","esri/kernel"],function(_fd7,lang,has,_fd8,_fd9,_fda){var TTB=_fd7([_fd8,_fd9],{declaredClass:"esri.dijit.editing.tools.ToggleToolBase",postCreate:function(){this.inherited(arguments);if(this._setShowLabelAttr){this._setShowLabelAttr(false);}},destroy:function(){_fd8.prototype.destroy.apply(this,arguments);_fd9.prototype.destroy.apply(this,arguments);},setChecked:function(_fdb){_fd8.prototype.setChecked.apply(this,arguments);}});if(has("extend-esri")){lang.setObject("dijit.editing.tools.ToggleToolBase",TTB,_fda);}return TTB;});},"dojox/grid/_Builder":function(){define("dojox/grid/_Builder",["../main","dojo/_base/array","dojo/_base/lang","dojo/_base/window","dojo/_base/event","dojo/_base/sniff","dojo/_base/connect","dojo/dnd/Moveable","dojox/html/metrics","./util","dojo/_base/html"],function(_fdc,_fdd,lang,win,_fde,has,_fdf,_fe0,_fe1,util,html){var dg=_fdc.grid;var _fe2=function(td){return td.cellIndex>=0?td.cellIndex:_fdd.indexOf(td.parentNode.cells,td);};var _fe3=function(tr){return tr.rowIndex>=0?tr.rowIndex:_fdd.indexOf(tr.parentNode.childNodes,tr);};var _fe4=function(_fe5,_fe6){return _fe5&&((_fe5.rows||0)[_fe6]||_fe5.childNodes[_fe6]);};var _fe7=function(node){for(var n=node;n&&n.tagName!="TABLE";n=n.parentNode){}return n;};var _fe8=function(_fe9,_fea){for(var n=_fe9;n&&_fea(n);n=n.parentNode){}return n;};var _feb=function(_fec){var name=_fec.toUpperCase();return function(node){return node.tagName!=name;};};var _fed=util.rowIndexTag;var _fee=util.gridViewTag;var _fef=dg._Builder=lang.extend(function(view){if(view){this.view=view;this.grid=view.grid;}},{view:null,_table:"<table class=\"dojoxGridRowTable\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" role=\"presentation\"",getTableArray:function(){var html=[this._table];if(this.view.viewWidth){html.push([" style=\"width:",this.view.viewWidth,";\""].join(""));}html.push(">");return html;},generateCellMarkup:function(_ff0,_ff1,_ff2,_ff3){var _ff4=[],html;if(_ff3){var _ff5=_ff0.index!=_ff0.grid.getSortIndex()?"":_ff0.grid.sortInfo>0?"aria-sort=\"ascending\"":"aria-sort=\"descending\"";if(!_ff0.id){_ff0.id=this.grid.id+"Hdr"+_ff0.index;}html=["<th tabIndex=\"-1\" aria-readonly=\"true\" role=\"columnheader\"",_ff5,"id=\"",_ff0.id,"\""];}else{var _ff6=this.grid.editable&&!_ff0.editable?"aria-readonly=\"true\"":"";html=["<td tabIndex=\"-1\" role=\"gridcell\"",_ff6];}if(_ff0.colSpan){html.push(" colspan=\"",_ff0.colSpan,"\"");}if(_ff0.rowSpan){html.push(" rowspan=\"",_ff0.rowSpan,"\"");}html.push(" class=\"dojoxGridCell ");if(_ff0.classes){html.push(_ff0.classes," ");}if(_ff2){html.push(_ff2," ");}_ff4.push(html.join(""));_ff4.push("");html=["\" idx=\"",_ff0.index,"\" style=\""];if(_ff1&&_ff1[_ff1.length-1]!=";"){_ff1+=";";}html.push(_ff0.styles,_ff1||"",_ff0.hidden?"display:none;":"");if(_ff0.unitWidth){html.push("width:",_ff0.unitWidth,";");}_ff4.push(html.join(""));_ff4.push("");html=["\""];if(_ff0.attrs){html.push(" ",_ff0.attrs);}html.push(">");_ff4.push(html.join(""));_ff4.push("");_ff4.push(_ff3?"</th>":"</td>");return _ff4;},isCellNode:function(_ff7){return Boolean(_ff7&&_ff7!=win.doc&&html.attr(_ff7,"idx"));},getCellNodeIndex:function(_ff8){return _ff8?Number(html.attr(_ff8,"idx")):-1;},getCellNode:function(_ff9,_ffa){for(var i=0,row;((row=_fe4(_ff9.firstChild,i))&&row.cells);i++){for(var j=0,cell;(cell=row.cells[j]);j++){if(this.getCellNodeIndex(cell)==_ffa){return cell;}}}return null;},findCellTarget:function(_ffb,_ffc){var n=_ffb;while(n&&(!this.isCellNode(n)||(n.offsetParent&&_fee in n.offsetParent.parentNode&&n.offsetParent.parentNode[_fee]!=this.view.id))&&(n!=_ffc)){n=n.parentNode;}return n!=_ffc?n:null;},baseDecorateEvent:function(e){e.dispatch="do"+e.type;e.grid=this.grid;e.sourceView=this.view;e.cellNode=this.findCellTarget(e.target,e.rowNode);e.cellIndex=this.getCellNodeIndex(e.cellNode);e.cell=(e.cellIndex>=0?this.grid.getCell(e.cellIndex):null);},findTarget:function(_ffd,_ffe){var n=_ffd;while(n&&(n!=this.domNode)&&(!(_ffe in n)||(_fee in n&&n[_fee]!=this.view.id))){n=n.parentNode;}return (n!=this.domNode)?n:null;},findRowTarget:function(_fff){return this.findTarget(_fff,_fed);},isIntraNodeEvent:function(e){try{return (e.cellNode&&e.relatedTarget&&html.isDescendant(e.relatedTarget,e.cellNode));}catch(x){return false;}},isIntraRowEvent:function(e){try{var row=e.relatedTarget&&this.findRowTarget(e.relatedTarget);return !row&&(e.rowIndex==-1)||row&&(e.rowIndex==row.gridRowIndex);}catch(x){return false;}},dispatchEvent:function(e){if(e.dispatch in this){return this[e.dispatch](e);}return false;},domouseover:function(e){if(e.cellNode&&(e.cellNode!=this.lastOverCellNode)){this.lastOverCellNode=e.cellNode;this.grid.onMouseOver(e);}this.grid.onMouseOverRow(e);},domouseout:function(e){if(e.cellNode&&(e.cellNode==this.lastOverCellNode)&&!this.isIntraNodeEvent(e,this.lastOverCellNode)){this.lastOverCellNode=null;this.grid.onMouseOut(e);if(!this.isIntraRowEvent(e)){this.grid.onMouseOutRow(e);}}},domousedown:function(e){if(e.cellNode){this.grid.onMouseDown(e);}this.grid.onMouseDownRow(e);}});var _1000=dg._ContentBuilder=lang.extend(function(view){_fef.call(this,view);},_fef.prototype,{update:function(){this.prepareHtml();},prepareHtml:function(){var _1001=this.grid.get,cells=this.view.structure.cells;for(var j=0,row;(row=cells[j]);j++){for(var i=0,cell;(cell=row[i]);i++){cell.get=cell.get||(cell.value==undefined)&&_1001;cell.markup=this.generateCellMarkup(cell,cell.cellStyles,cell.cellClasses,false);if(!this.grid.editable&&cell.editable){this.grid.editable=true;}}}},generateHtml:function(_1002,_1003){var html=this.getTableArray(),v=this.view,cells=v.structure.cells,item=this.grid.getItem(_1003);util.fire(this.view,"onBeforeRow",[_1003,cells]);for(var j=0,row;(row=cells[j]);j++){if(row.hidden||row.header){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,m,cc,cs;(cell=row[i]);i++){m=cell.markup;cc=cell.customClasses=[];cs=cell.customStyles=[];m[5]=cell.format(_1003,item);m[1]=cc.join(" ");m[3]=cs.join(";");html.push.apply(html,m);}html.push("</tr>");}html.push("</table>");return html.join("");},decorateEvent:function(e){e.rowNode=this.findRowTarget(e.target);if(!e.rowNode){return false;}e.rowIndex=e.rowNode[_fed];this.baseDecorateEvent(e);e.cell=this.grid.getCell(e.cellIndex);return true;}});var _1004=dg._HeaderBuilder=lang.extend(function(view){this.moveable=null;_fef.call(this,view);},_fef.prototype,{_skipBogusClicks:false,overResizeWidth:4,minColWidth:1,update:function(){if(this.tableMap){this.tableMap.mapRows(this.view.structure.cells);}else{this.tableMap=new dg._TableMap(this.view.structure.cells);}},generateHtml:function(_1005,_1006){var html=this.getTableArray(),cells=this.view.structure.cells;util.fire(this.view,"onBeforeRow",[-1,cells]);for(var j=0,row;(row=cells[j]);j++){if(row.hidden){continue;}html.push(!row.invisible?"<tr>":"<tr class=\"dojoxGridInvisible\">");for(var i=0,cell,_1007;(cell=row[i]);i++){cell.customClasses=[];cell.customStyles=[];if(this.view.simpleStructure){if(cell.draggable){if(cell.headerClasses){if(cell.headerClasses.indexOf("dojoDndItem")==-1){cell.headerClasses+=" dojoDndItem";}}else{cell.headerClasses="dojoDndItem";}}if(cell.attrs){if(cell.attrs.indexOf("dndType='gridColumn_")==-1){cell.attrs+=" dndType='gridColumn_"+this.grid.id+"'";}}else{cell.attrs="dndType='gridColumn_"+this.grid.id+"'";}}_1007=this.generateCellMarkup(cell,cell.headerStyles,cell.headerClasses,true);_1007[5]=(_1006!=undefined?_1006:_1005(cell));_1007[3]=cell.customStyles.join(";");_1007[1]=cell.customClasses.join(" ");html.push(_1007.join(""));}html.push("</tr>");}html.push("</table>");return html.join("");},getCellX:function(e){var n,x=e.layerX;if(has("mozilla")||has("ie")>=9){n=_fe8(e.target,_feb("th"));x-=(n&&n.offsetLeft)||0;var t=e.sourceView.getScrollbarWidth();if(!this.grid.isLeftToRight()){table=_fe8(n,_feb("table"));x-=(table&&table.offsetLeft)||0;}}n=_fe8(e.target,function(){if(!n||n==e.cellNode){return false;}x+=(n.offsetLeft<0?0:n.offsetLeft);return true;});return x;},decorateEvent:function(e){this.baseDecorateEvent(e);e.rowIndex=-1;e.cellX=this.getCellX(e);return true;},prepareResize:function(e,mod){do{var i=e.cellIndex;e.cellNode=(i?e.cellNode.parentNode.cells[i+mod]:null);e.cellIndex=(e.cellNode?this.getCellNodeIndex(e.cellNode):-1);}while(e.cellNode&&e.cellNode.style.display=="none");return Boolean(e.cellNode);},canResize:function(e){if(!e.cellNode||e.cellNode.colSpan>1){return false;}var cell=this.grid.getCell(e.cellIndex);return !cell.noresize&&cell.canResize();},overLeftResizeArea:function(e){if(html.hasClass(win.body(),"dojoDndMove")){return false;}if(has("ie")){var tN=e.target;if(html.hasClass(tN,"dojoxGridArrowButtonNode")||html.hasClass(tN,"dojoxGridArrowButtonChar")||html.hasClass(tN,"dojoxGridColCaption")){return false;}}if(this.grid.isLeftToRight()){return (e.cellIndex>0)&&(e.cellX>0&&e.cellX<this.overResizeWidth)&&this.prepareResize(e,-1);}var t=e.cellNode&&(e.cellX>0&&e.cellX<this.overResizeWidth);return t;},overRightResizeArea:function(e){if(html.hasClass(win.body(),"dojoDndMove")){return false;}if(has("ie")){var tN=e.target;if(html.hasClass(tN,"dojoxGridArrowButtonNode")||html.hasClass(tN,"dojoxGridArrowButtonChar")||html.hasClass(tN,"dojoxGridColCaption")){return false;}}if(this.grid.isLeftToRight()){return e.cellNode&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth);}return (e.cellIndex>0)&&(e.cellX>=e.cellNode.offsetWidth-this.overResizeWidth)&&this.prepareResize(e,-1);},domousemove:function(e){if(!this.moveable){var c=(this.overRightResizeArea(e)?"dojoxGridColResize":(this.overLeftResizeArea(e)?"dojoxGridColResize":""));if(c&&!this.canResize(e)){c="dojoxGridColNoResize";}html.toggleClass(e.sourceView.headerNode,"dojoxGridColNoResize",(c=="dojoxGridColNoResize"));html.toggleClass(e.sourceView.headerNode,"dojoxGridColResize",(c=="dojoxGridColResize"));if(c){_fde.stop(e);}}},domousedown:function(e){if(!this.moveable){if((this.overRightResizeArea(e)||this.overLeftResizeArea(e))&&this.canResize(e)){this.beginColumnResize(e);}else{this.grid.onMouseDown(e);this.grid.onMouseOverRow(e);}}},doclick:function(e){if(this._skipBogusClicks){_fde.stop(e);return true;}return false;},colResizeSetup:function(e,_1008){var _1009=html.contentBox(e.sourceView.headerNode);if(_1008){this.lineDiv=document.createElement("div");var vw=html.position(e.sourceView.headerNode,true);var _100a=html.contentBox(e.sourceView.domNode);var l=e.pageX;if(!this.grid.isLeftToRight()&&has("ie")<8){l-=_fe1.getScrollbar().w;}html.style(this.lineDiv,{top:vw.y+"px",left:l+"px",height:(_100a.h+_1009.h)+"px"});html.addClass(this.lineDiv,"dojoxGridResizeColLine");this.lineDiv._origLeft=l;win.body().appendChild(this.lineDiv);}var _100b=[],nodes=this.tableMap.findOverlappingNodes(e.cellNode);for(var i=0,cell;(cell=nodes[i]);i++){_100b.push({node:cell,index:this.getCellNodeIndex(cell),width:cell.offsetWidth});}var view=e.sourceView;var adj=this.grid.isLeftToRight()?1:-1;var views=e.grid.views.views;var _100c=[];for(var j=view.idx+adj,cView;(cView=views[j]);j=j+adj){_100c.push({node:cView.headerNode,left:window.parseInt(cView.headerNode.style.left)});}var table=view.headerContentNode.firstChild;var drag={scrollLeft:e.sourceView.headerNode.scrollLeft,view:view,node:e.cellNode,index:e.cellIndex,w:html.contentBox(e.cellNode).w,vw:_1009.w,table:table,tw:html.contentBox(table).w,spanners:_100b,followers:_100c};return drag;},beginColumnResize:function(e){this.moverDiv=document.createElement("div");html.style(this.moverDiv,{position:"absolute",left:0});win.body().appendChild(this.moverDiv);html.addClass(this.grid.domNode,"dojoxGridColumnResizing");var m=(this.moveable=new _fe0(this.moverDiv));var drag=this.colResizeSetup(e,true);m.onMove=lang.hitch(this,"doResizeColumn",drag);_fdf.connect(m,"onMoveStop",lang.hitch(this,function(){this.endResizeColumn(drag);if(drag.node.releaseCapture){drag.node.releaseCapture();}this.moveable.destroy();delete this.moveable;this.moveable=null;html.removeClass(this.grid.domNode,"dojoxGridColumnResizing");}));if(e.cellNode.setCapture){e.cellNode.setCapture();}m.onMouseDown(e);},doResizeColumn:function(_100d,mover,_100e){var _100f=_100e.l;var data={deltaX:_100f,w:_100d.w+(this.grid.isLeftToRight()?_100f:-_100f),vw:_100d.vw+_100f,tw:_100d.tw+_100f};this.dragRecord={inDrag:_100d,mover:mover,leftTop:_100e};if(data.w>=this.minColWidth){if(!mover){this.doResizeNow(_100d,data);}else{html.style(this.lineDiv,"left",(this.lineDiv._origLeft+data.deltaX)+"px");}}},endResizeColumn:function(_1010){if(this.dragRecord){var _1011=this.dragRecord.leftTop;var _1012=this.grid.isLeftToRight()?_1011.l:-_1011.l;_1012+=Math.max(_1010.w+_1012,this.minColWidth)-(_1010.w+_1012);if(has("webkit")&&_1010.spanners.length){_1012+=html._getPadBorderExtents(_1010.spanners[0].node).w;}var data={deltaX:_1012,w:_1010.w+_1012,vw:_1010.vw+_1012,tw:_1010.tw+_1012};this.doResizeNow(_1010,data);delete this.dragRecord;}html.destroy(this.lineDiv);html.destroy(this.moverDiv);html.destroy(this.moverDiv);delete this.moverDiv;this._skipBogusClicks=true;_1010.view.update();this._skipBogusClicks=false;this.grid.onResizeColumn(_1010.index);},doResizeNow:function(_1013,data){_1013.view.convertColPctToFixed();if(_1013.view.flexCells&&!_1013.view.testFlexCells()){var t=_fe7(_1013.node);if(t){(t.style.width="");}}var i,s,sw,f,fl;for(i=0;(s=_1013.spanners[i]);i++){sw=s.width+data.deltaX;if(sw>0){s.node.style.width=sw+"px";_1013.view.setColWidth(s.index,sw);}}if(this.grid.isLeftToRight()||!has("ie")){for(i=0;(f=_1013.followers[i]);i++){fl=f.left+data.deltaX;f.node.style.left=fl+"px";}}_1013.node.style.width=data.w+"px";_1013.view.setColWidth(_1013.index,data.w);_1013.view.headerNode.style.width=data.vw+"px";_1013.view.setColumnsWidth(data.tw);if(!this.grid.isLeftToRight()){_1013.view.headerNode.scrollLeft=_1013.scrollLeft+data.deltaX;}}});dg._TableMap=lang.extend(function(rows){this.mapRows(rows);},{map:null,mapRows:function(_1014){var _1015=_1014.length;if(!_1015){return;}this.map=[];var row;for(var k=0;(row=_1014[k]);k++){this.map[k]=[];}for(var j=0;(row=_1014[j]);j++){for(var i=0,x=0,cell,_1016,_1017;(cell=row[i]);i++){while(this.map[j][x]){x++;}this.map[j][x]={c:i,r:j};_1017=cell.rowSpan||1;_1016=cell.colSpan||1;for(var y=0;y<_1017;y++){for(var s=0;s<_1016;s++){this.map[j+y][x+s]=this.map[j][x];}}x+=_1016;}}},dumpMap:function(){for(var j=0,row,h="";(row=this.map[j]);j++,h=""){for(var i=0,cell;(cell=row[i]);i++){h+=cell.r+","+cell.c+"   ";}}},getMapCoords:function(inRow,inCol){for(var j=0,row;(row=this.map[j]);j++){for(var i=0,cell;(cell=row[i]);i++){if(cell.c==inCol&&cell.r==inRow){return {j:j,i:i};}}}return {j:-1,i:-1};},getNode:function(_1018,inRow,inCol){var row=_1018&&_1018.rows[inRow];return row&&row.cells[inCol];},_findOverlappingNodes:function(_1019,inRow,inCol){var nodes=[];var m=this.getMapCoords(inRow,inCol);for(var j=0,row;(row=this.map[j]);j++){if(j==m.j){continue;}var rw=row[m.i];var n=(rw?this.getNode(_1019,rw.r,rw.c):null);if(n){nodes.push(n);}}return nodes;},findOverlappingNodes:function(_101a){return this._findOverlappingNodes(_fe7(_101a),_fe3(_101a.parentNode),_fe2(_101a));}});return {_Builder:_fef,_HeaderBuilder:_1004,_ContentBuilder:_1000};});},"dijit/form/FilteringSelect":function(){define("dijit/form/FilteringSelect",["dojo/data/util/filter","dojo/_base/declare","dojo/_base/lang","dojo/when","./MappedTextBox","./ComboBoxMixin"],function(_101b,_101c,lang,when,_101d,_101e){return _101c("dijit.form.FilteringSelect",[_101d,_101e],{required:true,_lastDisplayedValue:"",_isValidSubset:function(){return this._opened;},isValid:function(){return !!this.item||(!this.required&&this.get("displayedValue")=="");},_refreshState:function(){if(!this.searchTimer){this.inherited(arguments);}},_callbackSetLabel:function(_101f,query,_1020,_1021){if((query&&query[this.searchAttr]!==this._lastQuery)||(!query&&_101f.length&&this.store.getIdentity(_101f[0])!=this._lastQuery)){return;}if(!_101f.length){this.set("value","",_1021||(_1021===undefined&&!this.focused),this.textbox.value,null);}else{this.set("item",_101f[0],_1021);}},_openResultList:function(_1022,query,_1023){if(query[this.searchAttr]!==this._lastQuery){return;}this.inherited(arguments);if(this.item===undefined){this.validate(true);}},_getValueAttr:function(){return this.valueNode.value;},_getValueField:function(){return "value";},_setValueAttr:function(value,_1024,_1025,item){if(!this._onChangeActive){_1024=null;}if(item===undefined){if(value===null||value===""){value="";if(!lang.isString(_1025)){this._setDisplayedValueAttr(_1025||"",_1024);return;}}var self=this;this._lastQuery=value;when(this.store.get(value),function(item){self._callbackSetLabel(item?[item]:[],undefined,undefined,_1024);});}else{this.valueNode.value=value;this.inherited(arguments);}},_setItemAttr:function(item,_1026,_1027){this.inherited(arguments);this._lastDisplayedValue=this.textbox.value;},_getDisplayQueryString:function(text){return text.replace(/([\\\*\?])/g,"\\$1");},_setDisplayedValueAttr:function(label,_1028){if(label==null){label="";}if(!this._created){if(!("displayedValue" in this.params)){return;}_1028=false;}if(this.store){this.closeDropDown();var query=lang.clone(this.query);var qs=this._getDisplayQueryString(label),q;if(this.store._oldAPI){q=qs;}else{q=_101b.patternToRegExp(qs,this.ignoreCase);q.toString=function(){return qs;};}this._lastQuery=query[this.searchAttr]=q;this.textbox.value=label;this._lastDisplayedValue=label;this._set("displayedValue",label);var _1029=this;var _102a={ignoreCase:this.ignoreCase,deep:true};lang.mixin(_102a,this.fetchProperties);this._fetchHandle=this.store.query(query,_102a);when(this._fetchHandle,function(_102b){_1029._fetchHandle=null;_1029._callbackSetLabel(_102b||[],query,_102a,_1028);},function(err){_1029._fetchHandle=null;if(!_1029._cancelingQuery){console.error("dijit.form.FilteringSelect: "+err.toString());}});}},undo:function(){this.set("displayedValue",this._lastDisplayedValue);}});});},"dojox/grid/_EditManager":function(){define("dojox/grid/_EditManager",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/connect","dojo/_base/sniff","./util"],function(lang,array,_102c,_102d,has,util){return _102c("dojox.grid._EditManager",null,{constructor:function(_102e){this.grid=_102e;if(has("ie")){this.connections=[_102d.connect(document.body,"onfocus",lang.hitch(this,"_boomerangFocus"))];}else{this.connections=[_102d.connect(this.grid,"onBlur",this,"apply")];}},info:{},destroy:function(){array.forEach(this.connections,_102d.disconnect);},cellFocus:function(_102f,_1030){if(this.grid.singleClickEdit||this.isEditRow(_1030)){this.setEditCell(_102f,_1030);}else{this.apply();}if(this.isEditing()||(_102f&&_102f.editable&&_102f.alwaysEditing)){this._focusEditor(_102f,_1030);}},rowClick:function(e){if(this.isEditing()&&!this.isEditRow(e.rowIndex)){this.apply();}},styleRow:function(inRow){if(inRow.index==this.info.rowIndex){inRow.customClasses+=" dojoxGridRowEditing";}},dispatchEvent:function(e){var c=e.cell,ed=(c&&c["editable"])?c:0;return ed&&ed.dispatchEvent(e.dispatch,e);},isEditing:function(){return this.info.rowIndex!==undefined;},isEditCell:function(_1031,_1032){return (this.info.rowIndex===_1031)&&(this.info.cell.index==_1032);},isEditRow:function(_1033){return this.info.rowIndex===_1033;},setEditCell:function(_1034,_1035){if(!this.isEditCell(_1035,_1034.index)&&this.grid.canEdit&&this.grid.canEdit(_1034,_1035)){this.start(_1034,_1035,this.isEditRow(_1035)||_1034.editable);}},_focusEditor:function(_1036,_1037){util.fire(_1036,"focus",[_1037]);},focusEditor:function(){if(this.isEditing()){this._focusEditor(this.info.cell,this.info.rowIndex);}},_boomerangWindow:500,_shouldCatchBoomerang:function(){return this._catchBoomerang>new Date().getTime();},_boomerangFocus:function(){if(this._shouldCatchBoomerang()){this.grid.focus.focusGrid();this.focusEditor();this._catchBoomerang=0;}},_doCatchBoomerang:function(){if(has("ie")){this._catchBoomerang=new Date().getTime()+this._boomerangWindow;}},start:function(_1038,_1039,_103a){if(!this._isValidInput()){return;}this.grid.beginUpdate();this.editorApply();if(this.isEditing()&&!this.isEditRow(_1039)){this.applyRowEdit();this.grid.updateRow(_1039);}if(_103a){this.info={cell:_1038,rowIndex:_1039};this.grid.doStartEdit(_1038,_1039);this.grid.updateRow(_1039);}else{this.info={};}this.grid.endUpdate();this.grid.focus.focusGrid();this._focusEditor(_1038,_1039);this._doCatchBoomerang();},_editorDo:function(_103b){var c=this.info.cell;if(c&&c.editable){c[_103b](this.info.rowIndex);}},editorApply:function(){this._editorDo("apply");},editorCancel:function(){this._editorDo("cancel");},applyCellEdit:function(_103c,_103d,_103e){if(this.grid.canEdit(_103d,_103e)){this.grid.doApplyCellEdit(_103c,_103e,_103d.field);}},applyRowEdit:function(){this.grid.doApplyEdit(this.info.rowIndex,this.info.cell.field);},apply:function(){if(this.isEditing()&&this._isValidInput()){this.grid.beginUpdate();this.editorApply();this.applyRowEdit();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},cancel:function(){if(this.isEditing()){this.grid.beginUpdate();this.editorCancel();this.info={};this.grid.endUpdate();this.grid.focus.focusGrid();this._doCatchBoomerang();}},save:function(_103f,_1040){var c=this.info.cell;if(this.isEditRow(_103f)&&(!_1040||c.view==_1040)&&c.editable){c.save(c,this.info.rowIndex);}},restore:function(_1041,_1042){var c=this.info.cell;if(this.isEditRow(_1042)&&c.view==_1041&&c.editable){c.restore(this.info.rowIndex);}},_isValidInput:function(){var w=(this.info.cell||{}).widget;if(!w||!w.isValid){return true;}w.focused=true;return w.isValid(true);}});});},"esri/OperationBase":function(){define("esri/OperationBase",["dojo/_base/declare","dojo/has","esri/kernel"],function(_1043,has,_1044){var _1045=_1043(null,{declaredClass:"esri.OperationBase",type:"not implemented",label:"not implemented",constructor:function(_1046){_1046=_1046||{};if(_1046.label){this.label=_1046.label;}},performUndo:function(){console.log("performUndo has not been implemented");},performRedo:function(){console.log("performRedo has not been implemented");}});if(has("extend-esri")){_1044.OperationBase=_1045;}return _1045;});},"dojo/data/util/sorter":function(){define(["../../_base/lang"],function(lang){var _1047={};lang.setObject("dojo.data.util.sorter",_1047);_1047.basicComparator=function(a,b){var r=-1;if(a===null){a=undefined;}if(b===null){b=undefined;}if(a==b){r=0;}else{if(a>b||a==null){r=1;}}return r;};_1047.createSortFunction=function(_1048,store){var _1049=[];function _104a(attr,dir,comp,s){return function(itemA,itemB){var a=s.getValue(itemA,attr);var b=s.getValue(itemB,attr);return dir*comp(a,b);};};var _104b;var map=store.comparatorMap;var bc=_1047.basicComparator;for(var i=0;i<_1048.length;i++){_104b=_1048[i];var attr=_104b.attribute;if(attr){var dir=(_104b.descending)?-1:1;var comp=bc;if(map){if(typeof attr!=="string"&&("toString" in attr)){attr=attr.toString();}comp=map[attr]||bc;}_1049.push(_104a(attr,dir,comp,store));}}return function(rowA,rowB){var i=0;while(i<_1049.length){var ret=_1049[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};return _1047;});},"dijit/form/_ButtonMixin":function(){define("dijit/form/_ButtonMixin",["dojo/_base/declare","dojo/dom","dojo/_base/event","../registry"],function(_104c,dom,event,_104d){return _104c("dijit.form._ButtonMixin",null,{label:"",type:"button",_onClick:function(e){if(this.disabled){event.stop(e);return false;}var _104e=this.onClick(e)===false;if(!_104e&&this.type=="submit"&&!(this.valueNode||this.focusNode).form){for(var node=this.domNode;node.parentNode;node=node.parentNode){var _104f=_104d.byNode(node);if(_104f&&typeof _104f._onSubmit=="function"){_104f._onSubmit(e);_104e=true;break;}}}if(_104e){e.preventDefault();}return !_104e;},postCreate:function(){this.inherited(arguments);dom.setSelectable(this.focusNode,false);},onClick:function(){return true;},_setLabelAttr:function(_1050){this._set("label",_1050);(this.containerNode||this.focusNode).innerHTML=_1050;}});});},"dojo/colors":function(){define(["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(dojo,lang,Color,_1051){var _1052={};lang.setObject("dojo.colors",_1052);var _1053=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=Color.fromRgb=function(color,obj){var m=color.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=_1051.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return Color.fromArray(a,obj);}return Color.fromArray(c,obj);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_1053(m1,m2,H+1/3)*256,_1053(m1,m2,H)*256,_1053(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return Color.fromArray(a,obj);}}return null;};var _1054=function(c,low,high){c=Number(c);return isNaN(c)?high:c<low?low:c>high?high:c;};Color.prototype.sanitize=function(){var t=this;t.r=Math.round(_1054(t.r,0,255));t.g=Math.round(_1054(t.g,0,255));t.b=Math.round(_1054(t.b,0,255));t.a=_1054(t.a,0,1);return this;};_1052.makeGrey=Color.makeGrey=function(g,a){return Color.fromArray([g,g,g,a]);};lang.mixin(Color.named,{"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"blanchedalmond":[255,235,205],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"oldlace":[253,245,230],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"whitesmoke":[245,245,245],"yellowgreen":[154,205,50]});return Color;});},"url:dijit/form/templates/Spinner.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\" role=\"presentation\"\n\t><div class=\"dijitReset dijitButtonNode dijitSpinnerButtonContainer\"\n\t\t><input class=\"dijitReset dijitInputField dijitSpinnerButtonInner\" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t/><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton\"\n\t\t\tdata-dojo-attach-point=\"upArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9650; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t\t><div class=\"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton\"\n\t\t\tdata-dojo-attach-point=\"downArrowNode\"\n\t\t\t><div class=\"dijitArrowButtonInner\"\n\t\t\t\t><input class=\"dijitReset dijitInputField\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/></div\n\t\t></div\n\t></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' data-dojo-attach-point=\"textbox,focusNode\" type=\"${type}\" data-dojo-attach-event=\"onkeypress:_onKeyPress\"\n\t\t\trole=\"spinbutton\" autocomplete=\"off\" ${!nameAttrSetting}\n\t/></div\n></div>\n","url:dojox/grid/resources/View.html":"<div class=\"dojoxGridView\" role=\"presentation\">\n\t<div class=\"dojoxGridHeader\" dojoAttachPoint=\"headerNode\" role=\"presentation\">\n\t\t<div dojoAttachPoint=\"headerNodeContainer\" style=\"width:9000em\" role=\"presentation\">\n\t\t\t<div dojoAttachPoint=\"headerContentNode\" role=\"row\"></div>\n\t\t</div>\n\t</div>\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" dojoAttachPoint=\"hiddenFocusNode\" role=\"presentation\" />\n\t<input type=\"checkbox\" class=\"dojoxGridHiddenFocus\" role=\"presentation\" />\n\t<div class=\"dojoxGridScrollbox\" dojoAttachPoint=\"scrollboxNode\" role=\"presentation\">\n\t\t<div class=\"dojoxGridContent\" dojoAttachPoint=\"contentNode\" hidefocus=\"hidefocus\" role=\"presentation\"></div>\n\t</div>\n</div>\n","dojox/date/islamic/Date":function(){define("dojox/date/islamic/Date",["dojo/_base/lang","dojo/_base/declare","dojo/date"],function(lang,_1055,dd){var IDate=_1055("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 len=arguments.length;if(!len){this.fromGregorian(new Date());}else{if(len==1){var arg0=arguments[0];if(typeof arg0=="number"){arg0=new Date(arg0);}if(arg0 instanceof Date){this.fromGregorian(arg0);}else{if(arg0==""){this._date=new Date("");}else{this._year=arg0._year;this._month=arg0._month;this._date=arg0._date;this._hours=arg0._hours;this._minutes=arg0._minutes;this._seconds=arg0._seconds;this._milliseconds=arg0._milliseconds;}}}else{if(len>=3){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;}}}},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(date){date=parseInt(date);if(date>0&&date<=this.getDaysInIslamicMonth(this._month,this._year)){this._date=date;}else{var mdays;if(date>0){for(mdays=this.getDaysInIslamicMonth(this._month,this._year);date>mdays;date-=mdays,mdays=this.getDaysInIslamicMonth(this._month,this._year)){this._month++;if(this._month>=12){this._year++;this._month-=12;}}this._date=date;}else{for(mdays=this.getDaysInIslamicMonth((this._month-1)>=0?(this._month-1):11,((this._month-1)>=0)?this._year:this._year-1);date<=0;mdays=this.getDaysInIslamicMonth((this._month-1)>=0?(this._month-1):11,((this._month-1)>=0)?this._year:this._year-1)){this._month--;if(this._month<0){this._year--;this._month+=12;}date+=mdays;}this._date=date;}}return this;},setFullYear:function(year){this._year=+year;},setMonth:function(month){this._year+=Math.floor(month/12);if(month>0){this._month=Math.floor(month%12);}else{this._month=Math.floor(((month%12)+12)%12);}},setHours:function(){var _1056=arguments.length;var hours=0;if(_1056>=1){hours=parseInt(arguments[0]);}if(_1056>=2){this._minutes=parseInt(arguments[1]);}if(_1056>=3){this._seconds=parseInt(arguments[2]);}if(_1056==4){this._milliseconds=parseInt(arguments[3]);}while(hours>=24){this._date++;var mdays=this.getDaysInIslamicMonth(this._month,this._year);if(this._date>mdays){this._month++;if(this._month>=12){this._year++;this._month-=12;}this._date-=mdays;}hours-=24;}this._hours=hours;},_addMinutes:function(_1057){_1057+=this._minutes;this.setMinutes(_1057);this.setHours(this._hours+parseInt(_1057/60));return this;},_addSeconds:function(_1058){_1058+=this._seconds;this.setSeconds(_1058);this._addMinutes(parseInt(_1058/60));return this;},_addMilliseconds:function(_1059){_1059+=this._milliseconds;this.setMilliseconds(_1059);this._addSeconds(parseInt(_1059/1000));return this;},setMinutes:function(_105a){this._minutes=_105a%60;return this;},setSeconds:function(_105b){this._seconds=_105b%60;return this;},setMilliseconds:function(_105c){this._milliseconds=_105c%1000;return this;},toString:function(){if(isNaN(this._date)){return "Invalidate Date";}else{var x=new Date();x.setHours(this._hours);x.setMinutes(this._minutes);x.setSeconds(this._seconds);x.setMilliseconds(this._milliseconds);return this._month+" "+this._date+" "+this._year+" "+x.toTimeString();}},toGregorian:function(){var hYear=this._year;var _105d=this._month;var hDate=this._date;var _105e=hDate+Math.ceil(29.5*_105d)+(hYear-1)*354+Math.floor((3+(11*hYear))/30)+this._ISLAMIC_EPOCH-1;var wjd=Math.floor(_105e-0.5)+0.5,_105f=wjd-this._GREGORIAN_EPOCH,_1060=Math.floor(_105f/146097),dqc=this._mod(_105f,146097),cent=Math.floor(dqc/36524),dcent=this._mod(dqc,36524),quad=Math.floor(dcent/1461),dquad=this._mod(dcent,1461),_1061=Math.floor(dquad/365),year=(_1060*400)+(cent*100)+(quad*4)+_1061;if(!(cent==4||_1061==4)){year++;}var _1062=this._GREGORIAN_EPOCH+(365*(year-1))+Math.floor((year-1)/4)-(Math.floor((year-1)/100))+Math.floor((year-1)/400);var _1063=wjd-_1062;var tjd=(this._GREGORIAN_EPOCH-1)+(365*(year-1))+Math.floor((year-1)/4)-(Math.floor((year-1)/100))+Math.floor((year-1)/400)+Math.floor((739/12)+((dd.isLeapYear(new Date(year,3,1))?-1:-2))+1);var _1064=((wjd<tjd)?0:(dd.isLeapYear(new Date(year,3,1))?1:2));var month=Math.floor((((_1063+_1064)*12)+373)/367);var tjd2=(this._GREGORIAN_EPOCH-1)+(365*(year-1))+Math.floor((year-1)/4)-(Math.floor((year-1)/100))+Math.floor((year-1)/400)+Math.floor((((367*month)-362)/12)+((month<=2)?0:(dd.isLeapYear(new Date(year,month,1))?-1:-2))+1);var day=(wjd-tjd2)+1;var gdate=new Date(year,(month-1),day,this._hours,this._minutes,this._seconds,this._milliseconds);return gdate;},fromGregorian:function(gdate){var date=new Date(gdate);var gYear=date.getFullYear(),_1065=date.getMonth(),gDay=date.getDate();var _1066=(this._GREGORIAN_EPOCH-1)+(365*(gYear-1))+Math.floor((gYear-1)/4)+(-Math.floor((gYear-1)/100))+Math.floor((gYear-1)/400)+Math.floor((((367*(_1065+1))-362)/12)+(((_1065+1)<=2)?0:(dd.isLeapYear(date)?-1:-2))+gDay);_1066=Math.floor(_1066)+0.5;var days=_1066-this._ISLAMIC_EPOCH;var hYear=Math.floor((30*days+10646)/10631);var _1067=Math.ceil((days-29-this._yearStart(hYear))/29.5);_1067=Math.min(_1067,11);var hDay=Math.ceil(days-this._monthStart(hYear,_1067))+1;this._date=hDay;this._month=_1067;this._year=hYear;this._hours=date.getHours();this._minutes=date.getMinutes();this._seconds=date.getSeconds();this._milliseconds=date.getMilliseconds();this._day=date.getDay();return this;},valueOf:function(){return this.toGregorian().valueOf();},_yearStart:function(year){return (year-1)*354+Math.floor((3+11*year)/30);},_monthStart:function(year,month){return Math.ceil(29.5*month)+(year-1)*354+Math.floor((3+11*year)/30);},_civilLeapYear:function(year){return (14+11*year)%30<11;},getDaysInIslamicMonth:function(month,year){var _1068=0;_1068=29+((month+1)%2);if(month==11&&this._civilLeapYear(year)){_1068++;}return _1068;},_mod:function(a,b){return a-(b*Math.floor(a/b));}});IDate.getDaysInIslamicMonth=function(month){return new IDate().getDaysInIslamicMonth(month.getMonth(),month.getFullYear());};return IDate;});},"esri/dijit/editing/TemplatePicker":function(){define(["require","dojo/_base/declare","dojo/_base/lang","dojo/_base/connect","dojo/_base/html","dojo/_base/array","dojo/_base/json","dojo/_base/kernel","dojo/has","dojo/query","dojo/sniff","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dijit/_Widget","dijit/_Templated","dojo/data/ItemFileReadStore","dojox/grid/DataGrid","dojox/gfx","esri/layers/FeatureLayer","esri/symbols/PictureMarkerSymbol","esri/dijit/editing/TemplatePickerItem","esri/kernel","esri/lang","esri/request","esri/dijit/_EventedWidget","dojo/i18n!esri/nls/jsapi","dojo/text!esri/dijit/editing/templates/TemplatePicker.html"],function(_1069,_106a,lang,_106b,html,array,_106c,_106d,has,query,sniff,_106e,_106f,_1070,_1071,_1072,_1073,_1074,_1075,gfx,_1076,_1077,_1078,_1079,_107a,_107b,_107c,_107d,_107e){var TP=_106a([_107c,_1072,_1073],{declaredClass:"esri.dijit.editing.TemplatePicker",widgetsInTemplate:true,templateString:_107e,basePath:_1069.toUrl("esri/dijit/editing")+"/",featureLayers:null,items:null,grouping:true,showTooltip:false,maxLabelLength:0,rows:4,_rows:0,columns:3,surfaceWidth:30,surfaceHeight:30,emptyMessage:"",useLegend:true,legendCache:{},_uniqueId:{id:0},_assumedCellWidth:90,_initialAutoWidth:300,_initialAutoHeight:200,_ieTimer:150,constructor:function(_107f,_1080){_107f=_107f||{};if(!_107f.items&&!_107f.featureLayers){console.error("TemplatePicker: please provide 'featureLayers' or 'items' parameter in the constructor");}this._dojo14x=(_106d.version.minor>=4);this._itemWidgets={};if(_107f.featureLayers&&_107f.featureLayers.length){this._flChanged=1;}this._nls=_107d.widgets.templatePicker;this.emptyMessage=_107f.emptyMessage||(this._nls&&this._nls.creationDisabled)||"";},postMixInProperties:function(){this.inherited(arguments);this._preprocess();},startup:function(){this.inherited(arguments);if(this.rows==="auto"&&this.columns==="auto"){var box=_1070.getContentBox(this.domNode);if(!box.w){this.domNode.style.width=this._initialAutoWidth+"px";}if(!box.h){this.domNode.style.height=this._initialAutoHeight+"px";}box=_1070.getContentBox(this.domNode);this._columns=Math.floor(box.w/this._assumedCellWidth)||1;}this._applyGridPatches();this._setGridLayout();_106b.connect(this.grid,"onRowClick",this,this._rowClicked);this._setGridData();this._toggleTooltip();if(has("ie")<9){this._repaintItems=lang.hitch(this,this._repaintItems);setTimeout(this._repaintItems,this._ieTimer);}},destroy:function(){this.showTooltip=false;this._toggleTooltip();this._clearLegendInfo();this.featureLayers=this.items=this.grid=this._flItems=this._itItems=this._groupRowIndices=this._selectedCell=this._selectedInfo=this._selectedItem=null;this.inherited(arguments);},getSelected:function(){return this._selectedCell?this._selectedItem:null;},clearSelection:function(){var _1081=this._selectedCell,info=this._selectedInfo;if(_1081){this._rowClicked({cellNode:_1081,rowIndex:info.selRow,cellIndex:info.selCol});}},update:function(_1082){var _1083=(this.rows==="auto"&&this.columns==="auto"&&_1082)?true:false,grid=this.grid,box;if(_1083){var _1084=this.domNode,id=_1084.id,width,item=_106d.query("#"+id+".templatePicker div.item")[0];box=_1070.getContentBox(_1084);item=item&&item.parentNode;if(item){width=html.coords(item).w;}else{width=this._assumedCellWidth;}this._columns=Math.floor((box.w-grid.views.views[0].getScrollbarWidth())/width);this._columns=this._columns||1;}var _1085=this._rows;this._preprocess();var _1086=this._rows;this._setGridLayout();this._setGridData();if(_1086!==_1085){grid.set("autoHeight",this._rows,false);}if(_1083){grid._resize({w:box.w,h:box.h});grid.viewsHeaderNode.style.display="none";}else{grid.update();}this._toggleTooltip();var self=this,_1087=this.getSelected();if(_1087){grid.store.fetch({onComplete:function(its){var found=self._locate(_1087,self._selectedInfo,its);var _1088=found&&grid.views.views[0].getCellNode(found[0],found[1]);if(_1088){self._rowClicked({cellNode:_1088,rowIndex:found[0],cellIndex:found[1]},true);}}});}if(has("ie")<9){setTimeout(this._repaintItems,this._ieTimer);}var _1089=this.featureLayers,items=this.items;if((!_1089||!_1089.length)&&(!items||!items.length)&&grid&&this.emptyMessage){grid.showMessage(this.emptyMessage);}},_eventMap:{"selection-change":true},onSelectionChange:function(){},_setUseLegendAttr:function(use){var _108a=this.useLegend;if(!this._started||_108a!==use){if(use){this._flChanged=1;}else{this._clearLegendInfo();}}this.useLegend=use;},_setFeatureLayersAttr:function(_108b){var _108c=this.featureLayers;if(!this._started||_108c!==_108b){this._flChanged=1;}this.featureLayers=_108b;},_adjustRowsCols:function(items){if(this.rows==="auto"&&this.columns==="auto"){if(!this._started){this._rows=false;this._columns=null;this._autoWidth=false;}return;}var len=0;this._rows=this.rows;this._columns=this.columns;if(this.rows==="auto"){if(this.featureLayers){if(this.grouping){len=items.length;array.forEach(items,function(_108d){len+=Math.ceil(_108d.length/this.columns);},this);}else{array.forEach(items,function(_108e){len+=_108e.length;},this);len=Math.ceil(len/this.columns);}}else{len=Math.ceil(items.length/this.columns);}this._rows=len;}else{if(this.columns==="auto"){if(this.featureLayers){if(this.grouping){len=3;}else{array.forEach(items,function(_108f){len+=_108f.length;},this);len=Math.ceil(len/this.rows);}}else{len=Math.ceil(items.length/this.rows);}this._columns=len;}}},_preprocess:function(){if(this.items){this.grouping=false;}this._autoWidth=false;if(this.rows==="auto"||this.columns==="auto"){this._autoWidth=true;}var items;if(this.featureLayers){if(this.useLegend&&this._flChanged){this._legendIndices=[];this._loadingIndices=[];this._legendSymbols={};this._ignoreLegends();this._loadingLegends=[];clearTimeout(this._legendTimer);this._legendTimer=null;this._processSelectionLayers();this._flChanged=0;}if(array.every(this.featureLayers,function(_1090){return _1090.loaded;})){items=this._flItems=this._getItemsFromLayers(this.featureLayers);this._adjustRowsCols(items);}else{var count=this.featureLayers.length;var _1091=[];array.forEach(this.featureLayers,function(_1092){if(_1092.loaded){count--;_1091.push(_1092);}else{var _1093=_106b.connect(_1092,"onLoad",this,function(layer){_106b.disconnect(_1093);_1093=null;count--;_1091.push(layer);if(!count){items=this._flItems=this._getItemsFromLayers(_1091);this._adjustRowsCols(items);this.update();}});}},this);}}else{items=this._itItems=this._getItemsFromItems(this.items);this._adjustRowsCols(items);}},_processSelectionLayers:function(){var map,_1094,info,_1095,key,_1096,_1097,_1098={};array.forEach(this.featureLayers,function(layer,idx){if(layer.mode===_1076.MODE_SELECTION&&layer._map&&layer.url&&layer._params.drawMode&&!layer.source){_1094=lang.trim(layer._url.path).replace(/\/(MapServer|FeatureServer).*/ig,"/MapServer").replace(/^https?:\/\//ig,"").toLowerCase();info=(_1098[_1094]=_1098[_1094]||{});_1095=(info.featureLayers=info.featureLayers||{});_1096=(info.indices=info.indices||[]);_1095[idx]=layer;_1096.push(idx);map=layer._map;}});if(map){array.forEach(map.layerIds,function(layer){layer=map.getLayer(layer);if(layer&&layer.url&&(layer.getImageUrl||layer.getTileUrl)&&layer.loaded&&layer.version>=10.1){_1094=lang.trim(layer._url.path).replace(/(\/MapServer).*/ig,"$1");key=_1094.replace(/^https?:\/\//ig,"").toLowerCase();if(_1098[key]&&(!_1098[key].mapServiceUrl)){info=_1098[key];info.mapServiceUrl=_1094;info.mapServiceLayer=layer;this._legendIndices=this._legendIndices.concat(info.indices);_1097=this._fetchLegend({pickerInstance:this,info:info},key);if(_1097.then){this._loadingIndices=this._loadingIndices.concat(info.indices);this._loadingLegends.push(_1097);}else{this._processLegendResponse(_1097,info);}}}},this);}},_fetchLegend:function(_1099,key){var proto=TP.prototype,_109a=proto.legendCache[key];if(!_109a){_109a=(proto.legendCache[key]=_107b({url:_1099.info.mapServiceUrl+"/legend",content:{f:"json"},callbackParamName:"callback"}));_109a._contexts=[_1099];_109a.addBoth(function(_109b){if(_109a.canceled){return;}proto.legendCache[key]=_109b;var _109c=_109a._contexts;_109a._contexts=null;array.forEach(_109c,function(ctxt){var _109d=ctxt.pickerInstance,info=ctxt.info,found;if(_109d._destroyed){return;}array.forEach(info.indices,function(idx){found=array.indexOf(_109d._loadingIndices,idx);if(found>-1){_109d._loadingIndices.splice(found,1);}});found=array.indexOf(_109d._loadingLegends,_109a);if(found>-1){_109d._loadingLegends.splice(found,1);}_109d._processLegendResponse(_109b,info);});});}else{if(_109a.then){_109a._contexts.push(_1099);}}return _109a;},_clearLegendInfo:function(){clearTimeout(this._legendTimer);this._ignoreLegends();this._legendIndices=this._loadingIndices=this._legendSymbols=this._loadingLegends=this._legendTimer=null;},_ignoreLegends:function(){if(this._loadingLegends){array.forEach(this._loadingLegends,function(_109e){var found=-1;array.some(_109e._contexts,function(ctxt,idx){if(ctxt.pickerInstance===this){found=idx;}return (found>-1);},this);if(found>-1){_109e._contexts.splice(found,1);}},this);}},_processLegendResponse:function(_109f,info){if(_109f&&!(_109f instanceof Error)){array.forEach(info.indices,function(idx){var _10a0=info.featureLayers[idx].layerId,i,_10a1=info.mapServiceUrl+"/"+_10a0+"/images/",token=info.mapServiceLayer._getToken(),found,obj,_10a2,url;if(this._legendSymbols[idx]){return;}found=null;array.some(_109f.layers,function(_10a3){if(_10a3.layerId==_10a0){found=_10a3;}return !!found;});if(found){obj=(this._legendSymbols[idx]={});array.forEach(found.legend,function(_10a4){_10a2=_10a4.values;if(_10a2&&_10a2.length){for(i=0;i<_10a2.length;i++){obj[_10a2[i]]=_10a4;}}else{obj.defaultSymbol=_10a4;}url=_10a4.url;if(url&&!_10a4._fixed){_10a4._fixed=1;if((url.search(/https?\:/)===-1)){_10a4.url=_10a1+url;}if(token&&_10a4.url.search(/https?\:/)!==-1){_10a4.url+=(((_10a4.url.indexOf("?")>-1)?"&":"?")+"token="+token);}}});}},this);}else{var found;array.forEach(info.indices,function(idx){found=array.indexOf(this._legendIndices,idx);if(found>-1){this._legendIndices.splice(found,1);}},this);}var self=this;if(self._started&&!self._legendTimer){self._legendTimer=setTimeout(function(){clearTimeout(self._legendTimer);self._legendTimer=null;if(!self._destroyed){self.update();}},0);}},_applyGridPatches:function(){var grid=this.grid;var _10a5=grid.adaptWidth,views,i,view;grid.adaptWidth=function(){views=this.views.views;for(i=0;view=views[i];i++){_1071.set(view.headerNode,"display","block");}_10a5.apply(this,arguments);for(i=0;view=views[i];i++){_1071.set(view.headerNode,"display","none");}};if(this._dojo14x){if(this.rows!=="auto"&&this.columns!=="auto"){var _10a6=_106b.connect(grid,"_onFetchComplete",this,function(){_106b.disconnect(_10a6);this.grid.set("autoHeight",this._rows);});}_106b.connect(grid,"_onDelete",this,this._destroyItems);_106b.connect(grid,"_clearData",this,this._destroyItems);_106b.connect(grid,"destroy",this,this._destroyItems);var focus=grid.focus;if(focus&&focus.findAndFocusGridCell){focus.findAndFocusGridCell=function(){return false;};}}},_setGridLayout:function(){var _10a7=function(_10a8){return function(_10a9,_10aa){return this._cellGet(_10a8,_10a9,_10aa);};};var _10ab=lang.hitch(this,this._cellFormatter),cells=[],cols=this._columns,i;for(i=0;i<cols;i++){cells.push({field:"cell"+i,get:lang.hitch(this,_10a7(i)),formatter:_10ab});}var _10ac={cells:[cells]};if(this.grouping){var _10ad={field:"groupName",colSpan:cols,get:lang.hitch(this,this._cellGetGroup),formatter:lang.hitch(this,this._cellGroupFormatter)};_10ac.cells.push([_10ad]);}var grid=this.grid,_10ae=_1075.prototype.rowsPerPage;grid.set("rowsPerPage",(this._rows>_10ae)?this._rows:_10ae);grid.set("structure",_10ac);},_setGridData:function(){var _10af=[];if(this.grouping){this._groupRowIndices=[];var _10b0,_10b1,cols=this._columns;array.forEach(this._flItems,function(_10b2,idx){_10af.push({});var index=(idx===0)?0:(_10b0+_10b1+1);this._groupRowIndices.push(index);_10b0=index;_10b1=Math.ceil(_10b2.length/cols);_10af=_10af.concat(this._getStoreItems(_10b2));},this);}else{if(this.featureLayers){array.forEach(this._flItems,function(_10b3){_10af=_10af.concat(_10b3);});_10af=this._getStoreItems(_10af);}else{_10af=this._getStoreItems(this._itItems);}}var store=new _1074({data:{items:_10af}});this.grid.setStore(store);},_toggleTooltip:function(){if(this.showTooltip){if(this.tooltip){return;}this.tooltip=_106f.create("div",{"class":"tooltip"},this.domNode);this.tooltip.style.display="none";this.tooltip.style.position="fixed";var grid=this.grid;this._mouseOverConnect=_106b.connect(grid,"onCellMouseOver",this,this._cellMouseOver);this._mouseOutConnect=_106b.connect(grid,"onCellMouseOut",this,this._cellMouseOut);}else{if(this.tooltip){_106b.disconnect(this._mouseOverConnect);_106b.disconnect(this._mouseOutConnect);_106f.destroy(this.tooltip);this.tooltip=null;}}},_rowClicked:function(evt,_10b4){var _10b5=evt.cellNode,row=evt.rowIndex,col=evt.cellIndex;var cell=this._getCellInfo(_10b5,row,col);if(!cell){return;}var store=this.grid.store;if(store.getValue(cell,"loadingCell")){return;}if(this._selectedCell){_106e.remove(this._selectedCell,"selectedItem");}if(_10b5!==this._selectedCell){_106e.add(_10b5,"selectedItem");this._selectedCell=_10b5;this._selectedItem={featureLayer:store.getValue(cell,"layer"),type:store.getValue(cell,"type"),template:store.getValue(cell,"template"),symbolInfo:store.getValue(cell,"symbolInfo"),item:this._getItem(cell)};this._selectedInfo={selRow:row,selCol:col,index1:store.getValue(cell,"index1"),index2:store.getValue(cell,"index2"),index:store.getValue(cell,"index")};}else{this._selectedCell=this._selectedInfo=this._selectedItem=null;}if(!_10b4){this.onSelectionChange();}},_locate:function(_10b6,info,_10b7){var store=this.grid.store,cols=new Array(this._columns);var found,_10b8=info.index1,_10b9=info.index2,index=info.index,item=_10b6.item;array.some(_10b7,function(_10ba,_10bb){return array.some(cols,function(_10bc,_10bd){var cell=store.getValue(_10ba,"cell"+_10bd);if(cell&&(item?(index===store.getValue(cell,"index")):(_10b8===store.getValue(cell,"index1")&&_10b9===store.getValue(cell,"index2")))){found=[_10bb,_10bd];return true;}else{return false;}});});return found;},_getCellInfo:function(_10be,row,col){if(!_10be){return;}var grid=this.grid;var item=grid.getItem(row);var cell=grid.store.getValue(item,"cell"+col);return cell;},_getItem:function(cell){var items=this.items;if(items){return items[this.grid.store.getValue(cell,"index")];}},_cellMouseOver:function(evt){var _10bf=this.tooltip;var _10c0=evt.cellNode,row=evt.rowIndex,col=evt.cellIndex;var cell=this._getCellInfo(_10c0,row,col);if(_10bf&&cell){var store=this.grid.store;var _10c1=store.getValue(cell,"template");var type=store.getValue(cell,"type");var _10c2=store.getValue(cell,"symbolInfo");var layer=store.getValue(cell,"layer");var item=this._getItem(cell);var label=(item&&(item.label+(item.description?(": "+item.description):"")))||(_10c1&&(_10c1.name+(_10c1.description?(": "+_10c1.description):"")))||(type&&type.name)||(_10c2&&(_10c2.label+(_10c2.description?(": "+_10c2.description):"")))||((layer&&layer.name+": ")+"Default");_10bf.style.display="none";_10bf.innerHTML=label;var _10c3=html.coords(_10c0.firstChild);_1071.set(_10bf,{left:(_10c3.x)+"px",top:(_10c3.y+_10c3.h+5)+"px"});_10bf.style.display="";}},_cellMouseOut:function(){var _10c4=this.tooltip;if(_10c4){_10c4.style.display="none";}},_destroyItems:function(){var _10c5=this._itemWidgets,w;for(w in _10c5){if(!_10c5[w]){continue;}_10c5[w].destroy();delete _10c5[w];}},_repaintItems:function(){var _10c6=this._itemWidgets,w;for(w in _10c6){var _10c7=_10c6[w];if(_10c7){_10c7._repaint(_10c7._surface);}}},_getStoreItems:function(_10c8){var uid=this._uniqueId;_10c8=array.map(_10c8,function(item){return lang.mixin({"surfaceId":"tpick-surface-"+(uid.id++)},item);});var len=_10c8.length,index=0,obj={},k=0,prop,_10c9=[],flag=true,cols=this._columns;while(index<len){flag=true;prop="cell"+k;obj[prop]=_10c8[index];index++;k++;if(k%cols===0){flag=false;_10c9.push(obj);obj={};k=0;}}if(flag&&len){_10c9.push(obj);}return _10c9;},_getItemsFromLayers:function(_10ca){var items=[];array.forEach(_10ca,function(layer,_10cb){items.push(this._getItemsFromLayer(layer,_10cb));},this);return items;},_getItemsFromLayer:function(layer,_10cc){var items=[];if(this.useLegend&&array.indexOf(this._loadingIndices,_10cc)>-1){return [{label:(this._nls&&this._nls.loading)||"",symbol:null,layer:layer,type:null,template:null,index1:_10cc,index2:0,loadingCell:1}];}var _10cd=[];_10cd=_10cd.concat(layer.templates);array.forEach(layer.types,function(fType){var _10ce=fType.templates;array.forEach(_10ce,function(_10cf){_10cf._type_=fType;});_10cd=_10cd.concat(_10ce);});_10cd=array.filter(_10cd,_107a.isDefined);var _10d0=layer.renderer;if(_10d0){var _10d1=_10d0.declaredClass.replace("esri.renderer.","");if(_10cd.length>0){array.forEach(_10cd,function(_10d2){var proto=_10d2.prototype;if(proto){var _10d3=_10d0.getSymbol(proto);if(_10d3){var found=null,pms,_10d4;if(this.useLegend&&array.indexOf(this._legendIndices,_10cc)>-1){_10d4=this._legendSymbols&&this._legendSymbols[_10cc];if(_10d4){switch(_10d1){case "SimpleRenderer":found=_10d4.defaultSymbol;break;case "UniqueValueRenderer":array.some(_10d0.infos,function(info){if(info.symbol===_10d3){found=_10d4[info.value];}return !!found;});break;case "ClassBreaksRenderer":array.some(_10d0.infos,function(info){if(info.symbol===_10d3){found=_10d4[info.maxValue];}return !!found;});break;}}if(found){pms=_106c.fromJson(_106c.toJson(_1077.defaultProps));pms.url=found.url;pms.imageData=found.imageData;pms.contentType=found.contentType;pms.width=found.width;pms.height=found.height;if(!_107a.isDefined(pms.width)||!_107a.isDefined(pms.height)){pms.width=15;pms.height=15;}found=new _1077(pms);}}items.push({label:this._trimLabel(_10d2.name),symbol:found||_10d3,legendOverride:!!found,layer:layer,type:_10d2._type_,template:_10d2,index1:_10cc,index2:items.length});}}delete _10d2._type_;},this);}else{var infos=[];if(_10d1==="TemporalRenderer"){_10d0=_10d0.observationRenderer;if(_10d0){_10d1=_10d0.declaredClass.replace("esri.renderer.","");}}switch(_10d1){case "SimpleRenderer":infos=[{symbol:_10d0.symbol,label:_10d0.label,description:_10d0.description}];break;case "UniqueValueRenderer":case "ClassBreaksRenderer":infos=_10d0.infos;break;}items=array.map(infos,function(info,idx){return {label:this._trimLabel(info.label),description:info.description,symbolInfo:lang.mixin({constructor:function(){}},info),symbol:info.symbol,layer:layer,index1:_10cc,index2:idx};},this);}}return items;},_getItemsFromItems:function(_10d5){return array.map(_10d5,function(item,idx){item=lang.mixin({index:idx},item);item.label=this._trimLabel(item.label);return item;},this);},_trimLabel:function(label){var max=this.maxLabelLength;if(max&&label){if(label.length>max){label=label.substr(0,max)+"...";}}return label||"";},_cellGet:function(_10d6,_10d7,_10d8){if(!_10d8){return "";}return this.grid.store.getValue(_10d8,"cell"+_10d6);},_cellFormatter:function(value){if(value){var _10d9=this._itemWidgets,store=this.grid.store;var sid=store.getValue(value,"surfaceId");var w=_10d9[sid];if(!w){w=(_10d9[sid]=new _1078({id:sid,label:store.getValue(value,"label"),symbol:store.getValue(value,"symbol"),legendOverride:store.getValue(value,"legendOverride"),surfaceWidth:this.surfaceWidth,surfaceHeight:this.surfaceHeight,template:store.getValue(value,"template")}));}return w||"";}else{return "";}},_cellGetGroup:function(_10da,_10db){if(!this._groupRowIndices){return "";}var found=array.indexOf(this._groupRowIndices,_10da);if(!_10db||found===-1){return "";}return (this.featureLayers[found]&&this.featureLayers[found].name)||"";},_cellGroupFormatter:function(value){if(value){return "<div class='groupLabel'>"+value+"</div>";}else{return "";}}});if(has("extend-esri")){lang.setObject("dijit.editing.TemplatePicker",TP,_1079);}return TP;});},"dijit/_editor/range":function(){define("dijit/_editor/range",["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojo/_base/window","../main"],function(array,_10dc,lang,win,dijit){dijit.range={};dijit.range.getIndex=function(node,_10dd){var ret=[],retR=[];var onode=node;var pnode,n;while(node!=_10dd){var i=0;pnode=node.parentNode;while((n=pnode.childNodes[i++])){if(n===node){--i;break;}}ret.unshift(i);retR.unshift(i-pnode.childNodes.length);node=pnode;}if(ret.length>0&&onode.nodeType==3){n=onode.previousSibling;while(n&&n.nodeType==3){ret[ret.length-1]--;n=n.previousSibling;}n=onode.nextSibling;while(n&&n.nodeType==3){retR[retR.length-1]++;n=n.nextSibling;}}return {o:ret,r:retR};};dijit.range.getNode=function(index,_10de){if(!lang.isArray(index)||index.length==0){return _10de;}var node=_10de;array.every(index,function(i){if(i>=0&&i<node.childNodes.length){node=node.childNodes[i];}else{node=null;return false;}return true;});return node;};dijit.range.getCommonAncestor=function(n1,n2,root){root=root||n1.ownerDocument.body;var _10df=function(n){var as=[];while(n){as.unshift(n);if(n!==root){n=n.parentNode;}else{break;}}return as;};var n1as=_10df(n1);var n2as=_10df(n2);var m=Math.min(n1as.length,n2as.length);var com=n1as[0];for(var i=1;i<m;i++){if(n1as[i]===n2as[i]){com=n1as[i];}else{break;}}return com;};dijit.range.getAncestor=function(node,regex,root){root=root||node.ownerDocument.body;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(regex.test(name)){return node;}node=node.parentNode;}return null;};dijit.range.BlockTagNames=/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/;dijit.range.getBlockAncestor=function(node,regex,root){root=root||node.ownerDocument.body;regex=regex||dijit.range.BlockTagNames;var block=null,_10e0;while(node&&node!==root){var name=node.nodeName.toUpperCase();if(!block&&regex.test(name)){block=node;}if(!_10e0&&(/^(?:BODY|TD|TH|CAPTION)$/).test(name)){_10e0=node;}node=node.parentNode;}return {blockNode:block,blockContainer:_10e0||node.ownerDocument.body};};dijit.range.atBeginningOfContainer=function(_10e1,node,_10e2){var _10e3=false;var _10e4=(_10e2==0);if(!_10e4&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(0,_10e2))){_10e4=true;}}if(_10e4){var cnode=node;_10e3=true;while(cnode&&cnode!==_10e1){if(cnode.previousSibling){_10e3=false;break;}cnode=cnode.parentNode;}}return _10e3;};dijit.range.atEndOfContainer=function(_10e5,node,_10e6){var atEnd=false;var _10e7=(_10e6==(node.length||node.childNodes.length));if(!_10e7&&node.nodeType==3){if(/^[\s\xA0]+$/.test(node.nodeValue.substr(_10e6))){_10e7=true;}}if(_10e7){var cnode=node;atEnd=true;while(cnode&&cnode!==_10e5){if(cnode.nextSibling){atEnd=false;break;}cnode=cnode.parentNode;}}return atEnd;};dijit.range.adjacentNoneTextNode=function(_10e8,next){var node=_10e8;var len=(0-_10e8.length)||0;var prop=next?"nextSibling":"previousSibling";while(node){if(node.nodeType!=3){break;}len+=node.length;node=node[prop];}return [node,len];};dijit.range.create=function(win){win=win||window;if(win.getSelection){return win.document.createRange();}else{return new dijit.range.W3CRange();}};dijit.range.getSelection=function(_10e9,_10ea){if(_10e9.getSelection){return _10e9.getSelection();}else{var s=new dijit.range.ie.selection(_10e9);if(!_10ea){s._getCurrentSelection();}return s;}};if(!window.getSelection){dijit.range.ie={cachedSelection:{},selection:function(_10eb){this._ranges=[];this.addRange=function(r,_10ec){this._ranges.push(r);if(!_10ec){r._select();}this.rangeCount=this._ranges.length;};this.removeAllRanges=function(){this._ranges=[];this.rangeCount=0;};var _10ed=function(){var r=_10eb.document.selection.createRange();var type=_10eb.document.selection.type.toUpperCase();if(type=="CONTROL"){return new dijit.range.W3CRange(dijit.range.ie.decomposeControlRange(r));}else{return new dijit.range.W3CRange(dijit.range.ie.decomposeTextRange(r));}};this.getRangeAt=function(i){return this._ranges[i];};this._getCurrentSelection=function(){this.removeAllRanges();var r=_10ed();if(r){this.addRange(r,true);this.isCollapsed=r.collapsed;}else{this.isCollapsed=true;}};},decomposeControlRange:function(range){var _10ee=range.item(0),_10ef=range.item(range.length-1);var _10f0=_10ee.parentNode,_10f1=_10ef.parentNode;var _10f2=dijit.range.getIndex(_10ee,_10f0).o[0];var _10f3=dijit.range.getIndex(_10ef,_10f1).o[0]+1;return [_10f0,_10f2,_10f1,_10f3];},getEndPoint:function(range,end){var _10f4=range.duplicate();_10f4.collapse(!end);var _10f5="EndTo"+(end?"End":"Start");var _10f6=_10f4.parentElement();var _10f7,_10f8,_10f9;if(_10f6.childNodes.length>0){array.every(_10f6.childNodes,function(node,i){var _10fa;if(node.nodeType!=3){_10f4.moveToElementText(node);if(_10f4.compareEndPoints(_10f5,range)>0){if(_10f9&&_10f9.nodeType==3){_10f7=_10f9;_10fa=true;}else{_10f7=_10f6;_10f8=i;return false;}}else{if(i==_10f6.childNodes.length-1){_10f7=_10f6;_10f8=_10f6.childNodes.length;return false;}}}else{if(i==_10f6.childNodes.length-1){_10f7=node;_10fa=true;}}if(_10fa&&_10f7){var _10fb=dijit.range.adjacentNoneTextNode(_10f7)[0];if(_10fb){_10f7=_10fb.nextSibling;}else{_10f7=_10f6.firstChild;}var _10fc=dijit.range.adjacentNoneTextNode(_10f7);_10fb=_10fc[0];var _10fd=_10fc[1];if(_10fb){_10f4.moveToElementText(_10fb);_10f4.collapse(false);}else{_10f4.moveToElementText(_10f6);}_10f4.setEndPoint(_10f5,range);_10f8=_10f4.text.length-_10fd;return false;}_10f9=node;return true;});}else{_10f7=_10f6;_10f8=0;}if(!end&&_10f7.nodeType==1&&_10f8==_10f7.childNodes.length){var _10fe=_10f7.nextSibling;if(_10fe&&_10fe.nodeType==3){_10f7=_10fe;_10f8=0;}}return [_10f7,_10f8];},setEndPoint:function(range,_10ff,_1100){var _1101=range.duplicate(),node,len;if(_10ff.nodeType!=3){if(_1100>0){node=_10ff.childNodes[_1100-1];if(node){if(node.nodeType==3){_10ff=node;_1100=node.length;}else{if(node.nextSibling&&node.nextSibling.nodeType==3){_10ff=node.nextSibling;_1100=0;}else{_1101.moveToElementText(node.nextSibling?node:_10ff);var _1102=node.parentNode;var _1103=_1102.insertBefore(node.ownerDocument.createTextNode(" "),node.nextSibling);_1101.collapse(false);_1102.removeChild(_1103);}}}}else{_1101.moveToElementText(_10ff);_1101.collapse(true);}}if(_10ff.nodeType==3){var _1104=dijit.range.adjacentNoneTextNode(_10ff);var _1105=_1104[0];len=_1104[1];if(_1105){_1101.moveToElementText(_1105);_1101.collapse(false);if(_1105.contentEditable!="inherit"){len++;}}else{_1101.moveToElementText(_10ff.parentNode);_1101.collapse(true);_1101.move("character",1);_1101.move("character",-1);}_1100+=len;if(_1100>0){if(_1101.move("character",_1100)!=_1100){console.error("Error when moving!");}}}return _1101;},decomposeTextRange:function(range){var _1106=dijit.range.ie.getEndPoint(range);var _1107=_1106[0],_1108=_1106[1];var _1109=_1106[0],_110a=_1106[1];if(range.htmlText.length){if(range.htmlText==range.text){_110a=_1108+range.text.length;}else{_1106=dijit.range.ie.getEndPoint(range,true);_1109=_1106[0],_110a=_1106[1];}}return [_1107,_1108,_1109,_110a];},setRange:function(range,_110b,_110c,_110d,_110e,_110f){var start=dijit.range.ie.setEndPoint(range,_110b,_110c);range.setEndPoint("StartToStart",start);if(!_110f){var end=dijit.range.ie.setEndPoint(range,_110d,_110e);}range.setEndPoint("EndToEnd",end||start);return range;}};_10dc("dijit.range.W3CRange",null,{constructor:function(){if(arguments.length>0){this.setStart(arguments[0][0],arguments[0][1]);this.setEnd(arguments[0][2],arguments[0][3]);}else{this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}},_updateInternal:function(){if(this.startContainer!==this.endContainer){this.commonAncestorContainer=dijit.range.getCommonAncestor(this.startContainer,this.endContainer);}else{this.commonAncestorContainer=this.startContainer;}this.collapsed=(this.startContainer===this.endContainer)&&(this.startOffset==this.endOffset);},setStart:function(node,_1110){_1110=parseInt(_1110);if(this.startContainer===node&&this.startOffset==_1110){return;}delete this._cachedBookmark;this.startContainer=node;this.startOffset=_1110;if(!this.endContainer){this.setEnd(node,_1110);}else{this._updateInternal();}},setEnd:function(node,_1111){_1111=parseInt(_1111);if(this.endContainer===node&&this.endOffset==_1111){return;}delete this._cachedBookmark;this.endContainer=node;this.endOffset=_1111;if(!this.startContainer){this.setStart(node,_1111);}else{this._updateInternal();}},setStartAfter:function(node,_1112){this._setPoint("setStart",node,_1112,1);},setStartBefore:function(node,_1113){this._setPoint("setStart",node,_1113,0);},setEndAfter:function(node,_1114){this._setPoint("setEnd",node,_1114,1);},setEndBefore:function(node,_1115){this._setPoint("setEnd",node,_1115,0);},_setPoint:function(what,node,_1116,ext){var index=dijit.range.getIndex(node,node.parentNode).o;this[what](node.parentNode,index.pop()+ext);},_getIERange:function(){var r=(this._body||this.endContainer.ownerDocument.body).createTextRange();dijit.range.ie.setRange(r,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return r;},getBookmark:function(){this._getIERange();return this._cachedBookmark;},_select:function(){var r=this._getIERange();r.select();},deleteContents:function(){var s=this.startContainer,r=this._getIERange();if(s.nodeType===3&&!this.startOffset){this.setStartBefore(s);}r.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=true;},cloneRange:function(){var r=new dijit.range.W3CRange([this.startContainer,this.startOffset,this.endContainer,this.endOffset]);r._body=this._body;return r;},detach:function(){this._body=null;this.commonAncestorContainer=null;this.startContainer=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=true;}});}return dijit.range;});},"dojo/store/util/QueryResults":function(){define(["../../_base/array","../../_base/lang","../../_base/Deferred"],function(array,lang,_1117){var _1118=function(_1119){if(!_1119){return _1119;}if(_1119.then){_1119=lang.delegate(_1119);}function _111a(_111b){if(!_1119[_111b]){_1119[_111b]=function(){var args=arguments;return _1117.when(_1119,function(_111c){Array.prototype.unshift.call(args,_111c);return _1118(array[_111b].apply(array,args));});};}};_111a("forEach");_111a("filter");_111a("map");if(!_1119.total){_1119.total=_1117.when(_1119,function(_111d){return _111d.length;});}return _1119;};lang.setObject("dojo.store.util.QueryResults",_1118);return _1118;});},"dijit/form/_ListBase":function(){define("dijit/form/_ListBase",["dojo/_base/declare","dojo/on","dojo/window"],function(_111e,on,_111f){return _111e("dijit.form._ListBase",null,{selected:null,_listConnect:function(_1120,_1121){var self=this;return self.own(on(self.containerNode,on.selector(function(_1122,_1123,_1124){return _1122.parentNode==_1124;},_1120),function(evt){evt.preventDefault();self[_1121](evt,this);}));},selectFirstNode:function(){var first=this.containerNode.firstChild;while(first&&first.style.display=="none"){first=first.nextSibling;}this._setSelectedAttr(first);},selectLastNode:function(){var last=this.containerNode.lastChild;while(last&&last.style.display=="none"){last=last.previousSibling;}this._setSelectedAttr(last);},selectNextNode:function(){var _1125=this.selected;if(!_1125){this.selectFirstNode();}else{var next=_1125.nextSibling;while(next&&next.style.display=="none"){next=next.nextSibling;}if(!next){this.selectFirstNode();}else{this._setSelectedAttr(next);}}},selectPreviousNode:function(){var _1126=this.selected;if(!_1126){this.selectLastNode();}else{var prev=_1126.previousSibling;while(prev&&prev.style.display=="none"){prev=prev.previousSibling;}if(!prev){this.selectLastNode();}else{this._setSelectedAttr(prev);}}},_setSelectedAttr:function(node){if(this.selected!=node){var _1127=this.selected;if(_1127){this.onDeselect(_1127);this.selected=null;}if(node){this.selected=node;_111f.scrollIntoView(node);this.onSelect(node);}}else{if(node){this.onSelect(node);}}}});});},"dijit/form/_FormWidget":function(){define("dijit/form/_FormWidget",["dojo/_base/declare","dojo/has","dojo/_base/kernel","dojo/ready","../_Widget","../_CssStateMixin","../_TemplatedMixin","./_FormWidgetMixin"],function(_1128,has,_1129,ready,_112a,_112b,_112c,_112d){if(has("dijit-legacy-requires")){ready(0,function(){var _112e=["dijit/form/_FormValueWidget"];require(_112e);});}return _1128("dijit.form._FormWidget",[_112a,_112c,_112b,_112d],{setDisabled:function(_112f){_1129.deprecated("setDisabled("+_112f+") is deprecated. Use set('disabled',"+_112f+") instead.","","2.0");this.set("disabled",_112f);},setValue:function(value){_1129.deprecated("dijit.form._FormWidget:setValue("+value+") is deprecated.  Use set('value',"+value+") instead.","","2.0");this.set("value",value);},getValue:function(){_1129.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value");},postMixInProperties:function(){this.nameAttrSetting=this.name?("name=\""+this.name.replace(/"/g,"&quot;")+"\""):"";this.inherited(arguments);},_setTypeAttr:null});});},"dojo/DeferredList":function(){define(["./_base/kernel","./_base/Deferred","./_base/array"],function(dojo,_1130,_1131){dojo.DeferredList=function(list,_1132,_1133,_1134,_1135){var _1136=[];_1130.call(this);var self=this;if(list.length===0&&!_1132){this.resolve([0,[]]);}var _1137=0;_1131.forEach(list,function(item,i){item.then(function(_1138){if(_1132){self.resolve([i,_1138]);}else{_1139(true,_1138);}},function(error){if(_1133){self.reject(error);}else{_1139(false,error);}if(_1134){return null;}throw error;});function _1139(_113a,_113b){_1136[i]=[_113a,_113b];_1137++;if(_1137===list.length){self.resolve(_1136);}};});};dojo.DeferredList.prototype=new _1130();dojo.DeferredList.prototype.gatherResults=function(_113c){var d=new dojo.DeferredList(_113c,false,true,false);d.addCallback(function(_113d){var ret=[];_1131.forEach(_113d,function(_113e){ret.push(_113e[1]);});return ret;});return d;};return dojo.DeferredList;});},"dojo/dnd/common":function(){define(["../_base/connect","../_base/kernel","../_base/lang","../dom"],function(_113f,_1140,lang,dom){var _1141=lang.getObject("dojo.dnd",true);_1141.getCopyKeyState=_113f.isCopyKey;_1141._uniqueId=0;_1141.getUniqueId=function(){var id;do{id=_1140._scopeName+"Unique"+(++_1141._uniqueId);}while(dom.byId(id));return id;};_1141._empty={};_1141.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return " button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};return _1141;});},"dijit/CalendarLite":function(){require({cache:{"url:dijit/templates/Calendar.html":"<table cellspacing=\"0\" cellpadding=\"0\" class=\"dijitCalendarContainer\" role=\"grid\" aria-labelledby=\"${id}_mddb ${id}_year\">\n\t<thead>\n\t\t<tr class=\"dijitReset dijitCalendarMonthContainer\" valign=\"top\">\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"decrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarDecrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"decreaseArrowNode\" class=\"dijitA11ySideArrow\">-</span>\n\t\t\t</th>\n\t\t\t<th class='dijitReset' colspan=\"5\">\n\t\t\t\t<div data-dojo-attach-point=\"monthNode\">\n\t\t\t\t</div>\n\t\t\t</th>\n\t\t\t<th class='dijitReset dijitCalendarArrow' data-dojo-attach-point=\"incrementMonth\">\n\t\t\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitCalendarIncrementControl dijitCalendarIncrease\" role=\"presentation\"/>\n\t\t\t\t<span data-dojo-attach-point=\"increaseArrowNode\" class=\"dijitA11ySideArrow\">+</span>\n\t\t\t</th>\n\t\t</tr>\n\t\t<tr role=\"row\">\n\t\t\t${!dayCellsHtml}\n\t\t</tr>\n\t</thead>\n\t<tbody data-dojo-attach-point=\"dateRowsNode\" data-dojo-attach-event=\"onclick: _onDayClick\" class=\"dijitReset dijitCalendarBodyContainer\">\n\t\t\t${!dateRowsHtml}\n\t</tbody>\n\t<tfoot class=\"dijitReset dijitCalendarYearContainer\">\n\t\t<tr>\n\t\t\t<td class='dijitReset' valign=\"top\" colspan=\"7\" role=\"presentation\">\n\t\t\t\t<div class=\"dijitCalendarYearLabel\">\n\t\t\t\t\t<span data-dojo-attach-point=\"previousYearLabelNode\" class=\"dijitInline dijitCalendarPreviousYear\" role=\"button\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"currentYearLabelNode\" class=\"dijitInline dijitCalendarSelectedYear\" role=\"button\" id=\"${id}_year\"></span>\n\t\t\t\t\t<span data-dojo-attach-point=\"nextYearLabelNode\" class=\"dijitInline dijitCalendarNextYear\" role=\"button\"></span>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t</tfoot>\n</table>\n"}});define("dijit/CalendarLite",["dojo/_base/array","dojo/_base/declare","dojo/cldr/supplemental","dojo/date","dojo/date/locale","dojo/date/stamp","dojo/dom","dojo/dom-class","dojo/_base/event","dojo/_base/lang","dojo/sniff","dojo/string","./_WidgetBase","./_TemplatedMixin","dojo/text!./templates/Calendar.html","./hccss"],function(array,_1142,_1143,date,_1144,stamp,dom,_1145,event,lang,has,_1146,_1147,_1148,_1149){var _114a=_1142("dijit.CalendarLite",[_1147,_1148],{templateString:_1149,dowTemplateString:"<th class=\"dijitReset dijitCalendarDayLabelTemplate\" role=\"columnheader\"><span class=\"dijitCalendarDayLabel\">${d}</span></th>",dateTemplateString:"<td class=\"dijitReset\" role=\"gridcell\" data-dojo-attach-point=\"dateCells\"><span class=\"dijitCalendarDateLabel\" data-dojo-attach-point=\"dateLabels\"></span></td>",weekTemplateString:"<tr class=\"dijitReset dijitCalendarWeekTemplate\" role=\"row\">${d}${d}${d}${d}${d}${d}${d}</tr>",value:new Date(""),datePackage:"",dayWidth:"narrow",tabIndex:"0",currentFocus:new Date(),baseClass:"dijitCalendar",_isValidDate:function(value){return value&&!isNaN(value)&&typeof value=="object"&&value.toString()!=this.constructor.prototype.value.toString();},_getValueAttr:function(){if(this.value&&!isNaN(this.value)){var value=new this.dateClassObj(this.value);value.setHours(0,0,0,0);if(value.getDate()<this.value.getDate()){value=this.dateModule.add(value,"hour",1);}return value;}else{return null;}},_setValueAttr:function(value,_114b){if(typeof value=="string"){value=stamp.fromISOString(value);}value=this._patchDate(value);if(this._isValidDate(value)&&!this.isDisabledDate(value,this.lang)){this._set("value",value);this.set("currentFocus",value);this._markSelectedDates([value]);if(this._created&&(_114b||typeof _114b=="undefined")){this.onChange(this.get("value"));}}else{this._set("value",null);this._markSelectedDates([]);}},_patchDate:function(value){if(value){value=new this.dateClassObj(value);value.setHours(1,0,0,0);}return value;},_setText:function(node,text){while(node.firstChild){node.removeChild(node.firstChild);}node.appendChild(node.ownerDocument.createTextNode(text));},_populateGrid:function(){var month=new this.dateClassObj(this.currentFocus);month.setDate(1);var _114c=month.getDay(),_114d=this.dateModule.getDaysInMonth(month),_114e=this.dateModule.getDaysInMonth(this.dateModule.add(month,"month",-1)),today=new this.dateClassObj(),_114f=_1143.getFirstDayOfWeek(this.lang);if(_114f>_114c){_114f-=7;}this._date2cell={};array.forEach(this.dateCells,function(_1150,idx){var i=idx+_114f;var date=new this.dateClassObj(month),_1151,clazz="dijitCalendar",adj=0;if(i<_114c){_1151=_114e-_114c+i+1;adj=-1;clazz+="Previous";}else{if(i>=(_114c+_114d)){_1151=i-_114c-_114d+1;adj=1;clazz+="Next";}else{_1151=i-_114c+1;clazz+="Current";}}if(adj){date=this.dateModule.add(date,"month",adj);}date.setDate(_1151);if(!this.dateModule.compare(date,today,"date")){clazz="dijitCalendarCurrentDate "+clazz;}if(this.isDisabledDate(date,this.lang)){clazz="dijitCalendarDisabledDate "+clazz;_1150.setAttribute("aria-disabled","true");}else{clazz="dijitCalendarEnabledDate "+clazz;_1150.removeAttribute("aria-disabled");_1150.setAttribute("aria-selected","false");}var _1152=this.getClassForDate(date,this.lang);if(_1152){clazz=_1152+" "+clazz;}_1150.className=clazz+"Month dijitCalendarDateTemplate";var _1153=date.valueOf();this._date2cell[_1153]=_1150;_1150.dijitDateValue=_1153;this._setText(this.dateLabels[idx],date.getDateLocalized?date.getDateLocalized(this.lang):date.getDate());},this);},_populateControls:function(){var month=new this.dateClassObj(this.currentFocus);month.setDate(1);this.monthWidget.set("month",month);var y=month.getFullYear()-1;var d=new this.dateClassObj();array.forEach(["previous","current","next"],function(name){d.setFullYear(y++);this._setText(this[name+"YearLabelNode"],this.dateLocaleModule.format(d,{selector:"year",locale:this.lang}));},this);},goToToday:function(){this.set("value",new this.dateClassObj());},constructor:function(_1154){this.dateModule=_1154.datePackage?lang.getObject(_1154.datePackage,false):date;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=_1154.datePackage?lang.getObject(_1154.datePackage+".locale",false):_1144;},_createMonthWidget:function(){return _114a._MonthWidget({id:this.id+"_mw",lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode);},buildRendering:function(){var d=this.dowTemplateString,_1155=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang),_1156=_1143.getFirstDayOfWeek(this.lang);this.dayCellsHtml=_1146.substitute([d,d,d,d,d,d,d].join(""),{d:""},function(){return _1155[_1156++%7];});var r=_1146.substitute(this.weekTemplateString,{d:this.dateTemplateString});this.dateRowsHtml=[r,r,r,r,r,r].join("");this.dateCells=[];this.dateLabels=[];this.inherited(arguments);dom.setSelectable(this.domNode,false);var _1157=new this.dateClassObj(this.currentFocus);this.monthWidget=this._createMonthWidget();this.set("currentFocus",_1157,false);},postCreate:function(){this.inherited(arguments);this._connectControls();},_connectControls:function(){var _1158=lang.hitch(this,function(_1159,part,_115a){this.connect(this[_1159],"onclick",function(){this._setCurrentFocusAttr(this.dateModule.add(this.currentFocus,part,_115a));});});_1158("incrementMonth","month",1);_1158("decrementMonth","month",-1);_1158("nextYearLabelNode","year",1);_1158("previousYearLabelNode","year",-1);},_setCurrentFocusAttr:function(date,_115b){var _115c=this.currentFocus,_115d=this._getNodeByDate(_115c);date=this._patchDate(date);this._set("currentFocus",date);if(!this._date2cell||this.dateModule.difference(_115c,date,"month")!=0){this._populateGrid();this._populateControls();this._markSelectedDates([this.value]);}var _115e=this._getNodeByDate(date);_115e.setAttribute("tabIndex",this.tabIndex);if(this.focused||_115b){_115e.focus();}if(_115d&&_115d!=_115e){if(has("webkit")){_115d.setAttribute("tabIndex","-1");}else{_115d.removeAttribute("tabIndex");}}},focus:function(){this._setCurrentFocusAttr(this.currentFocus,true);},_onDayClick:function(evt){event.stop(evt);for(var node=evt.target;node&&!node.dijitDateValue;node=node.parentNode){}if(node&&!_1145.contains(node,"dijitCalendarDisabledDate")){this.set("value",node.dijitDateValue);}},_getNodeByDate:function(value){value=this._patchDate(value);return value&&this._date2cell?this._date2cell[value.valueOf()]:null;},_markSelectedDates:function(dates){function mark(_115f,cell){_1145.toggle(cell,"dijitCalendarSelectedDate",_115f);cell.setAttribute("aria-selected",_115f?"true":"false");};array.forEach(this._selectedCells||[],lang.partial(mark,false));this._selectedCells=array.filter(array.map(dates,this._getNodeByDate,this),function(n){return n;});array.forEach(this._selectedCells,lang.partial(mark,true));},onChange:function(){},isDisabledDate:function(){},getClassForDate:function(){}});_114a._MonthWidget=_1142("dijit.CalendarLite._MonthWidget",_1147,{_setMonthAttr:function(month){var _1160=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,month),_1161=(has("ie")==6?"":"<div class='dijitSpacer'>"+array.map(_1160,function(s){return "<div>"+s+"</div>";}).join("")+"</div>");this.domNode.innerHTML=_1161+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+_1160[month.getMonth()]+"</div>";}});return _114a;});},"dijit/CheckedMenuItem":function(){require({cache:{"url:dijit/templates/CheckedMenuItem.html":"<tr class=\"dijitReset dijitMenuItem\" data-dojo-attach-point=\"focusNode\" role=\"menuitemcheckbox\" tabIndex=\"-1\">\n\t<td class=\"dijitReset dijitMenuItemIconCell\" role=\"presentation\">\n\t\t<img src=\"${_blankGif}\" alt=\"\" class=\"dijitMenuItemIcon dijitCheckedMenuItemIcon\" data-dojo-attach-point=\"iconNode\"/>\n\t\t<span class=\"dijitCheckedMenuItemIconChar\">&#10003;</span>\n\t</td>\n\t<td class=\"dijitReset dijitMenuItemLabel\" colspan=\"2\" data-dojo-attach-point=\"containerNode,labelNode\"></td>\n\t<td class=\"dijitReset dijitMenuItemAccelKey\" style=\"display: none\" data-dojo-attach-point=\"accelKeyNode\"></td>\n\t<td class=\"dijitReset dijitMenuArrowCell\" role=\"presentation\">&#160;</td>\n</tr>\n"}});define("dijit/CheckedMenuItem",["dojo/_base/declare","dojo/dom-class","./MenuItem","dojo/text!./templates/CheckedMenuItem.html","./hccss"],function(_1162,_1163,_1164,_1165){return _1162("dijit.CheckedMenuItem",_1164,{templateString:_1165,checked:false,_setCheckedAttr:function(_1166){_1163.toggle(this.domNode,"dijitCheckedMenuItemChecked",_1166);this.domNode.setAttribute("aria-checked",_1166?"true":"false");this._set("checked",_1166);},iconClass:"",onChange:function(){},_onClick:function(evt){if(!this.disabled){this.set("checked",!this.checked);this.onChange(this.checked);}this.onClick(evt);}});});},"esri/dijit/editing/Cut":function(){define("esri/dijit/editing/Cut",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/geometry/jsonUtils","esri/OperationBase"],function(_1167,lang,has,_1168,_1169,_116a){var Cut=_1167(_116a,{declaredClass:"esri.dijit.editing.Cut",type:"edit",label:"Cut Features",constructor:function(_116b){var i;_116b=_116b||{};if(!_116b.featureLayer){console.error("In constructor of 'esri.dijit.editing.Cut', featureLayer not provided");return;}this._featureLayer=_116b.featureLayer;if(!_116b.addedGraphics){console.error("In constructor of 'esri.dijit.editing.Cut', addedGraphics for cut not provided");return;}this._addedGraphics=_116b.addedGraphics;if(!_116b.preUpdatedGraphics){console.error("In constructor of 'esri.dijit.editing.Cut', preUpdatedGraphics not provided");return;}this._preUpdatedGraphicsGeometries=[];this._preUpdatedGraphicsAttributes=[];for(i=0;i<_116b.preUpdatedGraphics.length;i++){this._preUpdatedGraphicsGeometries.push(_116b.preUpdatedGraphics[i].geometry.toJson());this._preUpdatedGraphicsAttributes.push(_116b.preUpdatedGraphics[i].attributes);}if(!_116b.postUpdatedGraphics){console.error("In constructor of 'esri.dijit.editing.Cut', postUpdatedGraphics not provided");return;}this._postUpdatedGraphics=_116b.postUpdatedGraphics;this._postUpdatedGraphicsGeometries=[];this._postUpdatedGraphicsAttributes=[];for(i=0;i<_116b.postUpdatedGraphics.length;i++){this._postUpdatedGraphicsGeometries.push(_116b.postUpdatedGraphics[i].geometry.toJson());this._postUpdatedGraphicsAttributes.push(lang.clone(_116b.postUpdatedGraphics[i].attributes));}},performUndo:function(){var i;for(i=0;i<this._postUpdatedGraphics.length;i++){this._postUpdatedGraphics[i].setGeometry(_1169.fromJson(this._preUpdatedGraphicsGeometries[i]));this._postUpdatedGraphics[i].setAttributes(this._preUpdatedGraphicsAttributes[i]);}this._featureLayer.applyEdits(null,this._postUpdatedGraphics,this._addedGraphics);},performRedo:function(){var i;for(i=0;i<this._postUpdatedGraphics.length;i++){this._postUpdatedGraphics[i].setGeometry(_1169.fromJson(this._postUpdatedGraphicsGeometries[i]));this._postUpdatedGraphics[i].setAttributes(this._postUpdatedGraphicsAttributes[i]);}this._featureLayer.applyEdits(this._addedGraphics,this._postUpdatedGraphics,null);}});if(has("extend-esri")){lang.setObject("dijit.editing.Cut",Cut,_1168);}return Cut;});},"dojox/grid/_Events":function(){define("dojox/grid/_Events",["dojo/keys","dojo/dom-class","dojo/_base/declare","dojo/_base/event","dojo/_base/sniff"],function(keys,_116c,_116d,event,has){return _116d("dojox.grid._Events",null,{cellOverClass:"dojoxGridCellOver",onKeyEvent:function(e){this.dispatchKeyEvent(e);},onContentEvent:function(e){this.dispatchContentEvent(e);},onHeaderEvent:function(e){this.dispatchHeaderEvent(e);},onStyleRow:function(inRow){var i=inRow;i.customClasses+=(i.odd?" dojoxGridRowOdd":"")+(i.selected?" dojoxGridRowSelected":"")+(i.over?" dojoxGridRowOver":"");this.focus.styleRow(inRow);this.edit.styleRow(inRow);},onKeyDown:function(e){if(e.altKey||e.metaKey){return;}var _116e;switch(e.keyCode){case keys.ESCAPE:this.edit.cancel();break;case keys.ENTER:if(!this.edit.isEditing()){_116e=this.focus.getHeaderIndex();if(_116e>=0){this.setSortIndex(_116e);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}event.stop(e);}if(!e.shiftKey){var _116f=this.edit.isEditing();this.edit.apply();if(!_116f){this.edit.setEditCell(this.focus.cell,this.focus.rowIndex);}}if(!this.edit.isEditing()){var _1170=this.focus.focusView||this.views.views[0];_1170.content.decorateEvent(e);this.onRowClick(e);event.stop(e);}break;case keys.SPACE:if(!this.edit.isEditing()){_116e=this.focus.getHeaderIndex();if(_116e>=0){this.setSortIndex(_116e);break;}else{this.selection.clickSelect(this.focus.rowIndex,dojo.isCopyKey(e),e.shiftKey);}event.stop(e);}break;case keys.TAB:this.focus[e.shiftKey?"previousKey":"nextKey"](e);break;case keys.LEFT_ARROW:case keys.RIGHT_ARROW:if(!this.edit.isEditing()){var _1171=e.keyCode;event.stop(e);_116e=this.focus.getHeaderIndex();if(_116e>=0&&(e.shiftKey&&e.ctrlKey)){this.focus.colSizeAdjust(e,_116e,(_1171==keys.LEFT_ARROW?-1:1)*5);}else{var _1172=(_1171==keys.LEFT_ARROW)?1:-1;if(this.isLeftToRight()){_1172*=-1;}this.focus.move(0,_1172);}}break;case keys.UP_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){event.stop(e);this.focus.move(-1,0);}break;case keys.DOWN_ARROW:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){event.stop(e);this.focus.move(1,0);}break;case keys.PAGE_UP:if(!this.edit.isEditing()&&this.focus.rowIndex!==0){event.stop(e);if(this.focus.rowIndex!=this.scroller.firstVisibleRow+1){this.focus.move(this.scroller.firstVisibleRow-this.focus.rowIndex,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex-1));this.focus.move(this.scroller.firstVisibleRow-this.scroller.lastVisibleRow+1,0);}}break;case keys.PAGE_DOWN:if(!this.edit.isEditing()&&this.focus.rowIndex+1!=this.rowCount){event.stop(e);if(this.focus.rowIndex!=this.scroller.lastVisibleRow-1){this.focus.move(this.scroller.lastVisibleRow-this.focus.rowIndex-1,0);}else{this.setScrollTop(this.scroller.findScrollTop(this.focus.rowIndex+1));this.focus.move(this.scroller.lastVisibleRow-this.scroller.firstVisibleRow-1,0);}}break;default:break;}},onMouseOver:function(e){e.rowIndex==-1?this.onHeaderCellMouseOver(e):this.onCellMouseOver(e);},onMouseOut:function(e){e.rowIndex==-1?this.onHeaderCellMouseOut(e):this.onCellMouseOut(e);},onMouseDown:function(e){e.rowIndex==-1?this.onHeaderCellMouseDown(e):this.onCellMouseDown(e);},onMouseOverRow:function(e){if(!this.rows.isOver(e.rowIndex)){this.rows.setOverRow(e.rowIndex);e.rowIndex==-1?this.onHeaderMouseOver(e):this.onRowMouseOver(e);}},onMouseOutRow:function(e){if(this.rows.isOver(-1)){this.onHeaderMouseOut(e);}else{if(!this.rows.isOver(-2)){this.rows.setOverRow(-2);this.onRowMouseOut(e);}}},onMouseDownRow:function(e){if(e.rowIndex!=-1){this.onRowMouseDown(e);}},onCellMouseOver:function(e){if(e.cellNode){_116c.add(e.cellNode,this.cellOverClass);}},onCellMouseOut:function(e){if(e.cellNode){_116c.remove(e.cellNode,this.cellOverClass);}},onCellMouseDown:function(e){},onCellClick:function(e){this._click[0]=this._click[1];this._click[1]=e;if(!this.edit.isEditCell(e.rowIndex,e.cellIndex)){this.focus.setFocusCell(e.cell,e.rowIndex);}if(this._click.length>1&&this._click[0]==null){this._click.shift();}this.onRowClick(e);},onCellDblClick:function(e){var event;if(this._click.length>1&&has("ie")){event=this._click[1];}else{if(this._click.length>1&&this._click[0].rowIndex!=this._click[1].rowIndex){event=this._click[0];}else{event=e;}}this.focus.setFocusCell(event.cell,event.rowIndex);this.onRowClick(event);this.edit.setEditCell(event.cell,event.rowIndex);this.onRowDblClick(e);},onCellContextMenu:function(e){this.onRowContextMenu(e);},onCellFocus:function(_1173,_1174){this.edit.cellFocus(_1173,_1174);},onRowClick:function(e){this.edit.rowClick(e);this.selection.clickSelectEvent(e);},onRowDblClick:function(e){},onRowMouseOver:function(e){},onRowMouseOut:function(e){},onRowMouseDown:function(e){},onRowContextMenu:function(e){event.stop(e);},onHeaderMouseOver:function(e){},onHeaderMouseOut:function(e){},onHeaderCellMouseOver:function(e){if(e.cellNode){_116c.add(e.cellNode,this.cellOverClass);}},onHeaderCellMouseOut:function(e){if(e.cellNode){_116c.remove(e.cellNode,this.cellOverClass);}},onHeaderCellMouseDown:function(e){},onHeaderClick:function(e){},onHeaderCellClick:function(e){this.setSortIndex(e.cell.index);this.onHeaderClick(e);},onHeaderDblClick:function(e){},onHeaderCellDblClick:function(e){this.onHeaderDblClick(e);},onHeaderCellContextMenu:function(e){this.onHeaderContextMenu(e);},onHeaderContextMenu:function(e){if(!this.headerMenu){event.stop(e);}},onStartEdit:function(_1175,_1176){},onApplyCellEdit:function(_1177,_1178,_1179){},onCancelEdit:function(_117a){},onApplyEdit:function(_117b){},onCanSelect:function(_117c){return true;},onCanDeselect:function(_117d){return true;},onSelected:function(_117e){this.updateRowStyles(_117e);},onDeselected:function(_117f){this.updateRowStyles(_117f);},onSelectionChanged:function(){}});});},"dijit/Viewport":function(){define("dijit/Viewport",["dojo/Evented","dojo/on","dojo/ready","dojo/sniff","dojo/_base/window","dojo/window"],function(_1180,on,ready,has,win,_1181){var _1182=new _1180();ready(200,function(){var _1183=_1181.getBox();_1182._rlh=on(win.global,"resize",function(){var _1184=_1181.getBox();if(_1183.h==_1184.h&&_1183.w==_1184.w){return;}_1183=_1184;_1182.emit("resize");});if(has("ie")==8){var _1185=screen.deviceXDPI;setInterval(function(){if(screen.deviceXDPI!=_1185){_1185=screen.deviceXDPI;_1182.emit("resize");}},500);}});return _1182;});},"esri/tasks/geometry":function(){define("esri/tasks/geometry",["esri/tasks/GeometryService","esri/tasks/TrimExtendParameters","esri/tasks/BufferParameters","esri/tasks/AreasAndLengthsParameters","esri/tasks/LengthsParameters","esri/tasks/RelationParameters","esri/tasks/DensifyParameters","esri/tasks/GeneralizeParameters","esri/tasks/OffsetParameters","esri/tasks/DistanceParameters","esri/tasks/ProjectParameters"],function(){return {};});},"dojox/gfx/Mover":function(){define("dojox/gfx/Mover",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/on","dojo/touch","dojo/_base/event"],function(lang,arr,_1186,on,touch,event){return _1186("dojox.gfx.Mover",null,{constructor:function(shape,e,host){this.shape=shape;this.lastX=e.clientX;this.lastY=e.clientY;var h=this.host=host,d=document,_1187=on(d,touch.move,lang.hitch(this,"onFirstMove"));this.events=[on(d,touch.move,lang.hitch(this,"onMouseMove")),on(d,touch.release,lang.hitch(this,"destroy")),on(d,"dragstart",lang.hitch(event,"stop")),on(d,"selectstart",lang.hitch(event,"stop")),_1187];if(h&&h.onMoveStart){h.onMoveStart(this);}},onMouseMove:function(e){var x=e.clientX;var y=e.clientY;this.host.onMove(this,{dx:x-this.lastX,dy:y-this.lastY});this.lastX=x;this.lastY=y;event.stop(e);},onFirstMove:function(){this.host.onFirstMove(this);this.events.pop().remove();},destroy:function(){arr.forEach(this.events,function(_1188){_1188.remove();});var h=this.host;if(h&&h.onMoveStop){h.onMoveStop(this);}this.events=this.shape=null;}});});},"esri/tasks/DistanceParameters":function(){define("esri/tasks/DistanceParameters",["dojo/_base/declare","dojo/_base/lang","dojo/_base/json","dojo/has","esri/kernel","esri/geometry/jsonUtils"],function(_1189,lang,_118a,has,_118b,_118c){var _118d=_1189(null,{declaredClass:"esri.tasks.DistanceParameters",geometry1:null,geometry2:null,distanceUnit:null,geodesic:null,toJson:function(){var json={};var _118e=this.geometry1;if(_118e){json.geometry1=_118a.toJson({geometryType:_118c.getJsonType(_118e),geometry:_118e});}var _118f=this.geometry2;if(_118f){json.geometry2=_118a.toJson({geometryType:_118c.getJsonType(_118f),geometry:_118f});}json.sr=_118a.toJson(this.geometry1.spatialReference.toJson());if(this.distanceUnit){json.distanceUnit=this.distanceUnit;}if(this.geodesic){json.geodesic=this.geodesic;}return json;}});if(has("extend-esri")){lang.setObject("tasks.DistanceParameters",_118d,_118b);}return _118d;});},"dojox/grid/util":function(){define("dojox/grid/util",["../main","dojo/_base/lang","dojo/dom"],function(dojox,lang,dom){var dgu=lang.getObject("grid.util",true,dojox);dgu.na="...";dgu.rowIndexTag="gridRowIndex";dgu.gridViewTag="gridView";dgu.fire=function(ob,ev,args){var fn=ob&&ev&&ob[ev];return fn&&(args?fn.apply(ob,args):ob[ev]());};dgu.setStyleHeightPx=function(_1190,_1191){if(_1191>=0){var s=_1190.style;var v=_1191+"px";if(_1190&&s["height"]!=v){s["height"]=v;}}};dgu.mouseEvents=["mouseover","mouseout","mousedown","mouseup","click","dblclick","contextmenu"];dgu.keyEvents=["keyup","keydown","keypress"];dgu.funnelEvents=function(_1192,_1193,_1194,_1195){var evts=(_1195?_1195:dgu.mouseEvents.concat(dgu.keyEvents));for(var i=0,l=evts.length;i<l;i++){_1193.connect(_1192,"on"+evts[i],_1194);}};dgu.removeNode=function(_1196){_1196=dom.byId(_1196);_1196&&_1196.parentNode&&_1196.parentNode.removeChild(_1196);return _1196;};dgu.arrayCompare=function(inA,inB){for(var i=0,l=inA.length;i<l;i++){if(inA[i]!=inB[i]){return false;}}return (inA.length==inB.length);};dgu.arrayInsert=function(_1197,_1198,_1199){if(_1197.length<=_1198){_1197[_1198]=_1199;}else{_1197.splice(_1198,0,_1199);}};dgu.arrayRemove=function(_119a,_119b){_119a.splice(_119b,1);};dgu.arraySwap=function(_119c,inI,inJ){var cache=_119c[inI];_119c[inI]=_119c[inJ];_119c[inJ]=cache;};return dgu;});},"dijit/form/_ComboBoxMenu":function(){define("dijit/form/_ComboBoxMenu",["dojo/_base/declare","dojo/dom-class","dojo/dom-style","dojo/keys","../_WidgetBase","../_TemplatedMixin","./_ComboBoxMenuMixin","./_ListMouseMixin"],function(_119d,_119e,_119f,keys,_11a0,_11a1,_11a2,_11a3){return _119d("dijit.form._ComboBoxMenu",[_11a0,_11a1,_11a3,_11a2],{templateString:"<div class='dijitReset dijitMenu' data-dojo-attach-point='containerNode' style='overflow: auto; overflow-x: hidden;' role='listbox'>"+"<div class='dijitMenuItem dijitMenuPreviousButton' data-dojo-attach-point='previousButton' role='option'></div>"+"<div class='dijitMenuItem dijitMenuNextButton' data-dojo-attach-point='nextButton' role='option'></div>"+"</div>",baseClass:"dijitComboBoxMenu",postCreate:function(){this.inherited(arguments);if(!this.isLeftToRight()){_119e.add(this.previousButton,"dijitMenuItemRtl");_119e.add(this.nextButton,"dijitMenuItemRtl");}},_createMenuItem:function(){var item=this.ownerDocument.createElement("div");item.className="dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl");item.setAttribute("role","option");return item;},onHover:function(node){_119e.add(node,"dijitMenuItemHover");},onUnhover:function(node){_119e.remove(node,"dijitMenuItemHover");},onSelect:function(node){_119e.add(node,"dijitMenuItemSelected");},onDeselect:function(node){_119e.remove(node,"dijitMenuItemSelected");},_page:function(up){var _11a4=0;var _11a5=this.domNode.scrollTop;var _11a6=_119f.get(this.domNode,"height");if(!this.getHighlightedOption()){this.selectNextNode();}while(_11a4<_11a6){var _11a7=this.getHighlightedOption();if(up){if(!_11a7.previousSibling||_11a7.previousSibling.style.display=="none"){break;}this.selectPreviousNode();}else{if(!_11a7.nextSibling||_11a7.nextSibling.style.display=="none"){break;}this.selectNextNode();}var _11a8=this.domNode.scrollTop;_11a4+=(_11a8-_11a5)*(up?-1:1);_11a5=_11a8;}},handleKey:function(evt){switch(evt.keyCode){case keys.DOWN_ARROW:this.selectNextNode();return false;case keys.PAGE_DOWN:this._page(false);return false;case keys.UP_ARROW:this.selectPreviousNode();return false;case keys.PAGE_UP:this._page(true);return false;default:return true;}}});});},"url:esri/dijit/editing/templates/AttachmentEditor.html":"<div class=\"attachmentEditor\">\r\n    <br />\r\n    <div>\r\n        <b>${NLS_attachments}</b>\r\n        <hr />\r\n        <div dojoAttachPoint=\"_attachmentError\" style='color:red;display:none'></div>\r\n        <br />\r\n        <span dojoAttachPoint='_attachmentList' style='word-wrap: break-word;'></span>\r\n        <br><br>\r\n        <form dojoAttachPoint='_uploadForm'> ${NLS_add}:&nbsp;&nbsp;<input type='file' name='attachment' dojoAttachPoint='_uploadField' /> </form>\r\n    </div>\r\n</div>","dojox/grid/cells/_base":function(){define("dojox/grid/cells/_base",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/_base/event","dojo/_base/connect","dojo/_base/array","dojo/_base/sniff","dojo/dom","dojo/dom-attr","dojo/dom-construct","dijit/_Widget","../util"],function(dojo,_11a9,lang,event,_11aa,array,has,dom,_11ab,_11ac,_11ad,util){var _11ae=_11a9("dojox.grid._DeferredTextWidget",_11ad,{deferred:null,_destroyOnRemove:true,postCreate:function(){if(this.deferred){this.deferred.addBoth(lang.hitch(this,function(text){if(this.domNode){this.domNode.innerHTML=text;}}));}}});var _11af=function(_11b0){try{util.fire(_11b0,"focus");util.fire(_11b0,"select");}catch(e){}};var _11b1=function(){setTimeout(lang.hitch.apply(dojo,arguments),0);};var _11b2=_11a9("dojox.grid.cells._Base",null,{styles:"",classes:"",editable:false,alwaysEditing:false,formatter:null,defaultValue:"...",value:null,hidden:false,noresize:false,draggable:true,_valueProp:"value",_formatPending:false,constructor:function(_11b3){this._props=_11b3||{};lang.mixin(this,_11b3);if(this.draggable===undefined){this.draggable=true;}},_defaultFormat:function(_11b4,_11b5){var s=this.grid.formatterScope||this;var f=this.formatter;if(f&&s&&typeof f=="string"){f=this.formatter=s[f];}var v=(_11b4!=this.defaultValue&&f)?f.apply(s,_11b5):_11b4;if(typeof v=="undefined"){return this.defaultValue;}if(v&&v.addBoth){v=new _11ae({deferred:v},_11ac.create("span",{innerHTML:this.defaultValue}));}if(v&&v.declaredClass&&v.startup){return "<div class='dojoxGridStubNode' linkWidget='"+v.id+"' cellIdx='"+this.index+"'>"+this.defaultValue+"</div>";}return v;},format:function(_11b6,_11b7){var f,i=this.grid.edit.info,d=this.get?this.get(_11b6,_11b7):(this.value||this.defaultValue);d=(d&&d.replace&&this.grid.escapeHTMLInData)?d.replace(/&(?![a-z0-9]{1,8}\;)/ig,"&amp;").replace(/</g,"&lt;"):d;if(this.editable&&(this.alwaysEditing||(i.rowIndex==_11b6&&i.cell==this))){return this.formatEditing(d,_11b6);}else{return this._defaultFormat(d,[d,_11b6,this]);}},formatEditing:function(_11b8,_11b9){},getNode:function(_11ba){return this.view.getCellNode(_11ba,this.index);},getHeaderNode:function(){return this.view.getHeaderCellNode(this.index);},getEditNode:function(_11bb){return (this.getNode(_11bb)||0).firstChild||0;},canResize:function(){var uw=this.unitWidth;return uw&&(uw!=="auto");},isFlex:function(){var uw=this.unitWidth;return uw&&lang.isString(uw)&&(uw=="auto"||uw.slice(-1)=="%");},applyEdit:function(_11bc,_11bd){if(this.getNode(_11bd)){this.grid.edit.applyCellEdit(_11bc,this,_11bd);}},cancelEdit:function(_11be){this.grid.doCancelEdit(_11be);},_onEditBlur:function(_11bf){if(this.grid.edit.isEditCell(_11bf,this.index)){this.grid.edit.apply();}},registerOnBlur:function(_11c0,_11c1){if(this.commitOnBlur){_11aa.connect(_11c0,"onblur",function(e){setTimeout(lang.hitch(this,"_onEditBlur",_11c1),250);});}},needFormatNode:function(_11c2,_11c3){this._formatPending=true;_11b1(this,"_formatNode",_11c2,_11c3);},cancelFormatNode:function(){this._formatPending=false;},_formatNode:function(_11c4,_11c5){if(this._formatPending){this._formatPending=false;if(!has("ie")){dom.setSelectable(this.grid.domNode,true);}this.formatNode(this.getEditNode(_11c5),_11c4,_11c5);}},formatNode:function(_11c6,_11c7,_11c8){if(has("ie")){_11b1(this,"focus",_11c8,_11c6);}else{this.focus(_11c8,_11c6);}},dispatchEvent:function(m,e){if(m in this){return this[m](e);}},getValue:function(_11c9){return this.getEditNode(_11c9)[this._valueProp];},setValue:function(_11ca,_11cb){var n=this.getEditNode(_11ca);if(n){n[this._valueProp]=_11cb;}},focus:function(_11cc,_11cd){_11af(_11cd||this.getEditNode(_11cc));},save:function(_11ce){this.value=this.value||this.getValue(_11ce);},restore:function(_11cf){this.setValue(_11cf,this.value);},_finish:function(_11d0){dom.setSelectable(this.grid.domNode,false);this.cancelFormatNode();},apply:function(_11d1){this.applyEdit(this.getValue(_11d1),_11d1);this._finish(_11d1);},cancel:function(_11d2){this.cancelEdit(_11d2);this._finish(_11d2);}});_11b2.markupFactory=function(node,_11d3){var _11d4=lang.trim(_11ab.get(node,"formatter")||"");if(_11d4){_11d3.formatter=lang.getObject(_11d4)||_11d4;}var get=lang.trim(_11ab.get(node,"get")||"");if(get){_11d3.get=lang.getObject(get);}var _11d5=function(attr,cell,_11d6){var value=lang.trim(_11ab.get(node,attr)||"");if(value){cell[_11d6||attr]=!(value.toLowerCase()=="false");}};_11d5("sortDesc",_11d3);_11d5("editable",_11d3);_11d5("alwaysEditing",_11d3);_11d5("noresize",_11d3);_11d5("draggable",_11d3);var value=lang.trim(_11ab.get(node,"loadingText")||_11ab.get(node,"defaultValue")||"");if(value){_11d3.defaultValue=value;}var _11d7=function(attr,cell,_11d8){var value=lang.trim(_11ab.get(node,attr)||"")||undefined;if(value){cell[_11d8||attr]=value;}};_11d7("styles",_11d3);_11d7("headerStyles",_11d3);_11d7("cellStyles",_11d3);_11d7("classes",_11d3);_11d7("headerClasses",_11d3);_11d7("cellClasses",_11d3);};var Cell=_11a9("dojox.grid.cells.Cell",_11b2,{constructor:function(){this.keyFilter=this.keyFilter;},keyFilter:null,formatEditing:function(_11d9,_11da){this.needFormatNode(_11d9,_11da);return "<input class=\"dojoxGridInput\" type=\"text\" value=\""+_11d9+"\">";},formatNode:function(_11db,_11dc,_11dd){this.inherited(arguments);this.registerOnBlur(_11db,_11dd);},doKey:function(e){if(this.keyFilter){var key=String.fromCharCode(e.charCode);if(key.search(this.keyFilter)==-1){event.stop(e);}}},_finish:function(_11de){this.inherited(arguments);var n=this.getEditNode(_11de);try{util.fire(n,"blur");}catch(e){}}});Cell.markupFactory=function(node,_11df){_11b2.markupFactory(node,_11df);var _11e0=lang.trim(_11ab.get(node,"keyFilter")||"");if(_11e0){_11df.keyFilter=new RegExp(_11e0);}};var _11e1=_11a9("dojox.grid.cells.RowIndex",Cell,{name:"Row",postscript:function(){this.editable=false;},get:function(_11e2){return _11e2+1;}});_11e1.markupFactory=function(node,_11e3){Cell.markupFactory(node,_11e3);};var _11e4=_11a9("dojox.grid.cells.Select",Cell,{options:null,values:null,returnIndex:-1,constructor:function(_11e5){this.values=this.values||this.options;},formatEditing:function(_11e6,_11e7){this.needFormatNode(_11e6,_11e7);var h=["<select class=\"dojoxGridSelect\">"];for(var i=0,o,v;((o=this.options[i])!==undefined)&&((v=this.values[i])!==undefined);i++){v=v.replace?v.replace(/&/g,"&amp;").replace(/</g,"&lt;"):v;o=o.replace?o.replace(/&/g,"&amp;").replace(/</g,"&lt;"):o;h.push("<option",(_11e6==v?" selected":"")," value=\""+v+"\"",">",o,"</option>");}h.push("</select>");return h.join("");},_defaultFormat:function(_11e8,_11e9){var v=this.inherited(arguments);if(!this.formatter&&this.values&&this.options){var i=array.indexOf(this.values,v);if(i>=0){v=this.options[i];}}return v;},getValue:function(_11ea){var n=this.getEditNode(_11ea);if(n){var i=n.selectedIndex,o=n.options[i];return this.returnIndex>-1?i:o.value||o.innerHTML;}}});_11e4.markupFactory=function(node,cell){Cell.markupFactory(node,cell);var _11eb=lang.trim(_11ab.get(node,"options")||"");if(_11eb){var o=_11eb.split(",");if(o[0]!=_11eb){cell.options=o;}}var _11ec=lang.trim(_11ab.get(node,"values")||"");if(_11ec){var v=_11ec.split(",");if(v[0]!=_11ec){cell.values=v;}}};var _11ed=_11a9("dojox.grid.cells.AlwaysEdit",Cell,{alwaysEditing:true,_formatNode:function(_11ee,_11ef){this.formatNode(this.getEditNode(_11ef),_11ee,_11ef);},applyStaticValue:function(_11f0){var e=this.grid.edit;e.applyCellEdit(this.getValue(_11f0),this,_11f0);e.start(this,_11f0,true);}});_11ed.markupFactory=function(node,cell){Cell.markupFactory(node,cell);};var Bool=_11a9("dojox.grid.cells.Bool",_11ed,{_valueProp:"checked",formatEditing:function(_11f1,_11f2){return "<input class=\"dojoxGridInput\" type=\"checkbox\""+(_11f1?" checked=\"checked\"":"")+" style=\"width: auto\" />";},doclick:function(e){if(e.target.tagName=="INPUT"){this.applyStaticValue(e.rowIndex);}}});Bool.markupFactory=function(node,cell){_11ed.markupFactory(node,cell);};return _11b2;});},"dijit/form/_DateTimeTextBox":function(){require({cache:{"url:dijit/form/templates/DropDownBox.html":"<div class=\"dijit dijitReset dijitInline dijitLeft\"\n\tid=\"widget_${id}\"\n\trole=\"combobox\"\n\t><div class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer'\n\t\tdata-dojo-attach-point=\"_buttonNode, _popupStateNode\" role=\"presentation\"\n\t\t><input class=\"dijitReset dijitInputField dijitArrowButtonInner\" value=\"&#9660; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"button presentation\" aria-hidden=\"true\"\n\t\t\t${_buttonInputDisabled}\n\t/></div\n\t><div class='dijitReset dijitValidationContainer'\n\t\t><input class=\"dijitReset dijitInputField dijitValidationIcon dijitValidationInner\" value=\"&#935; \" type=\"text\" tabIndex=\"-1\" readonly=\"readonly\" role=\"presentation\"\n\t/></div\n\t><div class=\"dijitReset dijitInputField dijitInputContainer\"\n\t\t><input class='dijitReset dijitInputInner' ${!nameAttrSetting} type=\"text\" autocomplete=\"off\"\n\t\t\tdata-dojo-attach-point=\"textbox,focusNode\" role=\"textbox\" aria-haspopup=\"true\"\n\t/></div\n></div>\n"}});define("dijit/form/_DateTimeTextBox",["dojo/date","dojo/date/locale","dojo/date/stamp","dojo/_base/declare","dojo/_base/lang","./RangeBoundTextBox","../_HasDropDown","dojo/text!./templates/DropDownBox.html"],function(date,_11f3,stamp,_11f4,lang,_11f5,_11f6,_11f7){new Date("X");var _11f8=_11f4("dijit.form._DateTimeTextBox",[_11f5,_11f6],{templateString:_11f7,hasDownArrow:true,cssStateNodes:{"_buttonNode":"dijitDownArrowButton"},pattern:_11f3.regexp,datePackage:"",postMixInProperties:function(){this.inherited(arguments);this._set("type","text");},compare:function(val1,val2){var _11f9=this._isInvalidDate(val1);var _11fa=this._isInvalidDate(val2);return _11f9?(_11fa?0:-1):(_11fa?1:date.compare(val1,val2,this._selector));},forceWidth:true,format:function(value,_11fb){if(!value){return "";}return this.dateLocaleModule.format(value,_11fb);},"parse":function(value,_11fc){return this.dateLocaleModule.parse(value,_11fc)||(this._isEmpty(value)?null:undefined);},serialize:function(val,_11fd){if(val.toGregorian){val=val.toGregorian();}return stamp.toISOString(val,_11fd);},dropDownDefaultValue:new Date(),value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(_11fe){this.dateModule=_11fe.datePackage?lang.getObject(_11fe.datePackage,false):date;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=_11fe.datePackage?lang.getObject(_11fe.datePackage+".locale",false):_11f3;this._set("pattern",this.dateLocaleModule.regexp);this._invalidDate=this.constructor.prototype.value.toString();},buildRendering:function(){this.inherited(arguments);if(!this.hasDownArrow){this._buttonNode.style.display="none";}if(!this.hasDownArrow){this._buttonNode=this.domNode;this.baseClass+=" dijitComboBoxOpenOnClick";}},_setConstraintsAttr:function(_11ff){_11ff.selector=this._selector;_11ff.fullYear=true;var _1200=stamp.fromISOString;if(typeof _11ff.min=="string"){_11ff.min=_1200(_11ff.min);}if(typeof _11ff.max=="string"){_11ff.max=_1200(_11ff.max);}this.inherited(arguments);},_isInvalidDate:function(value){return !value||isNaN(value)||typeof value!="object"||value.toString()==this._invalidDate;},_setValueAttr:function(value,_1201,_1202){if(value!==undefined){if(typeof value=="string"){value=stamp.fromISOString(value);}if(this._isInvalidDate(value)){value=null;}if(value instanceof Date&&!(this.dateClassObj instanceof Date)){value=new this.dateClassObj(value);}}this.inherited(arguments);if(this.value instanceof Date){this.filterString="";}if(this.dropDown){this.dropDown.set("value",value,false);}},_set:function(attr,value){if(attr=="value"&&this.value instanceof Date&&this.compare(value,this.value)==0){return;}this.inherited(arguments);},_setDropDownDefaultValueAttr:function(val){if(this._isInvalidDate(val)){val=new this.dateClassObj();}this.dropDownDefaultValue=val;},openDropDown:function(_1203){if(this.dropDown){this.dropDown.destroy();}var _1204=lang.isString(this.popupClass)?lang.getObject(this.popupClass,false):this.popupClass,_1205=this,value=this.get("value");this.dropDown=new _1204({onChange:function(value){_1205.set("value",value,true);},id:this.id+"_popup",dir:_1205.dir,lang:_1205.lang,value:value,currentFocus:!this._isInvalidDate(value)?value:this.dropDownDefaultValue,constraints:_1205.constraints,filterString:_1205.filterString,datePackage:_1205.params.datePackage,isDisabledDate:function(date){return !_1205.rangeCheck(date,_1205.constraints);}});this.inherited(arguments);},_getDisplayedValueAttr:function(){return this.textbox.value;},_setDisplayedValueAttr:function(value,_1206){this._setValueAttr(this.parse(value,this.constraints),_1206,value);}});return _11f8;});},"dijit/_base/focus":function(){define("dijit/_base/focus",["dojo/_base/array","dojo/dom","dojo/_base/lang","dojo/topic","dojo/_base/window","../focus","../main"],function(array,dom,lang,topic,win,focus,dijit){var _1207={_curFocus:null,_prevFocus:null,isCollapsed:function(){return dijit.getBookmark().isCollapsed;},getBookmark:function(){var bm,rg,tg,sel=win.doc.selection,cf=focus.curNode;if(win.global.getSelection){sel=win.global.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return {isCollapsed:(sel.end<=sel.start),mark:sel};}}bm={isCollapsed:true};if(sel.rangeCount){bm.mark=sel.getRangeAt(0).cloneRange();}}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()};}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return {isCollapsed:true,mark:null};}else{rg=sel.createRange();return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length);}catch(e){bm.isCollapsed=true;return bm;}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i<len){bm.mark.push(rg.item(i++));}}else{bm.isCollapsed=true;bm.mark=null;}}else{bm.mark=rg.getBookmark();}}else{console.warn("No idea how to store the current selection for this browser!");}}return bm;},moveToBookmark:function(_1208){var _1209=win.doc,mark=_1208.mark;if(mark){if(win.global.getSelection){var sel=win.global.getSelection();if(sel&&sel.removeAllRanges){if(mark.pRange){var n=mark.node;n.selectionStart=mark.start;n.selectionEnd=mark.end;}else{sel.removeAllRanges();sel.addRange(mark);}}else{console.warn("No idea how to restore selection for this browser!");}}else{if(_1209.selection&&mark){var rg;if(mark.pRange){rg=mark.range;}else{if(lang.isArray(mark)){rg=_1209.body.createControlRange();array.forEach(mark,function(n){rg.addElement(n);});}else{rg=_1209.body.createTextRange();rg.moveToBookmark(mark);}}rg.select();}}}},getFocus:function(menu,_120a){var node=!focus.curNode||(menu&&dom.isDescendant(focus.curNode,menu.domNode))?dijit._prevFocus:focus.curNode;return {node:node,bookmark:node&&(node==focus.curNode)&&win.withGlobal(_120a||win.global,dijit.getBookmark),openedForWindow:_120a};},_activeStack:[],registerIframe:function(_120b){return focus.registerIframe(_120b);},unregisterIframe:function(_120c){_120c&&_120c.remove();},registerWin:function(_120d,_120e){return focus.registerWin(_120d,_120e);},unregisterWin:function(_120f){_120f&&_120f.remove();}};focus.focus=function(_1210){if(!_1210){return;}var node="node" in _1210?_1210.node:_1210,_1211=_1210.bookmark,_1212=_1210.openedForWindow,_1213=_1211?_1211.isCollapsed:false;if(node){var _1214=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;if(_1214&&_1214.focus){try{_1214.focus();}catch(e){}}focus._onFocusNode(node);}if(_1211&&win.withGlobal(_1212||win.global,dijit.isCollapsed)&&!_1213){if(_1212){_1212.focus();}try{win.withGlobal(_1212||win.global,dijit.moveToBookmark,null,[_1211]);}catch(e2){}}};focus.watch("curNode",function(name,_1215,_1216){dijit._curFocus=_1216;dijit._prevFocus=_1215;if(_1216){topic.publish("focusNode",_1216);}});focus.watch("activeStack",function(name,_1217,_1218){dijit._activeStack=_1218;});focus.on("widget-blur",function(_1219,by){topic.publish("widgetBlur",_1219,by);});focus.on("widget-focus",function(_121a,by){topic.publish("widgetFocus",_121a,by);});lang.mixin(dijit,_1207);return dijit;});},"url:esri/dijit/templates/AttributeInspector.html":"<div class=\"esriAttributeInspector\">\r\n    <div class=\"atiLayerName\" dojoAttachPoint=\"layerName\"></div>\r\n    <div class=\"atiAttributes\" dojoAttachPoint=\"attributeTable\"></div>\r\n    <div dojoAttachPoint=\"attachmentEditor\"></div>\r\n    <div class=\"atiEditorTrackingInfo\" dojoAttachPoint=\"editorTrackingInfoDiv\"></div>\r\n    <div class=\"atiButtons\" dojoAttachPoint=\"editButtons\">\r\n        <button  dojoType=\"dijit.form.Button\" class=\"atiButton atiDeleteButton\"  dojoAttachPoint=\"deleteBtn\" dojoAttachEvent=\"onClick: onDeleteBtn\" showLabel=\"true\" type=\"button\">${NLS_deleteFeature}</button>\r\n        <div class=\"atiNavButtons\" dojoAttachPoint=\"navButtons\">\r\n            <div class=\"atiNavMessage\" dojoAttachPoint=\"navMessage\"></div>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiFirstIcon\" dojoAttachPoint=\"firstFeatureButton\" dojoAttachEvent=\"onClick: onFirstFeature\" showLabel=\"false\" type=\"button\">${NLS_first}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiPrevIcon\" dojoAttachPoint=\"prevFeatureButton\" dojoAttachEvent=\"onClick: onPreviousFeature\" showLabel=\"false\" type=\"button\">${NLS_previous}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiNextIcon\" dojoAttachPoint=\"nextFeatureButton\" dojoAttachEvent=\"onClick: onNextFeature\" showLabel=\"false\" type=\"button\">${NLS_next}</button>\r\n            <button  dojoType=\"dijit.form.Button\" iconClass=\"atiButton atiLastIcon\" dojoAttachPoint=\"lastFeatureButton\" dojoAttachEvent=\"onClick: onLastFeature\" showLabel=\"false\" type=\"button\">${NLS_last}</button>\r\n        </div>\r\n    </div>\r\n</div>\r\n","esri/dijit/editing/Delete":function(){define("esri/dijit/editing/Delete",["dojo/_base/declare","dojo/_base/lang","dojo/has","esri/kernel","esri/OperationBase","esri/dijit/editing/Add"],function(_121b,lang,has,_121c,_121d,Add){var _121e=_121b(_121d,{declaredClass:"esri.dijit.editing.Delete",type:"edit",label:"Delete Features",constructor:function(_121f){_121f=_121f||{};this._add=new Add({featureLayer:_121f.featureLayer,addedGraphics:_121f.deletedGraphics});},performUndo:function(){this._add.performRedo();},performRedo:function(){this._add.performUndo();}});if(has("extend-esri")){lang.setObject("dijit.editing.Delete",_121e,_121c);}return _121e;});},"dijit/a11y":function(){define("dijit/a11y",["dojo/_base/array","dojo/_base/config","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-style","dojo/sniff","./main"],function(array,_1220,_1221,dom,_1222,_1223,has,dijit){var shown=(dijit._isElementShown=function(elem){var s=_1223.get(elem);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_1222.get(elem,"type")!="hidden");});dijit.hasDefaultTabStop=function(elem){switch(elem.nodeName.toLowerCase()){case "a":return _1222.has(elem,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var body;try{var _1224=elem.contentDocument;if("designMode" in _1224&&_1224.designMode=="on"){return true;}body=_1224.body;}catch(e1){try{body=elem.contentWindow.document.body;}catch(e2){return false;}}return body&&(body.contentEditable=="true"||(body.firstChild&&body.firstChild.contentEditable=="true"));default:return elem.contentEditable=="true";}};var _1225=(dijit.isTabNavigable=function(elem){if(_1222.get(elem,"disabled")){return false;}else{if(_1222.has(elem,"tabIndex")){return _1222.get(elem,"tabIndex")>=0;}else{return dijit.hasDefaultTabStop(elem);}}});dijit._getTabNavigable=function(root){var first,last,_1226,_1227,_1228,_1229,_122a={};function _122b(node){return node&&node.tagName.toLowerCase()=="input"&&node.type&&node.type.toLowerCase()=="radio"&&node.name&&node.name.toLowerCase();};var _122c=function(_122d){for(var child=_122d.firstChild;child;child=child.nextSibling){if(child.nodeType!=1||(has("ie")<=9&&child.scopeName!=="HTML")||!shown(child)){continue;}if(_1225(child)){var _122e=+_1222.get(child,"tabIndex");if(!_1222.has(child,"tabIndex")||_122e==0){if(!first){first=child;}last=child;}else{if(_122e>0){if(!_1226||_122e<_1227){_1227=_122e;_1226=child;}if(!_1228||_122e>=_1229){_1229=_122e;_1228=child;}}}var rn=_122b(child);if(_1222.get(child,"checked")&&rn){_122a[rn]=child;}}if(child.nodeName.toUpperCase()!="SELECT"){_122c(child);}}};if(shown(root)){_122c(root);}function rs(node){return _122a[_122b(node)]||node;};return {first:rs(first),last:rs(last),lowest:rs(_1226),highest:rs(_1228)};};dijit.getFirstInTabbingOrder=function(root,doc){var elems=dijit._getTabNavigable(dom.byId(root,doc));return elems.lowest?elems.lowest:elems.first;};dijit.getLastInTabbingOrder=function(root,doc){var elems=dijit._getTabNavigable(dom.byId(root,doc));return elems.last?elems.last:elems.highest;};return {hasDefaultTabStop:dijit.hasDefaultTabStop,isTabNavigable:dijit.isTabNavigable,_getTabNavigable:dijit._getTabNavigable,getFirstInTabbingOrder:dijit.getFirstInTabbingOrder,getLastInTabbingOrder:dijit.getLastInTabbingOrder};});},"dojox/grid/_Scroller":function(){define("dojox/grid/_Scroller",["dijit/registry","dojo/_base/declare","dojo/_base/lang","./util","dojo/_base/html"],function(_122f,_1230,lang,util,html){var _1231=function(_1232){var i=0,n,p=_1232.parentNode;while((n=p.childNodes[i++])){if(n==_1232){return i-1;}}return -1;};var _1233=function(_1234){if(!_1234){return;}dojo.forEach(_122f.toArray(),function(w){if(w.domNode&&html.isDescendant(w.domNode,_1234,true)){w.destroy();}});};var _1235=function(_1236){var node=html.byId(_1236);return (node&&node.tagName?node.tagName.toLowerCase():"");};var _1237=function(_1238,inTag){var _1239=[];var i=0,n;while((n=_1238.childNodes[i])){i++;if(_1235(n)==inTag){_1239.push(n);}}return _1239;};var _123a=function(_123b){return _1237(_123b,"div");};return _1230("dojox.grid._Scroller",null,{constructor:function(_123c){this.setContentNodes(_123c);this.pageHeights=[];this.pageNodes=[];this.stack=[];},rowCount:0,defaultRowHeight:32,keepRows:100,contentNode:null,scrollboxNode:null,defaultPageHeight:0,keepPages:10,pageCount:0,windowHeight:0,firstVisibleRow:0,lastVisibleRow:0,averageRowHeight:0,page:0,pageTop:0,init:function(_123d,_123e,_123f){switch(arguments.length){case 3:this.rowsPerPage=_123f;case 2:this.keepRows=_123e;case 1:this.rowCount=_123d;default:break;}this.defaultPageHeight=(this.grid.rowHeight>0?this.grid.rowHeight:this.defaultRowHeight)*this.rowsPerPage;this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);this.setKeepInfo(this.keepRows);this.invalidate();if(this.scrollboxNode){this.scrollboxNode.scrollTop=0;this.scroll(0);this.scrollboxNode.onscroll=lang.hitch(this,"onscroll");}},_getPageCount:function(_1240,_1241){return _1240?(Math.ceil(_1240/_1241)||1):0;},destroy:function(){this.invalidateNodes();delete this.contentNodes;delete this.contentNode;delete this.scrollboxNode;},setKeepInfo:function(_1242){this.keepRows=_1242;this.keepPages=!this.keepRows?this.keepPages:Math.max(Math.ceil(this.keepRows/this.rowsPerPage),2);},setContentNodes:function(_1243){this.contentNodes=_1243;this.colCount=(this.contentNodes?this.contentNodes.length:0);this.pageNodes=[];for(var i=0;i<this.colCount;i++){this.pageNodes[i]=[];}},getDefaultNodes:function(){return this.pageNodes[0]||[];},invalidate:function(){this._invalidating=true;this.invalidateNodes();this.pageHeights=[];this.height=(this.pageCount?(this.pageCount-1)*this.defaultPageHeight+this.calcLastPageHeight():0);this.resize();this._invalidating=false;},updateRowCount:function(_1244){this.invalidateNodes();this.rowCount=_1244;var _1245=this.pageCount;if(_1245===0){this.height=1;}this.pageCount=this._getPageCount(this.rowCount,this.rowsPerPage);if(this.pageCount<_1245){for(var i=_1245-1;i>=this.pageCount;i--){this.height-=this.getPageHeight(i);delete this.pageHeights[i];}}else{if(this.pageCount>_1245){this.height+=this.defaultPageHeight*(this.pageCount-_1245-1)+this.calcLastPageHeight();}}this.resize();},pageExists:function(_1246){return Boolean(this.getDefaultPageNode(_1246));},measurePage:function(_1247){if(this.grid.rowHeight){return ((_1247+1)*this.rowsPerPage>this.rowCount?this.rowCount-_1247*this.rowsPerPage:this.rowsPerPage)*this.grid.rowHeight;}var n=this.getDefaultPageNode(_1247);return (n&&n.innerHTML)?n.offsetHeight:undefined;},positionPage:function(_1248,inPos){for(var i=0;i<this.colCount;i++){this.pageNodes[i][_1248].style.top=inPos+"px";}},repositionPages:function(_1249){var nodes=this.getDefaultNodes();var last=0;for(var i=0;i<this.stack.length;i++){last=Math.max(this.stack[i],last);}var n=nodes[_1249];var y=(n?this.getPageNodePosition(n)+this.getPageHeight(_1249):0);for(var p=_1249+1;p<=last;p++){n=nodes[p];if(n){if(this.getPageNodePosition(n)==y){return;}this.positionPage(p,y);}y+=this.getPageHeight(p);}},installPage:function(_124a){for(var i=0;i<this.colCount;i++){this.contentNodes[i].appendChild(this.pageNodes[i][_124a]);}},preparePage:function(_124b,_124c){var p=(_124c?this.popPage():null);for(var i=0;i<this.colCount;i++){var nodes=this.pageNodes[i];var new_p=(p===null?this.createPageNode():this.invalidatePageNode(p,nodes));new_p.pageIndex=_124b;nodes[_124b]=new_p;}},renderPage:function(_124d){var nodes=[];var i,j;for(i=0;i<this.colCount;i++){nodes[i]=this.pageNodes[i][_124d];}for(i=0,j=_124d*this.rowsPerPage;(i<this.rowsPerPage)&&(j<this.rowCount);i++,j++){this.renderRow(j,nodes);}},removePage:function(_124e){for(var i=0,j=_124e*this.rowsPerPage;i<this.rowsPerPage;i++,j++){this.removeRow(j);}},destroyPage:function(_124f){for(var i=0;i<this.colCount;i++){var n=this.invalidatePageNode(_124f,this.pageNodes[i]);if(n){html.destroy(n);}}},pacify:function(_1250){},pacifying:false,pacifyTicks:200,setPacifying:function(_1251){if(this.pacifying!=_1251){this.pacifying=_1251;this.pacify(this.pacifying);}},startPacify:function(){this.startPacifyTicks=new Date().getTime();},doPacify:function(){var _1252=(new Date().getTime()-this.startPacifyTicks)>this.pacifyTicks;this.setPacifying(true);this.startPacify();return _1252;},endPacify:function(){this.setPacifying(false);},resize:function(){if(this.scrollboxNode){this.windowHeight=this.scrollboxNode.clientHeight;}for(var i=0;i<this.colCount;i++){util.setStyleHeightPx(this.contentNodes[i],Math.max(1,this.height));}var _1253=(!this._invalidating);if(!_1253){var ah=this.grid.get("autoHeight");if(typeof ah=="number"&&ah<=Math.min(this.rowsPerPage,this.rowCount)){_1253=true;}}if(_1253){this.needPage(this.page,this.pageTop);}var _1254=(this.page<this.pageCount-1)?this.rowsPerPage:((this.rowCount%this.rowsPerPage)||this.rowsPerPage);var _1255=this.getPageHeight(this.page);this.averageRowHeight=(_1255>0&&_1254>0)?(_1255/_1254):0;},calcLastPageHeight:function(){if(!this.pageCount){return 0;}var _1256=this.pageCount-1;var _1257=((this.rowCount%this.rowsPerPage)||(this.rowsPerPage))*this.defaultRowHeight;this.pageHeights[_1256]=_1257;return _1257;},updateContentHeight:function(inDh){this.height+=inDh;this.resize();},updatePageHeight:function(_1258,_1259,_125a){if(this.pageExists(_1258)){var oh=this.getPageHeight(_1258);var h=(this.measurePage(_1258));if(h===undefined){h=oh;}this.pageHeights[_1258]=h;if(oh!=h){this.updateContentHeight(h-oh);var ah=this.grid.get("autoHeight");if((typeof ah=="number"&&ah>this.rowCount)||(ah===true&&!_1259)){if(!_125a){this.grid.sizeChange();}else{var ns=this.grid.viewsNode.style;ns.height=parseInt(ns.height)+h-oh+"px";this.repositionPages(_1258);}}else{this.repositionPages(_1258);}}return h;}return 0;},rowHeightChanged:function(_125b,_125c){this.updatePageHeight(Math.floor(_125b/this.rowsPerPage),false,_125c);},invalidateNodes:function(){while(this.stack.length){this.destroyPage(this.popPage());}},createPageNode:function(){var p=document.createElement("div");html.attr(p,"role","presentation");p.style.position="absolute";p.style[this.grid.isLeftToRight()?"left":"right"]="0";return p;},getPageHeight:function(_125d){var ph=this.pageHeights[_125d];return (ph!==undefined?ph:this.defaultPageHeight);},pushPage:function(_125e){return this.stack.push(_125e);},popPage:function(){return this.stack.shift();},findPage:function(inTop){var i=0,h=0;for(var ph=0;i<this.pageCount;i++,h+=ph){ph=this.getPageHeight(i);if(h+ph>=inTop){break;}}this.page=i;this.pageTop=h;},buildPage:function(_125f,_1260,inPos){this.preparePage(_125f,_1260);this.positionPage(_125f,inPos);this.installPage(_125f);this.renderPage(_125f);this.pushPage(_125f);},needPage:function(_1261,inPos){var h=this.getPageHeight(_1261),oh=h;if(!this.pageExists(_1261)){this.buildPage(_1261,(!this.grid._autoHeight&&this.keepPages&&(this.stack.length>=this.keepPages)),inPos);h=this.updatePageHeight(_1261,true);}else{this.positionPage(_1261,inPos);}return h;},onscroll:function(){this.scroll(this.scrollboxNode.scrollTop);},scroll:function(inTop){this.grid.scrollTop=inTop;if(this.colCount){this.startPacify();this.findPage(inTop);var h=this.height;var b=this.getScrollBottom(inTop);for(var p=this.page,y=this.pageTop;(p<this.pageCount)&&((b<0)||(y<b));p++){y+=this.needPage(p,y);}this.firstVisibleRow=this.getFirstVisibleRow(this.page,this.pageTop,inTop);this.lastVisibleRow=this.getLastVisibleRow(p-1,y,b);if(h!=this.height){this.repositionPages(p-1);}this.endPacify();}},getScrollBottom:function(inTop){return (this.windowHeight>=0?inTop+this.windowHeight:-1);},processNodeEvent:function(e,_1262){var t=e.target;while(t&&(t!=_1262)&&t.parentNode&&(t.parentNode.parentNode!=_1262)){t=t.parentNode;}if(!t||!t.parentNode||(t.parentNode.parentNode!=_1262)){return false;}var page=t.parentNode;e.topRowIndex=page.pageIndex*this.rowsPerPage;e.rowIndex=e.topRowIndex+_1231(t);e.rowTarget=t;return true;},processEvent:function(e){return this.processNodeEvent(e,this.contentNode);},renderRow:function(_1263,_1264){},removeRow:function(_1265){},getDefaultPageNode:function(_1266){return this.getDefaultNodes()[_1266];},positionPageNode:function(_1267,inPos){},getPageNodePosition:function(_1268){return _1268.offsetTop;},invalidatePageNode:function(_1269,_126a){var p=_126a[_1269];if(p){delete _126a[_1269];this.removePage(_1269,p);_1233(p);p.innerHTML="";}return p;},getPageRow:function(_126b){return _126b*this.rowsPerPage;},getLastPageRow:function(_126c){return Math.min(this.rowCount,this.getPageRow(_126c+1))-1;},getFirstVisibleRow:function(_126d,_126e,_126f){if(!this.pageExists(_126d)){return 0;}var row=this.getPageRow(_126d);var nodes=this.getDefaultNodes();var rows=_123a(nodes[_126d]);for(var i=0,l=rows.length;i<l&&_126e<_126f;i++,row++){_126e+=rows[i].offsetHeight;}return (row?row-1:row);},getLastVisibleRow:function(_1270,_1271,_1272){if(!this.pageExists(_1270)){return 0;}var nodes=this.getDefaultNodes();var row=this.getLastPageRow(_1270);var rows=_123a(nodes[_1270]);for(var i=rows.length-1;i>=0&&_1271>_1272;i--,row--){_1271-=rows[i].offsetHeight;}return row+1;},findTopRow:function(_1273){var nodes=this.getDefaultNodes();var rows=_123a(nodes[this.page]);for(var i=0,l=rows.length,t=this.pageTop,h;i<l;i++){h=rows[i].offsetHeight;t+=h;if(t>=_1273){this.offset=h-(t-_1273);return i+this.page*this.rowsPerPage;}}return -1;},findScrollTop:function(inRow){var _1274=Math.floor(inRow/this.rowsPerPage);var t=0;var i,l;for(i=0;i<_1274;i++){t+=this.getPageHeight(i);}this.pageTop=t;this.page=_1274;this.needPage(_1274,this.pageTop);var nodes=this.getDefaultNodes();var rows=_123a(nodes[_1274]);var r=inRow-this.rowsPerPage*_1274;for(i=0,l=rows.length;i<l&&i<r;i++){t+=rows[i].offsetHeight;}return t;},dummy:0});});},"dijit/Calendar":function(){define("dijit/Calendar",["dojo/_base/array","dojo/date","dojo/date/locale","dojo/_base/declare","dojo/dom-attr","dojo/dom-class","dojo/_base/event","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/sniff","./CalendarLite","./_Widget","./_CssStateMixin","./_TemplatedMixin","./form/DropDownButton"],function(array,date,local,_1275,_1276,_1277,event,_1278,keys,lang,has,_1279,_127a,_127b,_127c,_127d){var _127e=_1275("dijit.Calendar",[_1279,_127a,_127b],{cssStateNodes:{"decrementMonth":"dijitCalendarArrow","incrementMonth":"dijitCalendarArrow","previousYearLabelNode":"dijitCalendarPreviousYear","nextYearLabelNode":"dijitCalendarNextYear"},setValue:function(value){_1278.deprecated("dijit.Calendar:setValue() is deprecated.  Use set('value', ...) instead.","","2.0");this.set("value",value);},_createMonthWidget:function(){return new _127e._MonthDropDownButton({id:this.id+"_mddb",tabIndex:-1,onMonthSelect:lang.hitch(this,"_onMonthSelect"),lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode);},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onkeydown","_onKeyDown");this.connect(this.dateRowsNode,"onmouseover","_onDayMouseOver");this.connect(this.dateRowsNode,"onmouseout","_onDayMouseOut");this.connect(this.dateRowsNode,"onmousedown","_onDayMouseDown");this.connect(this.dateRowsNode,"onmouseup","_onDayMouseUp");},_onMonthSelect:function(_127f){var date=new this.dateClassObj(this.currentFocus);date.setDate(1);date.setMonth(_127f);var _1280=this.dateModule.getDaysInMonth(date);var _1281=this.currentFocus.getDate();date.setDate(Math.min(_1281,_1280));this._setCurrentFocusAttr(date);},_onDayMouseOver:function(evt){var node=_1277.contains(evt.target,"dijitCalendarDateLabel")?evt.target.parentNode:evt.target;if(node&&((node.dijitDateValue&&!_1277.contains(node,"dijitCalendarDisabledDate"))||node==this.previousYearLabelNode||node==this.nextYearLabelNode)){_1277.add(node,"dijitCalendarHoveredDate");this._currentNode=node;}},_onDayMouseOut:function(evt){if(!this._currentNode){return;}if(evt.relatedTarget&&evt.relatedTarget.parentNode==this._currentNode){return;}var cls="dijitCalendarHoveredDate";if(_1277.contains(this._currentNode,"dijitCalendarActiveDate")){cls+=" dijitCalendarActiveDate";}_1277.remove(this._currentNode,cls);this._currentNode=null;},_onDayMouseDown:function(evt){var node=evt.target.parentNode;if(node&&node.dijitDateValue&&!_1277.contains(node,"dijitCalendarDisabledDate")){_1277.add(node,"dijitCalendarActiveDate");this._currentNode=node;}},_onDayMouseUp:function(evt){var node=evt.target.parentNode;if(node&&node.dijitDateValue){_1277.remove(node,"dijitCalendarActiveDate");}},handleKey:function(evt){var _1282=-1,_1283,_1284=this.currentFocus;switch(evt.keyCode){case keys.RIGHT_ARROW:_1282=1;case keys.LEFT_ARROW:_1283="day";if(!this.isLeftToRight()){_1282*=-1;}break;case keys.DOWN_ARROW:_1282=1;case keys.UP_ARROW:_1283="week";break;case keys.PAGE_DOWN:_1282=1;case keys.PAGE_UP:_1283=evt.ctrlKey||evt.altKey?"year":"month";break;case keys.END:_1284=this.dateModule.add(_1284,"month",1);_1283="day";case keys.HOME:_1284=new this.dateClassObj(_1284);_1284.setDate(1);break;case keys.ENTER:case keys.SPACE:this.set("value",this.currentFocus);break;default:return true;}if(_1283){_1284=this.dateModule.add(_1284,_1283,_1282);}this._setCurrentFocusAttr(_1284);return false;},_onKeyDown:function(evt){if(!this.handleKey(evt)){event.stop(evt);}},onValueSelected:function(){},onChange:function(value){this.onValueSelected(value);},getClassForDate:function(){}});_127e._MonthDropDownButton=_1275("dijit.Calendar._MonthDropDownButton",_127d,{onMonthSelect:function(){},postCreate:function(){this.inherited(arguments);this.dropDown=new _127e._MonthDropDown({id:this.id+"_mdd",onChange:this.onMonthSelect});},_setMonthAttr:function(month){var _1285=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,month);this.dropDown.set("months",_1285);this.containerNode.innerHTML=(has("ie")==6?"":"<div class='dijitSpacer'>"+this.dropDown.domNode.innerHTML+"</div>")+"<div class='dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'>"+_1285[month.getMonth()]+"</div>";}});_127e._MonthDropDown=_1275("dijit.Calendar._MonthDropDown",[_127a,_127c],{months:[],templateString:"<div class='dijitCalendarMonthMenu dijitMenu' "+"data-dojo-attach-event='onclick:_onClick,onmouseover:_onMenuHover,onmouseout:_onMenuHover'></div>",_setMonthsAttr:function(_1286){this.domNode.innerHTML=array.map(_1286,function(month,idx){return month?"<div class='dijitCalendarMonthLabel' month='"+idx+"'>"+month+"</div>":"";}).join("");},_onClick:function(evt){this.onChange(_1276.get(evt.target,"month"));},onChange:function(){},_onMenuHover:function(evt){_1277.toggle(evt.target,"dijitCalendarMonthLabelHover",evt.type=="mouseover");}});return _127e;});},"dijit/form/_ToggleButtonMixin":function(){define("dijit/form/_ToggleButtonMixin",["dojo/_base/declare","dojo/dom-attr"],function(_1287,_1288){return _1287("dijit.form._ToggleButtonMixin",null,{checked:false,_aria_attr:"aria-pressed",_onClick:function(evt){var _1289=this.checked;this._set("checked",!_1289);var ret=this.inherited(arguments);this.set("checked",ret?this.checked:_1289);return ret;},_setCheckedAttr:function(value,_128a){this._set("checked",value);var node=this.focusNode||this.domNode;if(this._created){if(_1288.get(node,"checked")!=!!value){_1288.set(node,"checked",!!value);}}node.setAttribute(this._aria_attr,String(value));this._handleOnChange(value,_128a);},postCreate:function(){this.inherited(arguments);var node=this.focusNode||this.domNode;if(this.checked){node.setAttribute("checked","checked");}},reset:function(){this._hasBeenBlurred=false;this.set("checked",this.params.checked||false);}});});},"dojo/dnd/Container":function(){define(["../_base/array","../_base/declare","../_base/event","../_base/kernel","../_base/lang","../_base/window","../dom","../dom-class","../dom-construct","../Evented","../has","../on","../query","../ready","../touch","./common"],function(array,_128b,event,_128c,lang,win,dom,_128d,_128e,_128f,has,on,query,ready,touch,dnd){var _1290=_128b("dojo.dnd.Container",_128f,{skipForm:false,allowNested:false,constructor:function(node,_1291){this.node=dom.byId(node);if(!_1291){_1291={};}this.creator=_1291.creator||null;this.skipForm=_1291.skipForm;this.parent=_1291.dropParent&&dom.byId(_1291.dropParent);this.map={};this.current=null;this.containerState="";_128d.add(this.node,"dojoDndContainer");if(!(_1291&&_1291._skipStartup)){this.startup();}this.events=[on(this.node,touch.over,lang.hitch(this,"onMouseOver")),on(this.node,touch.out,lang.hitch(this,"onMouseOut")),on(this.node,"dragstart",lang.hitch(this,"onSelectStart")),on(this.node,"selectstart",lang.hitch(this,"onSelectStart"))];},creator:function(){},getItem:function(key){return this.map[key];},setItem:function(key,data){this.map[key]=data;},delItem:function(key){delete this.map[key];},forInItems:function(f,o){o=o||_128c.global;var m=this.map,e=dnd._empty;for(var i in m){if(i in e){continue;}f.call(o,m[i],i,this);}return o;},clearItems:function(){this.map={};},getAllNodes:function(){return query((this.allowNested?"":"> ")+".dojoDndItem",this.parent);},sync:function(){var map={};this.getAllNodes().forEach(function(node){if(node.id){var item=this.getItem(node.id);if(item){map[node.id]=item;return;}}else{node.id=dnd.getUniqueId();}var type=node.getAttribute("dndType"),data=node.getAttribute("dndData");map[node.id]={data:data||node.innerHTML,type:type?type.split(/\s*,\s*/):["text"]};},this);this.map=map;return this;},insertNodes:function(data,_1292,_1293){if(!this.parent.firstChild){_1293=null;}else{if(_1292){if(!_1293){_1293=this.parent.firstChild;}}else{if(_1293){_1293=_1293.nextSibling;}}}var i,t;if(_1293){for(i=0;i<data.length;++i){t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});_1293.parentNode.insertBefore(t.node,_1293);}}else{for(i=0;i<data.length;++i){t=this._normalizedCreator(data[i]);this.setItem(t.node.id,{data:t.data,type:t.type});this.parent.appendChild(t.node);}}return this;},destroy:function(){array.forEach(this.events,function(_1294){_1294.remove();});this.clearItems();this.node=this.parent=this.current=null;},markupFactory:function(_1295,node,Ctor){_1295._skipStartup=true;return new Ctor(node,_1295);},startup:function(){if(!this.parent){this.parent=this.node;if(this.parent.tagName.toLowerCase()=="table"){var c=this.parent.getElementsByTagName("tbody");if(c&&c.length){this.parent=c[0];}}}this.defaultCreator=dnd._defaultCreator(this.parent);this.sync();},onMouseOver:function(e){var n=e.relatedTarget;while(n){if(n==this.node){break;}try{n=n.parentNode;}catch(x){n=null;}}if(!n){this._changeState("Container","Over");this.onOverEvent();}n=this._getChildByEvent(e);if(this.current==n){return;}if(this.current){this._removeItemClass(this.current,"Over");}if(n){this._addItemClass(n,"Over");}this.current=n;},onMouseOut:function(e){for(var n=e.relatedTarget;n;){if(n==this.node){return;}try{n=n.parentNode;}catch(x){n=null;}}if(this.current){this._removeItemClass(this.current,"Over");this.current=null;}this._changeState("Container","");this.onOutEvent();},onSelectStart:function(e){if(!this.skipForm||!dnd.isFormElement(e)){event.stop(e);}},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(type,_1296){var _1297="dojoDnd"+type;var state=type.toLowerCase()+"State";_128d.replace(this.node,_1297+_1296,_1297+this[state]);this[state]=_1296;},_addItemClass:function(node,type){_128d.add(node,"dojoDndItem"+type);},_removeItemClass:function(node,type){_128d.remove(node,"dojoDndItem"+type);},_getChildByEvent:function(e){var node=e.target;if(node){for(var _1298=node.parentNode;_1298;node=_1298,_1298=node.parentNode){if((_1298==this.parent||this.allowNested)&&_128d.contains(node,"dojoDndItem")){return node;}}}return null;},_normalizedCreator:function(item,hint){var t=(this.creator||this.defaultCreator).call(this,item,hint);if(!lang.isArray(t.type)){t.type=["text"];}if(!t.node.id){t.node.id=dnd.getUniqueId();}_128d.add(t.node,"dojoDndItem");return t;}});dnd._createNode=function(tag){if(!tag){return dnd._createSpan;}return function(text){return _128e.create(tag,{innerHTML:text});};};dnd._createTrTd=function(text){var tr=_128e.create("tr");_128e.create("td",{innerHTML:text},tr);return tr;};dnd._createSpan=function(text){return _128e.create("span",{innerHTML:text});};dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};dnd._defaultCreator=function(node){var tag=node.tagName.toLowerCase();var c=tag=="tbody"||tag=="thead"?dnd._createTrTd:dnd._createNode(dnd._defaultCreatorNodes[tag]);return function(item,hint){var isObj=item&&lang.isObject(item),data,type,n;if(isObj&&item.tagName&&item.nodeType&&item.getAttribute){data=item.getAttribute("dndData")||item.innerHTML;type=item.getAttribute("dndType");type=type?type.split(/\s*,\s*/):["text"];n=item;}else{data=(isObj&&item.data)?item.data:item;type=(isObj&&item.type)?item.type:["text"];n=(hint=="avatar"?dnd._createSpan:c)(String(data));}if(!n.id){n.id=dnd.getUniqueId();}return {node:n,data:data,type:type};};};return _1290;});},"dojox/date/islamic":function(){define("dojox/date/islamic",["..","dojo/_base/lang","dojo/date","./islamic/Date"],function(dojox,lang,dd,IDate){var _1299=lang.getObject("date.islamic",true,dojox);_1299.getDaysInMonth=function(month){return month.getDaysInIslamicMonth(month.getMonth(),month.getFullYear());};_1299.compare=function(date1,date2,_129a){if(date1 instanceof IDate){date1=date1.toGregorian();}if(date2 instanceof IDate){date2=date2.toGregorian();}return dd.compare.apply(null,arguments);};_1299.add=function(date,_129b,_129c){var _129d=new IDate(date);switch(_129b){case "day":_129d.setDate(date.getDate()+_129c);break;case "weekday":var day=date.getDay();if(((day+_129c)<5)&&((day+_129c)>0)){_129d.setDate(date.getDate()+_129c);}else{var _129e=0,_129f=0;if(day==5){day=4;_129f=(_129c>0)?-1:1;}else{if(day==6){day=4;_129f=(_129c>0)?-2:2;}}var add=(_129c>0)?(5-day-1):-day;var _12a0=_129c-add;var div=parseInt(_12a0/5);if(_12a0%5!=0){_129e=(_129c>0)?2:-2;}_129e=_129e+div*7+_12a0%5+add;_129d.setDate(date.getDate()+_129e+_129f);}break;case "year":_129d.setFullYear(date.getFullYear()+_129c);break;case "week":_129c*=7;_129d.setDate(date.getDate()+_129c);break;case "month":var month=date.getMonth();_129d.setMonth(month+_129c);break;case "hour":_129d.setHours(date.getHours()+_129c);break;case "minute":_129d._addMinutes(_129c);break;case "second":_129d._addSeconds(_129c);break;case "millisecond":_129d._addMilliseconds(_129c);break;}return _129d;};_1299.difference=function(date1,date2,_12a1){date2=date2||new IDate();_12a1=_12a1||"day";var _12a2=date2.getFullYear()-date1.getFullYear();var delta=1;switch(_12a1){case "weekday":var days=Math.round(_1299.difference(date1,date2,"day"));var weeks=parseInt(_1299.difference(date1,date2,"week"));var mod=days%7;if(mod==0){days=weeks*5;}else{var adj=0;var aDay=date1.getDay();var bDay=date2.getDay();weeks=parseInt(days/7);mod=days%7;var _12a3=new IDate(date1);_12a3.setDate(_12a3.getDate()+(weeks*7));var _12a4=_12a3.getDay();if(days>0){switch(true){case aDay==5:adj=-1;break;case aDay==6:adj=0;break;case bDay==5:adj=-1;break;case bDay==6:adj=-2;break;case (_12a4+mod)>5:adj=-2;}}else{if(days<0){switch(true){case aDay==5:adj=0;break;case aDay==6:adj=1;break;case bDay==5:adj=2;break;case bDay==6:adj=1;break;case (_12a4+mod)<0:adj=2;}}}days+=adj;days-=(weeks*2);}delta=days;break;case "year":delta=_12a2;break;case "month":var _12a5=(date2.toGregorian()>date1.toGregorian())?date2:date1;var _12a6=(date2.toGregorian()>date1.toGregorian())?date1:date2;var _12a7=_12a5.getMonth();var _12a8=_12a6.getMonth();if(_12a2==0){delta=_12a5.getMonth()-_12a6.getMonth();}else{delta=12-_12a8;delta+=_12a7;var i=_12a6.getFullYear()+1;var e=_12a5.getFullYear();for(i;i<e;i++){delta+=12;}}if(date2.toGregorian()<date1.toGregorian()){delta=-delta;}break;case "week":delta=parseInt(_1299.difference(date1,date2,"day")/7);break;case "day":delta/=24;case "hour":delta/=60;case "minute":delta/=60;case "second":delta/=1000;case "millisecond":delta*=date2.toGregorian().getTime()-date1.toGregorian().getTime();}return Math.round(delta);};return _1299;});},"dijit/_Widget":function(){define("dijit/_Widget",["dojo/aspect","dojo/_base/config","dojo/_base/connect","dojo/_base/declare","dojo/has","dojo/_base/kernel","dojo/_base/lang","dojo/query","dojo/ready","./registry","./_WidgetBase","./_OnDijitClickMixin","./_FocusMixin","dojo/uacss","./hccss"],function(_12a9,_12aa,_12ab,_12ac,has,_12ad,lang,query,ready,_12ae,_12af,_12b0,_12b1){function _12b2(){};function _12b3(_12b4){return function(obj,event,scope,_12b5){if(obj&&typeof event=="string"&&obj[event]==_12b2){return obj.on(event.substring(2).toLowerCase(),lang.hitch(scope,_12b5));}return _12b4.apply(_12ab,arguments);};};_12a9.around(_12ab,"connect",_12b3);if(_12ad.connect){_12a9.around(_12ad,"connect",_12b3);}var _12b6=_12ac("dijit._Widget",[_12af,_12b0,_12b1],{onClick:_12b2,onDblClick:_12b2,onKeyDown:_12b2,onKeyPress:_12b2,onKeyUp:_12b2,onMouseDown:_12b2,onMouseMove:_12b2,onMouseOut:_12b2,onMouseOver:_12b2,onMouseLeave:_12b2,onMouseEnter:_12b2,onMouseUp:_12b2,constructor:function(_12b7){this._toConnect={};for(var name in _12b7){if(this[name]===_12b2){this._toConnect[name.replace(/^on/,"").toLowerCase()]=_12b7[name];delete _12b7[name];}}},postCreate:function(){this.inherited(arguments);for(var name in this._toConnect){this.on(name,this._toConnect[name]);}delete this._toConnect;},on:function(type,func){if(this[this._onMap(type)]===_12b2){return _12ab.connect(this.domNode,type.toLowerCase(),this,func);}return this.inherited(arguments);},_setFocusedAttr:function(val){this._focused=val;this._set("focused",val);},setAttribute:function(attr,value){_12ad.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,value);},attr:function(name,value){if(_12aa.isDebug){var _12b8=arguments.callee._ach||(arguments.callee._ach={}),_12b9=(arguments.callee.caller||"unknown caller").toString();if(!_12b8[_12b9]){_12ad.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_12b9,"","2.0");_12b8[_12b9]=true;}}var args=arguments.length;if(args>=2||typeof name==="object"){return this.set.apply(this,arguments);}else{return this.get(name);}},getDescendants:function(){_12ad.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?query("[widgetId]",this.containerNode).map(_12ae.byNode):[];},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});if(has("dijit-legacy-requires")){ready(0,function(){var _12ba=["dijit/_base"];require(_12ba);});}return _12b6;});},"dojo/touch":function(){define(["./_base/kernel","./aspect","./dom","./_base/lang","./on","./has","./mouse","./domReady","./_base/window"],function(dojo,_12bb,dom,lang,on,has,mouse,_12bc,win){var _12bd=navigator.msPointerEnabled;var _12be;function _12bf(_12c0,_12c1,_12c2){if(_12bd&&_12c2){return function(node,_12c3){return on(node,_12c2,_12c3);};}else{if(has("touch")){return function(node,_12c4){var _12c5=on(node,_12c1,_12c4),_12c6=on(node,_12c0,function(evt){if(!_12be||(new Date()).getTime()>_12be+1000){_12c4.call(this,evt);}});return {remove:function(){_12c5.remove();_12c6.remove();}};};}else{return function(node,_12c7){return on(node,_12c0,_12c7);};}}};var _12c8,_12c9,_12ca;if(has("touch")&&!_12bd){_12bc(function(){_12ca=win.body();win.doc.addEventListener("touchstart",function(event){_12be=(new Date()).getTime();var _12cb=_12ca;_12ca=event.target;if(_12ca.dojoElementFromPoint){_12ca=_12ca.dojoElementFromPoint(event.changedTouches[0].clientX,event.changedTouches[0].clientY);}if(_12cb){on.emit(_12cb,"dojotouchout",{target:_12cb,relatedTarget:_12ca,bubbles:true});}if(_12ca){on.emit(_12ca,"dojotouchover",{target:_12ca,relatedTarget:_12cb,bubbles:true});}},true);on(win.doc,"touchmove",function(event){_12be=(new Date()).getTime();_12c9=event;var _12cc=win.doc.elementFromPoint(event.clientX,event.clientY);if(_12cc){var _12cd=_12cc;if(_12cc.dojoElementFromPoint){_12cc=_12cc.dojoElementFromPoint(event.clientX,event.clientY);}if(_12ca!==_12cc){if(_12ca){on.emit(_12cd,"dojotouchout",{target:_12ca,relatedTarget:_12cc,bubbles:true});}if(_12cc){on.emit(_12cd,"dojotouchover",{target:_12cc,relatedTarget:_12ca,bubbles:true});}_12ca=_12cc;}on.emit(_12cd,"dojotouchmove",{target:_12cc,bubbles:true});}});on(win.doc,"touchend",function(event){var node=win.doc.elementFromPoint(event.clientX,event.clientY);var _12ce=node;if(node.dojoElementFromPoint){node=node.dojoElementFromPoint(event.clientX,event.clientY);}if(node){on.emit(_12ce,"dojotouchend",lang.delegate(event,{target:node,bubbles:true}));}});});_12c8=function(node,_12cf){return on(node,"dojotouchmove",function(_12d0){_12cf(lang.delegate(_12c9,{target:_12d0.target,preventDefault:function(){_12c9.preventDefault();},stopPropagation:function(){_12d0.stopPropagation();}}));});};}var touch={press:_12bf("mousedown","touchstart","MSPointerDown"),move:_12bf("mousemove",_12c8,"MSPointerMove"),release:_12bf("mouseup","dojotouchend","MSPointerUp"),cancel:_12bf(mouse.leave,"touchcancel",has("touch")?"MSPointerCancel":null),over:_12bf("mouseover","dojotouchover","MSPointerOver"),out:_12bf("mouseout","dojotouchout","MSPointerOut"),enter:mouse._eventHandler(_12bf("mouseover","dojotouchover","MSPointerOver")),leave:mouse._eventHandler(_12bf("mouseout","dojotouchout","MSPointerOut"))};1&&(dojo.touch=touch);return touch;});},"dojox/grid/DataSelection":function(){define("dojox/grid/DataSelection",["dojo/_base/declare","./_SelectionPreserver","./Selection"],function(_12d1,_12d2,_12d3){return _12d1("dojox.grid.DataSelection",_12d3,{constructor:function(grid){if(grid.keepSelection){this.preserver=new _12d2(this);}},destroy:function(){if(this.preserver){this.preserver.destroy();}},getFirstSelected:function(){var idx=_12d3.prototype.getFirstSelected.call(this);if(idx==-1){return null;}return this.grid.getItem(idx);},getNextSelected:function(_12d4){var _12d5=this.grid.getItemIndex(_12d4);var idx=_12d3.prototype.getNextSelected.call(this,_12d5);if(idx==-1){return null;}return this.grid.getItem(idx);},getSelected:function(){var _12d6=[];for(var i=0,l=this.selected.length;i<l;i++){if(this.selected[i]){_12d6.push(this.grid.getItem(i));}}return _12d6;},addToSelection:function(_12d7){if(this.mode=="none"){return;}var idx=null;if(typeof _12d7=="number"||typeof _12d7=="string"){idx=_12d7;}else{idx=this.grid.getItemIndex(_12d7);}_12d3.prototype.addToSelection.call(this,idx);},deselect:function(_12d8){if(this.mode=="none"){return;}var idx=null;if(typeof _12d8=="number"||typeof _12d8=="string"){idx=_12d8;}else{idx=this.grid.getItemIndex(_12d8);}_12d3.prototype.deselect.call(this,idx);},deselectAll:function(_12d9){var idx=null;if(_12d9||typeof _12d9=="number"){if(typeof _12d9=="number"||typeof _12d9=="string"){idx=_12d9;}else{idx=this.grid.getItemIndex(_12d9);}_12d3.prototype.deselectAll.call(this,idx);}else{this.inherited(arguments);}}});});},"dijit/_editor/selection":function(){define("dijit/_editor/selection",["dojo/dom","dojo/_base/lang","dojo/sniff","dojo/_base/window","../main"],function(dom,lang,has,win,dijit){var _12da={getType:function(){if(win.doc.getSelection){var stype="text";var oSel;try{oSel=win.global.getSelection();}catch(e){}if(oSel&&oSel.rangeCount==1){var _12db=oSel.getRangeAt(0);if((_12db.startContainer==_12db.endContainer)&&((_12db.endOffset-_12db.startOffset)==1)&&(_12db.startContainer.nodeType!=3)){stype="control";}}return stype;}else{return win.doc.selection.type.toLowerCase();}},getSelectedText:function(){if(win.doc.getSelection){var _12dc=win.global.getSelection();return _12dc?_12dc.toString():"";}else{if(dijit._editor.selection.getType()=="control"){return null;}return win.doc.selection.createRange().text;}},getSelectedHtml:function(){if(win.doc.getSelection){var _12dd=win.global.getSelection();if(_12dd&&_12dd.rangeCount){var i;var html="";for(i=0;i<_12dd.rangeCount;i++){var frag=_12dd.getRangeAt(i).cloneContents();var div=win.doc.createElement("div");div.appendChild(frag);html+=div.innerHTML;}return html;}return null;}else{if(dijit._editor.selection.getType()=="control"){return null;}return win.doc.selection.createRange().htmlText;}},getSelectedElement:function(){if(dijit._editor.selection.getType()=="control"){if(win.doc.getSelection){var _12de=win.global.getSelection();return _12de.anchorNode.childNodes[_12de.anchorOffset];}else{var range=win.doc.selection.createRange();if(range&&range.item){return win.doc.selection.createRange().item(0);}}}return null;},getParentElement:function(){if(dijit._editor.selection.getType()=="control"){var p=this.getSelectedElement();if(p){return p.parentNode;}}else{if(win.doc.getSelection){var _12df=win.global.getSelection();if(_12df){var node=_12df.anchorNode;while(node&&(node.nodeType!=1)){node=node.parentNode;}return node;}}else{var r=win.doc.selection.createRange();r.collapse(true);return r.parentElement();}}return null;},hasAncestorElement:function(_12e0){return this.getAncestorElement.apply(this,arguments)!=null;},getAncestorElement:function(_12e1){var node=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(node,arguments);},isTag:function(node,tags){if(node&&node.tagName){var _12e2=node.tagName.toLowerCase();for(var i=0;i<tags.length;i++){var _12e3=String(tags[i]).toLowerCase();if(_12e2==_12e3){return _12e3;}}}return "";},getParentOfType:function(node,tags){while(node){if(this.isTag(node,tags).length){return node;}node=node.parentNode;}return null;},collapse:function(_12e4){if(win.doc.getSelection){var _12e5=win.global.getSelection();if(_12e5.removeAllRanges){if(_12e4){_12e5.collapseToStart();}else{_12e5.collapseToEnd();}}else{_12e5.collapse(_12e4);}}else{var range=win.doc.selection.createRange();range.collapse(_12e4);range.select();}},remove:function(){var sel=win.doc.selection;if(win.doc.getSelection){sel=win.global.getSelection();sel.deleteFromDocument();return sel;}else{if(sel.type.toLowerCase()!="none"){sel.clear();}return sel;}},selectElementChildren:function(_12e6,_12e7){var doc=win.doc;var range;_12e6=dom.byId(_12e6);if(win.doc.getSelection){var _12e8=win.global.getSelection();if(has("opera")){if(_12e8.rangeCount){range=_12e8.getRangeAt(0);}else{range=doc.createRange();}range.setStart(_12e6,0);range.setEnd(_12e6,(_12e6.nodeType==3)?_12e6.length:_12e6.childNodes.length);_12e8.addRange(range);}else{_12e8.selectAllChildren(_12e6);}}else{range=_12e6.ownerDocument.body.createTextRange();range.moveToElementText(_12e6);if(!_12e7){try{range.select();}catch(e){}}}},selectElement:function(_12e9,_12ea){var range;_12e9=dom.byId(_12e9);var doc=_12e9.ownerDocument;var _12eb=win.global;if(doc.getSelection){var _12ec=_12eb.getSelection();range=doc.createRange();if(_12ec.removeAllRanges){if(has("opera")){if(_12ec.getRangeAt(0)){range=_12ec.getRangeAt(0);}}range.selectNode(_12e9);_12ec.removeAllRanges();_12ec.addRange(range);}}else{try{var tg=_12e9.tagName?_12e9.tagName.toLowerCase():"";if(tg==="img"||tg==="table"){range=win.body(doc).createControlRange();}else{range=win.body(doc).createRange();}range.addElement(_12e9);if(!_12ea){range.select();}}catch(e){this.selectElementChildren(_12e9,_12ea);}}},inSelection:function(node){if(node){var _12ed;var doc=win.doc;var range;if(win.doc.getSelection){var sel=win.global.getSelection();if(sel&&sel.rangeCount>0){range=sel.getRangeAt(0);}if(range&&range.compareBoundaryPoints&&doc.createRange){try{_12ed=doc.createRange();_12ed.setStart(node,0);if(range.compareBoundaryPoints(range.START_TO_END,_12ed)===1){return true;}}catch(e){}}}else{range=doc.selection.createRange();try{_12ed=node.ownerDocument.body.createControlRange();if(_12ed){_12ed.addElement(node);}}catch(e1){try{_12ed=node.ownerDocument.body.createTextRange();_12ed.moveToElementText(node);}catch(e2){}}if(range&&_12ed){if(range.compareEndPoints("EndToStart",_12ed)===1){return true;}}}}return false;}};lang.setObject("dijit._editor.selection",_12da);return _12da;});},"dojox/grid/_SelectionPreserver":function(){define("dojox/grid/_SelectionPreserver",["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array"],function(_12ee,_12ef,lang,array){return _12ee("dojox.grid._SelectionPreserver",null,{constructor:function(_12f0){this.selection=_12f0;var grid=this.grid=_12f0.grid;this.reset();this._connects=[_12ef.connect(grid,"_setStore",this,"reset"),_12ef.connect(grid,"_addItem",this,"_reSelectById"),_12ef.connect(_12f0,"onSelected",lang.hitch(this,"_selectById",true)),_12ef.connect(_12f0,"onDeselected",lang.hitch(this,"_selectById",false)),_12ef.connect(_12f0,"deselectAll",this,"reset")];},destroy:function(){this.reset();array.forEach(this._connects,_12ef.disconnect);delete this._connects;},reset:function(){this._selectedById={};},_reSelectById:function(item,index){if(item&&this.grid._hasIdentity){this.selection.selected[index]=this._selectedById[this.grid.store.getIdentity(item)];}},_selectById:function(_12f1,_12f2){if(this.selection.mode=="none"||!this.grid._hasIdentity){return;}var item=_12f2,g=this.grid;if(typeof _12f2=="number"||typeof _12f2=="string"){var entry=g._by_idx[_12f2];item=entry&&entry.item;}if(item){this._selectedById[g.store.getIdentity(item)]=!!_12f1;}return item;}});});},"esri/tasks/DensifyParameters":function(){define("esri/tasks/DensifyParameters",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/has","esri/kernel","esri/geometry/jsonUtils"],function(_12f3,lang,array,_12f4,has,_12f5,_12f6){var _12f7=_12f3(null,{declaredClass:"esri.tasks.DensifyParameters",geometries:null,geodesic:null,lengthUnit:null,maxSegmentLength:null,toJson:function(){var geoms=array.map(this.geometries,function(geom){return geom.toJson();});var json={};if(this.geometries&&this.geometries.length>0){json.geometries=_12f4.toJson({geometryType:_12f6.getJsonType(this.geometries[0]),geometries:geoms});json.sr=_12f4.toJson(this.geometries[0].spatialReference.toJson());}if(this.geodesic){json.geodesic=this.geodesic;}if(this.lengthUnit){json.lengthUnit=this.lengthUnit;}if(this.maxSegmentLength){json.maxSegmentLength=this.maxSegmentLength;}return json;}});if(has("extend-esri")){lang.setObject("tasks.DensifyParameters",_12f7,_12f5);}return _12f7;});},"esri/layers/FeatureLayer":function(){define("esri/layers/FeatureLayer",["dojo/_base/declare","dojo/_base/connect","dojo/_base/lang","dojo/_base/array","dojo/_base/json","dojo/_base/Deferred","dojo/date/locale","dojo/sniff","dojo/io-query","dojo/dom-construct","dojo/i18n","esri/kernel","esri/lang","esri/request","esri/deferredUtils","esri/SpatialReference","esri/symbols/SimpleMarkerSymbol","esri/symbols/SimpleLineSymbol","esri/symbols/SimpleFillSymbol","esri/symbols/jsonUtils","esri/renderers/SimpleRenderer","esri/renderers/UniqueValueRenderer","esri/renderers/jsonUtils","esri/tasks/QueryTask","esri/tasks/query","esri/tasks/FeatureSet","esri/geometry/Extent","esri/geometry/jsonUtils","esri/geometry/normalizeUtils","esri/layers/GraphicsLayer","esri/layers/Field","esri/layers/TimeInfo","esri/layers/FeatureType","esri/layers/FeatureTemplate","esri/layers/FeatureEditResult","esri/layers/SnapshotMode","esri/layers/OnDemandMode","esri/layers/SelectionMode","esri/layers/TrackManager","dojo/i18n!esri/nls/jsapi","dojo/has!extend-esri?esri/layers/agscommon"],function(_12f8,_12f9,lang,array,_12fa,_12fb,_12fc,has,ioq,_12fd,i18n,_12fe,_12ff,_1300,_1301,_1302,_1303,_1304,_1305,_1306,_1307,_1308,_1309,_130a,Query,_130b,_130c,_130d,_130e,_130f,Field,_1310,_1311,_1312,_1313,_1314,_1315,_1316,_1317){var _1318=_12f8(_130f,{declaredClass:"esri.layers.FeatureLayer",invalidParams:"query contains one or more unsupported parameters",_eventMap:{"add-attachment-complete":["result"],"before-apply-edits":["adds","updates","deletes"],"delete-attachments-complete":["results"],"edits-complete":["adds","updates","deletes"],"query-attachment-infos-complete":["results"],"query-count-complete":["count"],"query-features-complete":["featureSet"],"query-ids-complete":["objectIds"],"query-related-features-complete":["featureSets"],"selection-complete":["features","method"],"update-end":["error","info"]},constructor:function(url,_1319){this.i18n=i18n.getLocalization("esri","jsapi");this._outFields=_1319&&_1319.outFields;this._loadCallback=_1319&&_1319.loadCallback;var patch=_1319&&_1319._usePatch;this._usePatch=(patch===null||patch===undefined)?true:patch;this._trackIdField=_1319&&_1319.trackIdField;this.objectIdField=_1319&&_1319.objectIdField;this._maxOffset=_1319&&_1319.maxAllowableOffset;this._optEditable=_1319&&_1319.editable;this._optAutoGen=_1319&&_1319.autoGeneralize;this.editSummaryCallback=_1319&&_1319.editSummaryCallback;this.userId=_1319&&_1319.userId;this.userIsAdmin=_1319&&_1319.userIsAdmin;this.useMapTime=(_1319&&_1319.hasOwnProperty("useMapTime"))?(!!_1319.useMapTime):true;this.source=_1319&&_1319.source;this.gdbVersion=_1319&&_1319.gdbVersion;this._selectedFeatures={};this._selectedFeaturesArr=[];this._newFeatures=[];this._deletedFeatures={};this._ulid=this._getUniqueId();var ctor=this.constructor,mode=this.mode=(_12ff.isDefined(_1319&&_1319.mode)?_1319.mode:ctor.MODE_ONDEMAND);switch(mode){case ctor.MODE_SNAPSHOT:this._mode=new _1314(this);this._isSnapshot=true;break;case ctor.MODE_ONDEMAND:this._tileWidth=(_1319&&_1319.tileWidth)||512;this._tileHeight=(_1319&&_1319.tileHeight)||512;this._mode=new _1315(this);var _131a=_1319&&_1319.latticeTiling;this.latticeTiling=_131a;break;case ctor.MODE_SELECTION:this._mode=new _1316(this);this._isSelOnly=true;break;}this._initLayer=lang.hitch(this,this._initLayer);this._selectHandler=lang.hitch(this,this._selectHandler);this._editable=false;if(lang.isObject(url)&&url.layerDefinition){var json=url;this._collection=true;this.mode=ctor.MODE_SNAPSHOT;this._initLayer(json);return this;}this._task=new _130a(this.url,{source:this.source,gdbVersion:this.gdbVersion});var _131b=this._url.path;this._fserver=false;if(_131b.search(/\/FeatureServer\//i)!==-1){this._fserver=true;}var _131c=_1319&&_1319.resourceInfo;if(_131c){this._initLayer(_131c);}else{if(this.source){var layer={source:this.source.toJson()};this._url.query=lang.mixin(this._url.query,{layer:_12fa.toJson(layer)});}if(this.gdbVersion){this._url.query=lang.mixin(this._url.query,{gdbVersion:this.gdbVersion});}_1300({url:_131b,content:lang.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}this.registerConnectEvents();},_initLayer:function(_131d,io){if(_131d||io){this._json=_131d;this._findCredential();var ssl=(this.credential&&this.credential.ssl)||(_131d&&_131d._ssl);if(ssl){this._useSSL();this._task._useSSL();}if(this._collection){this._mode=new _1314(this);this._isSnapshot=true;this._featureSet=_131d.featureSet;this._nextId=_131d.nextObjectId;_131d=_131d.layerDefinition;}if(_131d.hasOwnProperty("capabilities")){var _131e=(this.capabilities=_131d.capabilities);if(_131e&&_131e.toLowerCase().indexOf("editing")!==-1){this._editable=true;}else{this._editable=false;}}else{if(!this._collection){this._editable=this._fserver;}}if(_12ff.isDefined(this._optEditable)){this._editable=this._optEditable;delete this._optEditable;}this._json=_12fa.toJson(this._json);if(this.isEditable()){delete this._maxOffset;}else{if(this.mode!==this.constructor.MODE_SNAPSHOT&&((_131d.geometryType==="esriGeometryPolyline")||(_131d.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_12ff.isDefined(this._optAutoGen)?this._optAutoGen:(this.mode===this.constructor.MODE_ONDEMAND);delete this._optAutoGen;}}var _131f=_131d.effectiveMinScale||_131d.minScale,_1320=_131d.effectiveMaxScale||_131d.maxScale;if(!this._hasMin&&_131f){this.setMinScale(_131f);}if(!this._hasMax&&_1320){this.setMaxScale(_1320);}this.layerId=_131d.id;this.name=_131d.name;this.description=_131d.description;this.copyright=_131d.copyrightText;this.type=_131d.type;this.geometryType=_131d.geometryType;this.displayField=_131d.displayField;this.defaultDefinitionExpression=_131d.definitionExpression;this.fullExtent=new _130c(_131d.extent);this.initialExtent=new _130c(this.fullExtent.toJson());if(this.fullExtent.spatialReference){this.spatialReference=new _1302(this.fullExtent.spatialReference.toJson());}this.defaultVisibility=_131d.defaultVisibility;if((this.geometryType==="esriGeometryPoint")||(this.geometryType==="esriGeometryMultipoint")){this.latticeTiling=false;}this.indexedFields=_131d.indexedFields;this.maxRecordCount=_131d.maxRecordCount;this.canModifyLayer=_131d.canModifyLayer;this.supportsStatistics=_131d.supportsStatistics;this.supportsAdvancedQueries=_131d.supportsAdvancedQueries;this.hasLabels=_131d.hasLabels;this.canScaleSymbols=_131d.canScaleSymbols;this.supportsRollbackOnFailure=_131d.supportsRollbackOnFailure;this.syncCanReturnChanges=_131d.syncCanReturnChanges;this.isDataVersioned=_131d.isDataVersioned;this.editFieldsInfo=_131d.editFieldsInfo;this.ownershipBasedAccessControlForFeatures=_131d.ownershipBasedAccessControlForFeatures;if(this.editFieldsInfo&&this.ownershipBasedAccessControlForFeatures){this.creatorField=this.editFieldsInfo.creatorField;}this.relationships=_131d.relationships;this.allowGeometryUpdates=_12ff.isDefined(_131d.allowGeometryUpdates)?_131d.allowGeometryUpdates:true;this._isTable=(this.type==="Table");var _1321=(this.fields=[]),_1322=_131d.fields,i;for(i=0;i<_1322.length;i++){_1321.push(new Field(_1322[i]));}if(!this.objectIdField){this.objectIdField=_131d.objectIdField;if(!this.objectIdField){_1322=_131d.fields;for(i=0;i<_1322.length;i++){var field=_1322[i];if(field.type==="esriFieldTypeOID"){this.objectIdField=field.name;break;}}}if(!this.objectIdField){console.debug("esri.layers.FeatureLayer: "+_12ff.substitute({url:this.url},"objectIdField is not set [url: ${url}]"));}}if(!_12ff.isDefined(this._nextId)){var _1323=this.objectIdField,maxId=-1;if(this._collection&&_1323){var fset=this._featureSet,_1324=fset&&fset.features,il=_1324?_1324.length:0,oid,attr;for(i=0;i<il;i++){attr=_1324[i].attributes;oid=attr&&attr[_1323];if(oid>maxId){maxId=oid;}}}this._nextId=(maxId+1);}this.globalIdField=_131d.globalIdField;var _1325=(this.typeIdField=_131d.typeIdField),_1326;if(_1325){_1326=!this._getField(_1325)&&this._getField(_1325,true);if(_1326){this.typeIdField=_1326.name;}}this.visibilityField=_131d.visibilityField;var _1327=_131d.defaultSymbol;if(_1327){this.defaultSymbol=_1306.fromJson(_1327);}var _1328=this.types=[],types=_131d.types,fType,_1329,_132a,_132b=this.editFieldsInfo,_132c=_132b&&_132b.creatorField,_132d=_132b&&_132b.editorField,fix=(_132c||_132d),_132e=[];if(types){for(i=0;i<types.length;i++){fType=new _1311(types[i]);_1329=fType.templates;if(fix&&_1329&&_1329.length){_132e=_132e.concat(_1329);}_1328.push(fType);}}var _132f=_131d.templates,_1330,_1331=this.templates=[];if(_132f){for(i=0;i<_132f.length;i++){_1330=new _1312(_132f[i]);if(fix){_132e.push(_1330);}_1331.push(_1330);}}for(i=0;i<_132e.length;i++){_132a=lang.getObject("prototype.attributes",false,_132e[i]);if(_132a){if(_132c){delete _132a[_132c];}if(_132d){delete _132a[_132d];}}}var _1332=_131d.timeInfo;if(_1332){this.timeInfo=new _1310(_1332);this._startTimeField=_1332.startTimeField;this._endTimeField=_1332.endTimeField;if(this._startTimeField&&this._endTimeField){this._twoTimeFields=true;}if(this._trackIdField){_1332.trackIdField=this._trackIdField;}else{this._trackIdField=_1332.trackIdField;}}this.hasAttachments=(!this._collection&&_131d.hasAttachments)?true:false;this.htmlPopupType=_131d.htmlPopupType;var _1333=_131d.drawingInfo,_1334;if(!this.renderer){if(_1333&&_1333.renderer){_1334=_1333.renderer;this.setRenderer(_1309.fromJson(_1334));if(_1334.type==="classBreaks"){this.renderer.setMaxInclusive(true);}if(!this._collection){var _1335=_1334.type,_1336=[];_1334=this.renderer;switch(_1335){case "simple":_1336.push(_1334.symbol);break;case "uniqueValue":case "classBreaks":_1336.push(_1334.defaultSymbol);_1336=_1336.concat(array.map(_1334.infos,function(info){return info.symbol;}));break;}_1336=array.filter(_1336,_12ff.isDefined);var _1337=this._url.path+"/images/",token=this._getToken();array.forEach(_1336,function(sym){var url=sym.url;if(url){if((url.search(/https?\:/)===-1)&&(url.indexOf("data:")===-1)){sym.url=_1337+url;}if(token&&sym.url.search(/https?\:/)!==-1){sym.url+=("?token="+token);}}});}}else{if(_1327){types=this.types;if(types.length>0){_1334=new _1308(this.defaultSymbol,this.typeIdField);array.forEach(types,function(type){_1334.addValue(type.id,type.symbol);});}else{_1334=new _1307(this.defaultSymbol);}this.setRenderer(_1334);}else{if(!this._isTable){var _1338;switch(this.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":_1338=new _1303();break;case "esriGeometryPolyline":_1338=new _1304();break;case "esriGeometryPolygon":_1338=new _1305();break;}this.setRenderer(_1338?new _1307(_1338):null);}}}}var _1339=(_1333&&_1333.transparency)||0;if(!_12ff.isDefined(this.opacity)&&_1339>0){this.opacity=1-(_1339/100);}this.version=_131d.currentVersion;if(!this.version){var ver;if("capabilities" in _131d||"drawingInfo" in _131d||"hasAttachments" in _131d||"htmlPopupType" in _131d||"relationships" in _131d||"timeInfo" in _131d||"typeIdField" in _131d||"types" in _131d){ver=10;}else{ver=9.3;}this.version=ver;}if((has("ie")||has("safari"))&&this.isEditable()&&this.version<10.02){this._ts=true;}this.loaded=true;this._fixRendererFields();this._checkFields();this._updateCaps();var _133a=function(){this.onLoad(this);var _133b=this._loadCallback;if(_133b){delete this._loadCallback;_133b(this);}};if(this._collection){this._fireUpdateStart();var _133c=this._featureSet;delete this._featureSet;this._mode._drawFeatures(new _130b(_133c));this._fcAdded=true;_133a.call(this);}else{this._forceIdentity(_133a);}}},setRenderer:function(ren){this.inherited("setRenderer",arguments);var _133d=this.renderer;if(_133d){this._ager=(_133d.declaredClass.indexOf("TemporalRenderer")!==-1&&_133d.observationAger&&_133d.observationRenderer);var _133e=array.filter([_133d,_133d.observationRenderer,_133d.latestObservationRenderer,_133d.trackRenderer],_12ff.isDefined);var _133f=[];array.forEach(_133e,function(rnd){if(!lang.isFunction(rnd.attributeField)){_133f.push(rnd.attributeField);}_133f.push(rnd.attributeField2);_133f.push(rnd.attributeField3);},this);this._rendererFields=array.filter(_133f,_12ff.isDefined);}else{this._ager=false;this._rendererFields=[];}if(this.loaded&&this._rendererFields.length>0){this._fixRendererFields();this._checkFields(this._rendererFields);}if(this.loaded&&this._collection){this._typesDirty=true;}},_setMap:function(map){var div=this.inherited(arguments),mode=this._mode;if(mode){mode.initialize(map);}return div;},_unsetMap:function(map){var mode=this._mode;if(mode){mode.suspend();}if(this._trackManager){this._trackManager.destroy();this._trackManager=null;}_12f9.disconnect(this._zoomConnect);this._zoomConnect=null;this._toggleTime(false);this.inherited("_unsetMap",arguments);},refresh:function(){var mode=this._mode;if(mode){mode.refresh();}},getOutFields:function(){return array.filter(this._getOutFields(),function(field){return (field==="*"||!!this._getField(field));},this);},setEditable:function(_1340){if(!this._collection){console.log("FeatureLayer:setEditable - this functionality is not yet supported for layer in a feature service");return this;}if(!this.loaded){this._optEditable=_1340;return this;}var _1341=this._editable;this._editable=_1340;this._updateCaps();if(_1341!==_1340){this.onCapabilitiesChange();}return this;},getEditCapabilities:function(_1342){var _1343={"canCreate":false,"canUpdate":false,"canDelete":false};if(!this.loaded||!this.isEditable()){return _1343;}var _1344=_1342&&_1342.feature,_1345=_1342&&_1342.userId,caps=array.map((this.capabilities?this.capabilities.toLowerCase().split(","):[]),lang.trim),_1346=array.indexOf(caps,"editing")>-1,_1347=_1346&&(array.indexOf(caps,"create")>-1),_1348=_1346&&(array.indexOf(caps,"update")>-1),_1349=_1346&&(array.indexOf(caps,"delete")>-1),_134a=this.ownershipBasedAccessControlForFeatures,_134b=this.editFieldsInfo,_134c=_134b&&_134b.creatorField,realm=_134b&&_134b.realm,_134d=_1344&&_1344.attributes,_134e=(_134d&&_134c)?_134d[_134c]:undefined,_134f,_1350=!!this.userIsAdmin,_1351=!_134a||_1350||!!(_134a.allowOthersToUpdate||_134a.allowUpdateToOthers),_1352=!_134a||_1350||!!(_134a.allowOthersToDelete||_134a.allowDeleteToOthers);if(_1350||(_1346&&!(_1347||_1348||_1349))){_1347=_1348=_1349=true;}_134f={"canCreate":_1347,"canUpdate":_1348,"canDelete":_1349};if(_134e===null){_134f.canUpdate=_1348&&_1351;_134f.canDelete=_1349&&_1352;}else{if(_134e===""){return _134f;}else{if(_134e){_1345=_1345||this.getUserId();if(_1345&&realm){_1345=_1345+"@"+realm;}if(_1345.toLowerCase()===_134e.toLowerCase()){return _134f;}else{_134f.canUpdate=_1348&&_1351;_134f.canDelete=_1349&&_1352;}}}}return _134f;},getUserId:function(){var _1353;if(this.loaded){_1353=(this.credential&&this.credential.userId)||this.userId||"";}return _1353;},setUserIsAdmin:function(_1354){this.userIsAdmin=_1354;},setEditSummaryCallback:function(_1355){this.editSummaryCallback=_1355;},getEditSummary:function(_1356,_1357,_1358){_1358=_12ff.isDefined(_1358)?_1358:(new Date()).getTime();var _1359="",info=this.getEditInfo(_1356,_1357,_1358),_135a=(_1357&&_1357.callback)||this.editSummaryCallback;if(_135a){info=_135a(_1356,info)||"";}if(lang.isString(info)){_1359=info;}else{if(info){var _135b=info.action,_135c=info.userId,_135d=info.timeValue,count=0;if(_135b){count++;}if(_135c){count++;}if(_12ff.isDefined(_135d)){count++;}if(count>1){_1359=(_135b==="edit"?"edit":"create")+(_135c?"User":"")+(_12ff.isDefined(_135d)?info.displayPattern:"");}}_1359=_1359&&_12ff.substitute(info,this.i18n.layers.FeatureLayer[_1359]);}return _1359;},getEditInfo:function(_135e,_135f,_1360){if(!this.loaded){return;}_1360=_12ff.isDefined(_1360)?_1360:(new Date()).getTime();var _1361=(_135f&&_135f.action)||"last",_1362=this.editFieldsInfo,_1363=_1362&&_1362.creatorField,_1364=_1362&&_1362.creationDateField,_1365=_1362&&_1362.editorField,_1366=_1362&&_1362.editDateField,realm=_1362&&_1362.realm,_1367=_135e&&_135e.attributes,_1368=(_1367&&_1363)?_1367[_1363]:undefined,_1369=(_1367&&_1364)?_1367[_1364]:null,_136a=(_1367&&_1365)?_1367[_1365]:undefined,_136b=(_1367&&_1366)?_1367[_1366]:null,_136c=this._getEditData(_1368,_1369,_1360),_136d=this._getEditData(_136a,_136b,_1360),_136e;switch(_1361){case "creation":_136e=_136c;break;case "edit":_136e=_136d;break;case "last":_136e=_136d||_136c;break;}if(_136e){_136e.action=(_136e===_136d)?"edit":"creation";}return _136e;},_getEditData:function(_136f,_1370,_1371){var data,_1372,_1373,_1374=60000,_1375=3600000,_1376=2*_1375,_1377=24*_1375,days7=7*_1377;if(_12ff.isDefined(_1370)){_1372=_1371-_1370;if(_1372<0){_1373="Full";}else{if(_1372<_1374){_1373="Seconds";}else{if(_1372<(2*_1374)){_1373="Minute";}else{if(_1372<_1375){_1373="Minutes";}else{if(_1372<_1376){_1373="Hour";}else{if(_1372<_1377){_1373="Hours";}else{if(_1372<days7){_1373="WeekDay";}else{_1373="Full";}}}}}}}}if((_136f!==undefined)||_1373){data=data||{};data.userId=_136f;if(_1373){var _1378=_12fc.format,_1379=new Date(_1370);data.minutes=Math.floor(_1372/_1374);data.hours=Math.floor(_1372/_1375);data.weekDay=_1378(_1379,{datePattern:"EEEE",selector:"date"});data.formattedDate=_1378(_1379,{selector:"date"});data.formattedTime=_1378(_1379,{selector:"time"});data.displayPattern=_1373;data.timeValue=_1370;}}return data;},isEditable:function(){return !!(this._editable||this.userIsAdmin);},setMaxAllowableOffset:function(_137a){if(!this.isEditable()){this._maxOffset=_137a;}return this;},getMaxAllowableOffset:function(){return this._maxOffset;},setAutoGeneralize:function(_137b){if(!this.loaded){this._optAutoGen=_137b;}else{if(!this.isEditable()&&(this.mode!==this.constructor.MODE_SNAPSHOT)&&((this.geometryType==="esriGeometryPolyline")||(this.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_137b;if(_137b){var map=this._map;if(map&&map.loaded){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}}else{delete this._maxOffset;}}}return this;},setGDBVersion:function(_137c){if(!this._collection&&(_137c!==this.gdbVersion)&&(_137c||this.gdbVersion)){this.gdbVersion=_137c;this._task.gdbVersion=_137c;this._url.query=lang.mixin(this._url.query,{gdbVersion:_137c});if(this.loaded){this.clearSelection();if(this._map){this.refresh();}}this.onGDBVersionChange();}return this;},setDefinitionExpression:function(expr){this._defnExpr=expr;var mode=this._mode;if(mode){mode.propertyChangeHandler(1);}return this;},getDefinitionExpression:function(){return this._defnExpr;},setTimeDefinition:function(_137d){if(this._isSnapshot){this._timeDefn=_137d;var mode=this._mode;if(mode){mode.propertyChangeHandler(2);}}else{console.log("FeatureLayer.setTimeDefinition: layer in on-demand or selection mode does not support time definitions. Layer id = "+this.id+", Layer URL = "+this.url);}return this;},getTimeDefinition:function(){return this._timeDefn;},setTimeOffset:function(_137e,_137f){this._timeOffset=_137e;this._timeOffsetUnits=_137f;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}return this;},setUseMapTime:function(use){this.useMapTime=use;this._toggleTime(!this.suspended);var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},selectFeatures:function(query,_1380,_1381,_1382){_1380=_1380||this.constructor.SELECTION_NEW;var _1383=this._getShallowClone(query),map=this._map,_1384,dfd=_1301._fixDfd(new _12fb(_1301._dfdCanceller));_1383.outFields=this.getOutFields();_1383.returnGeometry=true;if(map){_1383.outSpatialReference=new _1302(map.spatialReference.toJson());}if(!this._applyQueryFilters(_1383)){_1384={features:[]};this._selectHandler(_1384,_1380,_1381,_1382,dfd);return dfd;}var _1385=this._canDoClientSideQuery(_1383);if(_1385){_1384={features:this._doQuery(_1383,_1385)};this._selectHandler(_1384,_1380,_1381,_1382,dfd);return dfd;}else{if(this._collection){var err=new Error("FeatureLayer::selectFeatures - "+this.invalidParams);this._resolve([err],null,_1382,dfd,true);return dfd;}var self=this;if(this._ts){_1383._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task.execute(_1383);temp.addCallbacks(function(_1386){self._selectHandler(_1386,_1380,_1381,_1382,dfd);},function(err){self._resolve([err],null,_1382,dfd,true);});return dfd;}},getSelectedFeatures:function(){var _1387=this._selectedFeatures,_1388=[],item;for(item in _1387){if(_1387.hasOwnProperty(item)){_1388.push(_1387[item]);}}return _1388;},clearSelection:function(_1389){var _138a=this._selectedFeatures,mode=this._mode,item;for(item in _138a){if(_138a.hasOwnProperty(item)){this._unSelectFeatureIIf(item,mode);mode._removeFeatureIIf(item);}}this._selectedFeatures={};if(this._isSelOnly){mode._applyTimeFilter(true);}if(!_1389){this.onSelectionClear();}return this;},setSelectionSymbol:function(_138b){this._selectionSymbol=_138b;if(_138b){var _138c=this._selectedFeatures,item;for(item in _138c){if(_138c.hasOwnProperty(item)){_138c[item].setSymbol(_138b);}}}return this;},getSelectionSymbol:function(){return this._selectionSymbol;},__msigns:[{n:"applyEdits",c:5,a:[{i:0},{i:1}],e:4,f:1}],applyEdits:function(adds,_138d,_138e,_138f,_1390,_1391){var _1392=_1391.assembly,dfd=_1391.dfd;this._applyNormalized(adds,_1392&&_1392[0]);this._applyNormalized(_138d,_1392&&_1392[1]);this.onBeforeApplyEdits(adds,_138d,_138e);var i,_1393={},_1394=this.objectIdField,_1395={f:"json"},dirty=false;if(this._collection){var _1396={};_1396.addResults=adds?array.map(adds,function(){dirty=true;return {objectId:this._nextId++,success:true};},this):null;_1396.updateResults=_138d?array.map(_138d,function(_1397){dirty=true;var oid=_1397.attributes[_1394];_1393[oid]=_1397;return {objectId:oid,success:true};},this):null;_1396.deleteResults=_138e?array.map(_138e,function(_1398){dirty=true;return {objectId:_1398.attributes[_1394],success:true};},this):null;if(dirty){this._editHandler(_1396,adds,_1393,_138f,_1390,dfd);}return;}if(adds&&adds.length>0){_1395.adds=this._convertFeaturesToJson(adds,0,1);dirty=true;}if(_138d&&_138d.length>0){for(i=0;i<_138d.length;i++){var _1399=_138d[i];_1393[_1399.attributes[_1394]]=_1399;}_1395.updates=this._convertFeaturesToJson(_138d,0,0,1);dirty=true;}if(_138e&&_138e.length>0){var ids=[];for(i=0;i<_138e.length;i++){ids.push(_138e[i].attributes[_1394]);}_1395.deletes=ids.join(",");dirty=true;}if(dirty){var self=this;return _1300({url:this._url.path+"/applyEdits",content:lang.mixin(_1395,this._url.query),callbackParamName:"callback",load:function(_139a){self._editHandler(_139a,adds,_1393,_138f,_1390,dfd);},error:function(err){self._resolve([err],null,_1390,dfd,true);}},{usePost:true});}},queryFeatures:function(query,_139b,_139c){return this._query("execute","onQueryFeaturesComplete",query,_139b,_139c);},queryRelatedFeatures:function(query,_139d,_139e){return this._query("executeRelationshipQuery","onQueryRelatedFeaturesComplete",query,_139d,_139e);},queryIds:function(query,_139f,_13a0){return this._query("executeForIds","onQueryIdsComplete",query,_139f,_13a0);},queryCount:function(query,_13a1,_13a2){return this._query("executeForCount","onQueryCountComplete",query,_13a1,_13a2);},queryAttachmentInfos:function(_13a3,_13a4,_13a5){var url=this._url.path+"/"+_13a3+"/attachments",dfd=new _12fb(_1301._dfdCanceller),self=this;dfd._pendingDfd=_1300({url:url,content:lang.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:function(_13a6){var infos=_13a6.attachmentInfos,_13a7;array.forEach(infos,function(info){_13a7=ioq.objectToQuery({gdbVersion:self._url.query&&self._url.query.gdbVersion,layer:self._url.query&&self._url.query.layer,token:self._getToken()});info.url=url+"/"+info.id+(_13a7?("?"+_13a7):"");info.objectId=_13a3;});self._resolve([infos],"onQueryAttachmentInfosComplete",_13a4,dfd);},error:function(err){self._resolve([err],null,_13a5,dfd,true);}});return dfd;},addAttachment:function(_13a8,_13a9,_13aa,_13ab){return this._sendAttachment("add",_13a8,_13a9,_13aa,_13ab);},updateAttachment:function(_13ac,_13ad,_13ae,_13af,_13b0){_13ae.appendChild(_12fd.create("input",{type:"hidden",name:"attachmentId",value:_13ad}));return this._sendAttachment("update",_13ac,_13ae,_13af,_13b0);},deleteAttachments:function(_13b1,_13b2,_13b3,_13b4){var url=this._url.path+"/"+_13b1+"/deleteAttachments",dfd=new _12fb(_1301._dfdCanceller),self=this,_13b5={f:"json",attachmentIds:_13b2.join(",")};dfd._pendingDfd=_1300({url:url,content:lang.mixin(_13b5,this._url.query),callbackParamName:"callback",load:lang.hitch(this,function(_13b6){var _13b7=_13b6.deleteAttachmentResults;_13b7=array.map(_13b7,function(_13b8){var res=new _1313(_13b8);res.attachmentId=res.objectId;res.objectId=_13b1;return res;});self._resolve([_13b7],"onDeleteAttachmentsComplete",_13b3,dfd);}),error:function(err){self._resolve([err],null,_13b4,dfd,true);}},{usePost:true});return dfd;},addType:function(_13b9){var types=this.types;if(types){var found=array.some(types,function(type){if(type.id==_13b9.id){return true;}return false;});if(found){return false;}else{types.push(_13b9);}}else{this.types=[_13b9];}this._typesDirty=true;return true;},deleteType:function(_13ba){if(!this._collection){return;}var types=this.types;if(types){var found=-1;array.some(types,function(type,index){if(type.id==_13ba){found=index;return true;}return false;});if(found>-1){this._typesDirty=true;return types.splice(found,1)[0];}}},toJson:function(){var _13bb=this._json,json=lang.isString(_13bb)?_12fa.fromJson(_13bb):lang.clone(_13bb);if(!json){return;}json=json.layerDefinition?json:{layerDefinition:json};var _13bc=json.layerDefinition,_13bd=this._collection;if(_13bd&&this._typesDirty){_13bc.types=array.map(this.types||[],function(type){return type.toJson();});var _13be=this.renderer,_13bf=_13bc.drawingInfo;if(_13bf&&_13be&&_13be.declaredClass.indexOf("TemporalRenderer")===-1){_13bf.renderer=_13be.toJson();}}var _13c0=null;if(!(_13bd&&!this._fcAdded)){_13c0={geometryType:_13bc.geometryType,features:this._convertFeaturesToJson(this.graphics,true)};}json.featureSet=lang.mixin({},json.featureSet||{},_13c0);if(_13bd){json.nextObjectId=this._nextId;_13bc.capabilities=this.capabilities;}return json;},onSelectionComplete:function(){},onSelectionClear:function(){},onBeforeApplyEdits:function(){},onEditsComplete:function(){},onQueryFeaturesComplete:function(){},onQueryRelatedFeaturesComplete:function(){},onQueryIdsComplete:function(){},onQueryCountComplete:function(){},onQueryAttachmentInfosComplete:function(){},onAddAttachmentComplete:function(){},onUpdateAttachmentComplete:function(){},onDeleteAttachmentsComplete:function(){},onCapabilitiesChange:function(){},onGDBVersionChange:function(){},onQueryLimitExceeded:function(){},_forceIdentity:function(_13c1){var self=this,path=this._url&&this._url.path;if((this.ownershipBasedAccessControlForFeatures||this.userIsAdmin)&&!this._getToken()&&path&&_12fe.id&&_12fe.id._hasPortalSession()&&_12fe.id._doPortalSignIn(path)){_12fe.id.getCredential(path).then(function(){self._findCredential();_13c1.call(self);},function(){_13c1.call(self);});}else{_13c1.call(this);}},_updateCaps:function(){var _13c2=this._editable,_13c3=lang.trim(this.capabilities||""),_13c4=array.map((_13c3?_13c3.split(","):[]),lang.trim),caps=array.map((_13c3?_13c3.toLowerCase().split(","):[]),lang.trim),found=array.indexOf(caps,"editing"),cap,i,_13c5,_13c6={"Create":array.indexOf(caps,"create"),"Update":array.indexOf(caps,"update"),"Delete":array.indexOf(caps,"delete")};if(_13c2&&found===-1){_13c4.push("Editing");}else{if(!_13c2&&found>-1){_13c5=[found];for(cap in _13c6){if(_13c6[cap]>-1){_13c5.push(_13c6[cap]);}}_13c5.sort();for(i=_13c5.length-1;i>=0;i--){_13c4.splice(_13c5[i],1);}}}this.capabilities=_13c4.join(",");},_counter:{value:0},_getUniqueId:function(){return this._counter.value++;},onSuspend:function(){this.inherited(arguments);this._toggleTime(false);var mode=this._mode;if(mode){mode.suspend();}},onResume:function(evt){this.inherited(arguments);this._toggleTime(true);this._updateMaxOffset();var mode=this._mode,map=this._map,_13c7=this.renderer;if(evt.firstOccurrence){this.clearSelection();if(this.timeInfo){if(this._trackIdField||(_13c7&&(_13c7.latestObservationRenderer||_13c7.trackRenderer))){this._trackManager=new _1317(this);this._trackManager.initialize(map);}}this._zoomConnect=_12f9.connect(map,"onZoomEnd",this,this._updateMaxOffset);}if(mode){evt.firstOccurrence?mode.startup():mode.resume();}},_updateMaxOffset:function(){var map=this._map;if(map&&map.loaded){if(this._autoGeneralize){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}}},_toggleTime:function(_13c8){var map=this._map;if(_13c8&&this.timeInfo&&this.useMapTime&&map){this._mapTimeExtent=map.timeExtent;if(!this._timeConnect){this._timeConnect=_12f9.connect(map,"onTimeExtentChange",this,this._timeChangeHandler);}}else{this._mapTimeExtent=null;_12f9.disconnect(this._timeConnect);this._timeConnect=null;}},_timeChangeHandler:function(_13c9){this._mapTimeExtent=_13c9;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},_getOffsettedTE:function(_13ca){var _13cb=this._timeOffset,units=this._timeOffsetUnits;return (_13ca&&_13cb&&units)?_13ca.offset(-1*_13cb,units):_13ca;},_getTimeOverlap:function(_13cc,_13cd){if(_13cc&&_13cd){return _13cc.intersection(_13cd);}else{return _13cc||_13cd;}},_getTimeFilter:function(_13ce){var _13cf=this.getTimeDefinition(),_13d0=null,_13d1;if(_13cf||_13d0){_13d1=this._getTimeOverlap(_13cf,_13d0);if(!_13d1){return [false];}}if(_13ce){_13ce=_13d1?this._getTimeOverlap(_13ce,_13d1):_13ce;if(!_13ce){return [false];}}else{_13ce=_13d1;}return [true,_13ce];},_getAttributeFilter:function(_13d2){var _13d3=this.getDefinitionExpression();if(_13d2){_13d2=_13d3?"("+_13d3+") AND ("+_13d2+")":_13d2;}else{_13d2=_13d3;}return _13d2;},_applyQueryFilters:function(query){query.where=this._getAttributeFilter(query.where);query.maxAllowableOffset=this._maxOffset;if(this.timeInfo){var _13d4=this._getTimeFilter(query.timeExtent);if(!_13d4[0]){return false;}else{query.timeExtent=_13d4[1];}}return true;},_add:function(_13d5){var _13d6=this._selectionSymbol,attr=_13d5.attributes,_13d7=this.visibilityField;if(_13d6&&this._isSelOnly){_13d5.setSymbol(_13d6);}if(_13d7&&attr&&attr.hasOwnProperty(_13d7)){_13d5[attr[_13d7]?"show":"hide"]();}return this.add.apply(this,arguments);},_remove:function(){return this.remove.apply(this,arguments);},_canDoClientSideQuery:function(query){var _13d8=[],map=this._map;if(this._isTable||!map){return;}if(query.text||(query.where&&query.where!==this.getDefinitionExpression())){return;}var _13d9=this._isSnapshot,_13da=this._isSelOnly;var _13db=query.geometry;if(_13db){if(!_13da&&query.spatialRelationship===Query.SPATIAL_REL_INTERSECTS&&(_13db.type==="extent"&&(_13d9||map.extent.contains(_13db)))){_13d8.push(1);}else{return;}}var ids=query.objectIds;if(ids){if(_13d9){_13d8.push(2);}else{var len=ids.length,mode=this._mode,_13dc=0,i;for(i=0;i<len;i++){if(mode._getFeature(ids[i])){_13dc++;}}if(_13dc===len){_13d8.push(2);}else{return;}}}if(this.timeInfo){var _13dd=query.timeExtent,_13de=this._mapTimeExtent;if(_13d9){if(_13dd){_13d8.push(3);}}else{if(_13da){if(_13dd){return;}}else{if(_13de){if(array.indexOf(_13d8,2)!==-1){if(_13dd){_13d8.push(3);}}else{return;}}else{if(_13d8.length>0){if(_13dd){_13d8.push(3);}}else{if(_13dd){return;}}}}}}return _13d8.length>0?_13d8:null;},_doQuery:function(query,_13df,_13e0){var _13e1=[],mode=this._mode,_13e2=this.objectIdField,i,len,_13e3;if(array.indexOf(_13df,2)!==-1){_13e1=[];var ids=query.objectIds;len=ids.length;for(i=0;i<len;i++){var obj=mode._getFeature(ids[i]);if(obj){_13e1.push(obj);}}if(_13e1.length===0){return [];}}if(array.indexOf(_13df,1)!==-1){_13e3=_13e1.length>0?_13e1:this.graphics;len=_13e3.length;var _13e4=query.geometry._normalize(null,true);_13e1=[];for(i=0;i<len;i++){var _13e5=_13e3[i],_13e6=_13e5.geometry;if(_13e6){if(this.normalization&&_13e4.length){if(_13e4[0].intersects(_13e6)||_13e4[1].intersects(_13e6)){_13e1.push(_13e5);}}else{if(_13e4.intersects(_13e6)){_13e1.push(_13e5);}}}}if(_13e1.length===0){return [];}}if(array.indexOf(_13df,3)!==-1){if(this.timeInfo){_13e3=_13e1.length>0?_13e1:this.graphics;var time=query.timeExtent,_13e7=this._filterByTime(_13e3,time.startTime,time.endTime);_13e1=_13e7.match;}}if(_13e0){return array.map(_13e1,function(obj){return obj.attributes[_13e2];},this);}else{return _13e1;}},_filterByTime:function(_13e8,_13e9,_13ea){var _13eb=this._startTimeField,_13ec=this._endTimeField,_13ed;if(!this._twoTimeFields){_13ed=_13eb||_13ec;}var isDef=_12ff.isDefined,yea=[],nay=[],i,len=_13e8.length,_13ee,_13ef;_13e9=_13e9?_13e9.getTime():-Infinity;_13ea=_13ea?_13ea.getTime():Infinity;if(_13ed){for(i=0;i<len;i++){_13ee=_13e8[i];_13ef=_13ee.attributes;var time=_13ef[_13ed];if(time>=_13e9&&time<=_13ea){yea.push(_13ee);}else{nay.push(_13ee);}}}else{for(i=0;i<len;i++){_13ee=_13e8[i];_13ef=_13ee.attributes;var start=_13ef[_13eb],end=_13ef[_13ec];start=isDef(start)?start:-Infinity;end=isDef(end)?end:Infinity;if((start>=_13e9&&start<=_13ea)||(end>=_13e9&&end<=_13ea)||(_13e9>=start&&_13ea<=end)){yea.push(_13ee);}else{nay.push(_13ee);}}}return {match:yea,noMatch:nay};},_resolve:function(args,_13f0,_13f1,dfd,_13f2){if(_13f0){this[_13f0].apply(this,args);}if(_13f1){_13f1.apply(null,args);}if(dfd){_1301._resDfd(dfd,args,_13f2);}},_getShallowClone:function(query){var _13f3=new Query(),prop;for(prop in query){if(query.hasOwnProperty(prop)){_13f3[prop]=query[prop];}}return _13f3;},_query:function(type,_13f4,query,_13f5,_13f6){var that=this,map=this._map,dfd=new _12fb(_1301._dfdCanceller),_13f7=query;var _13f8=function(_13f9,_13fa){if(!_13fa&&type==="execute"&&!that._isTable){var _13fb=_13f9.features,mode=that._mode,_13fc=that.objectIdField,il=_13fb.length,i;for(i=il-1;i>=0;i--){var oid=_13fb[i].attributes[_13fc];var _13fd=mode._getFeature(oid);if(_13fd){_13fb.splice(i,1,_13fd);}}}that._resolve([_13f9],_13f4,_13f5,dfd);};if(type!=="executeRelationshipQuery"){_13f7=this._getShallowClone(query);_13f7.outFields=this.getOutFields();_13f7.returnGeometry=query.hasOwnProperty("returnGeometry")?query.returnGeometry:true;var _13fe;if(map){_13f7.outSpatialReference=new _1302(map.spatialReference.toJson());}if(!this._applyQueryFilters(_13f7)){switch(type){case "execute":_13fe=new _130b({features:[]});break;case "executeForIds":_13fe=[];break;case "executeForCount":_13fe=0;break;}_13f8(_13fe,true);return dfd;}var _13ff=this._canDoClientSideQuery(_13f7);if(_13ff){var _1400=this._doQuery(_13f7,_13ff,(type==="executeForIds"||type==="executeForCount"));switch(type){case "execute":_13fe=new _130b();_13fe.features=_1400;break;case "executeForIds":_13fe=_1400;break;case "executeForCount":_13fe=_1400.length;break;}_13f8(_13fe,true);return dfd;}}if(this._collection){var err=new Error("FeatureLayer::_query - "+this.invalidParams);this._resolve([err],null,_13f6,dfd,true);return dfd;}if(this._ts){_13f7._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task[type](_13f7);temp.addCallbacks(_13f8,function(err){that._resolve([err],null,_13f6,dfd,true);});return dfd;},_convertFeaturesToJson:function(_1401,_1402,isAdd,_1403){var json=[],_1404=this._selectionSymbol,_1405=this.visibilityField,i,_1406,_1407=this.objectIdField;if(this.loaded&&(isAdd||_1403)){_1406=array.filter(this.fields,function(field){return (field.editable===false)&&(!_1403||(field.name!==_1407));});}for(i=0;i<_1401.length;i++){var _1408=_1401[i],_1409={},_140a=_1408.geometry,attr=_1408.attributes,_140b=_1408.symbol;if(_140a&&(!_1403||!this.loaded||this.allowGeometryUpdates)){_1409.geometry=_140a.toJson();}if(_1405){_1409.attributes=attr=lang.mixin({},attr);attr[_1405]=_1408.visible?1:0;}else{if(attr){_1409.attributes=lang.mixin({},attr);}}if(_1409.attributes&&_1406&&_1406.length){array.forEach(_1406,function(field){delete _1409.attributes[field.name];});}if(_140b&&(_140b!==_1404)){_1409.symbol=_140b.toJson();}json.push(_1409);}return _1402?json:_12fa.toJson(json);},_selectHandler:function(_140c,_140d,_140e,_140f,dfd){var _1410,ctor=this.constructor;switch(_140d){case ctor.SELECTION_NEW:this.clearSelection(true);_1410=true;break;case ctor.SELECTION_ADD:_1410=true;break;case ctor.SELECTION_SUBTRACT:_1410=false;break;}var i,_1411=_140c.features,mode=this._mode,_1412=[],_1413=this.objectIdField,_1414,oid;if(_1410){for(i=0;i<_1411.length;i++){_1414=_1411[i];oid=_1414.attributes[_1413];var added=mode._addFeatureIIf(oid,_1414);_1412.push(added);this._selectFeatureIIf(oid,added,mode);}}else{for(i=0;i<_1411.length;i++){_1414=_1411[i];oid=_1414.attributes[_1413];this._unSelectFeatureIIf(oid,mode);var _1415=mode._removeFeatureIIf(oid);_1412.push(_1415||_1414);}}if(this._isSelOnly){mode._applyTimeFilter(true);}this._resolve([_1412,_140d,_140c.exceededTransferLimit?{queryLimitExceeded:true}:null],"onSelectionComplete",_140e,dfd);if(_140c.exceededTransferLimit){this.onQueryLimitExceeded();}},_selectFeatureIIf:function(oid,_1416,mode){var _1417=this._selectedFeatures,found=_1417[oid];if(!found){mode._incRefCount(oid);_1417[oid]=_1416;if(!this._isTable){this._setSelectSymbol(_1416);}}return found||_1416;},_unSelectFeatureIIf:function(oid,mode){var found=this._selectedFeatures[oid];if(found){mode._decRefCount(oid);delete this._selectedFeatures[oid];if(!this._isTable){this._setUnSelectSymbol(found);}}return found;},_isSelected:function(_1418){},_setSelectSymbol:function(_1419){var _141a=this._selectionSymbol;if(_141a&&!this._isSelOnly){_1419.setSymbol(_141a);}},_setUnSelectSymbol:function(_141b){var _141c=this._selectionSymbol;if(_141c&&!this._isSelOnly){if(_141c===_141b.symbol){_141b.setSymbol(null,true);}}},_getOutFields:function(){var _141d=array.filter([this.objectIdField,this.typeIdField,this.creatorField,this._startTimeField,this._endTimeField,this._trackIdField].concat(this._rendererFields),function(field,index,arr){return !!field&&(array.indexOf(arr,field)===index);});var _141e=lang.clone(this._outFields);if(_141e){if(array.indexOf(_141e,"*")!==-1){return _141e;}array.forEach(_141d,function(field){if(array.indexOf(_141e,field)===-1){_141e.push(field);}});return _141e;}else{return _141d;}},_checkFields:function(_141f){var _1420=_141f||this._getOutFields();array.forEach(_1420,function(_1421){if(_1421==="*"){return;}if(!this._getField(_1421)){console.debug("esri.layers.FeatureLayer: "+_12ff.substitute({url:this.url,field:_1421},"unable to find '${field}' field in the layer 'fields' information [url: ${url}]"));}},this);if(!_141f&&!this._isTable&&!this._fserver&&!this._collection){var found=array.some(this.fields,function(_1422){return (_1422&&_1422.type==="esriFieldTypeGeometry")?true:false;});if(!found){console.debug("esri.layers.FeatureLayer: "+_12ff.substitute({url:this.url},"unable to find a field of type 'esriFieldTypeGeometry' in the layer 'fields' information. If you are using a map service layer, features will not have geometry [url: ${url}]"));}}},_fixRendererFields:function(){var _1423=this.renderer;if(_1423&&this.fields.length>0){var _1424=array.filter([_1423,_1423.observationRenderer,_1423.latestObservationRenderer,_1423.trackRenderer],_12ff.isDefined);var _1425=[];array.forEach(_1424,function(rnd){var _1426,_1427;_1427=rnd.attributeField;if(_1427&&!lang.isFunction(_1427)){_1426=!this._getField(_1427)&&this._getField(_1427,true);if(_1426){rnd.attributeField=_1426.name;}}_1427=rnd.attributeField2;if(_1427){_1426=!this._getField(_1427)&&this._getField(_1427,true);if(_1426){rnd.attributeField2=_1426.name;}}_1427=rnd.attributeField3;if(_1427){_1426=!this._getField(_1427)&&this._getField(_1427,true);if(_1426){rnd.attributeField3=_1426.name;}}if(!lang.isFunction(rnd.attributeField)){_1425.push(rnd.attributeField);}_1425.push(rnd.attributeField2);_1425.push(rnd.attributeField3);},this);this._rendererFields=array.filter(_1425,_12ff.isDefined);}},_getField:function(_1428,_1429){var _142a=this.fields;if(!_142a||_142a.length===0){return null;}var _142b;if(_1429){_1428=_1428.toLowerCase();}array.some(_142a,function(_142c){var found=false;if(_1429){found=(_142c&&_142c.name.toLowerCase()===_1428)?true:false;}else{found=(_142c&&_142c.name===_1428)?true:false;}if(found){_142b=_142c;}return found;});return _142b;},_getDateOpts:function(){if(!this._dtOpts){var props=array.map(array.filter(this.fields,function(_142d){return !!(_142d&&_142d.type==="esriFieldTypeDate");}),function(_142e){return _142e.name;});this._dtOpts={properties:props};}return this._dtOpts;},_applyNormalized:function(_142f,_1430){if(_142f&&_1430){array.forEach(_142f,function(_1431,index){if(_1431&&_1430[index]){_1431.setGeometry(_1430[index]);}});}},_editHandler:function(_1432,adds,_1433,_1434,_1435,dfd){var _1436=_1432.addResults,_1437=_1432.updateResults,_1438=_1432.deleteResults,i,_1439,oid,_143a,attr,_143b=this.objectIdField,mode=this._mode,_143c=this._isTable;var _143d=this.editFieldsInfo,_143e=this.getOutFields()||[],_143f=_143d&&_143d.creatorField,_1440=_143d&&_143d.creationDateField,_1441=_143d&&_143d.editorField,_1442=_143d&&_143d.editDateField,realm=_143d&&_143d.realm;if(array.indexOf(_143e,"*")===-1){if(_143f&&array.indexOf(_143e,_143f)===-1){_143f=null;}if(_1440&&array.indexOf(_143e,_1440)===-1){_1440=null;}if(_1441&&array.indexOf(_143e,_1441)===-1){_1441=null;}if(_1442&&array.indexOf(_143e,_1442)===-1){_1442=null;}}var _1443=(_1440||_1442)?(new Date()).getTime():null,_1444=(_143f||_1441)?this.getUserId():undefined;if(_1444&&realm){_1444=_1444+"@"+realm;}if(_1436){for(i=0;i<_1436.length;i++){_1436[i]=new _1313(_1436[i]);if(_143c){continue;}_1439=_1436[i];if(_1439.success){oid=_1439.objectId;_143a=adds[i];var gl=_143a._graphicsLayer;if(gl&&gl!==this){gl.remove(_143a);}attr=_143a.attributes||{};attr[_143b]=oid;if(_143f){attr[_143f]=_1444;}if(_1441){attr[_1441]=_1444;}if(_1440){attr[_1440]=_1443;}if(_1442){attr[_1442]=_1443;}_143a.setAttributes(attr);if(mode._init){mode.drawFeature(_143a);}}}}if(_1437){for(i=0;i<_1437.length;i++){_1437[i]=new _1313(_1437[i]);if(_143c){continue;}_1439=_1437[i];if(_1439.success){oid=_1439.objectId;_143a=_1433[oid];var found=mode._getFeature(oid);if(found){if(found.geometry!==_143a.geometry){found.setGeometry(_130d.fromJson(_143a.geometry.toJson()));}this._repaint(found,oid);}_143a=found||_143a;attr=_143a.attributes||{};if(_1441){attr[_1441]=_1444;}if(_1442){attr[_1442]=_1443;}_143a.setAttributes(attr);}}}if(_1438){var _1445=[];for(i=0;i<_1438.length;i++){_1438[i]=new _1313(_1438[i]);if(_143c){continue;}_1439=_1438[i];if(_1439.success){oid=_1439.objectId;_143a=mode._getFeature(oid);if(_143a){if(this._unSelectFeatureIIf(oid,mode)){_1445.push(_143a);}_143a._count=0;mode._removeFeatureIIf(oid);}}}if(_1445.length>0){this.onSelectionComplete(_1445,this.constructor.SELECTION_SUBTRACT);}}this._resolve([_1436,_1437,_1438],"onEditsComplete",_1434,dfd);},_sendAttachment:function(type,_1446,_1447,_1448,_1449){var _144a=(type==="add")?"addAttachment":"updateAttachment",url=this._url.path+"/"+_1446+"/"+_144a,self=this;var dfd=_1300({url:url,form:_1447,content:lang.mixin(this._url.query,{f:"json",token:this._getToken()||undefined}),callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(_144b){var _144c=(type==="add")?"addAttachmentResult":"updateAttachmentResult",_144d=(type==="add")?"onAddAttachmentComplete":"onUpdateAttachmentComplete",_144e=new _1313(_144b[_144c]);_144e.attachmentId=_144e.objectId;_144e.objectId=_1446;self._resolve([_144e],_144d,_1448);return _144e;}).addErrback(function(error){self._resolve([error],null,_1449,null,true);});return dfd;},_repaint:function(_144f,oid,force){oid=_12ff.isDefined(oid)?oid:_144f.attributes[this.objectIdField];if(!(oid in this._selectedFeatures)||!this._selectionSymbol){_144f.setSymbol(_144f.symbol,force);}},_getKind:function(_1450){var _1451=this._trackManager;if(_1451){return _1451.isLatestObservation(_1450)?1:0;}return 0;}});lang.mixin(_1318,{MODE_SNAPSHOT:0,MODE_ONDEMAND:1,MODE_SELECTION:2,SELECTION_NEW:3,SELECTION_ADD:4,SELECTION_SUBTRACT:5,POPUP_NONE:"esriServerHTMLPopupTypeNone",POPUP_HTML_TEXT:"esriServerHTMLPopupTypeAsHTMLText",POPUP_URL:"esriServerHTMLPopupTypeAsURL"});_130e._createWrappers(_1318);if(has("extend-esri")){lang.setObject("layers.FeatureLayer",_1318,_12fe);}return _1318;});},"esri/dijit/editing/toolbars/ToolbarBase":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/has","dijit/Toolbar","dijit/ToolbarSeparator","esri/kernel","esri/lang"],function(_1452,lang,array,_1453,has,_1454,_1455,_1456,_1457){var TBB=_1452([_1454],{declaredClass:"esri.dijit.editing.toolbars.ToolbarBase",_enabled:true,graphicsAdded:function(){},drawEnd:function(){},onApplyEdits:function(){},onDelete:function(){},constructor:function(_1458,_1459){if(!_1458||!_1458.settings){return;}this._tools=[];this._tbConnects=[];this._initialize(_1458.settings);},postCreate:function(){this._createTools();this.deactivate();},destroy:function(){var tool;var tools=this._tools;for(tool in tools){if(tools.hasOwnProperty(tool)&&_1457.isDefined(this._tools[tool])){this._tools[tool].destroy();}}array.forEach(this._tbConnects,_1453.disconnect);this.inherited(arguments);},activate:function(_145a){this._enabled=true;},deactivate:function(){var tool;this._enabled=false;this._layer=null;this._geometryType=null;var tools=this._tools;for(tool in tools){if(tools.hasOwnProperty(tool)){this._tools[tool].deactivate();this._tools[tool].setChecked(false);}}},isEnabled:function(){return this._enabled;},setActiveSymbol:function(_145b){this._activeSymbol=_145b;},_getSymbol:function(){},_createTools:function(){},_initialize:function(_145c){this._settings=_145c;this._toolbar=_145c.drawToolbar;this._editToolbar=_145c.editToolbar;this._initializeToolbar();},_activateTool:function(tool,_145d){if(this._activeTool){this._activeTool.deactivate();}if(_145d===true&&this._activeTool==this._tools[tool]){this._activeTool.setChecked(false);this._activeTool=null;}else{this._activeTool=this._tools[tool];this._activeTool.setChecked(true);this._activeTool.activate(null);}},_createSeparator:function(){this.addChild(new _1455());}});if(has("extend-esri")){lang.setObject("dijit.editing.toolbars.ToolbarBase",TBB,_1456);}return TBB;});},"dijit/form/_FormValueWidget":function(){define("dijit/form/_FormValueWidget",["dojo/_base/declare","dojo/sniff","./_FormWidget","./_FormValueMixin"],function(_145e,has,_145f,_1460){return _145e("dijit.form._FormValueWidget",[_145f,_1460],{_layoutHackIE7:function(){if(has("ie")==7){var _1461=this.domNode;var _1462=_1461.parentNode;var _1463=_1461.firstChild||_1461;var _1464=_1463.style.filter;var _1465=this;while(_1462&&_1462.clientHeight==0){(function ping(){var _1466=_1465.connect(_1462,"onscroll",function(){_1465.disconnect(_1466);_1463.style.filter=(new Date()).getMilliseconds();_1465.defer(function(){_1463.style.filter=_1464;});});})();_1462=_1462.parentNode;}}}});});},"*now":function(r){r(["dojo/i18n!*preload*esri/dijit/editing/nls/Editor-all*[\"ar\",\"az\",\"ca\",\"cs\",\"da\",\"de-de\",\"el\",\"en-gb\",\"en-us\",\"es-es\",\"fi-fi\",\"fr-fr\",\"he-il\",\"hu\",\"it-it\",\"ja-jp\",\"ko-kr\",\"nl-nl\",\"nb\",\"pl\",\"pt-br\",\"pt-pt\",\"ro\",\"ru\",\"sk\",\"sl\",\"sv\",\"th\",\"tr\",\"zh-tw\",\"zh-cn\",\"ROOT\"]"]);},"*noref":1}});define("esri/dijit/editing/Editor-all",["esri/layers/FeatureLayer","esri/toolbars/_toolbar","esri/toolbars/draw","esri/toolbars/edit","esri/tasks/geometry","esri/dijit/AttributeInspector","esri/dijit/editing/AttachmentEditor","esri/dijit/editing/Editor","esri/dijit/editing/TemplatePicker","esri/dijit/editing/Util","esri/dijit/editing/SelectionHelper"],function(_1467,_1468,Draw,Edit,_1469,_146a,_146b,_146c,_146d,Util,_146e){return {};});