// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
require({cache:{"esri/layers/FeatureLayer":function(){define("require module 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 dojo/when dojo/promise/all ../kernel ../lang ../request ../config ../deferredUtils ../promiseList ../SpatialReference ../symbols/SimpleMarkerSymbol ../symbols/SimpleLineSymbol ../symbols/SimpleFillSymbol ../symbols/jsonUtils ../renderers/SimpleRenderer ../renderers/UniqueValueRenderer ../renderers/jsonUtils ../support/expressionUtils ../tasks/QueryTask ../tasks/query ../tasks/FeatureSet ../tasks/StatisticDefinition ../geometry/Extent ../geometry/jsonUtils ../geometry/normalizeUtils ../geometry/scaleUtils ./GraphicsLayer ./Field ./TimeInfo ./FeatureType ./FeatureTemplate ./FeatureEditResult ./LabelClass ./SnapshotMode ./OnDemandMode ./SelectionMode ./StreamMode ./TrackManager ./HeatmapManager ./clustering/ClusterManager dojo/i18n!../nls/jsapi dojo/has!extend-esri?./agscommon".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n,t,A,y,z,v,B,C,F,D,E,G,K,L,x,J,I,R,S,V,W,X,Y,Q,O,M,N,P,ca,T,Z,da,ea,aa,ba,fa,ga){var ha=A.defaults,H=q(Y,{declaredClass:"esri.layers.FeatureLayer",invalidParams:"query contains one or more unsupported parameters",reHostedFS:/(https?:)?\/\/services.*\.arcgis\.com/i,maxPointCountForAuto:4E3,maxRecordCountForAuto:2E3,maxVertexCountForAuto:25E4,generalizeForScale:4E3,_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(b,a){this._preventInit||this._initFeatureLayer(b,a)},_initFeatureLayer:function(b,a){this.i18n=ga;a=a||{};this._featureReduction=
this._featureReduction||a.featureReduction;this._featureReductionEnabled=null!=a.featureReductionEnabled?a.featureReductionEnabled:!0;this.showLabels=null!=a.showLabels?a.showLabels:!0;this._outFields=a.outFields;this._defnExpr=a.definitionExpression;this._loadCallback=a.loadCallback;this._trackIdField=a.trackIdField;this.objectIdField=a.objectIdField;this._maxOffset=null!=a.maxAllowableOffset?a.maxAllowableOffset:this.maxAllowableOffset;this.quantize=null!=a.quantize?a.quantize:!0;this._optEditable=
a.editable;this._optAutoGen=a.autoGeneralize;this.editSummaryCallback=a.editSummaryCallback;this.userId=a.userId;this.userIsAdmin=a.userIsAdmin;this.useMapTime=a.hasOwnProperty("useMapTime")?!!a.useMapTime:!0;this.source=a.source;this.gdbVersion=a.gdbVersion;this.orderByFields=a.orderByFields;this.maxPointCountForAuto=null!=a.maxPointCountForAuto?a.maxPointCountForAuto:this.maxPointCountForAuto;this.maxRecordCountForAuto=null!=a.maxRecordCountForAuto?a.maxRecordCountForAuto:this.maxRecordCountForAuto;
this.maxVertexCountForAuto=null!=a.maxVertexCountForAuto?a.maxVertexCountForAuto:this.maxVertexCountForAuto;this.generalizeForScale=null!=a.generalizeForScale?a.generalizeForScale:this.generalizeForScale;this.queryPagination=this._optQueryPagination=null!=a.queryPagination?a.queryPagination:!0;this.multipatchOption=a.multipatchOption;this._selectedFeatures={};this._selectedFeaturesArr=[];this._newFeatures=[];this._deletedFeatures={};this._ulid=this._getUniqueId();var c=n.isDefined(a.mode)?a.mode:
H.MODE_ONDEMAND;this._isStream&&(c=H.MODE_STREAM);this.mode=c;switch(c){case H.MODE_SNAPSHOT:this.currentMode=H.MODE_SNAPSHOT;this._mode=new T(this);break;case H.MODE_ONDEMAND:case H.MODE_AUTO:this.currentMode=H.MODE_ONDEMAND;this._tileWidth=a.tileWidth||512;this._tileHeight=a.tileHeight||512;this._mode=new Z(this);this.latticeTiling=a.latticeTiling;break;case H.MODE_SELECTION:this.currentMode=H.MODE_SELECTION;this._mode=new da(this);this._isSelOnly=!0;break;case H.MODE_STREAM:this.currentMode=H.MODE_STREAM,
this._mode=new ea(this),this._isStream=!0}this._initLayer=k.hitch(this,this._initLayer);this._selectHandler=k.hitch(this,this._selectHandler);this._editable=!1;if(k.isObject(b)&&b.layerDefinition)return this._collection=!0,this.mode=this._isStream?H.MODE_STREAM:H.MODE_SNAPSHOT,this._isStream||this._outFields||(this._outFields=["*"]),this._initLayer(b),this;this._task=new x(this.url,{source:this.source,gdbVersion:this.gdbVersion});c=this._url.path;this._fserver=!1;-1!==c.search(/\/FeatureServer\//i)&&
(this._fserver=!0);this.mode===H.MODE_AUTO&&this.reHostedFS.test(this.url)&&this._queryLimit();var g=a.resourceInfo;g?this._initLayer(g):(this.source&&(g={source:this.source.toJson()},this._url.query=k.mixin(this._url.query,{layer:f.toJson(g)})),this.gdbVersion&&(this._url.query=k.mixin(this._url.query,{gdbVersion:this.gdbVersion})),t({url:c,content:k.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler}));this.registerConnectEvents()},_initLayer:function(a,
c){if(a||c){this._json=a;this._findCredential();if(this.credential&&this.credential.ssl||a&&a._ssl)this._useSSL(),this._task._useSSL();this.version=a.currentVersion;this.version||(this.version="capabilities"in a||"drawingInfo"in a||"hasAttachments"in a||"htmlPopupType"in a||"relationships"in a||"timeInfo"in a||"typeIdField"in a||"types"in a?10:9.3);this._collection&&(this._isStream||(this.currentMode=H.MODE_SNAPSHOT,this._mode=new T(this)),this._featureSet=a.featureSet,this._nextId=a.nextObjectId,
a=a.layerDefinition);this.geometryType=a.geometryType;"string"!==typeof this.multipatchOption&&"esriGeometryMultiPatch"===this.geometryType&&(this.multipatchOption="xyFootprint");if(a.hasOwnProperty("capabilities")){var g=this.capabilities=a.capabilities;g&&-1!==g.toLowerCase().indexOf("editing")?this._editable=!0:this._editable=!1}else this._collection||(this._editable=this._fserver);n.isDefined(this._optEditable)?(this._editable=this._optEditable,delete this._optEditable):"esriGeometryMultiPatch"===
this.geometryType&&(this._editable=!1);this._json=f.toJson(this._json);this.isEditable()?this._setMaxOffset(null):this.mode===H.MODE_SNAPSHOT||"esriGeometryPolyline"!==this.geometryType&&"esriGeometryPolygon"!==this.geometryType&&!this.hasXYFootprint()||(this._autoGeneralize=n.isDefined(this._optAutoGen)?this._optAutoGen:this.mode===H.MODE_ONDEMAND||this.mode===H.MODE_AUTO,delete this._optAutoGen);var g=a.effectiveMinScale||a.minScale,d=a.effectiveMaxScale||a.maxScale;!this._hasMin&&g&&this.setMinScale(g);
!this._hasMax&&d&&this.setMaxScale(d);this.layerId=a.id;this.name=a.name;this.description=a.description;this.copyright=a.copyrightText;this.type=a.type;this.displayField=a.displayField;this.defaultDefinitionExpression=a.definitionExpression||(a.isView?a.viewDefinitionQuery:a.definitionQuery);this.fullExtent=new S(a.extent);this.initialExtent=new S(this.fullExtent.toJson());this.fullExtent.spatialReference&&(this.spatialReference=new v(this.fullExtent.spatialReference.toJson()));this.defaultVisibility=
a.defaultVisibility;if("esriGeometryPoint"===this.geometryType||"esriGeometryMultipoint"===this.geometryType)this.latticeTiling=!1;this.hasM=a.hasM||!1;this.hasZ=a.hasZ||!1;this.indexedFields=a.indexedFields;this.maxRecordCount=a.maxRecordCount;this.canModifyLayer=a.canModifyLayer;this.supportsStatistics=a.supportsStatistics;this.supportsAdvancedQueries=this._collection?!1:a.supportsAdvancedQueries;this.supportsCalculate=a.supportsCalculate;this.supportsAttachmentsByUploadId=a.supportsAttachmentsByUploadId;
this.supportsCoordinatesQuantization=a.supportsCoordinatesQuantization;this.quantize=this.quantize&&this.supportsCoordinatesQuantization;this.hasLabels=a.hasLabels;this.canScaleSymbols=a.canScaleSymbols;this.supportsRollbackOnFailureParameter=this.supportsRollbackOnFailure=a.supportsRollbackOnFailure;this.syncCanReturnChanges=a.syncCanReturnChanges;this.isDataVersioned=a.isDataVersioned;this.editFieldsInfo=a.editFieldsInfo;this.ownershipBasedAccessControlForFeatures=a.ownershipBasedAccessControlForFeatures;
this.editFieldsInfo&&this.ownershipBasedAccessControlForFeatures&&(this.creatorField=this.editFieldsInfo.creatorField);this.relationships=a.relationships;this.allowGeometryUpdates=n.isDefined(a.allowGeometryUpdates)?a.allowGeometryUpdates:!0;this.allowUpdateWithoutMValues=!!a.allowUpdateWithoutMValues;this.enableZDefaults=!!a.enableZDefaults;this.zDefault=n.isDefined(a.zDefault)?a.zDefault:null;this.advancedQueryCapabilities=a.advancedQueryCapabilities||{supportsStatistics:this.supportsStatistics,
supportsOrderBy:this.supportsAdvancedQueries,supportsDistinct:this.supportsAdvancedQueries};this.url&&(this.advancedQueryCapabilities.supportsPagination=this.advancedQueryCapabilities.supportsPagination&&(this.reHostedFS.test(this.url)||10.3<this.version));this.queryPagination=this._optQueryPagination&&this.advancedQueryCapabilities.supportsPagination;this.useStandardizedQueries=a.useStandardizedQueries;this.tileMaxRecordCount=a.tileMaxRecordCount;this.standardMaxRecordCount=a.standardMaxRecordCount;
this._setMaxOffset(this._maxOffset,!0);this._isTable="Table"===this.type;for(var m=this.fields=[],d=a.fields,g=0;g<d.length;g++)m.push(new Q(d[g]));if(!this.objectIdField){this.objectIdField=a.objectIdField;if(!this.objectIdField)for(d=a.fields,g=0;g<d.length;g++)if(m=d[g],"esriFieldTypeOID"===m.type){this.objectIdField=m.name;break}this.objectIdField||this._isStream||console.debug("esri.layers.FeatureLayer: "+n.substitute({url:this.url},"objectIdField is not set [url: ${url}]"))}if(!n.isDefined(this._nextId)){d=
this.objectIdField;m=-1;if(this._collection&&d)for(var h=(g=this._featureSet)&&g.features,u=h?h.length:0,t,g=0;g<u;g++)t=(t=h[g].attributes)&&t[d],t>m&&(m=t);this._nextId=m+1}this.globalIdField=a.globalIdField;if(g=this.typeIdField=a.typeIdField)if(g=!this._getField(g)&&this._getField(g,!0))this.typeIdField=g.name;this.visibilityField=a.visibilityField;if(d=a.defaultSymbol)this.defaultSymbol=D.fromJson(d);var x=this.types=[],w=a.types,U,A,m=(g=this.editFieldsInfo)&&g.creatorField,h=g&&g.editorField;
t=m||h;u=[];if(w)for(g=0;g<w.length;g++)U=new M(w[g]),A=U.templates,t&&A&&A.length&&(u=u.concat(A)),x.push(U);w=a.templates;U=this.templates=[];if(w)for(g=0;g<w.length;g++)x=new N(w[g]),t&&u.push(x),U.push(x);for(g=0;g<u.length;g++)if(t=k.getObject("prototype.attributes",!1,u[g]))m&&delete t[m],h&&delete t[h];if(g=a.timeInfo)this.timeInfo=new O(g),this._startTimeField=g.startTimeField,this._endTimeField=g.endTimeField,this._startTimeField&&this._endTimeField&&(this._twoTimeFields=!0),this._trackIdField?
g.trackIdField=this._trackIdField:this._trackIdField=g.trackIdField;this.hasAttachments=!this._collection&&a.hasAttachments?!0:!1;this.htmlPopupType=a.htmlPopupType;var g=a.drawingInfo,J;(m=g&&g.labelingInfo)&&!this.labelingInfo&&(this.labelingInfo=e.map(m,function(a){return new ca(a)}),this._fixLabelExpr());if(!this.renderer)if(g&&g.renderer){if(J=g.renderer,this.setRenderer(K.fromJson(J)),"classBreaks"===J.type&&this.renderer.setMaxInclusive(!0),!this._collection){var l=J.type,d=[];J=this.renderer;
switch(l){case "simple":d.push(J.symbol);break;case "uniqueValue":case "classBreaks":d.push(J.defaultSymbol),d=d.concat(e.map(J.infos,function(a){return a.symbol}))}var d=e.filter(d,n.isDefined),y=this._url.path+"/images/",p=this._getToken();e.forEach(d,function(a){var b=a.url;b&&(-1===b.search(/https?\:/)&&-1===b.indexOf("data:")&&(a.url=y+b),p&&-1!==a.url.search(/https?\:/)&&(a.url+="?token\x3d"+p))})}}else if(d)w=this.types,0<w.length?(J=new G(this.defaultSymbol,this.typeIdField),e.forEach(w,function(a){J.addValue(a.id,
a.symbol)})):J=new E(this.defaultSymbol),this.setRenderer(J);else if(!this._isTable){switch(this.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":l=new B;break;case "esriGeometryPolyline":l=new C;break;case "esriGeometryPolygon":l=new F;break;default:this.hasXYFootprint()&&(l=new F)}this.setRenderer(l?new E(l):null)}l=g&&g.transparency||0;!this.hasOwnProperty("opacity")&&0<l&&(this.opacity=1-l/100);(b("ie")||7<=b("trident")||b("safari"))&&this.isEditable()&&10.02>this.version&&
(this._ts=!0);this.statistics=a.statistics;this._fixRendererFields();this._updateRequiredFieldsFromLabelingInfo();this._checkFields();this._updateCaps();var q=function(){null==this._maxOffset||this._isFractionalOffsetAllowed()||this._setMaxOffset(this._maxOffset);this.loaded=!0;this.setFeatureReduction(this.getFeatureReduction());this.currentMode!==H.MODE_SNAPSHOT&&(this.queryPagination=!1);this.onLoad(this);var a=this._loadCallback;a&&(delete this._loadCallback,a(this))},l=[];this._collection?(g=
this._featureSet,this._featureSet=null,this._mode._drawFeatures(new I(g)),this._fcAdded=!0):(l.push(this._forceIdentity()),this._limitPromise&&l.push(this._limitPromise));l.push(this._evalGeometryOperations());l.length?z(l).then(k.hitch(this,function(){q.call(this)})):q.call(this)}},setShowLabels:function(a){this.showLabels=a;this.onShowLabelsChange()},onShowLabelsChange:function(){},onRendererChange:function(a){this.inherited(arguments);var b=this._map;this._ager=!!(a&&a.observationAger&&a.observationRenderer);
a&&"colors"in a&&"blurRadius"in a&&"maxPixelIntensity"in a?"esriGeometryPoint"==this.geometryType&&!this._heatmapManager&&b&&(this._heatmapManager=new ba(this),this._heatmapManager.initialize(b)):this.renderer&&this.renderer.getRendererInfo?e.some(this.renderer.rendererInfos,function(a){return a.renderer&&"colors"in a.renderer&&"blurRadius"in a.renderer})||(this._heatmapManager=null):this._heatmapManager=null;this.timeInfo&&b&&(a&&(a.latestObservationRenderer||a.trackRenderer)?this._trackManager||
(this._trackManager=new aa(this),this._trackManager.initialize(b),this._childLayer=this._trackManager.container,this._mode._applyTimeFilter()):this._trackManager&&!this._isStream&&(this._trackManager.destroy(),this._trackManager=null));if(a){var c=[],b=e.filter([a,a.observationRenderer,a.latestObservationRenderer,a.trackRenderer],n.isDefined),g=function(a){return null!=a&&"function"!=typeof a&&a};e.forEach(b,function(a){var b=g(a.attributeField),d=g(a.attributeField2);a=g(a.attributeField3);!1!==
b&&c.push(b);!1!==d&&c.push(d);!1!==a&&c.push(a)});this._requiredFields=c}else this._requiredFields=[];this.loaded&&(this._fixRendererFields(),this._checkFields(this._requiredFields),this._collection&&(this._typesDirty=!0))},setFeatureReduction:function(a){a&&(a=k.mixin({},a),null!=a.clusterSize&&null==a.clusterRadius&&(a.clusterRadius=a.clusterSize),delete a.clusterSize);this.loaded?this._isFeatureReductionSupported(a)?this._featureReduction=a:(this._featureReduction=null,a&&console.log("Clustering is not supported for this layer: "+
this.url)):this._featureReduction=a;this._evalFeatureReduction(this._featureReduction)},hasFeatureReduction:function(){return!!this._featureReduction},getFeatureReduction:function(){var a=this._featureReduction;if(a){var a=k.mixin({},a),b=this._clusterManager;if(b=b&&b.aggregationInfo)a.clusterRadius=b.clusterRadius,a.infoTemplate=b.infoTemplate}return a},isFeatureReductionActive:function(){var a=this._clusterManager;return!!(a&&a.isClusteringEnabled()&&a.isClusteringActive())},isFeatureReductionEnabled:function(){return this._featureReductionEnabled},
enableFeatureReduction:function(){this._featureReductionEnabled||(this._featureReductionEnabled=!0,this._evalFeatureReduction(this._featureReduction))},disableFeatureReduction:function(){this._featureReductionEnabled&&(this._featureReductionEnabled=!1,this._evalFeatureReduction(this._featureReduction))},isFeatureReductionApplied:function(){return this.hasFeatureReduction()&&this.isFeatureReductionEnabled()&&this._canCluster(this.getFeatureReduction())},getAggregateGraphics:function(){return this._clusterManager?
this._clusterManager.getAggregateGraphics():[]},getChildGraphics:function(a){return this._clusterManager?this._clusterManager.getFeaturesInCluster(a):[]},getSingleGraphics:function(){return this._clusterManager?this._clusterManager.getSingleGraphics():[]},getFeatureReductionRenderer:function(){return this.isFeatureReductionActive()?this._clusterManager.getClusterRenderer():null},getFeatureReductionLayer:function(){return this._clusterManager?this._clusterManager.container:null},getFeatureReductionField:function(a){var b,
c=this._clusterManager?this._clusterManager.getClusterFields():null;a=a?a.toLowerCase():"";e.some(c,function(c){a===c.name.toLowerCase()&&(b=c);return!!b});return b},_isFeatureReductionSupported:function(a){return a&&"cluster"===a.type&&"esriGeometryPoint"===this.geometryType&&(this._collection||this._isStream||this._optQueryPagination&&this.advancedQueryCapabilities.supportsPagination)},_isReductionCompatibleRenderer:function(a){a=a&&a.declaredClass||"";a=a.toLowerCase();return-1<a.indexOf("simplerenderer")||
-1<a.indexOf("classbreaksrenderer")||-1<a.indexOf("uniquevaluerenderer")},_evalFeatureReduction:function(a){this.loaded&&this.getMap()&&(a=a||this.getFeatureReduction(),this._evalFetchMode(a),a&&this.isFeatureReductionEnabled()?this._canCluster(a)?this._clusterManager?this._updateClusterManager(a):(this._clusterManager=this._createClusterManager(a),this.onFeatureReductionChange()):(console.log("Clustering is supported only for point layers where map spatial reference is WGS84 or Web Mercator"),this._destroyClusterManager()):
this._destroyClusterManager())},_canCluster:function(a){var b=this._map.spatialReference;return this._isFeatureReductionSupported(a)&&this._isReductionCompatibleRenderer(this.renderer)&&(b.isWebMercator()||4326===b.wkid)},_createClusterManager:function(a){a=new fa({layer:this,aggregationInfo:a});this._clusterHandles=[a.on("renderer-change",k.hitch(this,function(){this.onFeatureReductionRendererChange()}))];a.initialize(this._map);return a},_updateClusterManager:function(a){var b=this._clusterManager;
b&&b.setAggregationInfo(a)},_destroyClusterManager:function(a){e.forEach(this._clusterHandles,function(a){a.remove()});this._clusterHandles=null;this._clusterManager&&(this._clusterManager.destroy(a),this._clusterManager=null,this.onFeatureReductionChange())},redraw:function(){this.inherited(arguments);this._clusterManager&&this._clusterManager.redraw();this._trackManager&&this._trackManager.container&&this._trackManager.container.redraw()},_evalSDRenderer:function(a){this.inherited(arguments);var b=
this._getRenderer();this._ager=!!(b&&b.observationAger&&b.observationRenderer);this._trackManager&&this._trackManager.container&&this._trackManager.container.setRenderer(b&&b.trackRenderer);a&&this._evalFeatureReduction()},_setMap:function(a){var b=this.inherited(arguments),c=this._mode,g=this;c&&a.loaded&&c.initialize(a);this.geometryType&&this.attr("data-geometry-type",this.geometryType.replace(/esriGeometry/i,"").toLowerCase());this._addHandle=this.on("graphic-node-add",function(a){a=a.graphic.attributes;
(a=g._selectedFeatures[a&&a[g.objectIdField]])&&a.attr("data-selected","")});return b},_unsetMap:function(a){var b=this._mode;b&&(b.suspend(),b.destroy());this._destroyClusterManager(!1);this._trackManager&&(this._trackManager.destroy(),this._trackManager=null);p.disconnect(this._zoomConnect);p.disconnect(this._addHandle);this._zoomConnect=this._addHandle=null;this._toggleTime(!1);this.inherited("_unsetMap",arguments)},refresh:function(){this._needsRefresh=!1;var a=this._mode;a&&a.refresh()},hasXYFootprint:function(){return"esriGeometryMultiPatch"===
this.geometryType&&"xyFootprint"===this.multipatchOption},getOutFields:function(){return e.filter(this._getOutFields(),function(a){return"*"===a||!!this._getField(a)},this)},getField:function(a){return this._getField(a,!0)},isOutField:function(a){a=this.getField(a);if(!a)return!1;var b=this.getOutFields();return-1<e.indexOf(b,"*")||-1<e.indexOf(b,a.name)},getFieldLabel:function(a){var b=this.infoTemplate,b=b&&b.getFieldInfo&&b.getFieldInfo(a);a=k.isFunction(a)?null:this.getField(a);var c=b||a,g="";
c&&(g=b&&b.label||a&&a.alias||c.name||c.fieldName);return g},getDomain:function(a,b){var c,g,d=b&&b.feature,m=d&&this.typeIdField&&d.attributes&&d.attributes[this.typeIdField];null!=m&&e.some(this.types,function(b){return b.id==m?((c=b.domains&&b.domains[a])&&"inherited"===c.type&&(c=this._getLayerDomain(a),g=!0),!0):!1},this);g||c||(c=this._getLayerDomain(a));return c},_getLayerDomain:function(a){var b;e.some(this.fields,function(c){c.name===a&&(b=c.domain);return!!b});return b},getType:function(a){var b,
c=a&&this.typeIdField&&a.attributes&&a.attributes[this.typeIdField];e.some(this.types,function(a){a.id==c&&(b=a);return!!b});return b},setEditable:function(a){if(!this._collection)return console.log("FeatureLayer:setEditable - this functionality is not yet supported for layer in a feature service"),this;if(!this.loaded)return this._optEditable=a,this;var b=this._editable;this._editable=a;this._updateCaps();if(b!==a)this.onCapabilitiesChange();return this},getEditCapabilities:function(a){var b={canCreate:!1,
canUpdate:!1,canDelete:!1,canUpdateGeometry:!1};if(!this.loaded||!this.isEditable())return b;var c=a&&a.feature;a=a&&a.userId||this.getUserId();var g=e.map(this.capabilities?this.capabilities.toLowerCase().split(","):[],k.trim),d=(b=-1<e.indexOf(g,"editing"))&&-1<e.indexOf(g,"create"),m=b&&-1<e.indexOf(g,"update"),g=b&&-1<e.indexOf(g,"delete"),n=this.ownershipBasedAccessControlForFeatures,h=this.editFieldsInfo,f=h&&h.creatorField,h=h&&h.realm,c=(c=c&&c.attributes)&&f?c[f]:void 0,u=!!this.userIsAdmin,
f=!n||u||!(!n.allowOthersToUpdate&&!n.allowUpdateToOthers),t=!n||u||!(!n.allowOthersToDelete&&!n.allowDeleteToOthers),x=!n||u||!n.hasOwnProperty("allowAnonymousToUpdate")||n.allowAnonymousToUpdate,n=!n||u||!n.hasOwnProperty("allowAnonymousToDelete")||n.allowAnonymousToDelete;a&&h&&(a=a+"@"+h);if(u||b&&!(d||m||g))d=m=g=!0;b={canCreate:d,canUpdate:m,canDelete:g,canUpdateGeometry:u||this.allowGeometryUpdates};a||(b.canUpdate=b.canUpdate&&x,b.canDelete=b.canDelete&&n);null===c?(b.canUpdate=b.canUpdate&&
f,b.canDelete=b.canDelete&&t):""!==c&&c&&a.toLowerCase()!==c.toLowerCase()&&(b.canUpdate=b.canUpdate&&f,b.canDelete=b.canDelete&&t);return b},getUserId:function(){var a;this.loaded&&(a=this.credential&&this.credential.userId||this.userId||"");return a},setUserIsAdmin:function(a){this.userIsAdmin=a},setEditSummaryCallback:function(a){this.editSummaryCallback=a},getEditSummary:function(a,b,c){c=n.isDefined(c)?c:(new Date).getTime();var g="";c=this.getEditInfo(a,b,c);(b=b&&b.callback||this.editSummaryCallback)&&
(c=b(a,c)||"");if(k.isString(c))g=c;else{if(c){a=c.action;b=c.userId;var d=c.timeValue,m=0;a&&m++;b&&m++;n.isDefined(d)&&m++;1<m&&(g=("edit"===a?"edit":"create")+(b?"User":"")+(n.isDefined(d)?c.displayPattern:""))}g=g&&n.substitute(c,this.i18n.layers.FeatureLayer[g])}return g},getEditInfo:function(a,b,c){if(this.loaded){c=n.isDefined(c)?c:(new Date).getTime();b=b&&b.action||"last";var g=this.editFieldsInfo,d=g&&g.creatorField,m=g&&g.creationDateField,e=g&&g.editorField,g=g&&g.editDateField,e=(a=a&&
a.attributes)&&e?a[e]:void 0,g=a&&g?a[g]:null,d=this._getEditData(a&&d?a[d]:void 0,a&&m?a[m]:null,c);c=this._getEditData(e,g,c);var h;switch(b){case "creation":h=d;break;case "edit":h=c;break;case "last":h=c||d}h&&(h.action=h===c?"edit":"creation");return h}},_getEditData:function(a,b,c){var g,m,e;n.isDefined(b)&&(m=c-b,e=0>m?"Full":6E4>m?"Seconds":12E4>m?"Minute":36E5>m?"Minutes":72E5>m?"Hour":864E5>m?"Hours":6048E5>m?"WeekDay":"Full");if(void 0!==a||e)g=g||{},g.userId=a,e&&(a=d.format,c=new Date(b),
g.minutes=Math.floor(m/6E4),g.hours=Math.floor(m/36E5),g.weekDay=a(c,{datePattern:"EEEE",selector:"date"}),g.formattedDate=a(c,{selector:"date"}),g.formattedTime=a(c,{selector:"time"}),g.displayPattern=e,g.timeValue=b);return g},isEditable:function(){return!(!this._editable&&!this.userIsAdmin)},isQueryable:function(){var a=e.map(this.capabilities?this.capabilities.toLowerCase().split(","):[],k.trim);return this._isStream||this.userIsAdmin||this._collection||-1!==e.indexOf(a,"query")||-1!==e.indexOf(a,
"catalog")},setMaxAllowableOffset:function(a){this.isEditable()||this._setMaxOffset(a,!0);return this},getMaxAllowableOffset:function(){var a=this._quantizationParameters?this._quantizationParameters.tolerance:void 0;return null!=this._maxOffset?this._maxOffset:a},_setMaxOffset:function(a,b){if(null==a)return delete this._maxOffset,delete this._quantizationParameters,this;this.quantize&&this.supportsCoordinatesQuantization?("esriGeometryPolyline"===this.geometryType?this._maxOffset=a:delete this._maxOffset,
this._quantizationParameters={mode:"view",originPosition:"upperLeft",tolerance:a,extent:this.fullExtent}):(this._isFractionalOffsetAllowed()&&b||(a=Math.floor(a)),isNaN(a)||0===a?delete this._maxOffset:this._maxOffset=a,delete this._quantizationParameters);return this},_isFractionalOffsetAllowed:function(){return null==this.version||10.1<=this.version||navigator.languages&&this._isLangWithDot(navigator.languages[0])},_isLangWithDot:function(a){a=(a=a&&a.split("-"))&&a[0]&&a[0].toLowerCase();return-1!==
e.indexOf(this._langsWithDot,a)},_langsWithDot:"ar en et fr he ja ko th vi zh".split(" "),setAutoGeneralize:function(a){this.loaded?this.isEditable()||this.mode===H.MODE_SNAPSHOT||"esriGeometryPolyline"!==this.geometryType&&"esriGeometryPolygon"!==this.geometryType&&!this.hasXYFootprint()||((this._autoGeneralize=a)?(this._autoSnapshot&&(this._prevScale=null),this._updateMaxOffset()):this._setMaxOffset(null)):this._optAutoGen=a;return this},setGDBVersion:function(a){this._collection||a===this.gdbVersion||
!a&&!this.gdbVersion||(this.gdbVersion=a,this._task.gdbVersion=a,this._url.query=k.mixin(this._url.query,{gdbVersion:a}),this.loaded&&(this.clearSelection(),this._map&&this.refresh()),this.onGDBVersionChange());return this},hasAllFeatures:function(){return this._mode?this._mode.hasAllFeatures():!0},setDefinitionExpression:function(a){this._defnExpr=a;(a=this._mode)&&a.propertyChangeHandler(1);return this},getDefinitionExpression:function(){return this._defnExpr},setTimeDefinition:function(a){this._isSnapshotMode()?
(this._timeDefn=a,(a=this._mode)&&a.propertyChangeHandler(2)):console.log("FeatureLayer.setTimeDefinition: layer in on-demand or selection mode does not support time definitions. Layer id \x3d "+this.id+", Layer URL \x3d "+this.url);return this},getTimeDefinition:function(){return this._timeDefn},setTimeOffset:function(a,b){this._timeOffset=a;this._timeOffsetUnits=b;var c=this._mode;c&&c.propertyChangeHandler(0);return this},setUseMapTime:function(a){this.useMapTime=a;this._toggleTime(!this.suspended);
(a=this._mode)&&a.propertyChangeHandler(0)},selectFeatures:function(a,b,c,g){b=b||H.SELECTION_NEW;this._hasPartialSelectedFeatures=!1;a=this._getShallowClone(a);var d=this._map,m,n=this,e=y._fixDfd(new h(y._dfdCanceller));a.outFields=this.getOutFields();a.returnGeometry=!0;a.multipatchOption=this.multipatchOption;d&&(a.outSpatialReference=new v(d.spatialReference.toJson()));if(!this._applyQueryFilters(a,!0))return m={features:[]},this._selectHandler(m,b,c,g,e),e;if(d=this._canDoClientSideQuery(a))e._pendingDfd=
w(this._doQuery(a,d)),e._pendingDfd.then(function(a){m={features:a};n._selectHandler(m,b,c,g,e)});else{if(this._collection)return this._resolve([Error("FeatureLayer::selectFeatures - "+this.invalidParams)],null,g,e,!0),e;if(this.loaded&&!this.isQueryable())return this._resolve([Error("Layer does not support query capability.")],null,g,e,!0),e;var f=this;this._ts&&(a._ts=(new Date).getTime());(e._pendingDfd=this._task.execute(a)).addCallbacks(function(a){f._selectHandler(a,b,c,g,e)},function(a){f._hasPartialSelectedFeatures=
!0;f._resolve([a],null,g,e,!0)})}return e},getSelectedFeatures:function(){var a=this._selectedFeatures,b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b},clearSelection:function(a){var b=this._selectedFeatures,c=this._mode,g;for(g in b)b.hasOwnProperty(g)&&(this._unSelectFeatureIIf(g,c),c._removeFeatureIIf(g));this._selectedFeatures={};this._isSelOnly&&c._applyTimeFilter(!0);if(!a)this.onSelectionClear();return this},setSelectionSymbol:function(a){if(this._selectionSymbol=a){var b=this._selectedFeatures,
c;for(c in b)b.hasOwnProperty(c)&&b[c].setSymbol(a)}return this},getSelectionSymbol:function(){return this._selectionSymbol},setLabelingInfo:function(a){a?(this.labelingInfo=a,this._fixLabelExpr()):delete this.labelingInfo;this._collection&&(this._typesDirty=!0);this.onLabelingInfoChange()},_fixLabelExpr:function(){var a=/\[([^\[\]]+)\]/ig,b,c=this,g=function(a,b){var g=c._getField(b,!0);return"["+(g&&g.name||b)+"]"};e.forEach(this.labelingInfo,function(c){if(b=c.labelExpression)c.labelExpression=
b.replace(a,g)})},_updateRequiredFieldsFromLabelingInfo:function(){var a=[];e.forEach(this.labelingInfo,function(b){var c=b.labelExpressionInfo;if(b.labelExpression){var g=/[\[\]]/ig;b=b.labelExpression.match(/\[[^\[\]]+\]/ig);(b=e.map(b,function(a){return a.replace(g,"")}))&&(a=a.concat(b))}if(c){if(c.value){var d=/[\{\}]/ig;b=c.value.match(/\{[^\{\}]+\}/ig);(b=e.map(b,function(a){return a.replace(d,"")}))&&(a=a.concat(b))}c.expression&&(a=a.concat(L.extractFieldNames(c.expression)))}});a=e.map(a,
function(a){var b=this.getField(a);return b?b.name:a},this);this._requiredFields&&(this._requiredFields=this._requiredFields.concat(a))},__msigns:[{n:"applyEdits",c:5,a:[{i:0},{i:1}],e:4,f:1}],applyEdits:function(a,b,c,g,d,m){var n=m.assembly,h=m.dfd;this._applyNormalized(a,n&&n[0]);this._applyNormalized(b,n&&n[1]);this.onBeforeApplyEdits(a,b,c);var f={},u=this.objectIdField,n={f:"json"},x=!1;if(this._collection)m={},m.addResults=a?e.map(a,function(){x=!0;return{objectId:this._nextId++,success:!0}},
this):null,m.updateResults=b?e.map(b,function(a){x=!0;var b=a.attributes[u];f[b]=a;return{objectId:b,success:!0}},this):null,m.deleteResults=c?e.map(c,function(a){x=!0;return{objectId:a.attributes[u],success:!0}},this):null,x?this._editHandler(m,a,f,g,d,h):this._resolve([m.addResults,m.updateResults,m.deleteResults],null,g,h);else{a&&0<a.length&&(n.adds=this._convertFeaturesToJson(a,0,1),x=!0);if(b&&0<b.length){for(m=0;m<b.length;m++){var w=b[m];f[w.attributes[u]]=w}n.updates=this._convertFeaturesToJson(b,
0,0,1);x=!0}if(c&&0<c.length){b=[];for(m=0;m<c.length;m++)b.push(c[m].attributes[u]);n.deletes=b.join(",");x=!0}if(x){var A=this;return t({url:this._url.path+"/applyEdits",content:k.mixin(n,this._url.query),callbackParamName:"callback",load:function(b){A._editHandler(b,a,f,g,d,h)},error:function(a){A._resolve([a],null,d,h,!0)}},{usePost:!0})}this._resolve([],null,g,h)}},queryFeatures:function(a,b,c){return this._query("execute","onQueryFeaturesComplete",a,b,c)},queryRelatedFeatures:function(a,b,c){return this._query("executeRelationshipQuery",
"onQueryRelatedFeaturesComplete",a,b,c)},queryIds:function(a,b,c){return this._query("executeForIds","onQueryIdsComplete",a,b,c)},queryCount:function(a,b,c){return this._query("executeForCount","onQueryCountComplete",a,b,c)},queryExtent:function(a,b,c){return this._query("executeForExtent","onQueryExtentComplete",a,b,c)},queryAttachmentInfos:function(a,b,g){var d=this._url.path+"/"+a+"/attachments",m=new h(y._dfdCanceller),n=this;m._pendingDfd=t({url:d,content:k.mixin({f:"json"},this._url.query),
callbackParamName:"callback",load:function(g){g=g.attachmentInfos;var h;e.forEach(g,function(b){h=c.objectToQuery({gdbVersion:n._url.query&&n._url.query.gdbVersion,layer:n._url.query&&n._url.query.layer,token:n._getToken()});b.url=d+"/"+b.id+(h?"?"+h:"");b.objectId=a});n._resolve([g],"onQueryAttachmentInfosComplete",b,m)},error:function(a){n._resolve([a],null,g,m,!0)}});return m},addAttachment:function(a,b,c,g){return this._sendAttachment("add",a,b,c,g)},updateAttachment:function(b,c,g,d,m){g.appendChild(a.create("input",
{type:"hidden",name:"attachmentId",value:c}));return this._sendAttachment("update",b,g,d,m)},deleteAttachments:function(a,b,c,g){var d=this._url.path+"/"+a+"/deleteAttachments",m=new h(y._dfdCanceller),n=this;b={f:"json",attachmentIds:b.join(",")};m._pendingDfd=t({url:d,content:k.mixin(b,this._url.query),callbackParamName:"callback",load:k.hitch(this,function(b){b=b.deleteAttachmentResults;b=e.map(b,function(b){b=new P(b);b.attachmentId=b.objectId;b.objectId=a;return b});n._resolve([b],"onDeleteAttachmentsComplete",
c,m)}),error:function(a){n._resolve([a],null,g,m,!0)}},{usePost:!0});return m},addType:function(a){var b=this.types;if(b){if(e.some(b,function(b){return b.id==a.id?!0:!1}))return!1;b.push(a)}else this.types=[a];return this._typesDirty=!0},deleteType:function(a){if(this._collection){var b=this.types;if(b){var c=-1;e.some(b,function(b,g){return b.id==a?(c=g,!0):!1});if(-1<c)return this._typesDirty=!0,b.splice(c,1)[0]}}},toJson:function(){var a=this._json;if(a=k.isString(a)?f.fromJson(a):k.clone(a)){var a=
a.layerDefinition?a:{layerDefinition:a},b=a.layerDefinition,c=this._collection;if(c&&this._typesDirty){b.types=e.map(this.types||[],function(a){return a.toJson()});var g=this.renderer,d=this.labelingInfo,m=b.drawingInfo;!g&&!d||m||(m=b.drawingInfo={});m&&g&&-1===g.declaredClass.indexOf("TemporalRenderer")&&(m.renderer=g.toJson());d&&(m.labelingInfo=e.map(d,function(a){return a.toJson()}))}g=null;if(!c||this._fcAdded)g={geometryType:b.geometryType,features:this._convertFeaturesToJson(this.graphics,
!0)};a.featureSet=k.mixin({},a.featureSet||{},g);a.featureSet.transform&&(d=a.featureSet.transform,delete a.featureSet.transform,g=new I(a.featureSet),g.quantize(d),a.featureSet=g.toJson());c&&(a.nextObjectId=this._nextId,b.capabilities=this.capabilities);return a}},onSelectionComplete:function(){},onSelectionClear:function(){},onBeforeApplyEdits:function(){},onEditsComplete:function(){},onQueryFeaturesComplete:function(){},onQueryRelatedFeaturesComplete:function(){},onQueryIdsComplete:function(){},
onQueryCountComplete:function(){},onQueryExtentComplete:function(){},onQueryAttachmentInfosComplete:function(){},onAddAttachmentComplete:function(){},onUpdateAttachmentComplete:function(){},onDeleteAttachmentsComplete:function(){},onCapabilitiesChange:function(){},onGDBVersionChange:function(){},onQueryLimitExceeded:function(){},onLabelingInfoChange:function(){},onFeatureReductionRendererChange:function(){},onFeatureReductionChange:function(){},_evalGeometryOperations:function(){var a=new h;setTimeout(k.hitch(this,
function(){this._isGeometryOperationsUsed()?L.enableGeometryOperations().always(function(){a.resolve()}):a.resolve()}),0);return a.promise},_isGeometryOperationsUsed:function(){var a=this.infoTemplate,b=this.renderer,c=this.labelingInfo;return a&&a.hasGeometryOperations&&a.hasGeometryOperations()||b&&b.hasGeometryOperations&&b.hasGeometryOperations()||e.some(c,function(a){return L.hasGeometryOperations(a.labelExpressionInfo&&a.labelExpressionInfo.expression)})?!0:!1},_forceIdentity:function(){var a=
new h,b=this,c,g=this._url&&this._url.path;c=g&&g.toLowerCase().indexOf("/rest/services");var d=this.editFieldsInfo,d=d&&(d.creatorField||d.editorField);(this.userIsAdmin||d)&&!this._getToken()&&-1<c&&u.id?(c=g.substring(0,c)+"/rest/info",t({url:c,content:{f:"json"},handleAs:"json",callbackParamName:"callback"}).then(function(a){if(a.owningSystemUrl)return u.id.checkSignInStatus(a.owningSystemUrl+"/sharing")}).then(function(a){if(a)return u.id.getCredential(g)}).then(function(a){a&&b._findCredential()}).always(function(){a.resolve()})):
a.resolve();return a.promise},_isSnapshotMode:function(){return this._mode?this._mode.isInstanceOf(T):!1},_checkMode:function(a){var b=this.geometryType,c=this.maxRecordCount;a=(a=a&&a.features&&a.features[0])&&a.attributes&&a.attributes.exceedslimit;this.mode===H.MODE_AUTO&&!this.isEditable()&&0===a&&(this.queryPagination||("esriGeometryPolyline"===b||"esriGeometryPolygon"===b||"esriGeometryMultipoint"===b||this.hasXYFootprint())&&c>=this.maxRecordCountForAuto||"esriGeometryPoint"===b&&c>=this.maxPointCountForAuto)&&
(this.currentMode=H.MODE_SNAPSHOT,this._mode=new T(this),this._autoSnapshot=!0)},_evalFetchMode:function(a){this.loaded&&(a&&this.isFeatureReductionEnabled()&&this._canCluster(a)?this._switchToSnapshotMode():this._switchToNormalMode())},_switchToSnapshotMode:function(){if(null==this._savedMode){var a=this.currentMode;a!==H.MODE_SNAPSHOT&&a!==H.MODE_STREAM&&a!==H.MODE_SELECTION&&(this._savedMode=this.mode,this._mode.suspend(),this._mode.destroy(),this.mode=this.currentMode=H.MODE_SNAPSHOT,this._mode=
new T(this),this.queryPagination=this._optQueryPagination&&this.advancedQueryCapabilities.supportsPagination,this.clearSelection(),(a=this.getMap())&&a.loaded&&(this._mode.initialize(a),this._mode.startup()))}},_switchToNormalMode:function(){if(null!=this._savedMode){this._mode.suspend();this._mode.destroy();this.mode=this._savedMode;this._savedMode=null;this.currentMode=H.MODE_ONDEMAND;this._mode=new Z(this);this.queryPagination=!1;this.clearSelection();var a=this.getMap();a&&a.loaded&&(this._mode.initialize(a),
this._mode.startup())}},_queryLimit:function(){var a=this,b=new h;this._limitPromise=b.promise;this._limitPromise.then(function(b){a._checkMode(b)});this._limitPromise.always(function(){a._limitPromise=null});setTimeout(function(){var c=new J,g=new R;g.statisticType="exceedslimit";g.maxPointCount=a.maxPointCountForAuto;g.maxRecordCount=a.maxRecordCountForAuto;g.maxVertexCount=a.maxVertexCountForAuto;g.outStatisticFieldName="exceedslimit";c.outStatistics=[g];a.queryFeatures(c).promise.then(function(a){b.resolve(a)},
function(a){b.reject(a)})},0)},_updateCaps:function(){var a=this._editable,b=k.trim(this.capabilities||""),c=e.map(b?b.split(","):[],k.trim),g=e.map(b?b.toLowerCase().split(","):[],k.trim),b=e.indexOf(g,"editing"),d,g={Create:e.indexOf(g,"create"),Update:e.indexOf(g,"update"),Delete:e.indexOf(g,"delete")};if(a&&-1===b)c.push("Editing");else if(!a&&-1<b){a=[b];for(d in g)-1<g[d]&&a.push(g[d]);a.sort();for(d=a.length-1;0<=d;d--)c.splice(a[d],1)}this.capabilities=c.join(",")},_counter:{value:0},_getUniqueId:function(){return this._counter.value++},
onSuspend:function(){this.inherited(arguments);this._toggleTime(!1);var a=this._mode;a&&a.suspend()},onResume:function(a){this.inherited(arguments);this._toggleTime(!0);var b=this._map,c=this._getRenderer();if(a.firstOccurrence){if(this._fixRendererFields(),this._updateRequiredFieldsFromLabelingInfo(),this._checkFields(),this.clearSelection(),this._evalFeatureReduction(),this.timeInfo&&!this._trackManager&&(this._trackIdField||c&&(c.latestObservationRenderer||c.trackRenderer))&&(this._trackManager=
new aa(this),this._trackManager.initialize(b),this._childLayer=this._trackManager.container),c&&"colors"in c&&"blurRadius"in c&&"maxPixelIntensity"in c&&"esriGeometryPoint"==this.geometryType&&!this._heatmapManager&&(this._heatmapManager=new ba(this),this._heatmapManager.initialize(b)),this._autoSnapshot&&this._autoGeneralize&&("esriGeometryPolyline"===this.geometryType||"esriGeometryPolygon"===this.geometryType||this.hasXYFootprint())&&!this.isEditable()&&null==this.getMaxAllowableOffset()&&(c=this.generalizeForScale,
this._calculatedScale=c=this.maxScale?this.maxScale:this.minScale?Math.min(c,this.minScale):Math.min(c,X.getScale(b,this.initialExtent)),this._calcMaxOffset=b.extent.getWidth()/b.width/b.getScale()*c),this._zoomConnect=p.connect(b,"onZoomEnd",this,this._zoomEndHandler),this._updateMaxOffset(),this._needsRefresh=!1,c=this._mode)c._init||c.initialize(b),c.startup()}else this._zoomEndHandler(),this._mode&&this._mode.resume()},_zoomEndHandler:function(){var a=this._map;this._updateMaxOffset();this._prevScale=
a.getScale();!this.suspended&&this._needsRefresh&&this.refresh()},_updateMaxOffset:function(){var a=this._map;a&&a.loaded&&this._autoGeneralize&&(this._autoSnapshot?(a=this.getMaxAllowableOffset(),this._setMaxOffset(this._getMaxOffsetForScale(),!0),this._needsRefresh||(this._needsRefresh=a!=this.getMaxAllowableOffset())):this._setMaxOffset(a.extent.getWidth()/a.width,!a.extent.spatialReference.isWebMercator()))},_getMaxOffsetForScale:function(){if(this._map){var a=this._map.getScale(),b=this._calculatedScale,
c=this._calcMaxOffset,g=this._prevScale;return a>=b&&(null==g||g<b)?c:a<b&&(null==g||g>=b)?null:this.getMaxAllowableOffset()}},_toggleTime:function(a){var b=this._map;a&&this.timeInfo&&this.useMapTime&&b?(this._mapTimeExtent=b.timeExtent,this._timeConnect||(this._timeConnect=p.connect(b,"onTimeExtentChange",this,this._timeChangeHandler))):(this._mapTimeExtent=null,p.disconnect(this._timeConnect),this._timeConnect=null)},_timeChangeHandler:function(a){this._mapTimeExtent=a;(a=this._mode)&&a.propertyChangeHandler(0)},
_getOffsettedTE:function(a){var b=this._timeOffset,c=this._timeOffsetUnits;return a&&b&&c?a.offset(-1*b,c):a},_getTimeOverlap:function(a,b){return a&&b?a.intersection(b):a||b},_getTimeFilter:function(a){var b=this.getTimeDefinition(),c;if(b&&(c=this._getTimeOverlap(b,null),!c))return[!1];if(a){if(a=c?this._getTimeOverlap(a,c):a,!a)return[!1]}else a=c;return[!0,a]},_getAttributeFilter:function(a){var b=this.getDefinitionExpression();return a?b?"("+b+") AND ("+a+")":a:b},_applyQueryFilters:function(a,
b){a.where=this._getAttributeFilter(a.where);a.returnGeometry&&null==a.maxAllowableOffset&&!a.quantizationParameters&&(a.maxAllowableOffset=this._maxOffset,a.quantizationParameters=this._quantizationParameters);b&&this.supportsAdvancedQueries&&(a.orderByFields=a.orderByFields||this.getOrderByFields());if(this.timeInfo){var c=this._getTimeFilter(a.timeExtent);if(c[0])a.timeExtent=c[1];else return!1}return!0},_add:function(a){var b=this._selectionSymbol,c=a.attributes,g=this.visibilityField;b&&this._isSelOnly&&
a.setSymbol(b);if(g&&c&&c.hasOwnProperty(g))a[c[g]?"show":"hide"]();return this.add.apply(this,arguments)},_remove:function(){return this.remove.apply(this,arguments)},_canDoClientSideQuery:function(a){var b=[],c=this._map,g;if((this._collection||!this._isTable&&c)&&!(a.text||a.where&&a.where!==this.getDefinitionExpression()||a.orderByFields&&a.orderByFields.length&&(g=this.getOrderByFields()||[])&&a.orderByFields.join()!==g.join()||a.outStatistics||a.returnDistinctValues)){g=this._isSnapshotMode();
var d=this._isSelOnly,m=a.geometry;if(m){if(d||a.spatialRelationship!==J.SPATIAL_REL_INTERSECTS||"extent"!==m.type||!g&&!c.extent.contains(m))return;b.push(1)}if(c=a.objectIds)if(g)b.push(2);else{var m=c.length,n=this._mode,h=0,f;for(f=0;f<m;f++)n._getFeature(c[f])&&h++;if(h===m)b.push(2);else return}if(this.timeInfo)if(a=a.timeExtent,c=this._mapTimeExtent,g)a&&b.push(3);else if(d){if(a)return}else if(c)if(-1!==e.indexOf(b,2))a&&b.push(3);else if(-1!==e.indexOf(b,1))a==c&&b.push(3);else return;else if(0<
b.length)a&&b.push(3);else if(a)return;return 0<b.length?b:null}},_getAbsMid:function(a){return r.toAbsMid?r.toAbsMid(a):l.id.replace(/\/[^\/]*$/ig,"/")+a},_doQuery:function(a,b,c){var g=[],d=this.objectIdField,m=this,n=new h,f=new h,u=this.graphics;if(-1!==e.indexOf(b,1)){var t=this.spatialIndex||this._map&&this._map.spatialIndex,x,w=a.geometry._normalize(null,!0);null==t&&ha.autoSpatialIndexing?x=(this._map||this).addPlugin(this._getAbsMid("../plugins/spatialIndex")).then(k.hitch(this,k.partial(this._getFromIndex,
w,t)),function(a){f.resolve(k.hitch(this,k.partial(this._filterByExtent,u,w)))}):t&&(x=this._getFromIndex(w,t));x?x.then(function(a){for(var b=0;b<a.length;b++)a[b].results&&(g=g.concat(a[b].results));f.resolve(g)}).otherwise(function(a){f.reject(a)}):f.resolve(this._filterByExtent(u,w))}else f.resolve(u);f.then(function(h){g=h;if(-1!==e.indexOf(b,2)){var f=a.objectIds;g=e.filter(g,function(a){return-1<e.indexOf(f,a.attributes[d])})}-1!==e.indexOf(b,3)&&m.timeInfo&&(h=a.timeExtent,g=m._filterByTime(g,
h.startTime,h.endTime).match);c&&(g=e.map(g,function(a){return a.attributes[d]},this));n.resolve(g)});return n},_getFromIndex:function(a,b){b=b||this.spatialIndex||this._map.spatialIndex;a instanceof Array||(a=[a]);var c=this.id;return m(e.map(a,function(a){return b.intersects(a,c)}))},_filterByExtent:function(a,b){for(var c=[],g=0,d=a.length;g<d;g++){var m=a[g],n=m.geometry;n&&(this.normalization&&b.length?(b[0].intersects(n)||b[1].intersects(n))&&c.push(m):b.intersects(n)&&c.push(m))}return c},
_filterByTime:function(a,b,c){var g=this._startTimeField,d=this._endTimeField,m;this._twoTimeFields||(m=g||d);var e=n.isDefined,h=[],f=[],u,t=a.length,x,k;b=b?b.getTime():-Infinity;c=c?c.getTime():Infinity;if(m)for(u=0;u<t;u++)x=a[u],k=x.attributes,g=k[m],g>=b&&g<=c?h.push(x):f.push(x);else for(u=0;u<t;u++)x=a[u],k=x.attributes,m=k[g],k=k[d],m=e(m)?m:-Infinity,k=e(k)?k:Infinity,m>=b&&m<=c||k>=b&&k<=c||b>=m&&c<=k?h.push(x):f.push(x);return{match:h,noMatch:f}},_getSizeVariables:function(a){return a&&
e.filter(a.getVisualVariablesForType("sizeInfo",!1),function(a){return!(!a.field&&!a.valueExpression)})},_needClientSideSorting:function(a){return this._collection?!(!a||!a.length):e.some(a,function(a){return!!a.valueExpression})},_sortFeatures:function(a){var b=this.renderer,c=this._getSizeVariables(b);if(a&&1<a.length&&this._needClientSideSorting(c)){var g=c[0],d=this;a.sort(function(a,c){a._layer||(a._layer=d);c._layer||(c._layer=d);var m=b._getDataValue(a,g,"sizeInfo",null,d),n=b._getDataValue(c,
g,"sizeInfo",null,d);return null==m?-1:null==n?1:n-m})}return a},_resolve:function(a,b,c,g,d){b&&this[b].apply(this,a);c&&c.apply(null,a);g&&y._resDfd(g,a,d)},_getShallowClone:function(a){var b=new J,c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},_query:function(a,b,c,g,d){var m=this,n=this._map,f=new h(y._dfdCanceller),u=c,t,x,k;if("executeRelationshipQuery"!==a){var u=this._getShallowClone(c),A=this.getOutFields();u.outFields||(u.outFields=A);u.outFields&&u.outFields.length&&(x=-1<e.indexOf(A,
"*")?!1:!e.every(u.outFields,function(a){return-1<e.indexOf(A,a)}));u.returnGeometry=c.hasOwnProperty("returnGeometry")?c.returnGeometry:!c.outStatistics;u.returnGeometry&&(u.multipatchOption=this.multipatchOption,null!=u.maxAllowableOffset||u.quantizationParameters)&&(c=null!=u.maxAllowableOffset?u.maxAllowableOffset:u.quantizationParameters.tolerance,null!=c&&c!==this.getMaxAllowableOffset()&&(k=!0));var C;n&&(n=n&&n.spatialReference,(c=u.outSpatialReference)?t=!c.equals(n):u.outSpatialReference=
new v(n.toJson()));if(!this._applyQueryFilters(u,"execute"===a&&!u.outStatistics)){switch(a){case "execute":C=new I({features:[]});break;case "executeForIds":C=[];break;case "executeForCount":C=0;break;case "executeForExtent":C={}}this._resolve([C],b,g,f);return f}if(n="executeForExtent"!==a&&!t&&!x&&!k&&this._canDoClientSideQuery(u))return f._pendingDfd=w(this._doQuery(u,n,"executeForIds"===a||"executeForCount"===a)),f._pendingDfd.then(function(c){switch(a){case "execute":C=new I;C.features=c;break;
case "executeForIds":C=c;break;case "executeForCount":C=c.length}m._resolve([C],b,g,f)}),f}if(this._collection)return this._resolve([Error("FeatureLayer::_query - "+this.invalidParams)],null,d,f,!0),f;if(this.loaded&&!this.isQueryable())return this._resolve([Error("Layer does not support query capability.")],null,d,f,!0),f;this._ts&&(u._ts=(new Date).getTime());(f._pendingDfd=this._task[a](u)).addCallbacks(function(c){var d=!!u.outStatistics||t||x||k;if("execute"===a||"executeRelationshipQuery"===
a){var n,e;if("execute"===a)for(n=c.features,e=n.length,--e;0<=e;e--){if(n[e]._layer=m,!d&&!m._isTable){var h=m._mode._getFeature(n[e].attributes[m.objectIdField]);h&&n.splice(e,1,h)}}else for(h in c)if(c.hasOwnProperty(h))for(n=c[h].features,e=n.length,--e;0<=e;e--)n[e]._layer=m}m._resolve([c],b,g,f)},function(a){m._resolve([a],null,d,f,!0)});return f},_convertFeaturesToJson:function(a,b,c,g){var d=[],m=this._selectionSymbol,n=this.visibilityField,h,u=this.objectIdField;this.loaded&&(c||g)&&(h=e.filter(this.fields,
function(a){return!1===a.editable&&(!g||a.name!==u)}));for(c=0;c<a.length;c++){var t=a[c],x={},w=t.geometry,A=t.attributes,C=t.symbol;!w||g&&this.loaded&&!this.allowGeometryUpdates||(x.geometry=w.toJson());n?(x.attributes=A=k.mixin({},A),A[n]=t.visible?1:0):A&&(x.attributes=k.mixin({},A));x.attributes&&h&&h.length&&e.forEach(h,function(a){delete x.attributes[a.name]});C&&C!==m&&(x.symbol=C.toJson());d.push(x)}return b?d:f.toJson(d)},_selectHandler:function(a,b,c,g,d){var m;switch(b){case H.SELECTION_NEW:this.clearSelection(!0);
m=!0;break;case H.SELECTION_ADD:m=!0;break;case H.SELECTION_SUBTRACT:m=!1}g=a.features;var n=this._mode,e=[],h=this.objectIdField,f,u;if(m)for(m=0;m<g.length;m++)f=g[m],u=f.attributes[h],f=n._addFeatureIIf(u,f),e.push(f),this._selectFeatureIIf(u,f,n);else for(m=0;m<g.length;m++)f=g[m],u=f.attributes[h],this._unSelectFeatureIIf(u,n),u=n._removeFeatureIIf(u),e.push(u||f);this._isSelOnly&&n._applyTimeFilter(!0);this._hasPartialSelectedFeatures=!!a.exceededTransferLimit;this._resolve([e,b,a.exceededTransferLimit?
{queryLimitExceeded:!0}:null],"onSelectionComplete",c,d);if(a.exceededTransferLimit)this.onQueryLimitExceeded()},_selectFeatureIIf:function(a,b,c){var g=this._selectedFeatures,d=g[a];d||(c._incRefCount(a),g[a]=b,this._isTable||(this._setSelectSymbol(b),b.attr("data-selected","")));return d||b},_unSelectFeatureIIf:function(a,b){var c=this._selectedFeatures[a];c&&(b._decRefCount(a),delete this._selectedFeatures[a],this._isTable||(this._setUnSelectSymbol(c),c.attr("data-selected")));return c},_isSelected:function(a){},
_setSelectSymbol:function(a){var b=this._selectionSymbol;b&&!this._isSelOnly&&a.setSymbol(b)},_setUnSelectSymbol:function(a){var b=this._selectionSymbol;b&&!this._isSelOnly&&b===a.symbol&&a.setSymbol(null,!0)},_getOutFields:function(){var a=[this.objectIdField,this.typeIdField,this.creatorField,this._startTimeField,this._endTimeField,this._trackIdField].concat(this._requiredFields).concat(this.dataAttributes),a=e.filter(a,function(a,b,c){return!!a&&e.indexOf(c,a)===b}),b=k.clone(this._outFields);
if(b){if(-1!==e.indexOf(b,"*"))return b;e.forEach(a,function(a){-1===e.indexOf(b,a)&&b.push(a)});return b}return a},_checkFields:function(a){var b=a||this._getOutFields();e.forEach(b,function(a){"*"!==a&&(this._getField(a)||console.debug("esri.layers.FeatureLayer: "+n.substitute({url:this.url,field:a},"unable to find '${field}' field in the layer 'fields' information [url: ${url}]")))},this);a||this._isTable||this._fserver||this._collection||this._isStream||e.some(this.fields,function(a){return a&&
"esriFieldTypeGeometry"===a.type?!0:!1})||console.debug("esri.layers.FeatureLayer: "+n.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}]"))},_fixFieldCase:function(a,b,c){var g=a&&a[b],d;if(g&&!k.isFunction(g)){if(d=!this._getField(g)&&this._getField(g,!0))g=a[b]=d.name;c&&c.push(g)}return g},_fixRendererFields:function(){var a=this.renderer;this._orderBy=
null;this._requiredFields=[];if(a&&0<this.fields.length){var b=[],c,a=e.filter([a,a.observationRenderer,a.latestObservationRenderer,a.trackRenderer],n.isDefined),g=[].concat(a);e.forEach(a,function(a){e.forEach(a.rendererInfos,function(a){a.renderer&&g.push(a.renderer)})});e.forEach(g,function(a){this._fixFieldCase(a,"attributeField",b);this._fixFieldCase(a,"attributeField2",b);this._fixFieldCase(a,"attributeField3",b);this._fixFieldCase(a.rotationInfo,"field",b);(c=this._fixFieldCase(a.sizeInfo,
"field",b))&&!this._orderBy&&(this._orderBy=[c+" DESC"]);this._fixFieldCase(a.sizeInfo,"normalizationField",b);this._fixFieldCase(a.colorInfo,"field",b);this._fixFieldCase(a.colorInfo,"normalizationField",b);this._fixFieldCase(a.field,"field",b);this._fixFieldCase(a.opacityInfo,"field",b);this._fixFieldCase(a.opacityInfo,"normalizationField",b);e.forEach(a.visualVariables,function(a){c=this._fixFieldCase(a,"field",b);"sizeInfo"===a.type&&c&&!this._orderBy&&(this._orderBy=[c+" DESC"]);this._fixFieldCase(a,
"normalizationField",b)},this);var g=e.map(a.getFieldsUsedInExpressions(),function(a){var b=this.getField(a);return b?b.name:a},this);b=b.concat(g);this._orderBy||!a.addBreak||k.isFunction(a.attributeField)||!a.backgroundFillSymbol&&!this._hasSizeDiff(a)||(this._orderBy=[a.attributeField+" DESC"])},this);this._requiredFields=e.filter(b,n.isDefined)}},_hasSizeDiff:function(a){var b=Number.MAX_VALUE,c=-Number.MAX_VALUE,g,d;e.forEach(a.infos,function(a){if(d=a.symbol){g=0;switch(d.type){case "simplemarkersymbol":g=
d.size;break;case "picturemarkersymbol":g=(d.width+d.height)/2;break;case "simplelinesymbol":case "cartographiclinesymbol":g=d.width;break;case "simplefillsymbol":case "picturefillsymbol":g=d.outline&&d.outline.width}g&&(b=Math.min(b,g),c=Math.max(c,g))}});return b!==Number.MAX_VALUE&&c!==-Number.MAX_VALUE&&1<Math.abs(c-b)},getOrderByFields:function(){var a=this.orderByFields||this._orderBy;return this.supportsAdvancedQueries&&a?e.filter(a,function(a){a=a.split(" ")[0];return!!this._getField(a,!0)},
this):null},_getField:function(a,b){var c=this.fields;if(!c||0===c.length)return null;var g;b&&(a=a.toLowerCase());e.some(c,function(c){var d=!1;(d=b?c&&c.name.toLowerCase()===a?!0:!1:c&&c.name===a?!0:!1)&&(g=c);return d});return g},_getDateOpts:function(){this._dtOpts||(this._dtOpts={properties:e.map(e.filter(this.fields,function(a){return!(!a||"esriFieldTypeDate"!==a.type)}),function(a){return a.name})});return this._dtOpts},_applyNormalized:function(a,b){a&&b&&e.forEach(a,function(a,c){a&&b[c]&&
a.setGeometry(b[c])})},_editHandler:function(a,b,c,g,d,m){d=a.addResults;var n=a.updateResults;a=a.deleteResults;var f,h,u,t,x,w=this.objectIdField,A=this._mode,C=this._isTable;f=this.editFieldsInfo;t=this.getOutFields()||[];var D=f&&f.creatorField,J=f&&f.creationDateField,l=f&&f.editorField,v=f&&f.editDateField;f=f&&f.realm;-1===e.indexOf(t,"*")&&(D&&-1===e.indexOf(t,D)&&(D=null),J&&-1===e.indexOf(t,J)&&(J=null),l&&-1===e.indexOf(t,l)&&(l=null),v&&-1===e.indexOf(t,v)&&(v=null));var E=J||v?(new Date).getTime():
null,y=D||l?this.getUserId():void 0;y&&f&&(y=y+"@"+f);if(d){var F=this.globalIdField;for(f=0;f<d.length;f++)d[f]=new P(d[f]),C||(h=d[f],h.success&&(u=h.objectId,t=b[f],(x=t._graphicsLayer)&&x!==this&&x.remove(t),x=t.attributes||{},x[w]=u,u=h.globalId,F&&u&&(x[F]=u),D&&(x[D]=y),l&&(x[l]=y),J&&(x[J]=E),v&&(x[v]=E),t.setAttributes(x),A._init&&A.drawFeature(t)))}if(n)for(f=0;f<n.length;f++)if(n[f]=new P(n[f]),!C&&(h=n[f],h.success)){u=h.objectId;t=c[u];if(b=A._getFeature(u))b.geometry!==t.geometry&&t.geometry&&
b.setGeometry(V.fromJson(t.geometry.toJson())),b.attributes!==t.attributes&&t.attributes&&b.setAttributes(k.mixin(b.attributes,t.attributes)),this._repaint(b,u);t=b||t;x=t.attributes||{};l&&(x[l]=y);v&&(x[v]=E);t.setAttributes(x)}if(a){c=[];for(f=0;f<a.length;f++)if(a[f]=new P(a[f]),!C&&(h=a[f],h.success&&(u=h.objectId,t=A._getFeature(u))))this._unSelectFeatureIIf(u,A)&&c.push(t),t._count=0,A._removeFeatureIIf(u);if(0<c.length)this.onSelectionComplete(c,H.SELECTION_SUBTRACT)}this._resolve([d,n,a],
"onEditsComplete",g,m)},_sendAttachment:function(a,b,c,g,d){var m=this;return t({url:this._url.path+"/"+b+"/"+("add"===a?"addAttachment":"updateAttachment"),form:c,content:k.mixin(this._url.query,{f:"json",token:this._getToken()||void 0}),callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(c){var d="add"===a?"onAddAttachmentComplete":"onUpdateAttachmentComplete";c=new P(c["add"===a?"addAttachmentResult":"updateAttachmentResult"]);c.attachmentId=c.objectId;c.objectId=b;m._resolve([c],
d,g);return c}).addErrback(function(a){m._resolve([a],null,d,null,!0)})},_repaint:function(a,b,c){b=n.isDefined(b)?b:a.attributes[this.objectIdField];b in this._selectedFeatures&&this._selectionSymbol||a.setSymbol(a.symbol,c)},_getKind:function(a){var b=this._trackManager;return b?b.isLatestObservation(a)?1:0:0}});k.mixin(H,{MODE_SNAPSHOT:0,MODE_ONDEMAND:1,MODE_SELECTION:2,SELECTION_NEW:3,SELECTION_ADD:4,SELECTION_SUBTRACT:5,MODE_AUTO:6,MODE_STREAM:7,POPUP_NONE:"esriServerHTMLPopupTypeNone",POPUP_HTML_TEXT:"esriServerHTMLPopupTypeAsHTMLText",
POPUP_URL:"esriServerHTMLPopupTypeAsURL"});W._createWrappers(H);b("extend-esri")&&k.setObject("layers.FeatureLayer",H,u);return H})},"esri/promiseList":function(){define(["dojo/_base/array","dojo/Deferred","dojo/when"],function(r,l,q){var p=r.forEach;return function(k){function e(b,c){d[c]=b;a.progress([b,c]);0===--g&&a.resolve(d)}var f,h;k instanceof Array?h=k:k&&"object"===typeof k&&(f=k);var d,b=[];if(f){h=[];for(var c in f)Object.hasOwnProperty.call(f,c)&&(b.push(c),h.push(f[c]));d={}}else h&&
(d=[]);if(!h||!h.length)return(new l).resolve(d);var a=new l;a.promise.always(function(){d=b=null});var g=h.length;p(h,function(c,g){f||b.push(g);q(c,function(c){a.isFulfilled()||e(c,b[g])},function(c){a.isFulfilled()||e(c,b[g])})});return a.promise}})},"esri/tasks/QueryTask":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/_base/json dojo/has ../kernel ../request ../deferredUtils ../geometry/Extent ../geometry/normalizeUtils ./Task ./FeatureSet".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g){r=r(a,{declaredClass:"esri.tasks.QueryTask",_eventMap:{complete:["featureSet"],"execute-for-count-complete":["count"],"execute-for-ids-complete":["objectIds"],"execute-relationship-query-complete":["featureSets"]},constructor:function(a,b){this._handler=l.hitch(this,this._handler);this._relationshipQueryHandler=l.hitch(this,this._relationshipQueryHandler);this._executeForIdsHandler=l.hitch(this,this._executeForIdsHandler);this._countHandler=l.hitch(this,this._countHandler);
this._extentHandler=l.hitch(this,this._extentHandler);this.source=b&&b.source;this.gdbVersion=b&&b.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},{n:"executeForExtent",c:3,a:[{i:0,p:["geometry"]}],e:2}],onComplete:function(){},onExecuteRelationshipQueryComplete:function(){},onExecuteForIdsComplete:function(){},onExecuteForCountComplete:function(){},
onExecuteForExtentComplete:function(){},execute:function(a,b,c,g,d){g=d.assembly;a=this._encode(l.mixin({},this._url.query,{f:"json"},a.toJson(g&&g[0])));var m=this._handler,n=this._errorHandler;this.source&&(g={source:this.source.toJson()},a.layer=k.toJson(g));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return h({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(a,g){m(a,g,b,c,d.dfd)},error:function(a){n(a,c,d.dfd)}},this.requestOptions)},executeRelationshipQuery:function(a,
b,c){a=this._encode(l.mixin({},this._url.query,{f:"json"},a.toJson()));var g=this._relationshipQueryHandler,m=this._errorHandler;this.gdbVersion&&(a.gdbVersion=this.gdbVersion);var e=new p(d._dfdCanceller);e._pendingDfd=h({url:this._url.path+"/queryRelatedRecords",content:a,callbackParamName:"callback",load:function(a,d){g(a,d,b,c,e)},error:function(a){m(a,c,e)}},this.requestOptions);return e},executeForIds:function(a,b,c,g){var d=g.assembly;a=this._encode(l.mixin({},this._url.query,{f:"json",returnIdsOnly:!0},
a.toJson(d&&d[0])));var m=this._executeForIdsHandler,n=this._errorHandler;this.source&&(d={source:this.source.toJson()},a.layer=k.toJson(d));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return h({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(a,d){m(a,d,b,c,g.dfd)},error:function(a){n(a,c,g.dfd)}},this.requestOptions)},executeForCount:function(a,b,c,g){var d=g.assembly;a=this._encode(l.mixin({},this._url.query,{f:"json",returnIdsOnly:!0,returnCountOnly:!0},a.toJson(d&&
d[0])));var m=this._countHandler,n=this._errorHandler;this.source&&(d={source:this.source.toJson()},a.layer=k.toJson(d));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return h({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(a,d){m(a,d,b,c,g.dfd)},error:function(a){n(a,c,g.dfd)}},this.requestOptions)},executeForExtent:function(a,b,c,g){var d=g.assembly;a=this._encode(l.mixin({},this._url.query,{f:"json",returnExtentOnly:!0,returnCountOnly:!0},a.toJson(d&&d[0])));
var m=this._extentHandler,n=this._errorHandler;this.source&&(d={source:this.source.toJson()},a.layer=k.toJson(d));this.gdbVersion&&(a.gdbVersion=this.gdbVersion);return h({url:this._url.path+"/query",content:a,callbackParamName:"callback",load:function(a,d){m(a,d,b,c,g.dfd)},error:function(a){n(a,c,g.dfd)}},this.requestOptions)},_handler:function(a,b,c,d,e){try{var m=new g(a);this._successHandler([m],"onComplete",c,e)}catch(y){this._errorHandler(y,d,e)}},_relationshipQueryHandler:function(a,b,c,d,
e){try{var m=a.geometryType,n=a.spatialReference,f={};q.forEach(a.relatedRecordGroups,function(a){var b={};b.geometryType=m;b.spatialReference=n;b.features=a.relatedRecords;b=new g(b);if(null!=a.objectId)f[a.objectId]=b;else for(var c in a)a.hasOwnProperty(c)&&"relatedRecords"!==c&&(f[a[c]]=b)});this._successHandler([f],"onExecuteRelationshipQueryComplete",c,e)}catch(v){this._errorHandler(v,d,e)}},_executeForIdsHandler:function(a,b,c,g,d){try{this._successHandler([a.objectIds],"onExecuteForIdsComplete",
c,d)}catch(A){this._errorHandler(A,g,d)}},_countHandler:function(a,b,c,g,d){try{var m,n=a.features,e=a.objectIds;if(e)m=e.length;else{if(n)throw Error("Unable to perform query. Please check your parameters.");m=a.count}this._successHandler([m],"onExecuteForCountComplete",c,d)}catch(v){this._errorHandler(v,g,d)}},_extentHandler:function(a,c,g,d,e){try{a.extent&&(a.extent=new b(a.extent)),this._successHandler([a],"onExecuteForExtentComplete",g,e)}catch(A){this._errorHandler(A,d,e)}}});c._createWrappers(r);
e("extend-esri")&&l.setObject("tasks.QueryTask",r,f);return r})},"esri/tasks/Task":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/json dojo/has ../kernel ../deferredUtils ../urlUtils ../Evented".split(" "),function(r,l,q,p,k,e,f,h){r=r(h,{declaredClass:"esri.tasks._Task",_eventMap:{error:["error"],complete:["result"]},constructor:function(d,b){d&&l.isString(d)&&(this._url=f.urlToObject(this.url=d));b&&b.requestOptions&&(this.requestOptions=b.requestOptions);this.normalization=!0;
this._errorHandler=l.hitch(this,this._errorHandler);this.registerConnectEvents()},_useSSL:function(){var d=this._url,b=/^http:/i;this.url&&(this.url=this.url.replace(b,"https:"));d&&d.path&&(d.path=d.path.replace(b,"https:"))},_encode:function(d,b,c){var a,g,e={},m,f;for(m in d)if("declaredClass"!==m&&(a=d[m],g=typeof a,null!==a&&void 0!==a&&"function"!==g))if(l.isArray(a))for(e[m]=[],f=a.length,g=0;g<f;g++)e[m][g]=this._encode(a[g]);else"object"===g?a.toJson&&(g=a.toJson(c&&c[m]),"esri.tasks.FeatureSet"===
a.declaredClass&&g.spatialReference&&(g.sr=g.spatialReference,delete g.spatialReference),e[m]=b?g:q.toJson(g)):e[m]=a;return e},_successHandler:function(d,b,c,a){b&&this[b].apply(this,d);c&&c.apply(null,d);a&&e._resDfd(a,d)},_errorHandler:function(d,b,c){this.onError(d);b&&b(d);c&&c.errback(d)},setNormalization:function(d){this.normalization=d},onError:function(){}});p("extend-esri")&&(k.Task=r);return r})},"esri/tasks/FeatureSet":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../graphic ../SpatialReference ../graphicsUtils ../geometry/jsonUtils ../symbols/jsonUtils".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c){r=r(null,{declaredClass:"esri.tasks.FeatureSet",constructor:function(a){if(a){l.mixin(this,a);var g=this.features,d=a.spatialReference,m=b.getGeometryType(a.geometryType),d=this.spatialReference=new h(d);this.geometryType=a.geometryType;a.fields&&(this.fields=a.fields);q.forEach(g,function(a,b){var n=a.geometry&&a.geometry.spatialReference;g[b]=new f(m&&a.geometry?new m(a.geometry):null,a.symbol&&c.fromJson(a.symbol),a.attributes);g[b].geometry&&!n&&g[b].geometry.setSpatialReference(d)});
this._hydrate()}else this.features=[]},displayFieldName:null,geometryType:null,spatialReference:null,fieldAliases:null,toJson:function(a){var c={};this.displayFieldName&&(c.displayFieldName=this.displayFieldName);this.fields&&(c.fields=this.fields);this.spatialReference?c.spatialReference=this.spatialReference.toJson():this.features[0]&&this.features[0].geometry&&(c.spatialReference=this.features[0].geometry.spatialReference.toJson());this.features[0]&&(this.features[0].geometry&&(c.geometryType=
b.getJsonType(this.features[0].geometry)),c.features=d._encodeGraphics(this.features,a));c.geometryType=c.geometryType||this.geometryType;c.exceededTransferLimit=this.exceededTransferLimit;c.transform=this.transform;return e.fixJson(c)},_hydrate:function(){var a=this.transform,b=this.geometryType;if(a&&b)for(var c=this.features,d=a.translate[0],e=a.translate[1],n=a.scale[0],f=a.scale[1],h=function(a,b,c){if("esriGeometryPoint"===a)return function(a){a.x=b(a.x);a.y=c(a.y)};if("esriGeometryPolyline"===
a||"esriGeometryPolygon"===a)return function(a){a=a.rings||a.paths;var g,d,m,n,e,f,h,u;g=0;for(d=a.length;g<d;g++)for(e=a[g],m=0,n=e.length;m<n;m++)f=e[m],0<m?(h+=f[0],u+=f[1]):(h=f[0],u=f[1]),f[0]=b(h),f[1]=c(u)};if("esriGeometryEnvelope"===a)return function(a){a.xmin=b(a.xmin);a.ymin=c(a.ymin);a.xmax=b(a.xmax);a.ymax=c(a.ymax)};if("esriGeometryMultipoint"===a)return function(a){a=a.points;var g,d,m,n,e;g=0;for(d=a.length;g<d;g++)m=a[g],0<g?(n+=m[0],e+=m[1]):(n=m[0],e=m[1]),m[0]=b(n),m[1]=c(e)}}(b,
function(a){return a*n+d},function(a){return e-a*f}),a=0,b=c.length;a<b;a++)c[a].geometry&&h(c[a].geometry);this.transform=null},quantize:function(a){if(!this.geometryType)return this.transform=null,this;var b=a.translate[0],c=a.translate[1],d=a.scale[0],e=a.scale[1],n=this.features,f=function(a,b,c){var g,d,m,n,e,f,h=[];g=0;for(d=a.length;g<d;g++)if(m=a[g],0<g){if(f=b(m[0]),m=c(m[1]),f!==n||m!==e)h.push([f-n,m-e]),n=f,e=m}else n=b(m[0]),e=c(m[1]),h.push([n,e]);return 0<h.length?h:null},h=function(a,
b,c){if("esriGeometryPoint"===a)return function(a){a.x=b(a.x);a.y=c(a.y);return a};if("esriGeometryPolyline"===a||"esriGeometryPolygon"===a)return function(a){var g,d,m,n,e;m=a.rings||a.paths;e=[];g=0;for(d=m.length;g<d;g++)n=m[g],(n=f(n,b,c))&&e.push(n);return 0<e.length?(a.rings?a.rings=e:a.paths=e,a):null};if("esriGeometryMultipoint"===a)return function(a){var g;g=f(a.points,b,c);return 0<g.length?(a.points=g,a):null};if("esriGeometryEnvelope"===a)return function(a){return a}}(this.geometryType,
function(a){return Math.round((a-b)/d)},function(a){return Math.round((c-a)/e)}),k,l;k=0;for(l=n.length;k<l;k++)n[k].geometry&&(h(n[k].geometry)||n[k].setGeometry(null));this.transform=a;return this}});p("extend-esri")&&l.setObject("tasks.FeatureSet",r,k);return r})},"esri/tasks/StatisticDefinition":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(r,l,q,p){r=r(null,{declaredClass:"esri.tasks.StatisticDefinition",toJson:function(){return{statisticType:this.statisticType,
onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount}}});q("extend-esri")&&l.setObject("tasks.StatisticDefinition",r,p);return r})},"esri/layers/FeatureType":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../lang ../symbols/jsonUtils ./RangeDomain ./CodedValueDomain ./InheritedDomain ./FeatureTemplate".split(" "),function(r,
l,q,p,k,e,f,h,d,b,c){r=r(null,{declaredClass:"esri.layers.FeatureType",constructor:function(a){if(a&&l.isObject(a)){this.id=a.id;this.name=a.name;var g=a.symbol;g&&(this.symbol=f.fromJson(g));var g=a.domains,e,m=this.domains={};for(e in g)if(g.hasOwnProperty(e)){var u=g[e];switch(u.type){case "range":m[e]=new h(u);break;case "codedValue":m[e]=new d(u);break;case "inherited":m[e]=new b(u)}}if(e=a.templates)for(g=this.templates=[],a=0;a<e.length;a++)g.push(new c(e[a]))}},toJson:function(){var a={id:this.id,
name:this.name,symbol:this.symbol&&this.symbol.toJson()},b,c=this.domains,d=this.templates,f=e.fixJson;if(c){var n=a.domains={};for(b in c)c.hasOwnProperty(b)&&(n[b]=c[b]&&c[b].toJson());f(n)}d&&(a.templates=q.map(d,function(a){return a.toJson()}));return f(a)}});p("extend-esri")&&l.setObject("layers.FeatureType",r,k);return r})},"esri/layers/FeatureTemplate":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../lang ../graphic".split(" "),function(r,l,q,p,k,e){r=r(null,{declaredClass:"esri.layers.FeatureTemplate",
constructor:function(f){f&&l.isObject(f)&&(this.name=f.name,this.description=f.description,this.drawingTool=f.drawingTool,this.thumbnail=f.thumbnail,f=f.prototype,this.prototype=new e(f.geometry,null,f.attributes))},toJson:function(){return k.fixJson({name:this.name,description:this.description,drawingTool:this.drawingTool,thumbnail:k.fixJson(l.clone(this.thumbnail)),prototype:this.prototype&&this.prototype.toJson()})}});l.mixin(r,{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"});q("extend-esri")&&l.setObject("layers.FeatureTemplate",r,p);return r})},"esri/layers/FeatureEditResult":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","../kernel"],function(r,l,q,p){r=r(null,{declaredClass:"esri.layers.FeatureEditResult",constructor:function(k){k&&l.isObject(k)&&(this.objectId=k.objectId,this.globalId=k.globalId,this.success=k.success,k.success||(k=k.error,this.error=
Error(),this.error.code=k.code,this.error.message=k.description))}});q("extend-esri")&&l.setObject("layers.FeatureEditResult",r,p);return r})},"esri/layers/SnapshotMode":function(){define("dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../SpatialReference ../srUtils ../tasks/query ./RenderMode ./support/ParallelSnapshot".split(" "),function(r,l,q,p,k,e,f,h,d){r=r([h],{declaredClass:"esri.layers._SnapshotMode",maxFeatures:5E4,constructor:function(b){this.featureLayer=b;this._featureMap={};this._hasPartialFeatures=
!1;this._drawFeatures=l.hitch(this,this._drawFeatures);this._queryErrorHandler=l.hitch(this,this._queryErrorHandler);this._handleSuccess=l.hitch(this,this._handleSuccess);this._handleError=l.hitch(this,this._handleError);this._handleProgress=l.hitch(this,this._handleProgress)},startup:function(){if(!this._started){this.inherited(arguments);var b=this.featureLayer,c=b.advancedQueryCapabilities,a=b.reHostedFS.test(b.url);this.pagination=b.queryPagination&&null!=b.maxRecordCount;this._tileQueriesAllowed=
a&&c&&c.supportsQueryWithResultType&&b.isFeatureReductionApplied();a&&this.pagination&&(this._parallelSnapshot=new d({layer:b,mode:this,queryTask:b._task}));b._collection?this._applyTimeFilter():this._fetchAll()}},propertyChangeHandler:function(b){this._init&&(b?this.featureLayer._collection?console.log("FeatureLayer: layer created by value (from a feature collection) does not support definition expressions and time definitions. Layer id \x3d "+this.featureLayer.id):this._fetchAll():this._applyTimeFilter())},
destroy:function(){this._cancelPendingRequest(this._pendingRequest);this._parallelSnapshot&&this._parallelSnapshot.destroy();this.inherited(arguments)},drawFeature:function(b){var c=b.attributes[this.featureLayer.objectIdField];this._addFeatureIIf(c,b);this._incRefCount(c)},resume:function(){this.propertyChangeHandler(0)},refresh:function(){var b=this.featureLayer;b._collection?(b._fireUpdateStart(),b._refresh(!0),b._fireUpdateEnd()):this._fetchAll()},hasAllFeatures:function(){return!this._hasPartialFeatures},
_fetchAll:function(){var b=this.featureLayer;b._collection||b.suspended||!b.isQueryable()||(b._fireUpdateStart(),this._clearIIf(),this._hasPartialFeatures=!1,this._parallelSnapshot?this._parallelSnapshot.fetch(this._createQuery()).then(this._handleSuccess,this._handleError,this._handleProgress):this._sendRequest())},_handleSuccess:function(b){this._hasPartialFeatures=b.hasPartialFeatures;this.featureLayer._fireUpdateEnd(null)},_handleError:function(b){this._queryErrorHandler(b)},_handleProgress:function(b){b.isError?
this.featureLayer._errorHandler(b.error):this._addFeatures(b.features)},_sendRequest:function(b){var c=this.featureLayer,a=this._createQuery();this.pagination&&(this._start=a.start=null==b?0:b,a.num=c.maxRecordCount);this._pendingRequest&&this._cancelPendingRequest(this._pendingRequest);this._pendingRequest=c._task.execute(a,this._drawFeatures,this._queryErrorHandler)},_drawFeatures:function(b){this._pendingRequest=null;var c=this.featureLayer,a=b.exceededTransferLimit,g=a&&!c._collection;b=this._checkMaxLimit(b.features);
var d=b.maxLimitReached;this._addFeatures(b.features);this.pagination&&g&&!d||(this._hasPartialFeatures=!!a,c._fireUpdateEnd(null,a?{queryLimitExceeded:!0}:null));g&&(this.pagination&&!d&&this._sendRequest(this._start+c.maxRecordCount),c.onQueryLimitExceeded())},_queryErrorHandler:function(b){this._pendingRequest=null;this._hasPartialFeatures=!0;var c=this.featureLayer;c._errorHandler(b);c._fireUpdateEnd(b)},_checkMaxLimit:function(b){var c=b?b.length:0,a=this.featureLayer.graphics.length+c,g=a>=
this.maxFeatures;if(g){var d=a-this.maxFeatures;d&&b.splice(c-d,d)}return{maxLimitReached:g,featuresDiscarded:a>this.maxFeatures,features:b}},_createQuery:function(){var b=this.featureLayer,c=new f;c.outFields=b.getOutFields();c.where=b.getDefinitionExpression()||"1\x3d1";c.returnGeometry=!0;c.outSpatialReference=e.createSpatialReference(this.map.spatialReference.toJson());c.timeExtent=b.getTimeDefinition();c.maxAllowableOffset=b._maxOffset;c.quantizationParameters=b._quantizationParameters;c.orderByFields=
b.supportsAdvancedQueries?b.getOrderByFields():null;c.multipatchOption=b.multipatchOption;b._ts&&(c._ts=(new Date).getTime());this._tileQueriesAllowed&&(c.resultType="tile");return c},_addFeatures:function(b){var c=this.featureLayer,a=c.objectIdField,g=b.length,d=c._selectedFeatures,m=c.mode===c.constructor.MODE_AUTO,e,n,f;c._fireUpdateStart();c._sortFeatures(b);for(c=0;c<g;c++)n=b[c],f=n.attributes[a],e=this._addFeatureIIf(f,n),this._incRefCount(f),m&&e!==n&&d[f]&&(e.setGeometry(n.geometry),e.setAttributes(n.attributes));
this._applyTimeFilter(!0)}});q("extend-esri")&&l.setObject("layers._SnapshotMode",r,p);return r})},"esri/layers/RenderMode":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/has","../kernel"],function(r,l,q,p,k){r=r(null,{declaredClass:"esri.layers._RenderMode",initialize:function(e){this.map=e;this._init=!0},startup:function(){this._started=!0},propertyChangeHandler:function(e){},destroy:function(){this._init=this._started=!1},drawFeature:function(e){},suspend:function(){},
resume:function(){},refresh:function(){},hasAllFeatures:function(){return!0},_incRefCount:function(e){(e=this._featureMap[e])&&e._count++},_decRefCount:function(e){(e=this._featureMap[e])&&e._count--},_getFeature:function(e){return this._featureMap[e]},_addFeatureIIf:function(e,f){var h=this._featureMap,d=h[e],b=this.featureLayer;d||(h[e]=f,b._add(f),f._count=0);return d||f},_removeFeatureIIf:function(e){var f=this._featureMap[e],h=this.featureLayer;if(f){if(f._count)return;delete this._featureMap[e];
h._remove(f)}return f},_clearIIf:function(){var e;e=this.featureLayer;var f=e.graphics,h=e._selectedFeatures,d=e.getSelectedFeatures().length,b=e.objectIdField;if(d)for(e=f.length-1;0<=e;e--){var d=f[e],c=d.attributes[b];c in h?d._count=1:(d._count=0,this._removeFeatureIIf(c))}else e.clear(),this._featureMap={}},_cancelPendingRequest:function(e){if(e)try{e.cancel()}catch(f){}},_toggleVisibility:function(e){var f=this.featureLayer,h=f.graphics,d=e?"show":"hide",b,c=h.length;e=e&&f._ager;for(b=0;b<
c;b++){var a=h[b];a[d]();e&&f._repaint(a)}},_applyTimeFilter:function(e){var f=this.featureLayer;if(f.timeInfo&&!f.suspended){e||f._fireUpdateStart();var h=f._trackManager;h&&h.clearTracks();var d=f.getTimeDefinition(),b=f._getOffsettedTE(f._mapTimeExtent);b?(b=f._getTimeOverlap(d,b))?(d=f._filterByTime(f.graphics,b.startTime,b.endTime),h&&h.addFeatures(d.match),q.forEach(d.match,function(b){var a=b._shape;b.visible||(b.show(),(a=b._shape)&&a._moveToFront());f._ager&&a&&f._repaint(b)}),q.forEach(d.noMatch,
function(b){b.visible&&b.hide()})):this._toggleVisibility(!1):(h&&h.addFeatures(f.graphics),this._toggleVisibility(!0));h&&(h.moveLatestToFront(),h.drawTracks());e||f._fireUpdateEnd()}}});p("extend-esri")&&l.setObject("layers._RenderMode",r,k);return r})},"esri/layers/support/ParallelSnapshot":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has dojo/Deferred ../../kernel".split(" "),function(r,l,q,p,k,e){r=r(null,{declaredClass:"esri.layers.support.ParallelSnapshot",layer:null,
mode:null,queryTask:null,batchSize:5,_query:null,_fetchDfd:null,_startPage:null,_lastPage:null,_maxPage:null,_requests:null,constructor:function(e){l.mixin(this,e);this._requests={};this._maxPage=Math.ceil(this.mode.maxFeatures/this.layer.maxRecordCount)},destroy:function(){this.cancel()},fetch:function(e){var f=new k;this.cancel(!0);this._query=e;this._fetchDfd=f;this._sendRequests();return f.promise},cancel:function(e){this._cancelPendingRequests(e);this._reset()},_reset:function(){this._startPage=
this._lastPage=null;this._requests={}},_sendRequests:function(e){var f=this._query,d=this.queryTask,b=this._requests,c=this.layer.maxRecordCount,a;e=null==e?1:e;a=e+this.batchSize-1;a>this._maxPage&&(a=this._maxPage);if(!(e>a))for(this._startPage=e,this._lastPage=a;e<=a;e++)f.start=(e-1)*c,f.num=c,b[e]=d.execute(f),b[e].then(l.hitch(this,this._handleSuccess,e)).otherwise(l.hitch(this,this._handleError,e))},_evalNextBatch:function(e){e===this._lastPage&&this._sendRequests(this._lastPage+1)},_handleSuccess:function(e,
h){h.exceededTransferLimit||this._cancelLaterRequests(e,!0);var d=this.mode._checkMaxLimit(h.features);this._fetchDfd.progress({features:d.features,isError:!1});d.maxLimitReached?((d=d.featuresDiscarded||this._hasRejectedRequests())||(d=!!this._getResult(this._getLastSuccessfulRequest()).exceededTransferLimit),this._resolveFetch(d)):(h.exceededTransferLimit&&this._evalNextBatch(e),this._evalResolution())},_handleError:function(e,h){var d=this._requests;d&&d[e]&&(1===e?this._rejectFetch(h):(this._evalNextBatch(e),
this._fetchDfd.progress({error:h,isError:!0}),this._evalResolution()))},_evalResolution:function(){this._hasPendingRequests()||this._resolveFetch(this._hasRejectedRequests())},_resolveFetch:function(e){this.cancel(!0);this._fetchDfd.resolve({hasPartialFeatures:e})},_rejectFetch:function(e){this.cancel(!0);this._fetchDfd.reject(e)},_getResult:function(e){return e&&e.dfd.results[0]},_hasPendingRequests:function(){return!!this._getPendingRequests().length},_getPendingRequests:function(){var e=this._requests,
h,d=[];for(h in e){var b=e[h];b.isFulfilled()||d.push({pageId:Number(h),dfd:b})}return d},_getLastSuccessfulRequest:function(){var e=this._getResolvedRequests(),h=-Infinity,d,e=q.filter(e,function(b){return!!this._getResult(b).features.length||1===b.pageId},this);q.forEach(e,function(b){b.pageId>h&&(h=b.pageId,d=b)});return d},_getResolvedRequests:function(){var e=this._requests,h,d=[];for(h in e){var b=e[h];b.isResolved()&&d.push({pageId:Number(h),dfd:b})}return d},_hasRejectedRequests:function(){var e=
this._getRejectedRequests(),h=this._getLastSuccessfulRequest(),d=this._getResult(h);d&&!d.exceededTransferLimit&&(e=q.filter(e,function(b){return b.pageId<=h.pageId}));return!!e.length},_getRejectedRequests:function(){var e=this._requests,h,d=[];for(h in e){var b=e[h];b.isRejected()&&d.push({pageId:Number(h),dfd:b})}return d},_cancelPendingRequests:function(e){this._cancelRequests(this._getPendingRequests(),e)},_cancelLaterRequests:function(e,h){var d=q.filter(this._getPendingRequests(),function(b){return b.pageId>
e});this._cancelRequests(d,h)},_cancelRequests:function(e,h){var d=this.mode,b=this._requests;q.forEach(e,function(c){h&&delete b[c.pageId];d._cancelPendingRequest(c.dfd)})}});p("extend-esri")&&l.setObject("layers.support.ParallelSnapshot",r,e);return r})},"esri/layers/OnDemandMode":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/has ../kernel ../geometry/Point ../tasks/query ./RenderMode ./GridLayout".split(" "),function(r,l,q,p,k,e,f,h,d,b){r=r([d],
{declaredClass:"esri.layers._OnDemandMode",constructor:function(b){this.featureLayer=b;this._featureMap={};this._hasPartialFeatures=!1;this._queryErrorHandler=q.hitch(this,this._queryErrorHandler)},initialize:function(c){this.inherited(arguments);var a=this.featureLayer,g=a._srInfo;this._gridLayer=new b(new f(g?g.valid[0]:c.extent.xmin,g?g.valid[1]:c.extent.ymax,c.spatialReference),{width:a._tileWidth,height:a._tileHeight},{width:c.width,height:c.height},g);this._cellMap={};this._gridLayer.setResolution(c.extent)},
startup:function(){this._started||(this.inherited(arguments),this._ioQueue=[],this.featureLayer.suspended||(this._zoomHandler(),this._enableConnectors()))},propertyChangeHandler:function(b){this._init&&(2>b?this._zoomHandler():console.log("FeatureLayer: layer in on-demand mode does not support time definitions. Layer id \x3d "+this.featureLayer.id+", Layer URL \x3d "+this.featureLayer.url))},destroy:function(){this._disableConnectors();this._processIOQueue(!0);this.inherited(arguments)},drawFeature:function(b){var a=
b.geometry,c=[];if(a){var c=this._gridLayer.getCellsInExtent("point"===a.type?{xmin:a.x,ymin:a.y,xmax:a.x,ymax:a.y}:a.getExtent(),!1).cells,a=this._cellMap,d,m,e=b.attributes[this.featureLayer.objectIdField],n,f,h;for(d=0;d<c.length;d++)m=c[d],n=m.latticeID,f=m.row,h=m.col,n?m=a[n]=a[n]||m:(a[f]=a[f]||{},m=a[f][h]=a[f][h]||m),m.features=m.features||[],m.features.push(b),this._addFeatureIIf(e,b),this._incRefCount(e)}},suspend:function(){this._init&&this._disableConnectors()},resume:function(){this._init&&
(this._enableConnectors(),this._zoomHandler())},refresh:function(){this._zoomHandler()},hasAllFeatures:function(){if(this._hasPartialFeatures)return!1;var b=!1,a=this._getCurrentCells(),g;for(g=0;g<a.length;g++)if(a[g].hasPartialFeatures){b=!0;break}return!b},_enableConnectors:function(){var b=this.map;this._zoomConnect=l.connect(b,"onZoomEnd",this,this._zoomHandler);this._panConnect=l.connect(b,"onPanEnd",this,this._panHandler);this._resizeConnect=l.connect(b,"onResize",this,this._panHandler)},_disableConnectors:function(){l.disconnect(this._zoomConnect);
l.disconnect(this._panConnect);l.disconnect(this._resizeConnect)},_zoomHandler:function(){this._processIOQueue(!0);var b=this.featureLayer,a=this.map;!b.suspended&&b.isQueryable()&&(b._fireUpdateStart(),this._clearIIf(),this._hasPartialFeatures=!1,(b=b._trackManager)&&b.clearTracks(),this._cellMap={},this._gridLayer.setResolution(a.extent),this._sendRequest())},_panHandler:function(b){if(this.featureLayer.isQueryable()){this.featureLayer._fireUpdateStart();var a=this.featureLayer._resized;b=a?b:null;
a&&this._gridLayer.setMapState(b,this.map.width,this.map.height);this._sendRequest(b)}},_sendRequest:function(b){this._exceeds=!1;var a=this.featureLayer,c=this.map;b=b||c.extent;c=this._gridLayer.getCellsInExtent(b,a.latticeTiling).cells;if(!a.isEditable())var d=this._cellMap,c=p.filter(c,function(a){if(a.lattice){if(d[a.latticeID])return!1}else if(d[a.row]&&d[a.row][a.col])return!1;return!0});var m=a.getOutFields(),e=a.getDefinitionExpression(),n=a._getOffsettedTE(a._mapTimeExtent),f=a.supportsAdvancedQueries?
a.getOrderByFields():null,k=this._ioQueue,l,q=this,v=this._drawFeatures,B,C;this._pending=this._pending||0;for(l=0;l<c.length;l++){B=c[l];C=new h;C.geometry=B.extent||B.lattice;C.outFields=m;C.where=e;a.latticeTiling&&B.extent&&(C.spatialRelationship=h.SPATIAL_REL_CONTAINS);C.returnGeometry=!0;C.timeExtent=n;a._ts&&(C._ts=(new Date).getTime());C.orderByFields=f;C.multipatchOption=a.multipatchOption;C.maxAllowableOffset=a._maxOffset;C.quantizationParameters=a._quantizationParameters;var F=a.advancedQueryCapabilities;
F&&F.supportsQueryWithResultType&&(C.resultType="tile");this._pending++;k.push(a._task.execute(C,function(){var a=B;return function(b){v.apply(q,[b,a])}}.call(this),this._queryErrorHandler))}this._removeOldCells(b);this._endCheck()},_drawFeatures:function(b,a){a.hasPartialFeatures=!!b.exceededTransferLimit;this._exceeds=this._exceeds||b.exceededTransferLimit;this._finalizeIO();var c=this.featureLayer,d=this.map.extent,m=a.extent,e=a.row,n=a.col,f=c.objectIdField,h=b.features,k=this._gridLayer,l=this._cellMap,
v=a.latticeID,p=v?l[v]:l[e]&&l[e][n];if(a.resolution==k._resolution&&(v?v===k.getLatticeID(d):k.intersects(m,d)))if(p)c._sortFeatures(h),this._updateCell(p,h);else for(c._sortFeatures(h),a.features=h,v?l[v]=a:(l[e]=l[e]||{},l[e][n]=a),d=h.length,c=0;c<d;c++)m=h[c],e=m.attributes[f],this._addFeatureIIf(e,m),this._incRefCount(e);else p&&this._removeCell(e,n,v);this._endCheck()},_queryErrorHandler:function(b){this._finalizeIO();this._hasPartialFeatures=!0;this.featureLayer._errorHandler(b);this._endCheck(!0)},
_finalizeIO:function(){this._pending--},_endCheck:function(b){if(0===this._pending){this._processIOQueue();var a=this.featureLayer,c=a._trackManager;c&&(c.clearTracks(),c.addFeatures(a.graphics),a._ager&&p.forEach(a.graphics,function(b){b._shape&&a._repaint(b)}),c.moveLatestToFront(),c.drawTracks());this.featureLayer._fireUpdateEnd(b&&Error("FeatureLayer: an error occurred while updating the layer"),this._exceeds?{queryLimitExceeded:!0}:null);if(this._exceeds)a.onQueryLimitExceeded()}},_processIOQueue:function(b){this._ioQueue=
p.filter(this._ioQueue,function(a){return-1<a.fired?!1:!0});b&&p.forEach(this._ioQueue,this._cancelPendingRequest)},_getCurrentCells:function(b){var a=[];b=b||this._cellMap;for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];d&&(d.hasOwnProperty("row")||d.hasOwnProperty("latticeID")?a.push(d):"object"===typeof d&&a.push.apply(a,this._getCurrentCells(d)))}return a},_removeOldCells:function(b){var a=this._cellMap,c=this._gridLayer,d,e;for(d in a)if(a[d]){var f=a[d],n=f.latticeID,h=0,k=0;if(n)h++,n!==
c.getLatticeID(b)&&(this._removeCell(null,null,n),k++);else for(e in f)f[e]&&(h++,c.intersects(f[e].extent,b)||(this._removeCell(d,e),k++));k===h&&delete a[d]}},_updateCell:function(b,a){var c=this.featureLayer,d=c.objectIdField,c=c._selectedFeatures,e,f=a.length;b.features=b.features||[];for(e=0;e<f;e++){var n=a[e],h=n.attributes[d],k=this._addFeatureIIf(h,n);k===n?(this._incRefCount(h),b.features.push(k)):h in c||(k.setGeometry(n.geometry),k.setAttributes(n.attributes))}},_removeCell:function(b,
a,g){var c=this._cellMap,d=this.featureLayer,e=d.objectIdField,n=g?c[g]:c[b]&&c[b][a];if(n)for(g?delete c[g]:delete c[b][a],b=n.features,a=0;a<b.length;a++)g=b[a].attributes[e],this._decRefCount(g),g in d._selectedFeatures||this._removeFeatureIIf(g)}});k("extend-esri")&&q.setObject("layers._OnDemandMode",r,e);return r})},"esri/layers/GridLayout":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../kernel ../SpatialReference ../geometry/Extent ../geometry/Polyline ../srUtils".split(" "),
function(r,l,q,p,k,e,f,h,d){r=r(null,{declaredClass:"esri.layers._GridLayout",constructor:function(b,c,a,g){this.origin=b;this.cellWidth=c.width;this.cellHeight=c.height;this.mapWidth=a.width;this.mapHeight=a.height;this.srInfo=g},setResolution:function(b){this._resolution=(b.xmax-b.xmin)/this.mapWidth;this.srInfo&&(b=Math.round(Math.round(2*this.srInfo.valid[1]/this._resolution)/this.cellWidth),this._frameStats=[b,0,b-1])},setMapState:function(b,c,a){this.mapWidth=c;this.mapHeight=a;this.setResolution(b)},
getCellCoordinates:function(b){var c=this._resolution,a=this.origin;return{row:Math.floor((a.y-b.y)/(this.cellHeight*c)),col:Math.floor((b.x-a.x)/(this.cellWidth*c))}},normalize:function(b){var c=this._frameStats;if(c){var a=c[0],g=c[1],c=c[2];b<g?(b%=a,b=b<g?b+a:b):b>c&&(b%=a)}return b},intersects:function(b,c){var a=this.srInfo;return a?q.some(c._getParts(a),function(a){return b.intersects(a.extent)}):b.intersects(c)},getCellExtent:function(b,c){var a=this._resolution,g=this.origin,e=this.cellWidth,
m=this.cellHeight;return new f(c*e*a+g.x,g.y-(b+1)*m*a,(c+1)*e*a+g.x,g.y-b*m*a,d.createSpatialReference(g.spatialReference.toJson()))},getLatticeID:function(b){var c=this.getCellCoordinates({x:b.xmin,y:b.ymax}),a=this.getCellCoordinates({x:b.xmax,y:b.ymin});b=c.row;var g=a.row,c=this.normalize(c.col),a=this.normalize(a.col);return b+"_"+g+"_"+c+"_"+a},sorter:function(b,c){return b<c?-1:1},getCellsInExtent:function(b,c){var a=this.getCellCoordinates({x:b.xmin,y:b.ymax}),g=this.getCellCoordinates({x:b.xmax,
y:b.ymin}),d=a.row,e=g.row,a=a.col,g=g.col,f=[],n,t,k,l=[],p=[],v,B,C,F,D=[];for(n=d;n<=e;n++)for(t=a;t<=g;t++)k=this.normalize(t),b=this.getCellExtent(n,k),q.some(f,function(a){return a.row===n&&a.col===k})||f.push({row:n,col:k,extent:b,resolution:this._resolution}),c&&(l.push(b.xmin,b.xmax),p.push(b.ymin,b.ymax));a=this.normalize(a);g=this.normalize(g);l.sort(this.sorter);p.sort(this.sorter);t=l.length;for(n=t-1;0<=n;n--)n<t-1&&l[n]===l[n+1]&&l.splice(n,1);t=p.length;for(n=t-1;0<=n;n--)n<t-1&&p[n]===
p[n+1]&&p.splice(n,1);if(l.length&&p.length){v=l[0];B=l[l.length-1];C=p[0];F=p[p.length-1];t=l.length;for(n=0;n<t;n++)D.push([[l[n],F],[l[n],C]]);t=p.length;for(n=0;n<t;n++)D.push([[v,p[n]],[B,p[n]]]);l=new h({paths:D,spatialReference:this.origin.spatialReference.toJson()});f.push({latticeID:d+"_"+e+"_"+a+"_"+g,lattice:l,resolution:this._resolution})}return{minRow:d,maxRow:e,minCol:a,maxCol:g,cells:f}}});p("extend-esri")&&l.setObject("layers._GridLayout",r,k);return r})},"esri/layers/SelectionMode":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/has","../kernel","./RenderMode"],function(r,l,q,p,k){r=r([k],{declaredClass:"esri.layers._SelectionMode",constructor:function(e){this.featureLayer=e;this._featureMap={}},propertyChangeHandler:function(e){this._init&&0===e&&this._applyTimeFilter()},resume:function(){this.propertyChangeHandler(0)},hasAllFeatures:function(){return!this.featureLayer._hasPartialSelectedFeatures}});q("extend-esri")&&l.setObject("layers._SelectionMode",r,p);return r})},"esri/layers/StreamMode":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/Deferred dojo/has ../kernel ../SpatialReference ../tasks/query ../tasks/QueryTask ../geometry/jsonUtils ./RenderMode".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c){r=r([c],{declaredClass:"esri.layers._StreamMode",constructor:function(a,b){this.featureLayer=a;this._featureMap={};this._setRefreshRate();this._drawBuffer={adds:[],updates:[]};this._timeoutId=null;this._flushDrawBuffer=l.hitch(this,this._flushDrawBuffer);this._featuresByTime={};this._lastEndTimeCheck=null;this._maxFeatureAge=0;a.purgeOptions&&a.purgeOptions.age&&"number"===typeof a.purgeOptions.age&&(this._maxFeatureAge=1E3*Math.ceil(60*a.purgeOptions.age));this._drawFeatures=
l.hitch(this,this._drawFeatures);this._queryErrorHandler=l.hitch(this,this._queryErrorHandler)},startup:function(){this._started||this.inherited(arguments)},propertyChangeHandler:function(a){this._init&&(0===a?this._applyTimeFilter():3===a?this._redrawAllTracks():console.debug("StreamLayer: Stream Layer only supports changing map time or maximumTrackPoints. Layer id \x3d "+this.featureLayer.id))},destroy:function(){this.inherited(arguments);clearTimeout(this._timeoutId);this._featuresByTime=this._drawBuffer=
this._featureMap=null},drawFeature:function(a){var b=this.featureLayer,c=b.objectIdField;this._timeoutId||(this._timeoutId=setTimeout(this._flushDrawBuffer,this._refreshRate));b._joinField&&this._getFeature(a.attributes[c])?this._drawBuffer.updates.push({oid:a.attributes[c],updates:a}):this._drawBuffer.adds.push(a)},resume:function(){this.propertyChangeHandler(0)},refresh:function(){this._pendingRequest&&this._cancelPendingRequest(this._pendingRequest);var a=this.featureLayer;a&&(a._relatedUrl||a._keepLatestUrl?
(a._fireUpdateStart(),a._refreshing=!0,a.disconnect(),a.clear(),a._relatedQueried=!1,a._keepLatestQueried=!1,a.connect()):(a._fireUpdateStart(),a.clear(),a._fireUpdateEnd()))},_drawFeatures:function(a,b){var c=this.featureLayer;c._create(a.features||[]);c._fireUpdateEnd(null,b)},_applyTimeFilter:function(a){this.inherited(arguments);this._redrawAllTracks()},_removeFeatures:function(a){var b=this.featureLayer,c=b.objectIdField;a&&q.forEach(a,function(a){a=a.attributes[c];b._unSelectFeatureIIf(a,this);
this._decRefCount(a);this._removeFeatureIIf(a)},this)},_addFeatures:function(a){var b=this.featureLayer,c=b._endTimeField,d=b._startTimeField,e,n,f,h=[],k=[],l=[];e=b._trackManager;n=b.objectIdField;if(e)for(f in a=e.addFeatures(a),a)a.hasOwnProperty(f)&&(h.push(f),a[f].adds&&(k=k.concat(a[f].adds)),a[f].deletes&&(l=l.concat(a[f].deletes)));else k=a;q.forEach(k,function(a){var b=a.attributes[n],g;g=c&&a.attributes[c];!g&&this._maxFeatureAge&&(g=d&&a.attributes[d]?a.attributes[d]+this._maxFeatureAge:
Date.now()+this._maxFeatureAge);g&&(g=1E3*Math.ceil(g/1E3),this._featuresByTime[g]?this._featuresByTime[g].push(b):this._featuresByTime[g]=[b]);this._addFeatureIIf(b,a);this._incRefCount(b)},this);l.length&&this._removeFeatures(l);e&&e.refreshTracks(h)},_updateFeatures:function(a){var b=this.featureLayer,c,d,e=[];c=b._trackManager;d=b._trackIdField;q.forEach(a,function(a){var g=a.updates;a=this._getFeature(a.oid);var m;if(a){g.geometry&&a.setGeometry(g.geometry);g=g.attributes||{};for(m in g)g.hasOwnProperty(m)&&
(a.attributes[m]=g[m]);a.setAttributes(a.attributes);a.visible=this._checkFeatureTimeIntersects(a);c&&a.attributes[d]?e.push(a.attributes[d]):b._repaint(a,null,!0)}},this);e.length&&c.refreshTracks(e)},_redrawAllTracks:function(){var a=this.featureLayer._trackManager,b;a&&(b=a.trimTracks())&&0<b.length&&(this._removeFeatures(b),a.refreshTracks())},_flushDrawBuffer:function(){clearTimeout(this._timeoutId);var a=this._drawBuffer,b=a.adds.splice(0,a.adds.length),c=a.updates.splice(0,a.updates.length),
a=this.featureLayer;if(!a)return!1;a.updating||a._fireUpdateStart();this._addFeatures(b);this._updateFeatures(c);(b=this._getExpiredFeatures())&&b.length&&(this._removeFeatures(b),a._trackManager&&a._trackManager.removeFeatures(b));a._purge();a._fireUpdateEnd();this._timeoutId=null},_clearDrawBuffer:function(){var a=this._timeoutId,b=this._drawBuffer,c=b.adds,b=b.updates;a&&clearTimeout(a);c.splice(0,c.length);b.splice(0,b.length);this._timeoutId=null},_clearTimeBin:function(){this._featuresByTime=
{};this._lastEndTimeCheck=1E3*Math.ceil(Date.now()/1E3)},_clearFeatureMap:function(){this._featureMap={}},_setRefreshRate:function(a){a=a||0===a?a:200;0>a&&(a=200);this._refreshRate=a},_checkFeatureTimeIntersects:function(a){var b=this.featureLayer,c=b.getMap();return(c=c?c.timeExtent:null)&&b.timeInfo&&(b.timeInfo.startTimeField||b.timeInfo.endTimeField)?0<b._filterByTime([a],c.startTime,c.endTime).match.length:!0},_fetchArchive:function(a){var c=new p,e=this.featureLayer,m,u,n,k,l;this._pendingRequest&&
this._cancelPendingRequest(this._pendingRequest);e._fireUpdateStart();a&&this.map?(a=new d(a),m=new h,u=this.map,n=e.getFilter()||{},k=n.where||"1\x3d1",l=n.geometry?b.fromJson(n.geometry):null,n=n.outFields?n.outFields.split(","):["*"],m.geometry=l,m.where=k,m.outFields=n,m.returnGeometry=!0,m.outSpatialReference=new f(u.spatialReference.toJson()),this._pendingRequest=a.execute(m).then(function(a){this._pendingRequest=null;var b=this._fixFieldNameCasing(e,a);a.features=b;this._drawFeatures(a);e._fireUpdateEnd();
c.resolve()}.bind(this)).otherwise(function(a){this._pendingRequest=null;e._errorHandler(a);e._fireUpdateEnd(a);c.reject(a)}.bind(this))):c.resolve();return c.promise},_queryErrorHandler:function(a){var b=this.featureLayer;b._errorHandler(a);b._fireUpdateEnd(a)},_fixFieldNameCasing:function(a,b){var c=b.features||[],d=b.fields;if(!d||!c.length)return c;for(var d=this._mapFieldNameDifferences(a.fields,d),g=[],e,f,h=0,k=b.features.length;h<k;h++)e=c[h],f=this._swizzleResponseAttributes(e.attributes,
d),g.push({geometry:e.geometry,attributes:f});return g},_mapFieldNameDifferences:function(a,b){var c=[],d={},g,e;g=0;for(e=b.length;g<e;g++)c.push(b[g].name);g=0;for(e=a.length;g<e;g++){var f=a[g].name,h=this._checkForStreamFieldName(f,c);h&&(d[h]=f)}return d},_checkForStreamFieldName:function(a,b){for(var c=a.toLowerCase(),d,g=0,e=b.length;g<e;g++)if(b[g].toLowerCase()===c){d=b[g];break}return d},_swizzleResponseAttributes:function(a,b){var c={},d;for(d in a)if(a.hasOwnProperty(d)){var g=a[d];b.hasOwnProperty(d)?
c[b[d]]=g:c[d]=g}return c},_getExpiredFeatures:function(){var a,b,c,d=[],e=[];if(!this.featureLayer._endTimeField&&!this._maxFeatureAge)return e;a=1E3*Math.floor(this._lastEndTimeCheck/1E3);this._lastEndTimeCheck=b=1E3*Math.ceil(Date.now()/1E3);if(a&&a!==b)for(c=this._featuresByTime;a<=b;a+=1E3)c[a]&&(d=d.concat(c[a]),delete c[a]);q.forEach(d,function(a){(a=this._getFeature(a))&&e.push(a)},this);return e}});k("extend-esri")&&l.setObject("layers._StreamMode",r,e);return r})},"esri/layers/TrackManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has dojo/dom-construct dojox/gfx ../kernel ../graphic ../geometry/Polyline ./GraphicsLayer".split(" "),
function(r,l,q,p,k,e,f,h,d,b){var c=-1!==e.renderer.toLowerCase().indexOf("canvas");r=r(null,{declaredClass:"esri.layers._TrackManager",constructor:function(a){this.layer=a;this.trackMap={};this.trackLineMap={}},initialize:function(a){this.map=a;var d=this.layer,e=d._getRenderer(),e=e&&e.trackRenderer;if("esriGeometryPoint"===d.geometryType){var m=this.container=new b._GraphicsLayer({id:d.id+"_tracks",_child:!0,visible:d.visible,minScale:d.minScale,maxScale:d.maxScale});m.loaded=!0;m.onLoad(m);m._setMap(a,
d._div);if(!c){a=m._div.getNode();var f=d._div.getNode();a&&f&&k.place(a,f,"first")}m.setRenderer(e);d.on("visibility-change",l.hitch(this,function(a){this.container.setVisibility(a.visible);this.container.evaluateSuspension()}));d.on("scale-range-change",l.hitch(this,function(){this.container.setScaleRange(this.layer.minScale,this.layer.maxScale)}))}},addFeatures:function(a){var b=this.trackMap,c=this.layer,d=c._trackIdField,e=[];q.forEach(a,function(a){var c=a.attributes[d];(b[c]=b[c]||[]).push(a);
-1===q.indexOf(e,c)&&e.push(c)});var n=c._startTimeField,f=c.objectIdField,h=function(a,b){var c=a.attributes[n],d=b.attributes[n];return c===d?a.attributes[f]<b.attributes[f]?-1:1:c<d?-1:1};q.forEach(e,function(a){b[a].sort(h)})},trimTracks:function(a){function b(a){for(a=c[a]||[];a.length>d;)e.push(a.shift())}var c=this.trackMap,d=this.layer.maximumTrackPoints||0,e=[],n;if(!d)return e;if(a)q.forEach(a,function(a){b(a)});else for(n in c)c.hasOwnProperty(n)&&b(n);return e},drawTracks:function(a){function b(a){var b=
f[a],g,m,u;m=c.trackLineMap[a];e.remove(m);delete c.trackLineMap[a];m=null;if(!b||2>b.length)return!1;m=[];for(g=b.length-1;0<=g;g--)(u=b[g].geometry)&&m.push([u.x,u.y]);b={};b[k]=a;1<m.length&&(m=new h(new d({paths:[m],spatialReference:n}),null,b),e.add(m),c.trackLineMap[a]=m)}var c=this,e=this.container,f,n,k,l;if(e)if(f=this.trackMap,n=this.map.spatialReference,k=this.layer._trackIdField,a)q.forEach(a,function(a){b(a)});else for(l in f)f.hasOwnProperty(l)&&b(l)},refreshTracks:function(a){function b(a){var b,
g;c.drawTracks([a]);if(n&&n.latestObservationRenderer)for(a=d[a]||[],b=a.length,g=0;g<b;g++)e._repaint(a[g],null,!0)}var c=this,d=this.trackMap,e=this.layer,n=e._getRenderer(),f;if(a)q.forEach(a,function(a){b(a)});else for(f in d)d.hasOwnProperty(f)&&b(f);this.moveLatestToFront()},moveLatestToFront:function(a){q.forEach(this.getLatestObservations(a),function(a){var b=a._shape;b&&b._moveToFront();this._repaint(a,null,!0)},this.layer)},getLatestObservations:function(a){function b(a){a=e[a];return a[a.length-
1]}var c=[],d=this.layer._getRenderer(),e=this.trackMap,f;if(!d.latestObservationRenderer)return c;if(a)q.forEach(a,function(a){c.push(b(a))});else for(f in e)e.hasOwnProperty(f)&&c.push(b(f));return c},clearTracks:function(a){var b=this.getLatestObservations(a),c=this.container,d;a?q.forEach(a,function(a){delete this.trackMap[a];c&&(d=this.trackLineMap[a],c.remove(d),delete this.trackLineMap[a])},this):(this.trackMap={},this.trackLineMap={},c&&c.clear());q.forEach(b,function(a){this._repaint(a,null,
!0)},this.layer)},isLatestObservation:function(a){var b=this.trackMap[a.attributes[this.layer._trackIdField]];return b?b[b.length-1]===a:!1},destroy:function(){var a=this.container;a&&(a.clear(),a._unsetMap(this.map,this.layer._div));this.map=this.layer=this.trackMap=this.container=null}});p("extend-esri")&&l.setObject("layers._TrackManager",r,f);return r})},"esri/layers/HeatmapManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/_base/array require ../kernel ../sniff ../geometry/Point ../geometry/webMercatorUtils ./MapImage ../renderers/HeatmapRenderer ../tasks/query dojo/_base/fx".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g){function w(){}function m(a){var b=a.layer;return{geometry:a.geometry,attributes:a.attributes,getLayer:function(){return b}}}r=r(null,{declaredClass:"esri.layers.HeatmapManager",heatmapRenderer:null,sourceLayer:null,imageLayer:null,useTiles:!0,useWorker:!1,map:null,constructor:function(a){this.sourceLayer=a;this._hndls=[]},initialize:function(a){this.map=a;var b=this.sourceLayer,d=b.renderer;b.setDrawMode(!1);this.imageLayer=a._getMapImageLyr();var g=this;this.heatmapRenderer=
d instanceof c?d:(d.getRendererInfoByZoom(a.getZoom())||d.getRendererInfoByScale(a.getScale())).renderer;this._setupDraw=this._setupDraw.bind(this);this.recalculateHeatmap=this.recalculateHeatmap.bind(this);this._removeRenderer=this._removeRenderer.bind(this);this._handleRendererChange=this._handleRendererChange.bind(this);this._rendererChangeHandle=this.sourceLayer.on("renderer-change",this._handleRendererChange);this._handleOpacityChange=this._handleOpacityChange.bind(this);this._reprojectFeature=
this._reprojectFeature.bind(this);k(["../workers/heatmapCalculator"],function(a){g._calculator=new a(l.mixin({width:g.map.width,height:g.map.height},g._getOptions()));g._setupRenderer();g.heatmapRenderer.getStats=a.calculateStats;g.heatmapRenderer.getHistogramData=a.getHistogramData})},destroy:function(){this._removeHandlers();this._rendererChangeHandle&&this._rendererChangeHandle.remove();this._rendererChangeHandle=this.sourceLayer=this.imageLayer=this.map=this.heatmapRenderer=this._hndls=null},
_handleRendererChange:function(a){var b=a.renderer,d=b instanceof c;this.heatmapRenderer?d?this.heatmapRenderer=b:this._removeRenderer(a):d&&(this.heatmapRenderer=b,this.sourceLayer&&this.map&&this._setupRenderer())},_handleOpacityChange:function(a){a=a.opacity;var b=this._getImageBySourceId(this.sourceLayer.id);b&&b.setOpacity(a)},_setupRenderer:function(){var a=this._hndls,b=this.sourceLayer,c=this.map,d=this;b._originalDraw=b._draw;b._draw=w;b._div.clear();clearTimeout(this._resetTimer);this._resetTimer=
setTimeout(this._resetGraphics.bind(this),250);a.push(b.on("update-end",this._setupDraw));a.push(b.on("suspend",function(a){(a=d._getImageBySourceId(d.sourceLayer.id))&&a.hide()}));a.push(b.on("resume",function(a){(a=d._getImageBySourceId(d.sourceLayer.id))&&a.show()}));a.push(q.after(b,"redraw",this._setupDraw));a.push(c.on("layer-remove",function(a){a.layer==b&&((a=d._getImageBySourceId(d.sourceLayer.id))&&d.imageLayer.removeImage(a),d._removeRenderer({target:b}))}));b._collection&&a.push(b.on("graphic-add",
function(a){d._reprojectFeature(a.graphic);d._setupDraw()}));1!==b.mode&&(a.push(c.on("resize, pan-end",this._setupDraw)),a.push(c.on("zoom-end",this._setupDraw)));a.push(b.on("opacity-change",this._handleOpacityChange));this.imageLayer.suspended&&this.imageLayer.resume();b.graphics&&b.graphics.length&&(b.graphics[0].geometry&&!c.spatialReference.equals(b.graphics[0].geometry.spatialReference)&&p.forEach(b.graphics,function(a){this._reprojectFeature(a)}.bind(this)),this._setupDraw())},_setupDraw:function(){if(!this._drawTimer){var a=
this;this._drawTimer=setTimeout(function(){clearTimeout(a._drawTimer);a._drawTimer=null;a.sourceLayer._getRenderer().isInstanceOf(c)&&a.recalculateHeatmap()},16)}},_removeRenderer:function(a){var b=a.target;b._draw=b._originalDraw;delete b._originalDraw;b.setDrawMode(!0);this._removeHandlers();this._hndls=[];var c=this._getImageBySourceId(this.sourceLayer.id);c&&this.imageLayer.removeImage(c);clearTimeout(this._drawTimer);clearTimeout(this._resetTimer);this._drawTimer=this._resetTimer=null;b.renderer!=
a.renderer&&b.renderer.getRendererInfo?this.heatmapRenderer=null:(b.redraw(),this.destroy())},recalculateHeatmap:function(){this._calculator?this._doMainCalculation():this._calculatorClient&&this._doWorkerCalculation()},_reprojectFeature:function(a){if(a&&a.geometry){var b=a.geometry,c=this.map.spatialReference;c.equals(b.spatialReference)||(b=d.project(b,c),null==b?console.log("Unable to reproject features to map's spatial reference. Please convert feature geometry before adding to layer"):a.geometry=
b)}},_doWorkerCalculation:function(){},_doMainCalculation:function(){var c=this.sourceLayer,d=this.map,g=this.heatmapRenderer,e=this.map.extent,f=this.map.width,h=this.map.height,k=this._calculator,p=this,C=function(a){a=p._getScreenPoints(a.features,d,c);a=k.calculateImageData(l.mixin({screenPoints:a,mapinfo:{extent:[e.xmin,e.ymin,e.xmax,e.ymax],resolution:d.getResolution()},width:f,height:h},p._getOptions()));a=g.getSymbol(m({geometry:d.extent,attributes:{size:[f,h],imageData:a},layer:c}));a=new b({extent:d.extent,
href:a.url,opacity:0,sourceId:c.id});p._swapMapImages(a,p._getImageBySourceId(c.id));c.suspended&&a.hide()},q={geometry:d.extent,timeExtent:c.useMapTime?d.timeExtent:void 0,spatialRelationship:a.SPATIAL_REL_INTERSECTS};null!=c._canDoClientSideQuery(q)?c.queryFeatures(q,C):C({features:c.graphics})},_getScreenPoints:function(a,b,c){var d=[],g=a.length,e=0,m=0,f,n=new h(b.extent.xmin,b.extent.ymax,b.spatialReference),k=b.toScreen(n),t=k.x,k=k.y,u=b.getResolution(),l;for((m=b.extent.getCacheValue("_parts"))&&
(l=p.map(m,function(a){return c._intersects(b,a.extent)[0]}));g--;)m=a[g],m.geometry&&(f={x:Math.ceil((m.geometry.x-n.x)/u+t),y:Math.floor((n.y-m.geometry.y)/u-k),attributes:m.attributes},l&&(m=1<l.length&&f.x<-l[0]?l[1]:l[0],f.x+=m),d[e++]=f);return d},_getImageBySourceId:function(a){var b=this.imageLayer.getImages(),b=p.filter(b,function(b){return b.sourceId==a});if(b.length)return b[b.length-1]},_swapMapImages:function(a,b){function c(){d.removeImage(b)}var d=this.imageLayer,e=this.sourceLayer.opacity;
d.addImage(a);g.anim(a._node,{opacity:e},null,null,function(){a.opacity=e});null!=b&&g.anim(b._node,{opacity:0},null,null,c)},_removeHandlers:function(){if(null!=this._hndls)for(var a=this._hndls.length;a--;)this._hndls[a].remove()},_getOptions:function(){var a=this.heatmapRenderer;return{blurRadius:a.blurRadius,gradient:a.gradient,maxPixelIntensity:a.maxPixelIntensity,minPixelIntensity:a.minPixelIntensity,field:a.field,fieldOffset:a.fieldOffset}},_resetGraphics:function(){clearTimeout(this._resetTimer);
this._resetTimer=null;for(var a=this.sourceLayer.graphics,b=a.length,c;b--;)c=a[b],c._shape=c._offsets=void 0}});f("extend-esri")&&l.setObject("layers.HeatmapManager",r,e);return r})},"esri/layers/clustering/ClusterManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../../kernel ../../Evented ../../graphic ../../lang ../../Color ../../graphicsUtils ../../dijit/PopupTemplate ../../dijit/Legend/utils ../../renderers/ClassBreaksRenderer ../../symbols/SimpleMarkerSymbol ../GraphicsLayer ../Field ./GeohashAggregation ./statUtils dojo/i18n!../../nls/jsapi".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n,t,A){var y=A.layers.clusters,z=A.widgets.popup,v=y.numFeatures,B=Math.pow(2,53)-1;r=r(e,{declaredClass:"esri.layers.clustering.ClusterManager",layer:null,aggregationInfo:null,container:null,defaults:{clusterRadius:80,markerSymbol:{color:[77,77,77,255],size:6,angle:0,xoffset:0,yoffset:0,type:"esriSMS",style:"esriSMSCircle",outline:{color:[255,255,255,255],width:.75,type:"esriSLS",style:"esriSLSSolid"}}},_initialized:!1,_map:null,_eventHandles:null,_clusterRadius:null,
_renderer:null,_statisticInfos:null,_fields:null,_infoTemplate:null,_clusterGenerator:null,_singleGraphics:null,constructor:function(a){this._eventHandles=[];this.layer=a.layer;this.setAggregationInfo(a.aggregationInfo)},initialize:function(a){this._initialized=!0;this._map=a;this.container=this._createContainer();this._clusterGenerator=this._createClusterGenerator();this._initClusterGenerator();this._createLayerEventListeners();this._createMapEventListeners();this._createPopupEventListeners()},destroy:function(a){this._clearSingleGraphics();
this._removeClusterBoundary();this._destroyEventListeners();this._removeFromPopup(this.container);this._removeFromPopup(this.layer);this._resetClusterNav();this._destroyClusterGenerator(a);this._destroyContainer();this.layer=this.aggregationInfo=this._map=null},setAggregationInfo:function(a){this.aggregationInfo=a?l.mixin({},a):null;this._applyAggregationInfo()},getClusterRenderer:function(){return this._renderer},getClusterFields:function(){return this._fields||[]},getFeaturesInCluster:function(a){a=
a&&a.getAggregationInfo();return this._clusterGenerator?this._clusterGenerator.getFeaturesInCluster(a):[]},getAggregateGraphics:function(){return this.container?this.container.graphics.slice(0):[]},getSingleGraphics:function(){return this._singleGraphics?this._singleGraphics.slice(0):[]},redraw:function(){this.container&&this.container.redraw()},isClusteringEnabled:function(){return!(!this._clusterGenerator||!this._clusterGenerator.clustersEnabled)},isClusteringActive:function(){return!!(this._clusterGenerator&&
0<this._clusterGenerator.getNumFeatures())},_createContainer:function(){var a=this.layer,b=new m._GraphicsLayer({_child:!0,id:a.id+"_clusters",visible:a.visible,minScale:a.minScale,maxScale:a.maxScale,infoTemplate:this._infoTemplate});b.fields=this._fields;b.setRenderer(this._renderer);b.loaded=!0;b.onLoad(b);b._setMap(this._map,a._div);return a._childLayer=b},_destroyContainer:function(){var a=this.container;a&&(a.clear(),a._unsetMap(this._map,this.layer._div),this.layer._childLayer=null);this.container=
null},_createClusterGenerator:function(){return new n({map:this._map,layer:this.layer,clusterRadius:this._clusterRadius,statisticInfos:this._statisticInfos})},_initClusterGenerator:function(){var a=this._clusterGenerator;a.loaded?(this._applyRenderer(),this._initClusterUpdates()):this._eventHandles.push(a.on("load",l.hitch(this,function(){this._applyRenderer();this._initClusterUpdates()})),a.on("load-error",l.hitch(this,function(a){console.log(a.error)})))},_destroyClusterGenerator:function(a){this._clusterGenerator&&
this._clusterGenerator.destroy(a);this._clusterGenerator=null},_applyAggregationInfo:function(){this._applyClusterRadius();this._applyRenderer();this._clusterGenerator&&!this._clusterGenerator.isUpdateScheduled()&&this.redraw()},_applyClusterRadius:function(){var a=this.aggregationInfo;this._clusterRadius=a&&a.clusterRadius||this.defaults.clusterRadius;this._clusterGenerator&&this._clusterGenerator.setClusterRadius(this._clusterRadius);this._computeClusterRadius()},_computeClusterRadius:function(){var a=
this.aggregationInfo||{};a.clusterRadius=this._clusterRadius;this.aggregationInfo=a},_applyRenderer:function(){var a=this.container,b=this._getClusterRendererInfo(),c=this._compareStatInfos(this._statisticInfos,b.statisticInfos);c&&(this._statisticInfos=b.statisticInfos,this._clusterGenerator&&(this._clusterGenerator.setStatisticInfos(q.map(this._statisticInfos,function(a){return{attributeInfo:a.attributeInfo,statisticType:a.statisticType}})),a&&q.forEach(a.graphics,function(a){this._applyClusterAttributes(a,
a.getAggregationInfo())},this)));this._renderer=b.renderer;this._applyFields();this._applyInfoTemplate(!!c&&this._initialized);a&&(a.setRenderer(this._renderer),this.emit("renderer-change"))},_applyFields:function(){this._fields=this._getFields(this._statisticInfos);this.container&&(this.container.fields=this._fields)},_applyInfoTemplate:function(a){if(this.layer.infoTemplate){var b=this.aggregationInfo,b=b&&b.infoTemplate||this._infoTemplate;a=a||!b?this._createInfoTemplate():this._updateInfoTemplate(b)}else a=
null;this._infoTemplate=a;this.container&&this.container.setInfoTemplate(this._infoTemplate);this._computeInfoTemplate()},_computeInfoTemplate:function(){var a=this.aggregationInfo||{};a.infoTemplate=this._infoTemplate;this.aggregationInfo=a},_getClusterRendererInfo:function(){var a=this.layer&&this.layer.renderer;return a?this._createClusterRenderer(a):this._getDefaultClusterRenderer()},_getDefaultClusterRenderer:function(){var a=this._createContinuousCountRenderer();this._addSizeByCountVariable(a);
return{renderer:a,statisticInfos:[]}},_createContinuousCountRenderer:function(a){var b=new g(null,"cluster_count");b.addBreak({minValue:-B,maxValue:B,symbol:a?new a.constructor(a.toJson()):new w(l.clone(this.defaults.markerSymbol))});return b},_createClusterRenderer:function(a){if(!this._isSupportedRenderer(a))return this._getDefaultClusterRenderer();var b,c=[];if(this._isSimpleRenderer(a))b=this._createContinuousCountRenderer(a.symbol);else{b=new a.constructor(a.toJson());var d=this._getRendererAttributeInfo(a),
g;this._isCBRenderer(b)?(g=t.getClusterField(d,"avg"),c.push(this._getStatInfo(d,"avg")),b.normalizationType=null,b.normalizationField=null,b.normalizationTotal=null):this._isUVRenderer(b)&&(g=t.getClusterField(d,"type"),c.push(this._getStatInfo(d,"type")));b.attributeField=g;b.setValueExpression(null);b.valueExpressionTitle=null;b.setVisualVariables(null);this._setRendererTitle(b,a)}a=this._getSupportedVariables(a);d=this._createClusterVariables(a.allVars,c);b.setVisualVariables(d);a.sizeVars.length||
this._isCBSizeRenderer(b)||this._addSizeByCountVariable(b);return{renderer:b,statisticInfos:c}},_isSupportedRenderer:function(a){if(this._isSimpleRenderer(a))return!0;if(this._isCBRenderer(a)){var b=a.normalizationType;return"function"===typeof a.attributeField||b&&"field"!==b?!1:!0}return this._isUVRenderer(a)?"function"===typeof a.attributeField||a.attributeField2?!1:!0:!1},_isSimpleRenderer:function(a){return-1<a.declaredClass.toLowerCase().indexOf("simplerenderer")},_isCBRenderer:function(a){return-1<
a.declaredClass.toLowerCase().indexOf("classbreaksrenderer")},_isUVRenderer:function(a){return-1<a.declaredClass.toLowerCase().indexOf("uniquevaluerenderer")},_isCBSizeRenderer:function(a){var b=a.infos;if(!this._isCBRenderer(a)||!b||2>b.length)return!1;var c=Infinity,d=-Infinity;q.forEach(b,function(a){if(a=a.symbol){var b=0;switch(a.type){case "simplemarkersymbol":b=a.size;break;case "picturemarkersymbol":b=(a.width+a.height)/2}c=Math.min(c,b);d=Math.max(d,b)}});return Infinity!==c&&-Infinity!==
d&&c!==d},_getRendererAttributeInfo:function(a){var b=a.attributeField,c=b?this.layer.getField(b):null;return{field:b,attributeType:c&&"esriFieldTypeDate"===c.type?"date":null,rotationType:null,valueExpression:a.valueExpression,valueExpressionTitle:a.valueExpressionTitle,normalizationField:a.normalizationField}},_setRendererTitle:function(b,c){b.legendOptions=l.clone(c.legendOptions);b.legendOptions&&b.legendOptions.title||(b.legendOptions=b.legendOptions||{},b.legendOptions.title=a.getRendererTitle(c,
this.layer))},_getSupportedVariables:function(a){var b=a.getVisualVariablesForType("colorInfo",!1)||[],c=a.getVisualVariablesForType("sizeInfo",!1)||[],d=a.getVisualVariablesForType("opacityInfo",!1)||[];a=a.getVisualVariablesForType("rotationInfo",!1)||[];b=q.filter(b,this._variableFilter);c=q.filter(c,this._variableFilter);d=q.filter(d,this._variableFilter);a=q.filter(a,this._variableFilter);return{sizeVars:c,allVars:b.concat(c).concat(d).concat(a)}},_variableFilter:function(a){return"function"!==
typeof a.field},_createClusterVariables:function(a,b){return q.map(a,function(a){return this._createVarForAvg(a,b)},this)},_createVarForAvg:function(a,b){var c=l.clone(a),d=this._getVariableAttributeInfo(a);c.field=t.getClusterField(d,"avg");c.normalizationField=null;c.valueExpression=null;c.valueExpressionTitle=null;d=this._getStatInfo(d,"avg");this._addStatInfo(b,d);this._setVariableTitle(c,a);return c},_getVariableAttributeInfo:function(a){var b="rotationInfo"===a.type,c=b?"angle":null,b=b?a.rotationType:
null,d=a.legendOptions&&a.legendOptions.title,g=a.field,e=g?this.layer.getField(g):null;e&&"esriFieldTypeDate"===e.type&&(c="date");return{field:g,attributeType:c,rotationType:b,valueExpression:a.valueExpression,valueExpressionTitle:a.valueExpressionTitle||a.valueExpression&&d,normalizationField:a.normalizationField}},_setVariableTitle:function(b,c){b.legendOptions&&b.legendOptions.title||(b.legendOptions=b.legendOptions||{},b.legendOptions.title=a.getVisualVariableTitle(c,this.layer))},_getStatInfo:function(a,
b){return{statisticHash:t.getStatisticHash(a,b),attributeInfo:a,statisticType:b}},_addStatInfo:function(a,b){var c=this._findStatInfo(a,b);c?c.attributeInfo.valueExpressionTitle||(c.attributeInfo.valueExpressionTitle=b.attributeInfo.valueExpressionTitle):a.push(b)},_findStatInfo:function(a,b){var c;q.some(a,function(a){a.statisticHash===b.statisticHash&&(c=a);return!!c});return c},_compareStatInfos:function(a,b){var c=q.filter(a,function(a){return!this._findStatInfo(b,a)},this),d=q.filter(b,function(b){return!this._findStatInfo(a,
b)},this);return d.length||c.length?{added:d,removed:c}:null},_addSizeByCountVariable:function(a){var b=this._createSizeByCountVariable();b&&this._addVariable(a,b)},_getSizeByCountVariable:function(a){a=a.getVisualVariablesForType("sizeInfo",!1)||[];return q.filter(a,function(a){return"cluster_count"===a.field})[0]},_updateSizeByCountVariable:function(){var a=this._renderer,b=this._getSizeByCountVariable(a);if(b){var c=this._createSizeByCountVariable();c&&this._replaceVariable(a,b,c)}},_createSizeByCountVariable:function(){var a=
this._clusterGenerator,b;if(a){b=a.getCurrentLodStats();var c=a.getNumFeatures(),a=a.clusters,d=b.min,g=b.max;1===b.count&&d===c||1===a.length&&a[0].count===c?(d=1,g=c):d&&d===g&&(g=2*d);b={type:"sizeInfo",field:"cluster_count",valueUnit:"unknown",minSize:12,maxSize:50,minDataValue:d,maxDataValue:g,legendOptions:{title:v}}}return b},_addVariable:function(a,b){var c=a.visualVariables||[];c.push(b);a.setVisualVariables(c)},_replaceVariable:function(a,b,c){var d=a.visualVariables;b=q.indexOf(d,b);-1<
b&&d.splice(b,1);d.push(c);a.setVisualVariables(d)},_getFields:function(a){var b=[new u({name:"cluster_count",type:"esriFieldTypeInteger"})];q.forEach(a,function(a){var c=a.statisticType;a=a.attributeInfo;var d;"avg"===c?d="date"===a.attributeType?"esriFieldTypeDate":"esriFieldTypeDouble":"type"===c&&(d=a.field?this.layer.getField(a.field).type:"esriFieldTypeString");b.push(new u({name:t.getClusterField(a,c),type:d}))},this);return b},_createInfoTemplate:function(){var a=this._statisticInfos,b=this._renderer,
d=[{fieldName:"cluster_count",label:v,visible:!0,format:{digitSeparator:!0,places:0}}],g=[],e=[h.substitute({count:"{cluster_count}"},y.countSummary)],m=this._isUVRenderer(b)?b.infos:[];q.forEach(a,function(a){var b,c,f=a.statisticType,h=a.attributeInfo,n=t.getClusterField(h,f),k=this._getFieldLabel(a);"avg"===f?(b={fieldName:n,label:k,visible:!0,format:"date"===h.attributeType?{dateFormat:"shortDateShortTime"}:{digitSeparator:!0,places:1}},c=this._getFieldSummary(a,n)):"type"===f&&(c="expression/"+
n,b={fieldName:c,visible:!0},g.push({name:n,title:k,returnType:"string",expression:this._getExpression(m,n)}),c=this._getFieldSummary(a,c));b&&d.push(b);c&&e.push(c)},this);return new c({fieldInfos:d,expressionInfos:g,description:e.join("\x3cbr/\x3e\x3cbr/\x3e")})},_updateInfoTemplate:function(a){var b=a.toJson(),d=this._isUVRenderer(this._renderer)?this._renderer.infos:[];q.forEach(this._statisticInfos,function(a){var c=a.statisticType;a=t.getClusterField(a.attributeInfo,c);"type"===c&&(c=this._findExpressionInfo(a,
b))&&(c.expression=this._getExpression(d,a))},this);return new c(b)},_findExpressionInfo:function(a,b){var c;q.some(b.expressionInfos,function(b){b.name===a&&(c=b);return!!c});return c},_escapeDoubleQuotes:function(a){return a?a.replace(/"/g,'\\"'):""},_getExpression:function(a,b){return["var uvInfos \x3d ["+this._getObjects(a).join(", ")+"];",'var predominantType \x3d Text($feature["'+b+'"]);','var label \x3d "'+this._escapeDoubleQuotes(y.predominantNoneValue)+'";',"for (var i \x3d 0; i \x3c Count(uvInfos); i++) {\nif (uvInfos[i].value \x3d\x3d predominantType) {\nlabel \x3d uvInfos[i].label;\nbreak;\n}\n}\nreturn label;"].join("\n")},
_getObjects:function(a){return q.map(a,function(a){return'{"value": "'+String(a.value)+'","label": "'+this._escapeDoubleQuotes(String(a.label))+'"}'},this)},_getFieldLabel:function(a){var b=a.statisticType,c=a.attributeInfo,d=c.field;a=c.normalizationField;var g="",e;"avg"===b?e=a?y.avgNormFieldLabel:y.avgFieldLabel:"type"===b&&(e=y.predominantFieldLabel);e&&(b=c.valueExpression?c.valueExpressionTitle:this.layer.getFieldLabel(d),a=a&&this.layer.getFieldLabel(a),g=h.substitute({fieldLabel:b||"",normFieldLabel:a||
""},e));return g},_getFieldSummary:function(a,b){var c=a.statisticType,d=a.attributeInfo,g=d.field,e=d.normalizationField,m="",f;"avg"===c?f=e?y.avgNormFieldSummary:y.avgFieldSummary:"type"===c&&(f=y.predominantFieldSummary);f&&(c=d.valueExpression?d.valueExpressionTitle:this.layer.getFieldLabel(g),e=e&&this.layer.getFieldLabel(e),m=h.substitute({fieldLabel:c||"",normFieldLabel:e||"",fieldValue:"{"+b+"}"},f));return m},_removeFromPopup:function(a){var b=this._map.infoWindow,c=b.features;if(c&&c.length){var d=
q.filter(c,function(b){return b.getLayer()!==a});d.length<c.length&&(d.length?b.setFeatures(d):(b.clearFeatures(),b.hide()))}},_resetClusterNav:function(){this._resetClusterNavPartial();this._popupClusterGraphic=null},_resetClusterNavPartial:function(){this._map.infoWindow.removeActions(this._popupActions);this._hideSingleGraphic(this._popupSingleGraphic);this._popupSingleGraphic=null},_addClusterBoundary:function(a,b){var c=b.clusterFillSymbol;c&&(c=new c.constructor(c.toJson()));c=new f(a,c);this._map.graphics.add(c);
this._clusterBoundary=c},_removeClusterBoundary:function(){this._map.graphics.remove(this._clusterBoundary);this._clusterBoundary=null},_createBrowseFeaturesAction:function(){return this._map.infoWindow.addActions([{title:z.NLS_browseFeatures,className:"browseFeatures",callback:l.hitch(this,function(a){a.preventDefault();a=this._map.infoWindow;var c=a.getSelectedFeature(),d=c.getChildGraphics(),g=a.getCurrentAnchor();a.setFeatures(d,{anchor:g});if(d=b.graphicsExtent(d))this._addClusterBoundary(d,
a),a.show(this._getPopupLocation(d,g));this._popupClusterGraphic=c})}])[0]},_getPopupLocation:function(a,b){var c=a.getCenter();b=b.toLowerCase();-1<b.indexOf("top")?c.update(c.x,a.ymax):-1<b.indexOf("bottom")?c.update(c.x,a.ymin):-1<b.indexOf("left")?c.update(a.xmin,c.y):c.update(a.xmax,c.y);return c},_createViewSummaryAction:function(){return this._map.infoWindow.addActions([{title:z.NLS_viewSummary,className:"viewSummary",callback:l.hitch(this,function(a){a.preventDefault();a=this._popupClusterGraphic;
var b=this._map.infoWindow;b.setFeatures([a]);b.show(a.geometry);this._popupClusterGraphic=null})}])[0]},_initClusterUpdates:function(){this._updateSizeVariable();this._updateClusterGraphics();this._eventHandles.push(this._clusterGenerator.on("update-end",l.hitch(this,function(a){a.mapLevelChange&&this._updateSizeVariable();this._updateClusterGraphics()})),this._clusterGenerator.on("index-complete",l.hitch(this,function(){this._updateSizeVariable()})))},_updateClusterGraphics:function(){this._hideSingleGraphics();
var a=[],b=[];q.forEach(this._clusterGenerator.clusters,function(c){var d=new f(c.centroid);d.setAggregationSourceLayer(this.layer);d.setAggregationInfo(c);this._applyClusterAttributes(d,c);1===c.count?(c=this._getSingleGraphic(d),b.push(c)):a.push(d)},this);this._showSingleGraphics(b);this._addGraphics(a)},_addGraphics:function(a){var b=this.container;b.clear();q.forEach(a,function(a){b.add(a)})},_getSingleGraphic:function(a){var b=this._clusterGenerator.getCell(a.getAggregationInfo().primary).features[0],
c=this.layer.renderer,c=c&&c.getSymbol(b),d=this._getSizeByCountVariable(this._renderer);c&&d&&(a=d?this._renderer.getSize(a,{sizeInfo:d,shape:c.style,resolution:this._map.getResolutionInMeters(),scale:this._map.getScale()}):null,b.setSize(a));return b},_showSingleGraphics:function(a){q.forEach(a,this._showSingleGraphic);this._singleGraphics=a},_hideSingleGraphics:function(){q.forEach(this._singleGraphics,function(a){a.setSize(null);this._hideSingleGraphic(a)},this);this._singleGraphics=null},_clearSingleGraphics:function(){q.forEach(this._singleGraphics,
function(a){a.setSize(null)});this._singleGraphics=null},_showSingleGraphic:function(a){a&&(a._suspended=!1,a.draw())},_hideSingleGraphic:function(a){a&&(a._suspended=!0,a.show(),a.draw())},_updateSizeVariable:function(){this.isClusteringEnabled()&&(this._updateSizeByCountVariable(),this.emit("renderer-change"))},_applyClusterAttributes:function(a,b){a.setAttributes(b.attributes)},_createLayerEventListeners:function(){var a=this.layer;this._eventHandles.push(a.on("visibility-change",l.hitch(this,
function(a){this.container.setVisibility(a.visible)})),a.on("scale-range-change",l.hitch(this,function(){this.container.setScaleRange(this.layer.minScale,this.layer.maxScale)})),a.on("renderer-change",l.hitch(this,function(){this._applyRenderer()})),a.on("info-template-change",l.hitch(this,function(){this._applyInfoTemplate()})))},_createMapEventListeners:function(){this._eventHandles.push(this._map.on("zoom-start",l.hitch(this,function(){this._removeClusterBoundary();this._removeFromPopup(this.container);
this._removeFromPopup(this.layer);this._resetClusterNav();this.container.clear();this._hideSingleGraphics()})))},_createPopupEventListeners:function(){var a=this._map.infoWindow;this._eventHandles.push(a.on("selection-change",l.hitch(this,function(){this._resetClusterNavPartial();var a=this._map.infoWindow.getSelectedFeature(),b=a&&a.getLayer();if(b){var c;b===this.container?(this._removeClusterBoundary(),c=this._createBrowseFeaturesAction()):b===this.layer&&a._suspended?(c=this._createViewSummaryAction(),
this._popupSingleGraphic=a,this._showSingleGraphic(a)):this._removeClusterBoundary();this._popupActions=c?[c]:null}})),a.on("clear-features",l.hitch(this,function(a){this._resetClusterNav();a.isIntermediate||this._removeClusterBoundary()})),a.on("hide",l.hitch(this,function(){this._popupSingleGraphic&&this._popupSingleGraphic.hide();this._clusterBoundary&&this._clusterBoundary.hide()})),a.on("show",l.hitch(this,function(){this._popupSingleGraphic&&this._popupSingleGraphic.show();this._clusterBoundary&&
this._clusterBoundary.show()})))},_destroyEventListeners:function(){q.forEach(this._eventHandles,function(a){a.remove()})}});p("extend-esri")&&l.setObject("layers.clustering.ClusterManager",r,k);return r})},"esri/dijit/PopupTemplate":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojo/dom-construct ../kernel ../InfoTemplate ../PopupInfo ./PopupRenderer".split(" "),function(r,l,q,p,k,e,f,h){r=r([e,f],{declaredClass:"esri.dijit.PopupTemplate","-chains-":{constructor:"manual"},chartTheme:null,
constructor:function(d,b){l.mixin(this,b);this.initialize(d,b)},getTitle:function(d){var b;this.info&&(b=this.titleHasRelatedFields?"":this._getPopupValues(d,null,!0).title);return b||""},getContent:function(d){return this.info?(new h({template:this,graphic:d,chartTheme:this.chartTheme},p.create("div"))).domNode:""}});q("extend-esri")&&l.setObject("dijit.PopupTemplate",r,k);return r})},"esri/PopupInfo":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/i18n dojo/has dojo/Deferred dojo/sniff dojo/promise/all dojox/html/entities ./lang ./kernel ./request ./promiseList ./tasks/query ./tasks/QueryTask ./tasks/RelationshipQuery ./tasks/StatisticDefinition ./support/expressionUtils ./layers/support/attributeUtils dojo/i18n!dojo/cldr/nls/number".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n,t,A,y,z){r=r(null,{declaredClass:"esri.PopupInfo",_reExprField:/^\s*expression\//i,_exprPrefix:"expression/",_relatedFieldPrefix:"relationships/",initialize:function(a,b){if(a){l.mixin(this,b);this.info=a;this.title=this.getTitle;this.content=this.getContent;this._exprCache=this._compileExpressions(this.info.expressionInfos);var c=this._fieldLabels={},d=this._fieldsMap={};this.info.fieldInfos&&q.forEach(this.info.fieldInfos,function(a){var b=a.fieldName.toLowerCase(),
g=this._isExpressionField(b)?this.getExpressionInfo(b):null;c[b]=g?g.title:a.label;d[b]=a},this);this.titleHasRelatedFields=!(!this.info.title||-1===this.info.title.indexOf("{"+this._relatedFieldPrefix))}},toJson:function(){return p.fromJson(p.toJson(this.info))},getTitle:function(){},getContent:function(){},getFieldInfo:function(a){var b;q.some(this.info&&this.info.fieldInfos,function(c){c.fieldName===a&&(b=c);return!!b});return b},getExpressionInfo:function(a){if(this._isExpressionField(a)){a=a.replace(this._reExprField,
"");a=a.toLowerCase();var b;q.some(this.info.expressionInfos,function(c){c.name.toLowerCase()===a&&(b=c);return!!b});return b}},hasGeometryOperations:function(){return q.some(this.info.expressionInfos,function(a){return A.hasGeometryOperations(a.expression)})},getComponents:function(a){var b=this.info,c={};b.fieldInfos&&(b=q.filter(b.fieldInfos,function(a){return-1!==a.fieldName.indexOf(this._relatedFieldPrefix)},this))&&0<b.length&&(c.relatedInfo=this._getRelatedRecords({graphic:a,fieldsInfo:b}));
this._needFullResolutionFeature(a)&&(c.fullResolutionFeature=this._getFullResolutionFeature(a));return w(c).then(l.hitch(this,function(b){return this._getPopupValues(a,b.fullResolutionFeature)}))},getAttachments:function(a){var b=a.getSourceLayer();a=a.attributes;if(this.info.showAttachments&&b&&b.hasAttachments&&b.objectIdField&&(a=a&&a[b.objectIdField]))return b.queryAttachmentInfos(a)},_needFullResolutionFeature:function(a){return(a=a.getSourceLayer())?"esriGeometryPoint"!==a.geometryType&&"function"===
typeof a.getMaxAllowableOffset&&0<a.getMaxAllowableOffset()&&this.hasGeometryOperations():!1},_getFullResolutionFeature:function(a){var b=a.getSourceLayer(),c=b.objectIdField;a=(a=a.attributes)&&c&&a[c];if(null==a)return null;var d=new m;d.objectIds=[a];d.maxAllowableOffset=0;d.outFields=[c];return b.queryFeatures(d).then(function(a){return a.features&&a.features[0]})},_isExpressionField:function(a){return this._reExprField.test(a)},_compileExpressions:function(a){var b={};q.forEach(a,function(a){var c=
a.returnType&&a.returnType.toLowerCase();b[a.name]=y.createAttributeCache({valueExpression:a.expression},"number"!==c)});return b},_fetchAttributes:function(a,c){var d=l.clone(a.attributes)||{},g=c&&c.geometry,e=this._exprPrefix,m=this._exprCache;q.forEach(this.info.expressionInfos,function(c){var f=e+c.name;c=(c=m[c.name])?a._getDataValue(c.attributeInfo,c,A,null,g):null;"string"===typeof c&&(c=b.encode(c));d[f]=c});return d},_getPopupValues:function(a,b,d){var g=this.info,e=a.getSourceLayer(),m=
this._fetchAttributes(a,b),f=l.clone(m);b=g.fieldInfos;var h="",n="",k,t,u,p,A,v=e&&e._getDateOpts&&e._getDateOpts().properties,v=v&&v.slice(0),w={dateFormat:{properties:v,formatter:"DateFormat"+this._insertOffset(this._dateFormats.shortDateShortTime)}};if(this._relatedInfo)for(p in this._relatedInfo)if(this._relatedInfo.hasOwnProperty(p)){var r=this._relatedInfo[p],y=this._relatedLayersInfo[p];r&&(q.forEach(r.relatedFeatures,function(a){for(A in a.attributes)if(a.attributes.hasOwnProperty(A)&&"esriRelCardinalityOneToOne"===
y.relation.cardinality){var b=this._toRelatedFieldName([y.relation.id,A]);m[b]=f[b]=a.attributes[A]}},this),q.forEach(r.relatedStatsFeatures,function(a){for(A in a.attributes)if(a.attributes.hasOwnProperty(A)){var b=this._toRelatedFieldName([y.relation.id,A]);m[b]=f[b]=a.attributes[A]}},this))}b&&q.forEach(b,function(a){t=a.fieldName;var b=this._getLayerFieldInfo(e,t);b&&(t=a.fieldName=b.name);f[t]=this._formatValue(f[t],t,w);v&&a.format&&a.format.dateFormat&&(a=q.indexOf(v,t),-1<a&&v.splice(a,1))},
this);if(e){p=e.types;var B=(r=e.typeIdField)&&m[r];for(t in m)if(m.hasOwnProperty(t)&&-1===t.indexOf(this._relatedFieldPrefix)&&(u=m[t],c.isDefined(u))){var z=this._getDomainName(e,a,p,B,t,u);c.isDefined(z)?f[t]=z:t===r&&(z=this._getTypeName(e,a,u),c.isDefined(z)&&(f[t]=z))}}g.title&&(h=this._processFieldsInLinks(this._fixTokens(g.title,e),m),h=l.trim(c.substitute(f,h,w)||""));if(d)return{title:h};g.description&&(n=this._processFieldsInLinks(this._fixTokens(g.description,e),m),n=l.trim(c.substitute(f,
n,w)||""));b&&(k=[],q.forEach(b,function(a){(t=a.fieldName)&&a.visible&&k.push([this._fieldLabels[t.toLowerCase()]||t,c.substitute(f,"${"+t+"}",w)||""])},this));var C,N;g.mediaInfos&&(C=[],q.forEach(g.mediaInfos,function(a){N=0;u=a.value;switch(a.type){case "image":var b=u.sourceURL,b=b&&l.trim(c.substitute(m,this._fixTokens(b,e)));N=!!b;break;case "piechart":case "linechart":case "columnchart":case "barchart":var d,b=u.normalizeField;u.fields=q.map(u.fields,function(a){return(d=this._getLayerFieldInfo(e,
a))?d.name:a},this);b&&(d=this._getLayerFieldInfo(e,b),u.normalizeField=d?d.name:b);N=q.some(u.fields,function(a){return c.isDefined(m[a])||-1!==a.indexOf(this._relatedFieldPrefix)&&this._relatedInfo},this);break;default:return}if(N){a=l.clone(a);u=a.value;var b=a.title?this._processFieldsInLinks(this._fixTokens(a.title,e),m):"",g=a.caption?this._processFieldsInLinks(this._fixTokens(a.caption,e),m):"";a.title=b?l.trim(c.substitute(f,b,w)||""):"";a.caption=g?l.trim(c.substitute(f,g,w)||""):"";if("image"===
a.type)u.sourceURL=c.substitute(m,this._fixTokens(u.sourceURL,e)),u.linkURL&&(u.linkURL=l.trim(c.substitute(m,this._fixTokens(u.linkURL,e))||""));else{var h,n;q.forEach(u.fields,function(a,b){if(-1!==a.indexOf(this._relatedFieldPrefix))n=this._getRelatedChartInfos(a,u,m,w),n instanceof Array?u.fields=n:u.fields[b]=n;else{var c=m[a],c=void 0===c?null:c;h=m[u.normalizeField]||0;c&&h&&(c/=h);u.fields[b]={y:c,tooltip:(this._fieldLabels[a.toLowerCase()]||a)+":\x3cbr/\x3e"+this._formatValue(c,a,w,!!h)}}},
this)}C.push(a)}},this));return{title:h,description:n,hasDescription:!!g.description,fields:k&&k.length?k:null,mediaInfos:C&&C.length?C:null,formatted:f,editSummary:e&&e.getEditSummary?e.getEditSummary(a):""}},_getRelatedChartInfos:function(a,b,d,g){var e,m,f,h,n,k;e=[];k=this._fromRelatedFieldName(a);n=k[0];m=this._relatedInfo[n];n=this._relatedLayersInfo[n];m&&q.forEach(m.relatedFeatures,function(m){m=m.attributes;var n,x;for(x in m)if(m.hasOwnProperty(x)&&x===k[1]){n={};h=m[x];b.normalizeField&&
(f=-1!==b.normalizeField.indexOf(this._relatedFieldPrefix)?m[this._fromRelatedFieldName(b.normalizeField)[1]]:d[b.normalizeField]);h&&f&&(h/=f);if(b.tooltipField)if(-1!==b.tooltipField.indexOf(this._relatedFieldPrefix)){var t=this._fromRelatedFieldName(b.tooltipField)[1],u=c.isDefined(m[t])?m[t]:t;n.tooltip=u+":\x3cbr/\x3e"+this._formatValue(h,t,g,!!f)}else n.tooltip=(this._fieldLabels[a.toLowerCase()]||a)+":\x3cbr/\x3e"+this._formatValue(h,b.tooltipField,g,!!f);else n.tooltip=h;n.y=h;e.push(n)}},
this);return"esriRelCardinalityOneToMany"===n.relation.cardinality||"esriRelCardinalityManyToMany"===n.relation.cardinality?e:e[0]},_dateFormats:{shortDate:"(datePattern: 'M/d/y', selector: 'date')",shortDateLE:"(datePattern: 'd/M/y', selector: 'date')",longMonthDayYear:"(datePattern: 'MMMM d, y', selector: 'date')",dayShortMonthYear:"(datePattern: 'd MMM y', selector: 'date')",longDate:"(datePattern: 'EEEE, MMMM d, y', selector: 'date')",shortDateShortTime:"(datePattern: 'M/d/y', timePattern: 'h:mm a', selector: 'date and time')",
shortDateLEShortTime:"(datePattern: 'd/M/y', timePattern: 'h:mm a', selector: 'date and time')",shortDateShortTime24:"(datePattern: 'M/d/y', timePattern: 'H:mm', selector: 'date and time')",shortDateLEShortTime24:"(datePattern: 'd/M/y', timePattern: 'H:mm', selector: 'date and time')",shortDateLongTime:"(datePattern: 'M/d/y', timePattern: 'h:mm:ss a', selector: 'date and time')",shortDateLELongTime:"(datePattern: 'd/M/y', timePattern: 'h:mm:ss a', selector: 'date and time')",shortDateLongTime24:"(datePattern: 'M/d/y', timePattern: 'H:mm:ss', selector: 'date and time')",
shortDateLELongTime24:"(datePattern: 'd/M/y', timePattern: 'H:mm:ss', selector: 'date and time')",longMonthYear:"(datePattern: 'MMMM y', selector: 'date')",shortMonthYear:"(datePattern: 'MMM y', selector: 'date')",year:"(datePattern: 'y', selector: 'date')"},_reHref:/href\s*=\s*\"([^\"]+)\"/ig,_reHrefApos:/href\s*=\s*\'([^\']+)\'/ig,_reEmptyHref:/^href\s*=\s*"\s*"$/i,_reEmptyHrefApos:/^href\s*=\s*'\s*'$/i,_fixTokens:function(a,b){var c=this;return a.replace(/(\{([^\{\r\n]+)\})/g,function(a,d,g){a=
c._getLayerFieldInfo(b,g);return"$"+(a?"{"+a.name+"}":d)})},_encodeAttributes:function(a){a=l.clone(a)||{};var b,c;for(b in a)(c=a[b])&&"string"===typeof c&&(c=encodeURIComponent(c).replace(/\'/g,"\x26apos;"),a[b]=c);return a},_processFieldsInLinks:function(a,b){var c=this._encodeAttributes(b),c=l.hitch(this,this._addValuesToHref,b,c);a&&(a=a.replace(this._reHref,c).replace(this._reHrefApos,c));return a},_addValuesToHref:function(a,b,d,g){g=g&&l.trim(g);d=c.substitute(g&&0===g.indexOf("${")?a:b,d);
this._reEmptyHref.test(d)?d='href\x3d"about:blank"':this._reEmptyHrefApos.test(d)&&(d="href\x3d'about:blank'");return d},_getLayerFieldInfo:function(a,b){return a&&a.getField?a.getField(b):null},_formatValue:function(a,b,d,g){var e=this._fieldsMap[b.toLowerCase()],m=e&&e.format;b=-1!==q.indexOf(d.dateFormat.properties,b);var f="number"===typeof a&&!b&&(!m||!m.dateFormat);if(!c.isDefined(a)||!e||!c.isDefined(m))return f?this._forceLTR(a):a;var h="",e=[],n=m.hasOwnProperty("places")||m.hasOwnProperty("digitSeparator"),
k=m.hasOwnProperty("digitSeparator")?m.digitSeparator:!0;if(n&&!b)h="NumberFormat",e.push("places: "+(c.isDefined(m.places)&&(!g||0<m.places)?Number(m.places):"Infinity")),e.length&&(h+="("+e.join(",")+")");else if(m.dateFormat)h="DateFormat"+this._insertOffset(this._dateFormats[m.dateFormat]||this._dateFormats.shortDateShortTime);else return f?this._forceLTR(a):a;var t=this._applyFormatting(a,h,d);n&&-1<a.constructor.toString().indexOf("Array")&&(t="",q.forEach(a,l.hitch(this,function(a,b){b&&(t+=
" ");t+=this._applyFormatting(a,h,d)})));n&&!k&&z.group&&(t=t.replace(new RegExp("\\"+z.group,"g"),""));b&&(t='\x3cspan class\x3d"esriDateValue"\x3e'+t+"\x3c/span\x3e");return f?this._forceLTR(t):t},_applyFormatting:function(a,b,d){return c.substitute({myKey:a},"${myKey:"+b+"}",d)||""},_forceLTR:function(a){var b=h("ie");return b&&10>=b?a:"\x3cspan class\x3d'esriNumericValue'\x3e"+a+"\x3c/span\x3e"},_insertOffset:function(a){a&&(a=c.isDefined(this.utcOffset)?a.replace(/\)\s*$/,", utcOffset:"+this.utcOffset+
")"):a);return a},_getDomainName:function(a,b,c,d,g,e){return(a=a.getDomain&&a.getDomain(g,{feature:b}))&&a.codedValues?a.getName(e):null},_getTypeName:function(a,b,c){return(a=a.getType&&a.getType(b))&&a.name},_getRelatedRecords:function(a){var b=a.graphic,c;this._relatedLayersInfoPromise||(this._relatedLayersInfoPromise=this._getRelatedLayersInfo(a).then(l.hitch(this,function(a){for(c in a)a.hasOwnProperty(c)&&a[c]&&(this._relatedLayersInfo[c].relatedLayerInfo=a[c])})));return this._relatedLayersInfoPromise.then(l.hitch(this,
function(){return this._queryRelatedLayers(b)})).then(l.hitch(this,function(a){this._setRelatedRecords(b,a);return a}))},_getRelatedLayersInfo:function(a){var b=a.fieldsInfo,c,e,m={};c=a.graphic.getSourceLayer();this._relatedLayersInfo||(this._relatedLayersInfo={});q.forEach(b,function(a){var b,d,g,e;b=this._fromRelatedFieldName(a.fieldName);d=b[0];b=b[1];d&&(!this._relatedLayersInfo[d]&&c&&c.relationships&&(q.some(c.relationships,function(a){if(a.id==d)return e=a,!0}),e&&(this._relatedLayersInfo[d]=
{relation:e,relatedFields:[],outStatistics:[]})),this._relatedLayersInfo[d]&&(this._relatedLayersInfo[d].relatedFields.push(b),a.statisticType&&(g=new t,g.statisticType=a.statisticType,g.onStatisticField=b,g.outStatisticFieldName=b,this._relatedLayersInfo[d].outStatistics.push(g))))},this);for(e in this._relatedLayersInfo)this._relatedLayersInfo.hasOwnProperty(e)&&this._relatedLayersInfo[e]&&(a=this._relatedLayersInfo[e].relation,a=c.url.replace(/[0-9]+$/,a.relatedTableId),this._relatedLayersInfo[e].relatedLayerUrl=
a,m[e]=g({url:a,content:{f:"json"},callbackParamName:"callback"}));return d(m)},_queryRelatedLayers:function(a){var b={},c;for(c in this._relatedLayersInfo)this._relatedLayersInfo.hasOwnProperty(c)&&(b[c]=this._queryRelatedLayer({graphic:a,relatedInfo:this._relatedLayersInfo[c]}));return d(b)},_queryRelatedLayer:function(a){var b,c,g,e,h,n,k,t,x,p,A,w,r;b=a.graphic;c=b.getSourceLayer();g=c.url.match(/[0-9]+$/g)[0];A=a.relatedInfo;p=A.relatedLayerInfo;w=A.relatedLayerUrl;a=A.relation;q.some(p.relationships,
function(a){if(a.relatedTableId===parseInt(g,10))return e=a,!0},this);e&&(h=new m,q.some(p.fields,function(a){if(a.name===e.keyField)return t=-1!==q.indexOf(["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"],a.type)?"number":"string",!0}),e.relationshipTableId&&e.keyFieldInRelationshipTable?(r=new f,this._queryRelatedRecords(b,e).then(l.hitch(this,function(a){var d;(d=a[b.attributes[c.objectIdField]])?(a=q.map(d.features,function(a){return a.attributes[p.objectIdField]},
this),A.outStatistics&&0<A.outStatistics.length&&p.supportsStatistics&&(x=new m,x.objectIds=a,x.outFields=h.outFields,x.outStatistics=A.outStatistics),x&&(n=new u(w),n.execute(x).then(l.hitch(this,function(a){var b=[];b.push(d);b.push(a);r.resolve(b)})))):r.resolve()}))):(k="string"===t?e.keyField+"\x3d'"+b.attributes[a.keyField]+"'":e.keyField+"\x3d"+b.attributes[a.keyField],h.where=k,h.outFields=A.relatedFields,A.outStatistics&&0<A.outStatistics.length&&p.supportsStatistics&&(x=new m,x.where=h.where,
x.outFields=h.outFields,x.outStatistics=A.outStatistics),n=new u(w),k=[],k.push(n.execute(h)),x&&k.push(n.execute(x))));return k?d(k):r?r.promise:void 0},_setRelatedRecords:function(a,b){this._relatedInfo=[];for(var d in b)if(b.hasOwnProperty(d)&&b[d]){var g=b[d];this._relatedInfo[d]={};this._relatedInfo[d].relatedFeatures=g[0].features;c.isDefined(g[1])&&(this._relatedInfo[d].relatedStatsFeatures=g[1].features)}},_handlerErrorResponse:function(a,b){a.reject(b)},_fromRelatedFieldName:function(a){var b=
[];-1!==a.indexOf(this._relatedFieldPrefix)&&(a=a.split("/"),b=a.slice(1));return b},_toRelatedFieldName:function(a){var b="";a&&0<a.length&&(b=this._relatedFieldPrefix+a[0]+"/"+a[1]);return b},_queryRelatedRecords:function(a,b){var c=a.getSourceLayer(),d=new n;d.outFields=["*"];d.relationshipId=b.id;d.objectIds=[a.attributes[c.objectIdField]];return c.queryRelatedFeatures(d)}});e("extend-esri")&&(a.PopupInfo=a.PopupInfoTemplate=r);return r})},"dojox/html/entities":function(){define(["dojo/_base/lang"],
function(r){var l=r.getObject("dojox.html.entities",!0),q=function(k,e){var f,h;if(e._encCache&&e._encCache.regexp&&e._encCache.mapper&&e.length==e._encCache.length)f=e._encCache.mapper,h=e._encCache.regexp;else{f={};h=["["];var d;for(d=0;d<e.length;d++)f[e[d][0]]="\x26"+e[d][1]+";",h.push(e[d][0]);h.push("]");h=new RegExp(h.join(""),"g");e._encCache={mapper:f,regexp:h,length:e.length}}return k=k.replace(h,function(b){return f[b]})},p=function(k,e){var f,h;if(e._decCache&&e._decCache.regexp&&e._decCache.mapper&&
e.length==e._decCache.length)f=e._decCache.mapper,h=e._decCache.regexp;else{f={};h=["("];var d;for(d=0;d<e.length;d++){var b="\x26"+e[d][1]+";";d&&h.push("|");f[b]=e[d][0];h.push(b)}h.push(")");h=new RegExp(h.join(""),"g");e._decCache={mapper:f,regexp:h,length:e.length}}return k=k.replace(h,function(b){return f[b]})};l.html=[["\x26","amp"],['"',"quot"],["\x3c","lt"],["\x3e","gt"],["\u00a0","nbsp"]];l.latin=[["\u00a1","iexcl"],["\u00a2","cent"],["\u00a3","pound"],["\u20ac","euro"],["\u00a4","curren"],
["\u00a5","yen"],["\u00a6","brvbar"],["\u00a7","sect"],["\u00a8","uml"],["\u00a9","copy"],["\u00aa","ordf"],["\u00ab","laquo"],["\u00ac","not"],["\u00ad","shy"],["\u00ae","reg"],["\u00af","macr"],["\u00b0","deg"],["\u00b1","plusmn"],["\u00b2","sup2"],["\u00b3","sup3"],["\u00b4","acute"],["\u00b5","micro"],["\u00b6","para"],["\u00b7","middot"],["\u00b8","cedil"],["\u00b9","sup1"],["\u00ba","ordm"],["\u00bb","raquo"],["\u00bc","frac14"],["\u00bd","frac12"],["\u00be","frac34"],["\u00bf","iquest"],["\u00c0",
"Agrave"],["\u00c1","Aacute"],["\u00c2","Acirc"],["\u00c3","Atilde"],["\u00c4","Auml"],["\u00c5","Aring"],["\u00c6","AElig"],["\u00c7","Ccedil"],["\u00c8","Egrave"],["\u00c9","Eacute"],["\u00ca","Ecirc"],["\u00cb","Euml"],["\u00cc","Igrave"],["\u00cd","Iacute"],["\u00ce","Icirc"],["\u00cf","Iuml"],["\u00d0","ETH"],["\u00d1","Ntilde"],["\u00d2","Ograve"],["\u00d3","Oacute"],["\u00d4","Ocirc"],["\u00d5","Otilde"],["\u00d6","Ouml"],["\u00d7","times"],["\u00d8","Oslash"],["\u00d9","Ugrave"],["\u00da",
"Uacute"],["\u00db","Ucirc"],["\u00dc","Uuml"],["\u00dd","Yacute"],["\u00de","THORN"],["\u00df","szlig"],["\u00e0","agrave"],["\u00e1","aacute"],["\u00e2","acirc"],["\u00e3","atilde"],["\u00e4","auml"],["\u00e5","aring"],["\u00e6","aelig"],["\u00e7","ccedil"],["\u00e8","egrave"],["\u00e9","eacute"],["\u00ea","ecirc"],["\u00eb","euml"],["\u00ec","igrave"],["\u00ed","iacute"],["\u00ee","icirc"],["\u00ef","iuml"],["\u00f0","eth"],["\u00f1","ntilde"],["\u00f2","ograve"],["\u00f3","oacute"],["\u00f4",
"ocirc"],["\u00f5","otilde"],["\u00f6","ouml"],["\u00f7","divide"],["\u00f8","oslash"],["\u00f9","ugrave"],["\u00fa","uacute"],["\u00fb","ucirc"],["\u00fc","uuml"],["\u00fd","yacute"],["\u00fe","thorn"],["\u00ff","yuml"],["\u0192","fnof"],["\u0391","Alpha"],["\u0392","Beta"],["\u0393","Gamma"],["\u0394","Delta"],["\u0395","Epsilon"],["\u0396","Zeta"],["\u0397","Eta"],["\u0398","Theta"],["\u0399","Iota"],["\u039a","Kappa"],["\u039b","Lambda"],["\u039c","Mu"],["\u039d","Nu"],["\u039e","Xi"],["\u039f",
"Omicron"],["\u03a0","Pi"],["\u03a1","Rho"],["\u03a3","Sigma"],["\u03a4","Tau"],["\u03a5","Upsilon"],["\u03a6","Phi"],["\u03a7","Chi"],["\u03a8","Psi"],["\u03a9","Omega"],["\u03b1","alpha"],["\u03b2","beta"],["\u03b3","gamma"],["\u03b4","delta"],["\u03b5","epsilon"],["\u03b6","zeta"],["\u03b7","eta"],["\u03b8","theta"],["\u03b9","iota"],["\u03ba","kappa"],["\u03bb","lambda"],["\u03bc","mu"],["\u03bd","nu"],["\u03be","xi"],["\u03bf","omicron"],["\u03c0","pi"],["\u03c1","rho"],["\u03c2","sigmaf"],["\u03c3",
"sigma"],["\u03c4","tau"],["\u03c5","upsilon"],["\u03c6","phi"],["\u03c7","chi"],["\u03c8","psi"],["\u03c9","omega"],["\u03d1","thetasym"],["\u03d2","upsih"],["\u03d6","piv"],["\u2022","bull"],["\u2026","hellip"],["\u2032","prime"],["\u2033","Prime"],["\u203e","oline"],["\u2044","frasl"],["\u2118","weierp"],["\u2111","image"],["\u211c","real"],["\u2122","trade"],["\u2135","alefsym"],["\u2190","larr"],["\u2191","uarr"],["\u2192","rarr"],["\u2193","darr"],["\u2194","harr"],["\u21b5","crarr"],["\u21d0",
"lArr"],["\u21d1","uArr"],["\u21d2","rArr"],["\u21d3","dArr"],["\u21d4","hArr"],["\u2200","forall"],["\u2202","part"],["\u2203","exist"],["\u2205","empty"],["\u2207","nabla"],["\u2208","isin"],["\u2209","notin"],["\u220b","ni"],["\u220f","prod"],["\u2211","sum"],["\u2212","minus"],["\u2217","lowast"],["\u221a","radic"],["\u221d","prop"],["\u221e","infin"],["\u2220","ang"],["\u2227","and"],["\u2228","or"],["\u2229","cap"],["\u222a","cup"],["\u222b","int"],["\u2234","there4"],["\u223c","sim"],["\u2245",
"cong"],["\u2248","asymp"],["\u2260","ne"],["\u2261","equiv"],["\u2264","le"],["\u2265","ge"],["\u2282","sub"],["\u2283","sup"],["\u2284","nsub"],["\u2286","sube"],["\u2287","supe"],["\u2295","oplus"],["\u2297","otimes"],["\u22a5","perp"],["\u22c5","sdot"],["\u2308","lceil"],["\u2309","rceil"],["\u230a","lfloor"],["\u230b","rfloor"],["\u2329","lang"],["\u232a","rang"],["\u25ca","loz"],["\u2660","spades"],["\u2663","clubs"],["\u2665","hearts"],["\u2666","diams"],["\u0152","OElig"],["\u0153","oelig"],
["\u0160","Scaron"],["\u0161","scaron"],["\u0178","Yuml"],["\u02c6","circ"],["\u02dc","tilde"],["\u2002","ensp"],["\u2003","emsp"],["\u2009","thinsp"],["\u200c","zwnj"],["\u200d","zwj"],["\u200e","lrm"],["\u200f","rlm"],["\u2013","ndash"],["\u2014","mdash"],["\u2018","lsquo"],["\u2019","rsquo"],["\u201a","sbquo"],["\u201c","ldquo"],["\u201d","rdquo"],["\u201e","bdquo"],["\u2020","dagger"],["\u2021","Dagger"],["\u2030","permil"],["\u2039","lsaquo"],["\u203a","rsaquo"]];l.encode=function(k,e){k&&(e?
k=q(k,e):(k=q(k,l.html),k=q(k,l.latin)));return k};l.decode=function(k,e){k&&(e?k=p(k,e):(k=p(k,l.html),k=p(k,l.latin)));return k};return l})},"esri/tasks/RelationshipQuery":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/json","dojo/has","../kernel"],function(r,l,q,p,k){r=r(null,{declaredClass:"esri.tasks.RelationshipQuery",definitionExpression:"",relationshipId:null,returnGeometry:!1,objectIds:null,outSpatialReference:null,outFields:null,toJson:function(){var e={definitionExpression:this.definitionExpression,
relationshipId:this.relationshipId,returnGeometry:this.returnGeometry,maxAllowableOffset:this.maxAllowableOffset,geometryPrecision:this.geometryPrecision},f=this.objectIds,h=this.outFields,d=this.outSpatialReference;f&&(e.objectIds=f.join(","));h&&(e.outFields=h.join(","));d&&(e.outSR=d.wkid||q.toJson(d.toJson()));e._ts=this._ts;return e}});p("extend-esri")&&l.setObject("tasks.RelationshipQuery",r,k);return r})},"esri/dijit/PopupRenderer":function(){define("require dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array dojo/_base/kernel dojo/sniff dojo/query dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-style dojox/html/entities dijit/_Widget dijit/_Templated ../kernel ../lang ../urlUtils ./_EventedWidget dojo/i18n!../nls/jsapi dojo/NodeList-dom".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n,t,A,y,z){var v=0,B=z.widgets.popup,C=z.widgets.templatePicker;l=l([y,m,u],{declaredClass:"esri.dijit._PopupRenderer",constructor:function(){this._nls=p.mixin({},B)},templateString:"\x3cdiv class\x3d'esriViewPopup'\x3e\x3cdiv class\x3d'statusSection hidden' dojoAttachPoint\x3d'_status'\x3e\x3c/div\x3e\x3cdiv class\x3d'mainSection'\x3e\x3cdiv class\x3d'header' dojoAttachPoint\x3d'_title'\x3e\x3c/div\x3e\x3cdiv class\x3d'hzLine'\x3e\x3c/div\x3e\x3cdiv dojoAttachPoint\x3d'_description'\x3e\x3c/div\x3e\x3cdiv class\x3d'break'\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'attachmentsSection hidden'\x3e\x3cdiv\x3e${_nls.NLS_attach}:\x3c/div\x3e\x3cul dojoAttachPoint\x3d'_attachmentsList'\x3e\x3c/ul\x3e\x3cdiv class\x3d'break'\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'mediaSection hidden'\x3e\x3cdiv class\x3d'header' dojoAttachPoint\x3d'_mediaTitle'\x3e\x3c/div\x3e\x3cdiv class\x3d'hzLine'\x3e\x3c/div\x3e\x3cdiv class\x3d'caption' dojoAttachPoint\x3d'_mediaCaption'\x3e\x3c/div\x3e\x3cdiv class\x3d'gallery' dojoAttachPoint\x3d'_gallery'\x3e\x3cdiv class\x3d'mediaHandle prev' dojoAttachPoint\x3d'_prevMedia' dojoAttachEvent\x3d'onclick: _goToPrevMedia'\x3e\x3c/div\x3e\x3cdiv class\x3d'mediaHandle next' dojoAttachPoint\x3d'_nextMedia' dojoAttachEvent\x3d'onclick: _goToNextMedia'\x3e\x3c/div\x3e\x3cul class\x3d'summary'\x3e\x3cli class\x3d'image mediaCount hidden' dojoAttachPoint\x3d'_imageCount'\x3e0\x3c/li\x3e\x3cli class\x3d'image mediaIcon hidden'\x3e\x3c/li\x3e\x3cli class\x3d'chart mediaCount hidden' dojoAttachPoint\x3d'_chartCount'\x3e0\x3c/li\x3e\x3cli class\x3d'chart mediaIcon hidden'\x3e\x3c/li\x3e\x3c/ul\x3e\x3cdiv class\x3d'frame' dojoAttachPoint\x3d'_mediaFrame'\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d'editSummarySection hidden' dojoAttachPoint\x3d'_editSummarySection'\x3e\x3cdiv class\x3d'break'\x3e\x3c/div\x3e\x3cdiv class\x3d'break hidden' dojoAttachPoint\x3d'_mediaBreak'\x3e\x3c/div\x3e\x3cdiv class\x3d'editSummary' dojoAttachPoint\x3d'_editSummary'\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e",
showTitle:!0,startup:function(){this.inherited(arguments);this._showStatus(C.loading);this._contentDfd=this.template.getComponents(this.graphic).then(p.hitch(this,this._handleComponentsSuccess)).otherwise(p.hitch(this,this._handleComponentsError))},destroy:function(){this._contentDfd&&this._contentDfd.cancel();this._attachmentsDfd&&this._attachmentsDfd.cancel();this._destroyFrame();this.template=this.graphic=this._nls=this._mediaInfos=this._mediaPtr=this._contentDfd=this._attachmentsDfd=null;this.inherited(arguments)},
_goToPrevMedia:function(){0>this._mediaPtr-1||(this._mediaPtr--,this._updateUI(),this._displayMedia())},_goToNextMedia:function(){this._mediaPtr+1!==this._mediaInfos.length&&(this._mediaPtr++,this._updateUI(),this._displayMedia())},_updateUI:function(){var a=this._mediaInfos,d=a.length,g=this.domNode,m=this._prevMedia,f=this._nextMedia;if(1<d){var h=0,n=0;k.forEach(a,function(a){"image"===a.type?h++:-1!==a.type.indexOf("chart")&&n++});h&&(b.set(this._imageCount,"innerHTML",h),e.query(".summary .image",
g).removeClass("hidden"));n&&(b.set(this._chartCount,"innerHTML",n),e.query(".summary .chart",g).removeClass("hidden"))}else e.query(".summary",g).addClass("hidden"),c.add(m,"hidden"),c.add(f,"hidden");a=this._mediaPtr;0===a?c.add(m,"hidden"):c.remove(m,"hidden");a===d-1?c.add(f,"hidden"):c.remove(f,"hidden");this._destroyFrame()},_displayMedia:function(){var a=this._mediaInfos[this._mediaPtr],d=a.title,g=a.caption,m=e.query(".mediaSection .hzLine",this.domNode)[0];b.set(this._mediaTitle,"innerHTML",
d);c[d?"remove":"add"](this._mediaTitle,"hidden");b.set(this._mediaCaption,"innerHTML",g);c[g?"remove":"add"](this._mediaCaption,"hidden");c[d&&g?"remove":"add"](m,"hidden");this._rid=null;if("image"===a.type)this._showImage(a);else{var f=this,d=["dojox/charting/Chart2D","dojox/charting/action2d/Tooltip"],g=a.value.theme||this.chartTheme;p.isString(g)&&(g=g.replace(/\./gi,"/"),-1===g.indexOf("/")&&(g="dojox/charting/themes/"+g));g||(g="./Rainbow");d.push(g);try{var h=this._rid=v++;r(d,function(b,
c,d){h===f._rid&&(f._rid=null,f._showChart(a.type,a.value,b,c,d))})}catch(x){console.log("PopupRenderer: error loading modules")}}},_preventNewTab:function(a){return(a=a&&p.trim(a).toLowerCase())&&(0===a.indexOf("mailto:")||0===a.indexOf("tel:"))},_showImage:function(b){c.add(this._mediaFrame,"image");var d=g.get(this._gallery,"height"),m=b.value,f;m.linkURL&&(f=a.create("a",{href:m.linkURL,target:this._preventNewTab(m.linkURL)?"":"_blank"},this._mediaFrame));m=b.refreshInterval?this._addURLParameter(m.sourceURL,
"timestamp",Date.now()):m.sourceURL;a.create("img",{className:"esriPopupMediaImage",src:m},f||this._mediaFrame);var h=e.query(".esriPopupMediaImage",this._mediaFrame)[0];this._imageLoadHandle=q.connect(h,"onload",this,function(){this._clearImageHandles();this._imageLoaded(h,d);this._initImageRefresh(b)})},_addURLParameter:function(a,b,c){var d=-1===a.indexOf("?")?"?":"\x26";return a+d+b+"\x3d"+c},_initImageRefresh:function(a){if(a.refreshInterval){var b=6E4*a.refreshInterval;this._imageRefreshHandle=
setTimeout(p.hitch(this,function(){this._destroyFrame();this._showImage(a)}),b)}},_clearImageHandles:function(){q.disconnect(this._imageLoadHandle);this._imageLoadHandle=null;clearTimeout(this._imageRefreshHandle);this._imageRefreshHandle=null},_showChart:function(b,d,g,e,m){c.remove(this._mediaFrame,"image");g=this._chart=new g(a.create("div",{"class":"chart"},this._mediaFrame),{margins:{l:4,t:4,r:4,b:4}});m&&g.setTheme(m);switch(b){case "piechart":g.addPlot("default",{type:"Pie",labels:!1});g.addSeries("Series A",
d.fields);break;case "linechart":g.addPlot("default",{type:"Markers"});g.addAxis("x",{min:0,majorTicks:!1,minorTicks:!1,majorLabels:!1,minorLabels:!1});g.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});k.forEach(d.fields,function(a,b){a.x=b+1});g.addSeries("Series A",d.fields);break;case "columnchart":g.addPlot("default",{type:"Columns",gap:3});g.addAxis("y",{includeZero:!0,vertical:!0,fixUpper:"minor"});g.addSeries("Series A",d.fields);break;case "barchart":g.addPlot("default",{type:"Bars",
gap:3}),g.addAxis("x",{includeZero:!0,fixUpper:"minor",minorLabels:!1}),g.addAxis("y",{vertical:!0,majorTicks:!1,minorTicks:!1,majorLabels:!1,minorLabels:!1}),g.addSeries("Series A",d.fields)}this._action=new e(g);g.render()},_destroyFrame:function(){this._rid=null;this._clearImageHandles();this._chart&&(this._chart.destroy(),this._chart=null);this._action&&(this._action.destroy(),this._action=null);b.set(this._mediaFrame,"innerHTML","")},_imageLoaded:function(a,b){var c=a.height;c<b&&g.set(a,"marginTop",
Math.round((b-c)/2)+"px")},_attListHandler:function(a,c){if(a===this._attachmentsDfd){this._attachmentsDfd=null;var d="";c instanceof Error||!c||!c.length||k.forEach(c,function(a){d+="\x3cli\x3e";d+="\x3ca href\x3d'"+A.addProxy(a.url)+"' target\x3d'_blank'\x3e"+(a.name||"[No name]")+"\x3c/a\x3e";d+="\x3c/li\x3e"});b.set(this._attachmentsList,"innerHTML",d||"\x3cli\x3e"+this._nls.NLS_noAttach+"\x3c/li\x3e")}},_supportedURIInfos:[{pattern:/^\s*(https?:\/\/([^\s]+))\s*$/i,label:B.NLS_moreInfo},{pattern:/^\s*(tel:([^\s]+))\s*$/i,
label:"${hierPart}"},{pattern:/^\s*(mailto:([^\s]+))\s*$/i,label:"${hierPart}"},{pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i,appName:"App Studio Player",label:B.NLS_openLinkInApp},{pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i,appName:"Collector",label:B.NLS_openLinkInApp},{pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i,appName:"Explorer",label:B.NLS_openLinkInApp},{pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i,appName:"Navigator",label:B.NLS_openLinkInApp},{pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i,
appName:"Survey123",label:B.NLS_openLinkInApp},{pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i,appName:"Trek2There",label:B.NLS_openLinkInApp},{pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i,appName:"Workforce",label:B.NLS_openLinkInApp},{pattern:/^\s*(iform:\/\/([^\s]+))\s*$/i,appName:"iForm",label:B.NLS_openLinkInApp},{pattern:/^\s*(flow:\/\/([^\s]+))\s*$/i,appName:"FlowFinity",label:B.NLS_openLinkInApp},{pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/i,appName:"Laserfische",label:B.NLS_openLinkInApp},
{pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/i,appName:"Microsoft Power BI",label:B.NLS_openLinkInApp}],_findURIInfo:function(a){var b;k.some(this._supportedURIInfos,function(c){c.pattern.test(a)&&(b=c);return!!b});return b},_createLinkIfURI:function(a){var b=this._findURIInfo(a);if(b){var c=a.match(b.pattern);return a.replace(b.pattern,"\x3ca target\x3d'_blank' href\x3d'$1' title\x3d'$1'\x3e"+t.substitute({appName:b.appName,hierPart:c&&c[2]},b.label)+"\x3c/a\x3e")}return a},_showStatus:function(a){b.set(this._status,
"innerHTML",a);c.remove(this._status,"hidden");e.query(".mainSection",this.domNode).addClass("hidden")},_hideStatus:function(){b.set(this._status,"innerHTML","");c.add(this._status,"hidden");e.query(".mainSection",this.domNode).removeClass("hidden")},_handleComponentsSuccess:function(a){if(a){this._hideStatus();var g=this.showTitle?a.title:"",m=a.description,f=a.fields,h=a.mediaInfos,n=this.domNode,x=this._nls,t=this,u=this.template,l=this.graphic;this._prevMedia.title=x.NLS_prevMedia;this._nextMedia.title=
x.NLS_nextMedia;b.set(this._title,"innerHTML",g);g||c.add(this._title,"hidden");!a.hasDescription&&f&&(m="",k.forEach(f,function(a){m+="\x3ctr valign\x3d'top'\x3e";m+="\x3ctd class\x3d'attrName'\x3e"+w.encode(a[0])+"\x3c/td\x3e";m+="\x3ctd class\x3d'attrValue'\x3e"+this._createLinkIfURI(a[1])+"\x3c/td\x3e";m+="\x3c/tr\x3e"},this),m&&(m="\x3ctable class\x3d'attrTable' cellpadding\x3d'0px' cellspacing\x3d'0px'\x3e"+m+"\x3c/table\x3e"));b.set(this._description,"innerHTML",m);m||c.add(this._description,
"hidden");e.query("a",this._description).forEach(function(a){t._preventNewTab(a.href)?"_blank"===a.target&&b.remove(a,"target"):b.set(a,"target","_blank")});g&&m?e.query(".mainSection .hzLine",n).removeClass("hidden"):g||m?e.query(".mainSection .hzLine",n).addClass("hidden"):e.query(".mainSection",n).addClass("hidden");if(g=this._attachmentsDfd=u.getAttachments(l))g.addBoth(p.hitch(this,this._attListHandler,g)),b.set(this._attachmentsList,"innerHTML","\x3cli\x3e"+x.NLS_searching+"...\x3c/li\x3e"),
e.query(".attachmentsSection",n).removeClass("hidden");h&&h.length&&(e.query(".mediaSection",n).removeClass("hidden"),d.setSelectable(this._mediaFrame,!1),this._mediaInfos=h,this._mediaPtr=0,this._updateUI(),this._displayMedia());a.editSummary&&(b.set(this._editSummary,"innerHTML",a.editSummary),h&&h.length&&c.remove(this._mediaBreak,"hidden"),c.remove(this._editSummarySection,"hidden"));this.emit("content-update")}else this._showStatus(B.NLS_noInfo)},_handleComponentsError:function(a){a&&"cancel"===
a.dojoType||(console.log("PopupRenderer: error loading template",a),this._showStatus(B.NLS_noInfo))}});f("extend-esri")&&p.setObject("dijit._PopupRenderer",l,n);return l})},"dijit/_Widget":function(){define("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".split(" "),function(r,l,q,p,k,e,f,h,d,b,c,a,g){function w(){}function m(a){return function(b,
c,d,g){return b&&"string"==typeof c&&b[c]==w?b.on(c.substring(2).toLowerCase(),f.hitch(d,g)):a.apply(q,arguments)}}r.around(q,"connect",m);e.connect&&r.around(e,"connect",m);r=p("dijit._Widget",[c,a,g],{onClick:w,onDblClick:w,onKeyDown:w,onKeyPress:w,onKeyUp:w,onMouseDown:w,onMouseMove:w,onMouseOut:w,onMouseOver:w,onMouseLeave:w,onMouseEnter:w,onMouseUp:w,constructor:function(a){this._toConnect={};for(var b in a)this[b]===w&&(this._toConnect[b.replace(/^on/,"").toLowerCase()]=a[b],delete a[b])},postCreate:function(){this.inherited(arguments);
for(var a in this._toConnect)this.on(a,this._toConnect[a]);delete this._toConnect},on:function(a,b){return this[this._onMap(a)]===w?q.connect(this.domNode,a.toLowerCase(),this,b):this.inherited(arguments)},_setFocusedAttr:function(a){this._focused=a;this._set("focused",a)},setAttribute:function(a,b){e.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,b)},attr:function(a,b){return 2<=arguments.length||"object"===typeof a?this.set.apply(this,
arguments):this.get(a)},getDescendants:function(){e.deprecated(this.declaredClass+"::getDescendants() is deprecated. Use getChildren() instead.","","2.0");return this.containerNode?h("[widgetId]",this.containerNode).map(b.byNode):[]},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}});k("dijit-legacy-requires")&&d(0,function(){require(["dijit/_base"])});return r})},"dijit/_WidgetBase":function(){define("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 dojo/has!dojo-bidi?./_BidiMixin ./registry".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n,t,A,y,z,v,B){function C(a){return function(b){h[b?"set":"remove"](this.domNode,a,b);this._set(a,b)}}g.add("dijit-legacy-requires",!w.isAsync);g.add("dojo-bidi",!1);g("dijit-legacy-requires")&&n(0,function(){r(["dijit/_base/manager"])});var F={};p=e("dijit._WidgetBase",[t,z],{id:"",_setIdAttr:"domNode",lang:"",_setLangAttr:C("lang"),dir:"",_setDirAttr:C("dir"),"class":"",_setClassAttr:{node:"domNode",type:"class"},_setTypeAttr:null,style:"",title:"",tooltip:"",
baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,ownerDocument:null,_setOwnerDocumentAttr:function(a){this._set("ownerDocument",a)},attributeMap:{},_blankGif:p.blankGif||r.toUrl("dojo/resources/blank.gif"),textDir:"",_introspect:function(){var a=this.constructor;if(!a._setterAttrs){var b=a.prototype,c=a._setterAttrs=[],a=a._onMap={},d;for(d in b.attributeMap)c.push(d);for(d in b)/^on/.test(d)&&(a[d.substring(2).toLowerCase()]=d),/^_set[A-Z](.*)Attr$/.test(d)&&(d=d.charAt(4).toLowerCase()+
d.substr(5,d.length-9),b.attributeMap&&d in b.attributeMap||c.push(d))}},postscript:function(a,b){this.create(a,b)},create:function(a,b){this._introspect();this.srcNodeRef=f.byId(b);this._connects=[];this._supportingWidgets=[];this.srcNodeRef&&this.srcNodeRef.id&&"string"==typeof this.srcNodeRef.id&&(this.id=this.srcNodeRef.id);a&&(this.params=a,m.mixin(this,a));this.postMixInProperties();this.id||(this.id=B.getUniqueId(this.declaredClass.replace(/\./g,"_")),this.params&&delete this.params.id);this.ownerDocument=
this.ownerDocument||(this.srcNodeRef?this.srcNodeRef.ownerDocument:document);this.ownerDocumentBody=y.body(this.ownerDocument);B.add(this);this.buildRendering();var c;if(this.domNode){this._applyAttributes();var d=this.srcNodeRef;d&&d.parentNode&&this.domNode!==d&&(d.parentNode.replaceChild(this.domNode,d),c=!0);this.domNode.setAttribute("widgetId",this.id)}this.postCreate();c&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a={},b;for(b in this.params||{})a[b]=this._get(b);
l.forEach(this.constructor._setterAttrs,function(b){if(!(b in a)){var c=this._get(b);c&&this.set(b,c)}},this);for(b in a)this.set(b,a[b])},postMixInProperties:function(){},buildRendering:function(){this.domNode||(this.domNode=this.srcNodeRef||this.ownerDocument.createElement("div"));if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(l.map(a,function(a){return a+"Rtl"})));d.add(this.domNode,a)}},postCreate:function(){},startup:function(){this._started||(this._started=
!0,l.forEach(this.getChildren(),function(a){a._started||a._destroyed||!m.isFunction(a.startup)||(a.startup(),a._started=!0)}))},destroyRecursive:function(a){this._beingDestroyed=!0;this.destroyDescendants(a);this.destroy(a)},destroy:function(a){function b(b){b.destroyRecursive?b.destroyRecursive(a):b.destroy&&b.destroy(a)}this._beingDestroyed=!0;this.uninitialize();l.forEach(this._connects,m.hitch(this,"disconnect"));l.forEach(this._supportingWidgets,b);this.domNode&&l.forEach(B.findWidgets(this.domNode,
this.containerNode),b);this.destroyRendering(a);B.remove(this.id);this._destroyed=!0},destroyRendering:function(a){this.bgIframe&&(this.bgIframe.destroy(a),delete this.bgIframe);this.domNode&&(a?h.remove(this.domNode,"widgetId"):b.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(a||b.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){l.forEach(this.getChildren(),function(b){b.destroyRecursive&&b.destroyRecursive(a)})},uninitialize:function(){return!1},_setStyleAttr:function(b){var c=
this.domNode;m.isObject(b)?a.set(c,b):c.style.cssText=c.style.cssText?c.style.cssText+("; "+b):b;this._set("style",b)},_attrToDom:function(a,b,c){c=3<=arguments.length?c:this.attributeMap[a];l.forEach(m.isArray(c)?c:[c],function(c){var g=this[c.node||c||"domNode"];switch(c.type||"attribute"){case "attribute":m.isFunction(b)&&(b=m.hitch(this,b));c=c.attribute?c.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;g.tagName?h.set(g,c,b):g.set(c,b);break;case "innerText":g.innerHTML="";g.appendChild(this.ownerDocument.createTextNode(b));
break;case "innerHTML":g.innerHTML=b;break;case "class":d.replace(g,b,this[a]);break;case "toggleClass":d.toggle(g,c.className||a,b)}},this)},get:function(a){var b=this._getAttrNames(a);return this[b.g]?this[b.g]():this._get(a)},set:function(a,b){if("object"===typeof a){for(var c in a)this.set(c,a[c]);return this}c=this._getAttrNames(a);var d=this[c.s];if(m.isFunction(d))var g=d.apply(this,Array.prototype.slice.call(arguments,1));else{var d=this.focusNode&&!m.isFunction(this.focusNode)?"focusNode":
"domNode",e=this[d]&&this[d].tagName,f;if((f=e)&&!(f=F[e])){f=this[d];var h={},n;for(n in f)h[n.toLowerCase()]=!0;f=F[e]=h}n=f;c=a in this.attributeMap?this.attributeMap[a]:c.s in this?this[c.s]:n&&c.l in n&&"function"!=typeof b||/^aria-|^data-|^role$/.test(a)?d:null;null!=c&&this._attrToDom(a,b,c);this._set(a,b)}return g||this},_attrPairNames:{},_getAttrNames:function(a){var b=this._attrPairNames;if(b[a])return b[a];var c=a.replace(/^[a-z]|-[a-zA-Z]/g,function(a){return a.charAt(a.length-1).toUpperCase()});
return b[a]={n:a+"Node",s:"_set"+c+"Attr",g:"_get"+c+"Attr",l:c.toLowerCase()}},_set:function(a,b){var c=this[a];this[a]=b;!this._created||c===b||c!==c&&b!==b||(this._watchCallbacks&&this._watchCallbacks(a,c,b),this.emit("attrmodified-"+a,{detail:{prevValue:c,newValue:b}}))},_get:function(a){return this[a]},emit:function(a,b,c){b=b||{};void 0===b.bubbles&&(b.bubbles=!0);void 0===b.cancelable&&(b.cancelable=!0);b.detail||(b.detail={});b.detail.widget=this;var d,g=this["on"+a];g&&(d=g.apply(this,c?
c:[b]));this._started&&!this._beingDestroyed&&u.emit(this.domNode,a.toLowerCase(),b);return d},on:function(a,b){var c=this._onMap(a);return c?q.after(this,c,b,!0):this.own(u(this.domNode,a,b))[0]},_onMap:function(a){var b=this.constructor,c=b._onMap;if(!c){var c=b._onMap={},d;for(d in b.prototype)/^on/.test(d)&&(c[d.replace(/^on/,"").toLowerCase()]=d)}return c["string"==typeof a&&a.toLowerCase()]},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getChildren:function(){return this.containerNode?
B.findWidgets(this.containerNode):[]},getParent:function(){return B.getEnclosingWidget(this.domNode.parentNode)},connect:function(a,b,c){return this.own(k.connect(a,b,this,c))[0]},disconnect:function(a){a.remove()},subscribe:function(a,b){return this.own(A.subscribe(a,m.hitch(this,b)))[0]},unsubscribe:function(a){a.remove()},isLeftToRight:function(){return this.dir?"ltr"==this.dir.toLowerCase():c.isBodyLtr(this.ownerDocument)},isFocusable:function(){return this.focus&&"none"!=a.get(this.domNode,"display")},
placeAt:function(a,c){var d=!a.tagName&&B.byId(a);!d||!d.addChild||c&&"number"!==typeof c?(d=d&&"domNode"in d?d.containerNode&&!/after|before|replace/.test(c||"")?d.containerNode:d.domNode:f.byId(a,this.ownerDocument),b.place(this.domNode,d,c),!this._started&&(this.getParent()||{})._started&&this.startup()):d.addChild(this,c);return this},defer:function(a,b){var c=setTimeout(m.hitch(this,function(){c&&(c=null,this._destroyed||m.hitch(this,a)())}),b||0);return{remove:function(){c&&(clearTimeout(c),
c=null);return null}}}});g("dojo-bidi")&&p.extend(v);return p})},"dijit/Destroyable":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare"],function(r,l,q){return q("dijit.Destroyable",null,{destroy:function(l){this._destroyed=!0},own:function(){var p=["destroyRecursive","destroy","remove"];r.forEach(arguments,function(k){function e(){h.remove();r.forEach(d,function(b){b.remove()})}var f,h=l.before(this,"destroy",function(b){k[f](b)}),d=[];k.then?(f="cancel",k.then(e,e)):r.forEach(p,
function(b){"function"===typeof k[b]&&(f||(f=b),d.push(l.after(k,b,e,!0)))})},this);return arguments}})})},"dijit/_OnDijitClickMixin":function(){define("dojo/on dojo/_base/array dojo/keys dojo/_base/declare dojo/has ./a11yclick".split(" "),function(r,l,q,p,k,e){r=p("dijit._OnDijitClickMixin",null,{connect:function(f,h,d){return this.inherited(arguments,[f,"ondijitclick"==h?e:h,d])}});r.a11yclick=e;return r})},"dijit/_FocusMixin":function(){define(["./focus","./_WidgetBase","dojo/_base/declare","dojo/_base/lang"],
function(r,l,q,p){p.extend(l,{focused:!1,onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()}});return q("dijit._FocusMixin",null,{_focusManager:r})})},"dijit/hccss":function(){define(["dojo/dom-class","dojo/hccss","dojo/domReady","dojo/_base/window"],function(r,l,q,p){q(function(){l("highcontrast")&&r.add(p.body(),"dijit_a11y")});return l})},"dojo/hccss":function(){define("require ./_base/config ./dom-class ./dom-style ./has ./domReady ./_base/window".split(" "),
function(r,l,q,p,k,e,f){k.add("highcontrast",function(){var e=f.doc.createElement("div");try{e.style.cssText='border: 1px solid; border-color:red green; position: absolute; height: 5px; top: -999px;background-image: url("'+(l.blankGif||r.toUrl("./resources/blank.gif"))+'");';f.body().appendChild(e);var d=p.getComputedStyle(e),b=d.backgroundImage;return d.borderTopColor==d.borderRightColor||b&&("none"==b||"url(invalid-url:)"==b)}catch(c){return console.warn("hccss: exception detecting high-contrast mode, document is likely hidden: "+
c.toString()),!1}finally{8>=k("ie")?e.outerHTML="":f.body().removeChild(e)}});e(function(){k("highcontrast")&&q.add(f.body(),"dj_a11y")});return k})},"dijit/_Templated":function(){define("./_WidgetBase ./_TemplatedMixin ./_WidgetsInTemplateMixin dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/_base/kernel".split(" "),function(r,l,q,p,k,e,f){e.extend(r,{waiRole:"",waiState:""});return k("dijit._Templated",[l,q],{constructor:function(){f.deprecated(this.declaredClass+": dijit._Templated deprecated, use dijit._TemplatedMixin and if necessary dijit._WidgetsInTemplateMixin",
"","2.0")},_processNode:function(e,d){var b=this.inherited(arguments),c=d(e,"waiRole");c&&e.setAttribute("role",c);(c=d(e,"waiState"))&&p.forEach(c.split(/\s*,\s*/),function(a){-1!=a.indexOf("-")&&(a=a.split("-"),e.setAttribute("aria-"+a[0],a[1]))});return b}})})},"dijit/_TemplatedMixin":function(){define("dojo/cache dojo/_base/declare dojo/dom-construct dojo/_base/lang dojo/on dojo/sniff dojo/string ./_AttachMixin".split(" "),function(r,l,q,p,k,e,f,h){var d=l("dijit._TemplatedMixin",h,{templateString:null,
templatePath:null,_skipNodeCache:!1,searchContainerNode:!0,_stringRepl:function(b){var c=this.declaredClass,a=this;return f.substitute(b,this,function(b,d){"!"==d.charAt(0)&&(b=p.getObject(d.substr(1),!1,a));if("undefined"==typeof b)throw Error(c+" template:"+d);return null==b?"":"!"==d.charAt(0)?b:this._escapeValue(""+b)},this)},_escapeValue:function(b){return b.replace(/["'<>&]/g,function(b){return{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;"}[b]})},buildRendering:function(){if(!this._rendered){this.templateString||
(this.templateString=r(this.templatePath,{sanitize:!0}));var b=d.getCachedTemplate(this.templateString,this._skipNodeCache,this.ownerDocument),c;if(p.isString(b)){if(c=q.toDom(this._stringRepl(b),this.ownerDocument),1!=c.nodeType)throw Error("Invalid template: "+b);}else c=b.cloneNode(!0);this.domNode=c}this.inherited(arguments);this._rendered||this._fillContent(this.srcNodeRef);this._rendered=!0},_fillContent:function(b){var c=this.containerNode;if(b&&c)for(;b.hasChildNodes();)c.appendChild(b.firstChild)}});
d._templateCache={};d.getCachedTemplate=function(b,c,a){var g=d._templateCache,e=b,m=g[e];if(m){try{if(!m.ownerDocument||m.ownerDocument==(a||document))return m}catch(u){}q.destroy(m)}b=f.trim(b);if(c||b.match(/\$\{([^\}]+)\}/g))return g[e]=b;c=q.toDom(b,a);if(1!=c.nodeType)throw Error("Invalid template: "+b);return g[e]=c};e("ie")&&k(window,"unload",function(){var b=d._templateCache,c;for(c in b){var a=b[c];"object"==typeof a&&q.destroy(a);delete b[c]}});return d})},"dojo/cache":function(){define(["./_base/kernel",
"./text"],function(r){return r.cache})},"dijit/_AttachMixin":function(){define("require dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang dojo/mouse dojo/on dojo/touch ./_WidgetBase".split(" "),function(r,l,q,p,k,e,f,h,d){var b=k.delegate(h,{mouseenter:e.enter,mouseleave:e.leave,keypress:q._keypress}),c;q=p("dijit._AttachMixin",null,{constructor:function(){this._attachPoints=[];this._attachEvents=[]},buildRendering:function(){this.inherited(arguments);this._attachTemplateNodes(this.domNode);
this._beforeFillContent()},_beforeFillContent:function(){},_attachTemplateNodes:function(a){for(var b=a;;)if(1==b.nodeType&&(this._processTemplateNode(b,function(a,b){return a.getAttribute(b)},this._attach)||this.searchContainerNode)&&b.firstChild)b=b.firstChild;else{if(b==a)break;for(;!b.nextSibling;)if(b=b.parentNode,b==a)return;b=b.nextSibling}},_processTemplateNode:function(a,b,c){var d=!0,g=this.attachScope||this,e=b(a,"dojoAttachPoint")||b(a,"data-dojo-attach-point");if(e)for(var f=e.split(/\s*,\s*/);e=
f.shift();)k.isArray(g[e])?g[e].push(a):g[e]=a,d="containerNode"!=e,this._attachPoints.push(e);if(b=b(a,"dojoAttachEvent")||b(a,"data-dojo-attach-event"))for(e=b.split(/\s*,\s*/),f=k.trim;b=e.shift();)if(b){var h=null;-1!=b.indexOf(":")?(h=b.split(":"),b=f(h[0]),h=f(h[1])):b=f(b);h||(h=b);this._attachEvents.push(c(a,b,k.hitch(g,h)))}return d},_attach:function(a,d,e){d=d.replace(/^on/,"").toLowerCase();d="dijitclick"==d?c||(c=r("./a11yclick")):b[d]||d;return f(a,d,e)},_detachTemplateNodes:function(){var a=
this.attachScope||this;l.forEach(this._attachPoints,function(b){delete a[b]});this._attachPoints=[];l.forEach(this._attachEvents,function(a){a.remove()});this._attachEvents=[]},destroyRendering:function(){this._detachTemplateNodes();this.inherited(arguments)}});k.extend(d,{dojoAttachEvent:"",dojoAttachPoint:""});return q})},"dijit/_WidgetsInTemplateMixin":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang","dojo/parser"],function(r,l,q,p,k){return q("dijit._WidgetsInTemplateMixin",
null,{_earlyTemplatedStartup:!1,contextRequire:null,_beforeFillContent:function(){if(/dojoType|data-dojo-type/i.test(this.domNode.innerHTML)){var e=this.domNode;this.containerNode&&!this.searchContainerNode&&(this.containerNode.stopParser=!0);k.parse(e,{noStart:!this._earlyTemplatedStartup,template:!0,inherited:{dir:this.dir,lang:this.lang,textDir:this.textDir},propsThis:this,contextRequire:this.contextRequire,scope:"dojo"}).then(p.hitch(this,function(e){this._startupWidgets=e;for(var f=0;f<e.length;f++)this._processTemplateNode(e[f],
function(d,b){return d[b]},function(d,b,c){return b in d?d.connect(d,b,c):d.on(b,c,!0)});this.containerNode&&this.containerNode.stopParser&&delete this.containerNode.stopParser}));if(!this._startupWidgets)throw Error(this.declaredClass+": parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin.   Must pre-load all supporting widgets before instantiation.");}},_processTemplateNode:function(e,f,h){return f(e,"dojoType")||f(e,"data-dojo-type")?
!0:this.inherited(arguments)},startup:function(){r.forEach(this._startupWidgets,function(e){e&&!e._started&&e.startup&&e.startup()});this._startupWidgets=null;this.inherited(arguments)}})})},"dojo/parser":function(){define("require ./_base/kernel ./_base/lang ./_base/array ./_base/config ./dom ./_base/window ./_base/url ./aspect ./promise/all ./date/stamp ./Deferred ./has ./query ./on ./ready".split(" "),function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u){function n(a){return eval("("+a+")")}function t(a){var b=
a._nameCaseMap,c=a.prototype;if(!b||b._extendCnt<y){var b=a._nameCaseMap={},d;for(d in c)"_"!==d.charAt(0)&&(b[d.toLowerCase()]=d);b._extendCnt=y}return b}function A(a,b){b||(b=r);var c=b._dojoParserCtorMap||(b._dojoParserCtorMap={}),d=a.join();if(!c[d]){for(var g=[],e=0,m=a.length;e<m;e++){var f=a[e];g[g.length]=c[f]=c[f]||q.getObject(f)||~f.indexOf("/")&&b(f)}e=g.shift();c[d]=g.length?e.createSubclass?e.createSubclass(g):e.extend.apply(e,g):e}return c[d]}new Date("X");var y=0;d.after(q,"extend",
function(){y++},!0);var z={_clearCache:function(){y++;_ctorMap={}},_functionFromScript:function(a,b){var c="",d="",g=a.getAttribute(b+"args")||a.getAttribute("args"),e=a.getAttribute("with"),g=(g||"").split(/\s*,\s*/);e&&e.length&&p.forEach(e.split(/\s*,\s*/),function(a){c+="with("+a+"){";d+="}"});return new Function(g,c+a.innerHTML+d)},instantiate:function(a,b,c){b=b||{};c=c||{};var d=(c.scope||l._scopeName)+"Type",g="data-"+(c.scope||l._scopeName)+"-",e=g+"type",m=g+"mixins",f=[];p.forEach(a,function(a){var c=
d in b?b[d]:a.getAttribute(e)||a.getAttribute(d);if(c){var g=a.getAttribute(m),c=g?[c].concat(g.split(/\s*,\s*/)):[c];f.push({node:a,types:c})}});return this._instantiate(f,b,c)},_instantiate:function(a,c,d,g){function e(a){c._started||d.noStart||p.forEach(a,function(a){"function"!==typeof a.startup||a._started||a.startup()});return a}a=p.map(a,function(a){var b=a.ctor||A(a.types,d.contextRequire);if(!b)throw Error("Unable to resolve constructor for: '"+a.types.join()+"'");return this.construct(b,
a.node,c,d,a.scripts,a.inherited)},this);return g?b(a).then(e):e(a)},construct:function(a,b,e,f,k,u){function A(a){B&&q.setObject(B,a);for(z=0;z<E.length;z++)d[E[z].advice||"after"](a,E[z].method,q.hitch(a,E[z].func),!0);for(z=0;z<O.length;z++)O[z].call(a);for(z=0;z<M.length;z++)a.watch(M[z].prop,M[z].func);for(z=0;z<N.length;z++)m(a,N[z].event,N[z].func);return a}var r=a&&a.prototype;f=f||{};var y={};f.defaults&&q.mixin(y,f.defaults);u&&q.mixin(y,u);var x;g("dom-attributes-explicit")?x=b.attributes:
g("dom-attributes-specified-flag")?x=p.filter(b.attributes,function(a){return a.specified}):(u=(/^input$|^img$/i.test(b.nodeName)?b:b.cloneNode(!1)).outerHTML.replace(/=[^\s"']+|="[^"]*"|='[^']*'/g,"").replace(/^\s*<[a-zA-Z0-9]*\s*/,"").replace(/\s*>.*$/,""),x=p.map(u.split(/\s+/),function(a){var c=a.toLowerCase();return{name:a,value:"LI"==b.nodeName&&"value"==a||"enctype"==c?b.getAttribute(c):b.getAttributeNode(c).value}}));var J=f.scope||l._scopeName;u="data-"+J+"-";var I={};"dojo"!==J&&(I[u+"props"]=
"data-dojo-props",I[u+"type"]="data-dojo-type",I[u+"mixins"]="data-dojo-mixins",I[J+"type"]="dojotype",I[u+"id"]="data-dojo-id");for(var z=0,v,J=[],B,C;v=x[z++];){var D=v.name,F=D.toLowerCase();v=v.value;switch(I[F]||F){case "data-dojo-type":case "dojotype":case "data-dojo-mixins":break;case "data-dojo-props":C=v;break;case "data-dojo-id":case "jsid":B=v;break;case "data-dojo-attach-point":case "dojoattachpoint":y.dojoAttachPoint=v;break;case "data-dojo-attach-event":case "dojoattachevent":y.dojoAttachEvent=
v;break;case "class":y["class"]=b.className;break;case "style":y.style=b.style&&b.style.cssText;break;default:if(D in r||(D=t(a)[F]||D),D in r)switch(typeof r[D]){case "string":y[D]=v;break;case "number":y[D]=v.length?Number(v):NaN;break;case "boolean":y[D]="false"!=v.toLowerCase();break;case "function":""===v||-1!=v.search(/[^\w\.]+/i)?y[D]=new Function(v):y[D]=q.getObject(v,!1)||new Function(v);J.push(D);break;default:F=r[D],y[D]=F&&"length"in F?v?v.split(/\s*,\s*/):[]:F instanceof Date?""==v?new Date(""):
"now"==v?new Date:c.fromISOString(v):F instanceof h?l.baseUrl+v:n(v)}else y[D]=v}}for(x=0;x<J.length;x++)I=J[x].toLowerCase(),b.removeAttribute(I),b[I]=null;if(C)try{C=n.call(f.propsThis,"{"+C+"}"),q.mixin(y,C)}catch(P){throw Error(P.toString()+" in data-dojo-props\x3d'"+C+"'");}q.mixin(y,e);k||(k=a&&(a._noScript||r._noScript)?[]:w("\x3e script[type^\x3d'dojo/']",b));var E=[],O=[],M=[],N=[];if(k)for(z=0;z<k.length;z++)I=k[z],b.removeChild(I),e=I.getAttribute(u+"event")||I.getAttribute("event"),f=
I.getAttribute(u+"prop"),C=I.getAttribute(u+"method"),J=I.getAttribute(u+"advice"),x=I.getAttribute("type"),I=this._functionFromScript(I,u),e?"dojo/connect"==x?E.push({method:e,func:I}):"dojo/on"==x?N.push({event:e,func:I}):y[e]=I:"dojo/aspect"==x?E.push({method:C,advice:J,func:I}):"dojo/watch"==x?M.push({prop:f,func:I}):O.push(I);a=(k=a.markupFactory||r.markupFactory)?k(y,b,a):new a(y,b);return a.then?a.then(A):A(a)},scan:function(b,c){function d(a){if(!a.inherited){a.inherited={};var b=a.node,c=
d(a.parent),b={dir:b.getAttribute("dir")||c.dir,lang:b.getAttribute("lang")||c.lang,textDir:b.getAttribute(x)||c.textDir},g;for(g in b)b[g]&&(a.inherited[g]=b[g])}return a.inherited}var e=[],m=[],f={},h=(c.scope||l._scopeName)+"Type",n="data-"+(c.scope||l._scopeName)+"-",k=n+"type",x=n+"textdir",n=n+"mixins",t=b.firstChild,u=c.inherited;if(!u){var q=function(a,b){return a.getAttribute&&a.getAttribute(b)||a.parentNode&&q(a.parentNode,b)},u={dir:q(b,"dir"),lang:q(b,"lang"),textDir:q(b,x)},y;for(y in u)u[y]||
delete u[y]}for(var u={inherited:u},w,z;;)if(t)if(1!=t.nodeType)t=t.nextSibling;else if(w&&"script"==t.nodeName.toLowerCase())(v=t.getAttribute("type"))&&/^dojo\/\w/i.test(v)&&w.push(t),t=t.nextSibling;else if(z)t=t.nextSibling;else{var v=t.getAttribute(k)||t.getAttribute(h);y=t.firstChild;if(v||y&&(3!=y.nodeType||y.nextSibling)){z=null;if(v){var B=t.getAttribute(n);w=B?[v].concat(B.split(/\s*,\s*/)):[v];try{z=A(w,c.contextRequire)}catch(O){}z||p.forEach(w,function(a){~a.indexOf("/")&&!f[a]&&(f[a]=
!0,m[m.length]=a)});B=z&&!z.prototype._noScript?[]:null;u={types:w,ctor:z,parent:u,node:t,scripts:B};u.inherited=d(u);e.push(u)}else u={node:t,scripts:w,parent:u};w=B;z=t.stopParser||z&&z.prototype.stopParser&&!c.template;t=y}else t=t.nextSibling}else{if(!u||!u.node)break;t=u.node.nextSibling;z=!1;u=u.parent;w=u.scripts}var Q=new a;m.length?(g("dojo-debug-messages")&&console.warn("WARNING: Modules being Auto-Required: "+m.join(", ")),(c.contextRequire||r)(m,function(){Q.resolve(p.filter(e,function(a){if(!a.ctor)try{a.ctor=
A(a.types,c.contextRequire)}catch(P){}for(var b=a.parent;b&&!b.types;)b=b.parent;var d=a.ctor&&a.ctor.prototype;a.instantiateChildren=!(d&&d.stopParser&&!c.template);a.instantiate=!b||b.instantiate&&b.instantiateChildren;return a.instantiate}))})):Q.resolve(e);return Q.promise},_require:function(b,c){var d=n("{"+b.innerHTML+"}"),g=[],e=[],m=new a,f=c&&c.contextRequire||r,h;for(h in d)g.push(h),e.push(d[h]);f(e,function(){for(var a=0;a<g.length;a++)q.setObject(g[a],arguments[a]);m.resolve(arguments)});
return m.promise},_scanAmd:function(b,c){var d=new a,g=d.promise;d.resolve(!0);var e=this;w("script[type\x3d'dojo/require']",b).forEach(function(a){g=g.then(function(){return e._require(a,c)});a.parentNode.removeChild(a)});return g},parse:function(a,b){!a||"string"==typeof a||"nodeType"in a||(b=a,a=b.rootNode);var c=a?e.byId(a):f.body();b=b||{};var d=b.template?{template:!0}:{},g=[],m=this,h=this._scanAmd(c,b).then(function(){return m.scan(c,b)}).then(function(a){return m._instantiate(a,d,b,!0)}).then(function(a){return g=
g.concat(a)}).otherwise(function(a){console.error("dojo/parser::parse() error",a);throw a;});q.mixin(g,h);return g}};l.parser=z;k.parseOnLoad&&u(100,z,"parse");return z})},"dojo/date/stamp":function(){define(["../_base/lang","../_base/array"],function(r,l){var q={};r.setObject("dojo.date.stamp",q);q.fromISOString=function(p,k){q._isoRegExp||(q._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/);var e=q._isoRegExp.exec(p),f=null;
if(e){e.shift();e[1]&&e[1]--;e[6]&&(e[6]*=1E3);k&&(k=new Date(k),l.forEach(l.map("FullYear Month Date Hours Minutes Seconds Milliseconds".split(" "),function(b){return k["get"+b]()}),function(b,c){e[c]=e[c]||b}));f=new Date(e[0]||1970,e[1]||0,e[2]||1,e[3]||0,e[4]||0,e[5]||0,e[6]||0);100>e[0]&&f.setFullYear(e[0]||1970);var h=0,d=e[7]&&e[7].charAt(0);"Z"!=d&&(h=60*(e[8]||0)+(Number(e[9])||0),"-"!=d&&(h*=-1));d&&(h-=f.getTimezoneOffset());h&&f.setTime(f.getTime()+6E4*h)}return f};q.toISOString=function(l,
k){var e=function(b){return 10>b?"0"+b:b};k=k||{};var f=[],h=k.zulu?"getUTC":"get",d="";"time"!=k.selector&&(d=l[h+"FullYear"](),d=["0000".substr((d+"").length)+d,e(l[h+"Month"]()+1),e(l[h+"Date"]())].join("-"));f.push(d);if("date"!=k.selector){d=[e(l[h+"Hours"]()),e(l[h+"Minutes"]()),e(l[h+"Seconds"]())].join(":");h=l[h+"Milliseconds"]();k.milliseconds&&(d+="."+(100>h?"0":"")+e(h));if(k.zulu)d+="Z";else if("time"!=k.selector)var h=l.getTimezoneOffset(),b=Math.abs(h),d=d+((0<h?"-":"+")+e(Math.floor(b/
60))+":"+e(b%60));f.push(d)}return f.join("T")};return q})},"esri/dijit/_EventedWidget":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on ../Evented dijit/_WidgetBase".split(" "),function(r,l,q,p,k,e){return r([e,k],{_onMap:function(e){var f=this.constructor._onMap,d;f&&f.FINAL||(delete this.constructor._onMap,f=this.registerConnectEvents(),f.FINAL=!0);e=e.toLowerCase();f[e]?d=this[f[e].method]:(e=this._onCamelCase(e),this[e]&&(d=e));return d},on:function(e,h){var d=this._onMap(e),
b=e.replace(/\-/g,""),c="on"+b in this.domNode;return d||!c?this.inherited(arguments):this.own(p(this.domNode,b,h))[0]},emit:function(e,h,d){var b,c,a,g=e.toLowerCase(),f=this.constructor._onMap||this.registerConnectEvents();c=this[this._onMap(g)];h=h||{};h.target||(h.target=this);c&&f&&f[g]&&(this._onObj2Arr(function(){b=Array.prototype.slice.call(arguments)},f[g].argKeys)(h),a=l.mixin({},arguments),a[2]=b,a[0]=f[g].name.replace(/^on/,""));return this.inherited(a||arguments)}})})},"esri/dijit/Legend/utils":function(){define(["dojo/_base/lang",
"../../lang","dojo/i18n!../../nls/jsapi"],function(r,l,q){var p=q.widgets.legend;return{getVisualVariableTitle:function(k,e){var f,h=k.field,d=k.normalizationField,b=!1,c=!1,a=!1,g,h=r.isFunction(h)?null:h,d=r.isFunction(d)?null:d;if(k.legendOptions&&k.legendOptions.title)f=k.legendOptions.title;else if(k.valueExpressionTitle)f=k.valueExpressionTitle;else{if(e.renderer&&e.renderer.authoringInfo&&e.renderer.authoringInfo.visualVariables){var q=e.renderer.authoringInfo.visualVariables;for(g=0;g<q.length;g++){var m=
q[g];if("colorInfo"===m.type&&"ratio"===m.style){b=!0;break}else if("colorInfo"===m.type&&"percent"===m.style){c=!0;break}else if("colorInfo"===m.type&&"percentTotal"===m.style){a=!0;break}}}(b=a&&"showRatioPercentTotal"||c&&"showRatioPercent"||b&&"showRatio"||d&&"showNormField"||h&&"showField"||null)&&(f=l.substitute({field:h&&e.getFieldLabel(h),normField:d&&e.getFieldLabel(d)},p[b]))}return f},getRendererTitle:function(k,e){var f;if(k){var h,d,b;"esri.renderer.ClassBreaksRenderer"===k.declaredClass&&
(h=k.attributeField,d=k.normalizationField,b="percent-of-total"===k.normalizationType);h=r.isFunction(h)?null:h;d=r.isFunction(d)?null:d;k.legendOptions&&k.legendOptions.title?f=k.legendOptions.title:k.valueExpressionTitle?f=k.valueExpressionTitle:(b=d&&"showNormField"||(b?"showNormPct":null)||h&&"showField"||null)&&(f=l.substitute({field:h&&e.getFieldLabel(h),normField:d&&e.getFieldLabel(d)},p[b]))}return f}}})},"esri/layers/clustering/GeohashAggregation":function(){define("dojo/has dojo/_base/declare dojo/_base/lang dojo/_base/array ../../kernel ../../Evented ../../geometry/Point ../../geometry/Extent ../../geometry/mathUtils ../../support/expressionUtils ../../core/timerUtils ../support/attributeUtils ./geohashUtils ./statUtils".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w){l=l(e,{loaded:!1,map:null,layer:null,lod:null,tolerance:null,clusterMode:null,clusterRadius:null,sortEnabled:!0,filterEnabled:!0,bufferEnabled:!0,updateEnabled:!0,clusters:null,clustersEnabled:!0,statisticInfos:null,defaults:{lod:1,tolerance:0,clusterMode:"auto",clusterRadius:80,sortEnabled:!0,filterEnabled:!0,bufferEnabled:!0,updateEnabled:!0},_eventHandles:null,_updateHandle:null,_cellIndex:null,_globalIndex:null,_perfProfile:null,_cellSizeScaleFactor:1.5,_extentScaleFactor:1.25,
_maxGeohashLength:12,_minClusterRadius:15,_levelChange:!0,_clusterFieldPrefix:"cluster_",_mapLevelChange:!1,constructor:function(a){this._update=q.hitch(this,this._update);this._eventHandles=[];this._globalIndex={numFeatures:null,fullExtent:null,lodStats:null};this._perfProfile={lastIndex:{total:null,numFeatures:0},lastUpdate:{cells:null,clusters:null,total:null}};this.clusters=[];this.map=a.map;this.layer=a.layer;this.setLod(a.lod);this.setTolerance(a.tolerance);this.setClusterMode(a.clusterMode);
this.setClusterRadius(a.clusterRadius);this.setSortEnabled(a.sortEnabled);this.setFilterEnabled(a.filterEnabled);this.setBufferEnabled(a.bufferEnabled);this.setUpdateEnabled(a.updateEnabled);this.setStatisticInfos(a.statisticInfos);this._load();this.loaded?this._startup():this._eventHandles.push(this.on("load",q.hitch(this,this._startup)))},destroy:function(a){this._displayFeatures(!0,a);p.forEach(this._eventHandles,function(a){a.remove()});c.clearTimeout(this._updateHandle);this._cellIndex=this._globalIndex=
this._eventHandles=this._updateHandle=this.map=this.layer=this.clusters=null},setLod:function(a){var b=this.lod;this.lod=a||this.defaults.lod;b!==this.lod&&this.update()},setTolerance:function(a){var b=this.tolerance;this.tolerance=a||this.defaults.tolerance;b!==this.tolerance&&this.update()},setClusterMode:function(a){var b=this.clusterMode;this.clusterMode=a||this.defaults.clusterMode;this._evalClusterParams();b!==this.clusterMode&&this.update()},setClusterRadius:function(a){var b=this.clusterRadius;
this.clusterRadius=null!=a?a:this.defaults.clusterRadius;this._evalClusterParams();b!==this.clusterRadius&&this.update()},setSortEnabled:function(a){var b=this.sortEnabled;this.sortEnabled=null!=a?!!a:this.defaults.sortEnabled;b!==this.sortEnabled&&this.update()},setFilterEnabled:function(a){var b=this.filterEnabled;this.filterEnabled=null!=a?!!a:this.defaults.filterEnabled;b!==this.filterEnabled&&this.update()},setBufferEnabled:function(a){var b=this.bufferEnabled;this.bufferEnabled=null!=a?!!a:
this.defaults.bufferEnabled;b!==this.bufferEnabled&&this.update()},setUpdateEnabled:function(a){var b=this.updateEnabled;(this.updateEnabled=null!=a?!!a:this.defaults.updateEnabled)&&b!==this.updateEnabled&&(this._mapLevelChange=!0,this.update())},setStatisticInfos:function(a){this.statisticInfos=a||[];this.loaded&&this._applyStatInfos(this.statisticInfos)},update:function(){this.loaded&&null==this._updateHandle&&(this._updateHandle=c.setTimeout(this._update,c.priority.HIGH))},isUpdateScheduled:function(){return null!=
this._updateHandle},getCell:function(a){return this._cellIndex[a.length][a]},getCluster:function(a){var b;p.some(this.clusters,function(c){-1<p.indexOf(c.geohashes,a)&&(b=c);return!!b});return b},getCellsInCluster:function(a){var b=[];p.forEach(a&&a.geohashes,function(a){(a=this.getCell(a))&&b.push(a)},this);return b},getFeaturesInCluster:function(a){var b=[];a=this.getCellsInCluster(a);p.forEach(a,function(a){Array.prototype.push.apply(b,a.features)});return b},getCurrentLodStats:function(){var a=
this._globalIndex.lodStats;return a&&a[this.lod]},getNumFeatures:function(){return this._globalIndex.numFeatures},getFullExtent:function(){var a=this._globalIndex.fullExtent;return a&&Infinity!==a.xmin?new h(a):null},_load:function(){this._displayFeatures(!1);this._checkLoadStatus();this.map.loaded||this._eventHandles.push(this.map.on("load",q.hitch(this,this._checkLoadStatus)));this.layer.loaded||this._eventHandles.push(this.layer.on("load",q.hitch(this,this._checkLoadStatus)))},_checkLoadStatus:function(){if(this.map.loaded&&
this.layer.loaded){var a;if("esriGeometryPoint"!==this.layer.geometryType)a=Error("GeohashAggregation is supported only for points");else{var b=this.map.spatialReference;b.isWebMercator()||4326===b.wkid||(a=Error("GeohashAggregation is supported only when map spatial reference is WGS84 or WebMercator"))}a?(this.loadError=a,this.emit("load-error",{error:a})):(this.loaded=!0,this.emit("load"))}},_startup:function(){this._evalUpdateStatus();this._processFeatures();this._processExtentChange();this._eventHandles.push(this.layer.on("update-end",
q.hitch(this,this._processFeatures)),this.layer.on("edits-complete",q.hitch(this,this._processFeatures)),this.layer.on("graphics-clear",q.hitch(this,this._processFeatures)),this.layer.on("suspend",q.hitch(this,this._evalUpdateStatus)),this.layer.on("resume",q.hitch(this,this._evalUpdateStatus)),this.map.on("extent-change",q.hitch(this,this._processExtentChange)))},_processFeatures:function(){this._indexFeatures();this.update()},_evalUpdateStatus:function(){this.setUpdateEnabled(!this.layer.suspended)},
_processExtentChange:function(a){this._mapLevelChange=!(!a||!a.levelChange);this._evalClusterParams();this.update()},_update:function(){this._updateHandle=null;if(this.updateEnabled){this.emit("update-start");if(this.clustersEnabled){var a=this.map.geographicExtent;if(a){var b=this._getIntersectingCells(a),a=this._getClusters(b.cells,a);this.clusters=a.clusters;this._applyStatInfosToClusters();var b=b.profile,a=a.profile,c=b.total+a.total;b.total=this._getElapsedTime(b.total);a.total=this._getElapsedTime(a.total);
var d=this._perfProfile.lastUpdate={};d.cells=b;d.clusters=a;d.total=this._getElapsedTime(c)}}else this.clusters=[],this._perfProfile.lastUpdate=null;b=this._mapLevelChange;this._mapLevelChange=!1;this.emit("update-end",{levelChange:this._levelChange,mapLevelChange:b})}},_displayFeatures:function(a,b){var c=this.layer,d=!a;c.suspendGraphics(d);!1!==b&&(d?c.clearNodes():c.redraw())},_indexFeatures:function(){var a=this._getTime();this._initializeIndexing();var b=0,c=this._globalIndex.fullExtent;p.forEach(this.layer.graphics,
function(a){if(a.visible){var d=a.geometry,e=this._getLngLat(d),f;e&&(f=d.getCacheValue("_geohash"),void 0===f&&(f=g.pointToGeohash(e),d.setCacheValue("_geohash",f||null)));f&&(this._addGeohashToIndex(f,a,e),b++,this._updateExtent(c,e))}},this);this._applyStatInfosToIndex();this._globalIndex.numFeatures=b;for(var d=this._globalIndex.lodStats,e=1;e<=this._maxGeohashLength;e++)d[e]=this._getLODStats(e,b);this._perfProfile.lastIndex.total=this._getElapsedTime(a,this._getTime());this._perfProfile.lastIndex.numFeatures=
b;this.emit("index-complete")},_initializeIndexing:function(){this._globalIndex={numFeatures:0,fullExtent:{xmin:Infinity,ymin:Infinity,xmax:-Infinity,ymax:-Infinity},lodStats:{}};for(var a=this._cellIndex=[],b=1;b<=this._maxGeohashLength;b++)a[b]={}},_getLngLat:function(a){if(a){var b=a.getLongitude();a=a.getLatitude();a=null!=b&&null!=a?{x:b,y:a}:null}return a},_addGeohashToIndex:function(a,b,c){for(var d=this._cellIndex,e="",g=0;g<this._maxGeohashLength;g++){var e=e+a[g],f=d[e.length],m=f[e];m||
(m=f[e]={count:0,centroid:{x:null,y:null},extent:{xmin:Infinity,ymin:Infinity,xmax:-Infinity,ymax:-Infinity},features:[],geohash:e,statistics:null});this._updateItem(m,1,c,!0);m.features.push(b)}},_getLODStats:function(a,b){var c=this._cellIndex[a],d=0,e=Infinity,g=-Infinity,f=null,m;for(m in c){var h=c[m];d++;h.count<e&&(e=h.count);h.count>g&&(g=h.count)}0<d&&(f=Number((b/d).toFixed(2)));return{lod:a,count:d,min:Infinity===e?null:e,max:-Infinity===g?null:g,avg:f}},_evalClusterParams:function(){if(this.loaded&&
"auto"===this.clusterMode){var a=this._getClusterParams(this.map.getResolutionInMeters(),this.clusterRadius,this._minClusterRadius);this._levelChange=this.lod!==a.lod;this.lod=a.lod;this.tolerance=a.tolerance}},_getClusterParams:function(a,b,c){b<c&&(b=c);a=Math.ceil(a*b);b=this._getClosestLODRange(a).max;do c=this._getCellSize(b),(c=a>=this._cellSizeScaleFactor*c||1===c)||(b+=1);while(!c);c=a/this._getCellSize(b);return{lod:b,tolerance:a,multiplier:Number(c.toFixed(2))}},_getClosestLODRange:function(a){for(var b,
c=this._maxGeohashLength;1<=c;c--)if(this._getCellSize(c)>=a){b=c;break}null==b&&(b=1);a=b+1;a>this._maxGeohashLength&&(a=this._maxGeohashLength);return{min:b,max:a}},_getCellSize:function(a){a=g.getCellSizeInMeters(a);return Math.ceil(Math.min(a.width,a.height))},_sorter:function(a,b){var c=a.centroid,d=b.centroid;return a.count>b.count?-1:a.count<b.count?1:c.x>d.x?-1:c.x<d.x?1:0},_getIntersectingCells:function(a){var b=this._getTime();a=a.expand(this._extentScaleFactor);var c=g.getIntersecting(a,
this.lod,this.bufferEnabled?this.tolerance:0);a=this._getTime();var d=[],e=this.tolerance,f=this.sortEnabled;p.forEach(c,function(a){(a=this.getCell(a))&&d.push(a)},this);e&&f&&d.sort(this._sorter);c=this._getTime();return{cells:d,profile:{findCells:this._getElapsedTime(b,a),scanAndSortCells:this._getElapsedTime(a,c),total:c-b}}},_getClusters:function(a,b){var c=this._getTime(),d=[],e={},g={findCells:0};p.forEach(a,function(a,b){var c=this._createCluster(a,e,g);c&&d.push(c)},this);this._markIntersecting(d,
b);this.filterEnabled&&(d=this._getIntersectingClusters(d));var f=this._getTime();return{clusters:d,profile:{findCellsInCluster:this._getElapsedTime(g.findCells),total:f-c}}},_markIntersecting:function(a,b){var c=b.normalize();p.forEach(a,function(a){var b=a.centroid.x,d=a.centroid.y;a.isIntersecting=p.some(c,function(a){return b>=a.xmin&&b<=a.xmax&&d>=a.ymin&&d<=a.ymax})})},_getIntersectingClusters:function(a){return p.filter(a,function(a){return a.isIntersecting})},_createCluster:function(a,b,c){if(!b[a.geohash]){var d=
[{cell:a,distance:0}];if(this.tolerance){var e=this._getTime(),f=g.getNeighborsWithinDistance(a.centroid,this.lod,this.tolerance);c.findCells+=this._getTime()-e;p.forEach(f,function(b){if(b!==a.geohash&&(b=this.getCell(b))){var c=this._calculateDistance(a.centroid,b.centroid);c<=this.tolerance&&d.push({cell:b,distance:c})}},this)}return this._mergeCells(d,b)}},_calculateDistance:function(a,b){return d.getLength(g.geographicToWebMercator(a),g.geographicToWebMercator(b))},_mergeCells:function(a,b){var c=
this._initializeCluster({},a[0].cell.geohash);p.forEach(a,function(a){var d=a.cell,e=d.geohash;a=a.distance;var g=b[e];if(g)if(a<g.distance)this._removeCellFromCluster(e,b);else return;b[e]={cluster:c,distance:a};this._updateItem(c,d.count,d.centroid);c.geohashes.push(e)},this);return c},_removeCellFromCluster:function(a,b){var c=b[a].cluster;delete b[a];var d=p.indexOf(c.geohashes,a);-1<d&&c.geohashes.splice(d,1);this._reevaluateCluster(c)},_reevaluateCluster:function(a){var b=a.geohashes;a=this._initializeCluster(a,
a.primary);p.forEach(b,function(b){var c=this.getCell(b);c&&(this._updateItem(a,c.count,c.centroid),a.geohashes.push(b))},this)},_initializeCluster:function(a,b){a.count=0;a.centroid=new f(null,null);a.geohashes=[];a.primary=b;a.statistics=null;return a},_applyStatInfos:function(a){a=this._getValidStatInfos(a);this._applyStatInfosToIndex(a);this._applyStatInfosToClusters(a)},_getValidStatInfos:function(b){var c=[];p.forEach(b,function(b){var d=b.attributeInfo;b=b.statisticType;var e="angle"===d.attributeType;
if(w.isSupportedStatisticType(b)&&(!e||"avg"===b)){var g="arithmetic"===d.rotationType;c.push({attributeCache:a.createAttributeCache(d,"type"===b),identifier:w.getStatisticId(d,b),statFunctions:w.getStatisticFunctions(b),isAngular:e,isDate:"date"===d.attributeType,isArithmetic:g})}});return c},_applyStatInfosToIndex:function(a){a=a||this._getValidStatInfos(this.statisticInfos);var b=this._cellIndex;if(b)for(var c=1;c<=this._maxGeohashLength;c++){var d=b[c],e;for(e in d)this._applyStatInfosToCell(d[e],
a)}},_applyStatInfosToCell:function(a,b){var c=this._initializeStats(a,b);p.forEach(a.features,function(a){this._calcFeatureStats(a,b,c)},this);this._summarizeStats(a,c,b)},_calcFeatureStats:function(a,c,d){a.attributes&&p.forEach(c,function(c){var e=d[c.identifier],g=c.attributeCache,g=g?a._getDataValue(g.attributeInfo,g,b):null;c.statFunctions.updateCellStat(e,g,c)})},_applyStatInfosToClusters:function(a){a=a||this._getValidStatInfos(this.statisticInfos);var b=this._clusterFieldPrefix;p.forEach(this.clusters,
function(c){var d=this._initializeStats(c,a);p.forEach(this.getCellsInCluster(c),function(b){this._calcCellStats(b,a,d)},this);this._summarizeStats(c,d,a,b);c.attributes[b+"id"]=c.primary},this)},_calcCellStats:function(a,b,c){var d=a.statistics;p.forEach(b,function(a){var b=a.identifier;a.statFunctions.updateClusterStat(c[b],d[b],a)})},_initializeStats:function(a,b){var c=a.statistics={};p.forEach(b,function(a){c[a.identifier]=a.statFunctions.initialize(a)});return c},_summarizeStats:function(a,
b,c,d){var e=a.attributes={};d=d||"";e[d+"count"]=a.count;p.forEach(c,function(a){var c=this._getStatFieldName(a,d);e[c]=a.statFunctions.summarize(b[a.identifier],a)},this)},_getStatFieldName:function(a,b){return(b||"")+a.identifier},_updateItem:function(a,b,c,d){var e=c.y,g=a.centroid,f=a.count;g.x=(f*g.x+b*c.x)/(f+b);g.y=(f*g.y+b*e)/(f+b);a.count+=b;d&&this._updateExtent(a.extent,c)},_updateExtent:function(a,b){var c=b.x,d=b.y;c<a.xmin&&(a.xmin=c);c>a.xmax&&(a.xmax=c);d<a.ymin&&(a.ymin=d);d>a.ymax&&
(a.ymax=d)},_getTime:function(){return window.performance?window.performance.now():(new Date).getTime()},_getElapsedTime:function(a,b){var c,d;d=null!=a&&null!=b?b-a:a;null!=d&&(c="millisecond",1E3<=d&&(d/=1E3,c="second",60<=d&&(d/=60,c="minute")),c={value:Number(d.toFixed(2)),unit:c});return c}});r("extend-esri")&&q.setObject("layers.clustering.GeohashAggregation",l,k);return l})},"esri/core/timerUtils":function(){define([],function(){function r(e){var f,h=e.length;for(f=0;f<h;f++)e[f]()}var l={LOW:1,
HIGH:2},q,p={};p[l.LOW]=[];p[l.HIGH]=[];var k=function(){clearTimeout(q);q=null;var e=p[l.HIGH];p[l.HIGH]=[];r(e);e=p[l.LOW];p[l.LOW]=[];r(e)};return{priority:l,callbackQueue:p,setTimeout:function(e,f){var h=[f,p[f].push(e)-1];q||(q=setTimeout(k,0));return h},clearTimeout:function(e){e&&p[e[0]].splice(e[1],1)}}})},"esri/layers/clustering/geohashUtils":function(){define("dojo/has dojo/string dojo/_base/lang dojo/_base/array ../../kernel ../../geometry/Point ../../geometry/Extent ../../SpatialReference ../../geometry/webMercatorUtils".split(" "),
function(r,l,q,p,k,e,f,h,d){function b(a){var b=a.spatialReference;if(!b)return{x:a.x,y:a.y};var c=b.isWebMercator(),d;4326===b.wkid?d={x:a.x,y:a.y}:c&&(d={x:a.getLongitude(),y:a.getLatitude()});return d}function c(a){var b=a.spatialReference,c=!(!b||!b.isWebMercator()),e;b&&4326===b.wkid?e=new f(a.toJson()):c&&(e=d.webMercatorToGeographic(a,!0));return e}function a(a,b){b.x=e.prototype._normalizeX(a.x,h.prototype._info[4326]);b.y=a.y;return b}function g(a){a=G.decimals[a].toString(2);return l.pad(a,
G.bitsPerBase32Char,"0")}function w(a,b){var c;b=b.slice();b.splice(1,0,0);for(var d=b[0],e=b[2],g=0;g<a.length;g++)Number(a[g])?b[0]=b[1]:b[2]=b[1],c=b[1]=(b[0]+b[2])/2,d=b[0],e=b[2];return{value:c,min:d,max:e}}function m(a,b,c){var d=[];b=b.slice();b.splice(1,0,0);for(var e=b[0],g=b[2],f=0;f<c;f++)a>=b[1]?(b[0]=b[1],e=1):(b[2]=b[1],e=0),b[1]=(b[0]+b[2])/2,d.push(e),e=b[0],g=b[2];return{value:d.join(""),min:e,max:g}}function u(a){var b=a*G.bitsPerBase32Char;0===b%2?a=b/=2:(a=(b+1)/2,b-=a);return{lon:a,
lat:b}}function n(a){var b=0;a=a.split("").reverse().join("");for(var c=0;c<a.length;c++)b+=Number(a[c])*Math.pow(2,c);return G.base32[b]}function t(a,b){var c={x:a.xmin,y:a.ymax},d={x:a.xmax,y:a.ymin},e={x:a.xmax,y:a.ymax};return{sw:K.pointToGeohash({x:a.xmin,y:a.ymin},b),nw:K.pointToGeohash(c,b),se:K.pointToGeohash(d,b),ne:K.pointToGeohash(e,b)}}function A(a,b,c,d,e){var g=a;do e[g]||(e[g]=!0,d.push(g)),(a=g===b)||(g=E(g,c));while(!a)}function y(a,b,c,d){var e=t(a,b);a=[];A(e.sw,e.nw,"n",a,{});
b=[];A(e.se,e.ne,"n",b,{});for(e=0;e<a.length;e++)A(a[e],b[e],"e",c,d)}function z(a){return p.filter(a,function(a){return 180===a.xmax?!0:!1})[0]}function v(a){return p.filter(a,function(a){return-180===a.xmin?!0:!1})[0]}function B(a,b,c,d){var e=K.geographicToWebMercator(a);a={x:e.x-b,y:e.y-b};b=K.webMercatorToGeographic({x:e.x+b,y:e.y+b},!0);a=K.webMercatorToGeographic(a,!0);return new f(null!=c?c:a.x,a.y,null!=d?d:b.x,b.y)}function C(a,b,c,d){var e;a=t(a,b);var g,h;"min"===d?h=180:"max"===d&&(g=
-180);var m=g;d=h;e=K.geohashToCell(a.sw).extent;b=K.geohashToCell(a.ne).extent;a=null!=m?m:e.xmin;e=e.ymin;d=null!=d?d:b.xmax;b=b.ymax;a=B({x:a,y:e},c,g,h);c=B({x:d,y:b},c,g,h);return new f(a.xmin,a.ymin,c.xmax,c.ymax)}function F(a,b,c){var d=a,e=0;do e++,(a=d===b)||(d=E(d,c));while(!a);return e}function D(a,b){var c=t(a,b),d=F(c.nw,c.ne,"e");return{rows:F(c.nw,c.sw,"s"),cols:d}}function E(a,b){var c=a.length%2,d=a.slice(-1),e=G.decimals[d],g=a.slice(0,-1);-1!=G.borders[b][c].indexOf(d)&&g&&(g=E(g,
b));return g+G.neighbors[b][c][e]}var G={base32:"0123456789bcdefghjkmnpqrstuvwxyz",decimals:function(){for(var a={},b=0;32>b;b++)a["0123456789bcdefghjkmnpqrstuvwxyz"[b]]=b;return a}(),neighbors:{n:[null,"238967debc01fg45kmstqrwxuvhjyznp"],s:[null,"bc01fg45238967deuvhjyznpkmstqrwx"],e:[null,"14365h7k9dcfesgujnmqp0r2twvyx8zb"],w:[null,"p0r21436x8zb9dcf5h7kjnmqesgutwvy"]},borders:{n:[null,"bcfguvyz"],s:[null,"0145hjnp"],e:[null,"prxz"],w:[null,"028b"]},bitsPerBase32Char:5,maxGeohashLength:12,longitudeRange:[-180,
180],latitudeRange:[-90,90]};G.neighbors.n[0]="14365h7k9dcfesgujnmqp0r2twvyx8zb";G.neighbors.s[0]="p0r21436x8zb9dcf5h7kjnmqesgutwvy";G.neighbors.e[0]="238967debc01fg45kmstqrwxuvhjyznp";G.neighbors.w[0]="bc01fg45238967deuvhjyznpkmstqrwx";G.borders.n[0]="prxz";G.borders.s[0]="028b";G.borders.e[0]="bcfguvyz";G.borders.w[0]="0145hjnp";var K={geographicToWebMercator:function(a){a=e.lngLatToXY(a.x,a.y);return{x:a[0],y:a[1]}},webMercatorToGeographic:function(a,b){var c=e.xyToLngLat(a.x,a.y,b);return{x:c[0],
y:c[1]}},geohashToCell:function(a){for(var b=[],c=0;c<a.length;c++)b.push(g(a[c]));for(var b=b.join(""),c=[],d=[],e=0;e<b.length;e++)0===e%2?c.push(b[e]):d.push(b[e]);c=c.join("");d=d.join("");c=[c,d];b=w(c[0],G.longitudeRange);c=w(c[1],G.latitudeRange);return{point:{x:b.value,y:c.value},extent:{xmin:b.min,xmax:b.max,ymin:c.min,ymax:c.max},geohash:a}},pointToCell:function(c,d){var e,g,f;d=d||G.maxGeohashLength;var h=b(c);if(h){h=a(h,h);e=u(d);f=m(h.x,G.longitudeRange,e.lon);var k=m(h.y,G.latitudeRange,
e.lat);e=f.value;g=k.value;f={xmin:f.min,xmax:f.max,ymin:k.min,ymax:k.max};for(var k=[],t=Math.ceil((e.length+g.length)/G.bitsPerBase32Char),l=0,x=0,p=0;p<t*G.bitsPerBase32Char;p++){var q=0===p%2?e[l++]:g[x++];null==q&&(q=0);k.push(q)}e=k.join("");g=G.bitsPerBase32Char;k=e.length/g;t=[];for(l=0;l<k;l++)x=e.substr(l*g,g),t.push(n(x));e=t.join("");return{point:h,extent:f,geohash:e}}},geohashToPoint:function(a){return K.geohashToCell(a).point},pointToGeohash:function(a,b){var c=K.pointToCell(a,b);return c&&
c.geohash},getCells:function(a){return p.map(a,function(a){return K.geohashToCell(a)})},getCellSize:function(a){var b=G.longitudeRange,c=G.latitudeRange,b=Math.abs(b[1]-b[0]),c=Math.abs(c[1]-c[0]);a=u(a||1);return{width:b/Math.pow(2,a.lon),height:c/Math.pow(2,a.lat)}},getCellSizeInMeters:function(a){a=K.getCellSize(a);var b=d.metersPerDegree;a.width*=b;a.height*=b;return a},getIntersecting:function(a,b,d){b=b||1;d=d||0;var e=[],g=c(a);if(g){d&&(g=K.expandExtent(a,b,d));a=g.normalize();var f={};p.forEach(a,
function(a){y(a,b,e,f)})}return e},countIntersecting:function(b,d,e){d=d||1;e=e||0;var g=0,f=c(b);if(f){e&&(f=K.expandExtent(b,d,e));b=f.normalize();if(2===b.length){g=z(b);f=v(b);e=D(g,d);var h=D(f,d);b=e.rows;e=e.cols+h.cols;g={x:g.xmin,y:g.ymax};f={x:f.xmax,y:f.ymax};g=a(g,{});f=a(f,{});g=K.pointToGeohash(g,d);d=K.pointToGeohash(f,d);g===d&&e--;d={rows:b,cols:e}}else d=D(b[0],d);g=d.cols*d.rows}return g},getChildren:function(a){a=a||"";var b=[],c;for(c in G.decimals)b.push(a+c);return b},getNeighbors:function(a){var b=
E(a,"n"),c=E(a,"s");return[b,E(b,"e"),E(b,"w"),c,E(c,"e"),E(c,"w"),E(a,"e"),E(a,"w")]},getExtentFromDistance:function(a,c){c=c||1E3;var d,e=b(a);e&&(d=B(e,c));return d},expandExtent:function(a,b,d){b=b||1;d=d||0;if(a=c(a)){if(d){a=a.normalize();if(2===a.length){var e=d;d=z(a);a=v(a);d=C(d,b,e,"min");a=C(a,b,e,"max");360<=d.getWidth()+a.getWidth()?(b=-180,a=180):(b=d.xmin,a=a.xmax);return new f(b,d.ymin,a,d.ymax)}return C(a[0],b,d)}return a}},getNeighborsWithinDistance:function(a,c,d){d=d||1E3;c=c||
1;var e=[];if(a=b(a)){d=B(a,d).normalize();var g={};p.forEach(d,function(a){y(a,c,e,g)})}return e}};r("extend-esri")&&q.setObject("layers.clustering.geohashUtils",K,k);return K})},"esri/layers/clustering/statUtils":function(){define(["dojo/_base/lang","../support/attributeUtils"],function(r,l){function q(e){return"number"===typeof e&&!isNaN(e)&&Infinity!==e&&-Infinity!==e}var p={sum:{initialize:function(){return{count:0,sum:null}},updateCellStat:function(e,f){q(f)&&(e.count++,e.sum+=f)},updateClusterStat:function(e,
f){f.count&&(e.count+=f.count,e.sum+=f.sum)},summarize:function(e){return e.sum}},avg:{initialize:function(e){return{count:0,sum:null,avg:null,sum_cosine:null,sum_sine:null}},updateCellStat:function(e,f,h){q(f)&&(e.count++,h.isAngular?(h.isArithmetic||(f=-1*f+90),e.sum_cosine+=Math.cos(f*Math.PI/180),e.sum_sine+=Math.sin(f*Math.PI/180)):e.sum+=f)},updateClusterStat:function(e,f,h){f.count&&(e.count+=f.count,h.isAngular?(e.sum_cosine+=f.sum_cosine,e.sum_sine+=f.sum_sine):e.sum+=f.sum)},summarize:function(e,
f){if(0<e.count){var h=e.count;f.isAngular?(h=180*Math.atan2(e.sum_sine/h,e.sum_cosine/h)/Math.PI,f.isArithmetic||(h=-1*(h-90)),e.avg=0>h?h+360:h):(e.avg=e.sum/h,f.isDate&&(e.avg=Math.ceil(e.avg)))}return e.avg}},type:{initialize:function(){return{uvInfos:{}}},updateCellStat:function(e,f){if(null==f||""===f||"string"===typeof f&&""===r.trim(f))f=null;var h=e.uvInfos;null==h[f]?h[f]={count:1,value:f}:h[f].count++},updateClusterStat:function(e,f){var h=e.uvInfos,d=f.uvInfos,b;for(b in d){var c=d[b];
null==h[b]?h[b]={count:c.count,value:c.value}:h[b].count+=c.count}},summarize:function(e){e=e.uvInfos;var f,h=-Infinity,d;for(f in e){var b=e[f];b.count>h?(h=b.count,d=b.value):b.count===h&&(d=null)}return d}}},k={isSupportedStatisticType:function(e){return p.hasOwnProperty(e)},getStatisticFunctions:function(e){return p[e]},getStatisticId:function(e,f){var h=l.getAttributeIdSource(e),h=h&&l.getAttributeId(h)||e.field;return f+"_"+h},getClusterField:function(e,f){return"cluster_"+k.getStatisticId(e,
f)},getStatisticHash:function(e,f){var h=[k.getStatisticId(e,f)];e.attributeType&&h.push(e.attributeType.toLowerCase());e.rotationType&&h.push(e.rotationType.toLowerCase());return h.join("_")}};return k})},"esri/dijit/AttributeInspector":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/connect dojo/_base/sniff dojo/_base/kernel dojo/has dojo/dom-style dojo/dom-construct ../kernel ../lang ../domUtils ../layers/InheritedDomain ../layers/FeatureLayer dojo/i18n!../nls/jsapi dojo/fx dojox/gfx dijit/_Widget dijit/_Templated dijit/Editor dijit/_editor/plugins/LinkDialog dijit/_editor/plugins/TextColor ./_EventedWidget ./editing/AttachmentEditor ./editing/Util ../tasks/query dijit/form/DateTextBox dijit/form/TextBox dijit/form/NumberTextBox dijit/form/FilteringSelect dijit/form/NumberSpinner dijit/form/Button dijit/form/SimpleTextarea dijit/form/ValidationTextBox dijit/form/TimeTextBox dijit/Tooltip dojo/data/ItemFileReadStore dojox/date/islamic dojox/date/islamic/Date dojox/date/islamic/locale dojo/text!./templates/AttributeInspector.html".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n,t,A,y,z,v,B,C,F,D,E,G,K,L,x,J,I,R,S,V,W,X,Y,Q,O){var M=r([B,t,A],{declaredClass:"esri.dijit.AttributeInspector",widgetsInTemplate:!0,templateString:O,onUpdate:function(){},onDelete:function(){},onAttributeChange:function(){},onNext:function(){},onReset:function(){},onCancel:function(){},_navMessage:"( ${idx} ${of} ${numFeatures} )",_currentAttributeFieldName:null,_aiConnects:[],_selection:[],_toolTips:[],_numFeatures:0,_featureIdx:0,_currentLInfo:null,_currentFeature:null,
_rollbackInfo:null,_eventMap:{update:!0,"delete":["feature"],"attribute-change":["feature","fieldName","fieldValue"],next:["feature"],reset:!0,cancel:!0},_defaultRichTextPlugins:"bold italic underline foreColor hiliteColor | justifyLeft justifyCenter justifyRight justifyFull | insertOrderedList insertUnorderedList indent outdent | createLink".split(" "),css:{label:"atiLabel",field:"atiField",textArea:"atiTextAreaField",richText:"atiRichTextField",attachmentEditor:"atiAttachmentEditor",red:"atiRequiredField"},
constructor:function(a,b){l.mixin(this,m.widgets.attributeInspector);a=a||{};a.featureLayer||a.layerInfos||console.error("esri.AttributeInspector: please provide correct parameter in the constructor");this._datePackage=this._getDatePackage(a);this._layerInfos=a.layerInfos||[{featureLayer:a.featureLayer,options:a.options||[]}];this._layerInfos=q.filter(this._layerInfos,function(a){return!a.disableAttributeUpdate});this._hideNavButtons=a.hideNavButtons||!1},postCreate:function(){if(q.every(this._layerInfos,
function(a){return a.featureLayer.loaded}))this._initLayerInfos(),this._createAttachmentEditor(),this.onFirstFeature();else{var a=this._layerInfos.length;q.forEach(this._layerInfos,function(b){b=b.featureLayer;if(b.loaded)a--;else var c=p.connect(b,"onLoad",this,function(b){p.disconnect(c);c=null;a--;a||(this._initLayerInfos(),this._createAttachmentEditor(),this.onFirstFeature())})},this)}},destroy:function(){this._destroyAttributeTable();q.forEach(this._aiConnects,p.disconnect);delete this._aiConnects;
this._attachmentEditor&&(this._attachmentEditor.destroy(),delete this._attachmentEditor);delete this._layerInfos;this._selection=this._currentFeature=this._currentLInfo=this._attributes=this._layerInfos=null;this.inherited(arguments)},refresh:function(){this._updateSelection()},first:function(){this.onFirstFeature()},last:function(){this.onLastFeature()},next:function(){this.onNextFeature()},previous:function(){this.onPreviousFeature()},showFeature:function(a,b){b&&(this._createOnlyFirstTime=!0);
this._updateSelection([a],b);this._updateUI()},onLayerSelectionChange:function(a,b,c){this._createOnlyFirstTime=!1;this._featureIdx=c===w.SELECTION_NEW?0:this._featureIdx;this._updateSelection();this._updateUI()},onLayerSelectionClear:function(){!this._selection||0>=this._selection.length||(this._featureIdx=this._numFeatures=0,this._selection=[],this._currentLInfo=this._currentFeature=null,this._updateUI())},onLayerUpdateEnd:function(a,b,c,d){},onLayerError:function(a,b,c,d){},onLayerEditsError:function(a,
b,c,d){},onLayerEditsComplete:function(a,b,c,d){d=d||[];if(d.length){var e=this._selection,g=a.featureLayer.objectIdField;q.forEach(d,l.hitch(this,function(a){q.some(e,l.hitch(this,function(b,c){if(b.attributes[g]!==a.objectId)return!1;this._selection.splice(c,1);return!0}))}))}b=b||[];b.length&&(this._selection=F.findFeatures(b,a.featureLayer),this._featureIdx=0);d=this._numFeatures=(this._selection=F.sortFeaturesById(this._layerInfos,this._selection))?this._selection.length:0;if(b.length){if(b=
d?this._selection[this._featureIdx]:null)d=b.getLayer().getEditCapabilities(),d.canCreate&&!d.canUpdate||this._showFeature(b);this._updateUI()}c=c||[];if(c.length){var f=this._rollbackInfo;q.forEach(c,function(b){var d=F.findFeatures(c,a.featureLayer)[0];if(!b.success&&d.attributes[a.featureLayer.objectIdField]===b.objectId&&f){var e=f.field;b=f.graphic.attributes[e.name];var g=q.filter(this._currentLInfo.fieldInfos,function(a){return a.fieldName===e.name},this)[0].dijit;d.attributes[e.name]=b;"esriFieldTypeDate"===
e.type&&(b=new Date(b));this._setValue(g,b)}},this)}this._rollbackInfo=null},onFieldValueChange:function(a,b){var c=a.field,d=a.dijit,e=this._currentFeature,g=this._currentLInfo,f=c.name,h;if(""===d.displayedValue||"dijit.form.ValidationTextBox"!==d.declaredClass||d.isValid())if(""!==d.displayedValue&&d.displayedValue!==b&&d.isValid&&!d.isValid())this._setValue(d,e.attributes[c.name]);else{if(h=!("esriFieldTypeInteger"!==c.type&&"esriFieldTypeSmallInteger"!==c.type&&"esriFieldTypeSingle"!==c.type&&
"esriFieldTypeDouble"!==c.type),b=""===b&&h||"undefined"===typeof b?null:b,h&&null!==b&&(b=Number(b)),"esriFieldTypeDate"===c.type&&(d instanceof Array?(h=d[0].getValue(),d=d[1].getValue(),b=h&&d?new Date(h.getFullYear(),h.getMonth(),h.getDate(),d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()):h||d||null):(b=d.getValue(),c.domain&&(b=Number(b))),b=b&&b.getTime?b.getTime():b&&b.toGregorian?b.toGregorian().getTime():b),this._currentFeature.attributes[c.name]!==b){if(f===g.typeIdField){var m=
this._findFirst(g.types,"id",b);q.forEach(g.fieldInfos,function(a){(c=a.field)&&c.name!==g.typeIdField&&(a=a.dijit,this._setFieldDomain(a,m,c)&&a&&(this._setValue(a,e.attributes[c.name]+""),!1===a.isValid()&&this._setValue(a,null)))},this)}this.onAttributeChange(e,f,b)}}else this._setValue(d,e.attributes[c.name])},onDeleteBtn:function(a){this._deleteFeature()},onNextFeature:function(a){this._onNextFeature(1)},onPreviousFeature:function(a){this._onNextFeature(-1)},onFirstFeature:function(a){this._onNextFeature(-1*
this._featureIdx)},onLastFeature:function(a){this._onNextFeature(this._numFeatures-1-this._featureIdx)},_initLayerInfos:function(){var a=this._layerInfos;this._editorTrackingInfos={};q.forEach(a,this._initLayerInfo,this)},_initLayerInfo:function(a){var b=a.featureLayer,d,e;this._userIds={};e=b.id;b.credential&&(this._userIds[e]=b.credential.userId);a.userId&&(this._userIds[e]=a.userId);this._connect(b,"onSelectionComplete",l.hitch(this,"onLayerSelectionChange",a));this._connect(b,"onSelectionClear",
l.hitch(this,"onLayerSelectionClear",a));this._connect(b,"onEditsComplete",l.hitch(this,"onLayerEditsComplete",a));this._connect(b,"error",l.hitch(this,"onLayerError",a));this._connect(b,"onUpdateEnd",l.hitch(this,"onLayerUpdateEnd",a));a.showAttachments=b.hasAttachments?c.isDefined(a.showAttachments)?a.showAttachments:!0:!1;a.hideFields=a.hideFields||[];a.htmlFields=a.htmlFields||[];a.isEditable=b.isEditable()?c.isDefined(a.isEditable)?a.isEditable:!0:!1;a.typeIdField=b.typeIdField;a.layerId=b.id;
a.types=b.types;b.globalIdField&&((d=this._findFirst(a.fieldInfos,"fieldName",b.globalIdField))||a.showGlobalID||a.hideFields.push(b.globalIdField));(e=this._findFirst(a.fieldInfos,"fieldName",b.objectIdField))||a.showObjectID||a.hideFields.push(b.objectIdField);var g=this._getFields(a.featureLayer);if(g){var f=a.fieldInfos||[],f=q.map(f,function(a){return l.mixin({},a)});f.length?a.fieldInfos=q.filter(q.map(f,l.hitch(this,function(b){var c=b.stringFieldOption||(this._isInFields(b.fieldName,a.htmlFields)?
M.STRING_FIELD_OPTION_RICHTEXT:M.STRING_FIELD_OPTION_TEXTBOX);return l.mixin(b,{field:this._findFirst(g,"name",b.fieldName),stringFieldOption:c})})),"return item.field;"):(g=q.filter(g,l.hitch(this,function(b){return!this._isInFields(b.name,a.hideFields)})),a.fieldInfos=q.map(g,l.hitch(this,function(b){var c=this._isInFields(b.name,a.htmlFields)?M.STRING_FIELD_OPTION_RICHTEXT:M.STRING_FIELD_OPTION_TEXTBOX;return{fieldName:b.name,field:b,stringFieldOption:c}})));a.showGlobalID&&!d&&f.push(this._findFirst(g,
"name",b.globalIdField));a.showObjectID&&!e&&f.push(this._findFirst(g,"name",b.objectIdField));d=[];b.editFieldsInfo&&(b.editFieldsInfo.creatorField&&d.push(b.editFieldsInfo.creatorField),b.editFieldsInfo.creationDateField&&d.push(b.editFieldsInfo.creationDateField),b.editFieldsInfo.editorField&&d.push(b.editFieldsInfo.editorField),b.editFieldsInfo.editDateField&&d.push(b.editFieldsInfo.editDateField));this._editorTrackingInfos[b.id]=d}},_createAttachmentEditor:function(){this._attachmentEditor=null;
var a=q.filter(this._layerInfos,function(a){return a.showAttachments});a&&a.length&&(this._attachmentEditor=new C({"class":this.css.attachmentEditor},this.attachmentEditor),this._attachmentEditor.startup())},_setCurrentLInfo:function(a){var b=this._currentLInfo?this._currentLInfo.featureLayer:null,c=a.featureLayer;if(b&&b.id===c.id&&!b.ownershipBasedAccessControlForFeatures&&(b=c.getEditCapabilities(),!b.canCreate||b.canUpdate))return;this._currentLInfo=a;this._createTable()},_updateSelection:function(a,
b){this._selection=a||[];q.forEach(this._layerInfos,this._getSelection,this);this._selection=F.sortFeaturesById(this._layerInfos,this._selection);this._numFeatures=this._selection.length;this._showFeature(this._numFeatures?this._selection[this._featureIdx]:null,b)},_getSelection:function(a){a=a.featureLayer.getSelectedFeatures();this._selection=this._selection.concat(a)},_updateUI:function(){var a=this._numFeatures,b=this._currentLInfo;this.layerName.innerHTML=b&&0!==a?b.featureLayer?b.featureLayer.name:
"":this.NLS_noFeaturesSelected;h.set(this.attributeTable,"display",a?"":"none");h.set(this.editButtons,"display",a?"":"none");h.set(this.navButtons,"display",!this._hideNavButtons&&1<a?"":"none");this.navMessage.innerHTML=c.substitute({idx:this._featureIdx+1,of:this.NLS_of,numFeatures:this._numFeatures},this._navMessage);this._attachmentEditor&&h.set(this._attachmentEditor.domNode,"display",b&&b.showAttachments&&a?"":"none");h.set(this.deleteBtn.domNode,"display",b&&!1===b.showDeleteButton||!this._canDelete?
"none":"");this.domNode.parentNode&&0<this.domNode.parentNode.scrollTop&&(this.domNode.parentNode.scrollTop=0)},_onNextFeature:function(a){this._featureIdx+=a;0>this._featureIdx?this._featureIdx=this._numFeatures-1:this._featureIdx>=this._numFeatures&&(this._featureIdx=0);a=this._selection.length?this._selection[this._featureIdx]:null;this._showFeature(a);this._updateUI();this.onNext(a)},_deleteFeature:function(){this.onDelete(this._currentFeature)},_showFeature:function(b,d){if(b){this._currentFeature=
b;var e=d?d:b.getLayer(),g=e.getEditCapabilities({feature:b,userId:this._userIds[e.id]});this._canUpdate=g.canUpdate;this._canDelete=g.canDelete;if(g=this._getLInfoFromFeatureLayer(e)){this._setCurrentLInfo(g);var f=b.attributes,h=this._findFirst(g.types,"id",f[g.typeIdField]),m=null;q.forEach(g.fieldInfos,function(a){m=a.field;var b=[];a.dijit&&1<a.dijit.length?q.forEach(a.dijit,function(a){b.push(a)}):b.push(a.dijit);q.forEach(b,l.hitch(this,function(a){if(a){var b=this._setFieldDomain(a,h,m),d=
f[m.name],d=d&&b&&b.codedValues&&b.codedValues.length?b.codedValues[d]?b.codedValues[d].name:d:d;c.isDefined(d)||(d="");"dijit.form.DateTextBox"===a.declaredClass||"dijit.form.TimeTextBox"===a.declaredClass?d=""===d?null:new Date(d):"dijit.form.FilteringSelect"===a.declaredClass&&(a._lastValueReported=null,d=f[m.name]+"");try{this._setValue(a,d),"dijit.form.FilteringSelect"===a.declaredClass&&!1===a.isValid()&&this._setValue(a,null)}catch(H){a.set("displayedValue",this.NLS_errorInvalid,!1)}}}))},
this);this._attachmentEditor&&g.showAttachments&&this._attachmentEditor.showAttachments(this._currentFeature,e);(e=e.getEditSummary(b))?(this.editorTrackingInfoDiv.innerHTML=e,a.show(this.editorTrackingInfoDiv)):a.hide(this.editorTrackingInfoDiv)}}},_setFieldDomain:function(a,b,d){if(!a)return null;var e=d.domain;b&&b.domains&&b.domains[d.name]&&!1===b.domains[d.name]instanceof g&&(e=b.domains[d.name]);if(!e)return null;e.codedValues&&0<e.codedValues.length?(a.set("store",this._toStore(q.map(e.codedValues,
function(a){return{id:a.code+="",name:a.name}}))),this._setValue(a,e.codedValues[0].code)):(a.constraints={min:c.isDefined(e.minValue)?e.minValue:Number.MIN_VALUE,max:c.isDefined(e.maxValue)?e.maxValue:Number.MAX_VALUE},this._setValue(a,a.constraints.min));return e},_setValue:function(a,b){a.set&&(a._onChangeActive=!1,a.set("value",b,!0),a._onChangeActive=!0)},_getFields:function(a){var b=a._getOutFields();if(!b)return null;a=a.fields;return"*"==b?a:q.filter(q.map(b,l.hitch(this,"_findFirst",a,"name")),
c.isDefined)},_isInFields:function(a,b){return a&&(b||b.length)?q.some(b,function(b){return b.toLowerCase()===a.toLowerCase()}):!1},_isFieldNullable:function(a,b){return!(!1===a.nullable||b.field&&!1===b.field.nullable)},_isFieldRequired:function(a,b){return!1!==a.editable&&!1!==b.isEditable&&!this._isFieldNullable(a,b)},_findFirst:function(a,b,c){return(a=q.filter(a,function(a){return a.hasOwnProperty(b)&&a[b]===c}))&&a.length?a[0]:null},_getLInfoFromFeatureLayer:function(a){return this._findFirst(this._layerInfos,
"layerId",a?a.id:null)},_createTable:function(){this._destroyAttributeTable();this.attributeTable.innerHTML="";this._attributes=d.create("table",{cellspacing:"0",cellpadding:"0"},this.attributeTable);var a=d.create("tbody",null,this._attributes),b=this._currentLInfo,c=this._findFirst(b.types,"id",this._currentFeature.attributes[b.typeIdField]);q.forEach(b.fieldInfos,l.hitch(this,"_createField",c,a),this);this._createOnlyFirstTime=!1},_createField:function(a,b,c){var e=this._currentLInfo,g=c.field;
if(!this._isInFields(g.name,e.hideFields)&&!this._isInFields(g.name,this._editorTrackingInfos[e.featureLayer.id])){var f=!1,h,m,k;b=d.create("tr",null,b);h=d.create("td",{innerHTML:c.label||g.alias||g.name,"class":this.css.label,"data-fieldname":g.name},b);this._isFieldRequired(g,c)&&d.create("span",{"class":this.css.red,innerHTML:" *"},h);b=d.create("td",null,b);if(c.customField)d.place(c.customField.domNode||c.customField,d.create("div",null,b),"first"),m=c.customField;else if(!1===e.isEditable||
!1===g.editable||!1===c.isEditable||"esriFieldTypeOID"===g.type||"esriFieldTypeGlobalID"===g.type||!this._canUpdate&&!this._createOnlyFirstTime)f=!0;e=e.typeIdField&&g.name.toLowerCase()==e.typeIdField.toLowerCase();h=!!this._getDomainForField(g,a);!m&&e?m=this._createTypeField(g,c,b):!m&&h&&(m=this._createDomainField(g,c,a,b));if(!m)switch(g.type){case "esriFieldTypeString":m=this._createStringField(g,c,b);break;case "esriFieldTypeDate":m=this._createDateField(g,c,b);c.format&&c.format.time&&(k=
this._createTimeField(g,c,b));break;case "esriFieldTypeInteger":case "esriFieldTypeSmallInteger":m=this._createIntField(g,c,b);break;case "esriFieldTypeSingle":case "esriFieldTypeDouble":m=this._createFltField(g,c,b);break;default:m=this._createStringField(g,c,b)}c.tooltip&&c.tooltip.length&&this._toolTips.push(new V({connectId:[m.id],label:c.tooltip}));m.onChange=l.hitch(this,"onFieldValueChange",c);m.set("disabled",f);k?(c.dijit=[m,k],k.onChange=l.hitch(this,"onFieldValueChange",c),k.set("disabled",
f)):c.dijit=m}},_createTypeField:function(a,b,c){c=d.create("div",null,c);var e=a.domain;return e&&"range"===e.type&&e.minValue===e.maxValue?new R({"class":this.css.field,trim:!0,maxLength:a.length,name:a.alias||a.name,required:this._isFieldRequired(a,b)},c):new L({"class":this.css.field,name:a.alias||a.name,required:this._isFieldRequired(a,b),store:this._toStore(q.map(this._currentLInfo.types,function(a){return{id:a.id,name:a.name}})),searchAttr:"name"},c)},_getDomainForField:function(a,b){var c=
a.domain,d=a.name;d&&b&&b.domains&&b.domains[d]&&!1===b.domains[d]instanceof g&&(c=b.domains[d]);return c||null},_createDomainField:function(a,b,c,e){c=this._getDomainForField(a,c);e=d.create("div",null,e);return c.codedValues?new L({"class":this.css.field,name:a.alias||a.name,searchAttr:"name",required:this._isFieldRequired(a,b)},e):new x({"class":this.css.field},e)},_createStringField:function(a,b,c){c=d.create("div",null,c);var e={trim:!0,maxLength:a.length,required:this._isFieldRequired(a,b)};
if(b.stringFieldOption===M.STRING_FIELD_OPTION_TEXTAREA)return e["class"]=this.css.field+" "+this.css.textArea,new I(e,c);if(b.stringFieldOption===M.STRING_FIELD_OPTION_RICHTEXT)return e["class"]=this.css.field+" "+this.css.richText,e.height="100%",e.width="100%",e.plugins=b.richTextPlugins||this._defaultRichTextPlugins,c=new y(e,c),c.startup(),c;var g=this;e.validator=function(c,d){this._maskValidSubsetError=!1;this._hasBeenBlurred=!0;return g._isFieldNullable(a,b)||!(""===c||null===c)};return new R(e,
c)},_createTimeField:function(a,b,c){c=d.create("div",null,c);a={"class":this.css.field,trim:!0,required:this._isFieldRequired(a,b),constraints:{formatLength:"medium"}};this._datePackage&&(a.datePackage=this._datePackage);return new S(a,c)},_createDateField:function(a,b,c){c=d.create("div",null,c);a={"class":this.css.field,trim:!0,required:this._isFieldRequired(a,b)};this._datePackage&&(a.datePackage=this._datePackage);return new E(a,c)},_createIntField:function(a,b,c){c=d.create("div",null,c);return new K({"class":this.css.field,
constraints:"esriFieldTypeSmallInteger"===a.type?{min:-32768,max:32767,places:0}:{places:0},trim:!0,invalidMessage:this.NLS_validationInt,required:this._isFieldRequired(a,b)},c)},_createFltField:function(a,b,c){c=d.create("div",null,c);return new K({"class":this.css.field,constraints:{max:Infinity,min:-Infinity,places:"0,20"},trim:!0,invalidMessage:this.NLS_validationFlt,required:this._isFieldRequired(a,b)},c)},_toStore:function(a){return new W({data:{identifier:"id",label:"name",items:a}})},_connect:function(a,
b,c){this._aiConnects.push(p.connect(a,b,c))},_getDatePackage:function(a){return null===a.datePackage?null:a.datePackage?a.datePackage:"ar"===e.locale?"dojox.date.islamic":null},_destroyAttributeTable:function(){q.forEach(this._layerInfos,function(a){q.forEach(a.fieldInfos,function(a){var b=a.dijit;if(b){b._onChangeHandle=null;if(a.customField)return;b instanceof Array?q.forEach(b,l.hitch(this,function(a){a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy();a._onChangeHandle=null})):b.destroyRecursive?
b.destroyRecursive():b.destroy&&b.destroy()}a.dijit=null},this)},this);q.forEach(this._toolTips,function(a){a.destroy()});this._toolTips=[];this._attributes&&d.destroy(this._attributes)}});l.mixin(M,{STRING_FIELD_OPTION_RICHTEXT:"richtext",STRING_FIELD_OPTION_TEXTAREA:"textarea",STRING_FIELD_OPTION_TEXTBOX:"textbox"});f("extend-esri")&&l.setObject("dijit.AttributeInspector",M,b);return M})},"dijit/Editor":function(){define("require dojo/_base/array dojo/_base/declare dojo/Deferred dojo/i18n dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/sniff dojo/string dojo/topic ./_Container ./Toolbar ./ToolbarSeparator ./layout/_LayoutWidget ./form/ToggleButton ./_editor/_Plugin ./_editor/plugins/EnterKeyHandling ./_editor/html ./_editor/range ./_editor/RichText ./main dojo/i18n!./_editor/nls/commands".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n,t,A,y,z,v,B,C,F){function D(a){return new y({command:a.name})}function E(a){return new y({buttonClass:A,command:a.name})}q=q("dijit.Editor",C,{plugins:null,extraPlugins:null,constructor:function(){c.isArray(this.plugins)||(this.plugins=["undo","redo","|","cut","copy","paste","|","bold","italic","underline","strikethrough","|","insertOrderedList","insertUnorderedList","indent","outdent","|","justifyLeft","justifyRight","justifyCenter","justifyFull",z]);this._plugins=
[];this._editInterval=1E3*this.editActionInterval;if(a("ie")||a("trident")||a("edge"))this.events.push("onBeforeDeactivate"),this.events.push("onBeforeActivate")},postMixInProperties:function(){this.setValueDeferred=new p;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this._steps=this._steps.slice(0);this._undoedSteps=this._undoedSteps.slice(0);c.isArray(this.extraPlugins)&&(this.plugins=this.plugins.concat(this.extraPlugins));this.commands=k.getLocalization("dijit._editor",
"commands",this.lang);a("webkit")&&d.set(this.domNode,"KhtmlUserSelect","none")},startup:function(){this.inherited(arguments);this.toolbar||(this.toolbar=new u({ownerDocument:this.ownerDocument,dir:this.dir,lang:this.lang,"aria-label":this.id}),this.header.appendChild(this.toolbar.domNode));l.forEach(this.plugins,this.addPlugin,this);this.setValueDeferred.resolve(!0);f.add(this.iframe.parentNode,"dijitEditorIFrameContainer");f.add(this.iframe,"dijitEditorIFrame");e.set(this.iframe,"allowTransparency",
!0);this.toolbar.startup();this.onNormalizedDisplayChanged()},destroy:function(){l.forEach(this._plugins,function(a){a&&a.destroy&&a.destroy()});this._plugins=[];this.toolbar.destroyRecursive();delete this.toolbar;this.inherited(arguments)},addPlugin:function(a,b){var d=c.isString(a)?{name:a}:c.isFunction(a)?{ctor:a}:a;if(!d.setEditor){var e={args:d,plugin:null,editor:this};d.name&&(y.registry[d.name]?e.plugin=y.registry[d.name](d):w.publish(F._scopeName+".Editor.getPlugin",e));if(!e.plugin)try{var g=
d.ctor||c.getObject(d.name)||r(d.name);g&&(e.plugin=new g(d))}catch(I){throw Error(this.id+": cannot find plugin ["+d.name+"]");}if(!e.plugin)throw Error(this.id+": cannot find plugin ["+d.name+"]");a=e.plugin}1<arguments.length?this._plugins[b]=a:this._plugins.push(a);a.setEditor(this);c.isFunction(a.setToolbar)&&a.setToolbar(this.toolbar)},resize:function(a){a&&t.prototype.resize.apply(this,arguments)},layout:function(){var a=this._contentBox.h-(this.getHeaderHeight()+this.getFooterHeight()+h.getPadBorderExtents(this.iframe.parentNode).h+
h.getMarginExtents(this.iframe.parentNode).h);this.editingArea.style.height=a+"px";this.iframe&&(this.iframe.style.height="100%");this._layoutMode=!0},_onIEMouseDown:function(a){var b,c=this.document.body,d=c.clientWidth,e=c.clientHeight,g=c.clientLeft,f=c.offsetWidth,h=c.offsetHeight,m=c.offsetLeft;/^rtl$/i.test(c.dir||"")?d<f&&a.x>d&&a.x<f&&(b=!0):a.x<g&&a.x>m&&(b=!0);b||e<h&&a.y>e&&a.y<h&&(b=!0);b||(delete this._cursorToStart,delete this._savedSelection,"BODY"==a.target.tagName&&this.defer("placeCursorAtEnd"),
this.inherited(arguments))},onBeforeActivate:function(){this._restoreSelection()},onBeforeDeactivate:function(a){this.customUndo&&this.endEditing(!0);"BODY"!=a.target.tagName&&this._saveSelection()},customUndo:!0,editActionInterval:3,beginEditing:function(a){this._inEditing||(this._inEditing=!0,this._beginEditing(a));0<this.editActionInterval&&(this._editTimer&&this._editTimer.remove(),this._editTimer=this.defer("endEditing",this._editInterval))},_steps:[],_undoedSteps:[],execCommand:function(a){if(!this.customUndo||
"undo"!=a&&"redo"!=a){this.customUndo&&(this.endEditing(),this._beginEditing());var b=this.inherited(arguments);this.customUndo&&this._endEditing();return b}return this[a]()},_pasteImpl:function(){return this._clipboardCommand("paste")},_cutImpl:function(){return this._clipboardCommand("cut")},_copyImpl:function(){return this._clipboardCommand("copy")},_clipboardCommand:function(b){var c;try{if(c=this.document.execCommand(b,!1,null),a("webkit")&&!c)throw{};}catch(L){c=g.substitute,alert(c(this.commands.systemShortcut,
[this.commands[b],c(this.commands[a("mac")?"appleKey":"ctrlKey"],[{cut:"X",copy:"C",paste:"V"}[b]])])),c=!1}return c},queryCommandEnabled:function(a){return!this.customUndo||"undo"!=a&&"redo"!=a?this.inherited(arguments):"undo"==a?1<this._steps.length:0<this._undoedSteps.length},_moveToBookmark:function(b){var d=b.mark,e=b.mark;b=b.isCollapsed;var g,f,h;e&&(9>a("ie")||9===a("ie")&&a("quirks")?c.isArray(e)?(d=[],l.forEach(e,function(a){d.push(B.getNode(a,this.editNode))},this),this.selection.moveToBookmark({mark:d,
isCollapsed:b})):e.startContainer&&e.endContainer&&(h=B.getSelection(this.window))&&h.removeAllRanges&&(h.removeAllRanges(),b=B.create(this.window),g=B.getNode(e.startContainer,this.editNode),f=B.getNode(e.endContainer,this.editNode),g&&f&&(b.setStart(g,e.startOffset),b.setEnd(f,e.endOffset),h.addRange(b))):(h=B.getSelection(this.window))&&h.removeAllRanges&&(h.removeAllRanges(),b=B.create(this.window),g=B.getNode(e.startContainer,this.editNode),f=B.getNode(e.endContainer,this.editNode),g&&f&&(b.setStart(g,
e.startOffset),b.setEnd(f,e.endOffset),h.addRange(b))))},_changeToStep:function(a,b){this.setValue(b.text);var c=b.bookmark;c&&this._moveToBookmark(c)},undo:function(){var a=!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var b=this._steps.pop();b&&0<this._steps.length&&(this.focus(),this._changeToStep(b,this._steps[this._steps.length-1]),this._undoedSteps.push(b),this.onDisplayChanged(),delete this._undoRedoActive,a=!0);delete this._undoRedoActive}return a},redo:function(){var a=
!1;if(!this._undoRedoActive){this._undoRedoActive=!0;this.endEditing(!0);var b=this._undoedSteps.pop();b&&0<this._steps.length&&(this.focus(),this._changeToStep(this._steps[this._steps.length-1],b),this._steps.push(b),this.onDisplayChanged(),a=!0);delete this._undoRedoActive}return a},endEditing:function(a){this._editTimer&&(this._editTimer=this._editTimer.remove());this._inEditing&&(this._endEditing(a),this._inEditing=!1)},_getBookmark:function(){var b=this.selection.getBookmark(),d=[];if(b&&b.mark){var e=
b.mark;if(9>a("ie")||9===a("ie")&&a("quirks")){var g=B.getSelection(this.window);if(c.isArray(e))l.forEach(b.mark,function(a){d.push(B.getIndex(a,this.editNode).o)},this),b.mark=d;else if(g){var f;g.rangeCount&&(f=g.getRangeAt(0));b.mark=f?f.cloneRange():this.selection.getBookmark()}}try{b.mark&&b.mark.startContainer&&(d=B.getIndex(b.mark.startContainer,this.editNode).o,b.mark={startContainer:d,startOffset:b.mark.startOffset,endContainer:b.mark.endContainer===b.mark.startContainer?d:B.getIndex(b.mark.endContainer,
this.editNode).o,endOffset:b.mark.endOffset})}catch(I){b.mark=null}}return b},_beginEditing:function(){0===this._steps.length&&this._steps.push({text:v.getChildrenHtml(this.editNode),bookmark:this._getBookmark()})},_endEditing:function(){var a=v.getChildrenHtml(this.editNode);this._undoedSteps=[];this._steps.push({text:a,bookmark:this._getBookmark()})},onKeyDown:function(c){a("ie")||this.iframe||c.keyCode!=b.TAB||this.tabIndent||this._saveSelection();if(this.customUndo){var d=c.keyCode;if(c.ctrlKey&&
!c.shiftKey&&!c.altKey){if(90==d||122==d){c.stopPropagation();c.preventDefault();this.undo();return}if(89==d||121==d){c.stopPropagation();c.preventDefault();this.redo();return}}this.inherited(arguments);switch(d){case b.ENTER:case b.BACKSPACE:case b.DELETE:this.beginEditing();break;case 88:case 86:if(c.ctrlKey&&!c.altKey&&!c.metaKey){this.endEditing();88==c.keyCode?this.beginEditing("cut"):this.beginEditing("paste");this.defer("endEditing",1);break}default:if(!c.ctrlKey&&!c.altKey&&!c.metaKey&&(c.keyCode<
b.F1||c.keyCode>b.F15)){this.beginEditing();break}case b.ALT:this.endEditing();break;case b.UP_ARROW:case b.DOWN_ARROW:case b.LEFT_ARROW:case b.RIGHT_ARROW:case b.HOME:case b.END:case b.PAGE_UP:case b.PAGE_DOWN:this.endEditing(!0);case b.CTRL:case b.SHIFT:case b.TAB:}}else this.inherited(arguments)},_onBlur:function(){this.inherited(arguments);this.endEditing(!0)},_saveSelection:function(){try{this._savedSelection=this._getBookmark()}catch(G){}},_restoreSelection:function(){this._savedSelection&&
(delete this._cursorToStart,this.selection.isCollapsed()&&this._moveToBookmark(this._savedSelection),delete this._savedSelection)},onClick:function(){this.endEditing(!0);this.inherited(arguments)},replaceValue:function(a){this.customUndo?this.isClosed?this.setValue(a):(this.beginEditing(),a||(a="\x26#160;"),this.setValue(a),this.endEditing()):this.inherited(arguments)},_setDisabledAttr:function(a){this.setValueDeferred.then(c.hitch(this,function(){!this.disabled&&a||!this._buttonEnabledPlugins&&a?
l.forEach(this._plugins,function(a){a.set("disabled",!0)}):this.disabled&&!a&&l.forEach(this._plugins,function(a){a.set("disabled",!1)})}));this.inherited(arguments)},_setStateClass:function(){try{this.inherited(arguments),this.document&&this.document.body&&d.set(this.document.body,"color",d.get(this.iframe,"color"))}catch(G){}}});c.mixin(y.registry,{undo:D,redo:D,cut:D,copy:D,paste:D,insertOrderedList:D,insertUnorderedList:D,indent:D,outdent:D,justifyCenter:D,justifyFull:D,justifyLeft:D,justifyRight:D,
"delete":D,selectAll:D,removeFormat:D,unlink:D,insertHorizontalRule:D,bold:E,italic:E,underline:E,strikethrough:E,subscript:E,superscript:E,"|":function(){return new y({setEditor:function(a){this.editor=a;this.button=new n({ownerDocument:a.ownerDocument})}})}});return q})},"dijit/_Container":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/dom-construct","dojo/_base/kernel"],function(r,l,q,p){return l("dijit._Container",null,{buildRendering:function(){this.inherited(arguments);this.containerNode||
(this.containerNode=this.domNode)},addChild:function(k,e){var f=this.containerNode;if(0<e){for(f=f.firstChild;0<e;)1==f.nodeType&&e--,f=f.nextSibling;f?e="before":(f=this.containerNode,e="last")}q.place(k.domNode,f,e);this._started&&!k._started&&k.startup()},removeChild:function(k){"number"==typeof k&&(k=this.getChildren()[k]);k&&(k=k.domNode)&&k.parentNode&&k.parentNode.removeChild(k)},hasChildren:function(){return 0<this.getChildren().length},_getSiblingOfChild:function(k,e){var f=this.getChildren(),
h=r.indexOf(f,k);return f[h+e]},getIndexOfChild:function(k){return r.indexOf(this.getChildren(),k)}})})},"dijit/Toolbar":function(){define("require dojo/_base/declare dojo/has dojo/keys dojo/ready ./_Widget ./_KeyNavContainer ./_TemplatedMixin".split(" "),function(r,l,q,p,k,e,f,h){q("dijit-legacy-requires")&&k(0,function(){r(["dijit/ToolbarSeparator"])});return l("dijit.Toolbar",[e,h,f],{templateString:'\x3cdiv class\x3d"dijit" role\x3d"toolbar" tabIndex\x3d"${tabIndex}" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e',
baseClass:"dijitToolbar",_onLeftArrow:function(){this.focusPrev()},_onRightArrow:function(){this.focusNext()}})})},"dijit/_KeyNavContainer":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/_base/kernel dojo/keys dojo/_base/lang ./registry ./_Container ./_FocusMixin ./_KeyNavMixin".split(" "),function(r,l,q,p,k,e,f,h,d,b){return l("dijit._KeyNavContainer",[d,b,h],{connectKeyNavHandlers:function(b,a){var c=this._keyNavCodes={},d=e.hitch(this,"focusPrev"),f=e.hitch(this,"focusNext");
r.forEach(b,function(a){c[a]=d});r.forEach(a,function(a){c[a]=f});c[k.HOME]=e.hitch(this,"focusFirstChild");c[k.END]=e.hitch(this,"focusLastChild")},startupKeyNavChildren:function(){p.deprecated("startupKeyNavChildren() call no longer needed","","2.0")},startup:function(){this.inherited(arguments);r.forEach(this.getChildren(),e.hitch(this,"_startupChild"))},addChild:function(b,a){this.inherited(arguments);this._startupChild(b)},_startupChild:function(b){b.set("tabIndex","-1")},_getFirst:function(){var b=
this.getChildren();return b.length?b[0]:null},_getLast:function(){var b=this.getChildren();return b.length?b[b.length-1]:null},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,1))},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),!0)},childSelector:function(b){return(b=f.byNode(b))&&b.getParent()==this}})})},"dijit/_KeyNavMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on dijit/registry dijit/_FocusMixin".split(" "),
function(r,l,q,p,k,e,f,h){return l("dijit._KeyNavMixin",h,{tabIndex:"0",childSelector:null,postCreate:function(){this.inherited(arguments);q.set(this.domNode,"tabIndex",this.tabIndex);if(!this._keyNavCodes){var d=this._keyNavCodes={};d[p.HOME]=k.hitch(this,"focusFirstChild");d[p.END]=k.hitch(this,"focusLastChild");d[this.isLeftToRight()?p.LEFT_ARROW:p.RIGHT_ARROW]=k.hitch(this,"_onLeftArrow");d[this.isLeftToRight()?p.RIGHT_ARROW:p.LEFT_ARROW]=k.hitch(this,"_onRightArrow");d[p.UP_ARROW]=k.hitch(this,
"_onUpArrow");d[p.DOWN_ARROW]=k.hitch(this,"_onDownArrow")}var b=this,d="string"==typeof this.childSelector?this.childSelector:k.hitch(this,"childSelector");this.own(e(this.domNode,"keypress",k.hitch(this,"_onContainerKeypress")),e(this.domNode,"keydown",k.hitch(this,"_onContainerKeydown")),e(this.domNode,"focus",k.hitch(this,"_onContainerFocus")),e(this.containerNode,e.selector(d,"focusin"),function(c){b._onChildFocus(f.getEnclosingWidget(this),c)}))},_onLeftArrow:function(){},_onRightArrow:function(){},
_onUpArrow:function(){},_onDownArrow:function(){},focus:function(){this.focusFirstChild()},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},focusFirstChild:function(){this.focusChild(this._getFirstFocusableChild())},focusLastChild:function(){this.focusChild(this._getLastFocusableChild())},focusChild:function(d,b){d&&(this.focusedChild&&d!==this.focusedChild&&this._onChildBlur(this.focusedChild),
d.set("tabIndex",this.tabIndex),d.focus(b?"end":"start"))},_onContainerFocus:function(d){d.target!==this.domNode||this.focusedChild||this.focus()},_onFocus:function(){q.set(this.domNode,"tabIndex","-1");this.inherited(arguments)},_onBlur:function(d){q.set(this.domNode,"tabIndex",this.tabIndex);this.focusedChild&&(this.focusedChild.set("tabIndex","-1"),this.lastFocusedChild=this.focusedChild,this._set("focusedChild",null));this.inherited(arguments)},_onChildFocus:function(d){d&&d!=this.focusedChild&&
(this.focusedChild&&!this.focusedChild._destroyed&&this.focusedChild.set("tabIndex","-1"),d.set("tabIndex",this.tabIndex),this.lastFocused=d,this._set("focusedChild",d))},_searchString:"",multiCharSearchDuration:1E3,onKeyboardSearch:function(d,b,c,a){d&&this.focusChild(d)},_keyboardSearchCompare:function(d,b){var c=d.domNode,c=(d.label||(c.focusNode?c.focusNode.label:"")||c.innerText||c.textContent||"").replace(/^\s+/,"").substr(0,b.length).toLowerCase();return b.length&&c==b?-1:0},_isFormElement:function(d){return"INPUT"===
d.tagName||"TEXTAREA"===d.tagName||"SELECT"===d.tagName||"BUTTON"===d.tagName},_onContainerKeydown:function(d){if(!this._isFormElement(document.activeElement)){var b=this._keyNavCodes[d.keyCode];b?(b(d,this.focusedChild),d.stopPropagation(),d.preventDefault(),this._searchString=""):d.keyCode!=p.SPACE||!this._searchTimer||d.ctrlKey||d.altKey||d.metaKey||(d.stopImmediatePropagation(),d.preventDefault(),this._keyboardSearch(d," "))}},_onContainerKeypress:function(d){this._isFormElement(document.activeElement)||
d.charCode<=p.SPACE||d.ctrlKey||d.altKey||d.metaKey||(d.preventDefault(),d.stopPropagation(),this._keyboardSearch(d,String.fromCharCode(d.charCode).toLowerCase()))},_keyboardSearch:function(d,b){var c=null,a,e=0;k.hitch(this,function(){this._searchTimer&&this._searchTimer.remove();this._searchString+=b;var d=/^(.)\1*$/.test(this._searchString)?1:this._searchString.length;a=this._searchString.substr(0,d);this._searchTimer=this.defer(function(){this._searchTimer=null;this._searchString=""},this.multiCharSearchDuration);
var g=this.focusedChild||null;if(1==d||!g)if(g=this._getNextFocusableChild(g,1),!g)return;d=g;do{var f=this._keyboardSearchCompare(g,a);f&&0==e++&&(c=g);if(-1==f){e=-1;break}g=this._getNextFocusableChild(g,1)}while(g&&g!=d)})();this.onKeyboardSearch(c,d,a,e)},_onChildBlur:function(){},_getNextFocusableChild:function(d,b){var c=d;do{if(d)d=this._getNext(d,b);else if(d=this[0<b?"_getFirst":"_getLast"](),!d)break;if(null!=d&&d!=c&&d.isFocusable())return d}while(d!=c);return null},_getFirst:function(){return null},
_getLast:function(){return null},_getNext:function(d,b){if(d)for(d=d.domNode;d;)if((d=d[0>b?"previousSibling":"nextSibling"])&&"getAttribute"in d){var c=f.byNode(d);if(c)return c}return null}})})},"dijit/ToolbarSeparator":function(){define(["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],function(r,l,q,p){return r("dijit.ToolbarSeparator",[q,p],{templateString:'\x3cdiv class\x3d"dijitToolbarSeparator dijitInline" role\x3d"presentation"\x3e\x3c/div\x3e',buildRendering:function(){this.inherited(arguments);
l.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"dijit/layout/_LayoutWidget":function(){define("dojo/_base/lang ../_Widget ../_Container ../_Contained ../Viewport dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style".split(" "),function(r,l,q,p,k,e,f,h,d){return e("dijit.layout._LayoutWidget",[l,q,p],{baseClass:"dijitLayoutContainer",isLayoutContainer:!0,_setTitleAttr:null,buildRendering:function(){this.inherited(arguments);f.add(this.domNode,"dijitContainer")},
startup:function(){if(!this._started){this.inherited(arguments);var b=this.getParent&&this.getParent();b&&b.isLayoutContainer||(this.resize(),this.own(k.on("resize",r.hitch(this,"resize"))))}},resize:function(b,c){var a=this.domNode;b&&h.setMarginBox(a,b);var e=c||{};r.mixin(e,b||{});"h"in e&&"w"in e||(e=r.mixin(h.getMarginBox(a),e));var f=d.getComputedStyle(a),m=h.getMarginExtents(a,f),k=h.getBorderExtents(a,f),e=this._borderBox={w:e.w-(m.w+k.w),h:e.h-(m.h+k.h)},m=h.getPadExtents(a,f);this._contentBox=
{l:d.toPixelValue(a,f.paddingLeft),t:d.toPixelValue(a,f.paddingTop),w:e.w-m.w,h:e.h-m.h};this.layout()},layout:function(){},_setupChild:function(b){f.add(b.domNode,this.baseClass+"-child "+(b.baseClass?this.baseClass+"-"+b.baseClass:""))},addChild:function(b,c){this.inherited(arguments);this._started&&this._setupChild(b)},removeChild:function(b){f.remove(b.domNode,this.baseClass+"-child"+(b.baseClass?" "+this.baseClass+"-"+b.baseClass:""));this.inherited(arguments)}})})},"dijit/_Contained":function(){define(["dojo/_base/declare",
"./registry"],function(r,l){return r("dijit._Contained",null,{_getSibling:function(l){var p=this.getParent();return p&&p._getSiblingOfChild&&p._getSiblingOfChild(this,"previous"==l?-1:1)||null},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var l=this.getParent();return l&&l.getIndexOfChild?l.getIndexOfChild(this):-1}})})},"dijit/Viewport":function(){define(["dojo/Evented","dojo/on","dojo/domReady",
"dojo/sniff","dojo/window"],function(r,l,q,p,k){var e=new r,f;q(function(){var h=k.getBox();e._rlh=l(window,"resize",function(){var b=k.getBox();if(h.h!=b.h||h.w!=b.w)h=b,e.emit("resize")});if(8==p("ie")){var d=screen.deviceXDPI;setInterval(function(){screen.deviceXDPI!=d&&(d=screen.deviceXDPI,e.emit("resize"))},500)}p("ios")&&(l(document,"focusin",function(b){f=b.target}),l(document,"focusout",function(b){f=null}))});e.getEffectiveBox=function(e){e=k.getBox(e);var d=f&&f.tagName&&f.tagName.toLowerCase();
p("ios")&&f&&!f.readOnly&&("textarea"==d||"input"==d&&/^(color|email|number|password|search|tel|text|url)$/.test(f.type))&&(e.h*=0==orientation||180==orientation?.66:.4,d=f.getBoundingClientRect(),e.h=Math.max(e.h,d.top+d.height));return e};return e})},"dijit/form/ToggleButton":function(){define(["dojo/_base/declare","dojo/_base/kernel","./Button","./_ToggleButtonMixin"],function(r,l,q,p){return r("dijit.form.ToggleButton",[q,p],{baseClass:"dijitToggleButton",setChecked:function(k){l.deprecated("setChecked("+
k+") is deprecated. Use set('checked',"+k+") instead.","","2.0");this.set("checked",k)}})})},"dijit/form/Button":function(){define("require dojo/_base/declare dojo/dom-class dojo/has dojo/_base/kernel dojo/_base/lang dojo/ready ./_FormWidget ./_ButtonMixin dojo/text!./templates/Button.html ../a11yclick".split(" "),function(r,l,q,p,k,e,f,h,d,b){p("dijit-legacy-requires")&&f(0,function(){r(["dijit/form/DropDownButton","dijit/form/ComboButton","dijit/form/ToggleButton"])});f=l("dijit.form.Button"+(p("dojo-bidi")?
"_NoBidi":""),[h,d],{showLabel:!0,iconClass:"dijitNoIcon",_setIconClassAttr:{node:"iconNode",type:"class"},baseClass:"dijitButton",templateString:b,_setValueAttr:"valueNode",_setNameAttr:function(b){this.valueNode&&this.valueNode.setAttribute("name",b)},postCreate:function(){this.inherited(arguments);this._setLabelFromContainer()},_setLabelFromContainer:function(){this.containerNode&&!this.label&&(this.label=e.trim(this.containerNode.innerHTML),this.onLabelSet())},_setShowLabelAttr:function(b){this.containerNode&&
q.toggle(this.containerNode,"dijitDisplayNone",!b);this._set("showLabel",b)},setLabel:function(b){k.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",b)},onLabelSet:function(){this.inherited(arguments);this.showLabel||"title"in this.params||(this.titleNode.title=e.trim(this.containerNode.innerText||this.containerNode.textContent||""))}});p("dojo-bidi")&&(f=l("dijit.form.Button",f,{onLabelSet:function(){this.inherited(arguments);this.titleNode.title&&
this.applyTextDir(this.titleNode,this.titleNode.title)},_setTextDirAttr:function(b){this._created&&this.textDir!=b&&(this._set("textDir",b),this._setLabelAttr(this.label))}}));return f})},"dijit/form/_FormWidget":function(){define("dojo/_base/declare dojo/sniff dojo/_base/kernel dojo/ready ../_Widget ../_CssStateMixin ../_TemplatedMixin ./_FormWidgetMixin".split(" "),function(r,l,q,p,k,e,f,h){l("dijit-legacy-requires")&&p(0,function(){require(["dijit/form/_FormValueWidget"])});return r("dijit.form._FormWidget",
[k,f,e,h],{setDisabled:function(d){q.deprecated("setDisabled("+d+") is deprecated. Use set('disabled',"+d+") instead.","","2.0");this.set("disabled",d)},setValue:function(d){q.deprecated("dijit.form._FormWidget:setValue("+d+") is deprecated.  Use set('value',"+d+") instead.","","2.0");this.set("value",d)},getValue:function(){q.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},postMixInProperties:function(){this.nameAttrSetting=
this.name&&!l("msapp")?'name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"";this.inherited(arguments)}})})},"dijit/_CssStateMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/dom-class dojo/has dojo/_base/lang dojo/on dojo/domReady dojo/touch dojo/_base/window ./a11yclick ./registry".split(" "),function(r,l,q,p,k,e,f,h,d,b,c,a){l=l("dijit._CssStateMixin",[],{hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);r.forEach("disabled readOnly checked selected focused state hovering active _opened".split(" "),
function(a){this.watch(a,e.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes||{})this._trackMouseState(this[a],this.cssStateNodes[a]);this._trackMouseState(this.domNode,this.baseClass);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseover":case "MSPointerOver":case "pointerover":this._set("hovering",!0);this._set("active",this._mouseDown);break;case "mouseout":case "MSPointerOut":case "pointerout":this._set("hovering",!1);this._set("active",
!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":this._set("active",!0);break;case "mouseup":case "dojotouchend":case "MSPointerUp":case "pointerup":case "keyup":this._set("active",!1)}},_setStateClass:function(){function a(a){b=b.concat(r.map(b,function(b){return b+a}),"dijit"+a)}var b=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");var c="mixed"==this.checked?"Mixed":this.checked?"Checked":"";this.checked&&a(c);this.state&&a(this.state);
this.selected&&a("Selected");this._opened&&a("Opened");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this.focused&&a("Focused");var c=this.stateNode||this.domNode,d={};r.forEach(c.className.split(" "),function(a){d[a]=!0});"_stateClasses"in this&&r.forEach(this._stateClasses,function(a){delete d[a]});r.forEach(b,function(a){d[a]=!0});var e=[],f;for(f in d)e.push(f);c.className=e.join(" ");this._stateClasses=b},_subnodeCssMouseEvent:function(a,
b,c){function d(c){p.toggle(a,b+"Active",c)}if(!this.disabled&&!this.readOnly)switch(c.type){case "mouseover":case "MSPointerOver":case "pointerover":p.toggle(a,b+"Hover",!0);break;case "mouseout":case "MSPointerOut":case "pointerout":p.toggle(a,b+"Hover",!1);d(!1);break;case "mousedown":case "touchstart":case "MSPointerDown":case "pointerdown":case "keydown":d(!0);break;case "mouseup":case "MSPointerUp":case "pointerup":case "dojotouchend":case "keyup":d(!1);break;case "focus":case "focusin":p.toggle(a,
b+"Focused",!0);break;case "blur":case "focusout":p.toggle(a,b+"Focused",!1)}},_trackMouseState:function(a,b){a._cssState=b}});h(function(){function e(b,c,d){if(!d||!q.isDescendant(d,c))for(;c&&c!=d;c=c.parentNode)if(c._cssState){var e=a.getEnclosingWidget(c);e&&(c==e.domNode?e._cssMouseEvent(b):e._subnodeCssMouseEvent(c,c._cssState,b))}}var h=b.body(),m;f(h,d.over,function(a){e(a,a.target,a.relatedTarget)});f(h,d.out,function(a){e(a,a.target,a.relatedTarget)});f(h,c.press,function(a){m=a.target;
e(a,m)});f(h,c.release,function(a){e(a,m);m=null});f(h,"focusin, focusout",function(b){var c=b.target;if(c._cssState&&!c.getAttribute("widgetId")){var d=a.getEnclosingWidget(c);d&&d._subnodeCssMouseEvent(c,c._cssState,b)}})});return l})},"dijit/form/_FormWidgetMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dojo/sniff dojo/window ../a11y".split(" "),function(r,l,q,p,k,e,f,h,d,b){return l("dijit.form._FormWidgetMixin",null,
{name:"",alt:"",value:"",type:"text","aria-label":"focusNode",tabIndex:"0",_setTabIndexAttr:"focusNode",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,_setIdAttr:"focusNode",_setDisabledAttr:function(c){this._set("disabled",c);/^(button|input|select|textarea|optgroup|option|fieldset)$/i.test(this.focusNode.tagName)?q.set(this.focusNode,"disabled",c):this.focusNode.setAttribute("aria-disabled",c?"true":"false");this.valueNode&&q.set(this.valueNode,"disabled",c);c?(this._set("hovering",!1),this._set("active",
!1),c="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"_setTabIndexAttr"in this?this._setTabIndexAttr:"focusNode",r.forEach(k.isArray(c)?c:[c],function(a){a=this[a];h("webkit")||b.hasDefaultTabStop(a)?a.setAttribute("tabIndex","-1"):a.removeAttribute("tabIndex")},this)):""!=this.tabIndex&&this.set("tabIndex",this.tabIndex)},_onFocus:function(b){if("mouse"==b&&this.isFocusable())var a=this.own(f(this.focusNode,"focus",function(){e.remove();a.remove()}))[0],c=h("pointer-events")?"pointerup":
h("MSPointer")?"MSPointerUp":h("touch-events")?"touchend, mouseup":"mouseup",e=this.own(f(this.ownerDocumentBody,c,k.hitch(this,function(b){e.remove();a.remove();this.focused&&("touchend"==b.type?this.defer("focus"):this.focus())})))[0];this.scrollOnFocus&&this.defer(function(){d.scrollIntoView(this.domNode)});this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&"none"!=p.get(this.domNode,"display")},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(c){}},
compare:function(b,a){return"number"==typeof b&&"number"==typeof a?isNaN(b)&&isNaN(a)?0:b-a:b>a?1:b<a?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(b,a){void 0!=this._lastValueReported||null!==a&&this._onChangeActive||(this._resetValue=this._lastValueReported=b);this._pendingOnChange=this._pendingOnChange||typeof b!=typeof this._lastValueReported||0!=this.compare(b,this._lastValueReported);(this.intermediateChanges||a||void 0===a)&&this._pendingOnChange&&(this._lastValueReported=
b,this._pendingOnChange=!1,this._onChangeActive&&(this._onChangeHandle&&this._onChangeHandle.remove(),this._onChangeHandle=this.defer(function(){this._onChangeHandle=null;this.onChange(b)})))},create:function(){this.inherited(arguments);this._onChangeActive=!0},destroy:function(){this._onChangeHandle&&(this._onChangeHandle.remove(),this.onChange(this._lastValueReported));this.inherited(arguments)}})})},"dijit/form/_ButtonMixin":function(){define(["dojo/_base/declare","dojo/dom","dojo/has","../registry"],
function(r,l,q,p){var k=r("dijit.form._ButtonMixin"+(q("dojo-bidi")?"_NoBidi":""),null,{label:"",type:"button",__onClick:function(e){e.stopPropagation();e.preventDefault();this.disabled||this.valueNode.click(e);return!1},_onClick:function(e){if(this.disabled)return e.stopPropagation(),e.preventDefault(),!1;!1===this.onClick(e)&&e.preventDefault();var f=e.defaultPrevented;if(!f&&"submit"==this.type&&!(this.valueNode||this.focusNode).form)for(var h=this.domNode;h.parentNode;h=h.parentNode){var d=p.byNode(h);
if(d&&"function"==typeof d._onSubmit){d._onSubmit(e);e.preventDefault();f=!0;break}}return!f},postCreate:function(){this.inherited(arguments);l.setSelectable(this.focusNode,!1)},onClick:function(){return!0},_setLabelAttr:function(e){this._set("label",e);(this.containerNode||this.focusNode).innerHTML=e;this.onLabelSet()},onLabelSet:function(){}});q("dojo-bidi")&&(k=r("dijit.form._ButtonMixin",k,{onLabelSet:function(){this.inherited(arguments);this.applyTextDir(this.containerNode||this.focusNode)}}));
return k})},"dijit/form/_ToggleButtonMixin":function(){define(["dojo/_base/declare","dojo/dom-attr"],function(r,l){return r("dijit.form._ToggleButtonMixin",null,{checked:!1,_aria_attr:"aria-pressed",_onClick:function(l){var p=this.checked;this._set("checked",!p);var k=this.inherited(arguments);this.set("checked",k?this.checked:p);return k},_setCheckedAttr:function(q,p){this._set("checked",q);var k=this.focusNode||this.domNode;this._created&&l.get(k,"checked")!=!!q&&l.set(k,"checked",!!q);k.setAttribute(this._aria_attr,
String(q));this._handleOnChange(q,p)},postCreate:function(){this.inherited(arguments);var l=this.focusNode||this.domNode;this.checked&&l.setAttribute("checked","checked");void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.checked)},reset:function(){this._hasBeenBlurred=!1;this.set("checked",this.params.checked||!1)}})})},"dijit/_editor/_Plugin":function(){define(["dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","../Destroyable","../form/Button"],function(r,l,q,p,
k){l=l("dijit._editor._Plugin",p,{constructor:function(e){this.params=e||{};q.mixin(this,this.params);this._attrPairNames={}},editor:null,iconClassPrefix:"dijitEditorIcon",button:null,command:"",useDefaultCommand:!0,buttonClass:k,disabled:!1,getLabel:function(e){return this.editor.commands[e]},_initButton:function(){if(this.command.length){var e=this.getLabel(this.command),f=this.editor,h=this.iconClassPrefix+" "+this.iconClassPrefix+this.command.charAt(0).toUpperCase()+this.command.substr(1);this.button||
(e=q.mixin({label:e,ownerDocument:f.ownerDocument,dir:f.dir,lang:f.lang,showLabel:!1,iconClass:h,dropDown:this.dropDown,tabIndex:"-1"},this.params||{}),delete e.name,this.button=new this.buttonClass(e))}this.get("disabled")&&this.button&&this.button.set("disabled",this.get("disabled"))},destroy:function(){this.dropDown&&this.dropDown.destroyRecursive();this.inherited(arguments)},connect:function(e,f,h){this.own(r.connect(e,f,this,h))},updateState:function(){var e=this.editor,f=this.command,h,d;if(e&&
e.isLoaded&&f.length){var b=this.get("disabled");if(this.button)try{d=!b&&e.queryCommandEnabled(f),this.enabled!==d&&(this.enabled=d,this.button.set("disabled",!d)),d&&"boolean"==typeof this.button.checked&&(h=e.queryCommandState(f),this.checked!==h&&(this.checked=h,this.button.set("checked",e.queryCommandState(f))))}catch(c){console.log(c)}}},setEditor:function(e){this.editor=e;this._initButton();this.button&&this.useDefaultCommand&&(this.editor.queryCommandAvailable(this.command)?this.own(this.button.on("click",
q.hitch(this.editor,"execCommand",this.command,this.commandArg))):this.button.domNode.style.display="none");this.own(this.editor.on("NormalizedDisplayChanged",q.hitch(this,"updateState")))},setToolbar:function(e){this.button&&e.addChild(this.button)},set:function(e,f){if("object"===typeof e){for(var h in e)this.set(h,e[h]);return this}h=this._getAttrNames(e);if(this[h.s])var d=this[h.s].apply(this,Array.prototype.slice.call(arguments,1));else this._set(e,f);return d||this},get:function(e){var f=this._getAttrNames(e);
return this[f.g]?this[f.g]():this[e]},_setDisabledAttr:function(e){this._set("disabled",e);this.updateState()},_getAttrNames:function(e){var f=this._attrPairNames;if(f[e])return f[e];var h=e.charAt(0).toUpperCase()+e.substr(1);return f[e]={s:"_set"+h+"Attr",g:"_get"+h+"Attr"}},_set:function(e,f){this[e]=f}});l.registry={};return l})},"dijit/_editor/plugins/EnterKeyHandling":function(){define("dojo/_base/declare dojo/dom-construct dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/_base/window dojo/window ../_Plugin ../RichText ../range".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c){return r("dijit._editor.plugins.EnterKeyHandling",d,{blockNodeForEnter:"BR",constructor:function(a){a&&("blockNodeForEnter"in a&&(a.blockNodeForEnter=a.blockNodeForEnter.toUpperCase()),p.mixin(this,a))},setEditor:function(a){if(this.editor!==a)if(this.editor=a,"BR"==this.blockNodeForEnter)this.editor.customUndo=!0,a.onLoadDeferred.then(p.hitch(this,function(b){this.own(k(a.document,"keydown",p.hitch(this,function(a){if(a.keyCode==q.ENTER){var b=p.mixin({},a);b.shiftKey=
!0;this.handleEnterKey(b)||(a.stopPropagation(),a.preventDefault())}})));9<=e("ie")&&10>=e("ie")&&this.own(k(a.document,"paste",p.hitch(this,function(a){setTimeout(p.hitch(this,function(){var a=this.editor.document.selection.createRange();a.move("character",-1);a.select();a.move("character",1);a.select()}),0)})));return b}));else if(this.blockNodeForEnter){var b=p.hitch(this,"handleEnterKey");a.addKeyHandler(13,0,0,b);a.addKeyHandler(13,0,1,b);this.own(this.editor.on("KeyPressed",p.hitch(this,"onKeyPressed")))}},
onKeyPressed:function(){if(this._checkListLater){if(this.editor.selection.isCollapsed()){var a=this.editor.selection.getAncestorElement("LI");if(a){e("mozilla")&&"LI"==a.parentNode.parentNode.nodeName&&(a=a.parentNode.parentNode);var d=a.firstChild;!d||1!=d.nodeType||"UL"!=d.nodeName&&"OL"!=d.nodeName||(a.insertBefore(d.ownerDocument.createTextNode("\u00a0"),d),d=c.create(this.editor.window),d.setStart(a.firstChild,0),a=c.getSelection(this.editor.window,!0),a.removeAllRanges(),a.addRange(d))}else b.prototype.execCommand.call(this.editor,
"formatblock",this.blockNodeForEnter),(a=this.editor.selection.getAncestorElement(this.blockNodeForEnter))?(a.innerHTML=this.bogusHtmlContent,9>=e("ie")&&(a=this.editor.document.selection.createRange(),a.move("character",-1),a.select())):console.error("onKeyPressed: Cannot find the new block node")}this._checkListLater=!1}this._pressedEnterInBlock&&(this._pressedEnterInBlock.previousSibling&&this.removeTrailingBr(this._pressedEnterInBlock.previousSibling),delete this._pressedEnterInBlock)},bogusHtmlContent:"\x26#160;",
blockNodes:/^(?:P|H1|H2|H3|H4|H5|H6|LI)$/,handleEnterKey:function(a){var d,f,m,k,n=this.editor.document,t,p,q;if(a.shiftKey){a=this.editor.selection.getParentElement();if(k=c.getAncestor(a,this.blockNodes)){if("LI"==k.tagName)return!0;a=c.getSelection(this.editor.window);d=a.getRangeAt(0);d.collapsed||(d.deleteContents(),a=c.getSelection(this.editor.window),d=a.getRangeAt(0));if(c.atBeginningOfContainer(k,d.startContainer,d.startOffset))t=n.createElement("br"),d=c.create(this.editor.window),k.insertBefore(t,
k.firstChild),d.setStartAfter(t),a.removeAllRanges(),a.addRange(d);else if(c.atEndOfContainer(k,d.startContainer,d.startOffset))d=c.create(this.editor.window),t=n.createElement("br"),k.appendChild(t),k.appendChild(n.createTextNode("\u00a0")),d.setStart(k.lastChild,0),a.removeAllRanges(),a.addRange(d);else return(p=d.startContainer)&&3==p.nodeType?(q=p.nodeValue,f=n.createTextNode(q.substring(0,d.startOffset)),m=n.createTextNode(q.substring(d.startOffset)),k=n.createElement("br"),""==m.nodeValue&&
e("webkit")&&(m=n.createTextNode("\u00a0")),l.place(f,p,"after"),l.place(k,f,"after"),l.place(m,k,"after"),l.destroy(p),d=c.create(this.editor.window),d.setStart(m,0),a.removeAllRanges(),a.addRange(d),!1):!0}else a=c.getSelection(this.editor.window),a.rangeCount?(d=a.getRangeAt(0))&&d.startContainer&&(d.collapsed||(d.deleteContents(),a=c.getSelection(this.editor.window),d=a.getRangeAt(0)),(p=d.startContainer)&&3==p.nodeType?(k=d.startOffset,p.length<k&&(m=this._adjustNodeAndOffset(p,k),p=m.node,k=
m.offset),q=p.nodeValue,f=n.createTextNode(q.substring(0,k)),m=n.createTextNode(q.substring(k)),k=n.createElement("br"),m.length||(m=n.createTextNode("\u00a0")),f.length?l.place(f,p,"after"):f=p,l.place(k,f,"after"),l.place(m,k,"after"),l.destroy(p)):(0<=d.startOffset&&(t=p.childNodes[d.startOffset]),k=n.createElement("br"),m=n.createTextNode("\u00a0"),t?(l.place(k,t,"before"),l.place(m,k,"after")):(p.appendChild(k),p.appendChild(m))),d=c.create(this.editor.window),d.setStart(m,0),d.setEnd(m,m.length),
a.removeAllRanges(),a.addRange(d),this.editor.selection.collapse(!0)):b.prototype.execCommand.call(this.editor,"inserthtml","\x3cbr\x3e");return!1}var r=!0;a=c.getSelection(this.editor.window);d=a.getRangeAt(0);d.collapsed||(d.deleteContents(),a=c.getSelection(this.editor.window),d=a.getRangeAt(0));t=c.getBlockAncestor(d.endContainer,null,this.editor.editNode);var v=t.blockNode;if(this._checkListLater=v&&("LI"==v.nodeName||"LI"==v.parentNode.nodeName))return e("mozilla")&&(this._pressedEnterInBlock=
v),/^(\s|&nbsp;|&#160;|\xA0|<span\b[^>]*\bclass=['"]Apple-style-span['"][^>]*>(\s|&nbsp;|&#160;|\xA0)<\/span>)?(<br>)?$/.test(v.innerHTML)&&(v.innerHTML="",e("webkit")&&(d=c.create(this.editor.window),d.setStart(v,0),a.removeAllRanges(),a.addRange(d)),this._checkListLater=!1),!0;if(!t.blockNode||t.blockNode===this.editor.editNode){try{b.prototype.execCommand.call(this.editor,"formatblock",this.blockNodeForEnter)}catch(B){}t={blockNode:this.editor.selection.getAncestorElement(this.blockNodeForEnter),
blockContainer:this.editor.editNode};if(t.blockNode){if(t.blockNode!=this.editor.editNode&&!(t.blockNode.textContent||t.blockNode.innerHTML).replace(/^\s+|\s+$/g,"").length)return this.removeTrailingBr(t.blockNode),!1}else t.blockNode=this.editor.editNode;a=c.getSelection(this.editor.window);d=a.getRangeAt(0)}v=n.createElement(this.blockNodeForEnter);v.innerHTML=this.bogusHtmlContent;this.removeTrailingBr(t.blockNode);m=d.endOffset;r=d.endContainer;r.length<m&&(m=this._adjustNodeAndOffset(r,m),r=
m.node,m=m.offset);if(c.atEndOfContainer(t.blockNode,r,m))t.blockNode===t.blockContainer?t.blockNode.appendChild(v):l.place(v,t.blockNode,"after"),r=!1,d=c.create(this.editor.window),d.setStart(v,0),a.removeAllRanges(),a.addRange(d),this.editor.height&&h.scrollIntoView(v);else if(c.atBeginningOfContainer(t.blockNode,d.startContainer,d.startOffset))l.place(v,t.blockNode,t.blockNode===t.blockContainer?"first":"before"),v.nextSibling&&this.editor.height&&(d=c.create(this.editor.window),d.setStart(v.nextSibling,
0),a.removeAllRanges(),a.addRange(d),h.scrollIntoView(v.nextSibling)),r=!1;else{t.blockNode===t.blockContainer?t.blockNode.appendChild(v):l.place(v,t.blockNode,"after");r=!1;t.blockNode.style&&v.style&&t.blockNode.style.cssText&&(v.style.cssText=t.blockNode.style.cssText);if((p=d.startContainer)&&3==p.nodeType){m=d.endOffset;p.length<m&&(m=this._adjustNodeAndOffset(p,m),p=m.node,m=m.offset);q=p.nodeValue;f=n.createTextNode(q.substring(0,m));m=n.createTextNode(q.substring(m,q.length));l.place(f,p,
"before");l.place(m,p,"after");l.destroy(p);for(d=f.parentNode;d!==t.blockNode;){q=n.createElement(d.tagName);d.style&&q.style&&d.style.cssText&&(q.style.cssText=d.style.cssText);"FONT"===d.tagName&&(d.color&&(q.color=d.color),d.face&&(q.face=d.face),d.size&&(q.size=d.size));for(;m;)p=m.nextSibling,q.appendChild(m),m=p;l.place(q,d,"after");f=d;m=q;d=d.parentNode}if(1==m.nodeType||3==m.nodeType&&m.nodeValue)v.innerHTML="";for(f=m;m;)p=m.nextSibling,v.appendChild(m),m=p}d=c.create(this.editor.window);
n=f;if("BR"!==this.blockNodeForEnter){for(;n;)k=n,n=p=n.firstChild;k&&k.parentNode?(v=k.parentNode,d.setStart(v,0),a.removeAllRanges(),a.addRange(d),this.editor.height&&h.scrollIntoView(v),e("mozilla")&&(this._pressedEnterInBlock=t.blockNode)):r=!0}else d.setStart(v,0),a.removeAllRanges(),a.addRange(d),this.editor.height&&h.scrollIntoView(v),e("mozilla")&&(this._pressedEnterInBlock=t.blockNode)}return r},_adjustNodeAndOffset:function(a,b){for(;a.length<b&&a.nextSibling&&3==a.nextSibling.nodeType;)b-=
a.length,a=a.nextSibling;return{node:a,offset:b}},removeTrailingBr:function(a){if(a=/P|DIV|LI/i.test(a.tagName)?a:this.editor.selection.getParentOfType(a,["P","DIV","LI"]))a.lastChild&&(1<a.childNodes.length&&3==a.lastChild.nodeType&&/^[\s\xAD]*$/.test(a.lastChild.nodeValue)||"BR"==a.lastChild.tagName)&&l.destroy(a.lastChild),a.childNodes.length||(a.innerHTML=this.bogusHtmlContent)}})})},"dijit/_editor/RichText":function(){define("dojo/_base/array dojo/_base/config dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/query dojo/domReady dojo/sniff dojo/string dojo/topic dojo/_base/unload dojo/_base/url dojo/window ../_Widget ../_CssStateMixin ../selection ./range ./html ../focus ../main".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n,t,A,y,z,v,B,C,F,D,E,G,K){var L=q("dijit._editor.RichText",[B,C],{constructor:function(a){this.contentPreFilters=[];this.contentPostFilters=[];this.contentDomPreFilters=[];this.contentDomPostFilters=[];this.editingAreaStyleSheets=[];this.events=[].concat(this.events);this._keyHandlers={};a&&g.isString(a.value)&&(this.value=a.value);this.onLoadDeferred=new p},baseClass:"dijitEditor",inheritWidth:!1,focusOnLoad:!1,name:"",styleSheets:"",height:"300px",minHeight:"1em",
isClosed:!0,isLoaded:!1,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",_NAME_CONTENT_SEP:"@@**%%:%%**@@",onLoadDeferred:null,isTabIndent:!1,disableSpellCheck:!1,postCreate:function(){"textarea"===this.domNode.tagName.toLowerCase()&&console.warn("RichText should not be used with the TEXTAREA tag.  See dijit._editor.RichText docs.");this.contentPreFilters=[g.trim,g.hitch(this,"_preFixUrlAttributes")].concat(this.contentPreFilters);n("mozilla")&&(this.contentPreFilters=[this._normalizeFontStyle].concat(this.contentPreFilters),
this.contentPostFilters=[this._removeMozBogus].concat(this.contentPostFilters));n("webkit")&&(this.contentPreFilters=[this._removeWebkitBogus].concat(this.contentPreFilters),this.contentPostFilters=[this._removeWebkitBogus].concat(this.contentPostFilters));if(n("ie")||n("trident"))this.contentPostFilters=[this._normalizeFontStyle].concat(this.contentPostFilters),this.contentDomPostFilters=[g.hitch(this,"_stripBreakerNodes")].concat(this.contentDomPostFilters);this.contentDomPostFilters=[g.hitch(this,
"_stripTrailingEmptyNodes")].concat(this.contentDomPostFilters);this.inherited(arguments);A.publish(K._scopeName+"._editor.RichText::init",this)},startup:function(){this.inherited(arguments);this.open();this.setupDefaultShortcuts()},setupDefaultShortcuts:function(){var a=g.hitch(this,function(a,b){return function(){return!this.execCommand(a,b)}}),b={b:a("bold"),i:a("italic"),u:a("underline"),a:a("selectall"),s:function(){this.save(!0)},m:function(){this.isTabIndent=!this.isTabIndent},1:a("formatblock",
"h1"),2:a("formatblock","h2"),3:a("formatblock","h3"),4:a("formatblock","h4"),"\\":a("insertunorderedlist")};n("ie")||(b.Z=a("redo"));for(var c in b)this.addKeyHandler(c,!0,!1,b[c])},events:["onKeyDown","onKeyUp"],captureEvents:[],_editorCommandsLocalized:!1,_localizeEditorCommands:function(){if(L._editorCommandsLocalized)this._local2NativeFormatNames=L._local2NativeFormatNames,this._native2LocalFormatNames=L._native2LocalFormatNames;else{L._editorCommandsLocalized=!0;L._local2NativeFormatNames={};
L._native2LocalFormatNames={};this._local2NativeFormatNames=L._local2NativeFormatNames;this._native2LocalFormatNames=L._native2LocalFormatNames;for(var a="div p pre h1 h2 h3 h4 h5 h6 ol ul address".split(" "),b="",c,d=0;c=a[d++];)b="l"!==c.charAt(1)?b+("\x3c"+c+"\x3e\x3cspan\x3econtent\x3c/span\x3e\x3c/"+c+"\x3e\x3cbr/\x3e"):b+("\x3c"+c+"\x3e\x3cli\x3econtent\x3c/li\x3e\x3c/"+c+"\x3e\x3cbr/\x3e");var e=h.create("div",{style:{position:"absolute",top:"0px",zIndex:10,opacity:.01},innerHTML:b});this.ownerDocumentBody.appendChild(e);
a=g.hitch(this,function(){for(var a=e.firstChild;a;)try{this.selection.selectElement(a.firstChild);var b=a.tagName.toLowerCase();this._local2NativeFormatNames[b]=document.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[b]]=b;a=a.nextSibling.nextSibling}catch(X){}h.destroy(e)});this.defer(a)}},open:function(a){if(!this.onLoadDeferred||0<=this.onLoadDeferred.fired)this.onLoadDeferred=new p;this.isClosed||this.close();A.publish(K._scopeName+"._editor.RichText::open",
this);1===arguments.length&&a.nodeName&&(this.domNode=a);var c=this.domNode,d;if(g.isString(this.value))d=this.value,c.innerHTML="";else if(c.nodeName&&"textarea"==c.nodeName.toLowerCase()){var m=this.textarea=c;this.name=m.name;d=m.value;c=this.domNode=this.ownerDocument.createElement("div");c.setAttribute("widgetId",this.id);m.removeAttribute("widgetId");c.cssText=m.cssText;c.className+=" "+m.className;h.place(c,m,"before");var t=g.hitch(this,function(){b.set(m,{display:"block",position:"absolute",
top:"-1000px"});if(n("ie")){var a=m.style;this.__overflow=a.overflow;a.overflow="hidden"}});n("ie")?this.defer(t,10):t();if(m.form){var q=m.value;this.reset=function(){this.getValue()!==q&&this.replaceValue(q)};w(m.form,"submit",g.hitch(this,function(){e.set(m,"disabled",this.disabled);m.value=this.getValue()}))}}else d=E.getChildrenHtml(c),c.innerHTML="";this.value=d;c.nodeName&&"LI"===c.nodeName&&(c.innerHTML=" \x3cbr\x3e");this.header=c.ownerDocument.createElement("div");c.appendChild(this.header);
this.editingArea=c.ownerDocument.createElement("div");c.appendChild(this.editingArea);this.footer=c.ownerDocument.createElement("div");c.appendChild(this.footer);this.name||(this.name=this.id+"_AUTOGEN");if(""!==this.name&&(!l.useXDomain||l.allowXdRichTextSave)){if((d=k.byId(K._scopeName+"._editor.RichText.value"))&&""!==d.value)for(var t=d.value.split(this._SEPARATOR),x=0,u;u=t[x++];)if(u=u.split(this._NAME_CONTENT_SEP),u[0]===this.name){this.value=u[1];t=t.splice(x,1);d.value=t.join(this._SEPARATOR);
break}L._globalSaveHandler||(L._globalSaveHandler={},y.addOnUnload(function(){for(var a in L._globalSaveHandler){var b=L._globalSaveHandler[a];g.isFunction(b)&&b()}}));L._globalSaveHandler[this.id]=g.hitch(this,"_saveContent")}this.isClosed=!1;d=this.editorObject=this.iframe=this.ownerDocument.createElement("iframe");d.id=this.id+"_iframe";d.style.border="none";d.style.width="100%";this._layoutMode?d.style.height="100%":7<=n("ie")?(this.height&&(d.style.height=this.height),this.minHeight&&(d.style.minHeight=
this.minHeight)):d.style.height=this.height?this.height:this.minHeight;d.frameBorder=0;d._loadFunc=g.hitch(this,function(a){this.window=a;this.document=a.document;this.selection=new F.SelectionManager(a);n("ie")&&this._localizeEditorCommands();this.onLoad(this.get("value"))});t=this._getIframeDocTxt().replace(/\\/g,"\\\\").replace(/'/g,"\\'");t=11>n("ie")?'javascript:document.open();try{parent.window;}catch(e){document.domain\x3d"'+document.domain+"\";}document.write('"+t+"');document.close()":"javascript: '"+
t+"'";this.editingArea.appendChild(d);d.src=t;"LI"===c.nodeName&&(c.lastChild.style.marginTop="-1.2em");f.add(this.domNode,this.baseClass)},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_getIframeDocTxt:function(){var a=b.getComputedStyle(this.domNode),d;if(this["aria-label"])d=this["aria-label"];else{var e=m('label[for\x3d"'+this.id+'"]',this.ownerDocument)[0]||k.byId(this["aria-labelledby"],this.ownerDocument);e&&(d=e.textContent||e.innerHTML||"")}var e="\x3cdiv id\x3d'dijitEditorBody' role\x3d'textbox' aria-multiline\x3d'true' "+
(d?" aria-label\x3d'"+t.escape(d)+"'":"")+"\x3e\x3c/div\x3e",f=[a.fontWeight,a.fontSize,a.fontFamily].join(" "),h=a.lineHeight,h=0<=h.indexOf("px")?parseFloat(h)/parseFloat(a.fontSize):0<=h.indexOf("em")?parseFloat(h):"normal",l="",p=this;this.style.replace(/(^|;)\s*(line-|font-?)[^;]+/ig,function(a){a=a.replace(/^;/ig,"")+";";var c=a.split(":")[0];if(c){var c=g.trim(c),c=c.toLowerCase(),d,e="";for(d=0;d<c.length;d++){var f=c.charAt(d);switch(f){case "-":d++,f=c.charAt(d).toUpperCase();default:e+=
f}}b.set(p.domNode,e,"")}l+=a+";"});this.iframe.setAttribute("title",d);return["\x3c!DOCTYPE html\x3e","\x3chtml lang\x3d'"+(this.lang||c.locale.replace(/-.*/,""))+"'"+(this.isLeftToRight()?"":" dir\x3d'rtl'")+"\x3e\n","\x3chead\x3e\n\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html'\x3e\n",d?"\x3ctitle\x3e"+t.escape(d)+"\x3c/title\x3e":"","\x3cstyle\x3e\n\tbody,html {\n\t\tbackground:transparent;\n\t\tpadding: 1px 0 0 0;\n\t\tmargin: -1px 0 0 0;\n\t}\n\tbody,html,#dijitEditorBody { outline: none; }html { height: 100%; width: 100%; overflow: hidden; }\n",
this.height?"\tbody,#dijitEditorBody { height: 100%; width: 100%; overflow: auto; }\n":"\tbody,#dijitEditorBody { min-height: "+this.minHeight+"; width: 100%; overflow-x: auto; overflow-y: hidden; }\n","\tbody{\n\t\ttop:0px;\n\t\tleft:0px;\n\t\tright:0px;\n\t\tfont:",f,";\n",this.height||n("opera")?"":"\t\tposition: fixed;\n","\t\tline-height:",h,";\n\t}\n\tp{ margin: 1em 0; }\n\tli \x3e ul:-moz-first-node, li \x3e ol:-moz-first-node{ padding-top: 1.2em; }\n",n("ie")||n("trident")||n("edge")?"":"\tli{ min-height:1.2em; }\n",
"\x3c/style\x3e\n",this._applyEditingAreaStyleSheets(),"\n\x3c/head\x3e\n\x3cbody role\x3d'application'",d?" aria-label\x3d'"+t.escape(d)+"'":"","onload\x3d'try{frameElement \x26\x26 frameElement._loadFunc(window,document)}catch(e){document.domain\x3d\""+document.domain+"\";frameElement._loadFunc(window,document)}' ","style\x3d'"+l+"'\x3e",e,"\x3c/body\x3e\n\x3c/html\x3e"].join("")},_applyEditingAreaStyleSheets:function(){var a=[];this.styleSheets&&(a=this.styleSheets.split(";"),this.styleSheets=
"");a=a.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets=[];for(var b="",c=0,d,e=v.get(this.ownerDocument);d=a[c++];)d=(new z(e.location,d)).toString(),this.editingAreaStyleSheets.push(d),b+='\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+d+'"/\x3e';return b},addStyleSheet:function(a){var b=a.toString(),c=v.get(this.ownerDocument);if("."===b.charAt(0)||"/"!==b.charAt(0)&&!a.host)b=(new z(c.location,b)).toString();-1<r.indexOf(this.editingAreaStyleSheets,b)||(this.editingAreaStyleSheets.push(b),
this.onLoadDeferred.then(g.hitch(this,function(){if(this.document.createStyleSheet)this.document.createStyleSheet(b);else{var a=this.document.getElementsByTagName("head")[0],c=this.document.createElement("link");c.rel="stylesheet";c.type="text/css";c.href=b;a.appendChild(c)}})))},removeStyleSheet:function(a){var b=a.toString(),c=v.get(this.ownerDocument);if("."===b.charAt(0)||"/"!==b.charAt(0)&&!a.host)b=(new z(c.location,b)).toString();a=r.indexOf(this.editingAreaStyleSheets,b);-1!==a&&(delete this.editingAreaStyleSheets[a],
m('link[href\x3d"'+b+'"]',this.window.document).orphan())},disabled:!1,_mozSettingProps:{styleWithCSS:!1},_setDisabledAttr:function(a){a=!!a;this._set("disabled",a);if(this.isLoaded){var b=n("ie")&&(this.isLoaded||!this.focusOnLoad);b&&(this.editNode.unselectable="on");this.editNode.contentEditable=!a;this.editNode.tabIndex=a?"-1":this.tabIndex;b&&this.defer(function(){this.editNode&&(this.editNode.unselectable="off")});if(n("mozilla")&&!a&&this._mozSettingProps){a=this._mozSettingProps;for(var c in a)if(a.hasOwnProperty(c))try{this.document.execCommand(c,
!1,a[c])}catch(R){}}this._disabledOK=!0}},onLoad:function(a){this.window.__registeredWindow||(this.window.__registeredWindow=!0,this._iframeRegHandle=G.registerIframe(this.iframe));this.editNode=this.document.body.firstChild;var b=this;this.beforeIframeNode=h.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"before");this.afterIframeNode=h.place("\x3cdiv tabIndex\x3d-1\x3e\x3c/div\x3e",this.iframe,"after");this.iframe.onfocus=this.document.onfocus=function(){b.editNode.focus()};this.focusNode=
this.editNode;var c=this.events.concat(this.captureEvents),d=this.iframe?this.document:this.editNode;this.own.apply(this,r.map(c,function(a){var b=a.toLowerCase().replace(/^on/,"");return w(d,b,g.hitch(this,a))},this));this.own(w(d,"mouseup",g.hitch(this,"onClick")));n("ie")&&(this.own(w(this.document,"mousedown",g.hitch(this,"_onIEMouseDown"))),this.editNode.style.zoom=1);n("webkit")&&(this._webkitListener=this.own(w(this.document,"mouseup",g.hitch(this,"onDisplayChanged")))[0],this.own(w(this.document,
"mousedown",g.hitch(this,function(a){a=a.target;!a||a!==this.document.body&&a!==this.document||this.defer("placeCursorAtEnd")}))));if(n("ie"))try{this.document.execCommand("RespectVisibilityInDesign",!0,null)}catch(S){}this.isLoaded=!0;this.set("disabled",this.disabled);c=g.hitch(this,function(){this.setValue(a);this.onLoadDeferred&&!this.onLoadDeferred.isFulfilled()&&this.onLoadDeferred.resolve(!0);this.onDisplayChanged();this.focusOnLoad&&u(g.hitch(this,"defer","focus",this.updateInterval));this.value=
this.getValue(!0)});this.setValueDeferred?this.setValueDeferred.then(c):c()},onKeyDown:function(b){if(b.keyCode===a.SHIFT||b.keyCode===a.ALT||b.keyCode===a.META||b.keyCode===a.CTRL)return!0;b.keyCode===a.TAB&&this.isTabIndent&&(b.stopPropagation(),b.preventDefault(),this.queryCommandEnabled(b.shiftKey?"outdent":"indent")&&this.execCommand(b.shiftKey?"outdent":"indent"));if(b.keyCode==a.TAB&&!this.isTabIndent&&!b.ctrlKey&&!b.altKey)return b.shiftKey?this.beforeIframeNode.focus():this.afterIframeNode.focus(),
!0;9>n("ie")&&b.keyCode===a.BACKSPACE&&"Control"===this.document.selection.type&&(b.stopPropagation(),b.preventDefault(),this.execCommand("delete"));n("ff")&&(b.keyCode===a.PAGE_UP||b.keyCode===a.PAGE_DOWN)&&this.editNode.clientHeight>=this.editNode.scrollHeight&&b.preventDefault();var c=this._keyHandlers[b.keyCode],d=arguments;c&&!b.altKey&&r.some(c,function(a){if(!(a.shift^b.shiftKey||a.ctrl^(b.ctrlKey||b.metaKey)))return a.handler.apply(this,d)||b.preventDefault(),!0},this);this.defer("onKeyPressed",
1);return!0},onKeyUp:function(){},setDisabled:function(a){c.deprecated("dijit.Editor::setDisabled is deprecated",'use dijit.Editor::attr("disabled",boolean) instead',2);this.set("disabled",a)},_setValueAttr:function(a){this.setValue(a)},_setDisableSpellCheckAttr:function(a){this.document?e.set(this.document.body,"spellcheck",!a):this.onLoadDeferred.then(g.hitch(this,function(){e.set(this.document.body,"spellcheck",!a)}));this._set("disableSpellCheck",a)},addKeyHandler:function(a,b,c,d){"string"==
typeof a&&(a=a.toUpperCase().charCodeAt(0));g.isArray(this._keyHandlers[a])||(this._keyHandlers[a]=[]);this._keyHandlers[a].push({shift:c||!1,ctrl:b||!1,handler:d})},onKeyPressed:function(){this.onDisplayChanged()},onClick:function(a){this.onDisplayChanged(a)},_onIEMouseDown:function(){this.focused||this.disabled||this.focus()},_onBlur:function(a){(n("ie")||n("trident"))&&this.defer(function(){G.curNode||this.ownerDocumentBody.focus()});this.inherited(arguments);var b=this.getValue(!0);if(b!==this.value)this.onChange(b);
this._set("value",b)},_onFocus:function(a){this.disabled||(this._disabledOK||this.set("disabled",!1),this.inherited(arguments))},blur:function(){!n("ie")&&this.window.document.documentElement&&this.window.document.documentElement.focus?this.window.document.documentElement.focus():this.ownerDocumentBody.focus&&this.ownerDocumentBody.focus()},focus:function(){this.isLoaded?9>n("ie")?this.iframe.fireEvent("onfocus",document.createEventObject()):this.editNode.focus():this.focusOnLoad=!0},updateInterval:200,
_updateTimer:null,onDisplayChanged:function(){this._updateTimer&&this._updateTimer.remove();this._updateTimer=this.defer("onNormalizedDisplayChanged",this.updateInterval)},onNormalizedDisplayChanged:function(){delete this._updateTimer},onChange:function(){},_normalizeCommand:function(a,b){var c=a.toLowerCase();"formatblock"===c?n("safari")&&void 0===b&&(c="heading"):"hilitecolor"!==c||n("mozilla")||(c="backcolor");return c},_qcaCache:{},queryCommandAvailable:function(a){var b=this._qcaCache[a];return void 0!==
b?b:this._qcaCache[a]=this._queryCommandAvailable(a)},_queryCommandAvailable:function(a){switch(a.toLowerCase()){case "bold":case "italic":case "underline":case "subscript":case "superscript":case "fontname":case "fontsize":case "forecolor":case "hilitecolor":case "justifycenter":case "justifyfull":case "justifyleft":case "justifyright":case "delete":case "selectall":case "toggledir":case "createlink":case "unlink":case "removeformat":case "inserthorizontalrule":case "insertimage":case "insertorderedlist":case "insertunorderedlist":case "indent":case "outdent":case "formatblock":case "inserthtml":case "undo":case "redo":case "strikethrough":case "tabindent":case "cut":case "copy":case "paste":return!0;
case "blockdirltr":case "blockdirrtl":case "dirltr":case "dirrtl":case "inlinedirltr":case "inlinedirrtl":return n("ie")||n("trident")||n("edge");case "inserttable":case "insertcell":case "insertcol":case "insertrow":case "deletecells":case "deletecols":case "deleterows":case "mergecells":case "splitcell":return!n("webkit");default:return!1}},execCommand:function(a,b){var c;this.focused&&this.focus();a=this._normalizeCommand(a,b);if(void 0!==b){if("heading"===a)throw Error("unimplemented");"formatblock"===
a&&(n("ie")||n("trident"))&&(b="\x3c"+b+"\x3e")}var d="_"+a+"Impl";if(this[d])c=this[d](b);else if((b=1<arguments.length?b:null)||"createlink"!==a)c=this.document.execCommand(a,!1,b);this.onDisplayChanged();return c},queryCommandEnabled:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);var b="_"+a+"EnabledImpl";return this[b]?this[b](a):this._browserQueryCommandEnabled(a)},queryCommandState:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);
try{return this.document.queryCommandState(a)}catch(J){return!1}},queryCommandValue:function(a){if(this.disabled||!this._disabledOK)return!1;a=this._normalizeCommand(a);if(n("ie")&&"formatblock"===a)a=this._native2LocalFormatNames[this.document.queryCommandValue(a)];else if(n("mozilla")&&"hilitecolor"===a){var b;try{b=this.document.queryCommandValue("styleWithCSS")}catch(I){b=!1}this.document.execCommand("styleWithCSS",!1,!0);a=this.document.queryCommandValue(a);this.document.execCommand("styleWithCSS",
!1,b)}else a=this.document.queryCommandValue(a);return a},_sCall:function(a,b){return this.selection[a].apply(this.selection,b)},placeCursorAtStart:function(){this.focus();var a=!1;if(n("mozilla"))for(var b=this.editNode.firstChild;b;){if(3===b.nodeType){if(0<b.nodeValue.replace(/^\s+|\s+$/g,"").length){a=!0;this.selection.selectElement(b);break}}else if(1===b.nodeType){var a=!0,c=b.tagName?b.tagName.toLowerCase():"";/br|input|img|base|meta|area|basefont|hr|link/.test(c)?this.selection.selectElement(b):
this.selection.selectElementChildren(b);break}b=b.nextSibling}else a=!0,this.selection.selectElementChildren(this.editNode);a&&this.selection.collapse(!0)},placeCursorAtEnd:function(){this.focus();var a=!1;if(n("mozilla"))for(var b=this.editNode.lastChild;b;){if(3===b.nodeType){if(0<b.nodeValue.replace(/^\s+|\s+$/g,"").length){a=!0;this.selection.selectElement(b);break}}else if(1===b.nodeType){a=!0;this.selection.selectElement(b.lastChild||b);break}b=b.previousSibling}else a=!0,this.selection.selectElementChildren(this.editNode);
a&&this.selection.collapse(!1)},getValue:function(a){return!this.textarea||!this.isClosed&&this.isLoaded?this.isLoaded?this._postFilterContent(null,a):this.value:this.textarea.value},_getValueAttr:function(){return this.getValue(!0)},setValue:function(a){if(this.isLoaded){if(!this.textarea||!this.isClosed&&this.isLoaded){a=this._preFilterContent(a);var b=this.isClosed?this.domNode:this.editNode;b.innerHTML=a;this._preDomFilterContent(b)}else this.textarea.value=a;this.onDisplayChanged();this._set("value",
this.getValue(!0))}else this.onLoadDeferred.then(g.hitch(this,function(){this.setValue(a)}))},replaceValue:function(a){this.isClosed?this.setValue(a):this.window&&this.window.getSelection&&!n("mozilla")?this.setValue(a):this.window&&this.window.getSelection?(a=this._preFilterContent(a),this.execCommand("selectall"),this.execCommand("inserthtml",a),this._preDomFilterContent(this.editNode)):this.document&&this.document.selection&&this.setValue(a);this._set("value",this.getValue(!0))},_preFilterContent:function(a){var b=
a;r.forEach(this.contentPreFilters,function(a){a&&(b=a(b))});return b},_preDomFilterContent:function(a){a=a||this.editNode;r.forEach(this.contentDomPreFilters,function(b){b&&g.isFunction(b)&&b(a)},this)},_postFilterContent:function(a,b){var c;g.isString(a)?c=a:(a=a||this.editNode,this.contentDomPostFilters.length&&(b&&(a=g.clone(a)),r.forEach(this.contentDomPostFilters,function(b){a=b(a)})),c=E.getChildrenHtml(a));g.trim(c.replace(/^\xA0\xA0*/,"").replace(/\xA0\xA0*$/,"")).length||(c="");r.forEach(this.contentPostFilters,
function(a){c=a(c)});return c},_saveContent:function(){var a=k.byId(K._scopeName+"._editor.RichText.value");a&&(a.value&&(a.value+=this._SEPARATOR),a.value+=this.name+this._NAME_CONTENT_SEP+this.getValue(!0))},escapeXml:function(a,b){a=a.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");b||(a=a.replace(/'/gm,"\x26#39;"));return a},getNodeHtml:function(a){c.deprecated("dijit.Editor::getNodeHtml is deprecated","use dijit/_editor/html::getNodeHtml instead",
2);return E.getNodeHtml(a)},getNodeChildrenHtml:function(a){c.deprecated("dijit.Editor::getNodeChildrenHtml is deprecated","use dijit/_editor/html::getChildrenHtml instead",2);return E.getChildrenHtml(a)},close:function(a){if(!this.isClosed){arguments.length||(a=!0);a&&this._set("value",this.getValue(!0));this.interval&&clearInterval(this.interval);this._webkitListener&&(this._webkitListener.remove(),delete this._webkitListener);n("ie")&&(this.iframe.onfocus=null);this.iframe._loadFunc=null;this._iframeRegHandle&&
(this._iframeRegHandle.remove(),delete this._iframeRegHandle);if(this.textarea){var b=this.textarea.style;b.position="";b.left=b.top="";n("ie")&&(b.overflow=this.__overflow,this.__overflow=null);this.textarea.value=this.value;h.destroy(this.domNode);this.domNode=this.textarea}else this.domNode.innerHTML=this.value;delete this.iframe;f.remove(this.domNode,this.baseClass);this.isClosed=!0;this.isLoaded=!1;delete this.editNode;delete this.focusNode;this.window&&this.window._frameElement&&(this.window._frameElement=
null);this.editorObject=this.editingArea=this.document=this.window=null}},destroy:function(){this.isClosed||this.close(!1);this._updateTimer&&this._updateTimer.remove();this.inherited(arguments);L._globalSaveHandler&&delete L._globalSaveHandler[this.id]},_removeMozBogus:function(a){return a.replace(/\stype="_moz"/gi,"").replace(/\s_moz_dirty=""/gi,"").replace(/_moz_resizing="(true|false)"/gi,"")},_removeWebkitBogus:function(a){a=a.replace(/\sclass="webkit-block-placeholder"/gi,"");a=a.replace(/\sclass="apple-style-span"/gi,
"");return a=a.replace(/<meta charset=\"utf-8\" \/>/gi,"")},_normalizeFontStyle:function(a){return a.replace(/<(\/)?strong([ \>])/gi,"\x3c$1b$2").replace(/<(\/)?em([ \>])/gi,"\x3c$1i$2")},_preFixUrlAttributes:function(a){return a.replace(/(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2").replace(/(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi,"$1$4$2$3$5$2 _djrealurl\x3d$2$3$5$2")},_browserQueryCommandEnabled:function(a){if(!a)return!1;
if(n("ie")||n("trident")||n("edge"))return this.focused&&!this.disabled;var b=9>n("ie")?this.document.selection.createRange():this.document;try{return b.queryCommandEnabled(a)}catch(I){return!1}},_createlinkEnabledImpl:function(){var a=!0;return a=n("opera")?this.window.getSelection().isCollapsed?!0:this.document.queryCommandEnabled("createlink"):this._browserQueryCommandEnabled("createlink")},_unlinkEnabledImpl:function(){var a=!0;return a=n("mozilla")||n("webkit")||n("ie")||n("trident")||n("edge")?
this.selection.hasAncestorElement("a"):this._browserQueryCommandEnabled("unlink")},_inserttableEnabledImpl:function(){var a=!0;return a=n("mozilla")||n("webkit")?!0:this._browserQueryCommandEnabled("inserttable")},_cutEnabledImpl:function(){var a=!0;n("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("cut");return a},_copyEnabledImpl:function(){var a=!0;n("webkit")?((a=this.window.getSelection())&&(a=a.toString()),a=!!a):a=this._browserQueryCommandEnabled("copy");
return a},_pasteEnabledImpl:function(){var a=!0;return n("webkit")?!0:a=this._browserQueryCommandEnabled("paste")},_inserthorizontalruleImpl:function(a){return n("ie")?this._inserthtmlImpl("\x3chr\x3e"):this.document.execCommand("inserthorizontalrule",!1,a)},_unlinkImpl:function(a){return this.queryCommandEnabled("unlink")&&(n("mozilla")||n("webkit"))?(a=this.selection.getAncestorElement("a"),this.selection.selectElement(a),this.document.execCommand("unlink",!1,null)):this.document.execCommand("unlink",
!1,a)},_hilitecolorImpl:function(a){var b;this._handleTextColorOrProperties("hilitecolor",a)||(n("mozilla")?(this.document.execCommand("styleWithCSS",!1,!0),console.log("Executing color command."),b=this.document.execCommand("hilitecolor",!1,a),this.document.execCommand("styleWithCSS",!1,!1)):b=this.document.execCommand("hilitecolor",!1,a));return b},_backcolorImpl:function(a){n("ie")&&(a=a?a:null);var b=this._handleTextColorOrProperties("backcolor",a);b||(b=this.document.execCommand("backcolor",
!1,a));return b},_forecolorImpl:function(a){n("ie")&&(a=a?a:null);var b=!1;(b=this._handleTextColorOrProperties("forecolor",a))||(b=this.document.execCommand("forecolor",!1,a));return b},_inserthtmlImpl:function(a){a=this._preFilterContent(a);var b=!0;if(9>n("ie")){var c=this.document.selection.createRange();if("CONTROL"===this.document.selection.type.toUpperCase()){for(var d=c.item(0);c.length;)c.remove(c.item(0));d.outerHTML=a}else c.pasteHTML(a);c.select()}else if(8>n("trident")){var e=D.getSelection(this.window);
if(e&&e.rangeCount&&e.getRangeAt){c=e.getRangeAt(0);c.deleteContents();var g=h.create("div");g.innerHTML=a;for(var f,d=this.document.createDocumentFragment();a=g.firstChild;)f=d.appendChild(a);c.insertNode(d);f&&(c=c.cloneRange(),c.setStartAfter(f),c.collapse(!1),e.removeAllRanges(),e.addRange(c))}}else n("mozilla")&&!a.length?this.selection.remove():b=this.document.execCommand("inserthtml",!1,a);return b},_boldImpl:function(a){var b=!1;if(n("ie")||n("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("bold");
b||(b=this.document.execCommand("bold",!1,a));return b},_italicImpl:function(a){var b=!1;if(n("ie")||n("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("italic");b||(b=this.document.execCommand("italic",!1,a));return b},_underlineImpl:function(a){var b=!1;if(n("ie")||n("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("underline");b||(b=this.document.execCommand("underline",!1,a));return b},_strikethroughImpl:function(a){var b=!1;if(n("ie")||n("trident"))this._adaptIESelection(),
b=this._adaptIEFormatAreaAndExec("strikethrough");b||(b=this.document.execCommand("strikethrough",!1,a));return b},_superscriptImpl:function(a){var b=!1;if(n("ie")||n("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("superscript");b||(b=this.document.execCommand("superscript",!1,a));return b},_subscriptImpl:function(a){var b=!1;if(n("ie")||n("trident"))this._adaptIESelection(),b=this._adaptIEFormatAreaAndExec("subscript");b||(b=this.document.execCommand("subscript",!1,a));return b},
_fontnameImpl:function(a){var b;if(n("ie")||n("trident"))b=this._handleTextColorOrProperties("fontname",a);b||(b=this.document.execCommand("fontname",!1,a));return b},_fontsizeImpl:function(a){var b;if(n("ie")||n("trident"))b=this._handleTextColorOrProperties("fontsize",a);b||(b=this.document.execCommand("fontsize",!1,a));return b},_insertorderedlistImpl:function(a){var b=!1;if(n("ie")||n("trident")||n("edge"))b=this._adaptIEList("insertorderedlist",a);b||(b=this.document.execCommand("insertorderedlist",
!1,a));return b},_insertunorderedlistImpl:function(a){var b=!1;if(n("ie")||n("trident")||n("edge"))b=this._adaptIEList("insertunorderedlist",a);b||(b=this.document.execCommand("insertunorderedlist",!1,a));return b},getHeaderHeight:function(){return this._getNodeChildrenHeight(this.header)},getFooterHeight:function(){return this._getNodeChildrenHeight(this.footer)},_getNodeChildrenHeight:function(a){var b=0;if(a&&a.childNodes){var c;for(c=0;c<a.childNodes.length;c++)var e=d.position(a.childNodes[c]),
b=b+e.h}return b},_isNodeEmpty:function(a,b){return 1===a.nodeType?0<a.childNodes.length?this._isNodeEmpty(a.childNodes[0],b):!0:3===a.nodeType?""===a.nodeValue.substring(b):!1},_removeStartingRangeFromRange:function(a,b){if(a.nextSibling)b.setStart(a.nextSibling,0);else{for(var c=a.parentNode;c&&null==c.nextSibling;)c=c.parentNode;c&&b.setStart(c.nextSibling,0)}return b},_adaptIESelection:function(){var a=D.getSelection(this.window);if(a&&a.rangeCount&&!a.isCollapsed){for(var b=a.getRangeAt(0),c=
b.startContainer,d=b.startOffset;3===c.nodeType&&d>=c.length&&c.nextSibling;)d-=c.length,c=c.nextSibling;for(var e=null;this._isNodeEmpty(c,d)&&c!==e;)e=c,b=this._removeStartingRangeFromRange(c,b),c=b.startContainer,d=0;a.removeAllRanges();a.addRange(b)}},_adaptIEFormatAreaAndExec:function(a){var b=D.getSelection(this.window),c=this.document,d,e,g,f,m,k,n;if(a&&b&&b.isCollapsed){if(this.queryCommandValue(a)){a=this._tagNamesForCommand(a);g=b.getRangeAt(0);f=g.startContainer;3===f.nodeType&&(e=g.endOffset,
f.length<e&&(e=this._adjustNodeAndOffset(d,e),f=e.node,e=e.offset));for(;f&&f!==this.editNode;){d=f.tagName?f.tagName.toLowerCase():"";if(-1<r.indexOf(a,d)){n=f;break}f=f.parentNode}if(n&&(d=g.startContainer,a=c.createElement(n.tagName),h.place(a,n,"after"),d&&3===d.nodeType)){e=g.endOffset;d.length<e&&(e=this._adjustNodeAndOffset(d,e),d=e.node,e=e.offset);f=d.nodeValue;g=c.createTextNode(f.substring(0,e));var t=f.substring(e,f.length);t&&(m=c.createTextNode(t));h.place(g,d,"before");m&&(k=c.createElement("span"),
k.className="ieFormatBreakerSpan",h.place(k,d,"after"),h.place(m,k,"after"),m=k);h.destroy(d);e=g.parentNode;for(d=[];e!==n;){f=e.tagName;g={tagName:f};d.push(g);f=c.createElement(f);e.style&&f.style&&e.style.cssText&&(f.style.cssText=e.style.cssText,g.cssText=e.style.cssText);"FONT"===e.tagName&&(e.color&&(f.color=e.color,g.color=e.color),e.face&&(f.face=e.face,g.face=e.face),e.size&&(f.size=e.size,g.size=e.size));e.className&&(f.className=e.className,g.className=e.className);if(m)for(;m;)g=m.nextSibling,
f.appendChild(m),m=g;f.tagName==e.tagName?(k=c.createElement("span"),k.className="ieFormatBreakerSpan",h.place(k,e,"after"),h.place(f,k,"after")):h.place(f,e,"after");g=e;m=f;e=e.parentNode}if(m){if(1===m.nodeType||3===m.nodeType&&m.nodeValue)a.innerHTML="";for(;m;)g=m.nextSibling,a.appendChild(m),m=g}if(d.length){g=d.pop();m=c.createElement(g.tagName);g.cssText&&m.style&&(m.style.cssText=g.cssText);g.className&&(m.className=g.className);"FONT"===g.tagName&&(g.color&&(m.color=g.color),g.face&&(m.face=
g.face),g.size&&(m.size=g.size));for(h.place(m,a,"before");d.length;)g=d.pop(),n=c.createElement(g.tagName),g.cssText&&n.style&&(n.style.cssText=g.cssText),g.className&&(n.className=g.className),"FONT"===g.tagName&&(g.color&&(n.color=g.color),g.face&&(n.face=g.face),g.size&&(n.size=g.size)),m.appendChild(n),m=n;n=c.createTextNode(".");k.appendChild(n);m.appendChild(n)}else k=c.createElement("span"),k.className="ieFormatBreakerSpan",n=c.createTextNode("."),k.appendChild(n),h.place(k,a,"before");m=
D.create(this.window);m.setStart(n,0);m.setEnd(n,n.length);b.removeAllRanges();b.addRange(m);this.selection.collapse(!1);n.parentNode.innerHTML="";a.firstChild||h.destroy(a);return!0}return!1}g=b.getRangeAt(0);if((d=g.startContainer)&&3===d.nodeType)return e=g.startOffset,d.length<e&&(e=this._adjustNodeAndOffset(d,e),d=e.node,e=e.offset),f=d.nodeValue,g=c.createTextNode(f.substring(0,e)),t=f.substring(e),""!==t&&(m=c.createTextNode(f.substring(e))),k=c.createElement("span"),n=c.createTextNode("."),
k.appendChild(n),g.length?h.place(g,d,"after"):g=d,h.place(k,g,"after"),m&&h.place(m,k,"after"),h.destroy(d),m=D.create(this.window),m.setStart(n,0),m.setEnd(n,n.length),b.removeAllRanges(),b.addRange(m),c.execCommand(a),h.place(k.firstChild,k,"before"),h.destroy(k),m.setStart(n,0),m.setEnd(n,n.length),b.removeAllRanges(),b.addRange(m),this.selection.collapse(!1),n.parentNode.innerHTML="",!0}else return!1},_adaptIEList:function(a){var b=D.getSelection(this.window);if(b.isCollapsed&&b.rangeCount&&
!this.queryCommandValue(a)){var c=b.getRangeAt(0),d=c.startContainer;if(d&&3==d.nodeType&&!c.startOffset)return c="ul","insertorderedlist"===a&&(c="ol"),a=this.document.createElement(c),c=h.create("li",null,a),h.place(a,d,"before"),c.appendChild(d),h.create("br",null,a,"after"),a=D.create(this.window),a.setStart(d,0),a.setEnd(d,d.length),b.removeAllRanges(),b.addRange(a),this.selection.collapse(!0),!0}return!1},_handleTextColorOrProperties:function(a,c){var d=D.getSelection(this.window),e=this.document,
g,f,m,k,t;c=c||null;if(a&&d&&d.isCollapsed&&d.rangeCount&&(f=d.getRangeAt(0),(g=f.startContainer)&&3===g.nodeType)){t=f.startOffset;g.length<t&&(f=this._adjustNodeAndOffset(g,t),g=f.node,t=f.offset);m=g.nodeValue;f=e.createTextNode(m.substring(0,t));""!==m.substring(t)&&(k=e.createTextNode(m.substring(t)));m=e.createElement("span");t=e.createTextNode(".");m.appendChild(t);e=e.createElement("span");m.appendChild(e);f.length?h.place(f,g,"after"):f=g;h.place(m,f,"after");k&&h.place(k,m,"after");h.destroy(g);
g=D.create(this.window);g.setStart(t,0);g.setEnd(t,t.length);d.removeAllRanges();d.addRange(g);if(n("webkit")){d="color";if("hilitecolor"===a||"backcolor"===a)d="backgroundColor";b.set(m,d,c);this.selection.remove();h.destroy(e);m.innerHTML="\x26#160;";this.selection.selectElement(m);this.focus()}else this.execCommand(a,c),h.place(m.firstChild,m,"before"),h.destroy(m),g.setStart(t,0),g.setEnd(t,t.length),d.removeAllRanges(),d.addRange(g),this.selection.collapse(!1),t.parentNode.removeChild(t);return!0}return!1},
_adjustNodeAndOffset:function(a,b){for(;a.length<b&&a.nextSibling&&3===a.nextSibling.nodeType;)b-=a.length,a=a.nextSibling;return{node:a,offset:b}},_tagNamesForCommand:function(a){return"bold"===a?["b","strong"]:"italic"===a?["i","em"]:"strikethrough"===a?["s","strike"]:"superscript"===a?["sup"]:"subscript"===a?["sub"]:"underline"===a?["u"]:[]},_stripBreakerNodes:function(a){if(this.isLoaded)return m(".ieFormatBreakerSpan",a).forEach(function(a){for(;a.firstChild;)h.place(a.firstChild,a,"before");
h.destroy(a)}),a},_stripTrailingEmptyNodes:function(a){function b(a){return/^(p|div|br)$/i.test(a.nodeName)&&0==a.children.length&&/^[\s\xA0]*$/.test(a.textContent||a.innerText||"")||3===a.nodeType&&/^[\s\xA0]*$/.test(a.nodeValue)}for(;a.lastChild&&b(a.lastChild);)h.destroy(a.lastChild);return a},_setTextDirAttr:function(a){this._set("textDir",a);this.onLoadDeferred.then(g.hitch(this,function(){this.editNode.dir=a}))}});return L})},"dijit/selection":function(){define("dojo/_base/array dojo/dom dojo/_base/lang dojo/sniff dojo/_base/window dijit/focus".split(" "),
function(r,l,q,p,k,e){var f=function(d){var b=d.document;this.getType=function(){if(b.getSelection){var c="text",a;try{a=d.getSelection()}catch(g){}a&&1==a.rangeCount&&(a=a.getRangeAt(0),a.startContainer==a.endContainer&&1==a.endOffset-a.startOffset&&3!=a.startContainer.nodeType&&(c="control"));return c}return b.selection.type.toLowerCase()};this.getSelectedText=function(){if(b.getSelection){var c=d.getSelection();return c?c.toString():""}return"control"==this.getType()?null:b.selection.createRange().text};
this.getSelectedHtml=function(){if(b.getSelection){var c=d.getSelection();if(c&&c.rangeCount){var a,e="";for(a=0;a<c.rangeCount;a++){var f=c.getRangeAt(a).cloneContents(),h=b.createElement("div");h.appendChild(f);e+=h.innerHTML}return e}return null}return"control"==this.getType()?null:b.selection.createRange().htmlText};this.getSelectedElement=function(){if("control"==this.getType()){if(b.getSelection){var c=d.getSelection();return c.anchorNode.childNodes[c.anchorOffset]}if((c=b.selection.createRange())&&
c.item)return b.selection.createRange().item(0)}return null};this.getParentElement=function(){if("control"==this.getType()){var c=this.getSelectedElement();if(c)return c.parentNode}else if(b.getSelection){if(c=b.getSelection()){for(c=c.anchorNode;c&&1!=c.nodeType;)c=c.parentNode;return c}}else return c=b.selection.createRange(),c.collapse(!0),c.parentElement();return null};this.hasAncestorElement=function(b){return null!=this.getAncestorElement.apply(this,arguments)};this.getAncestorElement=function(b){var a=
this.getSelectedElement()||this.getParentElement();return this.getParentOfType(a,arguments)};this.isTag=function(b,a){if(b&&b.tagName)for(var c=b.tagName.toLowerCase(),d=0;d<a.length;d++){var e=String(a[d]).toLowerCase();if(c==e)return e}return""};this.getParentOfType=function(b,a){for(;b;){if(this.isTag(b,a).length)return b;b=b.parentNode}return null};this.collapse=function(c){if(b.getSelection){var a=d.getSelection();a.removeAllRanges?c?a.collapseToStart():a.collapseToEnd():a.collapse(c)}else a=
b.selection.createRange(),a.collapse(c),a.select()};this.remove=function(){var c=b.selection;b.getSelection?(c=d.getSelection(),c.deleteFromDocument()):"none"!=c.type.toLowerCase()&&c.clear();return c};this.selectElementChildren=function(c,a){var e;c=l.byId(c);if(b.getSelection){var f=d.getSelection();p("opera")?(e=f.rangeCount?f.getRangeAt(0):b.createRange(),e.setStart(c,0),e.setEnd(c,3==c.nodeType?c.length:c.childNodes.length),f.addRange(e)):f.selectAllChildren(c)}else if(e=c.ownerDocument.body.createTextRange(),
e.moveToElementText(c),!a)try{e.select()}catch(m){}};this.selectElement=function(c,a){var d;c=l.byId(c);if(b.getSelection){var e=b.getSelection();d=b.createRange();e.removeAllRanges&&(p("opera")&&e.getRangeAt(0)&&(d=e.getRangeAt(0)),d.selectNode(c),e.removeAllRanges(),e.addRange(d))}else try{e=c.tagName?c.tagName.toLowerCase():"",d="img"===e||"table"===e?k.body(b).createControlRange():k.body(b).createRange(),d.addElement(c),a||d.select()}catch(m){this.selectElementChildren(c,a)}};this.inSelection=
function(c){if(c){var a,e;if(b.getSelection){var f=d.getSelection();f&&0<f.rangeCount&&(e=f.getRangeAt(0));if(e&&e.compareBoundaryPoints&&b.createRange)try{if(a=b.createRange(),a.setStart(c,0),1===e.compareBoundaryPoints(e.START_TO_END,a))return!0}catch(m){}}else{e=b.selection.createRange();try{a=c.ownerDocument.body.createTextRange(),a.moveToElementText(c)}catch(m){}if(e&&a&&1===e.compareEndPoints("EndToStart",a))return!0}}return!1};this.getBookmark=function(){var c,a,g=b.selection,f=e.curNode;if(b.getSelection){if(g=
d.getSelection())if(g.isCollapsed){if(c=f?f.tagName:"")if(c=c.toLowerCase(),"textarea"==c||"input"==c&&(!f.type||"text"==f.type.toLowerCase()))return g={start:f.selectionStart,end:f.selectionEnd,node:f,pRange:!0},{isCollapsed:g.end<=g.start,mark:g};c={isCollapsed:!0};g.rangeCount&&(c.mark=g.getRangeAt(0).cloneRange())}else a=g.getRangeAt(0),c={isCollapsed:!1,mark:a.cloneRange()}}else if(g){c=f?f.tagName:"";c=c.toLowerCase();if(f&&c&&("button"==c||"textarea"==c||"input"==c)){if(g.type&&"none"==g.type.toLowerCase())return{isCollapsed:!0,
mark:null};a=g.createRange();return{isCollapsed:a.text&&a.text.length?!1:!0,mark:{range:a,pRange:!0}}}c={};try{a=g.createRange(),c.isCollapsed=!("Text"==g.type?a.htmlText.length:a.length)}catch(m){return c.isCollapsed=!0,c}if("CONTROL"==g.type.toUpperCase())if(a.length)for(c.mark=[],g=0,f=a.length;g<f;)c.mark.push(a.item(g++));else c.isCollapsed=!0,c.mark=null;else c.mark=a.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return c};this.moveToBookmark=
function(c){if(c=c.mark)if(b.getSelection){var a=d.getSelection();a&&a.removeAllRanges?c.pRange?(a=c.node,a.selectionStart=c.start,a.selectionEnd=c.end):(a.removeAllRanges(),a.addRange(c)):console.warn("No idea how to restore selection for this browser!")}else if(b.selection&&c){var e;c.pRange?e=c.range:q.isArray(c)?(e=b.body.createControlRange(),r.forEach(c,function(a){e.addElement(a)})):(e=b.body.createTextRange(),e.moveToBookmark(c));e.select()}};this.isCollapsed=function(){return this.getBookmark().isCollapsed}},
h=new f(window);h.SelectionManager=f;return h})},"dijit/_editor/range":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang"],function(r,l,q){var p={getIndex:function(e,h){for(var d=[],b=[],c=e,a,g;e!=h;){var f=0;for(a=e.parentNode;g=a.childNodes[f++];)if(g===e){--f;break}d.unshift(f);b.unshift(f-a.childNodes.length);e=a}if(0<d.length&&3==c.nodeType){for(g=c.previousSibling;g&&3==g.nodeType;)d[d.length-1]--,g=g.previousSibling;for(g=c.nextSibling;g&&3==g.nodeType;)b[b.length-
1]++,g=g.nextSibling}return{o:d,r:b}},getNode:function(e,h){if(!q.isArray(e)||0==e.length)return h;var d=h;r.every(e,function(b){if(0<=b&&b<d.childNodes.length)d=d.childNodes[b];else return d=null,!1;return!0});return d},getCommonAncestor:function(e,h,d){d=d||e.ownerDocument.body;var b=function(a){for(var b=[];a;)if(b.unshift(a),a!==d)a=a.parentNode;else break;return b};e=b(e);h=b(h);for(var b=Math.min(e.length,h.length),c=e[0],a=1;a<b;a++)if(e[a]===h[a])c=e[a];else break;return c},getAncestor:function(e,
h,d){for(d=d||e.ownerDocument.body;e&&e!==d;){var b=e.nodeName.toUpperCase();if(h.test(b))return e;e=e.parentNode}return null},BlockTagNames:/^(?:P|DIV|H1|H2|H3|H4|H5|H6|ADDRESS|PRE|OL|UL|LI|DT|DE)$/,getBlockAncestor:function(e,h,d){d=d||e.ownerDocument.body;h=h||p.BlockTagNames;for(var b=null,c;e&&e!==d;){var a=e.nodeName.toUpperCase();!b&&h.test(a)&&(b=e);!c&&/^(?:BODY|TD|TH|CAPTION)$/.test(a)&&(c=e);e=e.parentNode}return{blockNode:b,blockContainer:c||e.ownerDocument.body}},atBeginningOfContainer:function(e,
h,d){var b=!1,c=0==d;c||3!=h.nodeType||/^[\s\xA0]+$/.test(h.nodeValue.substr(0,d))&&(c=!0);if(c)for(b=!0;h&&h!==e;){if(h.previousSibling){b=!1;break}h=h.parentNode}return b},atEndOfContainer:function(e,h,d){var b=!1,c=d==(h.length||h.childNodes.length);c||3!=h.nodeType||/^[\s\xA0]+$/.test(h.nodeValue.substr(d))&&(c=!0);if(c)for(b=!0;h&&h!==e;){if(h.nextSibling){b=!1;break}h=h.parentNode}return b},adjacentNoneTextNode:function(e,h){for(var d=e,b=0-e.length||0,c=h?"nextSibling":"previousSibling";d&&
3==d.nodeType;)b+=d.length,d=d[c];return[d,b]},create:function(f){f=f||window;return f.getSelection?f.document.createRange():new e},getSelection:function(e,h){if(e.getSelection)return e.getSelection();var d=new k.selection(e);h||d._getCurrentSelection();return d}};if(!window.getSelection)var k=p.ie={cachedSelection:{},selection:function(f){this._ranges=[];this.addRange=function(e,d){this._ranges.push(e);d||e._select();this.rangeCount=this._ranges.length};this.removeAllRanges=function(){this._ranges=
[];this.rangeCount=0};this.getRangeAt=function(e){return this._ranges[e]};this._getCurrentSelection=function(){this.removeAllRanges();var h;h=f.document.selection.createRange();h="CONTROL"==f.document.selection.type.toUpperCase()?new e(k.decomposeControlRange(h)):new e(k.decomposeTextRange(h));this.addRange(h,!0),this.isCollapsed=h.collapsed}},decomposeControlRange:function(e){var f=e.item(0),d=e.item(e.length-1);e=f.parentNode;var b=d.parentNode,f=p.getIndex(f,e).o[0],d=p.getIndex(d,b).o[0]+1;return[e,
f,b,d]},getEndPoint:function(e,h){var d=e.duplicate();d.collapse(!h);var b="EndTo"+(h?"End":"Start"),c=d.parentElement(),a,g,f;0<c.childNodes.length?r.every(c.childNodes,function(h,m){var k;if(3!=h.nodeType)if(d.moveToElementText(h),0<d.compareEndPoints(b,e))if(f&&3==f.nodeType)a=f,k=!0;else return a=c,g=m,!1;else{if(m==c.childNodes.length-1)return a=c,g=c.childNodes.length,!1}else m==c.childNodes.length-1&&(a=h,k=!0);if(k&&a){a=(k=p.adjacentNoneTextNode(a)[0])?k.nextSibling:c.firstChild;var n=p.adjacentNoneTextNode(a);
k=n[0];n=n[1];k?(d.moveToElementText(k),d.collapse(!1)):d.moveToElementText(c);d.setEndPoint(b,e);g=d.text.length-n;return!1}f=h;return!0}):(a=c,g=0);if(!h&&1==a.nodeType&&g==a.childNodes.length){var m=a.nextSibling;m&&3==m.nodeType&&(a=m,g=0)}return[a,g]},setEndPoint:function(e,h,d){e=e.duplicate();var b;if(3!=h.nodeType)if(0<d){if(b=h.childNodes[d-1])if(3==b.nodeType)h=b,d=b.length;else if(b.nextSibling&&3==b.nextSibling.nodeType)h=b.nextSibling,d=0;else{e.moveToElementText(b.nextSibling?b:h);var c=
b.parentNode;b=c.insertBefore(b.ownerDocument.createTextNode(" "),b.nextSibling);e.collapse(!1);c.removeChild(b)}}else e.moveToElementText(h),e.collapse(!0);3==h.nodeType&&(b=p.adjacentNoneTextNode(h),c=b[0],b=b[1],c?(e.moveToElementText(c),e.collapse(!1),"inherit"!=c.contentEditable&&b++):(e.moveToElementText(h.parentNode),e.collapse(!0),e.move("character",1),e.move("character",-1)),d+=b,0<d&&e.move("character",d)!=d&&console.error("Error when moving!"));return e},decomposeTextRange:function(e){var f=
k.getEndPoint(e),d=f[0],b=f[1],c=f[0],f=f[1];e.htmlText.length&&(e.htmlText==e.text?f=b+e.text.length:(f=k.getEndPoint(e,!0),c=f[0],f=f[1]));return[d,b,c,f]},setRange:function(e,h,d,b,c,a){h=k.setEndPoint(e,h,d);e.setEndPoint("StartToStart",h);if(!a)var g=k.setEndPoint(e,b,c);e.setEndPoint("EndToEnd",g||h);return e}},e=p.W3CRange=l(null,{constructor:function(){0<arguments.length?(this.setStart(arguments[0][0],arguments[0][1]),this.setEnd(arguments[0][2],arguments[0][3])):(this.startContainer=this.commonAncestorContainer=
null,this.startOffset=0,this.endContainer=null,this.endOffset=0,this.collapsed=!0)},_updateInternal:function(){this.commonAncestorContainer=this.startContainer!==this.endContainer?p.getCommonAncestor(this.startContainer,this.endContainer):this.startContainer;this.collapsed=this.startContainer===this.endContainer&&this.startOffset==this.endOffset},setStart:function(e,h){h=parseInt(h);if(this.startContainer!==e||this.startOffset!=h)delete this._cachedBookmark,this.startContainer=e,this.startOffset=
h,this.endContainer?this._updateInternal():this.setEnd(e,h)},setEnd:function(e,h){h=parseInt(h);if(this.endContainer!==e||this.endOffset!=h)delete this._cachedBookmark,this.endContainer=e,this.endOffset=h,this.startContainer?this._updateInternal():this.setStart(e,h)},setStartAfter:function(e,h){this._setPoint("setStart",e,h,1)},setStartBefore:function(e,h){this._setPoint("setStart",e,h,0)},setEndAfter:function(e,h){this._setPoint("setEnd",e,h,1)},setEndBefore:function(e,h){this._setPoint("setEnd",
e,h,0)},_setPoint:function(e,h,d,b){d=p.getIndex(h,h.parentNode).o;this[e](h.parentNode,d.pop()+b)},_getIERange:function(){var e=(this._body||this.endContainer.ownerDocument.body).createTextRange();k.setRange(e,this.startContainer,this.startOffset,this.endContainer,this.endOffset,this.collapsed);return e},getBookmark:function(){this._getIERange();return this._cachedBookmark},_select:function(){this._getIERange().select()},deleteContents:function(){var e=this.startContainer,h=this._getIERange();3!==
e.nodeType||this.startOffset||this.setStartBefore(e);h.pasteHTML("");this.endContainer=this.startContainer;this.endOffset=this.startOffset;this.collapsed=!0},cloneRange:function(){var f=new e([this.startContainer,this.startOffset,this.endContainer,this.endOffset]);f._body=this._body;return f},detach:function(){this.startContainer=this.commonAncestorContainer=this._body=null;this.startOffset=0;this.endContainer=null;this.endOffset=0;this.collapsed=!0}});q.setObject("dijit.range",p);return p})},"dijit/_editor/html":function(){define(["dojo/_base/array",
"dojo/_base/lang","dojo/sniff"],function(r,l,q){var p={};l.setObject("dijit._editor.html",p);var k=p.escapeXml=function(e,f){e=e.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");f||(e=e.replace(/'/gm,"\x26#39;"));return e};p.getNodeHtml=function(e){var f=[];p.getNodeHtmlHelper(e,f);return f.join("")};p.getNodeHtmlHelper=function(e,f){switch(e.nodeType){case 1:var h=e.nodeName.toLowerCase();if(!h||"/"==h.charAt(0))return"";f.push("\x3c",h);var d=
[],b={},c;if(q("dom-attributes-explicit")||q("dom-attributes-specified-flag"))for(var a=0;c=e.attributes[a++];){var g=c.name;"_dj"===g.substr(0,3)||q("dom-attributes-specified-flag")&&!c.specified||g in b||(c=c.value,("src"==g||"href"==g)&&e.getAttribute("_djrealurl")&&(c=e.getAttribute("_djrealurl")),8===q("ie")&&"style"===g&&(c=c.replace("HEIGHT:","height:").replace("WIDTH:","width:")),d.push([g,c]),b[g]=c)}else{var l=(/^input$|^img$/i.test(e.nodeName)?e:e.cloneNode(!1)).outerHTML,b=l.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi),
l=l.substr(0,l.indexOf("\x3e"));r.forEach(b,function(a){if(a){var b=a.indexOf("\x3d");if(0<b&&(a=a.substring(0,b),"_dj"!=a.substr(0,3)))if("src"!=a&&"href"!=a||!e.getAttribute("_djrealurl")){var c;switch(a){case "style":c=e.style.cssText.toLowerCase();break;case "class":c=e.className;break;case "width":if("img"===h){(b=/width=(\S+)/i.exec(l))&&(c=b[1]);break}case "height":if("img"===h){(b=/height=(\S+)/i.exec(l))&&(c=b[1]);break}default:c=e.getAttribute(a)}null!=c&&d.push([a,c.toString()])}else d.push([a,
e.getAttribute("_djrealurl")])}},this)}d.sort(function(a,b){return a[0]<b[0]?-1:a[0]==b[0]?0:1});for(b=0;c=d[b++];)f.push(" ",c[0],'\x3d"',"string"===typeof c[1]?k(c[1],!0):c[1],'"');switch(h){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":f.push(" /\x3e");break;case "script":f.push("\x3e",e.innerHTML,"\x3c/",h,"\x3e");break;default:f.push("\x3e"),e.hasChildNodes()&&p.getChildrenHtmlHelper(e,f),f.push("\x3c/",h,"\x3e")}break;case 4:case 3:f.push(k(e.nodeValue,
!0));break;case 8:f.push("\x3c!--",k(e.nodeValue,!0),"--\x3e");break;default:f.push("\x3c!-- Element not recognized - Type: ",e.nodeType," Name: ",e.nodeName,"--\x3e")}};p.getChildrenHtml=function(e){var f=[];p.getChildrenHtmlHelper(e,f);return f.join("")};p.getChildrenHtmlHelper=function(e,f){if(e)for(var h=e.childNodes||e,d=!q("ie")||h!==e,b,c=0;b=h[c++];)d&&b.parentNode!=e||p.getNodeHtmlHelper(b,f)};return p})},"dijit/_editor/plugins/LinkDialog":function(){define("require dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on dojo/sniff dojo/query dojo/string ../_Plugin ../../form/DropDownButton ../range".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a){var g=l("dijit._editor.plugins.LinkDialog",b,{buttonClass:c,useDefaultCommand:!1,urlRegExp:"((https?|ftps?|file)\\://|./|../|/|)(/[a-zA-Z]{1,1}:/|)(((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)*(?:[a-zA-Z](?:[-\\da-zA-Z]{0,80}[\\da-zA-Z])?)\\.?)|(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])|(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]|(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]|(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])|0[xX]0*[\\da-fA-F]{1,8}|([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}|([\\da-fA-F]{1,4}\\:){6}((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])))(\\:\\d+)?(/(?:[^?#\\s/]+/)*(?:[^?#\\s/]{0,}(?:\\?[^?#\\s/]*)?(?:#.*)?)?)?",
emailRegExp:"\x3c?(mailto\\:)([!#-'*+\\-\\/-9\x3d?A-Z^-~]+[.])*[!#-'*+\\-\\/-9\x3d?A-Z^-~]+@((?:(?:[\\da-zA-Z](?:[-\\da-zA-Z]{0,61}[\\da-zA-Z])?)\\.)+(?:[a-zA-Z](?:[-\\da-zA-Z]{0,6}[\\da-zA-Z])?)\\.?)|localhost|^[^-][a-zA-Z0-9_-]*\x3e?",htmlTemplate:'\x3ca href\x3d"${urlInput}" _djrealurl\x3d"${urlInput}" target\x3d"${targetSelect}"\x3e${textInput}\x3c/a\x3e',tag:"a",_hostRxp:/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/,_userAtRxp:/^([!#-'*+\-\/-9=?A-Z^-~]+[.])*[!#-'*+\-\/-9=?A-Z^-~]+@/i,
linkDialogTemplate:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_urlInput'\x3e${url}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_urlInput' name\x3d'urlInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'true' id\x3d'${id}_textInput' name\x3d'textInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_targetSelect'\x3e${target}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cselect id\x3d'${id}_targetSelect' name\x3d'targetSelect' data-dojo-type\x3d'dijit.form.Select'\x3e\x3coption selected\x3d'selected' value\x3d'_self'\x3e${currentWindow}\x3c/option\x3e\x3coption value\x3d'_blank'\x3e${newWindow}\x3c/option\x3e\x3coption value\x3d'_top'\x3e${topWindow}\x3c/option\x3e\x3coption value\x3d'_parent'\x3e${parentWindow}\x3c/option\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
_initButton:function(){this.inherited(arguments);this.button.loadDropDown=k.hitch(this,"_loadDropDown");this._connectTagEvents()},_loadDropDown:function(a){r("dojo/i18n ../../TooltipDialog ../../registry ../../form/Button ../../form/Select ../../form/ValidationTextBox dojo/i18n!../../nls/common dojo/i18n!../nls/LinkDialog".split(" "),k.hitch(this,function(b,c,g){var f=this;this.tag="insertImage"==this.command?"img":"a";b=k.delegate(b.getLocalization("dijit","common",this.lang),b.getLocalization("dijit._editor",
"LinkDialog",this.lang));var h=this.dropDown=this.button.dropDown=new c({title:b[this.command+"Title"],ownerDocument:this.editor.ownerDocument,dir:this.editor.dir,execute:k.hitch(this,"setValue"),onOpen:function(){f._onOpenDialog();c.prototype.onOpen.apply(this,arguments)},onCancel:function(){setTimeout(k.hitch(f,"_onCloseDialog"),0)}});b.urlRegExp=this.urlRegExp;b.id=g.getUniqueId(this.editor.id);this._uniqueId=b.id;this._setContent(h.title+"\x3cdiv style\x3d'border-bottom: 1px black solid;padding-bottom:2pt;margin-bottom:4pt'\x3e\x3c/div\x3e"+
d.substitute(this.linkDialogTemplate,b));h.startup();this._urlInput=g.byId(this._uniqueId+"_urlInput");this._textInput=g.byId(this._uniqueId+"_textInput");this._setButton=g.byId(this._uniqueId+"_setButton");this.own(g.byId(this._uniqueId+"_cancelButton").on("click",k.hitch(this.dropDown,"onCancel")));this._urlInput&&this.own(this._urlInput.on("change",k.hitch(this,"_checkAndFixInput")));this._textInput&&this.own(this._textInput.on("change",k.hitch(this,"_checkAndFixInput")));this._urlRegExp=new RegExp("^"+
this.urlRegExp+"$","i");this._emailRegExp=new RegExp("^"+this.emailRegExp+"$","i");this._urlInput.isValid=k.hitch(this,function(){var a=this._urlInput.get("value");return this._urlRegExp.test(a)||this._emailRegExp.test(a)});this.own(e(h.domNode,"keydown",k.hitch(this,k.hitch(this,function(a){!a||a.keyCode!=p.ENTER||a.shiftKey||a.metaKey||a.ctrlKey||a.altKey||this._setButton.get("disabled")||(h.onExecute(),h.execute(h.get("value")))}))));a()}))},_checkAndFixInput:function(){var a=this,b=this._urlInput.get("value");
this._delayedCheck&&(clearTimeout(this._delayedCheck),this._delayedCheck=null);this._delayedCheck=setTimeout(function(){var c=b,d=!1,e=!1;c&&1<c.length&&(c=k.trim(c),0!==c.indexOf("mailto:")&&(0<c.indexOf("/")?-1===c.indexOf("://")&&"/"!==c.charAt(0)&&c.indexOf("./")&&0!==c.indexOf("../")&&a._hostRxp.test(c)&&(d=!0):a._userAtRxp.test(c)&&(e=!0)));d&&a._urlInput.set("value","http://"+c);e&&a._urlInput.set("value","mailto:"+c);a._setButton.set("disabled",!a._isValid())},250)},_connectTagEvents:function(){this.editor.onLoadDeferred.then(k.hitch(this,
function(){this.own(e(this.editor.editNode,"dblclick",k.hitch(this,"_onDblClick")))}))},_isValid:function(){return this._urlInput.isValid()&&this._textInput.isValid()},_setContent:function(a){this.dropDown.set({parserScope:"dojo",content:a})},_checkValues:function(a){a&&a.urlInput&&(a.urlInput=a.urlInput.replace(/"/g,"\x26quot;"));return a},setValue:function(b){this._onCloseDialog();if(9>f("ie")){var c=a.getSelection(this.editor.window).getRangeAt(0).endContainer;3===c.nodeType&&(c=c.parentNode);
c&&c.nodeName&&c.nodeName.toLowerCase()!==this.tag&&(c=this.editor.selection.getSelectedElement(this.tag));c&&c.nodeName&&c.nodeName.toLowerCase()===this.tag&&this.editor.queryCommandEnabled("unlink")&&(this.editor.selection.selectElementChildren(c),this.editor.execCommand("unlink"))}b=this._checkValues(b);this.editor.execCommand("inserthtml",d.substitute(this.htmlTemplate,b));h("a",this.editor.document).forEach(function(a){a.innerHTML||q.has(a,"name")||a.parentNode.removeChild(a)},this)},_onCloseDialog:function(){this.editor.focused&&
this.editor.focus()},_getCurrentValues:function(a){var b,c,d;a&&a.tagName.toLowerCase()===this.tag?(b=a.getAttribute("_djrealurl")||a.getAttribute("href"),d=a.getAttribute("target")||"_self",c=a.textContent||a.innerText,this.editor.selection.selectElement(a,!0)):c=this.editor.selection.getSelectedText();return{urlInput:b||"",textInput:c||"",targetSelect:d||""}},_onOpenDialog:function(){var b,c;if(f("ie")){if(c=a.getSelection(this.editor.window),c.rangeCount){var d=c.getRangeAt(0);b=d.endContainer;
3===b.nodeType&&(b=b.parentNode);b&&b.nodeName&&b.nodeName.toLowerCase()!==this.tag&&(b=this.editor.selection.getSelectedElement(this.tag));if(!b||b.nodeName&&b.nodeName.toLowerCase()!==this.tag)(c=this.editor.selection.getAncestorElement(this.tag))&&c.nodeName&&c.nodeName.toLowerCase()==this.tag?(b=c,this.editor.selection.selectElement(b)):d.startContainer===d.endContainer&&(c=d.startContainer.firstChild)&&c.nodeName&&c.nodeName.toLowerCase()==this.tag&&(b=c,this.editor.selection.selectElement(b))}}else b=
this.editor.selection.getAncestorElement(this.tag);this.dropDown.reset();this._setButton.set("disabled",!0);this.dropDown.set("value",this._getCurrentValues(b))},_onDblClick:function(a){if(a&&a.target&&(a=a.target,(a.tagName?a.tagName.toLowerCase():"")===this.tag&&q.get(a,"href"))){var b=this.editor;this.editor.selection.selectElement(a);b.onDisplayChanged();b._updateTimer&&(b._updateTimer.remove(),delete b._updateTimer);b.onNormalizedDisplayChanged();var c=this.button;setTimeout(function(){c.set("disabled",
!1);c.loadAndOpenDropDown().then(function(){c.dropDown.focus&&c.dropDown.focus()})},10)}}}),w=l("dijit._editor.plugins.ImgLinkDialog",[g],{linkDialogTemplate:"\x3ctable role\x3d'presentation'\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_urlInput'\x3e${url}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput dojoType\x3d'dijit.form.ValidationTextBox' regExp\x3d'${urlRegExp}' required\x3d'true' id\x3d'${id}_urlInput' name\x3d'urlInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d'${id}_textInput'\x3e${text}\x3c/label\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput data-dojo-type\x3d'dijit.form.ValidationTextBox' required\x3d'false' id\x3d'${id}_textInput' name\x3d'textInput' data-dojo-props\x3d'intermediateChanges:true'/\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'2'\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'submit' id\x3d'${id}_setButton'\x3e${set}\x3c/button\x3e\x3cbutton data-dojo-type\x3d'dijit.form.Button' type\x3d'button' id\x3d'${id}_cancelButton'\x3e${buttonCancel}\x3c/button\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
htmlTemplate:'\x3cimg src\x3d"${urlInput}" _djrealurl\x3d"${urlInput}" alt\x3d"${textInput}" /\x3e',tag:"img",_getCurrentValues:function(a){var b,c;a&&a.tagName.toLowerCase()===this.tag?(b=a.getAttribute("_djrealurl")||a.getAttribute("src"),c=a.getAttribute("alt"),this.editor.selection.selectElement(a,!0)):c=this.editor.selection.getSelectedText();return{urlInput:b||"",textInput:c||""}},_isValid:function(){return this._urlInput.isValid()},_connectTagEvents:function(){this.inherited(arguments);this.editor.onLoadDeferred.then(k.hitch(this,
function(){this.own(e(this.editor.editNode,"mousedown",k.hitch(this,"_selectTag")))}))},_selectTag:function(a){a&&a.target&&(a=a.target,(a.tagName?a.tagName.toLowerCase():"")===this.tag&&this.editor.selection.selectElement(a))},_checkValues:function(a){a&&a.urlInput&&(a.urlInput=a.urlInput.replace(/"/g,"\x26quot;"));a&&a.textInput&&(a.textInput=a.textInput.replace(/"/g,"\x26quot;"));return a},_onDblClick:function(a){if(a&&a.target&&(a=a.target,(a.tagName?a.tagName.toLowerCase():"")===this.tag&&q.get(a,
"src"))){var b=this.editor;this.editor.selection.selectElement(a);b.onDisplayChanged();b._updateTimer&&(b._updateTimer.remove(),delete b._updateTimer);b.onNormalizedDisplayChanged();var c=this.button;setTimeout(function(){c.set("disabled",!1);c.loadAndOpenDropDown().then(function(){c.dropDown.focus&&c.dropDown.focus()})},10)}}});b.registry.createLink=function(){return new g({command:"createLink"})};b.registry.insertImage=function(){return new w({command:"insertImage"})};g.ImgLinkDialog=w;return g})},
"dijit/form/DropDownButton":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/query ../registry ../popup ./Button ../_Container ../_HasDropDown dojo/text!./templates/DropDownButton.html ../a11yclick".split(" "),function(r,l,q,p,k,e,f,h,d,b){return r("dijit.form.DropDownButton",[f,h,d],{baseClass:"dijitDropDownButton",templateString:b,_fillContent:function(){var b=this.srcNodeRef,a=this.containerNode;if(b&&a)for(;b.hasChildNodes();){var d=b.firstChild;d.hasAttribute&&(d.hasAttribute("data-dojo-type")||
d.hasAttribute("dojoType")||d.hasAttribute("data-"+l._scopeName+"-type")||d.hasAttribute(l._scopeName+"Type"))?(this.dropDownContainer=this.ownerDocument.createElement("div"),this.dropDownContainer.appendChild(d)):a.appendChild(d)}},startup:function(){this._started||(!this.dropDown&&this.dropDownContainer&&(this.dropDown=k.byNode(this.dropDownContainer.firstChild),delete this.dropDownContainer),this.dropDown&&e.hide(this.dropDown),this.inherited(arguments))},isLoaded:function(){var b=this.dropDown;
return!!b&&(!b.href||b.isLoaded)},loadDropDown:function(b){var a=this.dropDown,c=a.on("load",q.hitch(this,function(){c.remove();b()}));a.refresh()},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}})})},"dijit/popup":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/keys dojo/_base/lang dojo/on ./place ./BackgroundIframe ./Viewport ./main dojo/touch".split(" "),function(r,
l,q,p,k,e,f,h,d,b,c,a,g,w,m,u){function n(){this._popupWrapper&&(e.destroy(this._popupWrapper),delete this._popupWrapper)}q=q(null,{_stack:[],_beginZIndex:1E3,_idGen:1,_repositionAll:function(){if(this._firstAroundNode){var a=this._firstAroundPosition,b=f.position(this._firstAroundNode,!0),d=b.x-a.x,a=b.y-a.y;if(d||a)for(this._firstAroundPosition=b,b=0;b<this._stack.length;b++){var e=this._stack[b].wrapper.style;e.top=parseFloat(e.top)+a+"px";"auto"==e.right?e.left=parseFloat(e.left)+d+"px":e.right=
parseFloat(e.right)-d+"px"}this._aroundMoveListener=setTimeout(c.hitch(this,"_repositionAll"),d||a?10:50)}},_createWrapper:function(b){var c=b._popupWrapper,d=b.domNode;c||(c=e.create("div",{"class":"dijitPopup",style:{display:"none"},role:"region","aria-label":b["aria-label"]||b.label||b.name||b.id},b.ownerDocumentBody),c.appendChild(d),d=d.style,d.display="",d.visibility="",d.position="",d.top="0px",b._popupWrapper=c,l.after(b,"destroy",n,!0),"ontouchend"in document&&a(c,"touchend",function(a){/^(input|button|textarea)$/i.test(a.target.tagName)||
a.preventDefault()}),c.dojoClick=!0);return c},moveOffScreen:function(a){var b=this._createWrapper(a);a=f.isBodyLtr(a.ownerDocument);var c={visibility:"hidden",top:"-9999px",display:""};c[a?"left":"right"]="-9999px";c[a?"right":"left"]="auto";h.set(b,c);return b},hide:function(a){var b=this._createWrapper(a);h.set(b,{display:"none",height:"auto",overflowY:"visible",border:""});a=a.domNode;"_originalStyle"in a&&(a.style.cssText=a._originalStyle)},getTopPopup:function(){for(var a=this._stack,b=a.length-
1;0<b&&a[b].parent===a[b-1].widget;b--);return a[b]},open:function(e){for(var n=this._stack,l=e.popup,t=l.domNode,q=e.orient||["below","below-alt","above","above-alt"],r=e.parent?e.parent.isLeftToRight():f.isBodyLtr(l.ownerDocument),u=e.around,F=e.around&&e.around.id?e.around.id+"_dropdown":"popup_"+this._idGen++;n.length&&(!e.parent||!p.isDescendant(e.parent.domNode,n[n.length-1].widget.domNode));)this.close(n[n.length-1].widget);var D=this.moveOffScreen(l);l.startup&&!l._started&&l.startup();var E,
G=f.position(t);if("maxHeight"in e&&-1!=e.maxHeight)E=e.maxHeight||Infinity;else{E=m.getEffectiveBox(this.ownerDocument);var K=u?f.position(u,!1):{y:e.y-(e.padding||0),h:2*(e.padding||0)};E=Math.floor(Math.max(K.y,E.h-(K.y+K.h)))}G.h>E&&(G=h.getComputedStyle(t),h.set(D,{overflowY:"scroll",height:E+"px",border:G.borderLeftWidth+" "+G.borderLeftStyle+" "+G.borderLeftColor}),t._originalStyle=t.style.cssText,t.style.border="none");k.set(D,{id:F,style:{zIndex:this._beginZIndex+n.length},"class":"dijitPopup "+
(l.baseClass||l["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:e.parent?e.parent.id:""});0==n.length&&u&&(this._firstAroundNode=u,this._firstAroundPosition=f.position(u,!0),this._aroundMoveListener=setTimeout(c.hitch(this,"_repositionAll"),50));d("config-bgIframe")&&!l.bgIframe&&(l.bgIframe=new w(D));F=l.orient?c.hitch(l,"orient"):null;q=u?g.around(D,u,q,r,F):g.at(D,e,"R"==q?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],e.padding,F);D.style.visibility="visible";t.style.visibility="visible";t=
[];t.push(a(D,"keydown",c.hitch(this,function(a){if(a.keyCode==b.ESCAPE&&e.onCancel)a.stopPropagation(),a.preventDefault(),e.onCancel();else if(a.keyCode==b.TAB&&(a.stopPropagation(),a.preventDefault(),(a=this.getTopPopup())&&a.onCancel))a.onCancel()})));l.onCancel&&e.onCancel&&t.push(l.on("cancel",e.onCancel));t.push(l.on(l.onExecute?"execute":"change",c.hitch(this,function(){var a=this.getTopPopup();if(a&&a.onExecute)a.onExecute()})));n.push({widget:l,wrapper:D,parent:e.parent,onExecute:e.onExecute,
onCancel:e.onCancel,onClose:e.onClose,handlers:t});if(l.onOpen)l.onOpen(q);return q},close:function(a){for(var b=this._stack;a&&r.some(b,function(b){return b.widget==a})||!a&&b.length;){var c=b.pop(),d=c.widget,e=c.onClose;d.bgIframe&&(d.bgIframe.destroy(),delete d.bgIframe);if(d.onClose)d.onClose();for(var g;g=c.handlers.pop();)g.remove();d&&d.domNode&&this.hide(d);e&&e()}0==b.length&&this._aroundMoveListener&&(clearTimeout(this._aroundMoveListener),this._firstAroundNode=this._firstAroundPosition=
this._aroundMoveListener=null)}});return u.popup=new q})},"dijit/place":function(){define("dojo/_base/array dojo/dom-geometry dojo/dom-style dojo/_base/kernel dojo/_base/window ./Viewport ./main".split(" "),function(r,l,q,p,k,e,f){function h(b,c,a,d){var g=e.getEffectiveBox(b.ownerDocument);b.parentNode&&"body"==String(b.parentNode.tagName).toLowerCase()||k.body(b.ownerDocument).appendChild(b);var f=null;r.some(c,function(c){var e=c.corner,h=c.pos,k=0,m={w:{L:g.l+g.w-h.x,R:h.x-g.l,M:g.w}[e.charAt(1)],
h:{T:g.t+g.h-h.y,B:h.y-g.t,M:g.h}[e.charAt(0)]},n=b.style;n.left=n.right="auto";a&&(k=a(b,c.aroundCorner,e,m,d),k="undefined"==typeof k?0:k);var t=b.style,p=t.display,q=t.visibility;"none"==t.display&&(t.visibility="hidden",t.display="");n=l.position(b);t.display=p;t.visibility=q;p={L:h.x,R:h.x-n.w,M:Math.max(g.l,Math.min(g.l+g.w,h.x+(n.w>>1))-n.w)}[e.charAt(1)];q={T:h.y,B:h.y-n.h,M:Math.max(g.t,Math.min(g.t+g.h,h.y+(n.h>>1))-n.h)}[e.charAt(0)];h=Math.max(g.l,p);t=Math.max(g.t,q);p=Math.min(g.l+g.w,
p+n.w)-h;q=Math.min(g.t+g.h,q+n.h)-t;k+=n.w-p+(n.h-q);if(null==f||k<f.overflow)f={corner:e,aroundCorner:c.aroundCorner,x:h,y:t,w:p,h:q,overflow:k,spaceAvailable:m};return!k});f.overflow&&a&&a(b,f.aroundCorner,f.corner,f.spaceAvailable,d);c=f.y;var h=f.x,n=k.body(b.ownerDocument);/relative|absolute/.test(q.get(n,"position"))&&(c-=q.get(n,"marginTop"),h-=q.get(n,"marginLeft"));n=b.style;n.top=c+"px";n.left=h+"px";n.right="auto";return f}var d={TL:"BR",TR:"BL",BL:"TR",BR:"TL"};return f.place={at:function(b,
c,a,e,f){a=r.map(a,function(a){var b={corner:a,aroundCorner:d[a],pos:{x:c.x,y:c.y}};e&&(b.pos.x+="L"==a.charAt(1)?e.x:-e.x,b.pos.y+="T"==a.charAt(0)?e.y:-e.y);return b});return h(b,a,f)},around:function(b,c,a,d,e){function g(a,b){D.push({aroundCorner:a,corner:b,pos:{x:{L:v,R:v+C,M:v+(C>>1)}[a.charAt(1)],y:{T:B,B:B+F,M:B+(F>>1)}[a.charAt(0)]}})}var f;if("string"==typeof c||"offsetWidth"in c||"ownerSVGElement"in c){if(f=l.position(c,!0),/^(above|below)/.test(a[0])){var k=l.getBorderExtents(c),t=c.firstChild?
l.getBorderExtents(c.firstChild):{t:0,l:0,b:0,r:0},A=l.getBorderExtents(b),y=b.firstChild?l.getBorderExtents(b.firstChild):{t:0,l:0,b:0,r:0};f.y+=Math.min(k.t+t.t,A.t+y.t);f.h-=Math.min(k.t+t.t,A.t+y.t)+Math.min(k.b+t.b,A.b+y.b)}}else f=c;if(c.parentNode)for(k="absolute"==q.getComputedStyle(c).position,c=c.parentNode;c&&1==c.nodeType&&"BODY"!=c.nodeName;){t=l.position(c,!0);A=q.getComputedStyle(c);/relative|absolute/.test(A.position)&&(k=!1);if(!k&&/hidden|auto|scroll/.test(A.overflow)){var y=Math.min(f.y+
f.h,t.y+t.h),w=Math.min(f.x+f.w,t.x+t.w);f.x=Math.max(f.x,t.x);f.y=Math.max(f.y,t.y);f.h=y-f.y;f.w=w-f.x}"absolute"==A.position&&(k=!0);c=c.parentNode}var v=f.x,B=f.y,C="w"in f?f.w:f.w=f.width,F="h"in f?f.h:(p.deprecated("place.around: dijit/place.__Rectangle: { x:"+v+", y:"+B+", height:"+f.height+", width:"+C+" } has been deprecated.  Please use { x:"+v+", y:"+B+", h:"+f.height+", w:"+C+" }","","2.0"),f.h=f.height),D=[];r.forEach(a,function(a){var b=d;switch(a){case "above-centered":g("TM","BM");
break;case "below-centered":g("BM","TM");break;case "after-centered":b=!b;case "before-centered":g(b?"ML":"MR",b?"MR":"ML");break;case "after":b=!b;case "before":g(b?"TL":"TR",b?"TR":"TL");g(b?"BL":"BR",b?"BR":"BL");break;case "below-alt":b=!b;case "below":g(b?"BL":"BR",b?"TL":"TR");g(b?"BR":"BL",b?"TR":"TL");break;case "above-alt":b=!b;case "above":g(b?"TL":"TR",b?"BL":"BR");g(b?"TR":"TL",b?"BR":"BL");break;default:g(a.aroundCorner,a.corner)}});b=h(b,D,e,{w:C,h:F});b.aroundNodePos=f;return b}}})},
"dijit/BackgroundIframe":function(){define("require ./main dojo/_base/config dojo/dom-construct dojo/dom-style dojo/_base/lang dojo/on dojo/sniff".split(" "),function(r,l,q,p,k,e,f,h){h.add("config-bgIframe",(h("ie")||h("trident"))&&!/IEMobile\/10\.0/.test(navigator.userAgent));var d=new function(){var b=[];this.pop=function(){var c;b.length?(c=b.pop(),c.style.display=""):(9>h("ie")?(c=q.dojoBlankHtmlUrl||r.toUrl("dojo/resources/blank.html")||'javascript:""',c=document.createElement("\x3ciframe src\x3d'"+
c+"' role\x3d'presentation' style\x3d'position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity\x3d\"0\");'\x3e")):(c=p.create("iframe"),c.src='javascript:""',c.className="dijitBackgroundIframe",c.setAttribute("role","presentation"),k.set(c,"opacity",.1)),c.tabIndex=-1);return c};this.push=function(c){c.style.display="none";b.push(c)}};l.BackgroundIframe=function(b){if(!b.id)throw Error("no id");if(h("config-bgIframe")){var c=this.iframe=d.pop();b.appendChild(c);7>h("ie")||h("quirks")?
(this.resize(b),this._conn=f(b,"resize",e.hitch(this,"resize",b))):k.set(c,{width:"100%",height:"100%"})}};e.extend(l.BackgroundIframe,{resize:function(b){this.iframe&&k.set(this.iframe,{width:b.offsetWidth+"px",height:b.offsetHeight+"px"})},destroy:function(){this._conn&&(this._conn.remove(),this._conn=null);this.iframe&&(this.iframe.parentNode.removeChild(this.iframe),d.push(this.iframe),delete this.iframe)}});return l.BackgroundIframe})},"dijit/_HasDropDown":function(){define("dojo/_base/declare dojo/_base/Deferred dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/has dojo/keys dojo/_base/lang dojo/on dojo/touch ./registry ./focus ./popup ./_FocusMixin".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u){return r("dijit._HasDropDown",u,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:!0,forceWidth:!1,maxHeight:-1,dropDownPosition:["below","above"],_stopClickEvents:!0,_onDropDownMouseDown:function(d){this.disabled||this.readOnly||("MSPointerDown"!=d.type&&d.preventDefault(),this.own(c.once(this.ownerDocument,a.release,b.hitch(this,"_onDropDownMouseUp"))),this.toggleDropDown())},_onDropDownMouseUp:function(a){var b=
this.dropDown,c=!1;if(a&&this._opened){var d=e.position(this._buttonNode,!0);if(!(a.pageX>=d.x&&a.pageX<=d.x+d.w&&a.pageY>=d.y&&a.pageY<=d.y+d.h)){for(d=a.target;d&&!c;)k.contains(d,"dijitPopup")?c=!0:d=d.parentNode;if(c){d=a.target;if(b.onItemClick){for(var f;d&&!(f=g.byNode(d));)d=d.parentNode;if(f&&f.onClick&&f.getParent)f.getParent().onItemClick(f,a)}return}}}this._opened?b.focus&&(!1!==b.autoFocus||"mouseup"==a.type&&!this.hovering)&&(this._focusDropDownTimer=this.defer(function(){b.focus();
delete this._focusDropDownTimer})):this.focus&&this.defer("focus")},_onDropDownClick:function(a){this._stopClickEvents&&(a.stopPropagation(),a.preventDefault())},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={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";k.add(this._arrowWrapperNode||this._buttonNode,"dijit"+a+"ArrowButton")},postCreate:function(){this.inherited(arguments);var d=this.focusNode||this.domNode;this.own(c(this._buttonNode,a.press,b.hitch(this,"_onDropDownMouseDown")),c(this._buttonNode,"click",b.hitch(this,"_onDropDownClick")),c(d,"keydown",b.hitch(this,"_onKey")),c(d,"keyup",b.hitch(this,"_onKeyUp")))},destroy:function(){this._opened&&this.closeDropDown(!0);this.dropDown&&(this.dropDown._destroyed||this.dropDown.destroyRecursive(),
delete this.dropDown);this.inherited(arguments)},_onKey:function(a){if(!this.disabled&&!this.readOnly){var b=this.dropDown,c=a.target;b&&this._opened&&b.handleKey&&!1===b.handleKey(a)?(a.stopPropagation(),a.preventDefault()):b&&this._opened&&a.keyCode==d.ESCAPE?(this.closeDropDown(),a.stopPropagation(),a.preventDefault()):!this._opened&&(a.keyCode==d.DOWN_ARROW||(a.keyCode==d.ENTER||a.keyCode==d.SPACE&&(!this._searchTimer||a.ctrlKey||a.altKey||a.metaKey))&&("input"!==(c.tagName||"").toLowerCase()||
c.type&&"text"!==c.type.toLowerCase()))&&(this._toggleOnKeyUp=!0,a.stopPropagation(),a.preventDefault())}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;this.toggleDropDown();var a=this.dropDown;a&&a.focus&&this.defer(b.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(!1);this.inherited(arguments)},isLoaded:function(){return!0},loadDropDown:function(a){a()},loadAndOpenDropDown:function(){var a=new l,c=b.hitch(this,function(){this.openDropDown();a.resolve(this.dropDown)});
this.isLoaded()?c():this.loadDropDown(c);return a},toggleDropDown:function(){this.disabled||this.readOnly||(this._opened?this.closeDropDown(!0):this.loadAndOpenDropDown())},openDropDown:function(){var a=this.dropDown,c=a.domNode,d=this._aroundNode||this.domNode,g=this,f=m.open({parent:this,popup:a,around:d,orient:this.dropDownPosition,maxHeight:this.maxHeight,onExecute:function(){g.closeDropDown(!0)},onCancel:function(){g.closeDropDown(!0)},onClose:function(){p.set(g._popupStateNode,"popupActive",
!1);k.remove(g._popupStateNode,"dijitHasDropDownOpen");g._set("_opened",!1)}});if(this.forceWidth||this.autoWidth&&d.offsetWidth>a._popupWrapper.offsetWidth){var d=d.offsetWidth-a._popupWrapper.offsetWidth,h={w:a.domNode.offsetWidth+d};this._origStyle=c.style.cssText;b.isFunction(a.resize)?a.resize(h):e.setMarginBox(c,h);"R"==f.corner[1]&&(a._popupWrapper.style.left=a._popupWrapper.style.left.replace("px","")-d+"px")}p.set(this._popupStateNode,"popupActive","true");k.add(this._popupStateNode,"dijitHasDropDownOpen");
this._set("_opened",!0);this._popupStateNode.setAttribute("aria-expanded","true");this._popupStateNode.setAttribute("aria-owns",a.id);"presentation"===c.getAttribute("role")||c.getAttribute("aria-labelledby")||c.setAttribute("aria-labelledby",this.id);return f},closeDropDown:function(a){this._focusDropDownTimer&&(this._focusDropDownTimer.remove(),delete this._focusDropDownTimer);this._opened&&(this._popupStateNode.setAttribute("aria-expanded","false"),a&&this.focus&&this.focus(),m.close(this.dropDown),
this._opened=!1);this._origStyle&&(this.dropDown.domNode.style.cssText=this._origStyle,delete this._origStyle)}})})},"dijit/_editor/plugins/TextColor":function(){define("require dojo/colors dojo/_base/declare dojo/_base/lang ../_Plugin ../../form/DropDownButton".split(" "),function(r,l,q,p,k,e){var f=q("dijit._editor.plugins.TextColor",k,{buttonClass:e,colorPicker:"dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command=this.name;this.inherited(arguments);var e=this;this.button.loadDropDown=
function(d){function b(b){e.button.dropDown=new b({dir:e.editor.dir,ownerDocument:e.editor.ownerDocument,value:e.value,onChange:function(a){e.editor.execCommand(e.command,a)},onExecute:function(){e.editor.execCommand(e.command,this.get("value"))}});d()}"string"==typeof e.colorPicker?r([e.colorPicker],b):b(e.colorPicker)}},updateState:function(){var e=this.editor,d=this.command;if(e&&e.isLoaded&&d.length){if(this.button){var b=this.get("disabled");this.button.set("disabled",b);if(b)return;var c;try{c=
e.queryCommandValue(d)||""}catch(a){c=""}}""==c&&(c="#000000");"transparent"==c&&(c="#ffffff");"string"==typeof c?-1<c.indexOf("rgb")&&(c=l.fromRgb(c).toHex()):(c=((c&255)<<16|c&65280|(c&16711680)>>>16).toString(16),c="#000000".slice(0,7-c.length)+c);this.value=c;(e=this.button.dropDown)&&e.get&&c!==e.get("value")&&e.set("value",c,!1)}}});k.registry.foreColor=function(e){return new f(e)};k.registry.hiliteColor=function(e){return new f(e)};return f})},"dojo/colors":function(){define(["./_base/kernel",
"./_base/lang","./_base/Color","./_base/array"],function(r,l,q,p){var k={};l.setObject("dojo.colors",k);var e=function(e,d,b){0>b&&++b;1<b&&--b;var c=6*b;return 1>c?e+(d-e)*c:1>2*b?d:2>3*b?e+(d-e)*(2/3-b)*6:e};r.colorFromRgb=q.fromRgb=function(f,d){var b=f.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(b){var c=b[2].split(/\s*,\s*/),a=c.length,b=b[1];if("rgb"==b&&3==a||"rgba"==b&&4==a)return b=c[0],"%"==b.charAt(b.length-1)?(b=p.map(c,function(a){return 2.56*parseFloat(a)}),4==a&&(b[3]=
c[3]),q.fromArray(b,d)):q.fromArray(c,d);if("hsl"==b&&3==a||"hsla"==b&&4==a){var b=(parseFloat(c[0])%360+360)%360/360,g=parseFloat(c[1])/100,h=parseFloat(c[2])/100,g=.5>=h?h*(g+1):h+g-h*g,h=2*h-g,b=[256*e(h,g,b+1/3),256*e(h,g,b),256*e(h,g,b-1/3),1];4==a&&(b[3]=c[3]);return q.fromArray(b,d)}}return null};var f=function(e,d,b){e=Number(e);return isNaN(e)?b:e<d?d:e>b?b:e};q.prototype.sanitize=function(){this.r=Math.round(f(this.r,0,255));this.g=Math.round(f(this.g,0,255));this.b=Math.round(f(this.b,
0,255));this.a=f(this.a,0,1);return this};k.makeGrey=q.makeGrey=function(e,d){return q.fromArray([e,e,e,d])};l.mixin(q.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 q})},"esri/dijit/editing/AttachmentEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/_base/array dojo/_base/kernel dojo/has dojo/query dojo/io-query dojo/dom-attr dijit/_Widget dijit/_Templated dijit/ProgressBar ../../kernel ../../lang ../../domUtils dojo/text!./templates/AttachmentEditor.html dojo/i18n!../../nls/jsapi dojo/NodeList-dom".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n){r=r([b,c],{declaredClass:"esri.dijit.editing.AttachmentEditor",widgetsInTemplate:!0,templateString:u,_listHtml:"\x3cspan id\x3d'node_${oid}_${attid}' style\x3d'display: flex;'\x3e\x3ca href\x3d'${href}' target\x3d'_blank'\x3e${name}\x3c/a\x3e",_deleteBtnHtml:"\x3cspan style\x3d'cursor:pointer;color:red;font-weight:bold;padding:0 2px;' class\x3d'deleteAttachment' id\x3d'${attid}');'\x3eX\x3c/span\x3e",_endHtml:"\x3cbr/\x3e\x3c/span\x3e",_aeConnects:[],_layerEditingCapChecked:{},
_layerEditingCap:{},constructor:function(a,b){l.mixin(this,n.widgets.attachmentEditor)},startup:function(){this.inherited(arguments);this._uploadField_connect=q.connect(this._uploadField,"onchange",this,function(){0<this._uploadField.value.length&&this._addAttachment()});this._uploadFieldFocus_connect=q.connect(this._uploadField,"onfocus",l.hitch(this,function(a){m.hide(this._attachmentError)}))},destroy:function(){p.forEach(this._aeConnects,q.disconnect);q.disconnect(this._uploadField_connect);q.disconnect(this._uploadFieldFocus_connect);
this.inherited(arguments)},showAttachments:function(a,b){this._attachmentList.innerHTML=this.NLS_none;this._uploadField.value="";p.forEach(this.domNode.children,function(a,b){m.show(a)});m.hide(this._attachmentError);a&&(this._featureLayer=a.getLayer()||b)&&("esri.layers.FeatureLayer"===this._featureLayer.declaredClass&&this._featureLayer.getEditCapabilities?(this._currentLayerId=this._featureLayer.id,this._layerEditingCapChecked[this._currentLayerId]||(this._layerEditingCap[this._currentLayerId]=
this._featureLayer.getEditCapabilities(),this._layerEditingCapChecked[this._currentLayerId]=!0),this._featureCanUpdate=this._featureLayer.getEditCapabilities({feature:a}).canUpdate,this._oid=a.attributes[this._featureLayer.objectIdField],this._getAttachments(a)):b&&b.getEditCapabilities()||(m.hide(this._uploadForm),p.forEach(this.domNode.children,function(a,b){m.hide(a)})))},_getAttachments:function(a){this._featureLayer&&this._featureLayer.queryAttachmentInfos&&this._featureLayer.queryAttachmentInfos(this._oid,
l.hitch(this,"_onQueryAttachmentInfosComplete"))},_addAttachment:function(){m.hide(this._attachmentError);this._featureLayer&&this._featureLayer.addAttachment?(m.show(this._attachmentProgress),this._featureLayer.addAttachment(this._oid,this._uploadForm,l.hitch(this,"_onAddAttachmentComplete"),l.hitch(this,"_onAddAttachmentError"))):this._tempUpload=this._uploadForm},_chainAttachment:function(a,b){this._tempUpload&&(m.show(this._attachmentProgress),b.addAttachment(a,this._tempUpload,l.hitch(this,"_onAddAttachmentComplete"),
l.hitch(this,"_onAddAttachmentError")));this._tempUpload=null},_deleteAttachment:function(a,b){m.show(this._attachmentProgress);this._featureLayer.deleteAttachments(a,[b],l.hitch(this,"_onDeleteAttachmentComplete"))},_onQueryAttachmentInfosComplete:function(a){var b=this._listHtml+this._deleteBtnHtml+this._endHtml;this._uploadForm.style.display="block";!this._featureCanUpdate&&this._layerEditingCap[this._currentLayerId].canUpdate||!this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate?
(b=this._listHtml+this._endHtml,this._uploadForm.style.display="none"):this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate&&(b=this._listHtml+this._endHtml);var c=this._attachmentList;a=p.map(a,l.hitch(this,function(a){return w.substitute({href:a.url,name:a.name,oid:a.objectId,attid:a.id},b)}));c.innerHTML=a.join("")||this.NLS_none;this._updateConnects()},_onAddAttachmentComplete:function(a){m.hide(this._attachmentProgress.domNode);var b=this._attachmentList,
c=this._uploadField,d=c.value,e=d.lastIndexOf("\\");-1<e&&(d=d.substring(e+1,d.length));var d=d.replace(/\ /g,"_"),e=h.objectToQuery({gdbVersion:this._featureLayer.gdbVersion,token:this._featureLayer._getToken()}),g=this._listHtml+this._deleteBtnHtml+this._endHtml;this._layerEditingCap[this._currentLayerId].canCreate&&!this._layerEditingCap[this._currentLayerId].canUpdate&&(g=this._listHtml+this._endHtml);a=w.substitute({href:this._featureLayer._url.path+"/"+a.objectId+"/attachments/"+a.attachmentId+
(e?"?"+e:""),name:d,oid:a.objectId,attid:a.attachmentId},g);b.innerHTML=b.innerHTML==this.NLS_none?a:b.innerHTML+a;this._updateConnects();c.value=""},_onAddAttachmentError:function(a){m.hide(this._attachmentProgress.domNode);if(a&&w.isDefined(a.code)){var b=this._attachmentError;d.set(b,"innerHTML",(400===a.code?this.NLS_fileNotSupported:a.message||a.details&&a.details.length&&a.details[0])||this.NLS_error);m.show(b)}},_onDeleteAttachmentComplete:function(a){m.hide(this._attachmentProgress.domNode);
var b=this._attachmentList;p.every(a,function(a){return a.success})&&(k.query("#node_"+a[0].objectId+"_"+a[0].attachmentId).orphan(),b.children&&b.children.length||(b.innerHTML=this.NLS_none))},_updateConnects:function(){p.forEach(this._aeConnects,q.disconnect);k.query(".deleteAttachment").forEach(function(a){this._aeConnects.push(q.connect(a,"onclick",l.hitch(this,"_deleteAttachment",this._oid,a.id)))},this)}});e("extend-esri")&&l.setObject("dijit.editing.AttachmentEditor",r,g);return r})},"dijit/ProgressBar":function(){define("require dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/number ./_Widget ./_TemplatedMixin dojo/text!./templates/ProgressBar.html".split(" "),
function(r,l,q,p,k,e,f,h){return l("dijit.ProgressBar",[e,f],{progress:"0",value:"",maximum:100,places:0,indeterminate:!1,label:"",name:"",templateString:h,_indeterminateHighContrastImagePath:r.toUrl("./themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);this.params&&"value"in this.params||(this.value=this.indeterminate?Infinity:this.progress)},buildRendering:function(){this.inherited(arguments);this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());
this.update()},_setDirAttr:function(d){var b="rtl"==d.toLowerCase();q.toggle(this.domNode,"dijitProgressBarRtl",b);q.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&b);this.inherited(arguments)},update:function(d){p.mixin(this,d||{});d=this.internalProgress;var b=this.domNode,c=1;this.indeterminate?b.removeAttribute("aria-valuenow"):(-1!=String(this.progress).indexOf("%")?(c=Math.min(parseFloat(this.progress)/100,1),this.progress=c*this.maximum):(this.progress=Math.min(this.progress,
this.maximum),c=this.maximum?this.progress/this.maximum:0),b.setAttribute("aria-valuenow",this.progress));b.setAttribute("aria-labelledby",this.labelNode.id);b.setAttribute("aria-valuemin",0);b.setAttribute("aria-valuemax",this.maximum);this.labelNode.innerHTML=this.report(c);q.toggle(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);q.toggle(this.domNode,"dijitProgressBarIndeterminateRtl",this.indeterminate&&!this.isLeftToRight());d.style.width=100*c+"%";this.onChange()},_setValueAttr:function(d){this._set("value",
d);Infinity==d?this.update({indeterminate:!0}):this.update({indeterminate:!1,progress:d})},_setLabelAttr:function(d){this._set("label",d);this.update()},_setIndeterminateAttr:function(d){this._set("indeterminate",d);this.update()},report:function(d){return this.label?this.label:this.indeterminate?"\x26#160;":k.format(d,{type:"percent",places:this.places,locale:this.lang})},onChange:function(){}})})},"esri/dijit/editing/Util":function(){define(["dojo/_base/lang","dojo/_base/array","dojo/has","../../kernel"],
function(r,l,q,p){var k={},k={findFeatures:function(e,f,h){var d=f.objectIdField;f=l.filter(f.graphics,function(b){return l.some(e,function(c){return b.attributes[d]===c.objectId})});if(h)h(f);else return f},getSelection:function(e){var f=[];l.forEach(e,function(e){e=e.getSelectedFeatures();l.forEach(e,function(d){f.push(d)})});return f},sortFeaturesById:function(e,f){var h=l.map(e,function(d){return d.featureLayer});f.sort(function(d,b){var c=d.getLayer(),a=b.getLayer();if(!c)return-1;if(!a)return 1;
var e=l.indexOf(h,c),a=l.indexOf(h,a),e=e-a;e||(c=c.objectIdField,e=d.attributes[c]-b.attributes[c]);return e});return f}};q("extend-esri")&&r.setObject("dijit.editing.Util.LayerHelper",k,p);return k})},"dijit/form/DateTextBox":function(){define(["dojo/_base/declare","../Calendar","./_DateTimeTextBox"],function(r,l,q){return r("dijit.form.DateTextBox",q,{baseClass:"dijitTextBox dijitComboBox dijitDateTextBox",popupClass:l,_selector:"date",maxHeight:Infinity,value:new Date("")})})},"dijit/Calendar":function(){define("dojo/_base/array dojo/date dojo/date/locale dojo/_base/declare dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/sniff ./CalendarLite ./_Widget ./_CssStateMixin ./_TemplatedMixin ./form/DropDownButton".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n){var t=p("dijit.Calendar",[g,w,m],{baseClass:"dijitCalendar",cssStateNodes:{decrementMonth:"dijitCalendarArrow",incrementMonth:"dijitCalendarArrow",previousYearLabelNode:"dijitCalendarPreviousYear",nextYearLabelNode:"dijitCalendarNextYear"},setValue:function(a){h.deprecated("dijit.Calendar:setValue() is deprecated.  Use set('value', ...) instead.","","2.0");this.set("value",a)},_createMonthWidget:function(){return new t._MonthDropDownButton({id:this.id+"_mddb",
tabIndex:-1,onMonthSelect:b.hitch(this,"_onMonthSelect"),lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode)},postCreate:function(){this.inherited(arguments);this.own(c(this.domNode,"keydown",b.hitch(this,"_onKeyDown")),c(this.dateRowsNode,"mouseover",b.hitch(this,"_onDayMouseOver")),c(this.dateRowsNode,"mouseout",b.hitch(this,"_onDayMouseOut")),c(this.dateRowsNode,"mousedown",b.hitch(this,"_onDayMouseDown")),c(this.dateRowsNode,"mouseup",b.hitch(this,"_onDayMouseUp")))},_onMonthSelect:function(a){var b=
new this.dateClassObj(this.currentFocus);b.setDate(1);b.setMonth(a);a=this.dateModule.getDaysInMonth(b);var c=this.currentFocus.getDate();b.setDate(Math.min(c,a));this._setCurrentFocusAttr(b)},_onDayMouseOver:function(a){(a=e.contains(a.target,"dijitCalendarDateLabel")?a.target.parentNode:a.target)&&(a.dijitDateValue&&!e.contains(a,"dijitCalendarDisabledDate")||a==this.previousYearLabelNode||a==this.nextYearLabelNode)&&(e.add(a,"dijitCalendarHoveredDate"),this._currentNode=a)},_onDayMouseOut:function(a){!this._currentNode||
a.relatedTarget&&a.relatedTarget.parentNode==this._currentNode||(a="dijitCalendarHoveredDate",e.contains(this._currentNode,"dijitCalendarActiveDate")&&(a+=" dijitCalendarActiveDate"),e.remove(this._currentNode,a),this._currentNode=null)},_onDayMouseDown:function(a){(a=a.target.parentNode)&&a.dijitDateValue&&!e.contains(a,"dijitCalendarDisabledDate")&&(e.add(a,"dijitCalendarActiveDate"),this._currentNode=a)},_onDayMouseUp:function(a){(a=a.target.parentNode)&&a.dijitDateValue&&e.remove(a,"dijitCalendarActiveDate")},
handleKey:function(a){var b=-1,c,e=this.currentFocus;switch(a.keyCode){case d.RIGHT_ARROW:b=1;case d.LEFT_ARROW:c="day";this.isLeftToRight()||(b*=-1);break;case d.DOWN_ARROW:b=1;case d.UP_ARROW:c="week";break;case d.PAGE_DOWN:b=1;case d.PAGE_UP:c=a.ctrlKey||a.altKey?"year":"month";break;case d.END:e=this.dateModule.add(e,"month",1),c="day";case d.HOME:e=new this.dateClassObj(e);e.setDate(1);break;default:return!0}c&&(e=this.dateModule.add(e,c,b));this._setCurrentFocusAttr(e);return!1},_onKeyDown:function(a){this.handleKey(a)||
(a.stopPropagation(),a.preventDefault())},onValueSelected:function(){},onChange:function(a){this.onValueSelected(a)},getClassForDate:function(){}});t._MonthDropDownButton=p("dijit.Calendar._MonthDropDownButton",n,{onMonthSelect:function(){},postCreate:function(){this.inherited(arguments);this.dropDown=new t._MonthDropDown({id:this.id+"_mdd",onChange:this.onMonthSelect})},_setMonthAttr:function(b){var c=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,b);this.dropDown.set("months",
c);this.containerNode.innerHTML=(6==a("ie")?"":"\x3cdiv class\x3d'dijitSpacer'\x3e"+this.dropDown.domNode.innerHTML+"\x3c/div\x3e")+"\x3cdiv class\x3d'dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'\x3e"+c[b.getMonth()]+"\x3c/div\x3e"}});t._MonthDropDown=p("dijit.Calendar._MonthDropDown",[w,u,m],{months:[],baseClass:"dijitCalendarMonthMenu dijitMenu",templateString:"\x3cdiv data-dojo-attach-event\x3d'ondijitclick:_onClick'\x3e\x3c/div\x3e",_setMonthsAttr:function(a){this.domNode.innerHTML=
"";r.forEach(a,function(a,b){f.create("div",{className:"dijitCalendarMonthLabel",month:b,innerHTML:a},this.domNode)._cssState="dijitCalendarMonthLabel"},this)},_onClick:function(a){this.onChange(k.get(a.target,"month"))},onChange:function(){}});return t})},"dijit/CalendarLite":function(){define("dojo/_base/array dojo/_base/declare dojo/cldr/supplemental dojo/date dojo/date/locale dojo/date/stamp dojo/dom dojo/dom-class dojo/dom-attr dojo/_base/lang dojo/on dojo/sniff dojo/string ./_WidgetBase ./_TemplatedMixin dojo/text!./templates/Calendar.html ./a11yclick ./hccss".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u){var n=l("dijit.CalendarLite",[w,m],{templateString:u,dowTemplateString:'\x3cth class\x3d"dijitReset dijitCalendarDayLabelTemplate" role\x3d"columnheader" scope\x3d"col"\x3e\x3cspan class\x3d"dijitCalendarDayLabel"\x3e${d}\x3c/span\x3e\x3c/th\x3e',dateTemplateString:'\x3ctd class\x3d"dijitReset" role\x3d"gridcell" data-dojo-attach-point\x3d"dateCells"\x3e\x3cspan class\x3d"dijitCalendarDateLabel" data-dojo-attach-point\x3d"dateLabels"\x3e\x3c/span\x3e\x3c/td\x3e',
weekTemplateString:'\x3ctr class\x3d"dijitReset dijitCalendarWeekTemplate" role\x3d"row"\x3e${d}${d}${d}${d}${d}${d}${d}\x3c/tr\x3e',value:new Date(""),datePackage:"",dayWidth:"narrow",tabIndex:"0",dayOffset:-1,currentFocus:new Date,_setSummaryAttr:"gridNode",baseClass:"dijitCalendar dijitCalendarLite",_isValidDate:function(a){return a&&!isNaN(a)&&"object"==typeof a&&a.toString()!=this.constructor.prototype.value.toString()},_getValueAttr:function(){var a=this._get("value");if(a&&!isNaN(a)){var b=
new this.dateClassObj(a);b.setHours(0,0,0,0);b.getDate()<a.getDate()&&(b=this.dateModule.add(b,"hour",1));return b}return null},_setValueAttr:function(a,b){"string"==typeof a&&(a=e.fromISOString(a));a=this._patchDate(a);if(this._isValidDate(a)&&!this.isDisabledDate(a,this.lang)){if(this._set("value",a),this.set("currentFocus",a),this._markSelectedDates([a]),this._created&&(b||"undefined"==typeof b))this.onChange(this.get("value"))}else this._set("value",null),this._markSelectedDates([])},_patchDate:function(a){if(a||
0===a)a=new this.dateClassObj(a),a.setHours(1,0,0,0);return a},_setText:function(a,b){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(a.ownerDocument.createTextNode(b))},_populateGrid:function(){var a=new this.dateClassObj(this.currentFocus);a.setDate(1);var a=this._patchDate(a),b=a.getDay(),c=this.dateModule.getDaysInMonth(a),e=this.dateModule.getDaysInMonth(this.dateModule.add(a,"month",-1)),g=new this.dateClassObj,f=0<=this.dayOffset?this.dayOffset:q.getFirstDayOfWeek(this.lang);f>
b&&(f-=7);if(!this.summary){var h=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,a);this.gridNode.setAttribute("summary",h[a.getMonth()])}this._date2cell={};r.forEach(this.dateCells,function(h,m){var n=m+f,l=new this.dateClassObj(a),p="dijitCalendar",q=0;n<b?(n=e-b+n+1,q=-1,p+="Previous"):n>=b+c?(n=n-b-c+1,q=1,p+="Next"):(n=n-b+1,p+="Current");q&&(l=this.dateModule.add(l,"month",q));l.setDate(n);this.dateModule.compare(l,g,"date")||(p="dijitCalendarCurrentDate "+p);this.isDisabledDate(l,
this.lang)?(p="dijitCalendarDisabledDate "+p,h.setAttribute("aria-disabled","true")):(p="dijitCalendarEnabledDate "+p,h.removeAttribute("aria-disabled"),h.setAttribute("aria-selected","false"));(q=this.getClassForDate(l,this.lang))&&(p=q+" "+p);h.className=p+"Month dijitCalendarDateTemplate";p=l.valueOf();this._date2cell[p]=h;h.dijitDateValue=p;p=l.getDateLocalized?l.getDateLocalized(this.lang):l.getDate();this._setText(this.dateLabels[m],p);d.set(h,"aria-label",k.format(l,{selector:"date",formatLength:"long"}))},
this)},_populateControls:function(){var a=new this.dateClassObj(this.currentFocus);a.setDate(1);this.monthWidget.set("month",a);var b=a.getFullYear()-1,c=new this.dateClassObj;r.forEach(["previous","current","next"],function(a){c.setFullYear(b++);this._setText(this[a+"YearLabelNode"],this.dateLocaleModule.format(c,{selector:"year",locale:this.lang}))},this)},goToToday:function(){this.set("value",new this.dateClassObj)},constructor:function(a){this.dateModule=a.datePackage?b.getObject(a.datePackage,
!1):p;this.dateClassObj=this.dateModule.Date||Date;this.dateLocaleModule=a.datePackage?b.getObject(a.datePackage+".locale",!1):k},_createMonthWidget:function(){return n._MonthWidget({id:this.id+"_mddb",lang:this.lang,dateLocaleModule:this.dateLocaleModule},this.monthNode)},buildRendering:function(){var a=this.dowTemplateString,b=this.dateLocaleModule.getNames("days",this.dayWidth,"standAlone",this.lang),c=0<=this.dayOffset?this.dayOffset:q.getFirstDayOfWeek(this.lang);this.dayCellsHtml=g.substitute([a,
a,a,a,a,a,a].join(""),{d:""},function(){return b[c++%7]});a=g.substitute(this.weekTemplateString,{d:this.dateTemplateString});this.dateRowsHtml=[a,a,a,a,a,a].join("");this.dateCells=[];this.dateLabels=[];this.inherited(arguments);f.setSelectable(this.domNode,!1);a=new this.dateClassObj(this.currentFocus);this.monthWidget=this._createMonthWidget();this.set("currentFocus",a,!1)},postCreate:function(){this.inherited(arguments);this._connectControls()},_connectControls:function(){var a=b.hitch(this,function(a,
d,e){this[a].dojoClick=!0;return c(this[a],"click",b.hitch(this,function(){this._setCurrentFocusAttr(this.dateModule.add(this.currentFocus,d,e))}))});this.own(a("incrementMonth","month",1),a("decrementMonth","month",-1),a("nextYearLabelNode","year",1),a("previousYearLabelNode","year",-1))},_setCurrentFocusAttr:function(b,c){var d=this.currentFocus,e=this._getNodeByDate(d);b=this._patchDate(b);this._set("currentFocus",b);this._date2cell&&0==this.dateModule.difference(d,b,"month")||(this._populateGrid(),
this._populateControls(),this._markSelectedDates([this.value]));d=this._getNodeByDate(b);d.setAttribute("tabIndex",this.tabIndex);(this.focused||c)&&d.focus();e&&e!=d&&(a("webkit")?e.setAttribute("tabIndex","-1"):e.removeAttribute("tabIndex"))},focus:function(){this._setCurrentFocusAttr(this.currentFocus,!0)},_onDayClick:function(a){a.stopPropagation();a.preventDefault();for(a=a.target;a&&!a.dijitDateValue&&0!==a.dijitDateValue;a=a.parentNode);a&&!h.contains(a,"dijitCalendarDisabledDate")&&this.set("value",
a.dijitDateValue)},_getNodeByDate:function(a){return(a=this._patchDate(a))&&this._date2cell?this._date2cell[a.valueOf()]:null},_markSelectedDates:function(a){function c(a,b){h.toggle(b,"dijitCalendarSelectedDate",a);b.setAttribute("aria-selected",a?"true":"false")}r.forEach(this._selectedCells||[],b.partial(c,!1));this._selectedCells=r.filter(r.map(a,this._getNodeByDate,this),function(a){return a});r.forEach(this._selectedCells,b.partial(c,!0))},onChange:function(){},isDisabledDate:function(){},getClassForDate:function(){}});
n._MonthWidget=l("dijit.CalendarLite._MonthWidget",w,{_setMonthAttr:function(b){var c=this.dateLocaleModule.getNames("months","wide","standAlone",this.lang,b),d=6==a("ie")?"":"\x3cdiv class\x3d'dijitSpacer'\x3e"+r.map(c,function(a){return"\x3cdiv\x3e"+a+"\x3c/div\x3e"}).join("")+"\x3c/div\x3e";this.domNode.innerHTML=d+"\x3cdiv class\x3d'dijitCalendarMonthLabel dijitCalendarCurrentMonthLabel'\x3e"+c[b.getMonth()]+"\x3c/div\x3e"}});return n})},"dijit/form/_DateTimeTextBox":function(){define("dojo/date dojo/date/locale dojo/date/stamp dojo/_base/declare dojo/_base/lang ./RangeBoundTextBox ../_HasDropDown dojo/text!./templates/DropDownBox.html".split(" "),
function(r,l,q,p,k,e,f,h){new Date("X");return p("dijit.form._DateTimeTextBox",[e,f],{templateString:h,hasDownArrow:!0,cssStateNodes:{_buttonNode:"dijitDownArrowButton"},_unboundedConstraints:{},pattern:l.regexp,datePackage:"",postMixInProperties:function(){this.inherited(arguments);this._set("type","text")},compare:function(d,b){var c=this._isInvalidDate(d),a=this._isInvalidDate(b);if(c||a)return c&&a?0:c?-1:1;var c=this.format(d,this._unboundedConstraints),a=this.format(b,this._unboundedConstraints),
e=this.parse(c,this._unboundedConstraints),f=this.parse(a,this._unboundedConstraints);return c==a?0:r.compare(e,f,this._selector)},autoWidth:!0,format:function(d,b){return d?this.dateLocaleModule.format(d,b):""},parse:function(d,b){return this.dateLocaleModule.parse(d,b)||(this._isEmpty(d)?null:void 0)},serialize:function(d,b){d.toGregorian&&(d=d.toGregorian());return q.toISOString(d,b)},dropDownDefaultValue:new Date,value:new Date(""),_blankValue:null,popupClass:"",_selector:"",constructor:function(d){d=
d||{};this.dateModule=d.datePackage?k.getObject(d.datePackage,!1):r;this.dateClassObj=this.dateModule.Date||Date;this.dateClassObj instanceof Date||(this.value=new this.dateClassObj(this.value));this.dateLocaleModule=d.datePackage?k.getObject(d.datePackage+".locale",!1):l;this._set("pattern",this.dateLocaleModule.regexp);this._invalidDate=this.constructor.prototype.value.toString()},buildRendering:function(){this.inherited(arguments);this.hasDownArrow||(this._buttonNode.style.display="none");this.hasDownArrow||
(this._buttonNode=this.domNode,this.baseClass+=" dijitComboBoxOpenOnClick")},_setConstraintsAttr:function(d){d.selector=this._selector;d.fullYear=!0;var b=q.fromISOString;"string"==typeof d.min&&(d.min=b(d.min),this.dateClassObj instanceof Date||(d.min=new this.dateClassObj(d.min)));"string"==typeof d.max&&(d.max=b(d.max),this.dateClassObj instanceof Date||(d.max=new this.dateClassObj(d.max)));this.inherited(arguments);this._unboundedConstraints=k.mixin({},this.constraints,{min:null,max:null})},_isInvalidDate:function(d){return!d||
isNaN(d)||"object"!=typeof d||d.toString()==this._invalidDate},_setValueAttr:function(d,b,c){void 0!==d&&("string"==typeof d&&(d=q.fromISOString(d)),this._isInvalidDate(d)&&(d=null),d instanceof Date&&!(this.dateClassObj instanceof Date)&&(d=new this.dateClassObj(d)));this.inherited(arguments,[d,b,c]);this.value instanceof Date&&(this.filterString="");!1!==b&&this.dropDown&&this.dropDown.set("value",d,!1)},_set:function(d,b){if("value"==d){b instanceof Date&&!(this.dateClassObj instanceof Date)&&
(b=new this.dateClassObj(b));var c=this._get("value");if(c instanceof this.dateClassObj&&0==this.compare(b,c))return}this.inherited(arguments)},_setDropDownDefaultValueAttr:function(d){this._isInvalidDate(d)&&(d=new this.dateClassObj);this._set("dropDownDefaultValue",d)},openDropDown:function(d){this.dropDown&&this.dropDown.destroy();var b=k.isString(this.popupClass)?k.getObject(this.popupClass,!1):this.popupClass,c=this,a=this.get("value");this.dropDown=new b({onChange:function(a){c.set("value",
a,!0)},id:this.id+"_popup",dir:c.dir,lang:c.lang,value:a,textDir:c.textDir,currentFocus:this._isInvalidDate(a)?this.dropDownDefaultValue:a,constraints:c.constraints,filterString:c.filterString,datePackage:c.datePackage,isDisabledDate:function(a){return!c.rangeCheck(a,c.constraints)}});this.inherited(arguments)},_getDisplayedValueAttr:function(){return this.textbox.value},_setDisplayedValueAttr:function(d,b){this._setValueAttr(this.parse(d,this.constraints),b,d)}})})},"dijit/form/RangeBoundTextBox":function(){define(["dojo/_base/declare",
"dojo/i18n","./MappedTextBox","dojo/i18n!./nls/validate"],function(r,l,q){return r("dijit.form.RangeBoundTextBox",q,{rangeMessage:"",rangeCheck:function(l,k){return("min"in k?0<=this.compare(l,k.min):!0)&&("max"in k?0>=this.compare(l,k.max):!0)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var l=this.get("value");if(null==l)return!1;var k=!1;"min"in this.constraints&&(k=this.constraints.min,k=0>this.compare(l,"number"==typeof k&&
0<=k&&0!=l?0:k));!k&&"max"in this.constraints&&(k=this.constraints.max,k=0<this.compare(l,"number"!=typeof k||0<k?k:0));return k},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(l){return this.inherited(arguments)&&(this._isEmpty(this.textbox.value)&&!this.required||this.isInRange(l))},getErrorMessage:function(l){var k=this.get("value");return null==k||""===k||"number"==typeof k&&isNaN(k)||this.isInRange(l)?this.inherited(arguments):this.rangeMessage},
postMixInProperties:function(){this.inherited(arguments);this.rangeMessage||(this.messages=l.getLocalization("dijit.form","validate",this.lang),this.rangeMessage=this.messages.rangeMessage)}})})},"dijit/form/MappedTextBox":function(){define(["dojo/_base/declare","dojo/sniff","dojo/dom-construct","./ValidationTextBox"],function(r,l,q,p){return r("dijit.form.MappedTextBox",p,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},_setNameAttr:"valueNode",serialize:function(k){return k.toString?
k.toString():""},toString:function(){var k=this.filter(this.get("value"));return null!=k?"string"==typeof k?k:this.serialize(k,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);this.valueNode=q.place("\x3cinput type\x3d'hidden'"+(this.name&&!l("msapp")?' name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"")+"/\x3e",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}})})},
"dijit/form/ValidationTextBox":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/i18n ./TextBox ../Tooltip dojo/text!./templates/ValidationTextBox.html dojo/i18n!./nls/validate".split(" "),function(r,l,q,p,k,e,f){var h=r("dijit.form.ValidationTextBox",k,{templateString:f,required:!1,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",regExpGen:function(){},state:"",tooltipPosition:[],_deprecateRegExp:function(d,
b){b!=h.prototype[d]&&(l.deprecated("ValidationTextBox id\x3d"+this.id+", set('"+d+"', ...) is deprecated.  Use set('pattern', ...) instead.","","2.0"),this.set("pattern",b))},_setRegExpGenAttr:function(d){this._deprecateRegExp("regExpGen",d);this._set("regExpGen",this._computeRegexp)},_setRegExpAttr:function(d){this._deprecateRegExp("regExp",d)},_setValueAttr:function(){this.inherited(arguments);this._refreshState()},validator:function(d,b){return(new RegExp("^(?:"+this._computeRegexp(b)+")"+(this.required?
"":"?")+"$")).test(d)&&(!this.required||!this._isEmpty(d))&&(this._isEmpty(d)||void 0!==this.parse(d,b))},_isValidSubset:function(){return 0==this.textbox.value.search(this._partialre)},isValid:function(){return this.validator(this.textbox.value,this.get("constraints"))},_isEmpty:function(d){return(this.trim?/^\s*$/:/^$/).test(d)},getErrorMessage:function(){var d="$_unset_$"==this.invalidMessage?this.messages.invalidMessage:this.invalidMessage?this.invalidMessage:this.promptMessage,b="$_unset_$"==
this.missingMessage?this.messages.missingMessage:this.missingMessage?this.missingMessage:d;return this.required&&this._isEmpty(this.textbox.value)?b:d},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(d){var b="",c=this.disabled||this.isValid(d);c&&(this._maskValidSubsetError=!0);var a=this._isEmpty(this.textbox.value),e=!c&&d&&this._isValidSubset();this._set("state",c?"":((!this._hasBeenBlurred||d)&&a||e)&&(this._maskValidSubsetError||e&&!this._hasBeenBlurred&&
d)?"Incomplete":"Error");this.focusNode.setAttribute("aria-invalid","Error"==this.state?"true":"false");"Error"==this.state?(this._maskValidSubsetError=d&&e,b=this.getErrorMessage(d)):"Incomplete"==this.state?(b=this.getPromptMessage(d),this._maskValidSubsetError=!this._hasBeenBlurred||d):a&&(b=this.getPromptMessage(d));this.set("message",b);return c},displayMessage:function(d){d&&this.focused?e.show(d,this.domNode,this.tooltipPosition,!this.isLeftToRight()):e.hide(this.domNode)},_refreshState:function(){this._created&&
this.validate(this.focused);this.inherited(arguments)},constructor:function(d){this.constraints=q.clone(this.constraints);this.baseClass+=" dijitValidationTextBox"},startup:function(){this.inherited(arguments);this._refreshState()},_setConstraintsAttr:function(d){!d.locale&&this.lang&&(d.locale=this.lang);this._set("constraints",d);this._refreshState()},_setPatternAttr:function(d){this._set("pattern",d);this._refreshState()},_computeRegexp:function(d){var b=this.pattern;"function"==typeof b&&(b=b.call(this,
d));if(b!=this._lastRegExp){var c="";this._lastRegExp=b;".*"!=b&&b.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(a){switch(a.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":c+=a;break;case ")":c+="|$)";break;default:c+="(?:"+a+"|$)"}});try{"".search(c)}catch(a){c=this.pattern,console.warn("RegExp error in "+this.declaredClass+": "+this.pattern)}this._partialre="^(?:"+c+")$"}return b},postMixInProperties:function(){this.inherited(arguments);this.messages=
p.getLocalization("dijit.form","validate",this.lang);this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(d){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(d){this._set("required",d);this.focusNode.setAttribute("aria-required",d);this._refreshState()},_setMessageAttr:function(d){this._set("message",d);this.displayMessage(d)},reset:function(){this._maskValidSubsetError=!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)},
destroy:function(){e.hide(this.domNode);this.inherited(arguments)}});return h})},"dijit/form/TextBox":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dojo/_base/kernel dojo/_base/lang dojo/on dojo/sniff ./_FormValueWidget ./_TextBoxMixin dojo/text!./templates/TextBox.html ../main".split(" "),function(r,l,q,p,k,e,f,h,d,b,c){h=r("dijit.form.TextBox"+(f("dojo-bidi")?"_NoBidi":""),[h,d],{templateString:b,_singleNodeTemplate:'\x3cinput class\x3d"dijit dijitReset dijitLeft dijitInputField" data-dojo-attach-point\x3d"textbox,focusNode" autocomplete\x3d"off" type\x3d"${type}" ${!nameAttrSetting} /\x3e',
_buttonInputDisabled:f("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&"input"==this.templateString.toLowerCase()||("hidden"==a||"file"==a)&&this.templateString==this.constructor.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);9>f("ie")&&this.defer(function(){try{var a=q.getComputedStyle(this.domNode);if(a){var b=a.fontFamily;
if(b){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(a=0;a<c.length;a++)c[a].style.fontFamily=b}}}catch(m){}})},_setPlaceHolderAttr:function(a){this._set("placeHolder",a);this._phspan||(this._attachPoints.push("_phspan"),this._phspan=l.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after"),this.own(e(this._phspan,"mousedown",function(a){a.preventDefault()}),e(this._phspan,"touchend, pointerup, MSPointerUp",k.hitch(this,function(){this.focus()}))));this._phspan.innerHTML=
"";this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(a));this._updatePlaceHolder()},_onInput:function(a){this.inherited(arguments);this._updatePlaceHolder()},_updatePlaceHolder:function(){this._phspan&&(this._phspan.style.display=this.placeHolder&&!this.textbox.value?"":"none")},_setValueAttr:function(a,b,c){this.inherited(arguments);this._updatePlaceHolder()},getDisplayedValue:function(){p.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use get('displayedValue') instead.",
"","2.0");return this.get("displayedValue")},setDisplayedValue:function(a){p.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_onBlur:function(a){this.disabled||(this.inherited(arguments),this._updatePlaceHolder(),f("mozilla")&&this.selectOnClick&&(this.textbox.selectionStart=this.textbox.selectionEnd=void 0))},_onFocus:function(a){this.disabled||this.readOnly||(this.inherited(arguments),this._updatePlaceHolder())}});
9>f("ie")&&(h.prototype._isTextSelected=function(){var a=this.ownerDocument.selection.createRange();return a.parentElement()==this.textbox&&0<a.text.length},c._setSelectionRange=d._setSelectionRange=function(a,b,c){a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",b),a.moveEnd("character",c-b),a.select())});f("dojo-bidi")&&(h=r("dijit.form.TextBox",h,{_setPlaceHolderAttr:function(a){this.inherited(arguments);this.applyTextDir(this._phspan)}}));
return h})},"dijit/form/_FormValueWidget":function(){define(["dojo/_base/declare","dojo/sniff","./_FormWidget","./_FormValueMixin"],function(r,l,q,p){return r("dijit.form._FormValueWidget",[q,p],{_layoutHackIE7:function(){if(7==l("ie"))for(var k=this.domNode,e=k.parentNode,f=k.firstChild||k,h=f.style.filter,d=this;e&&0==e.clientHeight;)(function(){var b=d.connect(e,"onscroll",function(){d.disconnect(b);f.style.filter=(new Date).getMilliseconds();d.defer(function(){f.style.filter=h})})})(),e=e.parentNode}})})},
"dijit/form/_FormValueMixin":function(){define("dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/on ./_FormWidgetMixin".split(" "),function(r,l,q,p,k,e){return r("dijit.form._FormValueMixin",e,{readOnly:!1,_setReadOnlyAttr:function(e){l.set(this.focusNode,"readOnly",e);this._set("readOnly",e)},postCreate:function(){this.inherited(arguments);void 0===this._resetValue&&(this._lastValueReported=this._resetValue=this.value)},_setValueAttr:function(e,h){this._handleOnChange(e,h)},_handleOnChange:function(e,
h){this._set("value",e);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=!1;this._setValueAttr(this._resetValue,!0)}})})},"dijit/form/_TextBoxMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/sniff dojo/keys dojo/_base/lang dojo/on ../main".split(" "),function(r,l,q,p,k,e,f,h){var d=l("dijit.form._TextBoxMixin"+(p("dojo-bidi")?"_NoBidi":""),null,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,
maxLength:"",selectOnClick:!1,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(b,c,a){var d;void 0!==b&&(d=this.filter(b),"string"!=typeof a&&(a=null===d||"number"==typeof d&&isNaN(d)?"":this.filter(this.format(d,this.constraints)),0!=this.compare(d,this.filter(this.parse(a,this.constraints)))&&(a=null)));null==a||"number"==typeof a&&isNaN(a)||this.textbox.value==a||(this.textbox.value=a,this._set("displayedValue",this.get("displayedValue")));
this.inherited(arguments,[d,c])},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},_setDisplayedValueAttr:function(b){null==b?b="":"string"!=typeof b&&(b=String(b));this.textbox.value=b;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},format:function(b){return null==b?"":b.toString?b.toString():b},parse:function(b){return b},_refreshState:function(){},onInput:function(){},_onInput:function(b){this._lastInputEventValue=
this.textbox.value;this._processInput(this._lastInputProducingEvent||b);delete this._lastInputProducingEvent;this.intermediateChanges&&this._handleOnChange(this.get("value"),!1)},_processInput:function(){this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);this.own(f(this.textbox,"keydown, keypress, paste, cut, compositionend",e.hitch(this,function(b){var c;if("keydown"==b.type&&
229!=b.keyCode){c=b.keyCode;switch(c){case k.SHIFT:case k.ALT:case k.CTRL:case k.META:case k.CAPS_LOCK:case k.NUM_LOCK:case k.SCROLL_LOCK:return}if(!b.ctrlKey&&!b.metaKey&&!b.altKey){switch(c){case k.NUMPAD_0:case k.NUMPAD_1:case k.NUMPAD_2:case k.NUMPAD_3:case k.NUMPAD_4:case k.NUMPAD_5:case k.NUMPAD_6:case k.NUMPAD_7:case k.NUMPAD_8:case k.NUMPAD_9:case k.NUMPAD_MULTIPLY:case k.NUMPAD_PLUS:case k.NUMPAD_ENTER:case k.NUMPAD_MINUS:case k.NUMPAD_PERIOD:case k.NUMPAD_DIVIDE:return}if(65<=c&&90>=c||
48<=c&&57>=c||c==k.SPACE)return;c=!1;for(var a in k)if(k[a]===b.keyCode){c=!0;break}if(!c)return}}(c=32<=b.charCode?String.fromCharCode(b.charCode):b.charCode)||(c=65<=b.keyCode&&90>=b.keyCode||48<=b.keyCode&&57>=b.keyCode||b.keyCode==k.SPACE?String.fromCharCode(b.keyCode):b.keyCode);c||(c=229);if("keypress"==b.type){if("string"!=typeof c)return;if("a"<=c&&"z">=c||"A"<=c&&"Z">=c||"0"<=c&&"9">=c||" "===c)if(b.ctrlKey||b.metaKey||b.altKey)return}var d={faux:!0},h;for(h in b)/^(layer[XY]|returnValue|keyLocation)$/.test(h)||
(a=b[h],"function"!=typeof a&&"undefined"!=typeof a&&(d[h]=a));e.mixin(d,{charOrCode:c,_wasConsumed:!1,preventDefault:function(){d._wasConsumed=!0;b.preventDefault()},stopPropagation:function(){b.stopPropagation()}});this._lastInputProducingEvent=d;!1===this.onInput(d)&&(d.preventDefault(),d.stopPropagation());if(!d._wasConsumed&&9>=p("ie"))switch(b.keyCode){case k.TAB:case k.ESCAPE:case k.DOWN_ARROW:case k.UP_ARROW:case k.LEFT_ARROW:case k.RIGHT_ARROW:break;default:b.keyCode==k.ENTER&&"textarea"!=
this.textbox.tagName.toLowerCase()||this.defer(function(){this.textbox.value!==this._lastInputEventValue&&f.emit(this.textbox,"input",{bubbles:!0})})}})),f(this.textbox,"input",e.hitch(this,"_onInput")),f(this.domNode,"keypress",function(b){b.stopPropagation()}))},_blankValue:"",filter:function(b){if(null===b)return this._blankValue;if("string"!=typeof b)return b;this.trim&&(b=e.trim(b));this.uppercase&&(b=b.toUpperCase());this.lowercase&&(b=b.toLowerCase());this.propercase&&(b=b.replace(/[^\s]+/g,
function(b){return b.substring(0,1).toUpperCase()+b.substring(1)}));return b},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(b){this.disabled||(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(b){this.disabled||this.readOnly||(this.selectOnClick&&"mouse"==b&&(this._selectOnClickHandle=f.once(this.domNode,"mouseup, touchend",e.hitch(this,function(b){this._isTextSelected()||
d.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle=null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value="";this.inherited(arguments)}});p("dojo-bidi")&&(d=l("dijit.form._TextBoxMixin",d,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);
this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));d._setSelectionRange=h._setSelectionRange=function(b,c,a){b.setSelectionRange&&b.setSelectionRange(c,a)};d.selectInputText=h.selectInputText=function(b,c,a){b=q.byId(b);isNaN(c)&&(c=0);isNaN(a)&&(a=b.value?b.value.length:0);try{b.focus(),d._setSelectionRange(b,c,a)}catch(g){}};return d})},"dijit/Tooltip":function(){define("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".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u,n,t){function A(){}var y=l("dijit._MasterTooltip",[w,m],{duration:a.defaultDuration,templateString:n,postCreate:function(){this.ownerDocumentBody.appendChild(this.domNode);this.bgIframe=new u(this.domNode);this.fadeIn=q.fadeIn({node:this.domNode,duration:this.duration,onEnd:h.hitch(this,"_onShow")});this.fadeOut=q.fadeOut({node:this.domNode,duration:this.duration,onEnd:h.hitch(this,"_onHide")})},show:function(a,b,c,d,e,k,m){if(!this.aroundNode||this.aroundNode!==
b||this.containerNode.innerHTML!=a)if("playing"==this.fadeOut.status())this._onDeck=arguments;else{this.containerNode.innerHTML=a;e&&this.set("textDir",e);this.containerNode.align=d?"right":"left";var n=g.around(this.domNode,b,c&&c.length?c:z.defaultPosition,!d,h.hitch(this,"orient")),l=n.aroundNodePos;"M"==n.corner.charAt(0)&&"M"==n.aroundCorner.charAt(0)?(this.connectorNode.style.top=l.y+(l.h-this.connectorNode.offsetHeight>>1)-n.y+"px",this.connectorNode.style.left=""):"M"==n.corner.charAt(1)&&
"M"==n.aroundCorner.charAt(1)?this.connectorNode.style.left=l.x+(l.w-this.connectorNode.offsetWidth>>1)-n.x+"px":(this.connectorNode.style.left="",this.connectorNode.style.top="");f.set(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=!0;this.aroundNode=b;this.onMouseEnter=k||A;this.onMouseLeave=m||A}},orient:function(a,b,d,g,f){this.connectorNode.style.top="";var h=g.h;g=g.w;a.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"}[b+"-"+d];this.domNode.style.width="auto";var k=e.position(this.domNode);if(c("ie")||c("trident"))k.w+=2;e.setMarginBox(this.domNode,{w:Math.min(Math.max(g,1),k.w)});"B"==d.charAt(0)&&"B"==b.charAt(0)?(a=e.position(a),b=this.connectorNode.offsetHeight,
a.h>h?(this.connectorNode.style.top=h-(f.h+b>>1)+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(f.h/2-b/2,0),a.h-b)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top="",this.connectorNode.style.bottom="");return Math.max(0,k.w-g)},_onShow:function(){c("ie")&&(this.domNode.style.filter="")},hide:function(a){this._onDeck&&this._onDeck[1]==a?this._onDeck=null:this.aroundNode===a&&(this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode=
null,this.fadeOut.play());this.onMouseEnter=this.onMouseLeave=A},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";this._onDeck&&(this.show.apply(this,this._onDeck),this._onDeck=null)}});c("dojo-bidi")&&y.extend({_setAutoTextDir:function(a){this.applyTextDir(a);r.forEach(a.children,function(a){this._setAutoTextDir(a)},this)},_setTextDirAttr:function(a){this._set("textDir",a);"auto"==a?this._setAutoTextDir(this.containerNode):this.containerNode.dir=this.textDir}});t.showTooltip=
function(a,b,c,d,e,g,f){c&&(c=r.map(c,function(a){return{after:"after-centered",before:"before-centered"}[a]||a}));z._masterTT||(t._masterTT=z._masterTT=new y);return z._masterTT.show(a,b,c,d,e,g,f)};t.hideTooltip=function(a){return z._masterTT&&z._masterTT.hide(a)};var z=l("dijit.Tooltip",w,{label:"",showDelay:400,hideDelay:400,connectId:[],position:[],selector:"",_setConnectIdAttr:function(a){r.forEach(this._connections||[],function(a){r.forEach(a,function(a){a.remove()})},this);this._connectIds=
r.filter(h.isArrayLike(a)?a:a?[a]:[],function(a){return p.byId(a,this.ownerDocument)},this);this._connections=r.map(this._connectIds,function(a){a=p.byId(a,this.ownerDocument);var c=this.selector,e=c?function(a){return b.selector(c,a)}:function(a){return a},g=this;return[b(a,e(d.enter),function(){g._onHover(this)}),b(a,e("focusin"),function(){g._onHover(this)}),b(a,e(d.leave),h.hitch(g,"_onUnHover")),b(a,e("focusout"),h.hitch(g,"set","state","DORMANT"))]},this);this._set("connectId",a)},addTarget:function(a){a=
a.id||a;-1==r.indexOf(this._connectIds,a)&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=r.indexOf(this._connectIds,a.id||a);0<=a&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);k.add(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;r.forEach(h.isArrayLike(a)?a:[a],this.addTarget,this)},getContent:function(a){return this.label||this.domNode.innerHTML},
state:"DORMANT",_setStateAttr:function(a){if(!(this.state==a||"SHOW TIMER"==a&&"SHOWING"==this.state||"HIDE TIMER"==a&&"DORMANT"==this.state)){this._hideTimer&&(this._hideTimer.remove(),delete this._hideTimer);this._showTimer&&(this._showTimer.remove(),delete this._showTimer);switch(a){case "DORMANT":this._connectNode&&(z.hide(this._connectNode),delete this._connectNode,this.onHide());break;case "SHOW TIMER":"SHOWING"!=this.state&&(this._showTimer=this.defer(function(){this.set("state","SHOWING")},
this.showDelay));break;case "SHOWING":var b=this.getContent(this._connectNode);if(!b){this.set("state","DORMANT");return}z.show(b,this._connectNode,this.position,!this.isLeftToRight(),this.textDir,h.hitch(this,"set","state","SHOWING"),h.hitch(this,"set","state","HIDE TIMER"));this.onShow(this._connectNode,this.position);break;case "HIDE TIMER":this._hideTimer=this.defer(function(){this.set("state","DORMANT")},this.hideDelay)}this._set("state",a)}},_onHover:function(a){this._connectNode&&a!=this._connectNode&&
this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOW TIMER")},_onUnHover:function(a){this.set("state","HIDE TIMER")},open:function(a){this.set("state","DORMANT");this._connectNode=a;this.set("state","SHOWING")},close:function(){this.set("state","DORMANT")},onShow:function(){},onHide:function(){},destroy:function(){this.set("state","DORMANT");r.forEach(this._connections||[],function(a){r.forEach(a,function(a){a.remove()})},this);this.inherited(arguments)}});z._MasterTooltip=y;z.show=
t.showTooltip;z.hide=t.hideTooltip;z.defaultPosition=["after-centered","before-centered"];return z})},"dijit/form/NumberTextBox":function(){define("dojo/_base/declare dojo/_base/lang dojo/i18n dojo/string dojo/number ./RangeBoundTextBox".split(" "),function(r,l,q,p,k,e){var f=function(d){d=d||{};var b=q.getLocalization("dojo.cldr","number",q.normalizeLocale(d.locale)),c=d.pattern?d.pattern:b[(d.type||"decimal")+"Format"];d="number"==typeof d.places?d.places:"string"===typeof d.places&&0<d.places.length?
d.places.replace(/.*,/,""):-1!=c.indexOf(".")?c.split(".")[1].replace(/[^#0]/g,"").length:0;return{sep:b.decimal,places:d}},h=r("dijit.form.NumberTextBoxMixin",null,{pattern:function(d){return"("+(this.focused&&this.editOptions?this._regExpGenerator(l.delegate(d,this.editOptions))+"|":"")+this._regExpGenerator(d)+")"},value:NaN,editOptions:{pattern:"#.######"},_formatter:k.format,_regExpGenerator:k.regexp,_decimalInfo:f(),postMixInProperties:function(){this.inherited(arguments);this._set("type","text")},
_setConstraintsAttr:function(d){var b="number"==typeof d.places?d.places:0;b&&b++;"number"!=typeof d.max&&(d.max=9*Math.pow(10,15-b));"number"!=typeof d.min&&(d.min=-9*Math.pow(10,15-b));this.inherited(arguments,[d]);this.focusNode&&this.focusNode.value&&!isNaN(this.value)&&this.set("value",this.value);this._decimalInfo=f(d)},_onFocus:function(){if(!this.disabled&&!this.readOnly){var d=this.get("value");"number"!=typeof d||isNaN(d)||(d=this.format(d,this.constraints),void 0!==d&&(this.textbox.value=
d));this.inherited(arguments)}},format:function(d,b){var c=String(d);if("number"!=typeof d)return c;if(isNaN(d))return"";if(!("rangeCheck"in this&&this.rangeCheck(d,b))&&!1!==b.exponent&&/\de[-+]?\d/i.test(c))return c;this.editOptions&&this.focused&&(b=l.mixin({},b,this.editOptions));return this._formatter(d,b)},_parser:k.parse,parse:function(d,b){var c=l.mixin({},b,this.editOptions&&this.focused?this.editOptions:{});if(this.focused&&null!=c.places){var a=c.places,a="number"===typeof a?a:Number(a.split(",").pop());
c.places="0,"+a}c=this._parser(d,c);this.editOptions&&this.focused&&isNaN(c)&&(c=this._parser(d,b));return c},_getDisplayedValueAttr:function(){var d=this.inherited(arguments);return isNaN(d)?this.textbox.value:d},filter:function(d){if(null==d||"string"==typeof d&&""==d)return NaN;"number"!=typeof d||isNaN(d)||0==d||(d=k.round(d,this._decimalInfo.places));return this.inherited(arguments,[d])},serialize:function(d,b){return"number"!=typeof d||isNaN(d)?"":this.inherited(arguments)},_setBlurValue:function(){var d=
l.hitch(l.delegate(this,{focused:!0}),"get")("value");this._setValueAttr(d,!0)},_setValueAttr:function(d,b,c){if(void 0!==d&&void 0===c)if(c=String(d),"number"==typeof d)if(isNaN(d))c="";else{if("rangeCheck"in this&&this.rangeCheck(d,this.constraints)||!1===this.constraints.exponent||!/\de[-+]?\d/i.test(c))c=void 0}else d?d=void 0:(c="",d=NaN);this.inherited(arguments,[d,b,c])},_getValueAttr:function(){var d=this.inherited(arguments);if(isNaN(d)&&""!==this.textbox.value){if(!1!==this.constraints.exponent&&
/\de[-+]?\d/i.test(this.textbox.value)&&(new RegExp("^"+k._realNumberRegexp(l.delegate(this.constraints))+"$")).test(this.textbox.value))return d=Number(this.textbox.value),isNaN(d)?void 0:d}else return d},isValid:function(d){if(!this.focused||this._isEmpty(this.textbox.value))return this.inherited(arguments);var b=this.get("value");return!isNaN(b)&&this.rangeCheck(b,this.constraints)?!1!==this.constraints.exponent&&/\de[-+]?\d/i.test(this.textbox.value)?!0:this.inherited(arguments):!1},_isValidSubset:function(){var d=
"number"==typeof this.constraints.min,b="number"==typeof this.constraints.max,c=this.get("value");if(isNaN(c)||!d&&!b)return this.inherited(arguments);var a=c|0,e=0>c,f=-1!=this.textbox.value.indexOf(this._decimalInfo.sep),h=(this.maxLength||20)-this.textbox.value.length,k=f?this.textbox.value.split(this._decimalInfo.sep)[1].replace(/[^0-9]/g,""):"",a=f?a+"."+k:a+"",h=p.rep("9",h),f=c;e?f=Number(a+h):c=Number(a+h);return!(d&&c<this.constraints.min||b&&f>this.constraints.max)}});r=r("dijit.form.NumberTextBox",
[e,h],{baseClass:"dijitTextBox dijitNumberTextBox"});r.Mixin=h;return r})},"dijit/form/FilteringSelect":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/when","./MappedTextBox","./ComboBoxMixin"],function(r,l,q,p,k){return r("dijit.form.FilteringSelect",[p,k],{required:!0,_lastDisplayedValue:"",_isValidSubset:function(){return this._opened},isValid:function(){return!!this.item||!this.required&&""==this.get("displayedValue")},_refreshState:function(){this.searchTimer||this.inherited(arguments)},
_callbackSetLabel:function(e,f,h,d){f&&f[this.searchAttr]!==this._lastQuery||!f&&e.length&&this.store.getIdentity(e[0])!=this._lastQuery||(e.length?this.set("item",e[0],d):this.set("value","",d||void 0===d&&!this.focused,this.textbox.value,null))},_openResultList:function(e,f,h){f[this.searchAttr]===this._lastQuery&&(this.inherited(arguments),void 0===this.item&&this.validate(!0))},_getValueAttr:function(){return this.valueNode.value},_getValueField:function(){return"value"},_setValueAttr:function(e,
f,h,d){this._onChangeActive||(f=null);if(void 0===d){if(null===e||""===e)if(e="",!l.isString(h)){this._setDisplayedValueAttr(h||"",f);return}var b=this;this._lastQuery=e;q(this.store.get(e),function(c){b._callbackSetLabel(c?[c]:[],void 0,void 0,f)})}else this.valueNode.value=e,this.inherited(arguments,[e,f,h,d])},_setItemAttr:function(e,f,h){this.inherited(arguments);this._lastDisplayedValue=this.textbox.value},_getDisplayQueryString:function(e){return e.replace(/([\\\*\?])/g,"\\$1")},_setDisplayedValueAttr:function(e,
f){null==e&&(e="");if(!this._created){if(!("displayedValue"in this.params))return;f=!1}if(this.store){this.closeDropDown();var h=l.clone(this.query),d=this._getDisplayQueryString(e),b;this.store._oldAPI?b=d:(b=this._patternToRegExp(d),b.toString=function(){return d});this._lastQuery=h[this.searchAttr]=b;this._lastDisplayedValue=this.textbox.value=e;this._set("displayedValue",e);var c=this,a={queryOptions:{ignoreCase:this.ignoreCase,deep:!0}};l.mixin(a,this.fetchProperties);this._fetchHandle=this.store.query(h,
a);q(this._fetchHandle,function(b){c._fetchHandle=null;c._callbackSetLabel(b||[],h,a,f)},function(a){c._fetchHandle=null;c._cancelingQuery||console.error("dijit.form.FilteringSelect: "+a.toString())})}},undo:function(){this.set("displayedValue",this._lastDisplayedValue)}})})},"dijit/form/ComboBoxMixin":function(){define("dojo/_base/declare dojo/Deferred dojo/_base/kernel dojo/_base/lang dojo/store/util/QueryResults ./_AutoCompleterMixin ./_ComboBoxMenu ../_HasDropDown dojo/text!./templates/DropDownBox.html".split(" "),
function(r,l,q,p,k,e,f,h,d){return r("dijit.form.ComboBoxMixin",[h,e],{dropDownClass:f,hasDownArrow:!0,templateString:d,baseClass:"dijitTextBox dijitComboBox",cssStateNodes:{_buttonNode:"dijitDownArrowButton"},_setHasDownArrowAttr:function(b){this._set("hasDownArrow",b);this._buttonNode.style.display=b?"":"none"},_showResultList:function(){this.displayMessage("");this.inherited(arguments)},_setStoreAttr:function(b){b.get||p.mixin(b,{_oldAPI:!0,get:function(b){var a=new l;this.fetchItemByIdentity({identity:b,
onItem:function(b){a.resolve(b)},onError:function(b){a.reject(b)}});return a.promise},query:function(b,a){var c=new l(function(){d.abort&&d.abort()});c.total=new l;var d=this.fetch(p.mixin({query:b,onBegin:function(a){c.total.resolve(a)},onComplete:function(a){c.resolve(a)},onError:function(a){c.reject(a)}},a));return k(c)}});this._set("store",b)},postMixInProperties:function(){var b=this.params.store||this.store;b&&this._setStoreAttr(b);this.inherited(arguments);if(!this.params.store&&this.store&&
!this.store._oldAPI){var c=this.declaredClass;p.mixin(this.store,{getValue:function(a,b){q.deprecated(c+".store.getValue(item, attr) is deprecated for builtin store.  Use item.attr directly","","2.0");return a[b]},getLabel:function(a){q.deprecated(c+".store.getLabel(item) is deprecated for builtin store.  Use item.label directly","","2.0");return a.name},fetch:function(a){q.deprecated(c+".store.fetch() is deprecated for builtin store.","Use store.query()","2.0");require(["dojo/data/ObjectStore"],
p.hitch(this,function(b){(new b({objectStore:this})).fetch(a)}))}})}},buildRendering:function(){this.inherited(arguments);this.focusNode.setAttribute("aria-autocomplete",this.autoComplete?"both":"list")}})})},"dijit/form/_AutoCompleterMixin":function(){define("dojo/aspect dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/query dojo/regexp dojo/sniff ./DataList ./_TextBoxMixin ./_SearchMixin".split(" "),function(r,l,q,p,k,e,f,h,d,b,c){l=l("dijit.form._AutoCompleterMixin",c,{item:null,
autoComplete:!0,highlightMatch:"first",labelAttr:"",labelType:"text",maxHeight:-1,_stopClickEvents:!1,_getCaretPos:function(a){var b=0;if("number"==typeof a.selectionStart)b=a.selectionStart;else if(h("ie")){var c=a.ownerDocument.selection.createRange().duplicate();a=a.createTextRange();c.move("character",0);a.move("character",0);try{a.setEndPoint("EndToEnd",c),b=String(a.text).replace(/\r/g,"").length}catch(m){}}return b},_setCaretPos:function(a,c){c=parseInt(c);b.selectInputText(a,c,c)},_setDisabledAttr:function(a){this.inherited(arguments);
this.domNode.setAttribute("aria-disabled",a?"true":"false")},_onKey:function(a){if(!(32<=a.charCode)){var b=a.charCode||a.keyCode;if(b!=p.ALT&&b!=p.CTRL&&b!=p.META&&b!=p.SHIFT){var c=this.dropDown,d=null;this._abortQuery();this.inherited(arguments);if(!(a.altKey||a.ctrlKey||a.metaKey))switch(this._opened&&(d=c.getHighlightedOption()),b){case p.PAGE_DOWN:case p.DOWN_ARROW:case p.PAGE_UP:case p.UP_ARROW:this._opened&&this._announceOption(d);a.stopPropagation();a.preventDefault();break;case p.ENTER:if(d){if(d==
c.nextButton){this._nextSearch(1);a.stopPropagation();a.preventDefault();break}else if(d==c.previousButton){this._nextSearch(-1);a.stopPropagation();a.preventDefault();break}a.stopPropagation();a.preventDefault()}else this._setBlurValue(),this._setCaretPos(this.focusNode,this.focusNode.value.length);case p.TAB:b=this.get("displayedValue");if(c&&(b==c._messages.previousMessage||b==c._messages.nextMessage))break;d&&this._selectOption(d);case p.ESCAPE:this._opened&&(this._lastQuery=null,this.closeDropDown())}}}},
_autoCompleteText:function(a){var c=this.focusNode;b.selectInputText(c,c.value.length);var d=this.ignoreCase?"toLowerCase":"substr";0==a[d](0).indexOf(this.focusNode.value[d](0))?(d=this.autoComplete?this._getCaretPos(c):c.value.length,d+1>c.value.length&&(c.value=a,b.selectInputText(c,d))):(c.value=a,b.selectInputText(c))},_openResultList:function(a,b,c){var d=this.dropDown.getHighlightedOption();this.dropDown.clearResultList();a.length||0!=c.start?(this._nextSearch=this.dropDown.onPage=k.hitch(this,
function(b){a.nextPage(-1!==b);this.focus()}),this.dropDown.createOptions(a,c,k.hitch(this,"_getMenuLabelFromItem")),this._showResultList(),"direction"in c?(c.direction?this.dropDown.highlightFirstOption():c.direction||this.dropDown.highlightLastOption(),d&&this._announceOption(this.dropDown.getHighlightedOption())):!this.autoComplete||this._prev_key_backspace||/^[*]+$/.test(b[this.searchAttr].toString())||this._announceOption(this.dropDown.containerNode.firstChild.nextSibling)):this.closeDropDown()},
_showResultList:function(){this.closeDropDown(!0);this.openDropDown();this.domNode.setAttribute("aria-expanded","true")},loadDropDown:function(){this._startSearchAll()},isLoaded:function(){return!1},closeDropDown:function(){this._abortQuery();this._opened&&(this.inherited(arguments),this.domNode.setAttribute("aria-expanded","false"))},_setBlurValue:function(){var a=this.get("displayedValue"),b=this.dropDown;!b||a!=b._messages.previousMessage&&a!=b._messages.nextMessage?"undefined"==typeof this.item?
(this.item=null,this.set("displayedValue",a)):(this.value!=this._lastValueReported&&this._handleOnChange(this.value,!0),this._refreshState()):this._setValueAttr(this._lastValueReported,!0);this.focusNode.removeAttribute("aria-activedescendant")},_setItemAttr:function(a,b,c){var d="";a&&(c||(c=this.store._oldAPI?this.store.getValue(a,this.searchAttr):a[this.searchAttr]),d=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):c);this.set("value",d,b,c,a)},_announceOption:function(a){if(a){var b;
if(a==this.dropDown.nextButton||a==this.dropDown.previousButton)b=a.innerHTML,this.item=void 0,this.value="";else{var c=this.dropDown.items[a.getAttribute("item")];b=(this.store._oldAPI?this.store.getValue(c,this.searchAttr):c[this.searchAttr]).toString();this.set("item",c,!1,b)}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);this.focusNode.setAttribute("aria-activedescendant",q.get(a,"id"));this._autoCompleteText(b)}},_selectOption:function(a){this.closeDropDown();a&&
this._announceOption(a);this._setCaretPos(this.focusNode,this.focusNode.value.length);this._handleOnChange(this.value,!0);this.focusNode.removeAttribute("aria-activedescendant")},_startSearchAll:function(){this._startSearch("")},_startSearchFromInput:function(){this.item=void 0;this.inherited(arguments)},_startSearch:function(a){if(!this.dropDown){var b=this.id+"_popup";this.dropDown=new (k.isString(this.dropDownClass)?k.getObject(this.dropDownClass,!1):this.dropDownClass)({onChange:k.hitch(this,
this._selectOption),id:b,dir:this.dir,textDir:this.textDir})}this._lastInput=a;this.inherited(arguments)},_getValueField:function(){return this.searchAttr},postMixInProperties:function(){this.inherited(arguments);if(!this.store&&this.srcNodeRef&&(this.store=new d({},this.srcNodeRef),!("value"in this.params))){var a=this.item=this.store.fetchSelectedItem();if(a){var b=this._getValueField();this.value=this.store._oldAPI?this.store.getValue(a,b):a[b]}}},postCreate:function(){var a=e('label[for\x3d"'+
this.id+'"]');a.length&&(a[0].id||(a[0].id=this.id+"_label"),this.domNode.setAttribute("aria-labelledby",a[0].id));this.inherited(arguments);r.after(this,"onSearch",k.hitch(this,"_openResultList"),!0)},_getMenuLabelFromItem:function(a){a=this.labelFunc(a,this.store);var b=this.labelType;"none"!=this.highlightMatch&&"text"==this.labelType&&this._lastInput&&(a=this.doHighlight(a,this._lastInput),b="html");return{html:"html"==b,label:a}},doHighlight:function(a,b){var c=(this.ignoreCase?"i":"")+("all"==
this.highlightMatch?"g":""),d=this.queryExpr.indexOf("${0}");b=f.escapeString(b);return this._escapeHtml(a.replace(new RegExp((0==d?"^":"")+"("+b+")"+(d==this.queryExpr.length-4?"$":""),c),"\uffff$1\uffff")).replace(/\uFFFF([^\uFFFF]+)\uFFFF/g,'\x3cspan class\x3d"dijitComboBoxHighlightMatch"\x3e$1\x3c/span\x3e')},_escapeHtml:function(a){return a=String(a).replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;")},reset:function(){this.item=null;this.inherited(arguments)},
labelFunc:function(a,b){return(b._oldAPI?b.getValue(a,this.labelAttr||this.searchAttr):a[this.labelAttr||this.searchAttr]).toString()},_setValueAttr:function(a,b,c,d){this._set("item",d||null);null==a&&(a="");this.inherited(arguments)}});h("dojo-bidi")&&l.extend({_setTextDirAttr:function(a){this.inherited(arguments);this.dropDown&&this.dropDown._set("textDir",a)}});return l})},"dijit/form/DataList":function(){define("dojo/_base/declare dojo/dom dojo/_base/lang dojo/query dojo/store/Memory ../registry".split(" "),
function(r,l,q,p,k,e){function f(e){return{id:e.value,value:e.value,name:q.trim(e.innerText||e.textContent||"")}}return r("dijit.form.DataList",k,{constructor:function(h,d){this.domNode=l.byId(d);q.mixin(this,h);this.id&&e.add(this);this.domNode.style.display="none";this.inherited(arguments,[{data:p("option",this.domNode).map(f)}])},destroy:function(){e.remove(this.id)},fetchSelectedItem:function(){var e=p("\x3e option[selected]",this.domNode)[0]||p("\x3e option",this.domNode)[0];return e&&f(e)}})})},
"dijit/form/_SearchMixin":function(){define("dojo/_base/declare dojo/keys dojo/_base/lang dojo/query dojo/string dojo/when ../registry".split(" "),function(r,l,q,p,k,e,f){return r("dijit.form._SearchMixin",null,{pageSize:Infinity,store:null,fetchProperties:{},query:{},list:"",_setListAttr:function(e){this._set("list",e)},searchDelay:200,searchAttr:"name",queryExpr:"${0}*",ignoreCase:!0,_patternToRegExp:function(e){return new RegExp("^"+e.replace(/(\\.)|(\*)|(\?)|\W/g,function(d,b,c,a){return c?".*":
a?".":b?b:"\\"+d})+"$",this.ignoreCase?"mi":"m")},_abortQuery:function(){this.searchTimer&&(this.searchTimer=this.searchTimer.remove());this._queryDeferHandle&&(this._queryDeferHandle=this._queryDeferHandle.remove());this._fetchHandle&&(this._fetchHandle.abort&&(this._cancelingQuery=!0,this._fetchHandle.abort(),this._cancelingQuery=!1),this._fetchHandle.cancel&&(this._cancelingQuery=!0,this._fetchHandle.cancel(),this._cancelingQuery=!1),this._fetchHandle=null)},_processInput:function(e){if(!this.disabled&&
!this.readOnly){e=e.charOrCode;this._prev_key_backspace=!1;if(e==l.DELETE||e==l.BACKSPACE)this._maskValidSubsetError=this._prev_key_backspace=!0;if(this.store)this.searchTimer=this.defer("_startSearchFromInput",1);else this.onSearch()}},onSearch:function(){},_startSearchFromInput:function(){this._startSearch(this.focusNode.value)},_startSearch:function(f){this._abortQuery();var d=this,b=q.clone(this.query),c={start:0,count:this.pageSize,queryOptions:{ignoreCase:this.ignoreCase,deep:!0}},a=k.substitute(this.queryExpr,
[f.replace(/([\\\*\?])/g,"\\$1")]),g,h=function(){var a=d._fetchHandle=d.store.query(b,c);d.disabled||d.readOnly||g!==d._lastQuery||e(a,function(f){d._fetchHandle=null;d.disabled||d.readOnly||g!==d._lastQuery||e(a.total,function(a){f.total=a;var e=d.pageSize;if(isNaN(e)||e>f.total)e=f.total;f.nextPage=function(a){c.direction=a=!1!==a;c.count=e;a?(c.start+=f.length,c.start>=f.total&&(c.count=0)):(c.start-=e,0>c.start&&(c.count=Math.max(e+c.start,0),c.start=0));0>=c.count?(f.length=0,d.onSearch(f,b,
c)):h()};d.onSearch(f,b,c)})},function(a){d._fetchHandle=null;d._cancelingQuery||console.error(d.declaredClass+" "+a.toString())})};q.mixin(c,this.fetchProperties);this.store._oldAPI?g=a:(g=this._patternToRegExp(a),g.toString=function(){return a});this._lastQuery=b[this.searchAttr]=g;this._queryDeferHandle=this.defer(h,this.searchDelay)},constructor:function(){this.query={};this.fetchProperties={}},postMixInProperties:function(){if(!this.store){var e=this.list;e&&(this.store=f.byId(e))}this.inherited(arguments)}})})},
"dijit/form/_ComboBoxMenu":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-style dojo/keys ../_WidgetBase ../_TemplatedMixin ./_ComboBoxMenuMixin ./_ListMouseMixin".split(" "),function(r,l,q,p,k,e,f,h){return r("dijit.form._ComboBoxMenu",[k,e,h,f],{templateString:"\x3cdiv class\x3d'dijitReset dijitMenu' data-dojo-attach-point\x3d'containerNode' style\x3d'overflow: auto; overflow-x: hidden;' role\x3d'listbox'\x3e\x3cdiv class\x3d'dijitMenuItem dijitMenuPreviousButton' data-dojo-attach-point\x3d'previousButton' role\x3d'option'\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitMenuItem dijitMenuNextButton' data-dojo-attach-point\x3d'nextButton' role\x3d'option'\x3e\x3c/div\x3e\x3c/div\x3e",
baseClass:"dijitComboBoxMenu",postCreate:function(){this.inherited(arguments);this.isLeftToRight()||(l.add(this.previousButton,"dijitMenuItemRtl"),l.add(this.nextButton,"dijitMenuItemRtl"));this.containerNode.setAttribute("role","listbox")},_createMenuItem:function(){var d=this.ownerDocument.createElement("div");d.className="dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl");d.setAttribute("role","option");return d},onHover:function(d){l.add(d,"dijitMenuItemHover")},onUnhover:function(d){l.remove(d,
"dijitMenuItemHover")},onSelect:function(d){l.add(d,"dijitMenuItemSelected")},onDeselect:function(d){l.remove(d,"dijitMenuItemSelected")},_page:function(d){var b=0,c=this.domNode.scrollTop,a=q.get(this.domNode,"height");for(this.getHighlightedOption()||this.selectNextNode();b<a;){var e=this.getHighlightedOption();if(d){if(!e.previousSibling||"none"==e.previousSibling.style.display)break;this.selectPreviousNode()}else{if(!e.nextSibling||"none"==e.nextSibling.style.display)break;this.selectNextNode()}e=
this.domNode.scrollTop;b+=(e-c)*(d?-1:1);c=e}},handleKey:function(d){switch(d.keyCode){case p.DOWN_ARROW:return this.selectNextNode(),!1;case p.PAGE_DOWN:return this._page(!1),!1;case p.UP_ARROW:return this.selectPreviousNode(),!1;case p.PAGE_UP:return this._page(!0),!1;default:return!0}}})})},"dijit/form/_ComboBoxMenuMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/has dojo/i18n dojo/i18n!./nls/ComboBox".split(" "),function(r,l,q,p,k){var e=l("dijit.form._ComboBoxMenuMixin"+
(p("dojo-bidi")?"_NoBidi":""),null,{_messages:null,postMixInProperties:function(){this.inherited(arguments);this._messages=k.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(e){this._set("value",e);this.onChange(e)},onClick:function(e){if(e==this.previousButton)this._setSelectedAttr(null),this.onPage(-1);else if(e==
this.nextButton)this._setSelectedAttr(null),this.onPage(1);else this.onChange(e)},onChange:function(){},onPage:function(){},onClose:function(){this._setSelectedAttr(null)},_createOption:function(e,h){var d=this._createMenuItem(),b=h(e);b.html?d.innerHTML=b.label:d.appendChild(d.ownerDocument.createTextNode(b.label));""==d.innerHTML&&(d.innerHTML="\x26#160;");return d},createOptions:function(e,h,d){this.items=e;this.previousButton.style.display=0==h.start?"none":"";q.set(this.previousButton,"id",this.id+
"_prev");r.forEach(e,function(b,a){var c=this._createOption(b,d);c.setAttribute("item",a);q.set(c,"id",this.id+a);this.nextButton.parentNode.insertBefore(c,this.nextButton)},this);var b=!1;e.total&&!e.total.then&&-1!=e.total?h.start+h.count<e.total?b=!0:h.start+h.count>e.total&&h.count==e.length&&(b=!0):h.count==e.length&&(b=!0);this.nextButton.style.display=b?"":"none";q.set(this.nextButton,"id",this.id+"_next")},clearResultList:function(){for(var e=this.containerNode;2<e.childNodes.length;)e.removeChild(e.childNodes[e.childNodes.length-
2]);this._setSelectedAttr(null)},highlightFirstOption:function(){this.selectFirstNode()},highlightLastOption:function(){this.selectLastNode()},selectFirstNode:function(){this.inherited(arguments);this.getHighlightedOption()==this.previousButton&&this.selectNextNode()},selectLastNode:function(){this.inherited(arguments);this.getHighlightedOption()==this.nextButton&&this.selectPreviousNode()},getHighlightedOption:function(){return this.selected}});p("dojo-bidi")&&(e=l("dijit.form._ComboBoxMenuMixin",
e,{_createOption:function(){var e=this.inherited(arguments);this.applyTextDir(e);return e}}));return e})},"dijit/form/_ListMouseMixin":function(){define(["dojo/_base/declare","dojo/on","dojo/touch","./_ListBase"],function(r,l,q,p){return r("dijit.form._ListMouseMixin",p,{postCreate:function(){this.inherited(arguments);this.domNode.dojoClick=!0;this._listConnect("click","_onClick");this._listConnect("mousedown","_onMouseDown");this._listConnect("mouseup","_onMouseUp");this._listConnect("mouseover",
"_onMouseOver");this._listConnect("mouseout","_onMouseOut")},_onClick:function(k,e){this._setSelectedAttr(e,!1);this._deferredClick&&this._deferredClick.remove();this._deferredClick=this.defer(function(){this._deferredClick=null;this.onClick(e)})},_onMouseDown:function(k,e){this._hoveredNode&&(this.onUnhover(this._hoveredNode),this._hoveredNode=null);this._isDragging=!0;this._setSelectedAttr(e,!1)},_onMouseUp:function(k,e){this._isDragging=!1;var f=this.selected,h=this._hoveredNode;f&&e==f?this.defer(function(){this._onClick(k,
f)}):h&&this.defer(function(){this._onClick(k,h)})},_onMouseOut:function(k,e){this._hoveredNode&&(this.onUnhover(this._hoveredNode),this._hoveredNode=null);this._isDragging&&(this._cancelDrag=(new Date).getTime()+1E3)},_onMouseOver:function(k,e){this._cancelDrag&&((new Date).getTime()>this._cancelDrag&&(this._isDragging=!1),this._cancelDrag=null);this._hoveredNode=e;this.onHover(e);this._isDragging&&this._setSelectedAttr(e,!1)}})})},"dijit/form/_ListBase":function(){define(["dojo/_base/declare","dojo/on",
"dojo/window"],function(r,l,q){return r("dijit.form._ListBase",null,{selected:null,_listConnect:function(p,k){var e=this;return e.own(l(e.containerNode,l.selector(function(e,h,d){return e.parentNode==d},p),function(f){e[k](f,this)}))},selectFirstNode:function(){for(var l=this.containerNode.firstChild;l&&"none"==l.style.display;)l=l.nextSibling;this._setSelectedAttr(l,!0)},selectLastNode:function(){for(var l=this.containerNode.lastChild;l&&"none"==l.style.display;)l=l.previousSibling;this._setSelectedAttr(l,
!0)},selectNextNode:function(){var l=this.selected;if(l){for(l=l.nextSibling;l&&"none"==l.style.display;)l=l.nextSibling;l?this._setSelectedAttr(l,!0):this.selectFirstNode()}else this.selectFirstNode()},selectPreviousNode:function(){var l=this.selected;if(l){for(l=l.previousSibling;l&&"none"==l.style.display;)l=l.previousSibling;l?this._setSelectedAttr(l,!0):this.selectLastNode()}else this.selectLastNode()},_setSelectedAttr:function(l,k){if(this.selected!=l){var e=this.selected;if(e)this.onDeselect(e);
l&&(k&&q.scrollIntoView(l),this.onSelect(l));this._set("selected",l)}else if(l)this.onSelect(l)}})})},"dijit/form/NumberSpinner":function(){define(["dojo/_base/declare","dojo/keys","./_Spinner","./NumberTextBox"],function(r,l,q,p){return r("dijit.form.NumberSpinner",[q,p.Mixin],{baseClass:"dijitTextBox dijitSpinner dijitNumberTextBox",adjust:function(k,e){var f=this.constraints,h=isNaN(k),d=!isNaN(f.max),b=!isNaN(f.min);h&&0!=e&&(k=0<e?b?f.min:d?f.max:0:d?this.constraints.max:b?f.min:0);var c=k+e;
if(h||isNaN(c))return k;d&&c>f.max&&(c=f.max);b&&c<f.min&&(c=f.min);return c},_onKeyDown:function(k){if(!(this.disabled||this.readOnly||k.keyCode!=l.HOME&&k.keyCode!=l.END||k.ctrlKey||k.altKey||k.metaKey||"undefined"==typeof this.get("value"))){var e=this.constraints[k.keyCode==l.HOME?"min":"max"];"number"==typeof e&&this._setValueAttr(e,!1);k.stopPropagation();k.preventDefault()}}})})},"dijit/form/_Spinner":function(){define("dojo/_base/declare dojo/keys dojo/_base/lang dojo/sniff dojo/mouse dojo/on ../typematic ./RangeBoundTextBox dojo/text!./templates/Spinner.html ./_TextBoxMixin".split(" "),
function(r,l,q,p,k,e,f,h,d,b){return r("dijit.form._Spinner",h,{defaultTimeout:500,minimumTimeout:10,timeoutChangeRate:.9,smallDelta:1,largeDelta:10,templateString:d,baseClass:"dijitTextBox dijitSpinner",cssStateNodes:{upArrowNode:"dijitUpArrowButton",downArrowNode:"dijitDownArrowButton"},adjust:function(b){return b},_arrowPressed:function(c,a,d){this.disabled||this.readOnly||(this._setValueAttr(this.adjust(this.get("value"),a*d),!1),b.selectInputText(this.textbox,this.textbox.value.length))},_arrowReleased:function(){this._wheelTimer=
null},_typematicCallback:function(b,a,d){var c=this.smallDelta;a==this.textbox&&(a=d.keyCode,c=a==l.PAGE_UP||a==l.PAGE_DOWN?this.largeDelta:this.smallDelta,a=a==l.UP_ARROW||a==l.PAGE_UP?this.upArrowNode:this.downArrowNode);-1==b?this._arrowReleased(a):this._arrowPressed(a,a==this.upArrowNode?1:-1,c)},_wheelTimer:null,_mouseWheeled:function(b){if(this.focused){b.stopPropagation();b.preventDefault();var a=b.wheelDelta/120;Math.floor(a)!=a&&(a=0<b.wheelDelta?1:-1);b=b.detail?-1*b.detail:a;if(0!==b){var c=
this[0<b?"upArrowNode":"downArrowNode"];this._arrowPressed(c,b,this.smallDelta);this._wheelTimer&&this._wheelTimer.remove();this._wheelTimer=this.defer(function(){this._arrowReleased(c)},50)}}},_setConstraintsAttr:function(b){this.inherited(arguments);this.focusNode&&(void 0!==this.constraints.min?this.focusNode.setAttribute("aria-valuemin",this.constraints.min):this.focusNode.removeAttribute("aria-valuemin"),void 0!==this.constraints.max?this.focusNode.setAttribute("aria-valuemax",this.constraints.max):
this.focusNode.removeAttribute("aria-valuemax"))},_setValueAttr:function(b,a){this.focusNode.setAttribute("aria-valuenow",b);this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.own(e(this.domNode,k.wheel,q.hitch(this,"_mouseWheeled")),f.addListener(this.upArrowNode,this.textbox,{keyCode:l.UP_ARROW,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),f.addListener(this.downArrowNode,this.textbox,
{keyCode:l.DOWN_ARROW,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),f.addListener(this.upArrowNode,this.textbox,{keyCode:l.PAGE_UP,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),f.addListener(this.downArrowNode,this.textbox,{keyCode:l.PAGE_DOWN,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,
this.defaultTimeout,this.minimumTimeout))}})})},"dijit/typematic":function(){define("dojo/_base/array dojo/_base/connect dojo/_base/lang dojo/on dojo/sniff ./main".split(" "),function(r,l,q,p,k,e){var f=e.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(0>this._currentTimeout?this._initialDelay:1<this._subsequentDelay?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay),this._minDelay);
this._timer=setTimeout(q.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(e,d,b,c,a,g,f,k){if(a!=this._obj){this.stop();this._initialDelay=f||500;this._subsequentDelay=g||.9;this._minDelay=k||10;this._obj=a;this._node=b;this._count=this._currentTimeout=-1;this._callback=q.hitch(d,c);this._evt={faux:!0};for(var h in e)"layerX"!=h&&"layerY"!=h&&(d=e[h],"function"!=typeof d&&"undefined"!=typeof d&&(this._evt[h]=d));this._fireEventAndReload()}},stop:function(){this._timer&&(clearTimeout(this._timer),
this._timer=null);this._obj&&(this._callback(-1,this._node,this._evt),this._obj=null)},addKeyListener:function(e,d,b,c,a,g,k){var h="keyCode"in d?"keyCode":"charCode"in d?"charCode":"charOrCode",u=[p(e,"keyCode"in d?"keydown":"charCode"in d?"keypress":l._keypress,q.hitch(this,function(m){m[h]!=d[h]||void 0!==d.ctrlKey&&d.ctrlKey!=m.ctrlKey||void 0!==d.altKey&&d.altKey!=m.altKey||void 0!==d.metaKey&&d.metaKey!=(m.metaKey||!1)||void 0!==d.shiftKey&&d.shiftKey!=m.shiftKey?f._obj==d&&f.stop():(m.stopPropagation(),
m.preventDefault(),f.trigger(m,b,e,c,d,a,g,k))})),p(e,"keyup",q.hitch(this,function(){f._obj==d&&f.stop()}))];return{remove:function(){r.forEach(u,function(a){a.remove()})}}},addMouseListener:function(e,d,b,c,a,g){var h=[p(e,"mousedown",q.hitch(this,function(h){h.preventDefault();f.trigger(h,d,e,b,e,c,a,g)})),p(e,"mouseup",q.hitch(this,function(a){this._obj&&a.preventDefault();f.stop()})),p(e,"mouseout",q.hitch(this,function(a){this._obj&&a.preventDefault();f.stop()})),p(e,"dblclick",q.hitch(this,
function(h){h.preventDefault();9>k("ie")&&(f.trigger(h,d,e,b,e,c,a,g),setTimeout(q.hitch(this,f.stop),50))}))];return{remove:function(){r.forEach(h,function(a){a.remove()})}}},addListener:function(e,d,b,c,a,g,f,k){var h=[this.addKeyListener(d,b,c,a,g,f,k),this.addMouseListener(e,c,a,g,f,k)];return{remove:function(){r.forEach(h,function(a){a.remove()})}}}};return f})},"dijit/form/SimpleTextarea":function(){define(["dojo/_base/declare","dojo/dom-class","dojo/sniff","./TextBox"],function(r,l,q,p){return r("dijit.form.SimpleTextarea",
p,{baseClass:"dijitTextBox dijitTextArea",rows:"3",cols:"20",templateString:"\x3ctextarea ${!nameAttrSetting} data-dojo-attach-point\x3d'focusNode,containerNode,textbox' autocomplete\x3d'off'\x3e\x3c/textarea\x3e",postMixInProperties:function(){!this.value&&this.srcNodeRef&&(this.value=this.srcNodeRef.value);this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);q("ie")&&this.cols&&l.add(this.textbox,"dijitTextAreaCols")},filter:function(k){k&&(k=k.replace(/\r/g,""));return this.inherited(arguments)},
_onInput:function(k){if(this.maxLength){var e=parseInt(this.maxLength),f=this.textbox.value.replace(/\r/g,""),e=f.length-e;if(0<e){var h=this.textbox;if(h.selectionStart){var d=h.selectionStart,b=0;q("opera")&&(b=(this.textbox.value.substring(0,d).match(/\r/g)||[]).length);this.textbox.value=f.substring(0,d-e-b)+f.substring(d-b);h.setSelectionRange(d-e,d-e)}else this.ownerDocument.selection&&(h.focus(),f=this.ownerDocument.selection.createRange(),f.moveStart("character",-e),f.text="",f.select())}}this.inherited(arguments)}})})},
"dijit/form/TimeTextBox":function(){define("dojo/_base/declare dojo/keys dojo/query dojo/_base/lang ../_TimePicker ./_DateTimeTextBox".split(" "),function(r,l,q,p,k,e){return r("dijit.form.TimeTextBox",e,{baseClass:"dijitTextBox dijitComboBox dijitTimeTextBox",popupClass:k,_selector:"time",value:new Date(""),maxHeight:-1,openDropDown:function(e){this.inherited(arguments);var f=q(".dijitTimePickerItemSelected",this.dropDown.domNode),d=this.dropDown.domNode.parentNode;d.scrollTop=f[0]?f[0].offsetTop-
(d.clientHeight-f[0].clientHeight)/2:(d.scrollHeight-d.clientHeight)/2;this.dropDown.on("input",p.hitch(this,function(){this.set("value",this.dropDown.get("value"),!1)}))},_onInput:function(){this.inherited(arguments);var e=this.get("displayedValue");this.filterString=e&&!this.parse(e,this.constraints)?e.toLowerCase():"";this._opened&&this.closeDropDown();this.openDropDown()}})})},"dijit/_TimePicker":function(){define("dojo/_base/array dojo/date dojo/date/locale dojo/date/stamp dojo/_base/declare dojo/dom-class dojo/dom-construct dojo/_base/kernel dojo/keys dojo/_base/lang dojo/sniff dojo/query dojo/mouse dojo/on ./_WidgetBase ./form/_ListMouseMixin".split(" "),
function(r,l,q,p,k,e,f,h,d,b,c,a,g,w,m,u){return k("dijit._TimePicker",[m,u],{baseClass:"dijitTimePicker",pickerMin:"T00:00:00",pickerMax:"T23:59:59",clickableIncrement:"T00:15:00",visibleIncrement:"T01:00:00",value:new Date,_visibleIncrement:2,_clickableIncrement:1,_totalIncrements:10,constraints:{},serialize:p.toISOString,buildRendering:function(){this.inherited(arguments);this.timeMenu=this.containerNode=this.domNode},setValue:function(a){h.deprecated("dijit._TimePicker:setValue() is deprecated.  Use set('value', ...) instead.",
"","2.0");this.set("value",a)},_setValueAttr:function(a){this._set("value",a);this._showText()},_setFilterStringAttr:function(a){this._set("filterString",a);this._showText()},isDisabledDate:function(){return!1},_getFilteredNodes:function(a,b,c,d){a=this.ownerDocument.createDocumentFragment();for(b=0;b<this._maxIncrement;b++)(c=this._createOption(b))&&a.appendChild(c);return a},_showText:function(){var a=p.fromISOString;this.domNode.innerHTML="";this._clickableIncrementDate=a(this.clickableIncrement);
this._visibleIncrementDate=a(this.visibleIncrement);var b=function(a){return 3600*a.getHours()+60*a.getMinutes()+a.getSeconds()},c=b(this._clickableIncrementDate),b=b(this._visibleIncrementDate);(this.value||this.currentFocus).getTime();this._refDate=a(this.pickerMin);this._refDate.setFullYear(1970,0,1);this._clickableIncrement=1;this._visibleIncrement=b/c;a=a(this.pickerMax);a.setFullYear(1970,0,1);a=.001*(a.getTime()-this._refDate.getTime());this._maxIncrement=Math.ceil((a+1)/c);c=this._getFilteredNodes();
!c.firstChild&&this.filterString?(this.filterString="",this._showText()):this.domNode.appendChild(c)},constructor:function(){this.constraints={}},postMixInProperties:function(){this.inherited(arguments);this._setConstraintsAttr(this.constraints)},_setConstraintsAttr:function(a){for(var b in{clickableIncrement:1,visibleIncrement:1,pickerMin:1,pickerMax:1})b in a&&(this[b]=a[b]);a.locale||(a.locale=this.lang)},_createOption:function(a){var b=new Date(this._refDate),c=this._clickableIncrementDate;b.setHours(b.getHours()+
c.getHours()*a,b.getMinutes()+c.getMinutes()*a,b.getSeconds()+c.getSeconds()*a);"time"==this.constraints.selector&&b.setFullYear(1970,0,1);var d=q.format(b,this.constraints);if(this.filterString&&0!==d.toLowerCase().indexOf(this.filterString))return null;c=this.ownerDocument.createElement("div");c.className=this.baseClass+"Item";c.date=b;c.idx=a;f.create("div",{"class":this.baseClass+"ItemInner",innerHTML:d},c);d=1>a%this._visibleIncrement&&-1<a%this._visibleIncrement;a=!d&&!(a%this._clickableIncrement);
d?c.className+=" "+this.baseClass+"Marker":a&&(c.className+=" "+this.baseClass+"Tick");this.isDisabledDate(b)&&(c.className+=" "+this.baseClass+"ItemDisabled");this.value&&!l.compare(this.value,b,this.constraints.selector)&&(c.selected=!0,c.className+=" "+this.baseClass+"ItemSelected",this._selectedDiv=c,d?c.className+=" "+this.baseClass+"MarkerSelected":a&&(c.className+=" "+this.baseClass+"TickSelected"),this._highlightOption(c,!0));return c},onOpen:function(){this.inherited(arguments);this.set("selected",
this._selectedDiv)},_onOptionSelected:function(a,b){var c=a.target.date||a.target.parentNode.date;c&&!this.isDisabledDate(c)&&(this._set("value",c),this.emit("input"),b&&(this._highlighted_option=null,this.set("value",c),this.onChange(c)))},onChange:function(){},_highlightOption:function(a,b){if(a){if(b)this._highlighted_option&&this._highlightOption(this._highlighted_option,!1),this._highlighted_option=a;else{if(this._highlighted_option!==a)return;this._highlighted_option=null}e.toggle(a,this.baseClass+
"ItemHover",b);e.contains(a,this.baseClass+"Marker")?e.toggle(a,this.baseClass+"MarkerHover",b):e.toggle(a,this.baseClass+"TickHover",b)}},handleKey:function(a){if(a.keyCode==d.DOWN_ARROW)return this.selectNextNode(),this._onOptionSelected({target:this._highlighted_option},!1),a.stopPropagation(),a.preventDefault(),!1;if(a.keyCode==d.UP_ARROW)return this.selectPreviousNode(),this._onOptionSelected({target:this._highlighted_option},!1),a.stopPropagation(),a.preventDefault(),!1;if(a.keyCode==d.ENTER||
a.keyCode===d.TAB){if(!this._keyboardSelected&&a.keyCode===d.TAB)return!0;this._highlighted_option&&this._onOptionSelected({target:this._highlighted_option},!0);return a.keyCode===d.TAB}},onHover:function(a){this._highlightOption(a,!0)},onUnhover:function(a){this._highlightOption(a,!1)},onSelect:function(a){this._highlightOption(a,!0)},onDeselect:function(a){this._highlightOption(a,!1)},onClick:function(a){this._onOptionSelected({target:a},!0)}})})},"dojo/data/ItemFileReadStore":function(){define("../_base/kernel ../_base/lang ../_base/declare ../_base/array ../_base/xhr ../Evented ./util/filter ./util/simpleFetch ../date/stamp".split(" "),
function(r,l,q,p,k,e,f,h,d){q=q("dojo.data.ItemFileReadStore",[e],{constructor:function(b){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=!1;this.url=this._ccUrl=this._jsonFileUrl=b.url;this._jsonData=b.data;this.data=null;this._datatypeMap=b.typeMap||{};this._datatypeMap.Date||(this._datatypeMap.Date={type:Date,deserialize:function(b){return d.fromISOString(b)}});this._features={"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0};this._itemsByIdentity=null;this._storeRefPropName=
"_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=!1;this._queuedFetches=[];void 0!==b.urlPreventCache&&(this.urlPreventCache=b.urlPreventCache?!0:!1);void 0!==b.hierarchical&&(this.hierarchical=b.hierarchical?!0:!1);b.clearOnClose&&(this.clearOnClose=!0);"failOk"in b&&(this.failOk=b.failOk?!0:!1)},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:!1,urlPreventCache:!1,failOk:!1,hierarchical:!0,_assertIsItem:function(b){if(!this.isItem(b))throw Error(this.declaredClass+
": Invalid item argument.");},_assertIsAttribute:function(b){if("string"!==typeof b)throw Error(this.declaredClass+": Invalid attribute argument.");},getValue:function(b,c,a){b=this.getValues(b,c);return 0<b.length?b[0]:a},getValues:function(b,c){this._assertIsItem(b);this._assertIsAttribute(c);return(b[c]||[]).slice(0)},getAttributes:function(b){this._assertIsItem(b);var c=[],a;for(a in b)a!==this._storeRefPropName&&a!==this._itemNumPropName&&a!==this._rootItemPropName&&a!==this._reverseRefMap&&
c.push(a);return c},hasAttribute:function(b,c){this._assertIsItem(b);this._assertIsAttribute(c);return c in b},containsValue:function(b,c,a){var d=void 0;"string"===typeof a&&(d=f.patternToRegExp(a,!1));return this._containsValue(b,c,a,d)},_containsValue:function(b,c,a,d){return p.some(this.getValues(b,c),function(b){if(null!==b&&!l.isObject(b)&&d){if(b.toString().match(d))return!0}else if(a===b)return!0})},isItem:function(b){return b&&b[this._storeRefPropName]===this&&this._arrayOfAllItems[b[this._itemNumPropName]]===
b?!0:!1},isItemLoaded:function(b){return this.isItem(b)},loadItem:function(b){this._assertIsItem(b.item)},getFeatures:function(){return this._features},getLabel:function(b){if(this._labelAttr&&this.isItem(b))return this.getValue(b,this._labelAttr)},getLabelAttributes:function(b){return this._labelAttr?[this._labelAttr]:null},filter:function(b,c,a){var d=[],e,h;if(b.query){var k;e=b.queryOptions?b.queryOptions.ignoreCase:!1;var l={};for(h in b.query)k=b.query[h],"string"===typeof k?l[h]=f.patternToRegExp(k,
e):k instanceof RegExp&&(l[h]=k);for(e=0;e<c.length;++e){var q=!0,p=c[e];if(null===p)q=!1;else for(h in b.query)k=b.query[h],this._containsValue(p,h,k,l[h])||(q=!1);q&&d.push(p)}}else for(e=0;e<c.length;++e)h=c[e],null!==h&&d.push(h);a(d,b)},_fetchItems:function(b,c,a){var d=this;if(this._loadFinished)this.filter(b,this._getItemsArray(b.queryOptions),c);else if(this._jsonFileUrl!==this._ccUrl?(r.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.url=this._ccUrl=this._jsonFileUrl):this.url!==this._ccUrl&&(this._ccUrl=this._jsonFileUrl=this.url),null!=this.data&&(this._jsonData=this.data,this.data=null),this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:b,filter:l.hitch(d,"filter"),findCallback:l.hitch(d,c)});else{this._loadInProgress=!0;var e=k.get({url:d._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});e.addCallback(function(e){try{d._getItemsFromLoadedData(e),
d._loadFinished=!0,d._loadInProgress=!1,d.filter(b,d._getItemsArray(b.queryOptions),c),d._handleQueuedFetches()}catch(n){d._loadFinished=!0,d._loadInProgress=!1,a(n,b)}});e.addErrback(function(c){d._loadInProgress=!1;a(c,b)});var f=null;b.abort&&(f=b.abort);b.abort=function(){var a=e;a&&-1===a.fired&&(a.cancel(),a=null);f&&f.call(b)}}else if(this._jsonData)try{this._loadFinished=!0,this._getItemsFromLoadedData(this._jsonData),this._jsonData=null,d.filter(b,this._getItemsArray(b.queryOptions),c)}catch(u){a(u,
b)}else a(Error(this.declaredClass+": No JSON source data was provided as either URL or a nested Javascript object."),b)},_handleQueuedFetches:function(){if(0<this._queuedFetches.length){for(var b=0;b<this._queuedFetches.length;b++){var c=this._queuedFetches[b],a=c.args,d=c.filter,c=c.findCallback;d?d(a,this._getItemsArray(a.queryOptions),c):this.fetchItemByIdentity(a)}this._queuedFetches=[]}},_getItemsArray:function(b){return b&&b.deep?this._arrayOfAllItems:this._arrayOfTopLevelItems},close:function(b){this.clearOnClose&&
this._loadFinished&&!this._loadInProgress&&(""!=this._jsonFileUrl&&null!=this._jsonFileUrl||""!=this.url&&null!=this.url||null!=this.data||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=!1,this._itemsByIdentity=null,this._loadInProgress=!1,this._queuedFetches=[])},_getItemsFromLoadedData:function(b){function c(a){return null!==
a&&"object"===typeof a&&(!l.isArray(a)||d)&&!l.isFunction(a)&&(a.constructor==Object||l.isArray(a))&&"undefined"===typeof a._reference&&"undefined"===typeof a._type&&"undefined"===typeof a._value&&e.hierarchical}function a(b){e._arrayOfAllItems.push(b);for(var d in b){var f=b[d];if(f)if(l.isArray(f))for(var g=0;g<f.length;++g){var h=f[g];c(h)&&a(h)}else c(f)&&a(f)}}var d=!1,e=this;this._labelAttr=b.label;var f,h;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=b.items;for(f=0;f<this._arrayOfTopLevelItems.length;++f)h=
this._arrayOfTopLevelItems[f],l.isArray(h)&&(d=!0),a(h),h[this._rootItemPropName]=!0;var k={},q;for(f=0;f<this._arrayOfAllItems.length;++f)for(q in h=this._arrayOfAllItems[f],h){if(q!==this._rootItemPropName){var p=h[q];null!==p?l.isArray(p)||(h[q]=[p]):h[q]=[null]}k[q]=q}for(;k[this._storeRefPropName];)this._storeRefPropName+="_";for(;k[this._itemNumPropName];)this._itemNumPropName+="_";for(;k[this._reverseRefMap];)this._reverseRefMap+="_";if(k=b.identifier)for(this._itemsByIdentity={},this._features["dojo.data.api.Identity"]=
k,f=0;f<this._arrayOfAllItems.length;++f)if(h=this._arrayOfAllItems[f],b=h[k],b=b[0],Object.hasOwnProperty.call(this._itemsByIdentity,b)){if(this._jsonFileUrl)throw Error(this.declaredClass+":  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+k+"].  Value collided: ["+b+"]");if(this._jsonData)throw Error(this.declaredClass+":  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+k+"].  Value collided: ["+
b+"]");}else this._itemsByIdentity[b]=h;else this._features["dojo.data.api.Identity"]=Number;for(f=0;f<this._arrayOfAllItems.length;++f)h=this._arrayOfAllItems[f],h[this._storeRefPropName]=this,h[this._itemNumPropName]=f;for(f=0;f<this._arrayOfAllItems.length;++f)for(q in h=this._arrayOfAllItems[f],h)for(b=h[q],k=0;k<b.length;++k)if(p=b[k],null!==p&&"object"==typeof p){if("_type"in p&&"_value"in p){var r=p._type,z=this._datatypeMap[r];if(z)if(l.isFunction(z))b[k]=new z(p._value);else if(l.isFunction(z.deserialize))b[k]=
z.deserialize(p._value);else throw Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");else throw Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+r+"'");}if(p._reference){p=p._reference;if(l.isObject(p))for(r=0;r<this._arrayOfAllItems.length;++r){var z=this._arrayOfAllItems[r],v=!0,B;for(B in p)z[B]!=p[B]&&(v=!1);v&&(b[k]=z)}else b[k]=this._getItemByIdentity(p);
this.referenceIntegrity&&(p=b[k],this.isItem(p)&&this._addReferenceToMap(p,h,q))}else this.isItem(p)&&this.referenceIntegrity&&this._addReferenceToMap(p,h,q)}},_addReferenceToMap:function(b,c,a){},getIdentity:function(b){var c=this._features["dojo.data.api.Identity"];return c===Number?b[this._itemNumPropName]:(b=b[c])?b[0]:null},fetchItemByIdentity:function(b){var c,a;if(this._loadFinished)c=this._getItemByIdentity(b.identity),b.onItem&&(a=b.scope?b.scope:r.global,b.onItem.call(a,c));else{var d=this;
this._jsonFileUrl!==this._ccUrl?(r.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.url=this._ccUrl=this._jsonFileUrl):this.url!==this._ccUrl&&(this._ccUrl=this._jsonFileUrl=this.url);null!=this.data&&null==this._jsonData&&(this._jsonData=this.data,this.data=null);this._jsonFileUrl?this._loadInProgress?this._queuedFetches.push({args:b}):(this._loadInProgress=!0,a=k.get({url:d._jsonFileUrl,
handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk}),a.addCallback(function(a){var e=b.scope?b.scope:r.global;try{d._getItemsFromLoadedData(a),d._loadFinished=!0,d._loadInProgress=!1,c=d._getItemByIdentity(b.identity),b.onItem&&b.onItem.call(e,c),d._handleQueuedFetches()}catch(u){d._loadInProgress=!1,b.onError&&b.onError.call(e,u)}}),a.addErrback(function(a){d._loadInProgress=!1;b.onError&&b.onError.call(b.scope?b.scope:r.global,a)})):this._jsonData&&(d._getItemsFromLoadedData(d._jsonData),
d._jsonData=null,d._loadFinished=!0,c=d._getItemByIdentity(b.identity),b.onItem&&(a=b.scope?b.scope:r.global,b.onItem.call(a,c)))}},_getItemByIdentity:function(b){var c=null;this._itemsByIdentity?Object.hasOwnProperty.call(this._itemsByIdentity,b)&&(c=this._itemsByIdentity[b]):Object.hasOwnProperty.call(this._arrayOfAllItems,b)&&(c=this._arrayOfAllItems[b]);void 0===c&&(c=null);return c},getIdentityAttributes:function(b){b=this._features["dojo.data.api.Identity"];return b===Number?null:[b]},_forceLoad:function(){var b=
this;this._jsonFileUrl!==this._ccUrl?(r.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.url=this._ccUrl=this._jsonFileUrl):this.url!==this._ccUrl&&(this._ccUrl=this._jsonFileUrl=this.url);null!=this.data&&(this._jsonData=this.data,this.data=null);if(this._jsonFileUrl){var c=k.get({url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,
sync:!0});c.addCallback(function(a){try{if(!0!==b._loadInProgress&&!b._loadFinished)b._getItemsFromLoadedData(a),b._loadFinished=!0;else if(b._loadInProgress)throw Error(this.declaredClass+":  Unable to perform a synchronous load, an async load is in progress.");}catch(g){throw console.log(g),g;}});c.addErrback(function(a){throw a;})}else this._jsonData&&(b._getItemsFromLoadedData(b._jsonData),b._jsonData=null,b._loadFinished=!0)}});l.extend(q,h);return q})},"dojo/data/util/filter":function(){define(["../../_base/lang"],
function(r){var l={};r.setObject("dojo.data.util.filter",l);l.patternToRegExp=function(l,p){for(var k="^",e=null,f=0;f<l.length;f++)switch(e=l.charAt(f),e){case "\\":k+=e;f++;k+=l.charAt(f);break;case "*":k+=".*";break;case "?":k+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":k+="\\";default:k+=e}k+="$";return p?new RegExp(k,"mi"):new RegExp(k,"m")};return l})},"dojo/data/util/simpleFetch":function(){define(["../../_base/lang",
"../../_base/kernel","./sorter"],function(r,l,q){var p={};r.setObject("dojo.data.util.simpleFetch",p);p.errorHandler=function(k,e){e.onError&&e.onError.call(e.scope||l.global,k,e)};p.fetchHandler=function(k,e){var f=e.abort||null,h=!1,d=e.start?e.start:0,b=e.count&&Infinity!==e.count?d+e.count:k.length;e.abort=function(){h=!0;f&&f.call(e)};var c=e.scope||l.global;e.store||(e.store=this);e.onBegin&&e.onBegin.call(c,k.length,e);e.sort&&k.sort(q.createSortFunction(e.sort,this));if(e.onItem)for(var a=
d;a<k.length&&a<b;++a){var g=k[a];h||e.onItem.call(c,g,e)}e.onComplete&&!h&&(a=null,e.onItem||(a=k.slice(d,b)),e.onComplete.call(c,a,e))};p.fetch=function(k){k=k||{};k.store||(k.store=this);this._fetchItems(k,r.hitch(this,"fetchHandler"),r.hitch(this,"errorHandler"));return k};return p})},"dojo/data/util/sorter":function(){define(["../../_base/lang"],function(r){var l={};r.setObject("dojo.data.util.sorter",l);l.basicComparator=function(l,p){var k=-1;null===l&&(l=void 0);null===p&&(p=void 0);if(l==
p)k=0;else if(l>p||null==l)k=1;return k};l.createSortFunction=function(q,p){function k(a,b,c,d){return function(e,f){var g=d.getValue(e,a),h=d.getValue(f,a);return b*c(g,h)}}for(var e=[],f,h=p.comparatorMap,d=l.basicComparator,b=0;b<q.length;b++){f=q[b];var c=f.attribute;if(c){f=f.descending?-1:1;var a=d;h&&("string"!==typeof c&&"toString"in c&&(c=c.toString()),a=h[c]||d);e.push(k(c,f,a,p))}}return function(a,b){for(var c=0;c<e.length;){var d=e[c++](a,b);if(0!==d)return d}return 0}};return l})},"dojox/date/islamic":function(){define(["dojox/main",
"dojo/_base/lang","dojo/date","./islamic/Date"],function(r,l,q,p){var k=l.getObject("date.islamic",!0,r);k.getDaysInMonth=function(e){return e.getDaysInIslamicMonth(e.getMonth(),e.getFullYear())};k.compare=function(e,f,h){e instanceof p&&(e=e.toGregorian());f instanceof p&&(f=f.toGregorian());return q.compare.apply(null,arguments)};k.add=function(e,f,h){var d=new p(e);switch(f){case "day":d.setDate(e.getDate()+h);break;case "weekday":var b=e.getDay();if(5>b+h&&0<b+h)d.setDate(e.getDate()+h);else{var c=
f=0;5==b?(b=4,c=0<h?-1:1):6==b&&(b=4,c=0<h?-2:2);var b=0<h?5-b-1:-b,a=h-b,g=parseInt(a/5);0!=a%5&&(f=0<h?2:-2);f=f+7*g+a%5+b;d.setDate(e.getDate()+f+c)}break;case "year":d.setFullYear(e.getFullYear()+h);break;case "week":h*=7;d.setDate(e.getDate()+h);break;case "month":e=e.getMonth();d.setMonth(e+h);break;case "hour":d.setHours(e.getHours()+h);break;case "minute":d._addMinutes(h);break;case "second":d._addSeconds(h);break;case "millisecond":d._addMilliseconds(h)}return d};k.difference=function(e,
f,h){f=f||new p;h=h||"day";var d=f.getFullYear()-e.getFullYear(),b=1;switch(h){case "weekday":d=Math.round(k.difference(e,f,"day"));b=parseInt(k.difference(e,f,"week"));if(0==d%7)d=5*b;else{h=0;var c=e.getDay(),a=f.getDay(),b=parseInt(d/7);f=d%7;e=new p(e);e.setDate(e.getDate()+7*b);e=e.getDay();if(0<d)switch(!0){case 5==c:h=-1;break;case 6==c:h=0;break;case 5==a:h=-1;break;case 6==a:h=-2;break;case 5<e+f:h=-2}else if(0>d)switch(!0){case 5==c:h=0;break;case 6==c:h=1;break;case 5==a:h=2;break;case 6==
a:h=1;break;case 0>e+f:h=2}d=d+h-2*b}b=d;break;case "year":b=d;break;case "month":h=f.toGregorian()>e.toGregorian()?f:e;c=f.toGregorian()>e.toGregorian()?e:f;b=h.getMonth();a=c.getMonth();if(0==d)b=h.getMonth()-c.getMonth();else for(b=12-a+b,d=c.getFullYear()+1,h=h.getFullYear(),d;d<h;d++)b+=12;f.toGregorian()<e.toGregorian()&&(b=-b);break;case "week":b=parseInt(k.difference(e,f,"day")/7);break;case "day":b/=24;case "hour":b/=60;case "minute":b/=60;case "second":b/=1E3;case "millisecond":b*=f.toGregorian().getTime()-
e.toGregorian().getTime()}return Math.round(b)};return k})},"dojox/main":function(){define(["dojo/_base/kernel"],function(r){return r.dojox})},"dojox/date/islamic/Date":function(){define(["dojo/_base/lang","dojo/_base/declare","dojo/date"],function(r,l,q){var p=l("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 k=arguments.length;k?1==k?(k=arguments[0],"number"==
typeof k&&(k=new Date(k)),k instanceof Date?this.fromGregorian(k):""==k?this._date=new Date(""):(this._year=k._year,this._month=k._month,this._date=k._date,this._hours=k._hours,this._minutes=k._minutes,this._seconds=k._seconds,this._milliseconds=k._milliseconds)):3<=k&&(this._year+=arguments[0],this._month+=arguments[1],this._date+=arguments[2],this._hours+=arguments[3]||0,this._minutes+=arguments[4]||0,this._seconds+=arguments[5]||0,this._milliseconds+=arguments[6]||0):this.fromGregorian(new Date)},
getDate:function(){return this._date},getMonth:function(){return this._month},getFullYear:function(){return this._year},getDay:function(){return this.toGregorian().getDay()},getHours:function(){return this._hours},getMinutes:function(){return this._minutes},getSeconds:function(){return this._seconds},getMilliseconds:function(){return this._milliseconds},setDate:function(k){k=parseInt(k);if(!(0<k&&k<=this.getDaysInIslamicMonth(this._month,this._year))){var e;if(0<k)for(e=this.getDaysInIslamicMonth(this._month,
this._year);k>e;k-=e,e=this.getDaysInIslamicMonth(this._month,this._year))this._month++,12<=this._month&&(this._year++,this._month-=12);else for(e=this.getDaysInIslamicMonth(0<=this._month-1?this._month-1:11,0<=this._month-1?this._year:this._year-1);0>=k;e=this.getDaysInIslamicMonth(0<=this._month-1?this._month-1:11,0<=this._month-1?this._year:this._year-1))this._month--,0>this._month&&(this._year--,this._month+=12),k+=e}this._date=k;return this},setFullYear:function(k){this._year=+k},setMonth:function(k){this._year+=
Math.floor(k/12);this._month=0<k?Math.floor(k%12):Math.floor((k%12+12)%12)},setHours:function(){var k=arguments.length,e=0;1<=k&&(e=parseInt(arguments[0]));2<=k&&(this._minutes=parseInt(arguments[1]));3<=k&&(this._seconds=parseInt(arguments[2]));4==k&&(this._milliseconds=parseInt(arguments[3]));for(;24<=e;)this._date++,k=this.getDaysInIslamicMonth(this._month,this._year),this._date>k&&(this._month++,12<=this._month&&(this._year++,this._month-=12),this._date-=k),e-=24;this._hours=e},_addMinutes:function(k){k+=
this._minutes;this.setMinutes(k);this.setHours(this._hours+parseInt(k/60));return this},_addSeconds:function(k){k+=this._seconds;this.setSeconds(k);this._addMinutes(parseInt(k/60));return this},_addMilliseconds:function(k){k+=this._milliseconds;this.setMilliseconds(k);this._addSeconds(parseInt(k/1E3));return this},setMinutes:function(k){this._minutes=k%60;return this},setSeconds:function(k){this._seconds=k%60;return this},setMilliseconds:function(k){this._milliseconds=k%1E3;return this},toString:function(){if(isNaN(this._date))return"Invalidate Date";
var k=new Date;k.setHours(this._hours);k.setMinutes(this._minutes);k.setSeconds(this._seconds);k.setMilliseconds(this._milliseconds);return this._month+" "+this._date+" "+this._year+" "+k.toTimeString()},toGregorian:function(){var k=this._year,k=Math.floor(this._date+Math.ceil(29.5*this._month)+354*(k-1)+Math.floor((3+11*k)/30)+this._ISLAMIC_EPOCH-1-.5)+.5,e=k-this._GREGORIAN_EPOCH,f=Math.floor(e/146097),h=this._mod(e,146097),e=Math.floor(h/36524),d=this._mod(h,36524),h=Math.floor(d/1461),d=this._mod(d,
1461),d=Math.floor(d/365),f=400*f+100*e+4*h+d;4!=e&&4!=d&&f++;e=k-(this._GREGORIAN_EPOCH+365*(f-1)+Math.floor((f-1)/4)-Math.floor((f-1)/100)+Math.floor((f-1)/400));h=this._GREGORIAN_EPOCH-1+365*(f-1)+Math.floor((f-1)/4)-Math.floor((f-1)/100)+Math.floor((f-1)/400)+Math.floor(739/12+(q.isLeapYear(new Date(f,3,1))?-1:-2)+1);h=k<h?0:q.isLeapYear(new Date(f,3,1))?1:2;e=Math.floor((12*(e+h)+373)/367);h=this._GREGORIAN_EPOCH-1+365*(f-1)+Math.floor((f-1)/4)-Math.floor((f-1)/100)+Math.floor((f-1)/400)+Math.floor((367*
e-362)/12+(2>=e?0:q.isLeapYear(new Date(f,e-1,1))?-1:-2)+1);return new Date(f,e-1,k-h+1,this._hours,this._minutes,this._seconds,this._milliseconds)},fromGregorian:function(k){k=new Date(k);var e=k.getFullYear(),f=k.getMonth(),h=k.getDate(),e=this._GREGORIAN_EPOCH-1+365*(e-1)+Math.floor((e-1)/4)+-Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*(f+1)-362)/12+(2>=f+1?0:q.isLeapYear(k)?-1:-2)+h),e=Math.floor(e)+.5,e=e-this._ISLAMIC_EPOCH,f=Math.floor((30*e+10646)/10631),h=Math.ceil((e-29-
this._yearStart(f))/29.5),h=Math.min(h,11);this._date=Math.ceil(e-this._monthStart(f,h))+1;this._month=h;this._year=f;this._hours=k.getHours();this._minutes=k.getMinutes();this._seconds=k.getSeconds();this._milliseconds=k.getMilliseconds();this._day=k.getDay();return this},valueOf:function(){return this.toGregorian().valueOf()},_yearStart:function(k){return 354*(k-1)+Math.floor((3+11*k)/30)},_monthStart:function(k,e){return Math.ceil(29.5*e)+354*(k-1)+Math.floor((3+11*k)/30)},_civilLeapYear:function(k){return 11>
(14+11*k)%30},getDaysInIslamicMonth:function(k,e){var f=0,f=29+(k+1)%2;11==k&&this._civilLeapYear(e)&&f++;return f},_mod:function(k,e){return k-e*Math.floor(k/e)}});p.getDaysInIslamicMonth=function(k){return(new p).getDaysInIslamicMonth(k.getMonth(),k.getFullYear())};return p})},"dojox/date/islamic/locale":function(){define("dojox/main dojo/_base/lang dojo/_base/array dojo/date dojo/i18n dojo/regexp dojo/string ./Date dojo/i18n!dojo/cldr/nls/islamic".split(" "),function(r,l,q,p,k,e,f,h,d){function b(a,
b,c,d,e){return e.replace(/([a-z])\1*/ig,function(c){var d,g,h=c.charAt(0);c=c.length;var k=["abbr","wide","narrow"];switch(h){case "G":d=b.eraAbbr[0];break;case "y":d=String(a.getFullYear());break;case "M":d=a.getMonth();3>c?(d+=1,g=!0):(h=["months-format",k[c-3]].join("-"),d=b[h][d]);break;case "d":d=a.getDate(!0);g=!0;break;case "E":d=a.getDay();3>c?(d+=1,g=!0):(h=["days-format",k[c-3]].join("-"),d=b[h][d]);break;case "a":d=12>a.getHours()?"am":"pm";d=b["dayPeriods-format-wide-"+d];break;case "h":case "H":case "K":case "k":g=
a.getHours();switch(h){case "h":d=g%12||12;break;case "H":d=g;break;case "K":d=g%12;break;case "k":d=g||24}g=!0;break;case "m":d=a.getMinutes();g=!0;break;case "s":d=a.getSeconds();g=!0;break;case "S":d=Math.round(a.getMilliseconds()*Math.pow(10,c-3));g=!0;break;case "z":if(d=p.getTimezoneName(a.toGregorian()))break;c=4;case "Z":d=a.toGregorian().getTimezoneOffset();d=[0>=d?"+":"-",f.pad(Math.floor(Math.abs(d)/60),2),f.pad(Math.abs(d)%60,2)];4==c&&(d.splice(0,0,"GMT"),d.splice(3,0,":"));d=d.join("");
break;default:throw Error("dojox.date.islamic.locale.formatPattern: invalid pattern char: "+e);}g&&(d=f.pad(d,c));return d})}function c(a,b,c,d){var e=function(a){return a};b=b||e;c=c||e;d=d||e;var f=a.match(/(''|[^'])+/g),g="'"==a.charAt(0);q.forEach(f,function(a,d){a?(f[d]=(g?c:b)(a),g=!g):f[d]=""});return d(f.join(""))}function a(a,b,c,d){d=e.escapeString(d);k.normalizeLocale(c.locale);return d.replace(/([a-z])\1*/ig,function(d){var e;e=d.charAt(0);var f=d.length,g="";c.strict?1<f&&(g="0{"+(f-
1)+"}"):g="0?";switch(e){case "y":e="\\d+";break;case "M":e=2<f?"\\S+ ?\\S+":g+"[1-9]|1[0-2]";break;case "d":e="[12]\\d|"+g+"[1-9]|3[01]";break;case "E":e="\\S+";break;case "h":e=g+"[1-9]|1[0-2]";break;case "k":e=g+"\\d|1[01]";break;case "H":e=g+"\\d|1\\d|2[0-3]";break;case "K":e=g+"[1-9]|1\\d|2[0-4]";break;case "m":case "s":e=g+"\\d|[0-5]\\d";break;case "S":e="\\d{"+f+"}";break;case "a":f=c.am||b["dayPeriods-format-wide-am"];g=c.pm||b["dayPeriods-format-wide-pm"];c.strict?e=f+"|"+g:(e=f+"|"+g,f!=
f.toLowerCase()&&(e+="|"+f.toLowerCase()),g!=g.toLowerCase()&&(e+="|"+g.toLowerCase()));break;default:e=".*"}a&&a.push(d);return"("+e+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var g=l.getObject("date.islamic.locale",!0,r);g.format=function(a,d){d=d||{};var e=k.normalizeLocale(d.locale),f=d.formatLength||"short",h=g._getIslamicBundle(e),m=[],e=l.hitch(this,b,a,h,e,d.fullYear);if("year"==d.selector)return a.getFullYear();if("time"!=d.selector){var p=d.datePattern||h["dateFormat-"+f];p&&m.push(c(p,e))}"date"!=
d.selector&&(f=d.timePattern||h["timeFormat-"+f])&&m.push(c(f,e));return m.join(" ")};g.regexp=function(a){return g._parseInfo(a).regexp};g._parseInfo=function(b){b=b||{};var d=k.normalizeLocale(b.locale),d=g._getIslamicBundle(d),e=b.formatLength||"short",f=b.datePattern||d["dateFormat-"+e],e=b.timePattern||d["timeFormat-"+e],h=[];return{regexp:c("date"==b.selector?f:"time"==b.selector?e:"undefined"==typeof e?f:f+" "+e,l.hitch(this,a,h,d,b)),tokens:h,bundle:d}};g.parse=function(a,b){a=a.replace(/[\u200E\u200F\u202A\u202E]/g,
"");b||(b={});var c=g._parseInfo(b),d=c.tokens,e=c.bundle,c=c.regexp.replace(/[\u200E\u200F\u202A\u202E]/g,""),c=(new RegExp("^"+c+"$")).exec(a);k.normalizeLocale(b.locale);if(!c)return null;var f=[1389,0,1,0,0,0,0],l="",m=["abbr","wide","narrow"];q.every(c,function(a,c){if(!c)return!0;var g=d[c-1],h=g.length;switch(g.charAt(0)){case "y":f[0]=Number(a);break;case "M":if(2<h){if(g=e["months-format-"+m[h-3]].concat(),b.strict||(a=a.replace(".","").toLowerCase(),g=q.map(g,function(a){return a?a.replace(".",
"").toLowerCase():a})),a=q.indexOf(g,a),-1==a)return!1}else a--;f[1]=Number(a);break;case "D":f[1]=0;case "d":f[2]=Number(a);break;case "a":g=b.am||e["dayPeriods-format-wide-am"];h=b.pm||e["dayPeriods-format-wide-pm"];if(!b.strict){var k=/\./g;a=a.replace(k,"").toLowerCase();g=g.replace(k,"").toLowerCase();h=h.replace(k,"").toLowerCase()}if(b.strict&&a!=g&&a!=h)return!1;l=a==h?"p":a==g?"a":"";break;case "K":24==a&&(a=0);case "h":case "H":case "k":f[3]=Number(a);break;case "m":f[4]=Number(a);break;
case "s":f[5]=Number(a);break;case "S":f[6]=Number(a)}return!0});c=+f[3];"p"===l&&12>c?f[3]=c+12:"a"===l&&12==c&&(f[3]=0);return new h(f[0],f[1],f[2],f[3],f[4],f[5],f[6])};var w=[];g.addCustomFormats=function(a,b){w.push({pkg:a,name:b})};g._getIslamicBundle=function(a){var b={};q.forEach(w,function(c){c=k.getLocalization(c.pkg,c.name,a);b=l.mixin(b,c)},this);return b};g.addCustomFormats("dojo.cldr","islamic");g.getNames=function(a,b,c,d,e){var f;d=g._getIslamicBundle(d);a=[a,c,b];"standAlone"==c&&
(c=a.join("-"),f=d[c],1==f[0]&&(f=void 0));a[1]="format";return(f||d[a.join("-")]).concat()};g.weekDays=g.getNames("days","wide","format");g.months=g.getNames("months","wide","format");return g})},"url:dijit/form/templates/Button.html":'\x3cspan class\x3d"dijit dijitReset dijitInline" role\x3d"presentation"\r\n\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonNode"\r\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" role\x3d"presentation"\r\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\r\n\t\t\tdata-dojo-attach-point\x3d"titleNode,focusNode"\r\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitToggleButtonIconChar"\x3e\x26#x25CF;\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\r\n\t\t\t\tid\x3d"${id}_label"\r\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\r\n\t\t\t\x3e\x3c/span\r\n\t\t\x3e\x3c/span\r\n\t\x3e\x3c/span\r\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen"\r\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick"\r\n\t\ttabIndex\x3d"-1" aria-hidden\x3d"true" data-dojo-attach-point\x3d"valueNode"\r\n/\x3e\x3c/span\x3e\r\n',
"url:dijit/form/templates/DropDownButton.html":'\x3cspan class\x3d"dijit dijitReset dijitInline"\r\n\t\x3e\x3cspan class\x3d\'dijitReset dijitInline dijitButtonNode\'\r\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" data-dojo-attach-point\x3d"_buttonNode"\r\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\r\n\t\t\tdata-dojo-attach-point\x3d"focusNode,titleNode,_arrowWrapperNode,_popupStateNode"\r\n\t\t\trole\x3d"button" aria-haspopup\x3d"true" aria-labelledby\x3d"${id}_label"\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon"\r\n\t\t\t\tdata-dojo-attach-point\x3d"iconNode"\r\n\t\t\t\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\r\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\r\n\t\t\t\tid\x3d"${id}_label"\r\n\t\t\t\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonInner"\x3e\x3c/span\r\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonChar"\x3e\x26#9660;\x3c/span\r\n\t\t\x3e\x3c/span\r\n\t\x3e\x3c/span\r\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen" tabIndex\x3d"-1"\r\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick" data-dojo-attach-point\x3d"valueNode" aria-hidden\x3d"true"\r\n/\x3e\x3c/span\x3e\r\n',
"url:dijit/templates/ProgressBar.html":'\x3cdiv class\x3d"dijitProgressBar dijitProgressBarEmpty" role\x3d"progressbar"\r\n\t\x3e\x3cdiv  data-dojo-attach-point\x3d"internalProgress" class\x3d"dijitProgressBarFull"\r\n\t\t\x3e\x3cdiv class\x3d"dijitProgressBarTile" role\x3d"presentation"\x3e\x3c/div\r\n\t\t\x3e\x3cspan style\x3d"visibility:hidden"\x3e\x26#160;\x3c/span\r\n\t\x3e\x3c/div\r\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"labelNode" class\x3d"dijitProgressBarLabel" id\x3d"${id}_label"\x3e\x3c/div\r\n\t\x3e\x3cspan data-dojo-attach-point\x3d"indeterminateHighContrastImage"\r\n\t\t   class\x3d"dijitInline dijitProgressBarIndeterminateHighContrastImage"\x3e\x3c/span\r\n\x3e\x3c/div\x3e\r\n',
"url:esri/dijit/editing/templates/AttachmentEditor.html":"\x3cdiv class\x3d\"attachmentEditor\"\x3e\r\n    \x3cbr /\x3e\r\n    \x3cdiv\x3e\r\n        \x3cb\x3e${NLS_attachments}\x3c/b\x3e\r\n        \x3chr /\x3e\r\n        \x3cdiv dojoAttachPoint\x3d\"_attachmentError\" style\x3d'color:red;display:none'\x3e\x3c/div\x3e\r\n        \x3cbr /\x3e\r\n        \x3cspan dojoAttachPoint\x3d'_attachmentList' style\x3d'word-wrap: break-word;'\x3e\x3c/span\x3e\r\n        \x3cbr\x3e\x3cbr\x3e\r\n        \x3cdiv data-dojo-type\x3d\"dijit/ProgressBar\" dojoAttachPoint\x3d\"_attachmentProgress\" indeterminate\x3d\"true\" style\x3d'display:none'\x3e\x3c/div\x3e\r\n        \x3cbr /\x3e        \r\n        \x3cform dojoAttachPoint\x3d'_uploadForm'\x3e ${NLS_add}:\x26nbsp;\x26nbsp;\x3cinput type\x3d'file' name\x3d'attachment' dojoAttachPoint\x3d'_uploadField' /\x3e \x3c/form\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e",
"url:dijit/templates/Calendar.html":'\x3cdiv class\x3d"dijitCalendarContainer dijitInline" role\x3d"presentation" aria-labelledby\x3d"${id}_mddb ${id}_year"\x3e\r\n\t\x3cdiv class\x3d"dijitReset dijitCalendarMonthContainer" role\x3d"presentation"\x3e\r\n\t\t\x3cdiv class\x3d\'dijitReset dijitCalendarArrow dijitCalendarDecrementArrow\' data-dojo-attach-point\x3d"decrementMonth"\x3e\r\n\t\t\t\x3cimg src\x3d"${_blankGif}" alt\x3d"" class\x3d"dijitCalendarIncrementControl dijitCalendarDecrease" role\x3d"presentation"/\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"decreaseArrowNode" class\x3d"dijitA11ySideArrow"\x3e-\x3c/span\x3e\r\n\t\t\x3c/div\x3e\r\n\t\t\x3cdiv class\x3d\'dijitReset dijitCalendarArrow dijitCalendarIncrementArrow\' data-dojo-attach-point\x3d"incrementMonth"\x3e\r\n\t\t\t\x3cimg src\x3d"${_blankGif}" alt\x3d"" class\x3d"dijitCalendarIncrementControl dijitCalendarIncrease" role\x3d"presentation"/\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"increaseArrowNode" class\x3d"dijitA11ySideArrow"\x3e+\x3c/span\x3e\r\n\t\t\x3c/div\x3e\r\n\t\t\x3cdiv data-dojo-attach-point\x3d"monthNode" class\x3d"dijitInline"\x3e\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\t\x3ctable cellspacing\x3d"0" cellpadding\x3d"0" role\x3d"grid" data-dojo-attach-point\x3d"gridNode"\x3e\r\n\t\t\x3cthead\x3e\r\n\t\t\t\x3ctr role\x3d"row"\x3e\r\n\t\t\t\t${!dayCellsHtml}\r\n\t\t\t\x3c/tr\x3e\r\n\t\t\x3c/thead\x3e\r\n\t\t\x3ctbody data-dojo-attach-point\x3d"dateRowsNode" data-dojo-attach-event\x3d"ondijitclick: _onDayClick" class\x3d"dijitReset dijitCalendarBodyContainer"\x3e\r\n\t\t\t\t${!dateRowsHtml}\r\n\t\t\x3c/tbody\x3e\r\n\t\x3c/table\x3e\r\n\t\x3cdiv class\x3d"dijitReset dijitCalendarYearContainer" role\x3d"presentation"\x3e\r\n\t\t\x3cdiv class\x3d"dijitCalendarYearLabel"\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"previousYearLabelNode" class\x3d"dijitInline dijitCalendarPreviousYear" role\x3d"button"\x3e\x3c/span\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"currentYearLabelNode" class\x3d"dijitInline dijitCalendarSelectedYear" role\x3d"button" id\x3d"${id}_year"\x3e\x3c/span\x3e\r\n\t\t\t\x3cspan data-dojo-attach-point\x3d"nextYearLabelNode" class\x3d"dijitInline dijitCalendarNextYear" role\x3d"button"\x3e\x3c/span\x3e\r\n\t\t\x3c/div\x3e\r\n\t\x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"url:dijit/form/templates/TextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft" id\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',"url:dijit/templates/Tooltip.html":'\x3cdiv class\x3d"dijitTooltip dijitTooltipLeft" id\x3d"dojoTooltip" data-dojo-attach-event\x3d"mouseenter:onMouseEnter,mouseleave:onMouseLeave"\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipConnector" data-dojo-attach-point\x3d"connectorNode"\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitTooltipContainer dijitTooltipContents" data-dojo-attach-point\x3d"containerNode" role\x3d\'alert\'\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
"url:dijit/form/templates/ValidationTextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\r\n\tid\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t/\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\r\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
"url:dijit/form/templates/DropDownBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\r\n\tid\x3d"widget_${id}"\r\n\trole\x3d"combobox"\r\n\taria-haspopup\x3d"true"\r\n\tdata-dojo-attach-point\x3d"_popupStateNode"\r\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer\'\r\n\t\tdata-dojo-attach-point\x3d"_buttonNode" role\x3d"presentation"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitArrowButtonInner" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"button presentation" aria-hidden\x3d"true"\r\n\t\t\t${_buttonInputDisabled}\r\n\t/\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t/\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d\'dijitReset dijitInputInner\' ${!nameAttrSetting} type\x3d"${type}" autocomplete\x3d"off"\r\n\t\t\tdata-dojo-attach-point\x3d"textbox,focusNode" role\x3d"textbox"\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
"url:dijit/form/templates/Spinner.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\r\n\tid\x3d"widget_${id}" role\x3d"presentation"\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitButtonNode dijitSpinnerButtonContainer"\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitSpinnerButtonInner" type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t\t/\x3e\x3cdiv class\x3d"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton"\r\n\t\t\tdata-dojo-attach-point\x3d"upArrowNode"\r\n\t\t\t\x3e\x3cdiv class\x3d"dijitArrowButtonInner"\r\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField" value\x3d"\x26#9650; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t\t\t\t\t${_buttonInputDisabled}\r\n\t\t\t/\x3e\x3c/div\r\n\t\t\x3e\x3c/div\r\n\t\t\x3e\x3cdiv class\x3d"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton"\r\n\t\t\tdata-dojo-attach-point\x3d"downArrowNode"\r\n\t\t\t\x3e\x3cdiv class\x3d"dijitArrowButtonInner"\r\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t\t\t\t\t${_buttonInputDisabled}\r\n\t\t\t/\x3e\x3c/div\r\n\t\t\x3e\x3c/div\r\n\t\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\r\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\r\n\t/\x3e\x3c/div\r\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\r\n\t\t\x3e\x3cinput class\x3d\'dijitReset dijitInputInner\' data-dojo-attach-point\x3d"textbox,focusNode" type\x3d"${type}" data-dojo-attach-event\x3d"onkeydown:_onKeyDown"\r\n\t\t\trole\x3d"spinbutton" autocomplete\x3d"off" ${!nameAttrSetting}\r\n\t/\x3e\x3c/div\r\n\x3e\x3c/div\x3e\r\n',
"url:esri/dijit/templates/AttributeInspector.html":'\x3cdiv class\x3d"esriAttributeInspector"\x3e\r\n    \x3cdiv class\x3d"atiLayerName" dojoAttachPoint\x3d"layerName"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"atiAttributes" dojoAttachPoint\x3d"attributeTable"\x3e\x3c/div\x3e\r\n    \x3cdiv dojoAttachPoint\x3d"attachmentEditor"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"atiEditorTrackingInfo" dojoAttachPoint\x3d"editorTrackingInfoDiv"\x3e\x3c/div\x3e\r\n    \x3cdiv class\x3d"atiButtons" dojoAttachPoint\x3d"editButtons"\x3e\r\n        \x3cbutton  dojoType\x3d"dijit.form.Button" class\x3d"atiButton atiDeleteButton"  dojoAttachPoint\x3d"deleteBtn" dojoAttachEvent\x3d"onClick: onDeleteBtn" showLabel\x3d"true" type\x3d"button"\x3e${NLS_deleteFeature}\x3c/button\x3e\r\n        \x3cdiv class\x3d"atiNavButtons" dojoAttachPoint\x3d"navButtons"\x3e\r\n            \x3cdiv class\x3d"atiNavMessage" dojoAttachPoint\x3d"navMessage"\x3e\x3c/div\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiFirstIcon" dojoAttachPoint\x3d"firstFeatureButton" dojoAttachEvent\x3d"onClick: onFirstFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_first}\x3c/button\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiPrevIcon" dojoAttachPoint\x3d"prevFeatureButton" dojoAttachEvent\x3d"onClick: onPreviousFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_previous}\x3c/button\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiNextIcon" dojoAttachPoint\x3d"nextFeatureButton" dojoAttachEvent\x3d"onClick: onNextFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_next}\x3c/button\x3e\r\n            \x3cbutton  dojoType\x3d"dijit.form.Button" iconClass\x3d"atiButton atiLastIcon" dojoAttachPoint\x3d"lastFeatureButton" dojoAttachEvent\x3d"onClick: onLastFeature" showLabel\x3d"false" type\x3d"button"\x3e${NLS_last}\x3c/button\x3e\r\n        \x3c/div\x3e\r\n    \x3c/div\x3e\r\n\x3c/div\x3e\r\n',
"*now":function(r){r(['dojo/i18n!*preload*esri/dijit/nls/AttributeInspector-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/AttributeInspector-all",["../layers/FeatureLayer","./AttributeInspector"],function(r,l){return{}});